summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-devtools/apt/apt
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 10:05:37 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-22 21:26:31 -0400
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-devtools/apt/apt
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadtalos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz
talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/apt/apt')
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch126
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch50
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch29
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch74
-rw-r--r--poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch43
-rw-r--r--poky/meta/recipes-devtools/apt/apt/disable-configure-in-makefile.patch18
-rw-r--r--poky/meta/recipes-devtools/apt/apt/disable-test.patch72
-rw-r--r--poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch14
-rw-r--r--poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch80
-rw-r--r--poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch46
-rw-r--r--poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch33
-rw-r--r--poky/meta/recipes-devtools/apt/apt/makerace.patch23
-rw-r--r--poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch28
-rw-r--r--poky/meta/recipes-devtools/apt/apt/noconfigure.patch37
-rw-r--r--poky/meta/recipes-devtools/apt/apt/nodoc.patch18
-rw-r--r--poky/meta/recipes-devtools/apt/apt/truncate-filename.patch35
-rw-r--r--poky/meta/recipes-devtools/apt/apt/use-host.patch15
17 files changed, 741 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
new file mode 100644
index 000000000..734ba00d4
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
@@ -0,0 +1,126 @@
+From dfc1370d50322e2e9d225a7a63b44993fc01a727 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Fri, 22 May 2015 08:05:15 +0800
+Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our
+ dpkg callings"
+
+Upstream-Status: Inappropriate [embedded specific]
+
+This reverts commit a2a75ff4516f7609f4c55b42270abb8d08943c60, which
+always run 'dpkg --configure -a' at the end of our dpkg callings,
+but it does not work for cross-compile, since the rootfs dir can not
+be passed into dpkg, and lead to the below similar error:
+ -------
+ |mkdir: cannot create directory '/usr/lib/opkg': Permission denied
+ -------
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ apt-pkg/deb/dpkgpm.cc | 9 ++-------
+ test/integration/test-apt-progress-fd-deb822 | 14 +++++++-------
+ test/integration/test-no-fds-leaked-to-maintainer-scripts | 6 ++----
+ 3 files changed, 11 insertions(+), 18 deletions(-)
+
+diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
+index 533d9b367..6ce81bbd9 100644
+--- a/apt-pkg/deb/dpkgpm.cc
++++ b/apt-pkg/deb/dpkgpm.cc
+@@ -1041,12 +1041,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
+ PackagesTotal++;
+ }
+ }
+- /* one extra: We don't want the progress bar to reach 100%, especially not
+- if we call dpkg --configure --pending and process a bunch of triggers
+- while showing 100%. Also, spindown takes a while, so never reaching 100%
+- is way more correct than reaching 100% while still doing stuff even if
+- doing it this way is slightly bending the rules */
+- ++PackagesTotal;
+ }
+ /*}}}*/
+ bool pkgDPkgPM::Go(int StatusFd)
+@@ -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
++ bool const SmartConf = (_config->Find("PackageManager::Configure", "all") != "all");
+ bool const TriggersPending = _config->FindB("DPkg::TriggersPending", false);
+- if (_config->FindB("DPkg::ConfigurePending", true) == true)
++ if (_config->FindB("DPkg::ConfigurePending", SmartConf) == true)
+ List.push_back(Item(Item::ConfigurePending, PkgIterator()));
+
+ // for the progress
+diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
+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)
+
+ Status: progress
+ Package: testing:amd64
+-Percent: 16.6667
++Percent: 20
+ Message: Preparing testing (amd64)
+
+ Status: progress
+ Package: testing:amd64
+-Percent: 33.3333
++Percent: 40
+ Message: Unpacking testing (amd64)
+
+ Status: progress
+ Package: testing:amd64
+-Percent: 50.0000
++Percent: 60.0000
+ Message: Preparing to configure testing (amd64)
+
+ Status: progress
+-Percent: 50.0000
++Percent: 60.0000
+ Message: Running dpkg
+
+ Status: progress
+ Package: testing:amd64
+-Percent: 50.0000
++Percent: 60.0000
+ Message: Configuring testing (amd64)
+
+ Status: progress
+ Package: testing:amd64
+-Percent: 66.6667
++Percent: 80
+ Message: Configuring testing (amd64)
+
+ Status: progress
+ Package: testing:amd64
+-Percent: 83.3333
++Percent: 100
+ Message: Installed testing (amd64)
+
+ 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 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
+ configure $PKGNAME 1.0 <none>
+ status unpacked $PKGNAME 1.0
+ status half-configured $PKGNAME 1.0
+-status installed $PKGNAME 1.0
+-startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
++status installed $PKGNAME 1.0" cut -f 3- -d' ' rootdir/var/log/dpkg.log
+ }
+ checkinstall
+
+@@ -85,8 +84,7 @@ status config-files $PKGNAME 1.0
+ status config-files $PKGNAME 1.0
+ status config-files $PKGNAME 1.0
+ status config-files $PKGNAME 1.0
+-status not-installed $PKGNAME <none>
+-startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log
++status not-installed $PKGNAME <none>" cut -f 3- -d' ' rootdir/var/log/dpkg.log
+ }
+ checkpurge
+
+--
+2.11.0
+
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch b/poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
new file mode 100644
index 000000000..f7ac19bfd
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch
@@ -0,0 +1,50 @@
+From 33b97e089d4a98d3acd20bd78337dd915b989bc2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Fri, 5 Aug 2016 15:24:27 -0500
+Subject: [PATCH] apt 1.2.12: Fix musl build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+methods/connect.cc: Musl doesn't support AI_IDN flag in netdb.h
+header so define it manually.
+apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h
+to avoid errors in types u_int_SIZE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+---
+ apt-pkg/contrib/srvrec.h | 1 +
+ methods/connect.cc | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
+index 01b8102..15b6875 100644
+--- a/apt-pkg/contrib/srvrec.h
++++ b/apt-pkg/contrib/srvrec.h
+@@ -9,6 +9,7 @@
+ #ifndef SRVREC_H
+ #define SRVREC_H
+
++#include <sys/types.h>
+ #include <arpa/nameser.h>
+ #include <vector>
+ #include <string>
+diff --git a/methods/connect.cc b/methods/connect.cc
+index 07a730b..bb0ab5a 100644
+--- a/methods/connect.cc
++++ b/methods/connect.cc
+@@ -33,6 +33,9 @@
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netdb.h>
++#ifndef AI_IDN
++#define AI_IDN 0x0040
++#endif
+
+ #include "connect.h"
+ #include "rfc2553emu.h"
+--
+2.1.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch b/poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
new file mode 100644
index 000000000..042372b51
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
@@ -0,0 +1,29 @@
+From 2f8aa21ace375c18977ed908b291c80a210a93c6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 08:06:12 +0000
+Subject: [PATCH] environment.mak: musl based systems can generate shared
+ objects too
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ buildlib/environment.mak.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
+index b0a8d9d..3a52344 100644
+--- a/buildlib/environment.mak.in
++++ b/buildlib/environment.mak.in
+@@ -68,7 +68,7 @@ NEED_SOCKLEN_T_DEFINE = @NEED_SOCKLEN_T_DEFINE@
+
+ # Shared library things
+ HOST_OS = @host_os@
+-ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu,$(HOST_OS))),0)
++ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu linux-musl%,$(HOST_OS))),0)
+ SONAME_MAGIC=-Wl,-soname -Wl,
+ LFLAGS_SO=
+ else
+--
+2.6.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch b/poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
new file mode 100644
index 000000000..3ac92462c
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch
@@ -0,0 +1,74 @@
+From 53c5d0982f03fd0e24c4195d6e1e42b9ade9d500 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Wed, 27 May 2015 14:30:28 +0800
+Subject: [PATCH] fix the gcc version check
+
+Upstream-Status: pending
+
+"GCC diagnostic push" is gcc 4.6 feature, gcc 4.4.7 on centos did not know it
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ apt-pkg/contrib/macros.h | 2 +-
+ apt-pkg/deb/debsrcrecords.cc | 4 ++--
+ apt-pkg/srcrecords.cc | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h
+index 2727fd8..0ecae50 100644
+--- a/apt-pkg/contrib/macros.h
++++ b/apt-pkg/contrib/macros.h
+@@ -136,7 +136,7 @@
+ #endif
+ #endif
+
+-#if __GNUC__ >= 4
++#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
+ #define APT_IGNORE_DEPRECATED_PUSH \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
+diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc
+index e8295de..40160b2 100644
+--- a/apt-pkg/deb/debsrcrecords.cc
++++ b/apt-pkg/deb/debsrcrecords.cc
+@@ -139,13 +139,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F)
+ for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2)
+ {
+ pkgSrcRecords::File2 f;
+-#if __GNUC__ >= 4
++#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ #endif
+ f.MD5Hash = f2->MD5Hash;
+ f.Size = f2->Size;
+-#if __GNUC__ >= 4
++#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
+ #pragma GCC diagnostic pop
+ #endif
+ f.Path = f2->Path;
+diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc
+index 53d7e60..1484828 100644
+--- a/apt-pkg/srcrecords.cc
++++ b/apt-pkg/srcrecords.cc
+@@ -157,7 +157,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
+ for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f)
+ {
+ pkgSrcRecords::File2 f2;
+-#if __GNUC__ >= 4
++#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ #endif
+@@ -165,7 +165,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/
+ f2.Size = f->Size;
+ f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash));
+ f2.FileSize = f->Size;
+-#if __GNUC__ >= 4
++#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__)
+ #pragma GCC diagnostic pop
+ #endif
+ f2.Path = f->Path;
+--
+2.1.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch b/poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
new file mode 100644
index 000000000..47870e3c8
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch
@@ -0,0 +1,43 @@
+From 9fdf50d63df08ee65e7d8e62c35f19ac4841bca9 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Wed, 27 May 2015 09:48:45 +0800
+Subject: [PATCH] remove Wsuggest-attribute from CXXFLAGS
+
+Upstream-Status: Inappropriate
+
+Wsuggest-attribute is GCC 4.6 feature, centos6 is using GCC
+4.4.7 which unknown this flag, so remove it from CXXFLAGS
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ buildlib/environment.mak.in | 1 -
+ test/libapt/makefile | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
+index 9620722..c344d01 100644
+--- a/buildlib/environment.mak.in
++++ b/buildlib/environment.mak.in
+@@ -14,7 +14,6 @@ CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra
+ CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations
+ CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-include-dirs -Wnoexcept -Wsign-promo -Wundef
+ # suggests methods which already have such an attribute
+-#CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn
+ # sanitize options to be enabled for testing
+ #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
+ # a bit too pedantic to be run by default
+diff --git a/test/libapt/makefile b/test/libapt/makefile
+index 5ff9cf6..c5b5190 100644
+--- a/test/libapt/makefile
++++ b/test/libapt/makefile
+@@ -40,7 +40,6 @@ CXXFLAGS += -pthread
+ # disable some flags for gtest again
+ CXXFLAGS+= -Wno-missing-declarations
+ CXXFLAGS+= -Wno-missing-field-initializers
+-CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn
+ CXXFLAGS+= -Wno-undef
+
+ # All Google Test headers. Usually you shouldn't change this definition.
+--
+2.1.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/disable-configure-in-makefile.patch b/poky/meta/recipes-devtools/apt/apt/disable-configure-in-makefile.patch
new file mode 100644
index 000000000..7c2f64e3e
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/disable-configure-in-makefile.patch
@@ -0,0 +1,18 @@
+Disable configure at compilation stage
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Index: apt-0.9.7.7/Makefile
+===================================================================
+--- apt-0.9.7.7.orig/Makefile
++++ apt-0.9.7.7/Makefile
+@@ -33,7 +33,7 @@ veryclean: clean
+ # The startup target builds the necessary configure scripts. It should
+ # be used after a CVS checkout.
+ CONVERTED=environment.mak include/config.h include/apti18n.h build/doc/Doxyfile makefile
+-include buildlib/configure.mak
++#include buildlib/configure.mak
+ $(BUILDDIR)/include/config.h: buildlib/config.h.in
+ $(BUILDDIR)/include/apti18n.h: buildlib/apti18n.h.in
+ $(BUILDDIR)/environment.mak: buildlib/environment.mak.in
diff --git a/poky/meta/recipes-devtools/apt/apt/disable-test.patch b/poky/meta/recipes-devtools/apt/apt/disable-test.patch
new file mode 100644
index 000000000..d16b5c771
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/disable-test.patch
@@ -0,0 +1,72 @@
+From 67bc7948e0a721c75d636931abc105da5dcb0763 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Thu, 26 May 2016 15:32:11 -0500
+Subject: [PATCH] [PATCH] disable test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [configuration]
+
+test needs gtest package, so not build the test dir
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+---
+ Makefile | 9 +++------
+ configure.ac | 7 -------
+ 2 files changed, 3 insertions(+), 13 deletions(-)
+
+Index: apt-1.2.24/Makefile
+===================================================================
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
+@@ -9,8 +9,8 @@ endif
+ .PHONY: default
+ default: startup all
+
+-.PHONY: fast headers library clean veryclean all binary program doc test update-po
+-all headers library clean veryclean binary program doc manpages docbook test update-po startup dirs:
++.PHONY: fast headers library clean veryclean all binary program doc update-po
++all headers library clean veryclean binary program doc manpages docbook update-po startup dirs:
+ $(MAKE) -C vendor $@
+ $(MAKE) -C apt-pkg $@
+ $(MAKE) -C apt-inst $@
+@@ -21,8 +21,6 @@ all headers library clean veryclean bina
+ $(MAKE) -C dselect $@
+ # $(MAKE) -C doc $@
+ $(MAKE) -C po $@
+- # FIXME: -C test has issue swith parallel builds, investigate!
+- -$(MAKE) -C test $@
+
+ fast:
+ $(MAKE) -C vendor all
+@@ -32,9 +30,8 @@ fast:
+ $(MAKE) -C methods all
+ $(MAKE) -C cmdline all
+ $(MAKE) -C ftparchive all
+- $(MAKE) -C test all
+
+-all headers library clean veryclean binary program doc manpages docbook test update-po: startup dirs
++all headers library clean veryclean binary program doc manpages docbook update-po: startup dirs
+
+ dirs: startup
+
+Index: apt-1.2.24/configure.ac
+===================================================================
+--- apt-1.2.24.orig/configure.ac
++++ apt-1.2.24/configure.ac
+@@ -90,13 +90,6 @@ AC_CHECK_LIB(curl, curl_easy_init,
+ AC_MSG_ERROR([failed: I need CURL due https support]),
+ )
+
+-AC_LANG_PUSH([C++])
+-AC_CHECK_HEADER(gtest/gtest.h,,
+- AC_MSG_WARN([failed: I need gtest (packaged as libgtest-dev) for unit testing]),
+-)
+-AC_LANG_POP([C++])
+-
+-
+ AC_SUBST(BDBLIB)
+
+ HAVE_ZLIB=no
diff --git a/poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch b/poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
new file mode 100644
index 000000000..899c6ef2f
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Pending
+
+Index: apt-1.2.24/apt-pkg/contrib/weakptr.h
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/contrib/weakptr.h
++++ apt-1.2.24/apt-pkg/contrib/weakptr.h
+@@ -21,6 +21,7 @@
+ #ifndef WEAK_POINTER_H
+ #define WEAK_POINTER_H
+
++#include <cstdlib>
+ #include <set>
+ #include <stddef.h>
+
diff --git a/poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch b/poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
new file mode 100644
index 000000000..438de209a
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
@@ -0,0 +1,80 @@
+From 7ef2b2dba0e0bee450da3c8450ea782a3e7d6429 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 22 Aug 2017 11:49:01 -0500
+Subject: [PATCH 3/3] Revert "avoid changing the global LC_TIME for Release
+ writing"
+
+This reverts commit 78e7b683c645e907db12658405a4b201a6243ea8.
+
+After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
+versions this patch can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ ftparchive/writer.cc | 29 +++++++++++++++++------------
+ 1 file changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
+index 2596382..e43a643 100644
+--- a/ftparchive/writer.cc
++++ b/ftparchive/writer.cc
+@@ -37,7 +37,6 @@
+ #include <unistd.h>
+ #include <ctime>
+ #include <iostream>
+-#include <iomanip>
+ #include <sstream>
+ #include <memory>
+ #include <utility>
+@@ -984,29 +983,35 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) :
+ AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
+
+ time_t const now = time(NULL);
+- auto const posix = std::locale("C.UTF-8");
+
+- // FIXME: use TimeRFC1123 here? But that uses GMT to satisfy HTTP/1.1
+- std::ostringstream datestr;
+- datestr.imbue(posix);
+- datestr << std::put_time(gmtime(&now), "%a, %d %b %Y %H:%M:%S UTC");
++ setlocale(LC_TIME, "C");
++
++ char datestr[128];
++ if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC",
++ gmtime(&now)) == 0)
++ {
++ datestr[0] = '\0';
++ }
+
+ time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0);
+- std::ostringstream validstr;
+- if (validuntil != now)
++ char validstr[128];
++ if (now == validuntil ||
++ strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC",
++ gmtime(&validuntil)) == 0)
+ {
+- datestr.imbue(posix);
+- validstr << std::put_time(gmtime(&validuntil), "%a, %d %b %Y %H:%M:%S UTC");
++ validstr[0] = '\0';
+ }
+
++ setlocale(LC_TIME, "");
++
+ map<string,string> Fields;
+ Fields["Origin"] = "";
+ Fields["Label"] = "";
+ Fields["Suite"] = "";
+ Fields["Version"] = "";
+ Fields["Codename"] = "";
+- Fields["Date"] = datestr.str();
+- Fields["Valid-Until"] = validstr.str();
++ Fields["Date"] = datestr;
++ Fields["Valid-Until"] = validstr;
+ Fields["Architectures"] = "";
+ Fields["Components"] = "";
+ Fields["Description"] = "";
+--
+2.1.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch b/poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
new file mode 100644
index 000000000..088a66a3c
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
@@ -0,0 +1,46 @@
+From c72ef9b6ae83a0a2fbbefd5c050335f65f0d2bc9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
+Date: Tue, 22 Aug 2017 11:48:46 -0500
+Subject: [PATCH 2/3] Revert "use de-localed std::put_time instead rolling our
+ own"
+
+This reverts commit 4ed2a17ab4334f019c00512aa54a162f0bf083c4.
+
+After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
+versions this patch can be remove.
+
+Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ apt-pkg/contrib/strutl.cc | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+index c2ff01d..e9ef2be 100644
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -760,11 +760,15 @@ string TimeRFC1123(time_t Date)
+ if (gmtime_r(&Date, &Conv) == NULL)
+ return "";
+
+- auto const posix = std::locale::classic();
+- std::ostringstream datestr;
+- datestr.imbue(posix);
+- datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT");
+- return datestr.str();
++ char Buf[300];
++ const char *Day[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
++ const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul",
++ "Aug","Sep","Oct","Nov","Dec"};
++
++ snprintf(Buf, sizeof(Buf), "%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday],
++ Conv.tm_mday,Month[Conv.tm_mon],Conv.tm_year+1900,Conv.tm_hour,
++ Conv.tm_min,Conv.tm_sec);
++ return Buf;
+ }
+ /*}}}*/
+ // ReadMessages - Read messages from the FD /*{{{*/
+--
+2.1.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch b/poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
new file mode 100644
index 000000000..cb3259187
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
@@ -0,0 +1,33 @@
+From ff8562f7724c4db4b83635af9e627f3495222327 Mon Sep 17 00:00:00 2001
+From: Anibal Limon <limon.anibal@gmail.com>
+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 <limon.anibal@gmail.com>
+
+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
+
diff --git a/poky/meta/recipes-devtools/apt/apt/makerace.patch b/poky/meta/recipes-devtools/apt/apt/makerace.patch
new file mode 100644
index 000000000..0c686d6e2
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/makerace.patch
@@ -0,0 +1,23 @@
+I was seeing various issues with parallel make, mainly due to to what was likely
+partially installed headers. If you change into the source directory and
+"NOISY=1 make ../obj/apt-pkg/sourcelist.opic" in apt-pkg, you'll see it
+doesn't have any dependencies on the headers being installed. This patch
+fixes that so things build correctly.
+
+RP 2012/3/19
+
+Upstream-Status: Pending
+
+Index: apt-1.2.24/buildlib/library.mak
+===================================================================
+--- apt-1.2.24.orig/buildlib/library.mak
++++ apt-1.2.24/buildlib/library.mak
+@@ -65,7 +65,7 @@ $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR
+
+ # Compilation rules
+ vpath %.cc $(SUBDIRS)
+-$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS)
++$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) $($(LOCAL)-HEADERS)
+ echo Compiling $< to $@
+ $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXSTD) $(CXXFLAGS) $(PICFLAGS) -o $@ '$(abspath $<)'
+ $(DoDep)
diff --git a/poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch b/poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
new file mode 100644
index 000000000..98b6c96ca
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+Index: apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+===================================================================
+--- apt-1.2.24.orig/apt-pkg/deb/dpkgpm.cc
++++ apt-1.2.24/apt-pkg/deb/dpkgpm.cc
+@@ -54,6 +54,12 @@
+ #include <apti18n.h>
+ /*}}}*/
+
++#ifdef USE_NLS
++#define _dpkg(x) dgettext("dpkg", x)
++#else
++#define _dpkg(x) x
++#endif
++
+ using namespace std;
+
+ APT_PURE static string
+@@ -1703,7 +1709,7 @@ void pkgDPkgPM::WriteApportReport(const
+ }
+
+ // check if its not a follow up error
+- const char *needle = dgettext("dpkg", "dependency problems - leaving unconfigured");
++ const char *needle = _dpkg("dependency problems - leaving unconfigured");
+ if(strstr(errormsg, needle) != NULL) {
+ std::clog << _("No apport report written because the error message indicates its a followup error from a previous failure.") << std::endl;
+ return;
diff --git a/poky/meta/recipes-devtools/apt/apt/noconfigure.patch b/poky/meta/recipes-devtools/apt/apt/noconfigure.patch
new file mode 100644
index 000000000..ebc67203b
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/noconfigure.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+
+diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
+index 249542c..0a1911f 100644
+--- a/apt-pkg/packagemanager.cc
++++ b/apt-pkg/packagemanager.cc
+@@ -952,10 +952,12 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
+ return false;
+
+ if (Immediate == true) {
++#if 0
+ // Perform immedate configuration of the package.
+ if (SmartConfigure(Pkg, Depth + 1) == false)
+ _error->Error(_("Could not perform immediate configuration on '%s'. "
+ "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.FullName().c_str(),2);
++#endif
+ }
+
+ return true;
+@@ -1038,6 +1040,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
+ }
+ }
+
++#if 0
+ // Final run through the configure phase
+ if (ConfigureAll() == false)
+ return Failed;
+@@ -1052,6 +1055,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall()
+ return Failed;
+ }
+ }
++#endif
+
+ return Completed;
+ }
diff --git a/poky/meta/recipes-devtools/apt/apt/nodoc.patch b/poky/meta/recipes-devtools/apt/apt/nodoc.patch
new file mode 100644
index 000000000..78cf53884
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/nodoc.patch
@@ -0,0 +1,18 @@
+Disable documentation
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Index: apt-1.2.24/Makefile
+===================================================================
+--- apt-1.2.24.orig/Makefile
++++ apt-1.2.24/Makefile
+@@ -19,7 +19,7 @@ all headers library clean veryclean bina
+ $(MAKE) -C cmdline $@
+ $(MAKE) -C ftparchive $@
+ $(MAKE) -C dselect $@
+- $(MAKE) -C doc $@
++# $(MAKE) -C doc $@
+ $(MAKE) -C po $@
+ # FIXME: -C test has issue swith parallel builds, investigate!
+ -$(MAKE) -C test $@
diff --git a/poky/meta/recipes-devtools/apt/apt/truncate-filename.patch b/poky/meta/recipes-devtools/apt/apt/truncate-filename.patch
new file mode 100644
index 000000000..db1c42b66
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/truncate-filename.patch
@@ -0,0 +1,35 @@
+strutl.cc: the filename can't be longer than 255
+
+The URItoFileName translates the path into the filename, but the
+filename can't be longer than 255 according to
+/usr/include/linux/limits.h.
+
+Truncate it when it is longer than 240 (leave some spaces for
+".Packages" and "._Release" suffix)
+
+Upstream-Status: Pending
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ apt-pkg/contrib/strutl.cc | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
+--- a/apt-pkg/contrib/strutl.cc
++++ b/apt-pkg/contrib/strutl.cc
+@@ -399,7 +399,12 @@ string URItoFileName(const string &URI)
+ // "\x00-\x20{}|\\\\^\\[\\]<>\"\x7F-\xFF";
+ string NewURI = QuoteString(U,"\\|{}[]<>\"^~_=!@#$%^&*");
+ replace(NewURI.begin(),NewURI.end(),'/','_');
+- return NewURI;
++
++ // Truncate from the head when it is longer than 240
++ if(NewURI.length() > 240)
++ return NewURI.substr(NewURI.length() - 240, NewURI.length() - 1);
++ else
++ return NewURI;
+ }
+ /*}}}*/
+ // Base64Encode - Base64 Encoding routine for short strings /*{{{*/
+--
+1.7.10.4
+
diff --git a/poky/meta/recipes-devtools/apt/apt/use-host.patch b/poky/meta/recipes-devtools/apt/apt/use-host.patch
new file mode 100644
index 000000000..b30fcff0d
--- /dev/null
+++ b/poky/meta/recipes-devtools/apt/apt/use-host.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Index: apt-0.9.7.7/configure.ac
+===================================================================
+--- apt-0.9.7.7.orig/configure.ac
++++ apt-0.9.7.7/configure.ac
+@@ -112,7 +112,7 @@ dnl This is often the dpkg architecture
+ dnl First check against the full canonical canoncial-system-type in $target
+ dnl and if that fails, just look for the cpu
+ AC_MSG_CHECKING(debian architecture)
+-archset="`dpkg-architecture -qDEB_HOST_ARCH`"
++archset="`echo $host_alias|cut -d'-' -f1`"
+ if test "x$archset" = "x"; then
+ AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
+ fi
OpenPOWER on IntegriCloud