summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>2019-12-17 18:16:08 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-11 23:05:12 +0000
commitf17ff5f9ce00b7958f2d1d89a80281dbe30bba11 (patch)
tree0c27c6a0cf73a235357fdb7a51936f9014c064ba
parent2b0ad2bcad0ef7bbae833f38cbcf017a529ba40e (diff)
downloadpoky-f17ff5f9ce00b7958f2d1d89a80281dbe30bba11.tar.gz
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 <alejandro.delcastillo@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch113
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch44
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/pipefail.patch31
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb (renamed from meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb)12
4 files changed, 4 insertions, 196 deletions
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 @@
1From d42b23f4fb5d6bd58e92e995fe5befc76efbae0c Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 27 Apr 2017 15:47:58 +0300
4Subject: [PATCH] Switch all scripts to use Python 3.x
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 makePackage | 2 +-
10 opkg-compare-indexes | 2 +-
11 opkg-graph-deps | 2 +-
12 opkg-list-fields | 2 +-
13 opkg-make-index | 2 +-
14 opkg-show-deps | 2 +-
15 opkg-unbuild | 2 +-
16 opkg-update-index | 2 +-
17 opkg.py | 2 +-
18 9 files changed, 9 insertions(+), 9 deletions(-)
19
20diff --git a/makePackage b/makePackage
21index 4bdfc56..02124dd 100755
22--- a/makePackage
23+++ b/makePackage
24@@ -1,4 +1,4 @@
25-#!/usr/bin/python
26+#!/usr/bin/env python3
27
28 # The general algorithm this program follows goes like this:
29 # Run tar to extract control from control.tar.gz from the package.
30diff --git a/opkg-compare-indexes b/opkg-compare-indexes
31index b60d20a..80c1263 100755
32--- a/opkg-compare-indexes
33+++ b/opkg-compare-indexes
34@@ -1,4 +1,4 @@
35-#!/usr/bin/env python
36+#!/usr/bin/env python3
37 from __future__ import absolute_import
38 from __future__ import print_function
39
40diff --git a/opkg-graph-deps b/opkg-graph-deps
41index 6653fd5..f1e376a 100755
42--- a/opkg-graph-deps
43+++ b/opkg-graph-deps
44@@ -1,4 +1,4 @@
45-#!/usr/bin/env python
46+#!/usr/bin/env python3
47 from __future__ import absolute_import
48 from __future__ import print_function
49
50diff --git a/opkg-list-fields b/opkg-list-fields
51index c14a90f..24f7955 100755
52--- a/opkg-list-fields
53+++ b/opkg-list-fields
54@@ -1,4 +1,4 @@
55-#!/usr/bin/env python
56+#!/usr/bin/env python3
57 from __future__ import absolute_import
58 from __future__ import print_function
59
60diff --git a/opkg-make-index b/opkg-make-index
61index 3f757f6..2988f9f 100755
62--- a/opkg-make-index
63+++ b/opkg-make-index
64@@ -1,4 +1,4 @@
65-#!/usr/bin/env python
66+#!/usr/bin/env python3
67 """
68 Utility to create opkg compatible indexes
69 """
70
71diff --git a/opkg-show-deps b/opkg-show-deps
72index 153f21e..4e18b4f 100755
73--- a/opkg-show-deps
74+++ b/opkg-show-deps
75@@ -1,4 +1,4 @@
76-#!/usr/bin/env python
77+#!/usr/bin/env python3
78 from __future__ import absolute_import
79 from __future__ import print_function
80
81diff --git a/opkg-unbuild b/opkg-unbuild
82index 4f36bec..57642c9 100755
83--- a/opkg-unbuild
84+++ b/opkg-unbuild
85@@ -1,4 +1,4 @@
86-#!/usr/bin/env python
87+#!/usr/bin/env python3
88 from __future__ import absolute_import
89 from __future__ import print_function
90
91diff --git a/opkg-update-index b/opkg-update-index
92index 341c1c2..7bff8a1 100755
93--- a/opkg-update-index
94+++ b/opkg-update-index
95@@ -1,4 +1,4 @@
96-#!/usr/bin/env python
97+#!/usr/bin/env python3
98 from __future__ import absolute_import
99
100 import sys, os
101diff --git a/opkg.py b/opkg.py
102index 2ecac8a..7e64de4 100644
103--- a/opkg.py
104+++ b/opkg.py
105@@ -1,4 +1,4 @@
106-#!/usr/bin/env python
107+#!/usr/bin/env python3
108 # Copyright (C) 2001 Alexander S. Guy <a7r@andern.org>
109 # Andern Research Labs
110 #
111--
1122.11.0
113
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 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 59da5577bf8df441c6ca958e50fcb83228702764 Mon Sep 17 00:00:00 2001
5From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
6Date: Thu, 12 Sep 2019 10:24:58 -0500
7Subject: [PATCH] opkg-build: clamp mtimes to SOURCE_DATE_EPOCH
8
9For reproducible builds, clamp mtimes bigger than SOURCE_DATE_EPOCH to
10SOURCE_DATE_EPOCH (build generated files, usually).
11
12Fixes bugzilla 13450
13
14Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
15Signed-off-by: Ross Burton <ross.burton@intel.com>
16---
17 opkg-build | 9 ++++++++-
18 1 file changed, 8 insertions(+), 1 deletion(-)
19
20diff --git a/opkg-build b/opkg-build
21index dcd2d68..2517a2b 100755
22--- a/opkg-build
23+++ b/opkg-build
24@@ -297,9 +297,16 @@ mkdir $tmp_dir
25
26 build_date="${SOURCE_DATE_EPOCH:-$(date +%s)}"
27
28+mtime_args=""
29+# --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.
30+# this setting will make sure files generated at build time have consistent mtimes, for reproducible builds.
31+if [ ! -z "$SOURCE_DATE_EPOCH" ]; then
32+ mtime_args="--mtime=@$build_date --clamp-mtime"
33+fi
34+
35 ( cd $pkg_dir/$CONTROL && find . -type f > $tmp_dir/control_list )
36 ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -print > $tmp_dir/file_list )
37-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
38+( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion $mtime_args -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
39 ( 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 )
40 rm $tmp_dir/file_list
41 rm $tmp_dir/control_list
42--
432.20.1
44
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 @@
1We need opkg-build to fail if for example the tar command is passed invalid
2options. Without this, we see silently created empty packaged where data.tar
3is zero bytes in size. This creates hard to debug problems.
4
5An example is when reproducible builds are enabled and run on old hosts like
6centos7 which has tar < 1.28:
7
8Subprocess output:tar: unrecognized option '--clamp-mtime'
9Try `tar --help' or `tar --usage' for more information.
10
11Upstream-Status: Pending
12Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
13
14Index: opkg-utils-0.4.1/opkg-build
15===================================================================
16--- opkg-utils-0.4.1.orig/opkg-build
17+++ opkg-utils-0.4.1/opkg-build
18@@ -1,4 +1,4 @@
19-#!/bin/sh
20+#!/bin/bash
21
22 : <<=cut
23 =head1 NAME
24@@ -12,6 +12,7 @@ opkg-build - construct an .opk from a di
25 # Updated to work on Familiar Pre0.7rc1, with busybox tar.
26 # Note it Requires: binutils-ar (since the busybox ar can't create)
27 set -e
28+set -o pipefail
29
30 version=1.0
31
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb
index eb6c7a3a6a..6495726500 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.1.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb
@@ -4,19 +4,15 @@ SECTION = "base"
4HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils" 4HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils"
5LICENSE = "GPLv2+" 5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
7 file://opkg.py;beginline=2;endline=18;md5=63ce9e6bcc445181cd9e4baf4b4ccc35" 7 file://opkg.py;beginline=2;endline=18;md5=ffa11ff3c15eb31c6a7ceaa00cc9f986"
8PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}" 8PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
9 9
10SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ 10SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
11 file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
12 file://0001-opkg-build-clamp-mtimes-to-SOURCE_DATE_EPOCH.patch \
13 file://pipefail.patch \
14" 11"
15UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" 12UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
16 13
17 14SRC_URI[md5sum] = "cc210650644fcb9bba06ad5ec95a63ec"
18SRC_URI[md5sum] = "8c140f835b694a0c27cfb23d2426a02b" 15SRC_URI[sha256sum] = "5929ad87d541789e0b82d626db01a1201ac48df6f49f2262fcfb86cf815e5d6c"
19SRC_URI[sha256sum] = "9ea9efdd9fe13661ad251e3a2860c1c93045adcfaa6659c3e86d9748ecda3b6e"
20 16
21TARGET_CC_ARCH += "${LDFLAGS}" 17TARGET_CC_ARCH += "${LDFLAGS}"
22 18