Skip to contentSkip to conversation

dpkg: Upgrade to 1.18.24

PATCH New Aníbal Limón 1 participant 2 messages Aug 22, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dpkg: Upgrade to 1.18.24

Patches rebased due to don't apply, no major changes,

- 0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch
- arch_pm.patch
- noman.patch

Patches related to move ostable/triplettable insida data/ostable and data/tupletable instead also needs to comply the new format of the tables for arch detection.

- 0006-add-musleabi-to-known-target-tripets.patch
- add_armeb_triplet_entry.patch

And finally a patch to avoid usage --clamp-mtime in tar needs to be modified because the dpkg-deb internal API changed.

- 0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch

---
 ...nux-wrs-kernel-version-which-has-characte.patch | 12 ++---
 ...0006-add-musleabi-to-known-target-tripets.patch | 57 +++++++++++-----------
 ...uild.c-Remove-usage-of-clamp-mtime-in-tar.patch | 21 ++++----
 .../dpkg/dpkg/add_armeb_triplet_entry.patch        | 30 ++++++------
 meta/recipes-devtools/dpkg/dpkg/arch_pm.patch      | 19 +++++---
 meta/recipes-devtools/dpkg/dpkg/noman.patch        | 18 +++++--
 .../dpkg/{dpkg_1.18.10.bb => dpkg_1.18.24.bb}      |  6 +--
 7 files changed, 89 insertions(+), 74 deletions(-)
 rename meta/recipes-devtools/dpkg/{dpkg_1.18.10.bb => dpkg_1.18.24.bb} (77%)
meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch +6 -6
index 231a6a2909d..9fe0ca76002 100644
@@ -13,13 +13,13 @@ Upstream-Status: Inappropriate [embedded specific]
  1 file changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
-index 79b2908..7758aa5 100644
+index 453077fd9..f42ea2882 100644
 --- a/lib/dpkg/parsehelp.c
 +++ b/lib/dpkg/parsehelp.c
-@@ -235,14 +235,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
- 
-   /* XXX: Would be faster to use something like cisversion and cisrevision. */
+@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string,
    ptr = rversion->version;
+   if (!*ptr)
+     return dpkg_put_error(err, _("version number is empty"));
 -  if (*ptr && !c_isdigit(*ptr++))
 -    return dpkg_put_warn(err, _("version number does not start with digit"));
    for (; *ptr; ptr++) {
@@ -33,6 +33,6 @@ index 79b2908..7758aa5 100644
        return dpkg_put_warn(err, _("invalid character in revision number"));
    }
  
--- 
-2.1.4
 
+-- 
+2.11.0
meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch +28 -29

65 lines not on this page · raw message

meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch +10 -11
index 8bfaad14d8d..1b985df0f5b 100644
@@ -23,18 +23,17 @@ Upstream-Status: Inappropriate [Configuration]
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index 655aa55..927f56f 100644
+index a92b58e..a3d1912 100644
 --- a/dpkg-deb/build.c
 +++ b/dpkg-deb/build.c
-@@ -447,7 +447,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
-     snprintf(mtime, sizeof(mtime), "@%ld", timestamp);
+@@ -450,7 +450,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
  
-     execlp(TAR, "tar", "-cf", "-", "--format=gnu",
--                       "--mtime", mtime, "--clamp-mtime",
-+                       "--mtime", mtime,
-                        "--null", "--no-unquote",
-                        "--no-recursion", "-T", "-", NULL);
-     ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
+     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);
 -- 
-2.1.4
-
+2.11.0
meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch +16 -14
index dc69eb2d1cd..d165616a191 100644
@@ -24,23 +24,25 @@ empty in configure script.
 Upstream-Status: Pending
 
 Signed-off-by: Krishnanjanappa, Jagadeesh <[email protected]>
+Signed-off-by: Aníbal Limón <[email protected]>
 
 ---
