aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2021-08-31 18:12:44 +0300
committerHans Dedecker <dedeckeh@gmail.com>2021-09-04 21:05:26 +0200
commitb6cbbbb6ef4deaba00f5c128ea66696fc64c5bf0 (patch)
treededcc4020623e3a354bd85e015c052f2339fb83e /package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch
parent43f0e386d4e79e9014e926d1d9b5e2ff8f1379cb (diff)
downloadupstream-b6cbbbb6ef4deaba00f5c128ea66696fc64c5bf0.tar.gz
upstream-b6cbbbb6ef4deaba00f5c128ea66696fc64c5bf0.tar.bz2
upstream-b6cbbbb6ef4deaba00f5c128ea66696fc64c5bf0.zip
busybox: update to version 1.34.0
Update busybox to version 1.34.0 * Remove upstreamed patches (205, 530, 540) * Remove one old patch that does not apply any more. (203) That was originally introduced in 2008 with 563d23459, but does not apply after busybox restructuring with https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?h=1_34_stable&id=e6007c4911c3ea26925f9473b9f156a692585f30 and https://git.busybox.net/busybox/commit/networking/udhcp/dhcpc.c?h=1_34_stable&id=1c7253726fcbab09917f143f0b703efbd2df55c3 * Refresh config and patches. * Backport upstream fixes for - MIPS compilation breakage and - process substitution regression Config refresh: Refresh commands, run after busybox is first built once: cd utils/busybox/ cd config/ ../convert_menuconfig.pl ../../../../build_dir/target-aarch64_cortex-a53_musl/busybox-default/busybox-1.34.0 cd .. ./convert_defaults.pl < ../../../build_dir/target-aarch64_cortex-a53_musl/busybox-default/busybox-1.34.0/.config > Config-defaults.in Manual edits needed afterward: * Config-defaults.in: OpenWrt config symbol IPV6 logic applied to BUSYBOX_DEFAULT_FEATURE_IPV6 * Config-defaults.in: OpenWrt configTARGET_bcm53xx logic applied to BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec) * Config-defaults.in: OpenWrt logic applied to BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917) BUSYBOX_DEFAULT_UDHCPC_DEFAULT_INTERFACE (just "") * config/editors/Config.in: Add USE_GLIBC dependency to BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090) * config/shell/Config.in : change at "Options common to all shells" the symbol SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html Apparently our script does not see the hidden option while prepending config options with "BUSYBOX_CONFIG_" which leads to a missed dependency when the options are later evaluated.) * Edit Config.in files by adding quotes to sourced items in config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f) Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Diffstat (limited to 'package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch')
-rw-r--r--package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch80
1 files changed, 0 insertions, 80 deletions
diff --git a/package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch b/package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch
deleted file mode 100644
index af473622ed..0000000000
--- a/package/utils/busybox/patches/530-use-SOURCE_DATE_EPOCH-for-timestamp-if-available.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 59f773ee81a8945321f4aa20abc5e9577e6483e4 Mon Sep 17 00:00:00 2001
-From: Paul Spooren <mail@aparcar.org>
-Date: Thu, 13 May 2021 11:25:34 +0200
-Subject: [PATCH] use SOURCE_DATE_EPOCH for timestamp if available
-
-The SOURCE_DATE_EPOCH is an effort of the Reproducible Builds
-organization to make timestamps/build dates in compiled tools
-deterministic over several repetitive builds.
-
-Busybox shows by default the build date timestamp which changes whenever
-compiled. To have a reasonable accurate build date while staying
-reproducible, it's possible to use the *date of last source
-modification* rather than the current time and date.
-
-Further information on SOURCE_DATE_EPOCH are available online [1].
-
-This patch modifies `confdata.c` so that the content of the
-SOURCE_DATE_EPOCH env variable is used as timestamp.
-
-To be independent of different timezones between builds, whenever
-SOURCE_DATE_EPOCH is defined the GMT time is used.
-
-[1]: https://reproducible-builds.org/docs/source-date-epoch/
-
-Signed-off-by: Paul Spooren <mail@aparcar.org>
----
- scripts/kconfig/confdata.c | 17 ++++++++++++++---
- 1 file changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
-index b05b96e45..73c25e3a8 100644
---- a/scripts/kconfig/confdata.c
-+++ b/scripts/kconfig/confdata.c
-@@ -342,6 +342,8 @@ int conf_write(const char *name)
- time_t now;
- int use_timestamp = 1;
- char *env;
-+ char *source_date_epoch;
-+ struct tm *build_time;
-
- dirname[0] = 0;
- if (name && name[0]) {
-@@ -378,7 +380,16 @@ int conf_write(const char *name)
- }
- sym = sym_lookup("KERNELVERSION", 0);
- sym_calc_value(sym);
-- time(&now);
-+
-+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
-+ if (source_date_epoch && *source_date_epoch) {
-+ now = strtoull(source_date_epoch, NULL, 10);
-+ build_time = gmtime(&now);
-+ } else {
-+ time(&now);
-+ build_time = localtime(&now);
-+ }
-+
- env = getenv("KCONFIG_NOTIMESTAMP");
- if (env && *env)
- use_timestamp = 0;
-@@ -398,14 +409,14 @@ int conf_write(const char *name)
- if (use_timestamp) {
- size_t ret = \
- strftime(buf, sizeof(buf), "#define AUTOCONF_TIMESTAMP "
-- "\"%Y-%m-%d %H:%M:%S %Z\"\n", localtime(&now));
-+ "\"%Y-%m-%d %H:%M:%S %Z\"\n", build_time);
- /* if user has Factory timezone or some other odd install, the
- * %Z above will overflow the string leaving us with undefined
- * results ... so let's try again without the timezone.
- */
- if (ret == 0)
- strftime(buf, sizeof(buf), "#define AUTOCONF_TIMESTAMP "
-- "\"%Y-%m-%d %H:%M:%S\"\n", localtime(&now));
-+ "\"%Y-%m-%d %H:%M:%S\"\n", build_time);
- } else { /* bbox */
- strcpy(buf, "#define AUTOCONF_TIMESTAMP \"\"\n");
- }
---
-2.30.2
-