From 4003b568b9493e2b30b195328fbc59b18bd12b01 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Wed, 17 Oct 2018 20:04:36 -0300 Subject: [PATCH] elogind: update to 239.1. --- srcpkgs/elogind/patches/fix-glibc-statx.patch | 77 -- .../patches/move-debug-to-debug-extra.patch | 29 - .../patches/musl-provide-qsort_r.patch | 673 ++++++++++++++++++ srcpkgs/elogind/template | 9 +- 4 files changed, 679 insertions(+), 109 deletions(-) delete mode 100644 srcpkgs/elogind/patches/fix-glibc-statx.patch delete mode 100644 srcpkgs/elogind/patches/move-debug-to-debug-extra.patch create mode 100644 srcpkgs/elogind/patches/musl-provide-qsort_r.patch diff --git a/srcpkgs/elogind/patches/fix-glibc-statx.patch b/srcpkgs/elogind/patches/fix-glibc-statx.patch deleted file mode 100644 index 5a0fb7da6dc..00000000000 --- a/srcpkgs/elogind/patches/fix-glibc-statx.patch +++ /dev/null @@ -1,77 +0,0 @@ -Fix glibc >= 2.28 statx - -diff --git a/meson.build b/meson.build -index 98a73a1..bd1b249 100644 ---- meson.build -+++ meson.build -@@ -534,8 +534,7 @@ decl_headers = ''' - #include - #include - #include --//#include --//#include -+#include - ''' - # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail - -@@ -549,9 +548,24 @@ foreach decl : ['char16_t', - - # We get -1 if the size cannot be determined - have = cc.sizeof(decl, prefix : decl_headers) > 0 -+ have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0 -+ -+ if decl == 'struct statx' -+ if have -+ want_linux_stat_h = false -+ else -+ have = cc.sizeof(decl, -+ prefix : decl_headers + '#include ', -+ args : '-D_GNU_SOURCE') > 0 -+ want_linux_stat_h = have -+ endif -+ endif -+ - conf.set10('HAVE_' + decl.underscorify().to_upper(), have) - endforeach - -+conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h) -+ - foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'], - ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'], - ['IFLA_VRF_TABLE', 'linux/if_link.h'], -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 3708742..e909973 100644 ---- src/basic/missing.h -+++ src/basic/missing.h -@@ -34,7 +34,6 @@ - #include - #include - #include --//#include - #include - #include - #include -@@ -44,6 +43,10 @@ - #include - #include - -+#if WANT_LINUX_STAT_H -+#include -+#endif -+ - /// Additional includes needed by elogind - #include "musl_missing.h" - -diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c -index dc4e802..29e3152 100644 ---- src/basic/xattr-util.c -+++ src/basic/xattr-util.c -@@ -20,7 +20,6 @@ - - #include - #include --//#include - #include - #include - #include - diff --git a/srcpkgs/elogind/patches/move-debug-to-debug-extra.patch b/srcpkgs/elogind/patches/move-debug-to-debug-extra.patch deleted file mode 100644 index 4249866c388..00000000000 --- a/srcpkgs/elogind/patches/move-debug-to-debug-extra.patch +++ /dev/null @@ -1,29 +0,0 @@ -debug is now a keyword taken by meson >= 0.48.0 and will error out if used as an option - -diff --git a/meson.build b/meson.build -index 7b0739f..98a73a1 100644 ---- meson.build -+++ meson.build -@@ -929,7 +929,7 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name()) - # substs.set('DEBUGTTY', get_option('debug-tty')) - #endif // 0 - --debug = get_option('debug') -+debug = get_option('debug-extra') - enable_debug_hashmap = false - enable_debug_mmap_cache = false - #if 1 /// additional elogind debug mode -diff --git a/meson_options.txt b/meson_options.txt -index 84100b6..f13f904 100644 ---- meson_options.txt -+++ meson_options.txt -@@ -82,7 +82,7 @@ option('kexec-path', type : 'string', description : 'path to kexec') - # option('memory-accounting-default', type : 'boolean', - # description : 'enable MemoryAccounting= by default') - #else --option('debug', type : 'string', -+option('debug-extra', type : 'string', - description : 'enable extra debugging (elogind,hashmap,mmap-cache)') - #endif // 0 - - diff --git a/srcpkgs/elogind/patches/musl-provide-qsort_r.patch b/srcpkgs/elogind/patches/musl-provide-qsort_r.patch new file mode 100644 index 00000000000..c60da15c80a --- /dev/null +++ b/srcpkgs/elogind/patches/musl-provide-qsort_r.patch @@ -0,0 +1,673 @@ +From f2c9a0d5e9d246fdfacd698a5e2b79c86eaa7779 Mon Sep 17 00:00:00 2001 +From: Sven Eden +Date: Thu, 25 Oct 2018 19:58:51 +0200 +Subject: [PATCH] Prep v240: Add check for qsort_r() and the function if not + provided. + +As elogind supports musl-libc, we have to remedy the situation that +upstream decided to make use of qsort_r(). This function is not +provided by musl-libc, so we have to provide an own variant. + +The variant is an adaption of the qsort_r() algorithm found in +glibc-2.28, the disclaimer from their source files have been added. + +Bug: #83 +Signed-off-by: Sven Eden +--- + cb/elogind.cbp | 4 + + meson.build | 3 + + src/shared/meson.build | 2 + + src/shared/musl_missing.h | 3 +- + src/shared/qsort_r_missing.c | 499 +++++++++++++++++++++++++++++++++++ + src/shared/qsort_r_missing.h | 34 +++ + 6 files changed, 544 insertions(+), 1 deletion(-) + create mode 100644 src/shared/qsort_r_missing.c + create mode 100644 src/shared/qsort_r_missing.h + +diff --git a/cb/elogind.cbp b/cb/elogind.cbp +index cebc32676..fdffbfc15 100644 +--- cb/elogind.cbp ++++ cb/elogind.cbp +@@ -891,6 +891,10 @@ +