diff options
Diffstat (limited to 'poky/meta/recipes-devtools/dpkg')
-rw-r--r-- | poky/meta/recipes-devtools/dpkg/dpkg.inc | 14 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch | 53 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch | 27 | ||||
-rw-r--r-- | poky/meta/recipes-devtools/dpkg/dpkg_1.20.5.bb (renamed from poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb) | 12 |
4 files changed, 72 insertions, 34 deletions
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg.inc b/poky/meta/recipes-devtools/dpkg/dpkg.inc index 1c3c585d7..04fe85c4a 100644 --- a/poky/meta/recipes-devtools/dpkg/dpkg.inc +++ b/poky/meta/recipes-devtools/dpkg/dpkg.inc @@ -7,7 +7,7 @@ DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alte RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl" RDEPENDS_${PN}_class-native = "" -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/" +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" inherit autotools gettext perlnative pkgconfig perl-version update-alternatives @@ -30,6 +30,18 @@ EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH PACKAGECONFIG = "liblzma" PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" + +#autotools.bbclass default AUTOTOOLS_AUXDIR is ${S}, we need to under ${S}/build-aux +AUTOTOOLS_AUXDIR = "${S}/build-aux" + +do_configure_prepend () { + mkdir -p ${AUTOTOOLS_AUXDIR} + # autotools_do_configure updates po/Makefile.in.in, we also need + # update dselect/po and scripts/po + cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/dselect/po/ + cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/scripts/po/ +} + do_install_append () { if [ "${PN}" = "dpkg-native" ]; then # update-alternatives doesn't have an offline mode diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch new file mode 100644 index 000000000..ffe520c51 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch @@ -0,0 +1,53 @@ +From 15b081cc8bead80c493ab83369ecb3345a24a3dc Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.microsoft.com> +Date: Tue, 16 Jun 2020 03:57:25 +0000 +Subject: [PATCH] build.c: ignore return of 1 from tar -cf + +When running do_package_write_deb, we have trees of hardlinked files +such as the dbg source files in ${PN}-dbg. If something makes another +copy of one of those files (or deletes one), the number of links a file +has changes and tar can notice this, e.g.: + +| DEBUG: Executing python function do_package_deb +| dpkg-deb: building package `sed-ptest' in `/media/build1/poky/build/tmp/work/i586-poky-linux/sed/4.2.2-r0/deploy-debs/i586/sed-ptest_4.2.2-r0.3_i386.deb'. +| tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it +| dpkg-deb: error: subprocess tar -cf returned error exit status 1 + +Tar returns an error of 1 when files 'change' and other errors codes +in other error cases. We tweak dpkg-deb here so that it ignores an exit +code of 1 from tar. The files don't really change (and we have locking in +place to avoid that kind of issue). + +Upstream-Status: Inappropriate [OE specific] + +Original patch by RP 2015/3/27, rebased by Paul Eggleton + +Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> + +--- + dpkg-deb/build.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c +index 8436839cd..6b44a36f7 100644 +--- a/dpkg-deb/build.c ++++ b/dpkg-deb/build.c +@@ -434,6 +434,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + { + int pipe_filenames[2], pipe_tarball[2]; + pid_t pid_tar, pid_comp; ++ int rc; + + /* Fork off a tar. We will feed it a list of filenames on stdin later. */ + m_pipe(pipe_filenames); +@@ -486,7 +487,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + /* All done, clean up wait for tar and <compress> to finish their job. */ + close(pipe_filenames[1]); + subproc_reap(pid_comp, _("<compress> from tar -cf"), 0); +- subproc_reap(pid_tar, "tar -cf", 0); ++ rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR); ++ if (rc && rc != 1) ++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); + } + + static time_t diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch b/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch deleted file mode 100644 index e9119918b..000000000 --- a/poky/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch +++ /dev/null @@ -1,27 +0,0 @@ -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); diff --git a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb b/poky/meta/recipes-devtools/dpkg/dpkg_1.20.5.bb index 50fe54dee..d97b69c0b 100644 --- a/poky/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb +++ b/poky/meta/recipes-devtools/dpkg/dpkg_1.20.5.bb @@ -1,7 +1,7 @@ require dpkg.inc LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \ +SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https \ file://noman.patch \ file://remove-tar-no-timestamp.patch \ file://arch_pm.patch \ @@ -15,9 +15,9 @@ SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \ file://pager.patch \ file://0001-Add-support-for-riscv32-CPU.patch \ " -SRC_URI_append_class-native = " \ - file://tweak-options-require-tar-1.27.patch \ -" -SRC_URI[md5sum] = "60f57c5494e6dfa177504d47bfa0e383" -SRC_URI[sha256sum] = "4c27fededf620c0aa522fff1a48577ba08144445341257502e7730f2b1a296e8" +SRC_URI_append_class-native = " file://0001-build.c-ignore-return-of-1-from-tar-cf.patch" + +SRCREV = "823a67d67538b1b403a32d1fef40e6e228265566" + +S = "${WORKDIR}/git" |