Bug 185844 - finance/openerp-server update from 6.0.3 to 7.0
finance/openerp-server update from 6.0.3 to 7.0
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: John Marino
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-17 14:30 UTC by pakhom706
Modified: 2014-01-24 23:01 UTC (History)
0 users

See Also:


Attachments
file.diff (8.18 KB, patch)
2014-01-17 14:30 UTC, pakhom706
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pakhom706 2014-01-17 14:30:00 UTC
update to 7.0 LTS (stable)

Fix: Patch attached with submission follows:
Comment 1 John Marino freebsd_committer 2014-01-24 20:22:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marino

I'll take it.
Comment 2 dfilter freebsd_committer 2014-01-24 22:12:11 UTC
Author: marino
Date: Fri Jan 24 22:12:02 2014
New Revision: 340935
URL: http://svnweb.freebsd.org/changeset/ports/340935
QAT: https://qat.redports.org/buildarchive/r340935/

Log:
  finance/openerp: Update version from 6.0.3 to 7.0 (LTS)
  
  Port maintenance assigned to Pakhom Golynga.
  
  PR:		ports/185844
  Submitted by:	Pakhom Golynga
  Modified by:	marino@

Modified:
  head/finance/openerp-server/Makefile
  head/finance/openerp-server/distinfo
  head/finance/openerp-server/files/openerpd.in
  head/finance/openerp-server/files/patch-setup.py
  head/finance/openerp-server/files/pkg-message.in

Modified: head/finance/openerp-server/Makefile
==============================================================================
--- head/finance/openerp-server/Makefile	Fri Jan 24 22:01:48 2014	(r340934)
+++ head/finance/openerp-server/Makefile	Fri Jan 24 22:12:02 2014	(r340935)
@@ -2,13 +2,13 @@
 # $FreeBSD$
 
 PORTNAME=	openerp-server
-PORTVERSION=	6.0.3
-PORTREVISION=	2
+PORTVERSION=	7.0
 PORTEPOCH=	1
 CATEGORIES=	finance python
