summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--THANKS1
-rw-r--r--TODO7
-rw-r--r--configure.in2
-rw-r--r--debian/changelog8
-rw-r--r--dselect/pkgtop.cc2
-rwxr-xr-xscripts/cl-debian.pl2
-rw-r--r--utils/Makefile.in2
-rw-r--r--utils/start-stop-daemon.86
-rw-r--r--utils/start-stop-daemon.c17
10 files changed, 52 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cf5839709..10b969e6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sun Jan 9 01:40:23 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+ * scripts/cl-debian.pl: Allow space between `#' and the bugnumber in the
+ changelog scripts
+ * scripts/start-stop-daemon.c: test for __sparc__ instead
+ * scripts/Makefile.in: add optlib to CFLAGS
+ * utils/start-stop-daemon.c: add option to chroot first, patch from Marco d'Itri
+ * utils/start-stop-daemon.8: document chroot option
+ * dselect/pkgtop.cc: use waddnstr to print package description instead of waddch
+
Fri Jan 7 18:24:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
* dselect/method.cc: pass admindir to dpkg
diff --git a/THANKS b/THANKS
index b9bd37cc9..c3c9ccda8 100644
--- a/THANKS
+++ b/THANKS
@@ -29,6 +29,7 @@ Juergen Menden <menden@morgana.camelot.de>
Juho Vuori <javuori@cc.helsinki.fi>
Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
Klee Dienes <klee@debian.org>
+Marco d'Itri <md@linux.it>
Marcus Brinkmann <brinkmd@debian.org>
Masato Taruishi <taru@debian.or.jp>
Matt Welsh <mdw@sunsite.unc.edu>
diff --git a/TODO b/TODO
index 5dbc9756f..435d771d1 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,10 @@
+
+* start-stop-daemon: write pidfile before we chroot?
+
+------------------------------------------------------------------------------
+
+Old TODO entries from IWJ:
+
Here are some currently-known inadequacies:
urgent
diff --git a/configure.in b/configure.in
index 57a337f6a..1320e1f3b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ([2.12])
+AC_PREREQ([2.13])
AC_INIT(include/dpkg.h.in)
AC_CONFIG_HEADER(config.h)
diff --git a/debian/changelog b/debian/changelog
index 86d978d8e..26cf51d48 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+dpkg (1.6.7) unstable; urgency=low
+
+ * start-stop-daemon can chroot now, Closes: Bug#54513
+ * Allow space between # and the bugnumber in the changelog
+ * Display package description with waddnstr, Closes: Bug#54313
+
+ -- Wichert Akkerman <wakkerma@debian.org> UNRELEASED
+
dpkg (1.6.6) unstable; urgency=low
* dpkg-buildpackage supports debsign, Closes: Bug#58333
diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc
index ade9428f7..f6466eda8 100644
--- a/dselect/pkgtop.cc
+++ b/dselect/pkgtop.cc
@@ -221,7 +221,7 @@ void packagelist::redraw1itemsel(int index, int selected) {
i= description_width;
p= info->description ? info->description : "";
- while (i>0 && *p && *p != '\n') { waddch(listpad,*p); i--; p++; }
+ while (i>0 && *p && *p != '\n') { waddnstr(listpad,p,1); i--; p++; }
} else {
diff --git a/scripts/cl-debian.pl b/scripts/cl-debian.pl
index dc823f2de..5ec9f54e8 100755
--- a/scripts/cl-debian.pl
+++ b/scripts/cl-debian.pl
@@ -138,7 +138,7 @@ $expect eq 'next heading or eof' || die "found eof where expected $expect";
$f{'Changes'} =~ s/\n$//;
$f{'Changes'} =~ s/^/\n/;
-while ($f{'Changes'} =~ /closes:\s*(?:bug)?\#\d+(?:,\s*(?:bug)?\#\d+)*/ig) {
+while ($f{'Changes'} =~ /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig) {
push(@closes, $& =~ /\#(\d+)/g);
}
$f{'Closes'} = join(' ',sort { $a <=> $b} @closes);
diff --git a/utils/Makefile.in b/utils/Makefile.in
index 99a7342f0..09cbf4643 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -5,6 +5,8 @@ top_srcdir = @top_srcdir@
include ../Makefile.conf
+CFLAGS += $(top_srcdir)/optlib
+
SSD_SOURCES = start-stop-daemon.c
SSD_OBJECTS = $(patsubst %.c, %.o, $(SSD_SOURCES))
SSD_MANPAGES = start-stop-daemon.8
diff --git a/utils/start-stop-daemon.8 b/utils/start-stop-daemon.8
index 71bed3ec5..0b7bad09d 100644
--- a/utils/start-stop-daemon.8
+++ b/utils/start-stop-daemon.8
@@ -130,6 +130,12 @@ even if the `group' options is not specified. The group option is only for
groups that the user isn't normally a member of (like adding per/process
group membership for generic users like `nobody').
.TP
+.I -r|--chroot root
+Chdir and chroot to
+.B root
+before starting the process. Please note that the pidfile is also written
+after the chroot.
+.TP
.I -b|--background
Typically used with programs that don't detach on their own. This option
will force
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index def1026d1..47a974dcb 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -21,7 +21,7 @@
#define OSLinux
#elif defined(__GNU__)
#define OSHURD
-#elif defined(Sparc)
+#elif defined(__sparc__)
#define OSsunos
#else
#error Unknown architecture - cannot build start-stop-daemon
@@ -73,6 +73,7 @@ static int runas_gid = -1;
static const char *userspec = NULL;
static char *changeuser = NULL;
static char *changegroup = NULL;
+static char *changeroot = NULL;
static const char *cmdname = NULL;
static char *execname = NULL;
static char *startas = NULL;
@@ -255,6 +256,7 @@ parse_options(int argc, char * const *argv)
{ "signal", 1, NULL, 's'},
{ "test", 0, NULL, 't'},
{ "user", 1, NULL, 'u'},
+ { "chroot", 1, NULL, 'r'},
{ "verbose", 0, NULL, 'v'},
{ "exec", 1, NULL, 'x'},
{ "chuid", 1, NULL, 'c'},
@@ -265,7 +267,7 @@ parse_options(int argc, char * const *argv)
int c;
for (;;) {
- c = getopt_long(argc, argv, "HKSVa:n:op:qs:tu:vx:c:bm",
+ c = getopt_long(argc, argv, "HKSVa:n:op:qr:s:tu:vx:c:bm",
longopts, (int *) 0);
if (c == -1)
break;
@@ -319,6 +321,9 @@ parse_options(int argc, char * const *argv)
changeuser = strtok(changeuser, ":");
changegroup = strtok(NULL, ":");
break;
+ case 'r': /* --chroot /new/root */
+ changeroot = optarg;
+ break;
case 'b': /* --background */
background = 1;
break;
@@ -650,12 +655,20 @@ main(int argc, char **argv)
else
printf(")");
}
+ if (changeroot != NULL)
+ printf(" in directory %s", changeroot);
printf(".\n");
exit(0);
}
if (quietmode < 0)
printf("Starting %s...\n", startas);
*--argv = startas;
+ if (changeroot != NULL) {
+ if (chdir(changeroot) < 0)
+ fatal("Unable to chdir() to %s", changeroot);
+ if (chroot(changeroot) < 0)
+ fatal("Unable to chroot() to %s", changeroot);
+ }
if (changeuser != NULL) {
if (setgid(runas_gid))
fatal("Unable to set gid to %d", runas_gid);