summaryrefslogtreecommitdiffstats
path: root/external/poky/meta/recipes-devtools/dpkg/dpkg
diff options
context:
space:
mode:
Diffstat (limited to 'external/poky/meta/recipes-devtools/dpkg/dpkg')
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch54
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch35
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch36
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch12
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service17
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch97
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch21
-rw-r--r--external/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch27
8 files changed, 79 insertions, 220 deletions
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
deleted file mode 100644
index 45c606e6..00000000
--- a/external/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 319f32d743f5b5e725012654d124e49226d5de91 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 16 Mar 2018 20:28:24 -0700
-Subject: [PATCH] arch: Add support for riscv64 CPU
-
- * Architecture support:
- - Add support for riscv64 CPU. Closes: #822914
- Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org>
-
-Upstream-Status: Backport [https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=dpkg%2Fdpkg.git;a=commitdiff_plain;h=ee0855cc66076691de4796be48f8a0d889fde001;hp=2f5816d8be40b449d2473b22f9e0c33b32f3bd78]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- data/cputable | 1 +
- scripts/t/Dpkg_Arch.t | 4 ++--
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/data/cputable b/data/cputable
-index a2bd7d6..9f2a8e0 100644
---- a/data/cputable
-+++ b/data/cputable
-@@ -41,6 +41,7 @@ powerpc powerpc (powerpc|ppc) 32 big
- powerpcel powerpcle powerpcle 32 little
- ppc64 powerpc64 (powerpc|ppc)64 64 big
- ppc64el powerpc64le powerpc64le 64 little
-+riscv64 riscv64 riscv64 64 little
- s390 s390 s390 32 big
- s390x s390x s390x 64 big
- sh3 sh3 sh3 32 little
-diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t
-index d478b49..ecd5d66 100644
---- a/scripts/t/Dpkg_Arch.t
-+++ b/scripts/t/Dpkg_Arch.t
-@@ -16,7 +16,7 @@
- use strict;
- use warnings;
-
--use Test::More tests => 16367;
-+use Test::More tests => 16832;
-
- use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
- debarch_eq debarch_is debarch_is_wildcard
-@@ -162,7 +162,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet');
- is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet');
- is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet');
-
--is(scalar get_valid_arches(), 524, 'expected amount of known architectures');
-+is(scalar get_valid_arches(), 539, 'expected amount of known architectures');
-
- {
- local $ENV{CC} = 'false';
---
-2.16.2
-
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
index 93d87044..9ca7262e 100644
--- a/external/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
+++ b/external/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch
@@ -1,7 +1,7 @@
-From 24229971492515b64c81e8c6392e5dfbdc22b44c Mon Sep 17 00:00:00 2001
+From dd11ed66640f79143e42d778b58fdd5a61fb5836 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 26 Aug 2015 16:25:45 +0300
-Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
+Subject: [PATCH] Our pre/postinsts expect $D to be set when running in a
sysroot and don't expect a chroot. This matches up our system expectations
with what dpkg does.
@@ -10,15 +10,16 @@ Upstream-Status: Inappropriate [OE Specific]
RP 2011/12/07
ALIMON 2016/05/26
ALIMON 2017/02/21
+KKang 2019/02/20
---
- src/script.c | 44 +++-----------------------------------------
- 1 file changed, 3 insertions(+), 41 deletions(-)
+ src/script.c | 53 +++-------------------------------------------------
+ 1 file changed, 3 insertions(+), 50 deletions(-)
diff --git a/src/script.c b/src/script.c
-index 2f252ae..768a9d1 100644
+index abe65b6f7..621ff9b27 100644
--- a/src/script.c
+++ b/src/script.c
-@@ -97,48 +97,10 @@ setexecute(const char *path, struct stat *stab)
+@@ -96,58 +96,11 @@ setexecute(const char *path, struct stat *stab)
static const char *
maintscript_pre_exec(struct command *cmd)
{
@@ -26,12 +27,14 @@ index 2f252ae..768a9d1 100644
- const char *changedir;
- size_t instdirlen = strlen(instdir);
-
-- if (instdirlen > 0 && fc_script_chrootless)
+- if (instdirlen > 0 && in_force(FORCE_SCRIPT_CHROOTLESS))
- changedir = instdir;
- else
- changedir = "/";
-
-- if (instdirlen > 0 && !fc_script_chrootless) {
+- if (instdirlen > 0 && !in_force(FORCE_SCRIPT_CHROOTLESS)) {
+- int rc;
+-
- if (strncmp(admindir, instdir, instdirlen) != 0)
- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
- if (setenv("DPKG_ADMINDIR", admindir + instdirlen, 1) < 0)
@@ -39,7 +42,12 @@ index 2f252ae..768a9d1 100644
- if (setenv("DPKG_ROOT", "", 1) < 0)
- ohshite(_("unable to setenv for subprocesses"));
-
-- if (chroot(instdir))
+- rc = chroot(instdir);
+- if (rc && in_force(FORCE_NON_ROOT) && errno == EPERM)
+- ohshit(_("not enough privileges to change root "
+- "directory with --force-not-root, consider "
+- "using --force-script-chrootless?"));
+- else if (rc)
- ohshite(_("failed to chroot to '%.250s'"), instdir);
+ if (*instdir) {
+ setenv("D", instdir, 1);
@@ -61,15 +69,18 @@ index 2f252ae..768a9d1 100644
- args.buf);
- varbuf_destroy(&args);
- }
-- if (instdirlen == 0 || fc_script_chrootless)
+- if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS))
- return cmd->filename;
-
-- assert(strlen(cmd->filename) >= instdirlen);
+- if (strlen(cmd->filename) < instdirlen)
+- internerr("maintscript name '%s' length < instdir length %zd",
+- cmd->filename, instdirlen);
+
- return cmd->filename + instdirlen;
+ return cmd->filename;
}
/**
--
-2.1.4
+2.17.1
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch
deleted file mode 100644
index 96e96f27..00000000
--- a/external/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0ad7bba80d5b9035089ff2b2f77a774b5b201915 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 26 Aug 2015 16:28:59 +0300
-Subject: [PATCH 5/5] dpkg-compiler.m4: remove -Wvla
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Remove the -Wvla flag from the set of compiler warning flags, since gcc
-on old host systems such as CentOS 5.8 doesn't support it, and it
-causes a build error for dpkg-native.
-
-Upstream-Status: Pending
-
-Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
----
- m4/dpkg-compiler.m4 | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
-index 682857c..23ed7d0 100644
---- a/m4/dpkg-compiler.m4
-+++ b/m4/dpkg-compiler.m4
-@@ -52,7 +52,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [
- DPKG_CHECK_COMPILER_FLAG([-Wlogical-op])
- DPKG_CHECK_COMPILER_FLAG([-Wlogical-not-parentheses])
- DPKG_CHECK_COMPILER_FLAG([-Wswitch-bool])
-- DPKG_CHECK_COMPILER_FLAG([-Wvla])
- DPKG_CHECK_COMPILER_FLAG([-Winit-self])
- DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings])
- DPKG_CHECK_COMPILER_FLAG([-Wcast-align])
---
-2.1.4
-
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
index 1b985df0..4f79a40d 100644
--- a/external/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
+++ b/external/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch
@@ -18,22 +18,26 @@ Upstream-Status: Inappropriate [Configuration]
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759999#20
[2] https://lists.gnu.org/archive/html/help-tar/2016-01/msg00000.html
+
+Update patch context for dpkg 1.19.4.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
dpkg-deb/build.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index a92b58e..a3d1912 100644
+index 68d1875..053fcb7 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
-@@ -450,7 +450,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+@@ -457,7 +457,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
command_init(&cmd, TAR, "tar -cf");
command_add_args(&cmd, "tar", "-cf", "-", "--format=gnu",
- "--mtime", mtime, "--clamp-mtime", NULL);
+ "--mtime", mtime, NULL);
/* Mode might become a positional argument, pass it before -T. */
- if (mode)
- command_add_args(&cmd, "--mode", mode, NULL);
+ if (options->mode)
+ command_add_args(&cmd, "--mode", options->mode, NULL);
--
2.11.0
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/external/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
deleted file mode 100644
index 9a248ccb..00000000
--- a/external/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=dpkg first boot configure
-DefaultDependencies=no
-After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
-Before=sysinit.target
-
-[Service]
-Type=oneshot
-EnvironmentFile=-@SYSCONFDIR@/default/postinst
-ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi"
-ExecStartPost=@BASE_BINDIR@/systemctl --no-reload disable dpkg-configure.service
-StandardOutput=syslog
-RemainAfterExit=No
-
-[Install]
-WantedBy=basic.target
-WantedBy=sysinit.target
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
deleted file mode 100644
index d4838664..00000000
--- a/external/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 9d260d408f9e17abd1d1dccd685bd7e80a3655a9 Mon Sep 17 00:00:00 2001
-From: Donn Seeley <donn.seeley@windriver.com>
-Date: Tue, 25 Feb 2014 17:44:04 +0800
-Subject: [PATCH] dpkg: fix a link problem for dpkg-native on CentOS 5.8
-
-CentOS 5.8 kernels and headers support the sync_file_range() system call,
-but glibc 2.5 doesn't provide the syscall stub. It appears that this
-problem is known but will never be fixed:
-
- https://bugzilla.redhat.com/show_bug.cgi?id=518581
-
- Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
-
- Status: CLOSED CANTFIX
- Last Closed: 2009-11-22 22:19:55
-
- Kirby Zhou 2009-08-20 23:37:55 EDT
-
- Description of problem:
-
- glibc misses sync_file_range syscall interface. The header file and
- man page both say 'sync_file_range' should exist. From man page,
- sync_file_range should exist sinc kernel-2.6.17
-
- Andreas Schwab 2009-08-21 03:24:24 EDT
-
- It has only been added to glibc 2.6, and cannot be backported due to
- ABI breakage. You can always fall back to syscall(3).
-
- Ulrich Drepper 2009-11-22 22:19:55 EST
-
- As comment #1 says, no chance to backport this.
-
- See the syscall man page for instructions.
-
- Jon E 2010-03-19 10:32:37 EDT
-
- then why document it if it's broken and you're not going to fix it?
- .. might want to FTFM over at sync_file_range(2) - in the meantime -
- borrowing from glibc 2.6 .. any thoughts on this implementation for a
- hacky workaround for those still on your "ancient releases" .. (eg:
- RHEL5.3)?:
-
- #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5
- #define NR_sync_file_range 277
- int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
- {
- return syscall (NR_sync_file_range, fd,
- __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
- __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
- flags);
- }
- #endif
-
- assuming of course that you're on an x86_64 and include/asm-
- x86_64/unistd.h has the correct entry
-
- (fwiw - fio is starting to use this now)
-
-Rather than attempting to provide an implementation using syscall(),
-we take the more conservative route and ignore header support for
-sync_file_range() flags when the glibc version is <= 2.5.
-
-Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)]
-
-Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
-Signed-off-by: Lei Liu <lei.liu2@windriver.com>
-
----
- src/archives.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/archives.c b/src/archives.c
-index 4b2fc92..a92b795 100644
---- a/src/archives.c
-+++ b/src/archives.c
-@@ -69,7 +69,7 @@ fd_writeback_init(int fd)
- /* Ignore the return code as it should be considered equivalent to an
- * asynchronous hint for the kernel, we are doing an fsync() later on
- * anyway. */
--#if defined(SYNC_FILE_RANGE_WRITE)
-+#if defined(SYNC_FILE_RANGE_WRITE) && __GLIBC_PREREQ(2, 6)
- sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
- #elif defined(HAVE_POSIX_FADVISE)
- posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-@@ -1078,7 +1078,7 @@ tarobject(void *ctx, struct tar_entry *ti)
- return 0;
- }
-
--#if defined(SYNC_FILE_RANGE_WAIT_BEFORE)
-+#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) && __GLIBC_PREREQ(2, 6)
- static void
- tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg)
- {
---
-2.16.2
-
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch
new file mode 100644
index 00000000..e56b9d28
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/dpkg/dpkg/pager.patch
@@ -0,0 +1,21 @@
+pager: Use less instead of pager
+
+pager is a Debianism. Istead use directly pager.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Suggested-by: Burton, Ross <ross.burton@intel.com>
+Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
+diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
+index 2bb067a..6cbce80 100644
+--- a/lib/dpkg/dpkg.h
++++ b/lib/dpkg/dpkg.h
+@@ -95,7 +95,7 @@ DPKG_BEGIN_DECLS
+ #define MAXUPDATES 250
+
+ #define DEFAULTSHELL "sh"
+-#define DEFAULTPAGER "pager"
++#define DEFAULTPAGER "less"
+
+ #define MD5HASHLEN 32
+ #define MAXTRIGDIRECTIVE 256
diff --git a/external/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch b/external/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch
new file mode 100644
index 00000000..e9119918
--- /dev/null
+++ b/external/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch
@@ -0,0 +1,27 @@
+GNU tar >= 1.27 is required for --owner=NAME:ID and --group=NAME:ID. And fails
+to build .deb packages with error:
+
+| dpkg-deb: building package 'linux-libc-headers-dbg' in '.../tmp/work/i586-poky-linux/linux-libc-headers/4.19-r0/deploy-debs/i586/linux-libc-headers-dbg_ 4.19-r0.0_i386.deb'.
+| tar: root\:0: Invalid owner
+| tar: Error is not recoverable: exiting now
+| dpkg-deb: error: tar -cf subprocess returned error exit status 2
+
+Tweak tar options in dpkg-deb source code to make it work on old machines.
+
+Upstream-Status: Inappropriate [cross build specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
+index 68d187511..86fe22e25 100644
+--- a/dpkg-deb/build.c
++++ b/dpkg-deb/build.c
+@@ -462,7 +462,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+ if (options->mode)
+ command_add_args(&cmd, "--mode", options->mode, NULL);
+ if (options->root_owner_group)
+- command_add_args(&cmd, "--owner", "root:0", "--group", "root:0", NULL);
++ command_add_args(&cmd, "--owner", "root", "--group", "root", NULL);
+ command_add_args(&cmd, "--null", "--no-unquote", "--no-recursion",
+ "-T", "-", NULL);
+ command_exec(&cmd);