summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastiaan Lokhorst2018-05-10 18:10:39 +0200
committerSebastiaan Lokhorst2018-05-24 13:36:38 +0200
commit0ba21ff7744b6b40266c4683929007b8a183d1c2 (patch)
tree124027bf7f230d4d6463a03325e3af57c7957521
parent929c852db9d42afd47f67e4714d34ea50dfcbdf0 (diff)
downloadaur-0ba21ff7744b6b40266c4683929007b8a183d1c2.tar.gz
Use systemd-sysusers for user management
Don't explicitly depend on postgresql-libs: is a dependency of psycopg2
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD15
-rw-r--r--odoo.install20
-rw-r--r--odoo.sysusers1
4 files changed, 13 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1b459b6234c..cb0a19b2d7d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,12 +3,10 @@ pkgbase = odoo
pkgver = 11.0
pkgrel = 3
url = https://www.odoo.com/
- install = odoo.install
arch = any
license = GPL3
makedepends = python-setuptools
depends = nodejs-less
- depends = postgresql-libs
depends = wkhtmltopdf
depends = python
depends = python-babel
@@ -53,13 +51,15 @@ pkgbase = odoo
replaces = openerp
backup = etc/odoo/odoo.conf
source = https://nightly.odoo.com/11.0/nightly/src/odoo_11.0.20180507.tar.gz
+ source = odoo.conf
source = odoo.confd
source = odoo.service
- source = odoo.conf
+ source = odoo.sysusers
md5sums = a225c04143da0da3200ba151c8921753
+ md5sums = 863418f31f0fb982cde0008fa63f35f0
md5sums = 742fa9ad94a92ac2aa910197a26af4e8
md5sums = 5bddcc6edbdefdd07cae945165c63604
- md5sums = 863418f31f0fb982cde0008fa63f35f0
+ md5sums = 720b7b8c3df3142dfd0383acd1c9e9b4
pkgname = odoo
diff --git a/PKGBUILD b/PKGBUILD
index 9aa9baffc5d..3ed95c03b8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,7 +14,6 @@ replaces=('openerp')
makedepends=('python-setuptools')
depends=(
'nodejs-less'
- 'postgresql-libs'
'wkhtmltopdf'
'python'
'python-babel'
@@ -58,24 +57,26 @@ depends=(
)
source=("https://nightly.odoo.com/${pkgver}/nightly/src/${pkgname}_${pkgver}.${_pkgsubver}.tar.gz"
+ odoo.conf
odoo.confd
odoo.service
- odoo.conf)
+ odoo.sysusers)
md5sums=('a225c04143da0da3200ba151c8921753'
+ '863418f31f0fb982cde0008fa63f35f0'
'742fa9ad94a92ac2aa910197a26af4e8'
'5bddcc6edbdefdd07cae945165c63604'
- '863418f31f0fb982cde0008fa63f35f0')
+ '720b7b8c3df3142dfd0383acd1c9e9b4')
backup=('etc/odoo/odoo.conf')
-install=odoo.install
package()
{
cd ${srcdir}/${pkgname}-${pkgver}.post${_pkgsubver}
python setup.py install --root="${pkgdir}"
- mkdir ${pkgdir}/etc/{conf.d,odoo} -p
- mkdir ${pkgdir}/usr/lib/systemd/system/ -p
+ mkdir -p ${pkgdir}/etc/{conf.d,odoo}
+ mkdir -p ${pkgdir}/usr/lib/systemd/system
+ install -Dm 644 ${srcdir}/odoo.conf ${pkgdir}/etc/odoo/odoo.conf
install -Dm 644 ${srcdir}/odoo.confd ${pkgdir}/etc/conf.d/odoo
install -Dm 644 ${srcdir}/odoo.service ${pkgdir}/usr/lib/systemd/system/odoo.service
- install -Dm 644 ${srcdir}/odoo.conf ${pkgdir}/etc/odoo/odoo.conf
+ install -Dm 644 ${srcdir}/odoo.sysusers ${pkgdir}/usr/lib/sysusers.d/odoo.conf
}
diff --git a/odoo.install b/odoo.install
deleted file mode 100644
index 7aa74107c43..00000000000
--- a/odoo.install
+++ /dev/null
@@ -1,20 +0,0 @@
-pre_install() {
- if [ ! `grep odoo /etc/group` ]; then
- groupadd odoo &>/dev/null;
- fi
- id odoo &>/dev/null || useradd -r -m -g odoo -d /var/lib/odoo odoo
-}
-
-post_install() {
- systemctl --system daemon-reload
-}
-
-post_upgrade() {
- systemctl --system daemon-reload
-}
-
-post_remove() {
- userdel odoo &> /dev/null
- groupdel odoo &> /dev/null
- systemctl --system daemon-reload
-}
diff --git a/odoo.sysusers b/odoo.sysusers
new file mode 100644
index 00000000000..69a58dd7714
--- /dev/null
+++ b/odoo.sysusers
@@ -0,0 +1 @@
+u odoo - "Odoo daemon" /var/lib/odoo