From b05c3637ce0881d34d1478ed09bc7f3b9c2699a0 Mon Sep 17 00:00:00 2001 From: zhengruoqin Date: Fri, 14 May 2021 10:12:28 +0800 Subject: rpcbind: upgrade 1.2.5 -> 1.2.6 refresh rpcbind_add_option_to_fix_port_number.patch (From OE-Core rev: 11bbe1c86d5d3e446fe5ea4028bc8b3f21b98587) Signed-off-by: Zheng Ruoqin Signed-off-by: Richard Purdie --- .../rpcbind_add_option_to_fix_port_number.patch | 58 +++++++++++----------- meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb | 55 -------------------- meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb | 54 ++++++++++++++++++++ 3 files changed, 83 insertions(+), 84 deletions(-) delete mode 100644 meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb create mode 100644 meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb (limited to 'meta/recipes-extended/rpcbind') diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch index 434b6b1c4c..535f9ce20d 100644 --- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch +++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch @@ -15,7 +15,7 @@ Signed-off-by: Yi Zhao 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/man/rpcbind.8 b/man/rpcbind.8 -index af6200f..2e6146b 100644 +index fbf0ace..66f7c08 100644 --- a/man/rpcbind.8 +++ b/man/rpcbind.8 @@ -11,7 +11,7 @@ @@ -27,17 +27,17 @@ index af6200f..2e6146b 100644 .Sh DESCRIPTION The .Nm -@@ -107,6 +107,8 @@ will automatically add +@@ -96,6 +96,8 @@ will automatically add and if IPv6 is enabled, .Li ::1 to the list. +.It Fl p +Bind for fixed UDP port number - .It Fl i - .Dq Insecure - mode. + If no + .Fl h + option is specified, diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c -index 8aef9e5..c2632a4 100644 +index 1743dad..07a1c75 100644 --- a/src/rpcb_svc_com.c +++ b/src/rpcb_svc_com.c @@ -48,6 +48,7 @@ @@ -60,8 +60,8 @@ index 8aef9e5..c2632a4 100644 int fd; struct rmtcallfd_list *rmt; SVCXPRT *xprt; -+ struct __rpc_sockinfo si; -+ struct t_bind taddr; ++ struct __rpc_sockinfo si; ++ struct t_bind taddr; if ((fd = __rpc_nconf2fd(nconf)) == -1) { if (debugging) @@ -70,23 +70,23 @@ index 8aef9e5..c2632a4 100644 return (-1); } + -+ if (fixed_port) { -+ __rpc_fd2sockinfo(fd, &si); -+ memset(&taddr, 0, sizeof(taddr)); -+ taddr.addr.maxlen = taddr.addr.len = si.si_alen; -+ taddr.addr.buf = malloc(si.si_alen); -+ if (taddr.addr.buf == NULL) { -+ return -1; -+ } -+ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af; -+ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port); -+ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE); -+ } else ++ if (fixed_port) { ++ __rpc_fd2sockinfo(fd, &si); ++ memset(&taddr, 0, sizeof(taddr)); ++ taddr.addr.maxlen = taddr.addr.len = si.si_alen; ++ taddr.addr.buf = malloc(si.si_alen); ++ if (taddr.addr.buf == NULL) { ++ return -1; ++ } ++ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af; ++ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port); ++ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE); ++ } else xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0); if (xprt == NULL) { if (debugging) diff --git a/src/rpcbind.c b/src/rpcbind.c -index 137011b..dc3d2d6 100644 +index 25d8a90..36a95b9 100644 --- a/src/rpcbind.c +++ b/src/rpcbind.c @@ -111,6 +111,7 @@ int runasdaemon = 0; @@ -97,7 +97,7 @@ index 137011b..dc3d2d6 100644 char **hosts = NULL; int nhosts = 0; -@@ -869,7 +870,7 @@ parseargs(int argc, char *argv[]) +@@ -884,7 +885,7 @@ parseargs(int argc, char *argv[]) { int c; oldstyle_local = 1; @@ -106,25 +106,25 @@ index 137011b..dc3d2d6 100644 switch (c) { case 'a': doabort = 1; /* when debugging, do an abort on */ -@@ -887,6 +888,9 @@ parseargs(int argc, char *argv[]) +@@ -902,6 +903,9 @@ parseargs(int argc, char *argv[]) if (hosts[nhosts - 1] == NULL) errx(1, "Out of memory"); break; -+ case 'p': -+ fixed_port = atoi(optarg); -+ break; ++ case 'p': ++ fixed_port = atoi(optarg); ++ break; case 'i': insecure = 1; break; -@@ -905,7 +909,7 @@ parseargs(int argc, char *argv[]) +@@ -920,7 +924,7 @@ parseargs(int argc, char *argv[]) break; #endif default: /* error */ - fprintf(stderr, "usage: rpcbind [-adhilswf]\n"); -+ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n"); ++ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n"); exit (1); } } -- -1.9.1 +2.25.1 diff --git a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb deleted file mode 100644 index ec8f9e48b2..0000000000 --- a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb +++ /dev/null @@ -1,55 +0,0 @@ -SUMMARY = "Universal Addresses to RPC Program Number Mapper" -DESCRIPTION = "The rpcbind utility is a server that converts RPC \ - program numbers into universal addresses." -SECTION = "console/network" -HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" -BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" -DEPENDS = "libtirpc quota" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ - file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" - -SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ - file://init.d \ - file://rpcbind.conf \ - file://rpcbind_add_option_to_fix_port_number.patch \ - file://0001-systemd-use-EnvironmentFile.patch \ - " -SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b" -SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a" - -inherit autotools update-rc.d systemd pkgconfig update-alternatives - -PACKAGECONFIG ??= "tcp-wrappers" -PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" - -INITSCRIPT_NAME = "rpcbind" -INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." - -SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" - -inherit useradd - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ - --shell /bin/false --user-group rpc" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \ - --without-systemdsystemunitdir, \ - systemd \ -" - -EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc" - -do_install_append () { - install -d ${D}${sysconfdir}/init.d - sed -e 's,/etc/,${sysconfdir}/,g' \ - -e 's,/sbin/,${sbindir}/,g' \ - ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind - chmod 0755 ${D}${sysconfdir}/init.d/rpcbind -} - -ALTERNATIVE_${PN} = "rpcinfo" -ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo" diff --git a/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb new file mode 100644 index 0000000000..b02638b2ce --- /dev/null +++ b/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb @@ -0,0 +1,54 @@ +SUMMARY = "Universal Addresses to RPC Program Number Mapper" +DESCRIPTION = "The rpcbind utility is a server that converts RPC \ + program numbers into universal addresses." +SECTION = "console/network" +HOMEPAGE = "http://sourceforge.net/projects/rpcbind/" +BUGTRACKER = "http://sourceforge.net/tracker/?group_id=201237&atid=976751" +DEPENDS = "libtirpc quota" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=b46486e4c4a416602693a711bb5bfa39 \ + file://src/rpcinfo.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24" + +SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \ + file://init.d \ + file://rpcbind.conf \ + file://rpcbind_add_option_to_fix_port_number.patch \ + file://0001-systemd-use-EnvironmentFile.patch \ + " +SRC_URI[sha256sum] = "5613746489cae5ae23a443bb85c05a11741a5f12c8f55d2bb5e83b9defeee8de" + +inherit autotools update-rc.d systemd pkgconfig update-alternatives + +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" + +INITSCRIPT_NAME = "rpcbind" +INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." + +SYSTEMD_SERVICE_${PN} = "rpcbind.service rpcbind.socket" + +inherit useradd + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --home-dir / \ + --shell /bin/false --user-group rpc" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/, \ + --without-systemdsystemunitdir, \ + systemd \ +" + +EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc" + +do_install_append () { + install -d ${D}${sysconfdir}/init.d + sed -e 's,/etc/,${sysconfdir}/,g' \ + -e 's,/sbin/,${sbindir}/,g' \ + ${WORKDIR}/init.d > ${D}${sysconfdir}/init.d/rpcbind + chmod 0755 ${D}${sysconfdir}/init.d/rpcbind +} + +ALTERNATIVE_${PN} = "rpcinfo" +ALTERNATIVE_LINK_NAME[rpcinfo] = "${bindir}/rpcinfo" -- cgit v1.2.3-54-g00ecf