blob: ecd3ba8a50f2a5fcbee5914a08dd3350cca591a0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Universal Addresses to RPC Program Number Mapper"
2DESCRIPTION = "The rpcbind utility is a server that converts RPC \
3 program numbers into universal addresses."
4SECTION = "console/network"
5HOMEPAGE = "http://sourceforge.net/projects/rpcbind/"
6BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751"
7DEPENDS = "libtirpc quota"
8
9LICENSE = "BSD"
10LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \
11 file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
14 file://init.d \
15 file://0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch \
16 file://remove-sys-queue.patch \
17 ${UCLIBCPATCHES} \
18 ${MUSLPATCHES} \
19 file://rpcbind.conf \
20 file://rpcbind.socket \
21 file://rpcbind.service \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050022 file://cve-2015-7236.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 "
24MUSLPATCHES_libc-musl = "file://musl-sunrpc.patch"
25
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026UCLIBCPATCHES ?= ""
27MUSLPATCHES ?= ""
28
29SRC_URI[md5sum] = "c8875246b2688a1adfbd6ad43480278d"
30SRC_URI[sha256sum] = "9897823a9d820ea011d9ea02054d5ab99469b9ca5346265fee380713c8fed27b"
31
32inherit autotools update-rc.d systemd pkgconfig
33
34PACKAGECONFIG ??= "tcp-wrappers"
35PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
36
37INITSCRIPT_NAME = "rpcbind"
38INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ."
39
40SYSTEMD_SERVICE_${PN} = "rpcbind.service"
41
42inherit useradd
43
44USERADD_PACKAGES = "${PN}"
45USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \
46 --shell /bin/false --user-group rpc"
47
48PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
49PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \
50 --without-systemdsystemunitdir, \
51 systemd \
52"
53
54EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc"
55
56do_install_append () {
57 mv ${D}${bindir} ${D}${sbindir}
58
59 install -d ${D}${sysconfdir}/init.d
60 sed -e 's,/etc/,${sysconfdir}/,g' \
61 -e 's,/sbin/,${sbindir}/,g' \
62 ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind
63 chmod 0755 ${D}${sysconfdir}/init.d/rpcbind
64
65 install -m 0755 ${WORKDIR}/rpcbind.conf ${D}${sysconfdir}
66 install -d ${D}${systemd_unitdir}/system
67 install -m 0644 ${WORKDIR}/rpcbind.socket ${D}${systemd_unitdir}/system
68 install -m 0644 ${WORKDIR}/rpcbind.service ${D}${systemd_unitdir}/system
69 sed -i -e 's,@SBINDIR@,${sbindir},g' \
70 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
71 ${D}${systemd_unitdir}/system/rpcbind.service
72}