-MASTER_SITES=	http://www.openerp.com/download/stable/source/
+MASTER_SITES=	http://nightly.openerp.com/7.0/nightly/src/
+DISTNAME=       openerp-${PORTVERSION}-${NIGHTLY}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	pakhom706@gmail.com
 COMMENT=	Open source application ERP & CRM in Python using Postgresql
 
 BUILD_DEPENDS=	${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
@@ -24,61 +24,32 @@ BUILD_DEPENDS=	${PYTHON_SITELIBDIR}/PIL/
 		${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \
 		${PYTHON_PKGNAMEPREFIX}mako>0:${PORTSDIR}/textproc/py-mako \
 		${PYTHON_PKGNAMEPREFIX}dateutil>0:${PORTSDIR}/devel/py-dateutil \
+		${PYTHON_PKGNAMEPREFIX}ldap2>0:${PORTSDIR}/net/py-ldap2 \
 		${PYTHON_SITELIBDIR}/reportlab/__init__.py:${PORTSDIR}/print/py-reportlab2
 RUN_DEPENDS:=	${BUILD_DEPENDS}
 
+NIGHTLY=	20140115-002435
+NIGHTLY_=	${NIGHTLY:S/-/_/g}
+WRKSRC=         ${WRKDIR}/openerp-${PORTVERSION}-${NIGHTLY}
+
 USE_RC_SUBR=	openerpd
 SUB_FILES=	openerp-server.conf pkg-message
 SUB_LIST=	PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR}
 
 USE_PYTHON=			yes
 USE_PYDISTUTILS=		yes
-PYDISTUTILS_EGGINFODIR=		${PYTHON_SITELIBDIR}/openerp_server-${PORTVERSION}-${PYTHON_VERSION:S/thon//}.egg-info
-PYDISTUTILS_EGGINFO=		PKG-INFO
+PYDISTUTILS_NOEGGINFO=		yes
+PYDISTUTILS_AUTOPLIST=		yes
 
 USERS=		openerpd
 GROUPS=		openerpd
 
-MAN1=		openerp-server.1
-MAN5=		openerp_serverrc.5
-
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
-post-patch:
-	@${REINPLACE_CMD} -e 's|/usr/bin/env python|${PYTHON_CMD}|g' ${WRKSRC}/bin/openerp-server.py
-
 post-install:
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	@cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR}
-	@${FIND} -s -d ${DOCSDIR} -type f | ${SED} 's#${PREFIX}/##g' >> ${TMPPLIST}
-	@${FIND} -s -d ${DOCSDIR} -type d | ${SED} 's#${PREFIX}/#@dirrm #g' >> ${TMPPLIST}
-.endif
-
-	${INSTALL_MAN} ${WRKSRC}/man/openerp-server.1 ${PREFIX}/man/man1
-	${INSTALL_MAN} ${WRKSRC}/man/openerp_serverrc.5 ${PREFIX}/man/man5
-
-	${INSTALL_DATA} ${WRKDIR}/openerp-server.conf ${PREFIX}/etc/openerp-server.conf.sample
-	@if  [ ! -f ${PREFIX}/etc/openerp-server.conf ]; then \
-		${CP} -p ${PREFIX}/etc/openerp-server.conf.sample ${PREFIX}/etc/openerp-server.conf ; \
-	fi
-	@${ECHO} '@unexec if cmp -s %D/etc/openerp-server.conf.sample %D/etc/openerp-server.conf; then rm -f %D/etc/openerp-server.conf; fi' >> ${TMPPLIST}
+	@${REINPLACE_CMD} -e 's|site-packages/openerp-server|site-packages/openerp-${PORTVERSION}_${NIGHTLY_}-${PYTHON_VERSION:S/thon//}.egg/openerp|g' \
+		${WRKDIR}/openerp-server.conf
+	${INSTALL_DATA} ${WRKDIR}/openerp-server.conf \
+		${STAGEDIR}${PREFIX}/etc/openerp-server.conf.sample
 	@${ECHO} etc/openerp-server.conf.sample >> ${TMPPLIST}
-	@${ECHO} '@exec if [ ! -f %D/etc/openerp-server.conf ]; then cp -p %D/%F %B/openerp-server.conf; fi' >> ${TMPPLIST}
-
-	@${CHMOD} a+x ${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}/openerp-server.py
-
-	@${ECHO} bin/openerp-server >> ${TMPPLIST}
-	@${FIND} -s -d ${PYTHON_SITELIBDIR}/${PORTNAME} \
-		-type f | ${SED} 's#${PREFIX}/##g' >> ${TMPPLIST}
-	@${FIND} -s -d ${PYTHON_SITELIBDIR}/${PORTNAME} \
-		-type d | ${SED} 's#${PREFIX}/#@dirrm #g' >> ${TMPPLIST}
-	@${FIND} -s -d ${PYDISTUTILS_EGGINFODIR} \
-		-type f -print |grep -v PKG-INFO| ${SED} 's#${PREFIX}/##g' >> ${TMPPLIST}
-	@${FIND} -s -d ${PYDISTUTILS_EGGINFODIR} \
-		-type d | ${SED} 's#${PREFIX}/#@dirrm #g' >> ${TMPPLIST}
-
-	@${CAT} ${PKGMESSAGE}
+	@${CHMOD} a+x ${STAGEDIR}${PREFIX}/bin/openerp-server
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/finance/openerp-server/distinfo
==============================================================================
--- head/finance/openerp-server/distinfo	Fri Jan 24 22:01:48 2014	(r340934)
+++ head/finance/openerp-server/distinfo	Fri Jan 24 22:12:02 2014	(r340935)
@@ -1,2 +1,2 @@
-SHA256 (openerp-server-6.0.3.tar.gz) = 763296aef9967848506daa23dca017b2f341d12936d1db9df1f2ba1412b218a9
-SIZE (openerp-server-6.0.3.tar.gz) = 28477345
+SHA256 (openerp-7.0-20140115-002435.tar.gz) = 462f7ce568fe9ffb5b2dc429df53e19b8effd8237b2de5af1213d97e5dad56f1
+SIZE (openerp-7.0-20140115-002435.tar.gz) = 64096565

Modified: head/finance/openerp-server/files/openerpd.in
==============================================================================
--- head/finance/openerp-server/files/openerpd.in	Fri Jan 24 22:01:48 2014	(r340934)
+++ head/finance/openerp-server/files/openerpd.in	Fri Jan 24 22:12:02 2014	(r340935)
@@ -48,6 +48,8 @@ stop_cmd="${name}_stop"
 status_cmd="${name}_status"
 getval_cmd="${name}_getval"
 
+export PYTHON_EGG_DIR=/tmp
+
 openerpd_prestart()
 {
     local d

Modified: head/finance/openerp-server/files/patch-setup.py
==============================================================================
--- head/finance/openerp-server/files/patch-setup.py	Fri Jan 24 22:01:48 2014	(r340934)
+++ head/finance/openerp-server/files/patch-setup.py	Fri Jan 24 22:12:02 2014	(r340935)
@@ -1,29 +1,10 @@
---- setup.py	2011-08-21 16:34:59.526991138 +0200
-+++ setup.diffs	2011-08-21 16:35:49.515560426 +0200
-@@ -145,16 +145,16 @@
-         #    files.append((root, [join(root, name) for name in names]))
-         files.append(('.', [join('bin', 'import_xml.rng'),]))
-     else:
--        man_directory = join('share', 'man')
--        files.append((join(man_directory, 'man1'), ['man/openerp-server.1']))
--        files.append((join(man_directory, 'man5'), ['man/openerp_serverrc.5']))
--
--        doc_directory = join('share', 'doc', 'openerp-server-%s' % version)
--        files.append((doc_directory, filter(isfile, glob.glob('doc/*'))))
--        files.append((join(doc_directory, 'migrate', '3.3.0-3.4.0'),
--                      filter(isfile, glob.glob('doc/migrate/3.3.0-3.4.0/*'))))
--        files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'),
--                      filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*'))))
-+#        man_directory = join('share', 'man')
-+#        files.append((join(man_directory, 'man1'), ['man/openerp-server.1']))
-+#        files.append((join(man_directory, 'man5'), ['man/openerp_serverrc.5']))
-+#
-+#        doc_directory = join('share', 'doc', 'openerp-server-%s' % version)
-+#        files.append((doc_directory, filter(isfile, glob.glob('doc/*'))))
-+#        files.append((join(doc_directory, 'migrate', '3.3.0-3.4.0'),
-+#                      filter(isfile, glob.glob('doc/migrate/3.3.0-3.4.0/*'))))
-+#        files.append((join(doc_directory, 'migrate', '3.4.0-4.0.0'),
-+#                      filter(isfile, glob.glob('doc/migrate/3.4.0-4.0.0/*'))))
- 
-         openerp_site_packages = join(get_python_lib(prefix=''), 'openerp-server')
- 
+--- setup.py.orig	2013-05-15 03:10:46.000000000 +0400
++++ setup.py	2014-01-15 10:13:59.067058613 +0400
+@@ -128,7 +128,6 @@
+           'psycopg2 >= 2.2',
+           'pydot',
+           'python-dateutil < 2',
+-          'python-ldap', # optional
+           'python-openid',
+           'pytz',
+           'pywebdav',

Modified: head/finance/openerp-server/files/pkg-message.in
==============================================================================
--- head/finance/openerp-server/files/pkg-message.in	Fri Jan 24 22:01:48 2014	(r340934)
+++ head/finance/openerp-server/files/pkg-message.in	Fri Jan 24 22:12:02 2014	(r340935)
@@ -16,4 +16,10 @@ You can try something like this :
 [PGSQL] $ createuser $openerp_dbuser
 [PGSQL] $ createdb --owner=${openerp_dbuser} --encoding=UTF-8 --locale=en_EN.UTF-8 ${openerp_dbname} "OpenERP initial database"
 
+Setuping you first database
+---------------------------
+
+Point your browser to http://localhost:8069/ and click "Manage Databases", the
+default master password is "admin".
+
 ************************************************************************
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 freebsd.contact 2014-01-24 22:23:18 UTC
Okay, I had to heavily modify the Makefile patch, but the port has been
updated.  In different circumstances, the patch would have been rejected
for numerous issues.

1. It was obvious "portlint" was not run, the patch violated several
conventions.  Definition relocation fixed those.
2. The PORTEPOCH was removed.  Once defined, it can *never* be removed.
3. USE_PYTHON was redefined, incorrectly.  I did not take that change.
4. USE_STAGE was removed, but STAGEDIR was not used in the post-install
target (meaning this port was not properly tested)
5. The $ECHO PKGMESSAGE is redundant, removed
6. The pre/post aren't needed, returned to bsd.port.mk
7. The undocumented conditional install of etc/openerp-server.conf is
removed, likely did not work on binary packages and generally against
convention (this was introduced in 2010, probably an error back then)
8. The "if !exists(${PYTHONPREFIX_SITELIBDIR}/easy-install.pth)"
additional total broke the stage target, meaning this was not tested in
a clear environment.  Left off, purpose unclear.

As committed, it builds in clear poudriere environment.  I only tested
in DragonFly64 -- I probably should have run this through redports.  I
may do that still.

In spite of all that, Pakhom G. is the new maintainer of this port per
his request.  Take good care of her!

John
Comment 4 freebsd.contact 2014-01-24 22:35:50 UTC
Ah, a couple of "I forgot's"

9.  The "created by: line" was changed.  This never changes, it reflects
the first person that created the port
10. The COMMENT definition is limited to 70 characters per the porters
handbook.  The attempted redefinition was something nearly double that
limit.  The original comment was left in place, it was good enough.
Comment 5 John Marino freebsd_committer 2014-01-24 23:00:59 UTC
State Changed
From-To: open->closed

Committed, with significant changes, Thanks!  Passes Redports 6x.