aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-05-19 15:08:02 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-19 15:09:37 +0000
commitc7a1ebebf38c3fff8e5c7477bdd0062068d32303 (patch)
treee046509049a0c2404b1e57fd8bc7316d575ddd12 /main
parent93f2004200a6c897ed09cfb28707dc2b55d4bb49 (diff)
downloadaports-c7a1ebebf38c3fff8e5c7477bdd0062068d32303.tar.bz2
aports-c7a1ebebf38c3fff8e5c7477bdd0062068d32303.tar.xz
main/busybox: fix busybox touch -t
https://bugs.busybox.net/show_bug.cgi?id=8951
Diffstat (limited to 'main')
-rw-r--r--main/busybox/0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch40
-rw-r--r--main/busybox/APKBUILD7
2 files changed, 46 insertions, 1 deletions
diff --git a/main/busybox/0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch b/main/busybox/0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
new file mode 100644
index 0000000000..9bd5075454
--- /dev/null
+++ b/main/busybox/0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
@@ -0,0 +1,40 @@
+From 1a3d9fb9074dc746326e6fa98c3eb499f6a6e048 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 19 May 2016 16:17:32 +0200
+Subject: [PATCH] libbb: fix time parsing of [[CC]YY]MMDDhhmm[.SS]
+
+If SS is not given a value, it is assumed to be zero.
+http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html
+
+closes 8951
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ libbb/time.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/libbb/time.c b/libbb/time.c
+index aa19a47..44dd4aa 100644
+--- a/libbb/time.c
++++ b/libbb/time.c
+@@ -159,6 +159,8 @@ void FAST_FUNC parse_datestr(const char *date_str, struct tm *ptm)
+ &ptm->tm_hour,
+ &ptm->tm_min,
+ &end) >= 5) {
++ /* assume zero if [.SS] is not given */
++ ptm->tm_sec = 0;
+ /* Adjust month from 1-12 to 0-11 */
+ ptm->tm_mon -= 1;
+ if ((int)cur_year >= 50) { /* >= 1950 */
+@@ -181,6 +183,8 @@ void FAST_FUNC parse_datestr(const char *date_str, struct tm *ptm)
+ &ptm->tm_hour,
+ &ptm->tm_min,
+ &end) >= 5) {
++ /* assume zero if [.SS] is not given */
++ ptm->tm_sec = 0;
+ ptm->tm_year -= 1900; /* Adjust years */
+ ptm->tm_mon -= 1; /* Adjust month from 1-12 to 0-11 */
+ } else {
+--
+2.8.2
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 02303ea96f..0ab911c849 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.24.2
-pkgrel=2
+pkgrel=3
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -45,6 +45,8 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
0001-ash-backport-fix-for-here-document-issues.patch
0001-ash-fix-error-during-recursive-processing-of-here-do.patch
+ 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
+
acpid.logrotate
busyboxconfig
glibc.patch"
@@ -180,6 +182,7 @@ f7c45568bdb0d2295c43108691e78a40 3002-libbb-allow_blank-argument-for-ask_and_ch
f82d49c891c02516462db3cda29ccca7 3003-su-FEATURE_SU_NULLOK_SECURE.patch
5f03ee6f3e93bbc6aedff0777b227810 0001-ash-backport-fix-for-here-document-issues.patch
a4d1cf64fd1835a284ccc6dbc78e3ce0 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
+6949aec16a6b18ff1b7ac6076abfb6b8 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
4046b78ee6a25259954797d73b94f4bd acpid.logrotate
78724c22bb072eedf42fd17452bfe4d3 busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
@@ -207,6 +210,7 @@ ce24e38be870c90bdcb90e7b0445067adf7be0fac6b1154d2364a4db9ee3a9d8 3002-libbb-all
d7b18672334ddeee7fbd6c0e92f26c5d2ef49ddefebf0b7f6eff8dc1ad8d3f7e 3003-su-FEATURE_SU_NULLOK_SECURE.patch
f712ce190ce86084d56977e125d1561615394f3d9b840e926537868260e19d79 0001-ash-backport-fix-for-here-document-issues.patch
1d3f8f7b6d0972f8e56437fce8efbafe70e2d869fbe82f06eba11e0103fce224 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
+59b7cf87c94c87563dab99f70f6eabf7065b7357c6466a3e1c83b5abfaabb080 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
f7cbeb5a5a47395ad30454ce8262abcd3e91c33ef803c2ae31a9258d7142dd48 acpid.logrotate
529499778b833285d1cf821ef45dc1ef74f536fea010a43688e0bbab48c4c3a7 busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
@@ -234,6 +238,7 @@ ed8d060b85d4da1681eb35ba64c5b249391e6a7edbeb55b8952897f08fe9bafac33593992772d80a
c6579970450e7c711461ab1953f534ae855c4a355b4a452b3fc52a286355c87e41f8951b1b5217d0f659e3173ace8718d42dad3dcc878899cf9decdf4d3fe238 3003-su-FEATURE_SU_NULLOK_SECURE.patch
d55cab6ed08434e2a278edf1be6171b921bcaee47598988e4de6b390a01569e10394c54d5d4a27e6eba251ce68df5cc1ece358be32a9c31bdf1f7e9147cf5180 0001-ash-backport-fix-for-here-document-issues.patch
c14a632f9477c13ea99b24a73c81c9c44ead8b536970acd758e739b43a6260860039674341192ce7bb20a9204ee7d93dcd9541e526f2437d4d2d88637b400867 0001-ash-fix-error-during-recursive-processing-of-here-do.patch
+814b34416ddf4ee16062ca3c128209fce392f40f33e5ee49fd7c81507bc16f9c112b1af9147cd45eb7d02ba943e1a111de50ab77a1bb827ca7152b8b77ab8e48 0001-libbb-fix-time-parsing-of-CC-YY-MMDDhhmm-.SS.patch
dadb4c953ebc755b88ee95c1489feb0c2d352f6e44abc716166024e6eea11ab9d10c84fad62c081775834d205cb04aa1be3c994676c88f4284495c54b9188e8b acpid.logrotate
ac26e4bf4ecbd3ba93db7e4665d6a58955596c87525ad0741f8e841bd803e67bd833407a037be44eca38eb7c2ec07250afe5beb58db8deef7aa838d81f8331d3 busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"