Package: rpcbind Version: 0.2.0-6 Severity: wishlist Tags: patch Please backport the patch from upstream's git to run rpcbind in no fork mode. This makes it easier to start rpcbind using systemd.
Attached is a patch, which adds the upstream patch to the quilt series (with minor modifications to make it apply cleanly). Thanks, Daniel Schaal -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (102, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.1.0-nfs (SMP w/2 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages rpcbind depends on: ii insserv 1.14.0-2.1 ii libc6 2.13-21 ii libtirpc1 0.2.2-5 ii libwrap0 7.6.q-21 ii lsb-base 3.2-28 rpcbind recommends no packages. rpcbind suggests no packages. -- no debconf information
>From d6922e43c5b94fd4eef4e1feb6c2662b003e11bf Mon Sep 17 00:00:00 2001 From: Daniel Schaal <farb...@web.de> Date: Wed, 9 Nov 2011 19:08:03 +0100 Subject: [PATCH] backport "add no fork mode" patch --- debian/patches/05-add-no-fork-mode.patch | 56 ++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 debian/patches/05-add-no-fork-mode.patch diff --git a/debian/patches/05-add-no-fork-mode.patch b/debian/patches/05-add-no-fork-mode.patch new file mode 100644 index 0000000..040aa54 --- /dev/null +++ b/debian/patches/05-add-no-fork-mode.patch @@ -0,0 +1,56 @@ +Description: Backport "Add no fork mode" + Add option to rpcbind to disable forking after startup. +Origin: upstream +Last-Update: 2011-11-09 + +--- rpcbind-0.2.0.orig/man/rpcbind.8 ++++ rpcbind-0.2.0/man/rpcbind.8 +@@ -82,6 +82,8 @@ during operation, and will abort on cert + is also specified. + With this option, the name-to-address translation consistency + checks are shown in detail. ++.It Fl f ++Do not fork and become a background process. + .It Fl h + Specify specific IP addresses to bind to for UDP requests. + This option +--- rpcbind-0.2.0.orig/src/rpcbind.c ++++ rpcbind-0.2.0/src/rpcbind.c +@@ -77,6 +77,7 @@ + + int debugging = 0; /* Tell me what's going on */ + int doabort = 0; /* When debugging, do an abort on errors */ ++int dofork = 1; /* fork? */ + + rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */ + +@@ -213,8 +214,8 @@ main(int argc, char *argv[]) + printf("\n"); + } + #endif +- } else { +- if (daemon(0, 0)) ++ } else if (dofork) { ++ if (daemon(0, 0)) + err(1, "fork failed"); + } + +@@ -731,7 +732,7 @@ parseargs(int argc, char *argv[]) + { + int c; + oldstyle_local = 1; +- while ((c = getopt(argc, argv, "adh:ilsw")) != -1) { ++ while ((c = getopt(argc, argv, "adh:ilswf")) != -1) { + switch (c) { + case 'a': + doabort = 1; /* when debugging, do an abort on */ +@@ -758,6 +759,9 @@ parseargs(int argc, char *argv[]) + case 's': + runasdaemon = 1; + break; ++ case 'f': ++ dofork = 0; ++ break; + case 'w': + #ifdef WARMSTART + warmstart = 1; diff --git a/debian/patches/series b/debian/patches/series index 1f01e1b..52ebd3b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ debian-changes-0.2.0-4 04-610718-non-linux.patch debian-changes-0.2.0-5 +05-add-no-fork-mode.patch -- 1.7.7.2