From f17ff5f9ce00b7958f2d1d89a80281dbe30bba11 Mon Sep 17 00:00:00 2001 From: Alejandro del Castillo Date: Tue, 17 Dec 2019 18:16:08 -0600 Subject: opkg-utils: upgrade to version 0.4.2 - Drop 00001-Switch-all-scripts-to-use-Python-3.x.patch - Drop 00001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch - Drop pipefail.patch (From OE-Core rev: bf51a4a1312562cc9b5944b7dfccba0b3d11dc3c) (From OE-Core rev: 1b71c28e1ca4fddc0f3c340ea4bcd76854ef620c) (From OE-Core rev: 428c8a3887c86ea882b264fdad606612b9d9eb8e) Signed-off-by: Alejandro del Castillo Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- ...0001-Switch-all-scripts-to-use-Python-3.x.patch | 113 --------------------- ...g-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch | 44 -------- .../opkg-utils/opkg-utils/pipefail.patch | 31 ------ .../opkg-utils/opkg-utils_0.4.1.bb | 67 ------------ .../opkg-utils/opkg-utils_0.4.2.bb | 63 ++++++++++++ 5 files changed, 63 insertions(+), 255 deletions(-) delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch deleted file mode 100644 index 691ed50c2b..0000000000 --- a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch +++ /dev/null @@ -1,113 +0,0 @@ -From d42b23f4fb5d6bd58e92e995fe5befc76efbae0c Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 27 Apr 2017 15:47:58 +0300 -Subject: [PATCH] Switch all scripts to use Python 3.x - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin ---- - makePackage | 2 +- - opkg-compare-indexes | 2 +- - opkg-graph-deps | 2 +- - opkg-list-fields | 2 +- - opkg-make-index | 2 +- - opkg-show-deps | 2 +- - opkg-unbuild | 2 +- - opkg-update-index | 2 +- - opkg.py | 2 +- - 9 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/makePackage b/makePackage -index 4bdfc56..02124dd 100755 ---- a/makePackage -+++ b/makePackage -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/env python3 - - # The general algorithm this program follows goes like this: - # Run tar to extract control from control.tar.gz from the package. -diff --git a/opkg-compare-indexes b/opkg-compare-indexes -index b60d20a..80c1263 100755 ---- a/opkg-compare-indexes -+++ b/opkg-compare-indexes -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import - from __future__ import print_function - -diff --git a/opkg-graph-deps b/opkg-graph-deps -index 6653fd5..f1e376a 100755 ---- a/opkg-graph-deps -+++ b/opkg-graph-deps -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import - from __future__ import print_function - -diff --git a/opkg-list-fields b/opkg-list-fields -index c14a90f..24f7955 100755 ---- a/opkg-list-fields -+++ b/opkg-list-fields -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import - from __future__ import print_function - -diff --git a/opkg-make-index b/opkg-make-index -index 3f757f6..2988f9f 100755 ---- a/opkg-make-index -+++ b/opkg-make-index -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - """ - Utility to create opkg compatible indexes - """ - -diff --git a/opkg-show-deps b/opkg-show-deps -index 153f21e..4e18b4f 100755 ---- a/opkg-show-deps -+++ b/opkg-show-deps -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import - from __future__ import print_function - -diff --git a/opkg-unbuild b/opkg-unbuild -index 4f36bec..57642c9 100755 ---- a/opkg-unbuild -+++ b/opkg-unbuild -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import - from __future__ import print_function - -diff --git a/opkg-update-index b/opkg-update-index -index 341c1c2..7bff8a1 100755 ---- a/opkg-update-index -+++ b/opkg-update-index -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - from __future__ import absolute_import - - import sys, os -diff --git a/opkg.py b/opkg.py -index 2ecac8a..7e64de4 100644 ---- a/opkg.py -+++ b/opkg.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # Copyright (C) 2001 Alexander S. Guy - # Andern Research Labs - # --- -2.11.0 - diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch deleted file mode 100644 index a181169d47..0000000000 --- a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch +++ /dev/null @@ -1,44 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton - -From 59da5577bf8df441c6ca958e50fcb83228702764 Mon Sep 17 00:00:00 2001 -From: Alejandro del Castillo -Date: Thu, 12 Sep 2019 10:24:58 -0500 -Subject: [PATCH] opkg-build: clamp mtimes to SOURCE_DATE_EPOCH - -For reproducible builds, clamp mtimes bigger than SOURCE_DATE_EPOCH to -SOURCE_DATE_EPOCH (build generated files, usually). - -Fixes bugzilla 13450 - -Signed-off-by: Alejandro del Castillo -Signed-off-by: Ross Burton ---- - opkg-build | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/opkg-build b/opkg-build -index dcd2d68..2517a2b 100755 ---- a/opkg-build -+++ b/opkg-build -@@ -297,9 +297,16 @@ mkdir $tmp_dir - - build_date="${SOURCE_DATE_EPOCH:-$(date +%s)}" - -+mtime_args="" -+# --clamp-mtime requires tar > 1.28. Only use it if SOURCE_DATE_EPOCH is set, to avoid having a generic case dependency on tar > 1.28. -+# this setting will make sure files generated at build time have consistent mtimes, for reproducible builds. -+if [ ! -z "$SOURCE_DATE_EPOCH" ]; then -+ mtime_args="--mtime=@$build_date --clamp-mtime" -+fi -+ - ( cd $pkg_dir/$CONTROL && find . -type f > $tmp_dir/control_list ) - ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -print > $tmp_dir/file_list ) --( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) -+( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) - ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > $tmp_dir/control.tar.gz ) - rm $tmp_dir/file_list - rm $tmp_dir/control_list --- -2.20.1 - diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch deleted file mode 100644 index 55ddcc1fd2..0000000000 --- a/meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch +++ /dev/null @@ -1,31 +0,0 @@ -We need opkg-build to fail if for example the tar command is passed invalid -options. Without this, we see silently created empty packaged where data.tar -is zero bytes in size. This creates hard to debug problems. - -An example is when reproducible builds are enabled and run on old hosts like -centos7 which has tar < 1.28: - -Subprocess output:tar: unrecognized option '--clamp-mtime' -Try `tar --help' or `tar --usage' for more information. - -Upstream-Status: Pending -Signed-off-by: Richard Purdie - -Index: opkg-utils-0.4.1/opkg-build -=================================================================== ---- opkg-utils-0.4.1.orig/opkg-build -+++ opkg-utils-0.4.1/opkg-build -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - - : <<=cut - =head1 NAME -@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di - # Updated to work on Familiar Pre0.7rc1, with busybox tar. - # Note it Requires: binutils-ar (since the busybox ar can't create) - set -e -+set -o pipefail - - version=1.0 - diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb deleted file mode 100644 index eb6c7a3a6a..0000000000 --- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY = "Additional utilities for the opkg package manager" -SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system" -SECTION = "base" -HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35" -PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" - -SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ - file://0001-Switch-all-scripts-to-use-Python-3.x.patch \ - file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \ - file://pipefail.patch \ -" -UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" - - -SRC_URI[md5sum] = "8c140f835b694a0c27cfb23d2426a02b" -SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ecda3b6e" - -TARGET_CC_ARCH += "${LDFLAGS}" - -RDEPENDS_${PN} += "bash" - -# For native builds we use the host Python -PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold" -PYTHONRDEPS_class-native = "" - -PACKAGECONFIG = "python update-alternatives" -PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}" -PACKAGECONFIG[update-alternatives] = ",,," - -do_install() { - oe_runmake PREFIX=${prefix} DESTDIR=${D} install - if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then - rm -f "${D}${bindir}/update-alternatives" - fi - - if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm - fi -} - -do_install_append_class-target() { - if [ -e "${D}${bindir}/update-alternatives" ]; then - sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g' - fi -} - -# These are empty and will pull python3-dev into images where it wouldn't -# have been otherwise, so don't generate them. -PACKAGES_remove = "${PN}-dev ${PN}-staticdev" - -PACKAGES =+ "update-alternatives-opkg" -FILES_update-alternatives-opkg = "${bindir}/update-alternatives" -RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth" -RREPLACES_update-alternatives-opkg = "update-alternatives-cworth" -RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth" - -pkg_postrm_update-alternatives-opkg() { - rm -rf $D${nonarch_libdir}/opkg/alternatives - rmdir $D${nonarch_libdir}/opkg || true -} - -BBCLASSEXTEND = "native nativesdk" - -CLEANBROKEN = "1" diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb new file mode 100644 index 0000000000..6495726500 --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb @@ -0,0 +1,63 @@ +SUMMARY = "Additional utilities for the opkg package manager" +SUMMARY_update-alternatives-opkg = "Utility for managing the alternatives system" +SECTION = "base" +HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://opkg.py;beginline=2;endline=18;md5=ffa11ff3c15eb31c6a7ceaa00cc9f986" +PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" + +SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ +" +UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" + +SRC_URI[md5sum] = "cc210650644fcb9bba06ad5ec95a63ec" +SRC_URI[sha256sum] = "5929ad87d541789e0b82d626db01a1201ac48df6f49f2262fcfb86cf815e5d6c" + +TARGET_CC_ARCH += "${LDFLAGS}" + +RDEPENDS_${PN} += "bash" + +# For native builds we use the host Python +PYTHONRDEPS = "python3 python3-shell python3-io python3-math python3-crypt python3-logging python3-fcntl python3-pickle python3-compression python3-stringold" +PYTHONRDEPS_class-native = "" + +PACKAGECONFIG = "python update-alternatives" +PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}" +PACKAGECONFIG[update-alternatives] = ",,," + +do_install() { + oe_runmake PREFIX=${prefix} DESTDIR=${D} install + if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then + rm -f "${D}${bindir}/update-alternatives" + fi + + if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + grep -lZ "/usr/bin/env.*python" ${D}${bindir}/* | xargs -0 rm + fi +} + +do_install_append_class-target() { + if [ -e "${D}${bindir}/update-alternatives" ]; then + sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g' + fi +} + +# These are empty and will pull python3-dev into images where it wouldn't +# have been otherwise, so don't generate them. +PACKAGES_remove = "${PN}-dev ${PN}-staticdev" + +PACKAGES =+ "update-alternatives-opkg" +FILES_update-alternatives-opkg = "${bindir}/update-alternatives" +RPROVIDES_update-alternatives-opkg = "update-alternatives update-alternatives-cworth" +RREPLACES_update-alternatives-opkg = "update-alternatives-cworth" +RCONFLICTS_update-alternatives-opkg = "update-alternatives-cworth" + +pkg_postrm_update-alternatives-opkg() { + rm -rf $D${nonarch_libdir}/opkg/alternatives + rmdir $D${nonarch_libdir}/opkg || true +} + +BBCLASSEXTEND = "native nativesdk" + +CLEANBROKEN = "1" -- cgit v1.2.3-54-g00ecf