Skip to content

Commit f668f9c

Browse files
committed
[FIX] Debian: updated informations and dependencies, refactored debhelpers scripts to allow easy name change, simplified debhelper rules
1 parent 2cf4051 commit f668f9c

File tree

9 files changed

+57
-54
lines changed

9 files changed

+57
-54
lines changed

debian/changelog

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
openerp (8.0.0~rc1-0) testing; urgency=low
2+
3+
* Refactored packaging
4+
5+
-- Simon Lejeune <[email protected]> Wed, 23 Jul 2014 14:59:00 +0100
6+
17
openerp (6.1-1) testing; urgency=low
28

39
* New major version, new packaging.
@@ -536,4 +542,4 @@ tinyerp-server (3.1.1+debian-1) unstable; urgency=low
536542
* Rebuild orig.tar.gz to remove unnecessary files in upstreams debian/.
537543
* Added changelog from website.
538544

539-
-- Daniel Baumann <[email protected]> Sun, 16 Oct 2005 13:35:00 +0200
545+
-- Daniel Baumann <[email protected]> Sun, 16 Oct 2005 13:35:00 +0200

debian/compat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7
1+
9

debian/control

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
Source: openerp
22
Section: net
33
Priority: optional
4-
Maintainer: OpenERP SA <al@openerp.com>
5-
Build-Depends: debhelper (>= 7.0.50~), python, rsync
6-
Standards-Version: 3.9.1
7-
Homepage: http://www.openerp.com/
8-
Vcs-Bzr: https://launchpad.net/openobject
4+
Maintainer: Odoo SA <sle@odoo.com>
5+
Build-Depends: debhelper (>= 9.0), python, rsync
6+
Standards-Version: 3.9.5.0
7+
Homepage: http://www.odoo.com/
8+
Vcs-Git: https://github.com/odoo/odoo
99

1010
Package: openerp
1111
Section: net
1212
Architecture: all
1313
Depends:
1414
${misc:Depends},
1515
adduser,
16-
python,
1716
postgresql-client,
17+
python,
1818
python-dateutil,
1919
python-decorator,
2020
python-docutils,
2121
python-feedparser,
22-
python-gdata,
2322
python-imaging,
2423
python-jinja2,
2524
python-ldap,
@@ -43,11 +42,9 @@ Depends:
4342
python-unittest2,
4443
python-vatnumber,
4544
python-vobject,
46-
python-webdav,
4745
python-werkzeug,
4846
python-xlwt,
4947
python-yaml,
50-
python-zsi
5148
Conflicts: tinyerp-server, openerp-server, openerp-web
5249
Replaces: tinyerp-server, openerp-server, openerp-web
5350
Recommends:
@@ -64,4 +61,3 @@ Description: OpenERP Enterprise Resource Management
6461
etc. Technical features include a distributed server, flexible workflows, an
6562
object database, a dynamic GUI, customizable reports, and an XML-RPC
6663
interface.
67-

debian/copyright

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
Upstream-Contact: OpenERP <info@openerp.com>
2-
Upstream-Homepage: http://www.openerp.com/
1+
Upstream-Contact: OpenERP <info@odoo.com>
2+
Upstream-Homepage: http://www.odoo.com/
33
Maintainer-Contact: Debian OpenERP Maintainers <[email protected]>
44
Maintainer-Homepage: http://www.odoo.com/
55

66
Files: *
7-
Copyright: (C) 2004-2011 OpenERP SA. (www.openerp.com)
8-
License: GPL-3+
7+
Copyright: (C) 2004-2014 OpenERP SA. (www.openerp.com)
8+
License: AGPL-3+
99
This program is free software: you can redistribute it and/or modify
10-
it under the terms of the GNU General Public License as published by
10+
it under the terms of the GNU Affero General Public License as published by
1111
the Free Software Foundation, either version 3 of the License, or
1212
(at your option) any later version.
1313
.
1414
This program is distributed in the hope that it will be useful,
1515
but WITHOUT ANY WARRANTY; without even the implied warranty of
16-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17-
GNU General Public License for more details.
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU Affero General Public License for more details.
1818
.
19-
You should have received a copy of the GNU General Public License
20-
along with this program. If not, see <http://www.gnu.org/licenses/>.
21-
.
22-
On Debian systems, the complete text of the GNU General Public License
23-
can be found in /usr/share/common-licenses/GPL-3 file.
24-
19+
You should have received a copy of the GNU Affero General Public License
20+
along with this program. If not, see <http://www.gnu.org/licenses/>.
21+

