diff options
Diffstat (limited to 'meta/recipes-devtools/apt')
25 files changed, 524 insertions, 101 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/no-ko-translation.patch b/meta/recipes-devtools/apt/apt-0.9.7.8/no-ko-translation.patch deleted file mode 100644 index 7aa408f19e..0000000000 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/no-ko-translation.patch +++ /dev/null @@ -1,11 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - ---- - po/LINGUAS | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/po/LINGUAS -+++ b/po/LINGUAS -@@ -1 +1 @@ --ar ast bg bs ca cs cy da de dz el es eu fi fr gl hu it ja km ko ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW -+ar ast bg bs ca cs cy da de dz el es eu fi fr gl hu it ja km ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc index 294ca94096..68f1b3ce2c 100644 --- a/meta/recipes-devtools/apt/apt-native.inc +++ b/meta/recipes-devtools/apt/apt-native.inc @@ -1,11 +1,15 @@ require apt.inc inherit native -DEPENDS += "dpkg-native gettext-native" +DEPENDS += "dpkg-native gettext-native db-native curl-native xz-native" PACKAGES = "" USE_NLS = "yes" -SRC_URI += "file://db_linking_hack.patch" +SRC_URI += "file://db_linking_hack.patch \ + file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ + file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \ + file://0001-fix-the-gcc-version-check.patch \ +" python do_install () { bb.build.exec_func('do_install_base', d) @@ -13,20 +17,20 @@ python do_install () { } python do_install_config () { - indir = os.path.dirname(d.getVar('FILE',1)) - infile = file(oe.path.join(indir, 'files', 'apt.conf'), 'r') + indir = os.path.dirname(d.getVar('FILE')) + infile = open(oe.path.join(indir, 'files', 'apt.conf'), 'r') data = infile.read() infile.close() data = d.expand(data) - outdir = oe.path.join(d.getVar('D', True), d.getVar('sysconfdir', True), 'apt') + outdir = oe.path.join(d.getVar('D'), d.getVar('sysconfdir'), 'apt') if not os.path.exists(outdir): os.makedirs(outdir) outpath = oe.path.join(outdir, 'apt.conf.sample') if not os.path.exists(outpath): - outfile = file(outpath, 'w') + outfile = open(outpath, 'w') outfile.write(data) outfile.close() } @@ -39,13 +43,12 @@ do_install_base () { install -m 0755 bin/apt-cache ${D}${bindir}/ install -m 0755 bin/apt-sortpkgs ${D}${bindir}/ install -m 0755 bin/apt-extracttemplates ${D}${bindir}/ + install -m 0755 bin/apt-ftparchive ${D}${bindir}/ + + oe_libinstall -so -C bin libapt-private ${D}${libdir}/ - eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` - eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'` oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ - ln -sf libapt-pkg$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-pkg.so oe_libinstall -so -C bin libapt-inst$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ - ln -sf libapt-inst$GLIBC_VER$LIBSTDCPP_VER.so ${D}${libdir}/libapt-inst.so install -d ${D}${libdir}/apt/methods install -m 0755 bin/methods/* ${D}${libdir}/apt/methods/ diff --git a/meta/recipes-devtools/apt/apt-native_0.9.7.8.bb b/meta/recipes-devtools/apt/apt-native_0.9.7.8.bb deleted file mode 100644 index 000a18d8d9..0000000000 --- a/meta/recipes-devtools/apt/apt-native_0.9.7.8.bb +++ /dev/null @@ -1,9 +0,0 @@ -require apt-native.inc - -SRC_URI += "file://noconfigure.patch \ - file://no-curl.patch" - -SRC_URI[md5sum] = "d44f459d59d8fa7fc5f455f1f982f08c" -SRC_URI[sha256sum] = "9570905992f4a83b0c182f11f9e0a8c20a1209a52996d1a01ddbfa359ae2c819" - -LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" diff --git a/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/meta/recipes-devtools/apt/apt-native_1.2.12.bb new file mode 100644 index 0000000000..1e660da74b --- /dev/null +++ b/meta/recipes-devtools/apt/apt-native_1.2.12.bb @@ -0,0 +1,4 @@ +require apt-native.inc + +SRC_URI += "file://noconfigure.patch \ + file://no-curl.patch" diff --git a/meta/recipes-devtools/apt/apt-package.inc b/meta/recipes-devtools/apt/apt-package.inc index 0897d3a9fc..6a01f99c63 100644 --- a/meta/recipes-devtools/apt/apt-package.inc +++ b/meta/recipes-devtools/apt/apt-package.inc @@ -32,16 +32,23 @@ FILES_${PN} = "${bindir}/apt-cdrom ${bindir}/apt-get \ ${bindir}/apt-config ${bindir}/apt-cache \ ${libdir}/apt ${libdir}/libapt*.so.* \ ${localstatedir} ${sysconfdir} \ - ${libdir}/dpkg" + ${libdir}/dpkg \ + ${systemd_unitdir}/system \ + " FILES_${PN}-utils = "${bindir}/apt-sortpkgs ${bindir}/apt-extracttemplates" -FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages', True))} \ +FILES_${PN}-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-manpages'))} \ ${docdir}/apt" -FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages', True))}" +FILES_${PN}-utils-doc = "${@get_files_apt_doc(d, bb, d.getVar('apt-utils-manpages'))}" FILES_${PN}-dev = "${libdir}/libapt*.so ${includedir}" +inherit systemd + +SYSTEMD_SERVICE_${PN} = "apt-daily.timer" + do_install () { set -x install -d ${D}${bindir} + install -m 0755 bin/apt-key ${D}${bindir}/ install -m 0755 bin/apt-cdrom ${D}${bindir}/ install -m 0755 bin/apt-get ${D}${bindir}/ install -m 0755 bin/apt-config ${D}${bindir}/ @@ -74,4 +81,13 @@ do_install () { install -d ${D}${includedir}/apt-pkg/ install -m 0644 include/apt-pkg/*.h ${D}${includedir}/apt-pkg/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/debian/apt.systemd.daily ${D}${libdir}/apt/ + install -m 0644 ${S}/debian/apt-daily.service ${D}${systemd_unitdir}/system/ + sed -i 's#/usr/lib/apt/#${libdir}/apt/#g' ${D}${systemd_unitdir}/system/apt-daily.service + install -m 0644 ${S}/debian/apt-daily.timer ${D}${systemd_unitdir}/system/ + install -d ${D}${sysconfdir}/cron.daily/ + install -m 0755 ${S}/debian/apt.apt-compat.cron.daily ${D}${sysconfdir}/cron.daily/ + sed -i 's#/usr/lib/apt/#${libdir}/apt/#g' ${D}${sysconfdir}/cron.daily/apt.apt-compat.cron.daily } diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc index 83411a968a..3026370844 100644 --- a/meta/recipes-devtools/apt/apt.inc +++ b/meta/recipes-devtools/apt/apt.inc @@ -1,9 +1,8 @@ -DESCRIPTION = "Advanced front-end for dpkg." +SUMMARY = "Advanced front-end for dpkg" LICENSE = "GPLv2.0+" SECTION = "base" -SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \ - file://no-ko-translation.patch \ +SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ file://use-host.patch \ file://makerace.patch \ file://no-nls-dpkg.patch \ @@ -11,9 +10,19 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/apt_${PV}.tar.gz \ file://truncate-filename.patch \ file://nodoc.patch \ file://disable-configure-in-makefile.patch \ + file://disable-test.patch \ + 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" -inherit autotools gettext +# 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 +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" + +inherit autotools gettext useradd EXTRA_AUTORECONF = "--exclude=autopoint,autoheader" @@ -22,16 +31,5 @@ do_configure_prepend() { rm -rf ${S}/buildlib/config.guess } -# Apt wants to know the glibc version by running a binary file, which will -# fail, so we have to tell configure which version to use Since I don't know -# the impliations of setting a wrong value I only provide one for angstrom, -# which uses glibc 2.5 (which claims to be 2.4) -# Koen - 20070327 -EXTRA_OECONF_append_angstrom = " ac_cv_glibc_ver=libc6.4" - -# under Debian it is set to libc6.3 as they use glibc 2.3 -# They also provide glibc 2.5 in 'experimental' and it works with APT built -# for 2.3 so we set it in same way -EXTRA_OECONF_append = " ac_cv_glibc_ver=libc6.3" - -FILES_${PN}-dbg += "${libdir}/apt/methods/.debug/" +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /nonexistent --shell /bin/false --user-group _apt" diff --git a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch new file mode 100644 index 0000000000..b3a883bae8 --- /dev/null +++ b/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 834cb0e..84ded3a 100644 +--- a/apt-pkg/deb/dpkgpm.cc ++++ b/apt-pkg/deb/dpkgpm.cc +@@ -1037,12 +1037,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) +@@ -1250,8 +1244,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 58fd732..3359762 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 ++Percent: 60 + Message: Preparing to configure testing (amd64) + + Status: progress +-Percent: 50 ++Percent: 60 + Message: Running dpkg + + Status: progress + Package: testing:amd64 +-Percent: 50 ++Percent: 60 + 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 d86e638..ef6d23b 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.1.4 + diff --git a/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch b/meta/recipes-devtools/apt/apt/0001-apt-1.2.12-Fix-musl-build.patch new file mode 100644 index 0000000000..04b0406583 --- /dev/null +++ b/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/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch b/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch new file mode 100644 index 0000000000..042372b515 --- /dev/null +++ b/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/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch b/meta/recipes-devtools/apt/apt/0001-fix-the-gcc-version-check.patch new file mode 100644 index 0000000000..3ac92462c5 --- /dev/null +++ b/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/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch b/meta/recipes-devtools/apt/apt/0001-remove-Wsuggest-attribute-from-CFLAGS.patch new file mode 100644 index 0000000000..47870e3c8b --- /dev/null +++ b/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/meta/recipes-devtools/apt/apt-0.9.7.8/disable-configure-in-makefile.patch b/meta/recipes-devtools/apt/apt/disable-configure-in-makefile.patch index 7c2f64e3e6..7c2f64e3e6 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/disable-configure-in-makefile.patch +++ b/meta/recipes-devtools/apt/apt/disable-configure-in-makefile.patch diff --git a/meta/recipes-devtools/apt/apt/disable-test.patch b/meta/recipes-devtools/apt/apt/disable-test.patch new file mode 100644 index 0000000000..0532671747 --- /dev/null +++ b/meta/recipes-devtools/apt/apt/disable-test.patch @@ -0,0 +1,75 @@ +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(-) + +diff --git a/Makefile b/Makefile +index 7680f08..69527a5 100644 +--- a/Makefile ++++ b/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 binary program doc manpages docbook test upd + $(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 + +diff --git a/configure.ac b/configure.ac +index 1f05da5..e47f459 100644 +--- a/configure.ac ++++ b/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 +-- +2.1.4 + diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/fix-gcc-4.6-null-not-defined.patch b/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch index 70ecd95096..801ae6dddb 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/fix-gcc-4.6-null-not-defined.patch +++ b/meta/recipes-devtools/apt/apt/fix-gcc-4.6-null-not-defined.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/apt-pkg/contrib/weakptr.h +++ b/apt-pkg/contrib/weakptr.h @@ -21,6 +21,7 @@ diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/makerace.patch b/meta/recipes-devtools/apt/apt/makerace.patch index 403711f013..46e3161b67 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/makerace.patch +++ b/meta/recipes-devtools/apt/apt/makerace.patch @@ -8,16 +8,16 @@ RP 2012/3/19 Upstream-Status: Pending -Index: apt-0.7.14/buildlib/library.mak +Index: apt-0.9.9.4/buildlib/library.mak =================================================================== ---- apt-0.7.14.orig/buildlib/library.mak -+++ apt-0.7.14/buildlib/library.mak -@@ -61,7 +61,7 @@ $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR +--- apt-0.9.9.4.orig/buildlib/library.mak 2013-07-31 15:45:07.320440575 +0300 ++++ apt-0.9.9.4/buildlib/library.mak 2013-07-31 15:46:49.440440561 +0300 +@@ -61,7 +61,7 @@ # Compilation rules vpath %.cc $(SUBDIRS) --$(OBJ)/%.opic: %.cc -+$(OBJ)/%.opic: %.cc $($(LOCAL)-HEADERS) +-$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) ++$(OBJ)/%.opic: %.cc $(LIBRARYDEPENDS) $($(LOCAL)-HEADERS) echo Compiling $< to $@ $(CXX) -c $(INLINEDEPFLAG) $(CPPFLAGS) $(CXXFLAGS) $(PICFLAGS) -o $@ $< $(DoDep) diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/no-nls-dpkg.patch b/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch index f1dd5fd05b..a0996d4d44 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/no-nls-dpkg.patch +++ b/meta/recipes-devtools/apt/apt/no-nls-dpkg.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -42,6 +42,12 @@ diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/noconfigure.patch b/meta/recipes-devtools/apt/apt/noconfigure.patch index 712d5e7296..ebc67203b4 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/noconfigure.patch +++ b/meta/recipes-devtools/apt/apt/noconfigure.patch @@ -1,24 +1,25 @@ Upstream-Status: Inappropriate [configuration] Signed-off-by: Constantin Musca <constantinx.musca@intel.com> -Index: apt-0.9.7.7/apt-pkg/packagemanager.cc -=================================================================== ---- apt-0.9.7.7.orig/apt-pkg/packagemanager.cc -+++ apt-0.9.7.7/apt-pkg/packagemanager.cc -@@ -893,10 +893,12 @@ bool pkgPackageManager::SmartUnPack(PkgI + +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->Warning(_("Could not perform immediate configuration on '%s'. " + _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; -@@ -986,6 +988,7 @@ pkgPackageManager::OrderResult pkgPackag +@@ -1038,6 +1040,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() } } @@ -26,7 +27,7 @@ Index: apt-0.9.7.7/apt-pkg/packagemanager.cc // Final run through the configure phase if (ConfigureAll() == false) return Failed; -@@ -1000,6 +1003,7 @@ pkgPackageManager::OrderResult pkgPackag +@@ -1052,6 +1055,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() return Failed; } } diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/nodoc.patch b/meta/recipes-devtools/apt/apt/nodoc.patch index 449e42df4a..449e42df4a 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/nodoc.patch +++ b/meta/recipes-devtools/apt/apt/nodoc.patch diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch b/meta/recipes-devtools/apt/apt/truncate-filename.patch index db1c42b66c..db1c42b66c 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/truncate-filename.patch +++ b/meta/recipes-devtools/apt/apt/truncate-filename.patch diff --git a/meta/recipes-devtools/apt/apt-0.9.7.8/use-host.patch b/meta/recipes-devtools/apt/apt/use-host.patch index f7eaaedf8d..b30fcff0d6 100644 --- a/meta/recipes-devtools/apt/apt-0.9.7.8/use-host.patch +++ b/meta/recipes-devtools/apt/apt/use-host.patch @@ -1,7 +1,9 @@ -Index: apt-0.9.7.7/configure.in +Upstream-Status: Pending + +Index: apt-0.9.7.7/configure.ac =================================================================== ---- apt-0.9.7.7.orig/configure.in -+++ apt-0.9.7.7/configure.in +--- 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 diff --git a/meta/recipes-devtools/apt/apt_0.9.7.8.bb b/meta/recipes-devtools/apt/apt_0.9.7.8.bb deleted file mode 100644 index 9653ee9a51..0000000000 --- a/meta/recipes-devtools/apt/apt_0.9.7.8.bb +++ /dev/null @@ -1,18 +0,0 @@ -DEPENDS = "curl db" -RDEPENDS_${PN} = "dpkg" -LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" -require apt.inc - -SRC_URI[md5sum] = "d44f459d59d8fa7fc5f455f1f982f08c" -SRC_URI[sha256sum] = "9570905992f4a83b0c182f11f9e0a8c20a1209a52996d1a01ddbfa359ae2c819" - -require apt-package.inc - -FILES_${PN} += "${bindir}/apt-key" -apt-manpages += "doc/apt-key.8" - -do_install_append() { - #Write the correct apt-architecture to apt.conf - APT_CONF=${D}/etc/apt/apt.conf - echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} -} diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.12.bb new file mode 100644 index 0000000000..ae0bce933d --- /dev/null +++ b/meta/recipes-devtools/apt/apt_1.2.12.bb @@ -0,0 +1,20 @@ +DEPENDS = "curl db zlib" +RDEPENDS_${PN} = "dpkg bash debianutils" +require apt.inc + +require apt-package.inc + +PACKAGECONFIG ??= "lzma" +PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz" +PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2" +PACKAGECONFIG[lz4] = "ac_cv_lib_lz4_LZ4F_createCompressionContext=yes,ac_cv_lib_lz4_LZ4F_createCompressionContext=no,lz4" + +FILES_${PN} += "${bindir}/apt-key" +apt-manpages += "doc/apt-key.8" + +do_install_append() { + #Write the correct apt-architecture to apt.conf + APT_CONF=${D}/etc/apt/apt.conf + echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} + oe_libinstall -so -C bin libapt-private ${D}${libdir}/ +} diff --git a/meta/recipes-devtools/apt/files/apt.conf b/meta/recipes-devtools/apt/files/apt.conf index 5c20ea43e6..03351356bc 100644 --- a/meta/recipes-devtools/apt/files/apt.conf +++ b/meta/recipes-devtools/apt/files/apt.conf @@ -2,7 +2,7 @@ Dir "${STAGING_DIR_NATIVE}/" { State "var/lib/apt/" { - Lists "lists/"; + Lists "#APTCONF#/lists/"; status "#ROOTFS#/var/lib/dpkg/status"; }; Cache "var/cache/apt/" @@ -21,7 +21,7 @@ Dir "${STAGING_DIR_NATIVE}/" apt-get "apt-get"; apt-cache "apt-cache"; }; - Etc "etc/apt/" + Etc "#APTCONF#" { Preferences "preferences"; }; diff --git a/meta/recipes-devtools/apt/files/db_linking_hack.patch b/meta/recipes-devtools/apt/files/db_linking_hack.patch index d2246b3d2b..a61d4b07c2 100644 --- a/meta/recipes-devtools/apt/files/db_linking_hack.patch +++ b/meta/recipes-devtools/apt/files/db_linking_hack.patch @@ -1,9 +1,9 @@ Upstream-Status: Backport -Index: apt-0.7.3/configure.in +Index: apt-0.7.3/configure.ac =================================================================== ---- apt-0.7.3.orig/configure.in 2007-07-01 10:38:45.000000000 +0000 -+++ apt-0.7.3/configure.in 2007-08-21 13:39:26.000000000 +0000 +--- apt-0.7.3.orig/configure.ac 2007-07-01 10:38:45.000000000 +0000 ++++ apt-0.7.3/configure.ac 2007-08-21 13:39:26.000000000 +0000 @@ -67,8 +67,20 @@ [AC_DEFINE(HAVE_BDB) BDBLIB="-ldb" diff --git a/meta/recipes-devtools/apt/files/no-curl.patch b/meta/recipes-devtools/apt/files/no-curl.patch index 9fd3b3ab79..0838552b26 100644 --- a/meta/recipes-devtools/apt/files/no-curl.patch +++ b/meta/recipes-devtools/apt/files/no-curl.patch @@ -1,13 +1,23 @@ Upstream-Status: Inappropriate [configuration] +From 5d61ac822fd9a3871cd5089389c210606232ecdc 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:34:45 -0500 +Subject: [PATCH] Upstream-Status: Inappropriate [configuration] +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> --- - configure.in | 6 ------ - methods/makefile | 7 ------- - 2 files changed, 13 deletions(-) + configure.ac | 7 ------- + methods/makefile | 7 ------- + 2 files changed, 14 deletions(-) ---- a/configure.in -+++ b/configure.in -@@ -86,12 +86,6 @@ AC_CHECK_HEADER(db.h, +diff --git a/configure.ac b/configure.ac +index e47f459..cd24264 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,13 +83,6 @@ AC_CHECK_HEADER(db.h, LIBS="$saveLIBS" @@ -17,22 +27,28 @@ Upstream-Status: Inappropriate [configuration] - curl_ok=no)], - AC_MSG_ERROR([failed: I need CURL due https support]), -) - +- AC_SUBST(BDBLIB) + HAVE_ZLIB=no +diff --git a/methods/makefile b/methods/makefile +index 3274e92..255086b 100644 --- a/methods/makefile +++ b/methods/makefile @@ -51,13 +51,6 @@ LIB_MAKES = apt-pkg/makefile - SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc + SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc server.cc include $(PROGRAM_H) -# The https method -PROGRAM=https --SLIBS = -lapt-pkg -lcurl $(INTLLIBS) +-SLIBS = -lapt-pkg -lcurl $(INTLLIBS) -lresolv -LIB_MAKES = apt-pkg/makefile --SOURCE = https.cc +-SOURCE = https.cc server.cc -include $(PROGRAM_H) - # The ftp method PROGRAM=ftp - SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) + SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv +-- +2.1.4 + |
