2012-02-16 05:26:38 +08:00
|
|
|
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgname=rpcbind
|
2017-12-08 22:20:32 +08:00
|
|
|
pkgver=0.2.4
|
|
|
|
pkgrel=1
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgdesc="portmap replacement which supports RPC over various protocols"
|
2012-12-16 05:40:53 +08:00
|
|
|
arch=('x86_64')
|
2015-12-07 09:10:02 +08:00
|
|
|
backup=('etc/conf.d/rpcbind')
|
|
|
|
depends=('bash' 'glibc' 'libtirpc' 'systemd')
|
2010-03-13 23:25:19 +08:00
|
|
|
url="http://rpcbind.sourceforge.net"
|
|
|
|
license=('custom')
|
2015-12-07 09:10:02 +08:00
|
|
|
replaces=('portmap')
|
|
|
|
# see also http://git.infradead.org/users/steved/rpcbind.git
|
|
|
|
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
|
|
|
|
rpcbind-sunrpc.patch
|
2017-12-08 22:20:32 +08:00
|
|
|
rpcbind.conf
|
|
|
|
CVE-2017-8779.diff)
|
2014-09-30 13:58:57 +08:00
|
|
|
install=rpcbind.install
|
2017-12-08 22:20:32 +08:00
|
|
|
sha1sums=('8a6045dd3397e9f71bf3a7c9d269e255cca537bd'
|
2015-12-07 09:10:02 +08:00
|
|
|
'1b997ce76f9727efc8c72fc5f97189591c9a60e2'
|
2017-12-08 22:20:32 +08:00
|
|
|
'08246ff18d12cee01e5c9391c6ba8f5597cac936'
|
|
|
|
'38044ce8f3376a0b69da8e078e988fd1645bd435')
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2014-09-26 02:17:22 +08:00
|
|
|
prepare() {
|
2017-12-08 22:20:32 +08:00
|
|
|
cd $pkgname-$pkgver
|
2015-12-07 09:10:02 +08:00
|
|
|
# patch for iana services file # FS#20273
|
|
|
|
patch -Np1 -i ../rpcbind-sunrpc.patch
|
2017-12-08 22:20:32 +08:00
|
|
|
# http://seclists.org/oss-sec/2017/q2/209
|
|
|
|
patch -Np1 -i ../CVE-2017-8779.diff
|
2014-09-26 02:17:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--with-rpcuser=rpc \
|
|
|
|
--enable-warmstarts \
|
|
|
|
--with-statedir=/var/lib/rpcbind
|
2015-12-07 09:10:02 +08:00
|
|
|
make
|
2012-02-16 05:26:38 +08:00
|
|
|
}
|
2014-09-26 02:17:22 +08:00
|
|
|
|
2012-02-16 05:26:38 +08:00
|
|
|
package() {
|
2014-09-26 02:17:22 +08:00
|
|
|
cd $pkgname-$pkgver
|
2012-12-16 05:40:53 +08:00
|
|
|
|
2012-02-16 05:26:38 +08:00
|
|
|
make DESTDIR=$pkgdir install
|
2014-09-26 02:17:22 +08:00
|
|
|
# install rpcbind config file
|
2017-12-08 22:20:32 +08:00
|
|
|
install -D -m644 ../rpcbind.conf $pkgdir/etc/conf.d/rpcbind
|
2014-09-26 02:17:22 +08:00
|
|
|
# install missing man page - https://bugs.archlinux.org/task/21271
|
2017-12-08 22:20:32 +08:00
|
|
|
# install -m644 man/rpcinfo.8 $pkgdir/usr/share/man/man8/
|
2014-09-26 02:17:22 +08:00
|
|
|
|
|
|
|
# add symlinks
|
2017-12-08 22:20:32 +08:00
|
|
|
# mkdir $pkgdir/usr/lib/systemd/system/sockets.target.wants
|
|
|
|
# mkdir $pkgdir/usr/lib/systemd/system/multi-user.target.wants
|
|
|
|
# ln -sf ../rpcbind.socket $pkgdir/usr/lib/systemd/system/sockets.target.wants/rpcbind.socket
|
|
|
|
# ln -sf ../rpcbind.service $pkgdir/usr/lib/systemd/system/multi-user.target.wants/rpcbind.service
|
2014-09-26 02:17:22 +08:00
|
|
|
|
|
|
|
# add state directory
|
|
|
|
install -d -m 700 -o 32 -g 32 $pkgdir/var/lib/rpcbind
|
2010-03-13 23:25:19 +08:00
|
|
|
# install license
|
|
|
|
install -D -m644 COPYING $pkgdir/usr/share/licenses/rpcbind/COPYING
|
2017-12-08 22:20:32 +08:00
|
|
|
# add EnvironmentFile to systemd service
|
|
|
|
sed -i '14i EnvironmentFile=/etc/conf.d/rpcbind' $pkgdir/usr/lib/systemd/system/rpcbind.service
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|