summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2020-02-04 10:16:42 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2020-02-04 10:16:42 +0100
commitded166ac4e380f8d7dfb87dcee970c64a23a3c6e (patch)
tree2363a09701d5534b50306278e8844e8482069ab1 /package
parent11f569583fa14cc97566d6464635309cdc7b5e35 (diff)
glibc: update to 2.31
Diffstat (limited to 'package')
-rw-r--r--package/busybox/patches/009-Replace-obsolete-stime-API-with-clock_settime.patch65
-rw-r--r--package/tzdata/Makefile4
-rw-r--r--package/tzdata/patches/patch-Makefile101
-rw-r--r--package/tzdata/patches/patch-localtime_c38
4 files changed, 85 insertions, 123 deletions
diff --git a/package/busybox/patches/009-Replace-obsolete-stime-API-with-clock_settime.patch b/package/busybox/patches/009-Replace-obsolete-stime-API-with-clock_settime.patch
new file mode 100644
index 000000000..14795da41
--- /dev/null
+++ b/package/busybox/patches/009-Replace-obsolete-stime-API-with-clock_settime.patch
@@ -0,0 +1,65 @@
+diff -Nur busybox-1.26.2.orig/coreutils/date.c busybox-1.26.2/coreutils/date.c
+--- busybox-1.26.2.orig/coreutils/date.c 2016-12-10 18:46:36.000000000 +0100
++++ busybox-1.26.2/coreutils/date.c 2020-02-04 09:55:25.126083910 +0100
+@@ -267,6 +267,9 @@
+ time(&ts.tv_sec);
+ #endif
+ }
++#if !ENABLE_FEATURE_DATE_NANO
++ ts.tv_nsec = 0;
++#endif
+ localtime_r(&ts.tv_sec, &tm_time);
+
+ /* If date string is given, update tm_time, and maybe set date */
+@@ -289,11 +292,12 @@
+ if (date_str[0] != '@')
+ tm_time.tm_isdst = -1;
+ ts.tv_sec = validate_tm_time(date_str, &tm_time);
++ ts.tv_nsec = 0;
+
+ maybe_set_utc(opt);
+
+ /* if setting time, set it */
+- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
++ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) {
+ bb_perror_msg("can't set date");
+ }
+ }
+diff -Nur busybox-1.26.2.orig/libbb/missing_syscalls.c busybox-1.26.2/libbb/missing_syscalls.c
+--- busybox-1.26.2.orig/libbb/missing_syscalls.c 2016-09-27 18:53:50.000000000 +0200
++++ busybox-1.26.2/libbb/missing_syscalls.c 2020-02-04 09:55:58.848244715 +0100
+@@ -16,14 +16,6 @@
+ return syscall(__NR_getsid, pid);
+ }
+
+-int stime(const time_t *t)
+-{
+- struct timeval tv;
+- tv.tv_sec = *t;
+- tv.tv_usec = 0;
+- return settimeofday(&tv, NULL);
+-}
+-
+ int sethostname(const char *name, size_t len)
+ {
+ return syscall(__NR_sethostname, name, len);
+diff -Nur busybox-1.26.2.orig/util-linux/rdate.c busybox-1.26.2/util-linux/rdate.c
+--- busybox-1.26.2.orig/util-linux/rdate.c 2016-12-10 18:46:36.000000000 +0100
++++ busybox-1.26.2/util-linux/rdate.c 2020-02-04 09:56:53.927774023 +0100
+@@ -79,9 +79,13 @@
+ time(&current_time);
+ if (current_time == remote_time)
+ bb_error_msg("current time matches remote time");
+- else
+- if (stime(&remote_time) < 0)
+- bb_perror_msg_and_die("can't set time of day");
++ else {
++ struct timespec ts;
++ ts.tv_sec = remote_time;
++ ts.tv_nsec = 0;
++ if (clock_settime(CLOCK_REALTIME, &ts) < 0)
++ bb_perror_msg_and_die("can't set time of day");
++ }
+ }
+
+ if (flags != 1) /* not lone -s */
diff --git a/package/tzdata/Makefile b/package/tzdata/Makefile
index bcc100695..d838eabf8 100644
--- a/package/tzdata/Makefile
+++ b/package/tzdata/Makefile
@@ -4,9 +4,9 @@
include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= tzdata
-PKG_VERSION:= 2014d
+PKG_VERSION:= 2019c
PKG_RELEASE:= 1
-PKG_HASH:= 4b4966912f5d4a299b0bdf47e6f3103d82dc6a0b5a6b321e2b9d5662597a62f0 e9c775bb76c9700521ada77776277c25f8650a22b56d46c9f00f4147970ef13e
+PKG_HASH:= 79c7806dab09072308da0e3d22c37d3b245015a591891ea147d3b133b60ffc7c f6ebd3668e02d5ed223d3b7b1947561bf2d2da2f4bd1db61efefd9e06c167ed4
PKG_DESCR:= timezone data (/usr/share/zoneinfo)
PKG_SECTION:= base/apps
PKG_URL:= http://www.iana.org/time-zones/
diff --git a/package/tzdata/patches/patch-Makefile b/package/tzdata/patches/patch-Makefile
index ed1bba324..faf30fcd9 100644
--- a/package/tzdata/patches/patch-Makefile
+++ b/package/tzdata/patches/patch-Makefile
@@ -1,107 +1,42 @@
---- w-tzdata-2014d-1.orig/Makefile 2014-05-28 06:35:46.000000000 +0200
-+++ w-tzdata-2014d-1/Makefile 2014-05-30 09:15:54.792171067 +0200
-@@ -45,33 +45,33 @@ POSIXRULES= America/New_York
-
- # Everything gets put in subdirectories of. . .
-
--TOPDIR= /usr/local
-+TZTOPDIR= /usr
-
- # "Compiled" time zone information is placed in the "TZDIR" directory
- # (and subdirectories).
- # Use an absolute path name for TZDIR unless you're just testing the software.
-
- TZDIR_BASENAME= zoneinfo
--TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME)
-+TZDIR= $(TZTOPDIR)/etc/$(TZDIR_BASENAME)
-
- # Types to try, as an alternative to time_t. int64_t should be first.
- TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
-
- # The "tzselect", "zic", and "zdump" commands get installed in. . .
-
--ETCDIR= $(TOPDIR)/etc
-+ETCDIR= $(TZTOPDIR)/etc
-
- # If you "make INSTALL", the "date" command gets installed in. . .
-
--BINDIR= $(TOPDIR)/bin
-+BINDIR= $(TZTOPDIR)/bin
-
- # Manual pages go in subdirectories of. . .
-
--MANDIR= $(TOPDIR)/man
-+MANDIR= $(TZTOPDIR)/man
-
- # Library functions are put in an archive in LIBDIR.
-
--LIBDIR= $(TOPDIR)/lib
-+LIBDIR= $(TZTOPDIR)/lib
-
- # If you always want time values interpreted as "seconds since the epoch
- # (not counting leap seconds)", use
-@@ -224,7 +224,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co
- # before the first Monday in January when a "%V" format is used and January 1
+--- w-tzdata-2019c-1.orig/Makefile 2019-07-01 09:06:38.000000000 +0200
++++ w-tzdata-2019c-1/Makefile 2020-02-04 09:33:12.012662611 +0100
+@@ -365,7 +365,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
+ # January's first Monday when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.
-CFLAGS=
+CFLAGS?=
# Linker flags. Default to $(LFLAGS) for backwards compatibility
- # to tzcode2012h and earlier.
-@@ -232,7 +232,7 @@ CFLAGS=
- LDFLAGS= $(LFLAGS)
+ # to release 2012h and earlier.
+@@ -380,7 +380,7 @@ LEAPSECONDS=
+ # The zic command and its arguments.
zic= ./zic
-ZIC= $(zic) $(ZFLAGS)
+ZIC= ./zic_for_build $(ZFLAGS)
- ZFLAGS=
-
-@@ -338,7 +338,7 @@ SHELL= /bin/sh
+ # To shrink the size of installed TZif files,
+ # append "-r @N" to omit data before N-seconds-after-the-Epoch.
+@@ -579,7 +579,7 @@ SHELL= /bin/sh
+ all: tzselect yearistype zic zdump libtz.a $(TABDATA) \
+ vanguard.zi main.zi rearguard.zi
- all: tzselect zic zdump libtz.a $(TABDATA)
-
--ALL: all date
-+ALL: zic_for_build date
+-ALL: all date $(ENCHILADA)
++ALL: zic_for_build date $(ENCHILADA)
install: all $(DATA) $(REDO) $(MANS)
- mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
-@@ -371,6 +371,14 @@ zdump: $(TZDOBJS)
- zic: $(TZCOBJS) yearistype
+ mkdir -p '$(DESTDIR)$(BINDIR)' \
+@@ -646,6 +646,12 @@ zdump: $(TZDOBJS)
+ zic: $(TZCOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
+zic_for_build: version.h
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) zic.c -o zic_build.o
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) localtime.c -o localtime_build.o
+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) asctime.c -o asctime_build.o
-+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) scheck.c -o scheck_build.o
-+ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) ialloc.c -o ialloc_build.o
-+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ zic_build.o localtime_build.o asctime_build.o scheck_build.o ialloc_build.o
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -o $@ zic_build.o localtime_build.o asctime_build.o
+
yearistype: yearistype.sh
cp yearistype.sh yearistype
chmod +x yearistype
-@@ -378,11 +386,11 @@ yearistype: yearistype.sh
- leapseconds: $(LEAP_DEPS)
- $(AWK) -f leapseconds.awk leap-seconds.list >$@
-
--posix_only: zic $(TDATA)
-+posix_only: zic_for_build $(TDATA)
- $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
- -L /dev/null $(TDATA)
-
--right_only: zic leapseconds $(TDATA)
-+right_only: zic_for_build leapseconds $(TDATA)
- $(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) \
- -L leapseconds $(TDATA)
-
-@@ -520,7 +528,7 @@ check_time_t_alternatives:
- for type in $(TIME_T_ALTERNATIVES); do \
- mkdir -p tzpublic/$$type && \
- make clean_misc && \
-- make TOPDIR=`pwd`/tzpublic/$$type \
-+ make TZTOPDIR=`pwd`/tzpublic/$$type \
- CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
- install && \
- diff -qr tzpublic/int64_t/etc/zoneinfo tzpublic/$$type/etc/zoneinfo && \
diff --git a/package/tzdata/patches/patch-localtime_c b/package/tzdata/patches/patch-localtime_c
deleted file mode 100644
index 548d10073..000000000
--- a/package/tzdata/patches/patch-localtime_c
+++ /dev/null
@@ -1,38 +0,0 @@
---- w-tzdata-2014d-1.orig/localtime.c 2014-01-18 07:42:22.000000000 +0100
-+++ w-tzdata-2014d-1/localtime.c 2014-05-30 09:09:35.130879741 +0200
-@@ -1329,7 +1329,7 @@ localsub(const time_t *const timep, cons
- }
-
- struct tm *
--localtime(const time_t *const timep)
-+localtime_tz(const time_t *const timep)
- {
- tzset();
- return localsub(timep, 0L, &tm);
-@@ -1550,7 +1550,7 @@ ctime(const time_t *const timep)
- ** to local time in the form of a string. It is equivalent to
- ** asctime(localtime(timer))
- */
-- return asctime(localtime(timep));
-+ return asctime(localtime_tz(timep));
- }
-
- char *
-@@ -1929,7 +1929,7 @@ time1(struct tm *const tmp,
- }
-
- time_t
--mktime(struct tm *const tmp)
-+mktime_tz(struct tm *const tmp)
- {
- tzset();
- return time1(tmp, localsub, 0L);
-@@ -1973,7 +1973,7 @@ timeoff(struct tm *const tmp, const long
- long
- gtime(struct tm *const tmp)
- {
-- const time_t t = mktime(tmp);
-+ const time_t t = mktime_tz(tmp);
-
- if (t == WRONG)
- return -1;