Package: rpcbind Version: 0.2.0-7 Followup-For: Bug #648225 Attached an updated the patch to apply to 0.2.0-7.
-- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (990, 'unstable'), (103, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.1.4 (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 initscripts 2.88dsf-13.13 ii insserv 1.14.0-2.1 ii libc6 2.13-21 ii libtirpc1 0.2.2-5 ii libwrap0 7.6.q-22 ii lsb-base 3.2-28 rpcbind recommends no packages. rpcbind suggests no packages. -- no debconf information
>From ba3038e8e80f33dd282635fe789cf0dc4d4c2fc3 Mon Sep 17 00:00:00 2001 From: Daniel Schaal <farb...@web.de> Date: Sat, 10 Dec 2011 11:59:20 +0100 Subject: [PATCH] backport patch to run in no fork mode --- 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 6dde64d..5a457c2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 02-manpages.patch 03-563971-warmstart-error-msg.patch 04-610718-non-linux.patch +05-add-no-fork-mode.patch -- 1.7.7.3