From 5b1fbbebb987a78c7e3261ed53ebda5597dc0b42 Mon Sep 17 00:00:00 2001 From: Constantin Musca Date: Tue, 28 Aug 2012 17:02:40 +0300 Subject: dpkg: upgrade to 1.16.8 autofoo.patch: removed - the patch is not used check_version: adapted to the new version - adapt the linux-wrs kernel version, which has character '_' - remove the first-char-digit-check (as the 1.15.8.5 version does) dpkg-deb-avoid-fflush.patch: removed - the patch is included in the new version fix-timestamps.patch: added - the lutimes function doesn't work properly for all systems ignore_extra_fields.patch: adapted to the new version nochroot.patch: removed - the patch is not used noman.patch: adapted to the new version noupdalt.patch: removed - the patch is not used perllibdir.patch: removed - in the new version PERL_LIBDIR will be set only if empty preinst.patch: adapted to new version removed-tar-no-timestamp.patch: added - the busybox-1.19.4 tar utility doesn't support --warning=no-timestamp (From OE-Core rev: 02e8b5c1fd68fa18ee81ba2920cd48fea8a1ef5e) Signed-off-by: Constantin Musca Signed-off-by: Richard Purdie --- meta/recipes-devtools/dpkg/dpkg/preinst.patch | 75 +++++++++++++++------------ 1 file changed, 41 insertions(+), 34 deletions(-) (limited to 'meta/recipes-devtools/dpkg/dpkg/preinst.patch') diff --git a/meta/recipes-devtools/dpkg/dpkg/preinst.patch b/meta/recipes-devtools/dpkg/dpkg/preinst.patch index 06d2aac..f9cb408 100644 --- a/meta/recipes-devtools/dpkg/dpkg/preinst.patch +++ b/meta/recipes-devtools/dpkg/dpkg/preinst.patch @@ -6,41 +6,48 @@ Upstream-Status: Inappropriate [OE Specific] RP 2011/12/07 -Index: dpkg-1.15.8.7/src/help.c +Index: dpkg-1.16.8/src/script.c =================================================================== ---- dpkg-1.15.8.7.orig/src/help.c 2010-12-20 01:25:36.000000000 +0000 -+++ dpkg-1.15.8.7/src/help.c 2011-12-07 14:51:02.783461487 +0000 -@@ -181,30 +181,9 @@ - * FIXME: none of the stuff here will work if admindir isn't inside - * instdir as expected. - */ -- size_t instdirl; +--- dpkg-1.16.8.orig/src/script.c ++++ dpkg-1.16.8/src/script.c +@@ -102,38 +102,10 @@ setexecute(const char *path, struct stat + static const char * + preexecscript(struct command *cmd) + { +- const char *admindir = dpkg_db_get_dir(); +- size_t instdirl = strlen(instdir); - -- if (*instdir) { -- if (chroot(instdir)) ohshite(_("failed to chroot to `%.250s'"),instdir); -- if (chdir("/")) -- ohshite(_("failed to chdir to `%.255s'"), "/"); -- } -- if (f_debug & dbg_scripts) { -- struct varbuf args = VARBUF_INIT; -- const char **argv = cmd->argv; + if (*instdir) { +- if (strncmp(admindir, instdir, instdirl) != 0) +- ohshit(_("admindir must be inside instdir for dpkg to work properly")); +- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0) +- ohshite(_("unable to setenv for subprocesses")); - -- while (*++argv) { -- varbufaddc(&args, ' '); -- varbufaddstr(&args, *argv); -- } -- varbufaddc(&args, '\0'); -- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, args.buf); -- varbuf_destroy(&args); -- } -- instdirl= strlen(instdir); -- if (!instdirl) -- return cmd->filename; -- assert(strlen(cmd->filename) >= instdirl); -- return cmd->filename + instdirl; -+ if (*instdir) -+ setenv("D", instdir, 1); -+ return cmd->filename; - } +- if (chroot(instdir)) +- ohshite(_("failed to chroot to `%.250s'"), instdir); +- if (chdir("/")) +- ohshite(_("failed to chdir to `%.255s'"), "/"); ++ setenv("D", instdir, 1); + } +- if (debug_has_flag(dbg_scripts)) { +- struct varbuf args = VARBUF_INIT; +- const char **argv = cmd->argv; +- +- while (*++argv) { +- varbuf_add_char(&args, ' '); +- varbuf_add_str(&args, *argv); +- } +- varbuf_end_str(&args); +- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, +- args.buf); +- varbuf_destroy(&args); +- } +- if (!instdirl) +- return cmd->filename; +- +- assert(strlen(cmd->filename) >= instdirl); +- return cmd->filename + instdirl; ++ return cmd->filename; + } - void + static int -- cgit v1.1