debian/init

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Description: Open ERP is a complete ERP and CRM software.
1313
### END INIT INFO
1414

15-
PATH=/sbin:/bin:/usr/sbin:/usr/bin
15+
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
1616
DAEMON=/usr/bin/openerp-server
1717
NAME=openerp-server
1818
DESC=openerp-server

debian/openerp-server.conf

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ db_host = False
55
db_port = False
66
db_user = openerp
77
db_password = False
8+
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons

debian/postinst

+18-11
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,31 @@
22

33
set -e
44

5+
ODOO_CONFIGURATION_FILE=/etc/openerp/openerp-server.conf
6+
ODOO_GROUP="openerp"
7+
ODOO_DATA_DIR=/var/lib/openerp
8+
ODOO_LOG_DIR=/var/log/openerp
9+
ODOO_USER="openerp"
10+
511
case "${1}" in
612
configure)
713
if ! getent passwd | grep -q "^openerp:"; then
8-
adduser --system --no-create-home --quiet --gecos 'OpenERP' --group openerp
14+
adduser --system --no-create-home --quiet --group $ODOO_USER
915
fi
1016
# Register "openerp" as a postgres superuser
1117
su - postgres -c "createuser -s openerp" 2> /dev/null || true
12-
chown openerp:openerp /etc/openerp/openerp-server.conf
13-
chmod 0640 /etc/openerp/openerp-server.conf
14-
# Creating log file
15-
mkdir -p /var/log/openerp/
16-
chown openerp:openerp /var/log/openerp
17-
chmod 0750 /var/log/openerp
18-
# Creating local storage directory
19-
mkdir -p /var/lib/openerp/filestore
20-
chown openerp:openerp -R /var/lib/openerp
18+
# Configuration file
19+
chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE
20+
chmod 0640 $ODOO_CONFIGURATION_FILE
21+
# Log
22+
mkdir -p $ODOO_LOG_DIR
23+
chown $ODOO_USER:$ODOO_GROUP $ODOO_LOG_DIR
24+
chmod 0750 $ODOO_LOG_DIR
25+
# Data dir
26+
mkdir -p $ODOO_DATA_DIR
27+
chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR
2128
# update-python-modules NOW otherwise invoke-rc.d openerp start will fail
22-
update-python-modules -p openerp.public
29+
update-python-modules
2330
;;
2431
*)
2532
;;

debian/postrm

+12-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22

33
set -e
44

5+
ODOO_LIB_DIR=/var/lib/openerp
6+
ODOO_USER="openerp"
7+
ODOO_GROUP="openerp"
8+
59
case "${1}" in
610
remove)
7-
deluser --quiet --system "openerp" || true
8-
delgroup --quiet --system --only-if-empty "openerp" || true
9-
find /var/lib/openerp -path '/var/lib/openerp/*' ! -path '/var/lib/openerp/filestore*' -delete
11+
deluser --quiet --system $ODOO_USER || true
12+
delgroup --quiet --system --only-if-empty $ODOO_GROUP || true
13+
if [ -d "$ODOO_LIB_DIR" ]; then
14+
rm -rf $ODOO_LIB_DIR
15+
fi
1016
;;
1117

1218
purge)
13-
rm -rf /var/lib/openerp
19+
if [ -d "$ODOO_LIB_DIR" ]; then
20+
rm -rf $ODOO_LIB_DIR
21+
fi
1422
;;
1523

1624
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

debian/rules

+1-13
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@
22
# vim:noet:
33

44
%:
5-
dh ${@}
6-
7-
override_dh_pysupport:
8-
echo "rsync"
9-
sh -c "[ -d debian/openerp/usr/lib/python2.6 ] && rsync -av openerp/ debian/openerp/usr/lib/python2.6/dist-packages/openerp/" || true
10-
sh -c "[ -d debian/openerp/usr/lib/python2.7 ] && rsync -av openerp/ debian/openerp/usr/lib/python2.7/dist-packages/openerp/" || true
11-
rm -Rf debian/openerp/usr/openerp debian/openerp/usr/lib/python2.6/dist-packages/tests debian/openerp/usr/lib/python2.7/dist-packages/tests
12-
dh_pysupport
13-
rm -Rf debian/openerp/usr/lib
14-
15-
override_dh_installinit:
16-
dh_installinit --update-rcd-params='defaults 21'
17-
5+
dh ${@}

0 commit comments

Comments
 (0)