Date: Tuesday, May 10, 2016 @ 16:30:42 Author: eworm Revision: 174564
update config (remove oldstyle), prepare for sysusers hook Added: nbd/trunk/sysusers_nbd.conf Modified: nbd/trunk/PKGBUILD nbd/trunk/config nbd/trunk/nbd.install -------------------+ PKGBUILD | 16 ++++++++++++---- config | 14 +------------- nbd.install | 5 ++--- sysusers_nbd.conf | 1 + 4 files changed, 16 insertions(+), 20 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-05-10 14:18:00 UTC (rev 174563) +++ PKGBUILD 2016-05-10 14:30:42 UTC (rev 174564) @@ -12,18 +12,25 @@ url="http://nbd.sourceforge.net" license=('GPL') source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.xz - config nbd.service) + config + nbd.service + sysusers_nbd.conf) backup=('etc/nbd-server/config') depends=('glib2') install=nbd.install md5sums=('784be37497cc2f9a53c67c8c77d1676d' - '2d05d426b8c2708d5f8a0d028fcbae05' - '5d1acc143018117174f79eff15afa038') + 'a5b890148b80c5951dbe9daa2f487d63' + '5d1acc143018117174f79eff15afa038' + 'd969703f3d161935bb160a5c7afd468f') build(){ cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr --sysconfdir=/etc --enable-syslog --sbindir=/usr/bin + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --enable-syslog make } @@ -35,6 +42,7 @@ install -D -m644 "${srcdir}"/config "${pkgdir}"/etc/nbd-server/config install -D -m644 "${srcdir}"/nbd.service "${pkgdir}"/usr/lib/systemd/system/nbd.service + install -D -m644 "${srcdir}"/sysusers_nbd.conf "${pkgdir}"/usr/lib/sysusers.d/nbd.conf install -D -m644 doc/README "${pkgdir}"/usr/share/doc/nbd/README } Modified: config =================================================================== --- config 2016-05-10 14:18:00 UTC (rev 174563) +++ config 2016-05-10 14:30:42 UTC (rev 174564) @@ -6,18 +6,8 @@ # _before_ opening files. user = nbd group = nbd - # Since version 2.9.17, nbd-server will do exports on a name - # basis (the used name is the name of the section in which the - # export is specified). This however required an incompatible - # protocol change. To enable backwards-compatible port-based - # exports, uncomment the following line: - # oldstyle = true [export1] exportname = /export/nbd/export1-file - # The following line will be ignored unless the - # "oldstyle = true" line in the generic section above is - # enabled. - #port = 12345 authfile = /export/nbd/export1-authfile timeout = 30 filesize = 10000000 @@ -28,6 +18,4 @@ postrun = rm -f %s [otherexport] exportname = /export/nbd/experiment - # The other options are all optional, except this one in case - # the oldstyle option is used in [generic]: - # port = 12346 + # The other options are all optional. Modified: nbd.install =================================================================== --- nbd.install 2016-05-10 14:18:00 UTC (rev 174563) +++ nbd.install 2016-05-10 14:30:42 UTC (rev 174564) @@ -1,8 +1,7 @@ post_install() { - getent group "nbd" &>/dev/null || groupadd -r -g 44 nbd 1>/dev/null - getent passwd "nbd" &>/dev/null || useradd -r -u 44 -g nbd -d "/var/empty" -s "/bin/false" nbd 1>/dev/null + systemd-sysusers nbd.conf } post_upgrade() { - post_install + systemd-sysusers nbd.conf } Added: sysusers_nbd.conf =================================================================== --- sysusers_nbd.conf (rev 0) +++ sysusers_nbd.conf 2016-05-10 14:30:42 UTC (rev 174564) @@ -0,0 +1 @@ +u nbd 44 "Network Block Device" /var/empty
