* [PATCH 1/7] rsync: Fix a file sorting determinism issue
@ 2021-02-21 22:17 Richard Purdie
2021-02-21 22:17 ` [PATCH 2/7] selftest/reproducible: git, rsync and groff now reproduce Richard Purdie
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../rsync/files/determism.patch | 28 +++++++++++++++++++
meta/recipes-devtools/rsync/rsync_3.2.3.bb | 1 +
2 files changed, 29 insertions(+)
create mode 100644 meta/recipes-devtools/rsync/files/determism.patch
diff --git a/meta/recipes-devtools/rsync/files/determism.patch b/meta/recipes-devtools/rsync/files/determism.patch
new file mode 100644
index 00000000000..53a4ca75058
--- /dev/null
+++ b/meta/recipes-devtools/rsync/files/determism.patch
@@ -0,0 +1,28 @@
+The Makefile calls awk on a "*.c" glob. The results of this glob are sorted
+but the order depends on the locale settings, particularly whether
+"util.c" and "util2.c" sort before or after each other. In en_US.UTF-8
+they sort one way, in C, they sort the other. The sorting order changes
+the output binaries. The behaviour also changes dependning on whether
+SHELL (/bin/sh) is dash or bash.
+
+Specify a C locale setting to be deterministic.
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Pending
+
+Index: rsync-3.2.3/Makefile.in
+===================================================================
+--- rsync-3.2.3.orig/Makefile.in
++++ rsync-3.2.3/Makefile.in
+@@ -26,6 +26,11 @@ MKDIR_P=@MKDIR_P@
+ VPATH=$(srcdir)
+ SHELL=/bin/sh
+
++# We use globbing in commands, need to be deterministic
++unexport LC_ALL
++LC_COLLATE=C
++export LC_COLLATE
++
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+
diff --git a/meta/recipes-devtools/rsync/rsync_3.2.3.bb b/meta/recipes-devtools/rsync/rsync_3.2.3.bb
index b7205e5bdef..c08f93884f5 100644
--- a/meta/recipes-devtools/rsync/rsync_3.2.3.bb
+++ b/meta/recipes-devtools/rsync/rsync_3.2.3.bb
@@ -12,6 +12,7 @@ DEPENDS = "popt"
SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
file://rsyncd.conf \
file://makefile-no-rebuild.patch \
+ file://determism.patch \
"
SRC_URI[sha256sum] = "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e"
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/7] selftest/reproducible: git, rsync and groff now reproduce
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
@ 2021-02-21 22:17 ` Richard Purdie
2021-02-21 22:17 ` [PATCH 3/7] libcap-ng: Fix python bindings determinism issue Richard Purdie
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
git, rsync and groff have their reproducibility issues fixed, remove
from the exclusion list. Also fix whitespace.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/lib/oeqa/selftest/cases/reproducible.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 9785c5ffac2..58704dcdc3b 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -34,13 +34,11 @@ exclude_packages = [
'efivar',
'epiphany',
'gcr',
- 'git',
'glide',
'go-dep',
'go-helloworld',
'go-runtime',
'go_',
- 'groff',
'gst-devtools',
'gstreamer1.0-python',
'gtk-doc',
@@ -55,14 +53,13 @@ exclude_packages = [
'lttng-tools-dbg',
'lttng-tools-ptest',
'ltp',
- 'meson',
+ 'meson',
'ovmf-shell-efi',
'parted-ptest',
'perf',
'python3-cython',
'qemu',
- 'rsync',
- 'ruby-ri-docs',
+ 'ruby-ri-docs',
'swig',
'syslinux-misc',
'systemd-bootchart'
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/7] libcap-ng: Fix python bindings determinism issue
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
2021-02-21 22:17 ` [PATCH 2/7] selftest/reproducible: git, rsync and groff now reproduce Richard Purdie
@ 2021-02-21 22:17 ` Richard Purdie
2021-02-21 22:17 ` [PATCH 4/7] libcap-ng: Replace python patch with a better fix Richard Purdie
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-support/libcap-ng/libcap-ng.inc | 4 ++
.../libcap-ng/libcap-ng/determinism.patch | 59 +++++++++++++++++++
.../libcap-ng/libcap-ng/python.patch | 20 +++----
3 files changed, 72 insertions(+), 11 deletions(-)
create mode 100644 meta/recipes-support/libcap-ng/libcap-ng/determinism.patch
diff --git a/meta/recipes-support/libcap-ng/libcap-ng.inc b/meta/recipes-support/libcap-ng/libcap-ng.inc
index 8c52b5d0b9f..016d8e51746 100644
--- a/meta/recipes-support/libcap-ng/libcap-ng.inc
+++ b/meta/recipes-support/libcap-ng/libcap-ng.inc
@@ -8,9 +8,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
SRC_URI = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
+ file://determinism.patch \
file://python.patch \
"
SRC_URI[sha256sum] = "52c083b77c2b0d8449dee141f9c3eba76e6d4c5ad44ef05df25891126cb85ae9"
+EXTRA_OECONF_append_class-target = " --with-capability_header=${STAGING_INCDIR}/linux/capability.h"
+EXTRA_OECONF_append_class-nativesdk = " --with-capability_header=${STAGING_INCDIR}/linux/capability.h"
+
BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/determinism.patch b/meta/recipes-support/libcap-ng/libcap-ng/determinism.patch
new file mode 100644
index 00000000000..fbb7380f56e
--- /dev/null
+++ b/meta/recipes-support/libcap-ng/libcap-ng/determinism.patch
@@ -0,0 +1,59 @@
+[PATCH] bindings/python: Allow hardcoded path to capability.h to be overridden
+
+Currently the path to capability.h is hardcoded. When cross compiling
+the host capabiity.h may be different to the target copy, leading
+to different options being encoded in the python bindings than
+expected. This causes a reproducibility issue amongst other potential
+problems.
+
+Add a configure option to optionally specify the right path to the
+correct header as its probably safer/more reliable than trying to
+query the compiler to get the header path.
+
+Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org
+Upstream-Status: Submitted [https://github.com/stevegrubb/libcap-ng/pull/30]
+
+Index: libcap-ng-0.8.2/configure.ac
+===================================================================
+--- libcap-ng-0.8.2.orig/configure.ac
++++ libcap-ng-0.8.2/configure.ac
+@@ -63,6 +63,13 @@ AC_CHECK_HEADERS(sys/vfs.h, [
+ AC_CHECK_HEADERS(linux/magic.h, [] [AC_MSG_WARN(linux/magic.h is required in order to verify procfs.)])
+ ], [AC_MSG_WARN(sys/vfs.h is required in order to verify procfs.)])
+
++
++AC_ARG_WITH([capability_header],
++ [AS_HELP_STRING([--with-capability_header=path : path to cpapbility.h])],
++ [CAPABILITY_HEADER=$withval],
++ [CAPABILITY_HEADER=/usr/include/linux/capability.h])
++AC_SUBST(CAPABILITY_HEADER)
++
+ AC_C_CONST
+ AC_C_INLINE
+ AM_PROG_CC_C_O
+Index: libcap-ng-0.8.2/bindings/python3/Makefile.am
+===================================================================
+--- libcap-ng-0.8.2.orig/bindings/python3/Makefile.am
++++ libcap-ng-0.8.2/bindings/python3/Makefile.am
+@@ -41,7 +41,7 @@ nodist__capng_la_SOURCES = capng_wrap.c
+ capng.py capng_wrap.c: ${srcdir}/../src/capng_swig.i caps.h capng.h
+ swig -o capng_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/capng_swig.i
+ caps.h:
+- cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h
++ cat $(CAPABILITY_HEADER) | grep '^#define CAP' | grep -v '[()]' > caps.h
+ capng.h:
+ cat ${top_srcdir}/src/cap-ng.h | grep -v '_state' > capng.h
+
+Index: libcap-ng-0.8.2/bindings/python/Makefile.am
+===================================================================
+--- libcap-ng-0.8.2.orig/bindings/python/Makefile.am
++++ libcap-ng-0.8.2/bindings/python/Makefile.am
+@@ -38,7 +38,7 @@ nodist__capng_la_SOURCES = capng_wrap.c
+ capng.py capng_wrap.c: ${srcdir}/../src/capng_swig.i caps.h capng.h
+ swig -o capng_wrap.c ${SWIG_FLAGS} ${SWIG_INCLUDES} ${srcdir}/../src/capng_swig.i
+ caps.h:
+- cat /usr/include/linux/capability.h | grep '^#define CAP' | grep -v '[()]' > caps.h
++ cat $(CAPABILITY_HEADER) | grep '^#define CAP' | grep -v '[()]' > caps.h
+ capng.h:
+ cat ${top_srcdir}/src/cap-ng.h | grep -v '_state' > capng.h
+
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/python.patch b/meta/recipes-support/libcap-ng/libcap-ng/python.patch
index fcd6f9cd334..8db03ca31fe 100644
--- a/meta/recipes-support/libcap-ng/libcap-ng/python.patch
+++ b/meta/recipes-support/libcap-ng/libcap-ng/python.patch
@@ -13,10 +13,10 @@ Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
configure.ac | 17 ++---------------
2 files changed, 5 insertions(+), 16 deletions(-)
-diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
-index 999b184..c8e49db 100644
---- a/bindings/python/Makefile.am
-+++ b/bindings/python/Makefile.am
+Index: libcap-ng-0.8.2/bindings/python/Makefile.am
+===================================================================
+--- libcap-ng-0.8.2.orig/bindings/python/Makefile.am
++++ libcap-ng-0.8.2/bindings/python/Makefile.am
@@ -23,7 +23,9 @@
SUBDIRS = test
CONFIG_CLEAN_FILES = *.loT *.rej *.orig
@@ -28,11 +28,11 @@ index 999b184..c8e49db 100644
SWIG_FLAGS = -python
SWIG_INCLUDES = ${AM_CPPFLAGS}
pyexec_PYTHON = capng.py
-diff --git a/configure.ac b/configure.ac
-index 8b46f51..2d7e00c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -141,21 +141,8 @@ fi
+Index: libcap-ng-0.8.2/configure.ac
+===================================================================
+--- libcap-ng-0.8.2.orig/configure.ac
++++ libcap-ng-0.8.2/configure.ac
+@@ -169,21 +169,8 @@ fi
# Setup Python2 with the interpreter found previously.
AM_PATH_PYTHON
@@ -56,5 +56,3 @@ index 8b46f51..2d7e00c 100644
fi
AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
---
-2.25.1
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/7] libcap-ng: Replace python patch with a better fix
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
2021-02-21 22:17 ` [PATCH 2/7] selftest/reproducible: git, rsync and groff now reproduce Richard Purdie
2021-02-21 22:17 ` [PATCH 3/7] libcap-ng: Fix python bindings determinism issue Richard Purdie
@ 2021-02-21 22:17 ` Richard Purdie
2021-02-21 22:17 ` [PATCH 5/7] libevdev: Update patch status to backport Richard Purdie
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
By using the python3targetconfig class we can drop the existing python
patch and the extra make parameters.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../libcap-ng/libcap-ng-python_0.8.2.bb | 3 +-
meta/recipes-support/libcap-ng/libcap-ng.inc | 1 -
.../libcap-ng/libcap-ng/python.patch | 58 -------------------
3 files changed, 1 insertion(+), 61 deletions(-)
delete mode 100644 meta/recipes-support/libcap-ng/libcap-ng/python.patch
diff --git a/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb b/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb
index 43f76dc561a..6cea422d113 100644
--- a/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb
+++ b/meta/recipes-support/libcap-ng/libcap-ng-python_0.8.2.bb
@@ -4,14 +4,13 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/libcap-ng:"
SUMMARY .= " - python"
-inherit lib_package autotools python3native
+inherit lib_package autotools python3targetconfig
DEPENDS += "libcap-ng python3 swig-native"
S = "${WORKDIR}/libcap-ng-${PV}"
EXTRA_OECONF += "--with-python --with-python3"
-EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
do_install_append() {
rm -rf ${D}${bindir}
diff --git a/meta/recipes-support/libcap-ng/libcap-ng.inc b/meta/recipes-support/libcap-ng/libcap-ng.inc
index 016d8e51746..64bc62de241 100644
--- a/meta/recipes-support/libcap-ng/libcap-ng.inc
+++ b/meta/recipes-support/libcap-ng/libcap-ng.inc
@@ -9,7 +9,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
SRC_URI = "https://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
file://determinism.patch \
- file://python.patch \
"
SRC_URI[sha256sum] = "52c083b77c2b0d8449dee141f9c3eba76e6d4c5ad44ef05df25891126cb85ae9"
diff --git a/meta/recipes-support/libcap-ng/libcap-ng/python.patch b/meta/recipes-support/libcap-ng/libcap-ng/python.patch
deleted file mode 100644
index 8db03ca31fe..00000000000
--- a/meta/recipes-support/libcap-ng/libcap-ng/python.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Subject: [PATCH] configure.ac - Avoid an incorrect check for python.
- Makefile.am - avoid hard coded host include paths.
-
-Upstream-Status: pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
-Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com>
-
----
- bindings/python/Makefile.am | 4 +++-
- configure.ac | 17 ++---------------
- 2 files changed, 5 insertions(+), 16 deletions(-)
-
-Index: libcap-ng-0.8.2/bindings/python/Makefile.am
-===================================================================
---- libcap-ng-0.8.2.orig/bindings/python/Makefile.am
-+++ libcap-ng-0.8.2/bindings/python/Makefile.am
-@@ -23,7 +23,9 @@
- SUBDIRS = test
- CONFIG_CLEAN_FILES = *.loT *.rej *.orig
- AM_CFLAGS = -fPIC -DPIC
--AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@
-+PYLIBVER ?= python$(PYTHON_VERSION)
-+PYINC ?= /usr/include/$(PYLIBVER)
-+AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC)
- SWIG_FLAGS = -python
- SWIG_INCLUDES = ${AM_CPPFLAGS}
- pyexec_PYTHON = capng.py
-Index: libcap-ng-0.8.2/configure.ac
-===================================================================
---- libcap-ng-0.8.2.orig/configure.ac
-+++ libcap-ng-0.8.2/configure.ac
-@@ -169,21 +169,8 @@ fi
-
- # Setup Python2 with the interpreter found previously.
- AM_PATH_PYTHON
--PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
--if test -f ${PYINCLUDEDIR}/Python.h ; then
-- python_found="yes"
-- AC_SUBST(PYINCLUDEDIR)
-- pybind_dir="python"
-- AC_SUBST(pybind_dir)
-- AC_MSG_NOTICE(Python bindings will be built)
--else
-- python_found="no"
-- if test "x$use_python" = xyes ; then
-- AC_MSG_ERROR([Python explicitly requested and python headers were not found])
-- else
-- AC_MSG_WARN("Python headers not found - python bindings will not be made")
-- fi
--fi
-+python_found="yes"
-+AC_MSG_NOTICE(Python bindings will be built)
- fi
- AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
-
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/7] libevdev: Update patch status to backport
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
` (2 preceding siblings ...)
2021-02-21 22:17 ` [PATCH 4/7] libcap-ng: Replace python patch with a better fix Richard Purdie
@ 2021-02-21 22:17 ` Richard Purdie
2021-02-21 22:17 ` [PATCH 6/7] ca-certificates: Clean up two patches and submit upstream Richard Purdie
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
The patch was submitted and merged upstream.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/recipes-support/libevdev/libevdev/determinism.patch | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-support/libevdev/libevdev/determinism.patch b/meta/recipes-support/libevdev/libevdev/determinism.patch
index f6b7fc82d3d..71cbd876eb6 100644
--- a/meta/recipes-support/libevdev/libevdev/determinism.patch
+++ b/meta/recipes-support/libevdev/libevdev/determinism.patch
@@ -9,7 +9,8 @@ Sort to remove this inconsistency.
RP 2020/2/7
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Upstream-Status: Pending
+Submitted: https://lists.freedesktop.org/archives/input-tools/2021-February/001560.html
+Upstream-Status: Backport [https://gitlab.freedesktop.org/libevdev/libevdev/-/commit/8d70f449892c6f7659e07bb0f06b8347677bb7d8]
---
libevdev/make-event-names.py | 6 +++---
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/7] ca-certificates: Clean up two patches and submit upstream
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
` (3 preceding siblings ...)
2021-02-21 22:17 ` [PATCH 5/7] libevdev: Update patch status to backport Richard Purdie
@ 2021-02-21 22:17 ` Richard Purdie
2021-02-21 22:17 ` [PATCH 7/7] libpcre: Drop old/stale patch Richard Purdie
2021-02-22 17:40 ` [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue Peter Kjellerstedt
6 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../ca-certificates/sbindir.patch | 10 +++++++--
...pdate-ca-certificates-support-Toybox.patch | 21 +++++++++----------
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch b/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
index a113fa8b153..f343ebf16e0 100644
--- a/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
+++ b/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
@@ -1,6 +1,12 @@
-Upstream-Status: Pending
+sbin/Makefile: Allow the sbin path to be configurable
-Let us alter the install destination of the script via SBINDIR
+Some project sharing ca-certificates from Debian allow configuration
+of the installation location. Make the sbin location configurable.
+
+Also ensure the target directory exists
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Submitted [https://salsa.debian.org/debian/ca-certificates/-/merge_requests/5]
--- ca-certificates-20130119.orig/sbin/Makefile
+++ ca-certificates-20130119/sbin/Makefile
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch b/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
index 6e2171f7584..f78790923cb 100644
--- a/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
+++ b/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
@@ -1,14 +1,13 @@
-From 30378026d136efa779732e3f6664e2ecf461e458 Mon Sep 17 00:00:00 2001
-From: Patrick Ohly <patrick.ohly@intel.com>
-Date: Thu, 17 Mar 2016 12:38:09 +0100
-Subject: [PATCH] update-ca-certificates: support Toybox
+update-ca-certificates: Replace deprecated mktemp -t with mktemp --tmpdir
-"mktemp -t" is deprecated and does not work when using Toybox. Replace
-with something that works also with Toybox.
+According to coreutils docs, mktemp -t is deprecated, switch to the
+--tmpdir option instead.
-Upstream-Status: Pending
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Upstream-Status: Submitted [https://salsa.debian.org/debian/ca-certificates/-/merge_requests/5]
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+[This was originally for compatibility with toybox but toybox now
+supports -t]
---
sbin/update-ca-certificates | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -24,9 +23,9 @@ index 79c41bb..ae9e3f1 100755
-TEMPBUNDLE="$(mktemp -t "${CERTBUNDLE}.tmp.XXXXXX")"
-ADDED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
-REMOVED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
-+TEMPBUNDLE="$(mktemp -p${TMPDIR:-/tmp} "${CERTBUNDLE}.tmp.XXXXXX")"
-+ADDED="$(mktemp -p${TMPDIR:-/tmp} "ca-certificates.tmp.XXXXXX")"
-+REMOVED="$(mktemp -p${TMPDIR:-/tmp} "ca-certificates.tmp.XXXXXX")"
++TEMPBUNDLE="$(mktemp --tmpdir "${CERTBUNDLE}.tmp.XXXXXX")"
++ADDED="$(mktemp --tmpdir "ca-certificates.tmp.XXXXXX")"
++REMOVED="$(mktemp --tmpdir "ca-certificates.tmp.XXXXXX")"
# Adds a certificate to the list of trusted ones. This includes a symlink
# in /etc/ssl/certs to the certificate file and its inclusion into the
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/7] libpcre: Drop old/stale patch
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
` (4 preceding siblings ...)
2021-02-21 22:17 ` [PATCH 6/7] ca-certificates: Clean up two patches and submit upstream Richard Purdie
@ 2021-02-21 22:17 ` Richard Purdie
2021-02-22 17:40 ` [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue Peter Kjellerstedt
6 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-21 22:17 UTC (permalink / raw)
To: openembedded-core
According to my tests this incorrect symbols resolution at runtime no
longer happens. Ubuntu is still carrying the patch but also probably
doesn't need to, they are also on a much older version. It sounds
like there was once a linkage bug somewhere which has likely been
resolved since.
Drop the patch as it doesn't seem needed anymore. If it were a real
issue it should be submitted upstream too, the status is incorrect.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../libpcre/fix-pcre-name-collision.patch | 41 -------------------
meta/recipes-support/libpcre/libpcre_8.44.bb | 1 -
2 files changed, 42 deletions(-)
delete mode 100644 meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
diff --git a/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
deleted file mode 100644
index 89b44f6aa6f..00000000000
--- a/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Inappropriate [debian patch]
-
-This patch address a namespace collision with libc.
-
-Although there is no "#include <regex.h>" in the source file, at
-runtime, it's unintentionally linked to the libc version, the regcomp of
-libc is called instead the pcre one using pcre's data structure...
-that looks like a disaster.
-
-Can patch is from Debian (and Ubuntu 11.04alpha has it also).
-
-[sgw: added patch comment]
-Signed-off-by: Qing He <qing.he@intel.com>
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
---- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800
-+++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800
-@@ -133,14 +130,19 @@
-
- /* The functions */
-
--PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
--PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
-+PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int);
-+PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t,
- regmatch_t *, int);
--PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
--PCREPOSIX_EXP_DECL void regfree(regex_t *);
-+PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t);
-+PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *);
-
- #ifdef __cplusplus
- } /* extern "C" */
- #endif
-
-+#define regcomp pcreposix_regcomp
-+#define regexec pcreposix_regexec
-+#define regerror pcreposix_regerror
-+#define regfree pcreposix_regfree
-+
- #endif /* End of pcreposix.h */
diff --git a/meta/recipes-support/libpcre/libpcre_8.44.bb b/meta/recipes-support/libpcre/libpcre_8.44.bb
index e5471e81da3..cd80dc7345b 100644
--- a/meta/recipes-support/libpcre/libpcre_8.44.bb
+++ b/meta/recipes-support/libpcre/libpcre_8.44.bb
@@ -8,7 +8,6 @@ SECTION = "devel"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENCE;md5=3bb381a66a5385b246d4877922e7511e"
SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
- file://fix-pcre-name-collision.patch \
file://run-ptest \
file://Makefile \
"
--
2.27.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
` (5 preceding siblings ...)
2021-02-21 22:17 ` [PATCH 7/7] libpcre: Drop old/stale patch Richard Purdie
@ 2021-02-22 17:40 ` Peter Kjellerstedt
2021-02-22 20:23 ` Richard Purdie
6 siblings, 1 reply; 9+ messages in thread
From: Peter Kjellerstedt @ 2021-02-22 17:40 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 21 februari 2021 23:17
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> .../rsync/files/determism.patch | 28 +++++++++++++++++++
> meta/recipes-devtools/rsync/rsync_3.2.3.bb | 1 +
> 2 files changed, 29 insertions(+)
> create mode 100644 meta/recipes-devtools/rsync/files/determism.patch
>
> diff --git a/meta/recipes-devtools/rsync/files/determism.patch b/meta/recipes-devtools/rsync/files/determism.patch
> new file mode 100644
> index 00000000000..53a4ca75058
> --- /dev/null
> +++ b/meta/recipes-devtools/rsync/files/determism.patch
> @@ -0,0 +1,28 @@
> +The Makefile calls awk on a "*.c" glob. The results of this glob are sorted
> +but the order depends on the locale settings, particularly whether
> +"util.c" and "util2.c" sort before or after each other. In en_US.UTF-8
> +they sort one way, in C, they sort the other. The sorting order changes
> +the output binaries. The behaviour also changes dependning on whether
> +SHELL (/bin/sh) is dash or bash.
> +
> +Specify a C locale setting to be deterministic.
> +
> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> +Upstream-Status: Pending
> +
> +Index: rsync-3.2.3/Makefile.in
> +===================================================================
> +--- rsync-3.2.3.orig/Makefile.in
> ++++ rsync-3.2.3/Makefile.in
> +@@ -26,6 +26,11 @@ MKDIR_P=@MKDIR_P@
> + VPATH=$(srcdir)
> + SHELL=/bin/sh
> +
> ++# We use globbing in commands, need to be deterministic
> ++unexport LC_ALL
> ++LC_COLLATE=C
> ++export LC_COLLATE
Rather than using a patch, can't this be achieved by doing:
export LC_COLLATE=C
or:
export LC_ALL=C
in the recipe?
> ++
> + .SUFFIXES:
> + .SUFFIXES: .c .o
> +
> diff --git a/meta/recipes-devtools/rsync/rsync_3.2.3.bb b/meta/recipes-devtools/rsync/rsync_3.2.3.bb
> index b7205e5bdef..c08f93884f5 100644
> --- a/meta/recipes-devtools/rsync/rsync_3.2.3.bb
> +++ b/meta/recipes-devtools/rsync/rsync_3.2.3.bb
> @@ -12,6 +12,7 @@ DEPENDS = "popt"
> SRC_URI = "https://download.samba.org/pub/${BPN}/src/${BP}.tar.gz \
> file://rsyncd.conf \
> file://makefile-no-rebuild.patch \
> + file://determism.patch \
> "
>
> SRC_URI[sha256sum] = "becc3c504ceea499f4167a260040ccf4d9f2ef9499ad5683c179a697146ce50e"
> --
> 2.27.0
//Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue
2021-02-22 17:40 ` [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue Peter Kjellerstedt
@ 2021-02-22 20:23 ` Richard Purdie
0 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2021-02-22 20:23 UTC (permalink / raw)
To: Peter Kjellerstedt, openembedded-core
On Mon, 2021-02-22 at 17:40 +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of
> > Richard Purdie
> > Sent: den 21 februari 2021 23:17
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > .../rsync/files/determism.patch | 28 +++++++++++++++++++
> > meta/recipes-devtools/rsync/rsync_3.2.3.bb | 1 +
> > 2 files changed, 29 insertions(+)
> > create mode 100644 meta/recipes-devtools/rsync/files/determism.patch
> >
> > diff --git a/meta/recipes-devtools/rsync/files/determism.patch b/meta/recipes-
> > devtools/rsync/files/determism.patch
> > new file mode 100644
> > index 00000000000..53a4ca75058
> > --- /dev/null
> > +++ b/meta/recipes-devtools/rsync/files/determism.patch
> > @@ -0,0 +1,28 @@
> > +The Makefile calls awk on a "*.c" glob. The results of this glob are sorted
> > +but the order depends on the locale settings, particularly whether
> > +"util.c" and "util2.c" sort before or after each other. In en_US.UTF-8
> > +they sort one way, in C, they sort the other. The sorting order changes
> > +the output binaries. The behaviour also changes dependning on whether
> > +SHELL (/bin/sh) is dash or bash.
> > +
> > +Specify a C locale setting to be deterministic.
> > +
> > +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > +Upstream-Status: Pending
> > +
> > +Index: rsync-3.2.3/Makefile.in
> > +===================================================================
> > +--- rsync-3.2.3.orig/Makefile.in
> > ++++ rsync-3.2.3/Makefile.in
> > +@@ -26,6 +26,11 @@ MKDIR_P=@MKDIR_P@
> > + VPATH=$(srcdir)
> > + SHELL=/bin/sh
> > +
> > ++# We use globbing in commands, need to be deterministic
> > ++unexport LC_ALL
> > ++LC_COLLATE=C
> > ++export LC_COLLATE
>
> Rather than using a patch, can't this be achieved by doing:
>
> export LC_COLLATE=C
>
> or:
>
> export LC_ALL=C
>
> in the recipe?
I think its all a bit of a mess. bitbake.conf sets:
export LC_ALL = "en_US.UTF-8"
which seems odd at first but going from memory, its because we need utf8 support
and was the best way to get it as distros disagree over what an utf8 C locale
is called (of if it exists).
I think bash sees and honours that, dash does not but both will work
with LC_COLLATE=C as long as LC_ALL is unset.
More testing would be needed to see which alternatives might work.
LC_COLLATE=C in the recipe may break python for example or conflict with the
LC_ALL setting :(
I'm open for someone to look more into this...
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-02-22 20:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21 22:17 [PATCH 1/7] rsync: Fix a file sorting determinism issue Richard Purdie
2021-02-21 22:17 ` [PATCH 2/7] selftest/reproducible: git, rsync and groff now reproduce Richard Purdie
2021-02-21 22:17 ` [PATCH 3/7] libcap-ng: Fix python bindings determinism issue Richard Purdie
2021-02-21 22:17 ` [PATCH 4/7] libcap-ng: Replace python patch with a better fix Richard Purdie
2021-02-21 22:17 ` [PATCH 5/7] libevdev: Update patch status to backport Richard Purdie
2021-02-21 22:17 ` [PATCH 6/7] ca-certificates: Clean up two patches and submit upstream Richard Purdie
2021-02-21 22:17 ` [PATCH 7/7] libpcre: Drop old/stale patch Richard Purdie
2021-02-22 17:40 ` [OE-core] [PATCH 1/7] rsync: Fix a file sorting determinism issue Peter Kjellerstedt
2021-02-22 20:23 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.