diff options
author | James P. Harvey | 2019-02-20 16:58:25 -0500 |
---|---|---|
committer | James P. Harvey | 2019-02-21 20:09:03 -0500 |
commit | f264e050a11ca68ac2e96de6a3c5b384b70b78c6 (patch) | |
tree | 49934376e739215669001c25240d91588ef3f4a5 | |
parent | 7dab7632122f69e7146ed53741ae2d3f8c6202f9 (diff) | |
download | aur-f264e050a11ca68ac2e96de6a3c5b384b70b78c6.tar.gz |
Use upstream service file, but keep it as mongodb and modify it to: keep historical conf file name; keep historical user name (no need for separate daemon group name); and not include sysconfig file for init.d.
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 25 | ||||
-rw-r--r-- | mongodb.service | 10 | ||||
-rw-r--r-- | mongodb.sysusers | 1 | ||||
-rw-r--r-- | mongodb.tmpfiles | 4 |
5 files changed, 22 insertions, 26 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Fri Feb 22 01:08:49 UTC 2019 +# Fri Feb 22 01:08:58 UTC 2019 pkgbase = mongodb pkgdesc = A high-performance, open source, schema-free document-oriented database pkgver = 4.0.6 @@ -27,13 +27,11 @@ pkgbase = mongodb optdepends = mongodb-tools: mongoimport, mongodump, mongotop, etc backup = etc/mongodb.conf source = http://downloads.mongodb.org/src/mongodb-src-r4.0.6.tar.gz - source = mongodb.service source = mongodb.sysusers source = mongodb.tmpfiles sha256sums = 34165ef42c7199c438e1706fef515cbde012d6a884406d102082d39eab72c235 - sha256sums = 19f55ab28652b3817e98fc3f15cc2f6f3255a5e1dfd7b0d5a27c9ba22fd2703e - sha256sums = 47b884569102f7c79017ee78ef2e98204a25aa834c0ee7d5d62c270ab05d4e2b - sha256sums = 51ee1e1f71598aad919db79a195778e6cb6cfce48267565e88a401ebc64497ac + sha256sums = 3757d548cfb0e697f59b9104f39a344bb3d15f802608085f838cb2495c065795 + sha256sums = b7d18726225cd447e353007f896ff7e4cbedb2f641077bce70ab9d292e8f8d39 pkgname = mongodb @@ -20,16 +20,12 @@ checkdepends=("python2-pymongo") backup=("etc/${pkgname}.conf") source=( "http://downloads.${pkgname}.org/src/${pkgname}-src-r${pkgver}.tar.gz" - "${pkgname}.service" "${pkgname}.sysusers" "${pkgname}.tmpfiles" ) -sha256sums=( - "34165ef42c7199c438e1706fef515cbde012d6a884406d102082d39eab72c235" - "19f55ab28652b3817e98fc3f15cc2f6f3255a5e1dfd7b0d5a27c9ba22fd2703e" - "47b884569102f7c79017ee78ef2e98204a25aa834c0ee7d5d62c270ab05d4e2b" - "51ee1e1f71598aad919db79a195778e6cb6cfce48267565e88a401ebc64497ac" -) +sha256sums=('34165ef42c7199c438e1706fef515cbde012d6a884406d102082d39eab72c235' + '3757d548cfb0e697f59b9104f39a344bb3d15f802608085f838cb2495c065795' + 'b7d18726225cd447e353007f896ff7e4cbedb2f641077bce70ab9d292e8f8d39') _scons_args=( --use-system-pcre @@ -51,6 +47,17 @@ prepare() { # Keep historical Arch dbPath sed -i 's|dbPath: /var/lib/mongo|dbPath: /var/lib/mongodb|' rpm/mongod.conf + + # Keep historical Arch conf file name + sed -i 's|-f /etc/mongod.conf|-f /etc/mongodb.conf|' rpm/mongod.service + + # Keep historical Arch user name (no need for separate daemon group name) + sed -i 's/User=mongod/User=mongodb/' rpm/mongod.service + sed -i 's/Group=mongod/Group=mongodb/' rpm/mongod.service + sed -i 's/chown mongod:mongod/chown mongodb:mongodb/' rpm/mongod.service + + # Remove sysconfig file, used by upstream's init.d script not used on Arch + sed -i '/EnvironmentFile=-\/etc\/sysconfig\/mongod/d' rpm/mongod.service } build() { @@ -84,7 +91,9 @@ package() { # Keep historical Arch conf file name install -Dm644 "rpm/mongod.conf" "${pkgdir}/etc/${pkgname}.conf" - install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" + # Keep historical Arch service name + install -Dm644 "rpm/mongod.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" + install -Dm644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" install -Dm644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" install -Dm644 LICENSE-Community.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE-Community.txt" diff --git a/mongodb.service b/mongodb.service deleted file mode 100644 index 78d551183838..000000000000 --- a/mongodb.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=High-performance, schema-free document-oriented database -After=network.target - -[Service] -User=mongodb -ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf - -[Install] -WantedBy=multi-user.target diff --git a/mongodb.sysusers b/mongodb.sysusers index e733c84003c5..2b645013c923 100644 --- a/mongodb.sysusers +++ b/mongodb.sysusers @@ -1,2 +1 @@ u mongodb - - /var/lib/mongodb -m mongodb daemon diff --git a/mongodb.tmpfiles b/mongodb.tmpfiles index 636e0c3f74a1..57e9e7f6399e 100644 --- a/mongodb.tmpfiles +++ b/mongodb.tmpfiles @@ -1,2 +1,2 @@ -d /var/lib//mongodb 0700 mongodb daemon - - -d /var/log//mongodb 0755 mongodb daemon - - +d /var/lib//mongodb 0700 mongodb mongodb - - +d /var/log//mongodb 0755 mongodb mongodb - - |