From 74d7278295f57776d800457da5018a2579a7584f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Dec 2019 14:45:58 +0000 Subject: system/musl: bump to 1.2.0 alpha1 --- system/musl/APKBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 1cc77301b..86baab9f1 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox pkgname=musl -pkgver=1.1.24 +pkgver=1.2.0_alpha1 pkgrel=0 pkgdesc="System library (libc) implementation" url="https://www.musl-libc.org/" @@ -21,7 +21,7 @@ nolibc) ;; triggers="$pkgname-utils.trigger=/etc/ld.so.conf.d" ;; esac -source="https://www.musl-libc.org/releases/musl-$pkgver.tar.gz +source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz amalgamation.patch 3001-make-real-lastlog-h.patch handle-aux-at_base.patch @@ -117,7 +117,7 @@ utils() { install -D -m755 "$srcdir"/ldconfig "$subpkgdir"/sbin } -sha512sums="8987f1e194ea616f34f4f21fe9def28fb7f81d7060e38619206c6349f79db3bbb76bae8b711f5f9b8ed038799c9aea1a4cbec69e0bc4131e246203e133149e77 musl-1.1.24.tar.gz +sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06314c434224fc8eef2b858107e42c10f220b6009ce4b919d8d9996cfcb839 musl-1.2.0_alpha1.tar.xz ef532aebeaa89b3274f7f75f1adaa4d1eea60f4e2822a6711c748768cc3a65a77ebd218d7a8ab41157684f7855dd4c5c2cdea7461b7569264d3517deba0ef9b2 amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch -- cgit v1.2.3-70-g09d2 From 853ed477cdfb4d5e3f2d331f818caaf8377dddb1 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Dec 2019 15:03:50 +0000 Subject: system/musl: Update POSIX conformance patches for 1.2.0 --- system/musl/APKBUILD | 4 +- system/musl/amalgamation.patch | 329 +++++++++++++++++++++---------- system/musl/strftime-add-l-support.patch | 25 --- 3 files changed, 221 insertions(+), 137 deletions(-) delete mode 100644 system/musl/strftime-add-l-support.patch (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 86baab9f1..1cd0a2a6e 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -26,7 +26,6 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz 3001-make-real-lastlog-h.patch handle-aux-at_base.patch fgetspent_r.patch - strftime-add-l-support.patch ldconfig getent.c @@ -118,11 +117,10 @@ utils() { } sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06314c434224fc8eef2b858107e42c10f220b6009ce4b919d8d9996cfcb839 musl-1.2.0_alpha1.tar.xz -ef532aebeaa89b3274f7f75f1adaa4d1eea60f4e2822a6711c748768cc3a65a77ebd218d7a8ab41157684f7855dd4c5c2cdea7461b7569264d3517deba0ef9b2 amalgamation.patch +f16a76c1f7dd70cda8013507c2feee905a2bb8d2aa4e6a88b7dbe3b8b587be747821079a052b1fd24691162e7606912b5e0c2c2b0402db51bb768ea28a9c5c9f amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch -7ed6c620a5ea5585c323936b1ff01eb7f01a1192240706a0d0470b661a7a03ea10ed17507c59678aaedce51b7a5ea839c2f528f19f12de02119bf4e47f7c3998 strftime-add-l-support.patch cb71d29a87f334c75ecbc911becde7be825ab30d8f39fa6d64cb53812a7c9abaf91d9804c72540e5be3ddd3c84cfe7fd9632274309005cb8bcdf9a9b09b4b923 ldconfig 378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c" diff --git a/system/musl/amalgamation.patch b/system/musl/amalgamation.patch index e53290e21..6f66a18cb 100644 --- a/system/musl/amalgamation.patch +++ b/system/musl/amalgamation.patch @@ -1,5 +1,5 @@ diff --git a/include/stdlib.h b/include/stdlib.h -index 42ca8336..4bbaded0 100644 +index 194c2033..5734b1f0 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -39,14 +39,18 @@ void *malloc (size_t); @@ -38,7 +38,7 @@ index 42ca8336..4bbaded0 100644 void *valloc (size_t); void *memalign(size_t, size_t); diff --git a/include/time.h b/include/time.h -index 672b3fc3..c5946dd0 100644 +index 5494df18..2412fe22 100644 --- a/include/time.h +++ b/include/time.h @@ -58,11 +58,14 @@ struct tm *gmtime (const time_t *); @@ -48,7 +48,7 @@ index 672b3fc3..c5946dd0 100644 -int timespec_get(struct timespec *, int); -#define CLOCKS_PER_SEC 1000000L -+#if __STDC_VERSION__ >= 201112L ++#if __STDC_VERSION__ >= 201112L || defined(_BSD_SOURCE) || defined(_GNU_SOURCE) +int timespec_get(struct timespec *, int); #define TIME_UTC 1 @@ -58,11 +58,58 @@ index 672b3fc3..c5946dd0 100644 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ +@@ -137,7 +140,10 @@ __REDIR(mktime, __mktime64); + __REDIR(gmtime, __gmtime64); + __REDIR(localtime, __localtime64); + __REDIR(ctime, __ctime64); ++# if __STDC_VERSION__ >= 201112L || defined(_BSD_SOURCE) \ ++ || defined(_GNU_SOURCE) + __REDIR(timespec_get, __timespec_get_time64); ++# endif + #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) diff --git a/include/unistd.h b/include/unistd.h -index 9485da7a..1bdd3292 100644 +index 7bcbff94..6fd67160 100644 --- a/include/unistd.h +++ b/include/unistd.h -@@ -274,6 +274,7 @@ int eaccess(const char *, int); +@@ -33,16 +33,23 @@ extern "C" { + #include + + int pipe(int [2]); +-int pipe2(int [2], int); + int close(int); +-int posix_close(int, int); + int dup(int); + int dup2(int, int); +-int dup3(int, int, int); + off_t lseek(int, off_t, int); + int fsync(int); + int fdatasync(int); + ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \ ++ || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 > 700) \ ++ || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE+0 > 200809L) ++int pipe2(int [2], int); ++int dup3(int, int, int); ++int posix_close(int, int); ++ ++#define POSIX_CLOSE_RESTART 0 ++#endif ++ + ssize_t read(int, void *, size_t); + ssize_t write(int, const void *, size_t); + ssize_t pread(int, void *, size_t, off_t); +@@ -202,8 +209,6 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); + #define off64_t off_t + #endif + +-#define POSIX_CLOSE_RESTART 0 +- + #define _XOPEN_VERSION 700 + #define _XOPEN_UNIX 1 + #define _XOPEN_ENH_I18N 1 +@@ -276,6 +281,7 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); #define _PC_ALLOC_SIZE_MIN 18 #define _PC_SYMLINK_MAX 19 #define _PC_2_SYMLINKS 20 @@ -70,7 +117,7 @@ index 9485da7a..1bdd3292 100644 #define _SC_ARG_MAX 0 #define _SC_CHILD_MAX 1 -@@ -417,6 +418,7 @@ int eaccess(const char *, int); +@@ -419,6 +425,7 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); #define _SC_XOPEN_STREAMS 246 #define _SC_THREAD_ROBUST_PRIO_INHERIT 247 #define _SC_THREAD_ROBUST_PRIO_PROTECT 248 @@ -78,7 +125,7 @@ index 9485da7a..1bdd3292 100644 #define _CS_PATH 0 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 1 -@@ -459,6 +461,8 @@ int eaccess(const char *, int); +@@ -461,6 +468,8 @@ ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS 1147 #define _CS_V6_ENV 1148 #define _CS_V7_ENV 1149 @@ -103,18 +150,20 @@ index 02cb1aa2..8f870a69 100644 return 0; } diff --git a/src/conf/fpathconf.c b/src/conf/fpathconf.c -index e6aca5cf..b6a9d63e 100644 +index e6aca5cf..83e47e87 100644 --- a/src/conf/fpathconf.c +++ b/src/conf/fpathconf.c -@@ -4,7 +4,7 @@ +@@ -4,8 +4,8 @@ long fpathconf(int fd, int name) { - static const short values[] = { +- [_PC_LINK_MAX] = _POSIX_LINK_MAX, + static const long values[] = { - [_PC_LINK_MAX] = _POSIX_LINK_MAX, ++ [_PC_LINK_MAX] = -1, [_PC_MAX_CANON] = _POSIX_MAX_CANON, [_PC_MAX_INPUT] = _POSIX_MAX_INPUT, + [_PC_NAME_MAX] = NAME_MAX, @@ -25,7 +25,8 @@ long fpathconf(int fd, int name) [_PC_REC_XFER_ALIGN] = 4096, [_PC_ALLOC_SIZE_MIN] = 4096, @@ -126,7 +175,7 @@ index e6aca5cf..b6a9d63e 100644 if (name >= sizeof(values)/sizeof(values[0])) { errno = EINVAL; diff --git a/src/conf/sysconf.c b/src/conf/sysconf.c -index 45ef1c16..483e1635 100644 +index 3baaed32..04369596 100644 --- a/src/conf/sysconf.c +++ b/src/conf/sysconf.c @@ -165,6 +165,7 @@ long sysconf(int name) @@ -138,10 +187,10 @@ index 45ef1c16..483e1635 100644 if (name >= sizeof(values)/sizeof(values[0]) || !values[name]) { diff --git a/src/locale/setlocale.c b/src/locale/setlocale.c -index 40bc7ece..4d51cdfe 100644 +index 2bc7b500..4a601eaf 100644 --- a/src/locale/setlocale.c +++ b/src/locale/setlocale.c -@@ -11,6 +11,8 @@ char *setlocale(int cat, const char *name) +@@ -14,6 +14,8 @@ char *setlocale(int cat, const char *name) if ((unsigned)cat > LC_ALL) return 0; @@ -150,6 +199,24 @@ index 40bc7ece..4d51cdfe 100644 LOCK(lock); /* For LC_ALL, setlocale is required to return a string which +diff --git a/src/misc/forkpty.c b/src/misc/forkpty.c +index caf13adb..43494b96 100644 +--- a/src/misc/forkpty.c ++++ b/src/misc/forkpty.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE + #include + #include + #include +diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c +index db83a69f..be9cb6d5 100644 +--- a/src/misc/wordexp.c ++++ b/src/misc/wordexp.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE + #include + #include + #include diff --git a/src/process/execlp.c b/src/process/execlp.c index 5eed886e..f6da398b 100644 --- a/src/process/execlp.c @@ -202,18 +269,18 @@ index 00000000..180bb2aa + return execv("/bin/sh", nargv); +} diff --git a/src/process/execvp.c b/src/process/execvp.c -index 2dddeddb..fdd0ca48 100644 +index ef3b9dd5..5e6255f7 100644 --- a/src/process/execvp.c +++ b/src/process/execvp.c -@@ -6,6 +6,7 @@ - #include "libc.h" +@@ -5,6 +5,7 @@ + #include extern char **__environ; +extern int __execsh(const char *, char *const []); int __execvpe(const char *file, char *const argv[], char *const envp[]) { -@@ -56,7 +57,12 @@ int __execvpe(const char *file, char *const argv[], char *const envp[]) +@@ -54,7 +55,12 @@ int __execvpe(const char *file, char *const argv[], char *const envp[]) int execvp(const char *file, char *const argv[]) { @@ -228,10 +295,10 @@ index 2dddeddb..fdd0ca48 100644 weak_alias(__execvpe, execvpe); diff --git a/src/process/system.c b/src/process/system.c -index 9135b815..aa01e13b 100644 +index 5af59b80..3f61d278 100644 --- a/src/process/system.c +++ b/src/process/system.c -@@ -19,7 +19,9 @@ int system(const char *cmd) +@@ -18,7 +18,9 @@ int system(const char *cmd) pthread_testcancel(); @@ -242,11 +309,20 @@ index 9135b815..aa01e13b 100644 sigaction(SIGINT, &sa, &oldint); sigaction(SIGQUIT, &sa, &oldquit); +diff --git a/src/stdio/popen.c b/src/stdio/popen.c +index 92cb57ee..70c5d6ec 100644 +--- a/src/stdio/popen.c ++++ b/src/stdio/popen.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE + #include + #include + #include diff --git a/src/thread/pthread_attr_setinheritsched.c b/src/thread/pthread_attr_setinheritsched.c -index e540e846..4115e2fe 100644 +index ca264be7..fbfff6f8 100644 --- a/src/thread/pthread_attr_setinheritsched.c +++ b/src/thread/pthread_attr_setinheritsched.c -@@ -23,7 +23,7 @@ void *__start_sched(void *p) +@@ -3,7 +3,7 @@ int pthread_attr_setinheritsched(pthread_attr_t *a, int inherit) { @@ -267,11 +343,24 @@ index 46b520c0..933bdb38 100644 + return ENOTSUP; } } +diff --git a/src/time/strftime.c b/src/time/strftime.c +index cc53d536..98caa1f6 100644 +--- a/src/time/strftime.c ++++ b/src/time/strftime.c +@@ -95,6 +95,8 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * + case 'H': + val = tm->tm_hour; + goto number; ++ case 'l': ++ def_pad = ' '; + case 'I': + val = tm->tm_hour; + if (!val) val = 12; diff --git a/src/time/timespec_get.c b/src/time/timespec_get.c -index 03c5a77b..c423b825 100644 +index 40ea9c1c..6ba68559 100644 --- a/src/time/timespec_get.c +++ b/src/time/timespec_get.c -@@ -6,7 +6,7 @@ int __clock_gettime(clockid_t, struct timespec *); +@@ -4,7 +4,7 @@ * are considered erroneous. */ int timespec_get(struct timespec * ts, int base) { @@ -280,6 +369,15 @@ index 03c5a77b..c423b825 100644 int ret = __clock_gettime(CLOCK_REALTIME, ts); return ret < 0 ? 0 : base; } +diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c +index 76bbd4c7..0b4564f9 100644 +--- a/src/unistd/faccessat.c ++++ b/src/unistd/faccessat.c +@@ -1,3 +1,4 @@ ++#define _GNU_SOURCE + #include + #include + #include diff --git a/src/unistd/getcwd.c b/src/unistd/getcwd.c index f407ffe0..4fd3a60c 100644 --- a/src/unistd/getcwd.c @@ -297,92 +395,105 @@ index f407ffe0..4fd3a60c 100644 if (ret == 0 || buf[0] != '/') { errno = ENOENT; return 0; -diff --git a/src/conf/fpathconf.c b/src/conf/fpathconf.c -index b6a9d63e..83e47e87 100644 ---- a/src/conf/fpathconf.c -+++ b/src/conf/fpathconf.c -@@ -5,7 +5,7 @@ - long fpathconf(int fd, int name) - { - static const long values[] = { -- [_PC_LINK_MAX] = _POSIX_LINK_MAX, -+ [_PC_LINK_MAX] = -1, - [_PC_MAX_CANON] = _POSIX_MAX_CANON, - [_PC_MAX_INPUT] = _POSIX_MAX_INPUT, - [_PC_NAME_MAX] = NAME_MAX, -diff --git a/include/unistd.h b/include/unistd.h -index 1bdd3292..cdb16c19 100644 ---- a/include/unistd.h -+++ b/include/unistd.h -@@ -33,16 +33,23 @@ extern "C" { - #include - - int pipe(int [2]); --int pipe2(int [2], int); - int close(int); --int posix_close(int, int); - int dup(int); - int dup2(int, int); --int dup3(int, int, int); - off_t lseek(int, off_t, int); - int fsync(int); - int fdatasync(int); +diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c +index c3b40a25..e2f03d39 100644 +--- a/src/unistd/renameat.c ++++ b/src/unistd/renameat.c +@@ -1,11 +1,93 @@ ++#include ++#include ++#include ++#include + #include ++#include ++#include ++#include ++#include + #include "syscall.h" -+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \ -+ || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 > 700) \ -+ || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE+0 > 200809L) -+int pipe2(int [2], int); -+int dup3(int, int, int); -+int posix_close(int, int); ++static inline int test_symlink_dirness(int fd, const char *pathname) ++{ ++ struct stat statbuf; ++ if (fstatat(fd, pathname, &statbuf, AT_SYMLINK_NOFOLLOW) == -1) { ++ return 1; ++ } ++ if (S_ISLNK(statbuf.st_mode)) { ++ if (fstatat(fd, pathname, &statbuf, 0) == -1) return 1; + -+#define POSIX_CLOSE_RESTART 0 -+#endif ++ if (S_ISDIR(statbuf.st_mode)) return 0; ++ else { ++ errno = ENOTDIR; ++ return -1; ++ } ++ } ++ return 1; ++} + - ssize_t read(int, void *, size_t); - ssize_t write(int, const void *, size_t); - ssize_t pread(int, void *, size_t, off_t); -@@ -200,8 +207,6 @@ int eaccess(const char *, int); - #define off64_t off_t - #endif - --#define POSIX_CLOSE_RESTART 0 -- - #define _XOPEN_VERSION 700 - #define _XOPEN_UNIX 1 - #define _XOPEN_ENH_I18N 1 -diff --git a/src/misc/forkpty.c b/src/misc/forkpty.c -index caf13adb..047eb7d6 100644 ---- a/src/misc/forkpty.c -+++ b/src/misc/forkpty.c -@@ -1,3 +1,4 @@ -+#define _GNU_SOURCE - #include - #include - #include -diff --git a/src/misc/wordexp.c b/src/misc/wordexp.c -index db83a69f..1ae03f9f 100644 ---- a/src/misc/wordexp.c -+++ b/src/misc/wordexp.c -@@ -1,3 +1,4 @@ -+#define _GNU_SOURCE - #include - #include - #include -diff --git a/src/stdio/popen.c b/src/stdio/popen.c -index 92cb57ee..1ff9e0d9 100644 ---- a/src/stdio/popen.c -+++ b/src/stdio/popen.c -@@ -1,3 +1,4 @@ -+#define _GNU_SOURCE - #include - #include - #include -diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c -index 76bbd4c7..d5e70608 100644 ---- a/src/unistd/faccessat.c -+++ b/src/unistd/faccessat.c -@@ -1,3 +1,4 @@ -+#define _GNU_SOURCE - #include - #include - #include + int renameat(int oldfd, const char *old, int newfd, const char *new) + { +-#ifdef SYS_renameat ++ char old_copy[PATH_MAX+1], new_copy[PATH_MAX+1]; ++ char *base; ++ size_t old_size, new_size; ++ struct stat oldstat, newstat; ++ int r; ++ ++ if ((old_size = strlen(old)) > PATH_MAX || \ ++ (new_size = strlen(new)) > PATH_MAX) { ++ errno = ENAMETOOLONG; ++ return -1; ++ } ++ ++ if (old_size == 0 || new_size == 0) { ++ errno = ENOENT; ++ return -1; ++ } ++ ++ /* Test equality of old and new. ++ If they both resolve to the same dentry, we do nothing. */ ++ if (fstatat(oldfd, old, &oldstat, 0) == 0 && \ ++ fstatat(newfd, new, &newstat, 0) == 0 && \ ++ oldstat.st_dev == newstat.st_dev && \ ++ oldstat.st_ino == newstat.st_ino) return 0; ++ ++ strcpy(old_copy, old); ++ strcpy(new_copy, new); ++ ++ base = basename(old_copy); ++ strncpy(old_copy, base, sizeof(old_copy)); ++ base = basename(new_copy); ++ strncpy(new_copy, base, sizeof(new_copy)); ++ ++ if (strcmp(old_copy, ".") == 0 || strcmp(old_copy, "..") == 0 || ++ strcmp(new_copy, ".") == 0 || strcmp(new_copy, "..") == 0) { ++ errno = EINVAL; ++ return -1; ++ } ++ ++ /* The Linux kernel will fail when attempting to rename a symlink of a ++ directory with a trailing slash. We therefore have to handle this ++ case ourselves. */ ++ if (old[old_size - 1] == '/') { ++ /* Calling stat(2) on a symlink to a dir with the trailing ++ slash causes stat(2) to return the actual directory instead ++ of the symlink itself. */ ++ strcpy(old_copy, old); ++ old_copy[old_size - 1] = '\0'; ++ r = test_symlink_dirness(oldfd, old_copy); ++ if (r == 0) old = old_copy; ++ else if (r == -1) return -1; ++ } ++ ++ if (new[new_size - 1] == '/') { ++ strcpy(new_copy, new); ++ new_copy[new_size - 1] = '\0'; ++ r = test_symlink_dirness(newfd, new_copy); ++ if (r == 0) new = new_copy; ++ else if (r == -1) return -1; ++ } ++ + return syscall(SYS_renameat, oldfd, old, newfd, new); +-#else +- return syscall(SYS_renameat2, oldfd, old, newfd, new, 0); +-#endif + } diff --git a/system/musl/strftime-add-l-support.patch b/system/musl/strftime-add-l-support.patch deleted file mode 100644 index 8305a9910..000000000 --- a/system/musl/strftime-add-l-support.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 481def0e92ebfe81f40f416ddf345de15647e46b Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" -Date: Fri, 31 May 2019 19:03:20 -0500 -Subject: [PATCH] strftime: add %l support - ---- - src/time/strftime.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/time/strftime.c b/src/time/strftime.c -index cc53d536..98caa1f6 100644 ---- a/src/time/strftime.c -+++ b/src/time/strftime.c -@@ -95,6 +95,8 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * - case 'H': - val = tm->tm_hour; - goto number; -+ case 'l': -+ def_pad = ' '; - case 'I': - val = tm->tm_hour; - if (!val) val = 12; --- -2.21.0 - -- cgit v1.2.3-70-g09d2 From 0a75f9b4d51fb8a04950c558e8fee3197f6ea2c3 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Dec 2019 15:06:19 +0000 Subject: system/musl: Ensure time32 POSIX compat --- system/musl/APKBUILD | 2 +- system/musl/amalgamation.patch | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 1cd0a2a6e..2509e692a 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -117,7 +117,7 @@ utils() { } sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06314c434224fc8eef2b858107e42c10f220b6009ce4b919d8d9996cfcb839 musl-1.2.0_alpha1.tar.xz -f16a76c1f7dd70cda8013507c2feee905a2bb8d2aa4e6a88b7dbe3b8b587be747821079a052b1fd24691162e7606912b5e0c2c2b0402db51bb768ea28a9c5c9f amalgamation.patch +0f2f9db619ca14791ab3beff86e9922150c8106ba045fe858f88d1c156eb39198d6aac7eac42482f9ab9be878ce210eed24f1b1aa3eb211aa00e3d05943d536a amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch diff --git a/system/musl/amalgamation.patch b/system/musl/amalgamation.patch index 6f66a18cb..ba2c43d3c 100644 --- a/system/musl/amalgamation.patch +++ b/system/musl/amalgamation.patch @@ -1,3 +1,12 @@ +diff --git a/compat/time32/timespec_get_time32.c b/compat/time32/timespec_get_time32.c +index e9ca94cb..b39b12ee 100644 +--- a/compat/time32/timespec_get_time32.c ++++ b/compat/time32/timespec_get_time32.c +@@ -1,3 +1,4 @@ ++#define _BSD_SOURCE + #include "time32.h" + #include + #include diff --git a/include/stdlib.h b/include/stdlib.h index 194c2033..5734b1f0 100644 --- a/include/stdlib.h -- cgit v1.2.3-70-g09d2 From 2b1a10d34bf6683f737aa1e510101b340c8df3db Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Dec 2019 15:09:26 +0000 Subject: system/musl: some day it *will* build on ppc32 --- system/musl/APKBUILD | 2 +- system/musl/amalgamation.patch | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 2509e692a..27b39f584 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -117,7 +117,7 @@ utils() { } sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06314c434224fc8eef2b858107e42c10f220b6009ce4b919d8d9996cfcb839 musl-1.2.0_alpha1.tar.xz -0f2f9db619ca14791ab3beff86e9922150c8106ba045fe858f88d1c156eb39198d6aac7eac42482f9ab9be878ce210eed24f1b1aa3eb211aa00e3d05943d536a amalgamation.patch +3f2f4eb4bfa1ddb19276e85fa97bf65dfc804cf9ea6e8ad7f1fef4a7930439e840d270f17c3b7e9dc816beb6ba4e33132b0b1a004750bff365161d63c8e8855e amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch diff --git a/system/musl/amalgamation.patch b/system/musl/amalgamation.patch index ba2c43d3c..8f018a07a 100644 --- a/system/musl/amalgamation.patch +++ b/system/musl/amalgamation.patch @@ -366,18 +366,14 @@ index cc53d536..98caa1f6 100644 val = tm->tm_hour; if (!val) val = 12; diff --git a/src/time/timespec_get.c b/src/time/timespec_get.c -index 40ea9c1c..6ba68559 100644 +index 40ea9c1c..e396da09 100644 --- a/src/time/timespec_get.c +++ b/src/time/timespec_get.c -@@ -4,7 +4,7 @@ - * are considered erroneous. */ - int timespec_get(struct timespec * ts, int base) - { -- if (base != TIME_UTC) return 0; -+ if (base != 1) return 0; - int ret = __clock_gettime(CLOCK_REALTIME, ts); - return ret < 0 ? 0 : base; - } +@@ -1,3 +1,4 @@ ++#define _BSD_SOURCE + #include + + /* There is no other implemented value than TIME_UTC; all other values diff --git a/src/unistd/faccessat.c b/src/unistd/faccessat.c index 76bbd4c7..0b4564f9 100644 --- a/src/unistd/faccessat.c -- cgit v1.2.3-70-g09d2 From d5e1644d99b283f9045e659bad5198be0b6da8e0 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Dec 2019 15:24:10 +0000 Subject: system/musl: define __USE_TIME_BITS64 --- system/musl/APKBUILD | 2 +- system/musl/amalgamation.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 27b39f584..6ed68e10e 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -117,7 +117,7 @@ utils() { } sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06314c434224fc8eef2b858107e42c10f220b6009ce4b919d8d9996cfcb839 musl-1.2.0_alpha1.tar.xz -3f2f4eb4bfa1ddb19276e85fa97bf65dfc804cf9ea6e8ad7f1fef4a7930439e840d270f17c3b7e9dc816beb6ba4e33132b0b1a004750bff365161d63c8e8855e amalgamation.patch +90cc7d683ea62a6b89f5bf4b782d4d70ee59a0498ad938a78c224b4e1058d45e4a196cf9278e57d7f57e40931072c339a9cbcafb8f0b2a902b485e9c757eec9a amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch diff --git a/system/musl/amalgamation.patch b/system/musl/amalgamation.patch index 8f018a07a..fd77581da 100644 --- a/system/musl/amalgamation.patch +++ b/system/musl/amalgamation.patch @@ -46,6 +46,18 @@ index 194c2033..5734b1f0 100644 int mkostemps (char *, int, int); void *valloc (size_t); void *memalign(size_t, size_t); +diff --git a/include/sys/time.h b/include/sys/time.h +index cdc67ef6..fd773896 100644 +--- a/include/sys/time.h ++++ b/include/sys/time.h +@@ -13,6 +13,7 @@ int gettimeofday (struct timeval *__restrict, void *__restrict); + #define ITIMER_REAL 0 + #define ITIMER_VIRTUAL 1 + #define ITIMER_PROF 2 ++#define __USE_TIME_BITS64 1 + + struct itimerval { + struct timeval it_interval; diff --git a/include/time.h b/include/time.h index 5494df18..2412fe22 100644 --- a/include/time.h -- cgit v1.2.3-70-g09d2 From 4daae4cc3bb495e577b12a327f2e4098ca889e8c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 8 Dec 2019 15:45:23 +0000 Subject: system/musl: Fix time32 setitimer implementation --- system/musl/APKBUILD | 2 ++ system/musl/time32-setitimer-fix.patch | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 system/musl/time32-setitimer-fix.patch (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 6ed68e10e..dea23fb88 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -26,6 +26,7 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz 3001-make-real-lastlog-h.patch handle-aux-at_base.patch fgetspent_r.patch + time32-setitimer-fix.patch ldconfig getent.c @@ -121,6 +122,7 @@ sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch +6126574e597ced3cc261131699d75d3d972ac460213b55e73d2ac3e974bbf7fb506c2212c387af616ac3a6a4aea689443b28bd1d70b29d359d2e5872a18f8419 time32-setitimer-fix.patch cb71d29a87f334c75ecbc911becde7be825ab30d8f39fa6d64cb53812a7c9abaf91d9804c72540e5be3ddd3c84cfe7fd9632274309005cb8bcdf9a9b09b4b923 ldconfig 378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c" diff --git a/system/musl/time32-setitimer-fix.patch b/system/musl/time32-setitimer-fix.patch new file mode 100644 index 000000000..d6ae191bd --- /dev/null +++ b/system/musl/time32-setitimer-fix.patch @@ -0,0 +1,20 @@ +diff --git a/compat/time32/setitimer_time32.c b/compat/time32/setitimer_time32.c +index 4651dacb..2475fd8c 100644 +--- a/compat/time32/setitimer_time32.c ++++ b/compat/time32/setitimer_time32.c +@@ -15,9 +15,11 @@ int __setitimer_time32(int which, const struct itimerval32 *restrict new32, stru + * timer setting, so we can't fail on out-of-range old value. + * Since these are relative times, values large enough to overflow + * don't make sense anyway. */ +- old32->it_interval.tv_sec = old.it_interval.tv_sec; +- old32->it_interval.tv_usec = old.it_interval.tv_usec; +- old32->it_value.tv_sec = old.it_value.tv_sec; +- old32->it_value.tv_usec = old.it_value.tv_usec; ++ if (old32) { ++ old32->it_interval.tv_sec = old.it_interval.tv_sec; ++ old32->it_interval.tv_usec = old.it_interval.tv_usec; ++ old32->it_value.tv_sec = old.it_value.tv_sec; ++ old32->it_value.tv_usec = old.it_value.tv_usec; ++ } + return 0; + } -- cgit v1.2.3-70-g09d2 From a2d848c165cb3a1e9316cc7deabb0562fdbe81dd Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 20 Dec 2019 21:17:46 +0000 Subject: system/musl: bump to 1.2.0_alpha2 --- system/musl/APKBUILD | 6 ++---- system/musl/time32-setitimer-fix.patch | 20 -------------------- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 system/musl/time32-setitimer-fix.patch (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index dea23fb88..c3ae526d1 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox pkgname=musl -pkgver=1.2.0_alpha1 +pkgver=1.2.0_alpha2 pkgrel=0 pkgdesc="System library (libc) implementation" url="https://www.musl-libc.org/" @@ -26,7 +26,6 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz 3001-make-real-lastlog-h.patch handle-aux-at_base.patch fgetspent_r.patch - time32-setitimer-fix.patch ldconfig getent.c @@ -117,12 +116,11 @@ utils() { install -D -m755 "$srcdir"/ldconfig "$subpkgdir"/sbin } -sha512sums="7026b67590a5dc0eda96777476a902e3d7121813d9ff9d9dabec3774365b9d43ce06314c434224fc8eef2b858107e42c10f220b6009ce4b919d8d9996cfcb839 musl-1.2.0_alpha1.tar.xz +sha512sums="3976257352ada259fe9baa31bb7d0193765d4e9d6583503543af0122d02fa75e5b5f9e5fee6b6f2550959a389eec3cc45e54eae9ccd08b7d5601c1207d367de1 musl-1.2.0_alpha2.tar.xz 90cc7d683ea62a6b89f5bf4b782d4d70ee59a0498ad938a78c224b4e1058d45e4a196cf9278e57d7f57e40931072c339a9cbcafb8f0b2a902b485e9c757eec9a amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch -6126574e597ced3cc261131699d75d3d972ac460213b55e73d2ac3e974bbf7fb506c2212c387af616ac3a6a4aea689443b28bd1d70b29d359d2e5872a18f8419 time32-setitimer-fix.patch cb71d29a87f334c75ecbc911becde7be825ab30d8f39fa6d64cb53812a7c9abaf91d9804c72540e5be3ddd3c84cfe7fd9632274309005cb8bcdf9a9b09b4b923 ldconfig 378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c" diff --git a/system/musl/time32-setitimer-fix.patch b/system/musl/time32-setitimer-fix.patch deleted file mode 100644 index d6ae191bd..000000000 --- a/system/musl/time32-setitimer-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/compat/time32/setitimer_time32.c b/compat/time32/setitimer_time32.c -index 4651dacb..2475fd8c 100644 ---- a/compat/time32/setitimer_time32.c -+++ b/compat/time32/setitimer_time32.c -@@ -15,9 +15,11 @@ int __setitimer_time32(int which, const struct itimerval32 *restrict new32, stru - * timer setting, so we can't fail on out-of-range old value. - * Since these are relative times, values large enough to overflow - * don't make sense anyway. */ -- old32->it_interval.tv_sec = old.it_interval.tv_sec; -- old32->it_interval.tv_usec = old.it_interval.tv_usec; -- old32->it_value.tv_sec = old.it_value.tv_sec; -- old32->it_value.tv_usec = old.it_value.tv_usec; -+ if (old32) { -+ old32->it_interval.tv_sec = old.it_interval.tv_sec; -+ old32->it_interval.tv_usec = old.it_interval.tv_usec; -+ old32->it_value.tv_sec = old.it_value.tv_sec; -+ old32->it_value.tv_usec = old.it_value.tv_usec; -+ } - return 0; - } -- cgit v1.2.3-70-g09d2 From 4ee438300a4076eaf6b8389f0164279f59a6160e Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 21 Dec 2019 08:15:37 +0000 Subject: system/musl: integrate latest posix-conformance commit --- system/musl/APKBUILD | 2 +- system/musl/amalgamation.patch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index c3ae526d1..ad2bbaf06 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -117,7 +117,7 @@ utils() { } sha512sums="3976257352ada259fe9baa31bb7d0193765d4e9d6583503543af0122d02fa75e5b5f9e5fee6b6f2550959a389eec3cc45e54eae9ccd08b7d5601c1207d367de1 musl-1.2.0_alpha2.tar.xz -90cc7d683ea62a6b89f5bf4b782d4d70ee59a0498ad938a78c224b4e1058d45e4a196cf9278e57d7f57e40931072c339a9cbcafb8f0b2a902b485e9c757eec9a amalgamation.patch +f01ab92b9d385c15369c0bb7d95e1bc06a009c8851e363517d0ba1bae3fc2647af69fc2f363b5d962d376c5d9a1994b5728fd88ccbfff5f0d3d0970a02df1512 amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch diff --git a/system/musl/amalgamation.patch b/system/musl/amalgamation.patch index fd77581da..5918c3be6 100644 --- a/system/musl/amalgamation.patch +++ b/system/musl/amalgamation.patch @@ -413,7 +413,7 @@ index f407ffe0..4fd3a60c 100644 errno = ENOENT; return 0; diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c -index c3b40a25..e2f03d39 100644 +index c3b40a25..6af5aed6 100644 --- a/src/unistd/renameat.c +++ b/src/unistd/renameat.c @@ -1,11 +1,93 @@ @@ -468,8 +468,8 @@ index c3b40a25..e2f03d39 100644 + + /* Test equality of old and new. + If they both resolve to the same dentry, we do nothing. */ -+ if (fstatat(oldfd, old, &oldstat, 0) == 0 && \ -+ fstatat(newfd, new, &newstat, 0) == 0 && \ ++ if (fstatat(oldfd, old, &oldstat, AT_SYMLINK_NOFOLLOW) == 0 && \ ++ fstatat(newfd, new, &newstat, AT_SYMLINK_NOFOLLOW) == 0 && \ + oldstat.st_dev == newstat.st_dev && \ + oldstat.st_ino == newstat.st_ino) return 0; + -- cgit v1.2.3-70-g09d2 From 1d53e24413647eaa55bfa4074295adfab4a329b8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 22 Dec 2019 06:46:23 +0000 Subject: system/{easy-kernel,musl}: fix struct iphdr UAPI thing --- system/easy-kernel/APKBUILD | 4 +++- system/easy-kernel/uapi-iphdr.patch | 47 +++++++++++++++++++++++++++++++++++++ system/musl/APKBUILD | 2 ++ system/musl/uapi-iphdr.patch | 30 +++++++++++++++++++++++ 4 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 system/easy-kernel/uapi-iphdr.patch create mode 100644 system/musl/uapi-iphdr.patch (limited to 'system/musl/APKBUILD') diff --git a/system/easy-kernel/APKBUILD b/system/easy-kernel/APKBUILD index 640caa7cb..29805f75b 100644 --- a/system/easy-kernel/APKBUILD +++ b/system/easy-kernel/APKBUILD @@ -31,6 +31,7 @@ source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgmin config-sparc64 config-m68k kernel.h + uapi-iphdr.patch " builddir="$srcdir/linux-${_pkgminver}" @@ -136,4 +137,5 @@ ec86baafbfc22fdb08872276284eac7dce695c192a02c3b7d35a5d67861b98be18475ccfbb366ff9 baefddb2e1de0105f9333702121d3dd2c1f1d54ce22ee7f7d3a54d4fa1028e9b5dadeecb6cca8a717d30c7bc083daa652b0281fb1b39a85f191954ac5a95fecd config-aarch64 430d968f60cfd33d3ba1e7c2fec8b1d1eedee8086c7cebebf162223b058b0e1d873033e46e05f63d8a50c61397eaf1036b1e4b3a60581f08c6482810aa25df7f config-sparc64 1b99310e2de81267fdb1668ad6f52f26d8798d94c0a952cfe9992ff40e5d7331ddfb324b8f99bfa300240aa568bbd4525150e0c774c797d85756714163fd0fa5 config-m68k -61dcd633d72876566b7738dd08856b26850c935b4a81ab2364711335fe01c397083160f530b3382bbc239c6a8135be6a032e93039083ec2cefdae2902429a2e0 kernel.h" +61dcd633d72876566b7738dd08856b26850c935b4a81ab2364711335fe01c397083160f530b3382bbc239c6a8135be6a032e93039083ec2cefdae2902429a2e0 kernel.h +6f309a18c65c991240265afd200cc79a706f5d9e5d072838a9a641ab3676a5e4c32033f9767fc723ff4c45ee462169a0f77bd7dfe63b547d521dadd073f827a7 uapi-iphdr.patch" diff --git a/system/easy-kernel/uapi-iphdr.patch b/system/easy-kernel/uapi-iphdr.patch new file mode 100644 index 000000000..8436b035b --- /dev/null +++ b/system/easy-kernel/uapi-iphdr.patch @@ -0,0 +1,47 @@ +From 62689a5371ff8bbfc8c04625794c62d957b0863f Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sat, 21 Dec 2019 23:36:33 -0600 +Subject: [PATCH] uapi: Prevent redefinition of struct iphdr + +As with struct ethhdr, the musl libc provides its own definition of the +iphdr struct. This guard ensures software like net-tools builds correctly +on the musl libc. + +The __UAPI_DEF_IPHDR definition is in ip.h itself to prevent the issue in +commit da360299b673 ("uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define") +from being seen here. + +Signed-off-by: A. Wilcox +--- + include/uapi/linux/ip.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/include/uapi/linux/ip.h b/include/uapi/linux/ip.h +index e42d13b55cf3..d34a0d295672 100644 +--- a/include/uapi/linux/ip.h ++++ b/include/uapi/linux/ip.h +@@ -83,6 +83,13 @@ + + #define IPV4_BEET_PHMAXLEN 8 + ++/* Allow libcs to deactivate this - musl has its own copy in */ ++ ++#ifndef __UAPI_DEF_IPHDR ++#define __UAPI_DEF_IPHDR 1 ++#endif ++ ++#if __UAPI_DEF_IPHDR + struct iphdr { + #if defined(__LITTLE_ENDIAN_BITFIELD) + __u8 ihl:4, +@@ -104,6 +111,7 @@ struct iphdr { + __be32 daddr; + /*The options start here. */ + }; ++#endif + + + struct ip_auth_hdr { +-- +2.22.1 + diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index ad2bbaf06..0758f513a 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -26,6 +26,7 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz 3001-make-real-lastlog-h.patch handle-aux-at_base.patch fgetspent_r.patch + uapi-iphdr.patch ldconfig getent.c @@ -121,6 +122,7 @@ f01ab92b9d385c15369c0bb7d95e1bc06a009c8851e363517d0ba1bae3fc2647af69fc2f363b5d96 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch +3b3866a32321cf72b72470230b88cde6bfc9f63e6ec33fef6023286b5733f90feed32b65b82d59ec353deb2ee199c1c95825802d7588019bf016b39d327f3c73 uapi-iphdr.patch cb71d29a87f334c75ecbc911becde7be825ab30d8f39fa6d64cb53812a7c9abaf91d9804c72540e5be3ddd3c84cfe7fd9632274309005cb8bcdf9a9b09b4b923 ldconfig 378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c" diff --git a/system/musl/uapi-iphdr.patch b/system/musl/uapi-iphdr.patch new file mode 100644 index 000000000..8483ca306 --- /dev/null +++ b/system/musl/uapi-iphdr.patch @@ -0,0 +1,30 @@ +From 7e690371dbc52b0f771bc7cdecdb757d5e1a4c11 Mon Sep 17 00:00:00 2001 +From: "A. Wilcox" +Date: Sun, 22 Dec 2019 00:04:28 -0600 +Subject: [PATCH] netinet/ip.h: Add UAPI definition guard for iphdr + +This ensures that the musl definition of 'struct iphdr' does not conflict +with the Linux kernel UAPI definition of it. + +Some software, i.e. net-tools, will not compile against 5.4 kernel headers +without this patch and the corresponding Linux kernel patch. +--- + include/netinet/ip.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/netinet/ip.h b/include/netinet/ip.h +index 8b6d7fef..0ae132a5 100644 +--- a/include/netinet/ip.h ++++ b/include/netinet/ip.h +@@ -190,6 +190,8 @@ struct ip_timestamp { + + #define IP_MSS 576 + ++#define __UAPI_DEF_IPHDR 0 ++ + #ifdef __cplusplus + } + #endif +-- +2.22.1 + -- cgit v1.2.3-70-g09d2 From e3952dc99438e145bc33b012c255ae0a8479685e Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 23 Dec 2019 02:10:16 +0000 Subject: system/musl: bump to 1.2.0_alpha3 --- system/musl/APKBUILD | 6 ++---- system/musl/uapi-iphdr.patch | 30 ------------------------------ 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 system/musl/uapi-iphdr.patch (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index 0758f513a..c2eb3303f 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox pkgname=musl -pkgver=1.2.0_alpha2 +pkgver=1.2.0_alpha3 pkgrel=0 pkgdesc="System library (libc) implementation" url="https://www.musl-libc.org/" @@ -26,7 +26,6 @@ source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz 3001-make-real-lastlog-h.patch handle-aux-at_base.patch fgetspent_r.patch - uapi-iphdr.patch ldconfig getent.c @@ -117,12 +116,11 @@ utils() { install -D -m755 "$srcdir"/ldconfig "$subpkgdir"/sbin } -sha512sums="3976257352ada259fe9baa31bb7d0193765d4e9d6583503543af0122d02fa75e5b5f9e5fee6b6f2550959a389eec3cc45e54eae9ccd08b7d5601c1207d367de1 musl-1.2.0_alpha2.tar.xz +sha512sums="86b42aa86a08699cc5139fca7d2420da5ad3fc31f18454bd6167ad09b9ca69e2122657b7572f6bc1b68393df9756b9b6d2f8c1685e6e4aa170a8c04da32d1cbc musl-1.2.0_alpha3.tar.xz f01ab92b9d385c15369c0bb7d95e1bc06a009c8851e363517d0ba1bae3fc2647af69fc2f363b5d962d376c5d9a1994b5728fd88ccbfff5f0d3d0970a02df1512 amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch ded41235148930f8cf781538f7d63ecb0c65ea4e8ce792565f3649ee2523592a76b2a166785f0b145fc79f5852fd1fb1729a7a09110b3b8f85cba3912e790807 fgetspent_r.patch -3b3866a32321cf72b72470230b88cde6bfc9f63e6ec33fef6023286b5733f90feed32b65b82d59ec353deb2ee199c1c95825802d7588019bf016b39d327f3c73 uapi-iphdr.patch cb71d29a87f334c75ecbc911becde7be825ab30d8f39fa6d64cb53812a7c9abaf91d9804c72540e5be3ddd3c84cfe7fd9632274309005cb8bcdf9a9b09b4b923 ldconfig 378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c" diff --git a/system/musl/uapi-iphdr.patch b/system/musl/uapi-iphdr.patch deleted file mode 100644 index 8483ca306..000000000 --- a/system/musl/uapi-iphdr.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7e690371dbc52b0f771bc7cdecdb757d5e1a4c11 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" -Date: Sun, 22 Dec 2019 00:04:28 -0600 -Subject: [PATCH] netinet/ip.h: Add UAPI definition guard for iphdr - -This ensures that the musl definition of 'struct iphdr' does not conflict -with the Linux kernel UAPI definition of it. - -Some software, i.e. net-tools, will not compile against 5.4 kernel headers -without this patch and the corresponding Linux kernel patch. ---- - include/netinet/ip.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/netinet/ip.h b/include/netinet/ip.h -index 8b6d7fef..0ae132a5 100644 ---- a/include/netinet/ip.h -+++ b/include/netinet/ip.h -@@ -190,6 +190,8 @@ struct ip_timestamp { - - #define IP_MSS 576 - -+#define __UAPI_DEF_IPHDR 0 -+ - #ifdef __cplusplus - } - #endif --- -2.22.1 - -- cgit v1.2.3-70-g09d2 From a0cd65328e2226e261b58e516c48a700c2aafb5f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 22 Feb 2020 04:01:26 +0000 Subject: system/musl: Bump to 1.2.0 release --- system/musl/APKBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/musl/APKBUILD') diff --git a/system/musl/APKBUILD b/system/musl/APKBUILD index c2eb3303f..f7596ebb5 100644 --- a/system/musl/APKBUILD +++ b/system/musl/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: A. Wilcox pkgname=musl -pkgver=1.2.0_alpha3 +pkgver=1.2.0 pkgrel=0 pkgdesc="System library (libc) implementation" url="https://www.musl-libc.org/" @@ -21,7 +21,7 @@ nolibc) ;; triggers="$pkgname-utils.trigger=/etc/ld.so.conf.d" ;; esac -source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.xz +source="https://musl.libc.org/releases/$pkgname-$pkgver.tar.gz amalgamation.patch 3001-make-real-lastlog-h.patch handle-aux-at_base.patch @@ -116,7 +116,7 @@ utils() { install -D -m755 "$srcdir"/ldconfig "$subpkgdir"/sbin } -sha512sums="86b42aa86a08699cc5139fca7d2420da5ad3fc31f18454bd6167ad09b9ca69e2122657b7572f6bc1b68393df9756b9b6d2f8c1685e6e4aa170a8c04da32d1cbc musl-1.2.0_alpha3.tar.xz +sha512sums="58bd88189a6002356728cea1c6f6605a893fe54f7687595879add4eab283c8692c3b031eb9457ad00d1edd082cfe62fcc0eb5eb1d3bf4f1d749c0efa2a95fec1 musl-1.2.0.tar.gz f01ab92b9d385c15369c0bb7d95e1bc06a009c8851e363517d0ba1bae3fc2647af69fc2f363b5d962d376c5d9a1994b5728fd88ccbfff5f0d3d0970a02df1512 amalgamation.patch 88ae443dbb8e0a4368235bdc3a1c5c7b718495afa75e06deb8e01becc76cb1f0d6964589e2204fc749c9c1b3190b8b9ac1ae2c0099cab8e2ce3ec877103d4332 3001-make-real-lastlog-h.patch 6a7ff16d95b5d1be77e0a0fbb245491817db192176496a57b22ab037637d97a185ea0b0d19da687da66c2a2f5578e4343d230f399d49fe377d8f008410974238 handle-aux-at_base.patch -- cgit v1.2.3-70-g09d2