- triplettable | 1 +
+ data/tupletable | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/triplettable b/triplettable
-index abe4726..1e9c247 100644
---- a/triplettable
-+++ b/triplettable
-@@ -11,6 +11,7 @@ gnueabihf-linux-arm	armhf
- gnueabi-linux-arm	armel
- gnuabin32-linux-mips64r6el	mipsn32r6el
- gnuabin32-linux-mips64r6	mipsn32r6
-+gnueabi-linux-armeb	armeb
- gnuabin32-linux-mips64el	mipsn32el
- gnuabin32-linux-mips64	mipsn32
- gnuabi64-linux-mips64r6el	mips64r6el
+diff --git a/data/tupletable b/data/tupletable
+index b7802bec3..5f500f6ca 100644
+--- a/data/tupletable
++++ b/data/tupletable
+@@ -12,6 +12,7 @@ base-musl-linux-<cpu>		musl-linux-<cpu>
+ ilp32-gnu-linux-arm64		arm64ilp32
+ eabihf-gnu-linux-arm		armhf
+ eabi-gnu-linux-arm		armel
++eabi-gnu-linux-armeb		armeb
+ abin32-gnu-linux-mips64r6el	mipsn32r6el
+ abin32-gnu-linux-mips64r6	mipsn32r6
+ abin32-gnu-linux-mips64el	mipsn32el
 -- 
-2.1.4
+2.11.0
+
 
meta/recipes-devtools/dpkg/dpkg/arch_pm.patch +13 -6
index cad4c0f0a1c..4e0d22acbbf 100644
@@ -7,16 +7,23 @@ Upstream-Status: Pending
 
 Signed-off-by: Joe Slater <[email protected]>
 
+---
+ scripts/Dpkg/Arch.pm | 3 ---
+ 1 file changed, 3 deletions(-)
 
+diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
+index 1720847b8..6345ce3b9 100644
 --- a/scripts/Dpkg/Arch.pm
 +++ b/scripts/Dpkg/Arch.pm
-@@ -233,9 +233,6 @@ sub read_triplettable()
- 		    (my $dt = $debtriplet) =~ s/<cpu>/$_cpu/;
+@@ -323,9 +323,6 @@ sub _load_tupletable()
+ 		    (my $dt = $debtuple) =~ s/<cpu>/$_cpu/;
  		    (my $da = $debarch) =~ s/<cpu>/$_cpu/;
  
--		    next if exists $debarch_to_debtriplet{$da}
--		         or exists $debtriplet_to_debarch{$dt};
+-		    next if exists $debarch_to_debtuple{$da}
+-		         or exists $debtuple_to_debarch{$dt};
 -
- 		    $debarch_to_debtriplet{$da} = $dt;
- 		    $debtriplet_to_debarch{$dt} = $da;
+ 		    $debarch_to_debtuple{$da} = $dt;
+ 		    $debtuple_to_debarch{$dt} = $da;
  		}
+-- 
+2.11.0
meta/recipes-devtools/dpkg/dpkg/noman.patch +13 -5
index d30c15018a9..a7f3cb8f453 100644
@@ -1,14 +1,22 @@
 Upstream-Status: Inappropriate [disable feature]
 
-diff -ruN dpkg-1.15.8.5-orig/Makefile.am dpkg-1.15.8.5/Makefile.am
---- dpkg-1.15.8.5-orig/Makefile.am	2010-10-08 12:27:15.042083703 +0800
-+++ dpkg-1.15.8.5/Makefile.am	2010-10-08 12:27:27.755148228 +0800
-@@ -12,8 +12,7 @@
- 	utils \
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0da52cb16..a1f79e0a2 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,8 +13,7 @@ SUBDIRS = \
  	$(MAYBE_DSELECT) \
  	scripts \
+ 	t-func \
 -	po \
 -	man
 +	po
  
  ACLOCAL_AMFLAGS = -I m4
