summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog5
-rw-r--r--debian/patches/add-throw-for-nanosleep.diff36
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/utime.diff25
-rw-r--r--debian/patches/y2038-force-2.diff94
5 files changed, 163 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 67178484..956d7545 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
-glibc (2.31-2038.2) UNRELEASED; urgency=medium
+glibc (2.31-2038.5) UNRELEASED; urgency=medium
[ Arnd Bergmann ]
* Import https://github.com/lmajewski/y2038_glibc/commits/y2038_edge
* Force-enable time64
+ * rework a few more times
+ * bugfixes
+ * clean up patch stack, no functional changes
-- Arnd Bergmann <arnd@arndb.de> Tue, 03 Mar 2020 10:00:09 +0100
diff --git a/debian/patches/add-throw-for-nanosleep.diff b/debian/patches/add-throw-for-nanosleep.diff
new file mode 100644
index 00000000..2000089c
--- /dev/null
+++ b/debian/patches/add-throw-for-nanosleep.diff
@@ -0,0 +1,36 @@
+Description: add THROW for nanosleep
+
+This fixes a build failure
+ .
+ glibc (2.31-2038.3) UNRELEASED; urgency=medium
+ .
+ [ Arnd Bergmann ]
+ * Import https://github.com/lmajewski/y2038_glibc/commits/y2038_edge
+ * Force-enable time64
+ * rework a few more times
+Author: Arnd Bergmann <arnd@arndb.de>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2020-03-05
+
+--- glibc-2.31.orig/time/time.h
++++ glibc-2.31/time/time.h
+@@ -311,7 +311,7 @@ extern int __REDIRECT_NTH (clock_settime
+ __THROW. */
+ extern int clock_nanosleep (clockid_t __clock_id, int __flags,
+ const struct timespec *__req,
+- struct timespec *__rem);
++ struct timespec *__rem) __THROW;
+
+ #ifdef __USE_TIME_BITS64
+ # if defined(__REDIRECT_NTH)
diff --git a/debian/patches/series b/debian/patches/series
index 56400cda..0d6fe119 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -123,3 +123,7 @@ any/local-test-install.diff
any/submitted-stt-gnu-ifunc-detection.patch
#y2038-force.diff
#try-to-avoid-time32
+add-throw-for-nanosleep.diff
+utime.diff
+y2038-force-2.diff
+#notquite.diff
diff --git a/debian/patches/utime.diff b/debian/patches/utime.diff
new file mode 100644
index 00000000..4d3f6d8f
--- /dev/null
+++ b/debian/patches/utime.diff
@@ -0,0 +1,25 @@
+Subject: utime fix
+
+This was apparently fixed upstream already.
+
+Index: glibc-2.31/sysdeps/unix/sysv/linux/utime.c
+===================================================================
+--- glibc-2.31.orig/sysdeps/unix/sysv/linux/utime.c
++++ glibc-2.31/sysdeps/unix/sysv/linux/utime.c
+@@ -18,6 +18,7 @@
+
+ #include <utime.h>
+ #include <time.h>
++#include <fcntl.h>
+
+ int
+ __utime64 (const char *file, const struct __utimbuf64 *times)
+@@ -32,7 +33,7 @@ __utime64 (const char *file, const struc
+ ts64[1].tv_nsec = 0LL;
+ }
+
+- return __utimensat64_helper (0, file, times ? ts64 : NULL, 0);
++ return __utimensat64_helper (AT_FDCWD, file, times ? ts64 : NULL, 0);
+ }
+
+ #if __TIMESIZE != 64
diff --git a/debian/patches/y2038-force-2.diff b/debian/patches/y2038-force-2.diff
new file mode 100644
index 00000000..4403d985
--- /dev/null
+++ b/debian/patches/y2038-force-2.diff
@@ -0,0 +1,94 @@
+commit 60e147c762e532345755bd68a3d012ba44db004c
+Author: Arnd Bergmann <arnd@arndb.de>
+Date: Wed Mar 4 15:25:30 2020 +0100
+
+ y2038: force time64 symbols
+
+ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+
+Index: glibc-2.31-2038-5/include/features.h
+===================================================================
+--- glibc-2.31-2038-5.orig/include/features.h
++++ glibc-2.31-2038-5/include/features.h
+@@ -376,13 +376,23 @@
+ # define __USE_LARGEFILE64 1
+ #endif
+
++/* We need to know the word size in order to check the time size. */
++#include <bits/timesize.h>
++
++/* force _FILE_OFFSET_BITS and _TIME_BITS */
++#if !defined _LIBC && __TIMESIZE == 32
++#if !(defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64)
++#define _FILE_OFFSET_BITS 64
++#endif
++#if !(defined _TIME_BITS && _TIME_BITS == 64)
++#define _TIME_BITS 64
++#endif
++#endif
++
+ #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64
+ # define __USE_FILE_OFFSET64 1
+ #endif
+
+-/* We need to know the word size in order to check the time size. */
+-#include <bits/wordsize.h>
+-
+ #if defined _TIME_BITS
+ # if _TIME_BITS == 64
+ # if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
+Index: glibc-2.31-2038-5/sysdeps/unix/sysv/linux/kernel-features.h
+===================================================================
+--- glibc-2.31-2038-5.orig/sysdeps/unix/sysv/linux/kernel-features.h
++++ glibc-2.31-2038-5/sysdeps/unix/sysv/linux/kernel-features.h
+@@ -178,35 +178,9 @@
+ timerfd_settime(64)
+ utimensat(_time64)
+
+- On architectures where time_t has historically been 64 bits,
+- only the 64-bit version of each system call exists, and there
+- are no suffixes on the __NR_ constants.
+-
+- On architectures where time_t has historically been 32 bits,
+- both 32-bit and 64-bit versions of each system call may exist,
+- depending on the kernel version. When the 64-bit version exists,
+- there is a '64' or '_time64' suffix on the name of its __NR_
+- constant, as shown above.
+-
+- This flag is always set for Linux 5.1 and later. Prior to that
+- version, it is set only for some CPU architectures and ABIs:
+-
+- - __WORDSIZE == 64 - all supported architectures where pointers
+- are 64 bits also have always had 64-bit time_t.
+-
+- - __WORDSIZE == 32 && __SYSCALL_WORDSIZE == 64 - this describes
+- only one supported configuration, x86's 'x32' subarchitecture,
+- where pointers are 32 bits but time_t has always been 64 bits.
+-
+- __ASSUME_TIME64_SYSCALLS being set does not mean __TIMESIZE is 64,
+- and __TIMESIZE equal to 64 does not mean __ASSUME_TIME64_SYSCALLS
+- is set. All four cases are possible. */
+-
+-#if __LINUX_KERNEL_VERSION >= 0x050100 \
+- || __WORDSIZE == 64 \
+- || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64)
++ Assume we are using a new kernel for now
++*/
+ # define __ASSUME_TIME64_SYSCALLS 1
+-#endif
+
+ /* Linux waitid prior kernel 5.4 does not support waiting for the current
+ process group. */
+Index: glibc-2.31-2038-5/sysdeps/unix/sysv/linux/x86/bits/timesize.h
+===================================================================
+--- glibc-2.31-2038-5.orig/sysdeps/unix/sysv/linux/x86/bits/timesize.h
++++ glibc-2.31-2038-5/sysdeps/unix/sysv/linux/x86/bits/timesize.h
+@@ -16,6 +16,8 @@
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
++#include <bits/wordsize.h>
++
+ #if defined __x86_64__ && defined __ILP32__
+ /* For x32, time is 64-bit even though word size is 32-bit. */
+ # define __TIMESIZE 64