diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-10-09 18:20:53 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-10-09 18:22:53 +0000 |
commit | 81e9ac9cfe3423927c8e8c334613e01ca39933ce (patch) | |
tree | a4abd37db4230a220c1523028f0492a727725a18 /main | |
parent | ed3a403de57037604d456801d23448598c0b10fc (diff) | |
download | aports-81e9ac9cfe3423927c8e8c334613e01ca39933ce.tar.bz2 aports-81e9ac9cfe3423927c8e8c334613e01ca39933ce.tar.xz |
main/musl: cherry pick fixes, fix rfc3678 patch to be glibc compatible
also add dummy ldconfig
Diffstat (limited to 'main')
-rw-r--r-- | main/musl/0004-fix-new-environment-always-being-null-with-execle.patch | 36 | ||||
-rw-r--r-- | main/musl/0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch | 28 | ||||
-rw-r--r-- | main/musl/APKBUILD | 27 | ||||
-rw-r--r-- | main/musl/add-missing-i386-syscall-numbers.patch | 41 | ||||
-rw-r--r-- | main/musl/add-rfc3678-mcast-structs.patch | 17 | ||||
-rwxr-xr-x | main/musl/ldconfig | 2 |
6 files changed, 95 insertions, 56 deletions
diff --git a/main/musl/0004-fix-new-environment-always-being-null-with-execle.patch b/main/musl/0004-fix-new-environment-always-being-null-with-execle.patch new file mode 100644 index 000000000..31a1672e2 --- /dev/null +++ b/main/musl/0004-fix-new-environment-always-being-null-with-execle.patch @@ -0,0 +1,36 @@ +From 2b2aff37aced66e4a50a38a14607a9b1dc0ee001 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Thu, 3 Oct 2013 10:16:01 -0400 +Subject: [PATCH] fix new environment always being null with execle +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +the va_arg call for the argv[]-terminating null pointer was missing, +so this pointer was being wrongly used as the environment pointer. + +issue reported by Timo Teräs. proposed patch slightly modified to +simplify the resulting code. +--- + src/process/execle.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/process/execle.c b/src/process/execle.c +index 6490836..6f2ec05 100644 +--- a/src/process/execle.c ++++ b/src/process/execle.c +@@ -14,9 +14,8 @@ int execle(const char *path, const char *argv0, ...) + char **envp; + va_start(ap, argv0); + argv[0] = (char *)argv0; +- for (i=1; i<argc; i++) ++ for (i=1; i<=argc; i++) + argv[i] = va_arg(ap, char *); +- argv[i] = NULL; + envp = va_arg(ap, char **); + return execve(path, argv, envp); + } +-- +1.8.4 + + diff --git a/main/musl/0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch b/main/musl/0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch new file mode 100644 index 000000000..331431934 --- /dev/null +++ b/main/musl/0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch @@ -0,0 +1,28 @@ +From 551da2c1916e3166a0562ac6f2e76fd46781f3d7 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy <nsz@port70.net> +Date: Mon, 7 Oct 2013 13:28:03 +0000 +Subject: [PATCH] fix clockid macro names in time.h, reported by Paul Schutte + +--- + include/time.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/time.h b/include/time.h +index 6b2a069..6e499ff 100644 +--- a/include/time.h ++++ b/include/time.h +@@ -82,8 +82,8 @@ struct itimerspec + #define CLOCK_PROCESS_CPUTIME_ID 2 + #define CLOCK_THREAD_CPUTIME_ID 3 + #define CLOCK_MONOTONIC_RAW 4 +-#define CLOCK_REALTIME_COURSE 5 +-#define CLOCK_MONOTONIC_COURSE 6 ++#define CLOCK_REALTIME_COARSE 5 ++#define CLOCK_MONOTONIC_COARSE 6 + #define CLOCK_BOOTTIME 7 + #define CLOCK_REALTIME_ALARM 8 + #define CLOCK_BOOTTIME_ALARM 9 +-- +1.8.4 + + diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index d27716233..2e014840b 100644 --- a/main/musl/APKBUILD +++ b/main/musl/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Timo Teräs <timo.teras@iki.fi> pkgname=musl pkgver=0.9.14 -pkgrel=3 +pkgrel=4 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="all" @@ -17,12 +17,15 @@ source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz 0001-add-missing-i386-syscall-numbers.patch 0002-fix-buffer-overflow-in-mbsrtowcs.patch 0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch + 0004-fix-new-environment-always-being-null-with-execle.patch + 0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch add-rfc3678-mcast-structs.patch workaround-gcc-pr58245.patch getopt_long.c __stack_chk_fail_local.c getent + ldconfig " _builddir="$srcdir"/musl-$pkgver @@ -98,6 +101,7 @@ utils() { mv "$pkgdir"/usr/bin/ldd "$subpkgdir"/usr/bin find "$pkgdir" -type d -delete 2>/dev/null install -D "$srcdir"/getent "$subpkgdir"/usr/bin/getent + install -D "$srcdir"/ldconfig "$subpkgdir"/sbin/ldconfig } crosstool() { @@ -111,26 +115,35 @@ md5sums="bfb685695aa942e64c63170589e575b2 musl-0.9.14.tar.gz f116cf69bcbcb7080ef3aa521acce8b8 0001-add-missing-i386-syscall-numbers.patch bfefbd099f555fe8fd22e7ffc3accbef 0002-fix-buffer-overflow-in-mbsrtowcs.patch 5d722e38a7ca2032c9f202db8ff7e369 0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch -dcdded62320e3aa2a550058a75bc9c6e add-rfc3678-mcast-structs.patch +216d6915ea8397102c22a7aeaafdd98f 0004-fix-new-environment-always-being-null-with-execle.patch +aa4c3ccf3e074fcac609420573ce466a 0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch +b28080b5c8c1d44521277aa3255d280a add-rfc3678-mcast-structs.patch 7a09c5cd7b3e9532e6902f54a5e928bb workaround-gcc-pr58245.patch 61c6c1e84ed1df82abbe6d75e90cf21c getopt_long.c 0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c -ef81489a6258501cf45db58dfc6d5211 getent" +ef81489a6258501cf45db58dfc6d5211 getent +33e4fd94e2560e008e2c3b431d0e3419 ldconfig" sha256sums="982e9de1287cf95f9aa526adba008660d8885bfccc41faf5c613ea47f1922872 musl-0.9.14.tar.gz 84886493008bdca79ad223708e5568baeb948a520499b9f4eea2f1526aefb304 0001-add-missing-i386-syscall-numbers.patch a6cb8b279e5b737d43c2de1bd6229f5e6599e9514bcb41ddaa411cd44dc65ba7 0002-fix-buffer-overflow-in-mbsrtowcs.patch b6b161383b287505eecb53595039b8fe26c622508e783c86ee82d38c1ea582f4 0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch -6e8c4fe897c88e4b8f5654766cdaa5d14a0bfa51f28518b53cba2628ca700cdb add-rfc3678-mcast-structs.patch +2e9f262bf9c117f1ca59afd9615daa6f8d71aaddb719f5259218b088244622fb 0004-fix-new-environment-always-being-null-with-execle.patch +f2fd3b921bd57190d0bf19c4a4beb5f808a5d19c71092e2962a3e7b1ca08c67e 0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch +720cb88dd1ef57fc806a22b46b3c47d7a0a38a34d31edb583e97bfa7a47eb44c add-rfc3678-mcast-structs.patch 45d6efda7450809e4e68f6e951431dcadf6cb7f0260930d50a9f1a8667aca49f workaround-gcc-pr58245.patch d9b644ec20bc33e81a7c52b9fcf7973d835923a69faf50f03db45534b811bd96 getopt_long.c 299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c -d6996273f5aaaed429058257e4646b243d9e3a4d8609522f802762453f5be4cb getent" +d6996273f5aaaed429058257e4646b243d9e3a4d8609522f802762453f5be4cb getent +306c6ca7407560340797866e077e053627ad409277d1b9da58106fce4cf717cb ldconfig" sha512sums="e5c3f7b1549dc2f9cbd3359cc413f761d5967607c23705f651c33d0ae93f00582193a41fe1f87158467d58d8eba2d7c09e0fe2f2b2c02c1dda78eee1a4cecff6 musl-0.9.14.tar.gz e6cdb6b4c87e2488d31ac46898010dc9d41f31f2ed9c6f2f8a763b76e63587a37a54a7557cd7db1c524b1fcbd17e5418ec1058b30dc17cc91c3fb3ac7cd47fc8 0001-add-missing-i386-syscall-numbers.patch bb1a0025675fc0241a0ae15e04e12cfbb3c12604ccdb8ac9a2a192d76d346c2804d051f6698a636671d9b4154132b1fe4270bc464bdd370a9b2070c4573361e0 0002-fix-buffer-overflow-in-mbsrtowcs.patch 60fd9640ea6a8c46e8724ec80d228bcabb9ae3f0f366d2a21c7e15da4a31395aa6dfadeb480f22c720cbd773b73b245174adc3031ee04e69efecf4c45af8538f 0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch -72789ddf7018bb0878cb1f9c8a47d7b371a9a3e1c58693090d518bf1cc0d26e4edda3e3a405b2ddcdfb06f05a94eb4a358d9e26f742702be891a6578673a0369 add-rfc3678-mcast-structs.patch +f37b4bb6e15c0fa02cb7643a3f291158901a13f5c39651d3feda371f9de9a05ce82ce7e81a45440422a4bf9198cd2baa1cb8fbebe267b6726e8d293aa5b836d3 0004-fix-new-environment-always-being-null-with-execle.patch +f3f2f0cad04b58891e42d0846d929c05d793c1c7ab61aa0ac1377f38c1291bce45e39a7acdc62749804859a5de1b20f9ec0839c58a7015cb12c0b7c85c7a6194 0005-fix-clockid-macro-names-in-time.h-reported-by-Paul-S.patch +d63d3ea0c59dbff0cb24cc30ba0b013a33e81bc91de5f6c8b0082fa3e261b0c0dac3f2dc30c3b0370f7d1c4536e2042cd85ecb8e0357a805bd93855e42396d92 add-rfc3678-mcast-structs.patch 69ad3fc851b44f33dd7c98b83fd0adbd149b37263d17b989f4d7338ee0703dfe8994f4299744e2509492300227d652de6f21b6cdba9b633fcefd3d9f7ca0cf20 workaround-gcc-pr58245.patch 140f3f20d30bd95ebce8c41b8cc7f616c6cbedf4ea06c729c21014e74f6043796825cc40ebc5180620ea38173afdba23f09ebf6d8b11fa05440b14d23764fca9 getopt_long.c 062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c -4d92f934d760cf5157d80f19fd766be6b673c65317229b32ac824d9d192f6abcc414e2382b2416dfd5c2f757b46ced98c18e4762bf91f5a48647e0ee61813b06 getent" +4d92f934d760cf5157d80f19fd766be6b673c65317229b32ac824d9d192f6abcc414e2382b2416dfd5c2f757b46ced98c18e4762bf91f5a48647e0ee61813b06 getent +69f097faa9ccb981e78c3a914ad68a51771637d9aecd2dbc807003ac30663e6d921091a48ff529dfff27a6cd55b0808f91683118acf7acdf406d37266e622b17 ldconfig" diff --git a/main/musl/add-missing-i386-syscall-numbers.patch b/main/musl/add-missing-i386-syscall-numbers.patch deleted file mode 100644 index 8c0b0a892..000000000 --- a/main/musl/add-missing-i386-syscall-numbers.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 78178542e73e143bf44b3ba32cf0b58ced53f2d5 Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Thu, 26 Sep 2013 14:17:36 -0400 -Subject: [PATCH] add missing i386 syscall numbers - -somehow the range 335-339 was missed when updating the file. ---- - arch/i386/bits/syscall.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/arch/i386/bits/syscall.h b/arch/i386/bits/syscall.h -index 800409a..2af242b 100644 ---- a/arch/i386/bits/syscall.h -+++ b/arch/i386/bits/syscall.h -@@ -333,6 +333,11 @@ - #define __NR_inotify_init1 332 - #define __NR_preadv 333 - #define __NR_pwritev 334 -+#define __NR_rt_tgsigqueueinfo 335 -+#define __NR_perf_event_open 336 -+#define __NR_recvmmsg 337 -+#define __NR_fanotify_init 338 -+#define __NR_fanotify_mark 339 - #define __NR_prlimit64 340 - #define __NR_name_to_handle_at 341 - #define __NR_open_by_handle_at 342 -@@ -683,6 +688,11 @@ - #define SYS_inotify_init1 332 - #define SYS_preadv 333 - #define SYS_pwritev 334 -+#define SYS_rt_tgsigqueueinfo 335 -+#define SYS_perf_event_open 336 -+#define SYS_recvmmsg 337 -+#define SYS_fanotify_init 338 -+#define SYS_fanotify_mark 339 - #define SYS_prlimit64 340 - #define SYS_name_to_handle_at 341 - #define SYS_open_by_handle_at 342 --- -1.8.4 - diff --git a/main/musl/add-rfc3678-mcast-structs.patch b/main/musl/add-rfc3678-mcast-structs.patch index b7abcf166..c453d1403 100644 --- a/main/musl/add-rfc3678-mcast-structs.patch +++ b/main/musl/add-rfc3678-mcast-structs.patch @@ -27,21 +27,21 @@ index d886fc2..b7a8a7a 100644 }; +struct ip_mreq_source { -+ uint32_t imr_multiaddr; -+ uint32_t imr_interface; -+ uint32_t imr_sourceaddr; ++ struct in_addr imr_multiaddr; ++ struct in_addr imr_interface; ++ struct in_addr imr_sourceaddr; +}; + +struct ip_msfilter { -+ uint32_t imsf_multiaddr; -+ uint32_t imsf_interface; ++ struct in_addr imsf_multiaddr; ++ struct in_addr imsf_interface; + uint32_t imsf_fmode; + uint32_t imsf_numsrc; -+ uint32_t imsf_slist[1]; ++ struct in_addr imsf_slist[1]; +}; +#define IP_MSFILTER_SIZE(numsrc) \ -+ (sizeof(struct ip_msfilter) - sizeof(uint32_t) \ -+ + (numsrc) * sizeof(uint32_t)) ++ (sizeof(struct ip_msfilter) - sizeof(struct in_addr) \ ++ + (numsrc) * sizeof(struct in_addr)) + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +struct group_req { @@ -74,3 +74,4 @@ index d886fc2..b7a8a7a 100644 1.8.3.3 + diff --git a/main/musl/ldconfig b/main/musl/ldconfig new file mode 100755 index 000000000..039e4d006 --- /dev/null +++ b/main/musl/ldconfig @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 |