+ 
+-- 
+2.11.0
meta/recipes-devtools/dpkg/dpkg_1.18.24.bb renamed from meta/recipes-devtools/dpkg/dpkg_1.18.10.bb +3 -3
similarity index 77%
rename from meta/recipes-devtools/dpkg/dpkg_1.18.10.bb
rename to meta/recipes-devtools/dpkg/dpkg_1.18.24.bb
index 21385af8780..f06b604ebb2 100644
@@ -1,7 +1,7 @@
 require dpkg.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \
+SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \
            file://noman.patch \
            file://remove-tar-no-timestamp.patch \
            file://arch_pm.patch \
@@ -16,5 +16,5 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160731T221931Z/pool/main/
            "
 SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch "
 
-SRC_URI[md5sum] = "ccff17730c0964428fc186ded2f2f401"
-SRC_URI[sha256sum] = "025524da41ba18b183ff11e388eb8686f7cc58ee835ed7d48bd159c46a8b6dc5"
+SRC_URI[md5sum] = "02e8af8faf1e689228da806c3e8c6882"
+SRC_URI[sha256sum] = "d853081d3e06bfd46a227056e591f094e42e78fa8a5793b0093bad30b710d7b4"
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 2/2 apt: Upgrade to 1.2.24

Add new patches for enable builds on hosts that has GCC version minor than 5 because doesn't support std::array and std::put_time, those patches could be removed after get rid of Debian8 and Centos7 support.

- gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
- gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
- gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch

The LIC_FILES_CHKSUM changed because the license file now has style changes in the text remains GPLv2+.

The patch Revert-always-run-dpkg-configure-a-at-the-end-of-our was updated because now the precision fields use floating point numbers.

---
 meta/recipes-devtools/apt/apt-native_1.2.12.bb     |  4 --
 meta/recipes-devtools/apt/apt-native_1.2.24.bb     |  7 ++
 meta/recipes-devtools/apt/apt.inc                  |  8 +--
 ...ys-run-dpkg-configure-a-at-the-end-of-our.patch | 24 +++----
 ...d-changing-the-global-LC_TIME-for-Release.patch | 80 ++++++++++++++++++++++
 ...de-localed-std-put_time-instead-rolling-o.patch | 46 +++++++++++++
 ...kg-contrib-strutl.cc-Include-array-header.patch | 33 +++++++++
 .../apt/{apt_1.2.12.bb => apt_1.2.24.bb}           |  0
 8 files changed, 182 insertions(+), 20 deletions(-)
 delete mode 100644 meta/recipes-devtools/apt/apt-native_1.2.12.bb
 create mode 100644 meta/recipes-devtools/apt/apt-native_1.2.24.bb
 create mode 100644 meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
 create mode 100644 meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
 create mode 100644 meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
 rename meta/recipes-devtools/apt/{apt_1.2.12.bb => apt_1.2.24.bb} (100%)
meta/recipes-devtools/apt/apt-native_1.2.12.bb deleted +0 -4
deleted file mode 100644
index 1e660da74b9..00000000000
@@ -1,4 +0,0 @@
-require apt-native.inc
-
-SRC_URI += "file://noconfigure.patch \
-            file://no-curl.patch"
meta/recipes-devtools/apt/apt-native_1.2.24.bb new file +7 -0
new file mode 100644
index 00000000000..5b16b503d5d
@@ -0,0 +1,7 @@
+require apt-native.inc
+
+SRC_URI += "file://noconfigure.patch \
+            file://no-curl.patch \
+            file://gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch \
+            file://gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch \
+            file://gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch"
meta/recipes-devtools/apt/apt.inc +4 -4
index 30263708444..f1cde3068da 100644
@@ -2,7 +2,7 @@ SUMMARY = "Advanced front-end for dpkg"
 LICENSE = "GPLv2.0+"
 SECTION = "base"
 
-SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
+SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
            file://use-host.patch \
            file://makerace.patch \
            file://no-nls-dpkg.patch \
@@ -14,9 +14,9 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/
            file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
            file://0001-apt-1.2.12-Fix-musl-build.patch \
            "
-SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7"
-SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6"
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
+SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0"
+SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598"
+LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 # the package is taken from snapshots.debian.org; that source is static and goes stale
 # so we check the latest upstream from a directory that does get updated
meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch +12 -12
index b3a883bae88..734ba00d4f2 100644
@@ -22,10 +22,10 @@ Signed-off-by: Roy Li <[email protected]>
  3 files changed, 11 insertions(+), 18 deletions(-)
 
 diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
-index 834cb0e..84ded3a 100644
+index 533d9b367..6ce81bbd9 100644
 --- a/apt-pkg/deb/dpkgpm.cc
 +++ b/apt-pkg/deb/dpkgpm.cc
-@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
+@@ -1041,12 +1041,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
  	 PackagesTotal++;
        }
     }
@@ -38,7 +38,7 @@ index 834cb0e..84ded3a 100644
  }
                                                                          /*}}}*/
  bool pkgDPkgPM::Go(int StatusFd)
-@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
+@@ -1268,8 +1262,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
  
     // support subpressing of triggers processing for special
     // cases like d-i that runs the triggers handling manually
@@ -50,7 +50,7 @@ index 834cb0e..84ded3a 100644
  
     // for the progress
 diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
-index 58fd732..3359762 100755
+index a8d59608d..0c6a9bbbf 100755
 --- a/test/integration/test-apt-progress-fd-deb822
 +++ b/test/integration/test-apt-progress-fd-deb822
 @@ -27,36 +27,36 @@ Message: Installing testing (amd64)
@@ -69,19 +69,19 @@ index 58fd732..3359762 100755
  
  Status: progress
  Package: testing:amd64
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
  Message: Preparing to configure testing (amd64)
  
  Status: progress
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
  Message: Running dpkg
  
  Status: progress
  Package: testing:amd64
--Percent: 50
-+Percent: 60
+-Percent: 50.0000
++Percent: 60.0000
  Message: Configuring testing (amd64)
  
  Status: progress
@@ -98,7 +98,7 @@ index 58fd732..3359762 100755
  
  Status: progress
 diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
-index d86e638..ef6d23b 100755
+index d86e638cd..ef6d23be2 100755
 --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
 +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
 @@ -59,8 +59,7 @@ startup packages configure
@@ -122,5 +122,5 @@ index d86e638..ef6d23b 100755
  checkpurge
  
 -- 
-2.1.4
+2.11.0
 
meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch new file +80 -0

80 lines not on this page · raw message

meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch new file +46 -0

46 lines not on this page · raw message

meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch new file +33 -0
new file mode 100644
index 00000000000..cb325918764
@@ -0,0 +1,33 @@
+From ff8562f7724c4db4b83635af9e627f3495222327 Mon Sep 17 00:00:00 2001
+From: Anibal Limon <[email protected]>
+Date: Tue, 22 Aug 2017 04:41:31 -0500
+Subject: [PATCH 1/3] apt-pkg/contrib/strutl.cc: Include array header
+
+If GCC version is less than 5 the array header needs to be included
+to support std::array.
+
+After we drop debian8 and centos7 that has gcc < 5 versions this patch
+can be remove.
+
+Signed-off-by: Anibal Limon <[email protected]>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ apt-pkg/contrib/strutl.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index 60d0ca8..c2ff01d 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -27,6 +27,7 @@
+ #include <sstream>
+ #include <string>
+ #include <vector>
++#include <array>
+ 
+ #include <stddef.h>
+ #include <stdlib.h>
+-- 
+2.1.4
+
meta/recipes-devtools/apt/apt_1.2.24.bb renamed from meta/recipes-devtools/apt/apt_1.2.12.bb +0 -0
similarity index 100%
rename from meta/recipes-devtools/apt/apt_1.2.12.bb
rename to meta/recipes-devtools/apt/apt_1.2.24.bb
Signature · 1 line
2.11.0