diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-15 07:41:50 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-15 07:41:50 +0100 |
commit | b3f2504c1d05b5999b74b2135860fc721e3adf68 (patch) | |
tree | e11656067365c7d474553833d6202ed04d3324a5 /sys-apps | |
parent | e0fdb8199de0e7a9b7c72d7f38d2e3ddaecdacd0 (diff) |
gentoo auto-resync : 15:07:2022 - 07:41:50
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/Manifest.gz | bin | 48287 -> 48293 bytes | |||
-rw-r--r-- | sys-apps/fakeroot/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/fakeroot/files/fakeroot-1.25.3-glibc-2.33.patch | 413 | ||||
-rw-r--r-- | sys-apps/plocate/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch | 337 | ||||
-rw-r--r-- | sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch | 30 | ||||
-rw-r--r-- | sys-apps/plocate/plocate-1.1.16.ebuild | 2 | ||||
-rw-r--r-- | sys-apps/systemd-utils/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-250.8.ebuild | 500 | ||||
-rw-r--r-- | sys-apps/systemd-utils/systemd-utils-251.3.ebuild | 511 | ||||
-rw-r--r-- | sys-apps/systemd/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-251.2.ebuild | 2 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-251.3.ebuild | 535 |
13 files changed, 1926 insertions, 417 deletions
diff --git a/sys-apps/Manifest.gz b/sys-apps/Manifest.gz Binary files differindex 480651a1f748..15f7e4102743 100644 --- a/sys-apps/Manifest.gz +++ b/sys-apps/Manifest.gz diff --git a/sys-apps/fakeroot/Manifest b/sys-apps/fakeroot/Manifest index fc3488cbb9e3..6b97c6e6f13e 100644 --- a/sys-apps/fakeroot/Manifest +++ b/sys-apps/fakeroot/Manifest @@ -1,4 +1,3 @@ -AUX fakeroot-1.25.3-glibc-2.33.patch 13646 BLAKE2B 1a83706a9e26f9c11d9851c24659086206df2d518c3103354971436565d59e8c5cdda47eaf40dc6645d7b09542e766593d57f731d7d8946ef96a1852b12ea2b0 SHA512 3f5402763d32a0b7461ef817e5aece42ff4807780ab886a7867d03019d0a4c501350a3520932e1ba6dcd592ae0cb9548c2cdf1da5498bfb6092f4cb6b4a09096 DIST fakeroot_1.27.orig.tar.gz 544301 BLAKE2B 5e887d43c8bedaecbe51eb7f606d6bace3a9f191a7cf4be32362e1ba97e438413f04ed644532d3a386a46f3a569bf0104c4f38272e5ff46e3705c17896fef972 SHA512 cd98b8cd1064a5a11c6f25bc1d9cb1fb1bf0787f50772fead301470d1769c08a89a1510402b099af334d9f126cea5d3bd5d73e27fb91b5afc1ceebeb9ec3f926 DIST fakeroot_1.29.orig.tar.gz 549383 BLAKE2B ccdc5e793ce6a6adc9ffdb9346045e144dcd802ca8ffcbd188010ab759861d0e0ae81b3baa256546398c2ddab31d1f795f327130cb1f7bb1c3eee07e7282e94b SHA512 d0f02c36cfe4e24f1588894bd732ff5a6fc0e921695236311019a63280efdca8568f2e974672145eb7c4d57f64a15a77d23658fd4aeef2ca24901fc66259e4dc EBUILD fakeroot-1.27.ebuild 1873 BLAKE2B 403342870cec943c9293250b47cc0c830c1bb69d5b341cacd3427c81bc9c04b39a16db8aeca88dabcdc670998bf3e2a312ea7520090c738bd450663735fa3e94 SHA512 ac5db48a976bb2ef41e03dc82c8617428ee3f923e5044085b6eac1be22c852227cd4f39d18092a776f99142de1754cb203c22971a45f304c281ce9e8a0981597 diff --git a/sys-apps/fakeroot/files/fakeroot-1.25.3-glibc-2.33.patch b/sys-apps/fakeroot/files/fakeroot-1.25.3-glibc-2.33.patch deleted file mode 100644 index 87ae9e18b746..000000000000 --- a/sys-apps/fakeroot/files/fakeroot-1.25.3-glibc-2.33.patch +++ /dev/null @@ -1,413 +0,0 @@ -From 03bc0ee07fb6e293d081ffd8af1654788b434f6a Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> -Date: Thu, 11 Feb 2021 20:59:25 -0800 -Subject: [PATCH 1/6] libfakeroot.c: define _STAT_VER if not already defined - -Based on patch from Jan Pazdziora: -https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/ - -Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> ---- - libfakeroot.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/libfakeroot.c b/libfakeroot.c -index 3e80e38..14cdbc4 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -90,6 +90,16 @@ - #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) - #endif - -+#ifndef _STAT_VER -+ #if defined (__aarch64__) -+ #define _STAT_VER 0 -+ #elif defined (__x86_64__) -+ #define _STAT_VER 1 -+ #else -+ #define _STAT_VER 3 -+ #endif -+#endif -+ - /* - These INT_* (which stands for internal) macros should always be used when - the fakeroot library owns the storage of the stat variable. --- -GitLab - - -From feda578ca3608b7fc9a28a3a91293611c0ef47b7 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> -Date: Thu, 11 Feb 2021 21:00:04 -0800 -Subject: [PATCH 2/6] libfakeroot.c: add wrappers for new glibc 2.33+ symbols - -Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> ---- - libfakeroot.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -diff --git a/libfakeroot.c b/libfakeroot.c -index 14cdbc4..d75c51f 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -1352,6 +1352,54 @@ int renameat(int olddir_fd, const char *oldpath, - #endif /* HAVE_FSTATAT */ - - -+#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33) -+/* Glibc 2.33 exports symbols for these functions in the shared lib */ -+ int lstat(const char *file_name, struct stat *statbuf) { -+ return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf); -+ } -+ int stat(const char *file_name, struct stat *st) { -+ return WRAP_STAT STAT_ARG(_STAT_VER, file_name, st); -+ } -+ int fstat(int fd, struct stat *st) { -+ return WRAP_FSTAT FSTAT_ARG(_STAT_VER, fd, st); -+ } -+ -+ #ifdef HAVE_FSTATAT -+ int fstatat(int dir_fd, const char *path, struct stat *st, int flags) { -+ return WRAP_FSTATAT FSTATAT_ARG(_STAT_VER, dir_fd, path, st, flags); -+ } -+ #endif -+ -+ #ifdef STAT64_SUPPORT -+ int lstat64(const char *file_name, struct stat64 *st) { -+ return WRAP_LSTAT64 LSTAT64_ARG(_STAT_VER, file_name, st); -+ } -+ int stat64(const char *file_name, struct stat64 *st) { -+ return WRAP_STAT64 STAT64_ARG(_STAT_VER, file_name, st); -+ } -+ int fstat64(int fd, struct stat64 *st) { -+ return WRAP_FSTAT64 FSTAT64_ARG(_STAT_VER, fd, st); -+ } -+ -+ #ifdef HAVE_FSTATAT -+ int fstatat64(int dir_fd, const char *path, struct stat64 *st, int flags) { -+ return WRAP_FSTATAT64 FSTATAT64_ARG(_STAT_VER, dir_fd, path, st, flags); -+ } -+ #endif -+ #endif -+ -+ int mknod(const char *pathname, mode_t mode, dev_t dev) { -+ return WRAP_MKNOD MKNOD_ARG(_STAT_VER, pathname, mode, &dev); -+ } -+ -+ #if defined(HAVE_FSTATAT) && defined(HAVE_MKNODAT) -+ int mknodat(int dir_fd, const char *pathname, mode_t mode, dev_t dev) { -+ return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev); -+ } -+ #endif -+#endif /* GLIBC_PREREQ */ -+ -+ - #ifdef FAKEROOT_FAKENET - pid_t fork(void) - { --- -GitLab - - -From d074aaa34d6928989308a3870738d6b1c28f2bae Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> -Date: Thu, 11 Feb 2021 21:00:20 -0800 -Subject: [PATCH 3/6] libfakeroot.c: fix compile error with DEBUG enabled - -Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> ---- - libfakeroot.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libfakeroot.c b/libfakeroot.c -index d75c51f..31480f8 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -2525,7 +2525,7 @@ int statx (int dirfd, const char *path, int flags, unsigned int mask, struct sta - - #ifdef LIBFAKEROOT_DEBUGGING - if (fakeroot_debug) { -- fprintf(stderr, "statx fd %d\n", fd); -+ fprintf(stderr, "statx fd %d\n", dirfd); - } - #endif /* LIBFAKEROOT_DEBUGGING */ - r=INT_NEXT_FSTATAT(dirfd, path, &st, flags); --- -GitLab - - -From c3eebec293e35b997bb46c22fb5a4e114afb5e7f Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> -Date: Sat, 13 Feb 2021 19:32:08 -0800 -Subject: [PATCH 4/6] configure.ac: fix __xmknod{,at} pointer argument - -Switch default to assume * and not the absence of *. - -On glibc 2.33+, there is no definition for these functions in header -files, so the compile test doesn't work. But, we can default to using -the pointer (as is the case with newer glibc), and use the header file -on older platforms to fail the test and use no pointer. - -Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> ---- - configure.ac | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 73415d2..d85566f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -183,13 +183,13 @@ AC_MSG_CHECKING([for type of arg of __xmknod]) - ]], [[ - int __xmknod ( int ver, - const char *pathname , -- mode_t mode , dev_t dev); -+ mode_t mode , dev_t *dev); - ]])],[ -- AC_DEFINE(XMKNOD_FRTH_ARG,) -- AC_MSG_RESULT([no extra *]) -- ],[ - AC_DEFINE(XMKNOD_FRTH_ARG,[*]) - AC_MSG_RESULT([needs *]) -+ ],[ -+ AC_DEFINE(XMKNOD_FRTH_ARG,) -+ AC_MSG_RESULT([no extra *]) - - ]) - -@@ -210,13 +210,13 @@ AC_MSG_CHECKING([for type of arg of __xmknodat]) - int __xmknodat ( int ver, - int dirfd, - const char *pathname , -- mode_t mode , dev_t dev); -+ mode_t mode , dev_t *dev); - ]])],[ -- AC_DEFINE(XMKNODAT_FIFTH_ARG,) -- AC_MSG_RESULT([no extra *]) -- ],[ - AC_DEFINE(XMKNODAT_FIFTH_ARG,[*]) - AC_MSG_RESULT([needs *]) -+ ],[ -+ AC_DEFINE(XMKNODAT_FIFTH_ARG,) -+ AC_MSG_RESULT([no extra *]) - - ]) - --- -GitLab - - -From 01671986b4ee8eb76dc7f63dfe034a7faf4a4c28 Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> -Date: Sat, 13 Feb 2021 19:35:31 -0800 -Subject: [PATCH 5/6] libfakeroot.c: fix fts_read and fts_children - -Apply Debian patch from [0], since glibc is usually built without LFS. -__USE_LARGEFILE64 and FTSENT64 should be used anyway for proper support -of this, if needed. See [1] for more details. - -[0]: https://sources.debian.org/patches/fakeroot/1.25.3-1.1/eglibc-fts-without-LFS/ -[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676428 - -Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> ---- - libfakeroot.c | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/libfakeroot.c b/libfakeroot.c -index 31480f8..169f4da 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -2066,11 +2066,7 @@ FTSENT *fts_read(FTS *ftsp) { - || r->fts_info == FTS_NS || r->fts_info == FTS_NSOK)) - r->fts_statp = NULL; /* Otherwise fts_statp may be a random pointer */ - if(r && r->fts_statp) { /* Should we bother checking fts_info here? */ --# if defined(STAT64_SUPPORT) && !defined(__APPLE__) -- SEND_GET_STAT64(r->fts_statp, _STAT_VER); --# else - SEND_GET_STAT(r->fts_statp, _STAT_VER); --# endif - } - - return r; -@@ -2089,11 +2085,7 @@ FTSENT *fts_children(FTS *ftsp, int options) { - first=next_fts_children(ftsp, options); - for(r = first; r; r = r->fts_link) { - if(r && r->fts_statp) { /* Should we bother checking fts_info here? */ --# if defined(STAT64_SUPPORT) && !defined(__APPLE__) -- SEND_GET_STAT64(r->fts_statp, _STAT_VER); --# else - SEND_GET_STAT(r->fts_statp, _STAT_VER); --# endif - } - } - --- -GitLab - - -From f5e0a89ab6f0024f3d3bec5fd9cf631676b44f6c Mon Sep 17 00:00:00 2001 -From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> -Date: Sat, 13 Feb 2021 20:05:17 -0800 -Subject: [PATCH 6/6] OS X portability - -OS X portability work from OpenWrt. - -Cc: Felix Fietkau <nbd@nbd.name> -Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> ---- - configure.ac | 1 + - libfakeroot.c | 36 ++++++++++++++++++++++++++++++++++-- - wrapawk_macosx | 10 +++++++--- - wrapfunc.inp | 4 ++-- - 4 files changed, 44 insertions(+), 7 deletions(-) - -diff --git a/configure.ac b/configure.ac -index d85566f..35f9ecf 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -146,6 +146,7 @@ for first in size_t int; do - #include <sys/types.h> - #endif - #include <unistd.h> -+#include <stdio.h> - #ifdef HAVE_GRP_H - #include <grp.h> - #endif -diff --git a/libfakeroot.c b/libfakeroot.c -index 169f4da..7593dd6 100644 ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -122,8 +122,16 @@ - #define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER) - #define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER) - #define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b) -+ -+/* 10.10 uses id_t in getpriority/setpriority calls, so pretend -+ id_t is used everywhere, just happens to be int on some OSes */ -+#ifndef _ID_T -+#define _ID_T -+typedef int id_t; -+#endif - #endif - -+#include <sys/types.h> - #include <stdlib.h> - #include <sys/ipc.h> - #include <sys/msg.h> -@@ -135,7 +143,6 @@ - #include <unistd.h> - #include <dirent.h> - #include <errno.h> --#include <sys/types.h> - #ifdef HAVE_SYS_ACL_H - #include <sys/acl.h> - #endif /* HAVE_SYS_ACL_H */ -@@ -198,6 +205,15 @@ extern int unsetenv (const char *name); - #undef __lxstat64 - #undef _FILE_OFFSET_BITS - -+ -+#ifndef AT_EMPTY_PATH -+#define AT_EMPTY_PATH 0 -+#endif -+ -+#ifndef AT_NO_AUTOMOUNT -+#define AT_NO_AUTOMOUNT 0 -+#endif -+ - /* - // next_wrap_st: - // this structure is used in next_wrap, which is defined in -@@ -1969,7 +1985,7 @@ ssize_t fremovexattr(int fd, const char *name) - } - #endif /* HAVE_FREMOVEXATTR */ - --int setpriority(int which, int who, int prio){ -+int setpriority(int which, id_t who, int prio){ - if (fakeroot_disabled) - return next_setpriority(which, who, prio); - next_setpriority(which, who, prio); -@@ -2570,3 +2586,19 @@ int sysinfo(int command, char *buf, long count) - } - } - #endif -+ -+#ifdef HAVE_OPENAT -+int openat(int dir_fd, const char *pathname, int flags, ...) -+{ -+ mode_t mode; -+ -+ if (flags & O_CREAT) { -+ va_list args; -+ va_start(args, flags); -+ mode = va_arg(args, int); -+ va_end(args); -+ } -+ -+ return next_openat(dir_fd, pathname, flags, mode); -+} -+#endif -diff --git a/wrapawk_macosx b/wrapawk_macosx -index 088a7f4..f783219 100644 ---- a/wrapawk_macosx -+++ b/wrapawk_macosx -@@ -46,26 +46,30 @@ BEGIN{ - argtype=$3; - argname=$4; - MACRO=$5; -+ argtype_def=$6 -+ if(!argtype_def) { -+ argtype_def = argtype -+ } - if(MACRO){ - print "extern " ret " MY_DEF(" name ")" argtype " __attribute__((visibility(\"hidden\")));" > headerfile; - print "INTERPOSE(MY_DEF(" name "_RAW)," name "_RAW);" > structfile; - print "#undef " name > deffile - print "#define " name " MY_DEF(" name "_RAW)" > deffile - -- print "extern " ret, name, argtype ";" > tmpffile; -+ print "extern " ret, name, argtype_def ";" > tmpffile; - print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " __attribute__((always_inline));" > tmpffile; - print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " {" > tmpffile; - print " return " name, argname ";" > tmpffile; - print "}" > tmpffile; - print "" > tmpffile; - } else { -- print "extern " ret " my_" name, argtype " __attribute__((visibility(\"hidden\")));" > headerfile; -+ print "extern " ret " my_" name, argtype_def " __attribute__((visibility(\"hidden\")));" > headerfile; - print "#undef " name > structfile; - print "INTERPOSE(my_" name "," name ");" > structfile; - print "#define " name " my_" name > structfile - print "#define " name " my_" name > deffile - -- print "extern " ret, name, argtype ";" > tmpffile; -+ print "extern " ret, name, argtype_def ";" > tmpffile; - if(argname){ - print "static __inline__ " ret " next_" name, argtype " __attribute__((always_inline));" > tmpffile; - print "static __inline__ " ret " next_" name, argtype " {" > tmpffile; -diff --git a/wrapfunc.inp b/wrapfunc.inp -index f7ad186..556af34 100644 ---- a/wrapfunc.inp -+++ b/wrapfunc.inp -@@ -146,7 +146,7 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid) - initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group) - getgroups;int;(int size, gid_t list[]);(size, list) - setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list) --setpriority;int;(int which, int who, int prio);(which, who, prio) -+setpriority;int;(int which, id_t who, int prio);(which, who, prio) - #ifdef HAVE_CAPSET - capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap) - #endif /* HAVE_CAPSET */ -@@ -198,7 +198,7 @@ fchownat;int;(int dir_fd, const char *path, uid_t owner, gid_t group, int flags) - mkdirat;int;(int dir_fd, const char *pathname, mode_t mode);(dir_fd, pathname, mode) - #endif /* HAVE_MKDIRAT */ - #ifdef HAVE_OPENAT --openat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, flags) -+openat;int;(int dir_fd, const char *pathname, int flags, mode_t mode);(dir_fd, pathname, flags, mode);;(int dir_fd, const char *pathname, int flags, ...) - #endif /* HAVE_OPENAT */ - #ifdef HAVE_RENAMEAT - renameat;int;(int olddir_fd, const char *oldpath, int newdir_fd, const char *newpath);(olddir_fd, oldpath, newdir_fd, newpath) --- -GitLab - diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest index 3dd280b3a3ac..c74e61a2b964 100644 --- a/sys-apps/plocate/Manifest +++ b/sys-apps/plocate/Manifest @@ -1,9 +1,11 @@ AUX plocate-1.1.15-meson-use-feature-option-for-libiouring.patch 1943 BLAKE2B cbcd583d93c3423c4cb8f13b3891ec34690ec1447c92f60291ec395437f11626aef82e669f470482c63232b9a7ebe73ed67cb7e0595a9f08b309f742c0d79d72 SHA512 110292358260f5fdf6f687b80c0375a91f224a190f6a25ec166c406cf4d39732493e0ebfea0fc02ccca18d95fdfcbff5d17d00cd10ac28c9a4ae46db8faf0ac9 +AUX plocate-1.1.16-error-to-fprintf-exit-musl.patch 10927 BLAKE2B a467330809ef59af57c37d584f6ccaf44da5e8ba0db38923f1d91bfdfc0061a9beab914e7527a7e532bdc0f4a2d9bb1f4438b63ade0a8947197dc233658663c9 SHA512 ad35e589f8efaa4998bc53b18c9bb7ffe201243640f86dbb39c7f43336ca068fc39cf357ebd1015cb57cdbbbf47f0ad81ddf7a757f17a9bd4ca1ea400bfef6ea +AUX plocate-1.1.16-include-linux-stat_h-musl.patch 860 BLAKE2B e22e96480d95da40dc5b935b61e2482d17c4754672ed9a33b7f98f2fa01f494f8a5b7fcf3354ae7861a6ea744906b135adb1658220776a6ec029c1623da67009 SHA512 475599d66efd9a6ceba650232a9f3b4480a6af6ef15c5d7bb6f85bcf63bf1b770e4c69c53f8bc308347639fb1a6eee45b5ae03d535c3a1c818bbda4729d10302 AUX plocate-cron.conf 237 BLAKE2B 531d6461309b520db31ab8f682ebbe56f2cd425222ebbc16a4662b606f5a0c6c62e4b1475a02ec3f244dde1ff73fe0ad16e0850aec53e6e8836fd0ba1273ad07 SHA512 ab055b052980783b5c63c716d7c12dcb19961a9f990c077e4f8c9bef4ca591bd281ac3941f872659a558a18b81c014dbc0655ff0a1872310670d8efc1d27cb00 AUX plocate.cron 1392 BLAKE2B 89f7eb05879c0c1a6c30376d36dc469dde0b94df3758ae659012cf9fb6e9fb2783a0d8e53ea5f79d99e2f00be72ef24a254f2d91038a30dc9e19cd2b250782f9 SHA512 b15583e98e253c2fcb658bd9c1c589bacddb8b033eb565333d9f990b1fd320fcfbe1d950657c8b5823d4cb034ccad369bdd2178ef955e42aa9c2f8e8a0268b3f AUX updatedb.conf 898 BLAKE2B de832ebc92e103ccaf8923b2eb872ad8e1ef36be2dfaa463a054e3e9fc256102db676ab0568501b695d943fcb74ae6ab01585bf7301cc6aa9ce6d709cc1690b5 SHA512 8b0b32e949636aef46c5439b0c963cc113306cedb1e5c84dbbfa2efba6562ca6dd602fdbfa0b3bc9095b0cf30a619ebb366535406cdb461f20d012ec1af7ff9d DIST plocate-1.1.15.tar.gz 73274 BLAKE2B 72dba287ba3357d2fa541542bf5e9d283eac672b7f3b2eebab687ecec930d6e91400eeb0f24c97d6133d69cae0308bc4473b7c8cbc5e263dd18ae8a7728a42a4 SHA512 772f82af38fd7b61fa51ac31f71d4a855542cfa617867da54b5ad8202f49f9e1861064a01e9b8f0937c3da902d84f19a50c1d0e4f037a491a9a6819b2413cfa1 DIST plocate-1.1.16.tar.gz 73397 BLAKE2B b6706145e9cba8b386761229cfbf23f8a9490596210b0a8dc467dfa6a6ed5b349c8f84cfcbe0430e89691afb50e257a3d331b1dcdc638611407587c8b623e72b SHA512 01dfc3ba434e6164f3e582fb102bd7ec0167a8f93e4cf9c3e72af804a8eda9b69b04fec20ee34fc19549d810b97076342f3a83b46705d0311ada6004d05da26c EBUILD plocate-1.1.15.ebuild 2195 BLAKE2B 707f602b2d22ab6a2856221c1d51b865d1cae1cfbc982e2ff839e70e0a7ff24ce15b9a967b30ca0a4fe7c9101d7e6e9e0ce782734752ced52098c65cd4b8121d SHA512 6394a30fb3ebb738d230c25d9e4857aca2ab5f31e279490b6b477dd871aaddf03cf5152b4dadbc92b8e87a06ccb8aaa3b8eec25af7fa92b0c2986ca136978ede -EBUILD plocate-1.1.16.ebuild 2196 BLAKE2B 634e6419b067d6f07c68e8e581221444106788996b17bed3af68d4d95e2c3b22cf78491608ec22435cf8e91e899480491a1c7edb6e73393e6bd82f81a2483879 SHA512 60b1b3de696979e06b1d94de11916b2e0b155af471775e4e4001f5d8dd228e63e0daff1a0975768a0e90f602a1b8463b7885a580c06c829ed11bf9a59a7e9988 +EBUILD plocate-1.1.16.ebuild 2317 BLAKE2B 943fce0b44252d0eabee8dc41cd6f1d68e405f2218fde801b09fe9edfd92490210cab90aff103a9467043e892de398c374a1bea9dabb2d6d91e064adc8ad9728 SHA512 f2e7f7d1bfcd0b67c6d1d0c9cdb17f956a1fe267331bc04e571c9274aaefb7f583c3f3fb11c82aef144d1aa5f5d3e7cb78cf43a8d785ab67bb05b211bcb86343 MISC metadata.xml 1437 BLAKE2B d3aece3d36e8cc4ceaf9947f0b535c7e2187a25cbb88910f704b1d72a2784831bfb746cca323c98183964688e6b5f2f2fa6bf54c97f8fc99eeea4ee946983e0d SHA512 b24d79da1b27531a7f3353128f7fbc583ef064f4aff58894e9d37dfa9144203c1f1898113aa31f82604aea93de66423e3313924bad25e31e075832c77a99c39e diff --git a/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch b/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch new file mode 100644 index 000000000000..6d108501307f --- /dev/null +++ b/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch @@ -0,0 +1,337 @@ +https://bugs.gentoo.org/829580 +https://git.sesse.net/?p=plocate;a=commit;h=fd6198891d6fd9642effc0843fef6f23b991af3e + +From fd6198891d6fd9642effc0843fef6f23b991af3e Mon Sep 17 00:00:00 2001 +From: "Steinar H. Gunderson" <steinar+git@gunderson.no> +Date: Wed, 13 Jul 2022 22:31:54 +0200 +Subject: [PATCH 2/2] Remove dependency on non-POSIX header error.h. + +This helps compatibility with certain configurations of musl libc. +Note that the output format on updatedb.conf errors will change somewhat, +and only the first one will be reported followed by immediate exit +(unlike earlier, where all updatedb.conf errors would be output before exit). + +Based on a patch by Alfred Persson Forsberg. +--- + conf.cpp | 178 +++++++++++++++++++++++++++++-------------------------- + 1 file changed, 94 insertions(+), 84 deletions(-) + +diff --git a/conf.cpp b/conf.cpp +index 1055fd7..60dd93f 100644 +--- a/conf.cpp ++++ b/conf.cpp +@@ -22,7 +22,6 @@ any later version. + + #include "conf.h" + +-#include "error.h" + #include "lib.h" + + #include <algorithm> +@@ -167,11 +166,6 @@ uc_lex(void) + /* Fall through */ + case '\n': + uc_current_line++; +- if (uc_current_line == 0) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_current_line - 1, +- _("warning: Line number overflow")); +- error_message_count--; /* Don't count as an error */ +- } + return UCT_EOL; + + case '=': +@@ -180,10 +174,9 @@ uc_lex(void) + case '"': { + while ((c = getc_unlocked(uc_file)) != '"') { + if (c == EOF || c == '\n') { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("missing closing `\"'")); +- ungetc(c, uc_file); +- break; ++ fprintf(stderr, "%s:%u: missing closing `\"'\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + uc_lex_buf.push_back(c); + } +@@ -215,21 +208,18 @@ uc_lex(void) + static void + parse_updatedb_conf(void) + { +- int old_error_one_per_line; +- unsigned old_error_message_count; + bool had_prune_bind_mounts, had_prunefs, had_prunenames, had_prunepaths; + + uc_file = fopen(UPDATEDB_CONF, "r"); + if (uc_file == NULL) { +- if (errno != ENOENT) +- error(EXIT_FAILURE, errno, _("can not open `%s'"), UPDATEDB_CONF); +- goto err; ++ if (errno != ENOENT) { ++ perror(UPDATEDB_CONF); ++ exit(EXIT_FAILURE); ++ } ++ return; + } + flockfile(uc_file); + uc_current_line = 1; +- old_error_message_count = error_message_count; +- old_error_one_per_line = error_one_per_line; +- error_one_per_line = 1; + had_prune_bind_mounts = false; + had_prunefs = false; + had_prunenames = false; +@@ -263,40 +253,39 @@ parse_updatedb_conf(void) + break; + + case UCT_IDENTIFIER: +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("unknown variable `%s'"), uc_lex_buf.c_str()); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: unknown variable: `%s'\n", ++ UPDATEDB_CONF, uc_line, uc_lex_buf.c_str()); ++ exit(EXIT_FAILURE); + + default: +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("variable name expected")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: variable name expected\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + if (*had_var != false) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("variable `%s' was already defined"), uc_lex_buf.c_str()); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: variable `%s' was already defined\n", ++ UPDATEDB_CONF, uc_line, uc_lex_buf.c_str()); ++ exit(EXIT_FAILURE); + } + *had_var = true; + var_token = token; + token = uc_lex(); + if (token != UCT_EQUAL) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("`=' expected after variable name")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: `=' expected after variable name\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + token = uc_lex(); + if (token != UCT_QUOTED) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("value in quotes expected after `='")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: value in quotes expected after `='\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + if (var_token == UCT_PRUNE_BIND_MOUNTS) { + if (parse_bool(&conf_prune_bind_mounts, uc_lex_buf.c_str()) != 0) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("invalid value `%s' of PRUNE_BIND_MOUNTS"), +- uc_lex_buf.c_str()); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: invalid value `%s' of PRUNE_BIND_MOUNTS\n", ++ UPDATEDB_CONF, uc_line, uc_lex_buf.c_str()); ++ exit(EXIT_FAILURE); + } + } else if (var_token == UCT_PRUNEFS) + var_add_values(&conf_prunefs, uc_lex_buf.c_str()); +@@ -308,12 +297,11 @@ parse_updatedb_conf(void) + abort(); + token = uc_lex(); + if (token != UCT_EOL && token != UCT_EOF) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("unexpected data after variable value")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: unexpected data after variable value\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + /* Fall through */ +- skip_to_eol: + while (token != UCT_EOL) { + if (token == UCT_EOF) + goto eof; +@@ -321,14 +309,12 @@ parse_updatedb_conf(void) + } + } + eof: +- if (ferror(uc_file)) +- error(EXIT_FAILURE, 0, _("I/O error reading `%s'"), UPDATEDB_CONF); +- error_one_per_line = old_error_one_per_line; ++ if (ferror(uc_file)) { ++ perror(UPDATEDB_CONF); ++ exit(EXIT_FAILURE); ++ } + funlockfile(uc_file); + fclose(uc_file); +- if (error_message_count != old_error_message_count) +- exit(EXIT_FAILURE); +-err:; + } + + /* Command-line argument parsing */ +@@ -384,8 +370,11 @@ prepend_cwd(const string &path) + do + buf.resize(buf.size() * 1.5); + while ((res = getcwd(buf.data(), buf.size())) == NULL && errno == ERANGE); +- if (res == NULL) +- error(EXIT_FAILURE, errno, _("can not get current working directory")); ++ if (res == NULL) { ++ fprintf(stderr, "%s: %s: can not get current working directory\n", ++ program_invocation_name, strerror(errno)); ++ exit(EXIT_FAILURE); ++ } + buf.resize(strlen(buf.data())); + return buf + '/' + path; + } +@@ -438,54 +427,64 @@ parse_arguments(int argc, char *argv[]) + exit(EXIT_FAILURE); + + case 'B': +- if (got_prune_bind_mounts != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prune-bind-mounts"); ++ if (got_prune_bind_mounts != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prune-bind-mounts"); ++ exit(EXIT_FAILURE); ++ } + got_prune_bind_mounts = true; +- if (parse_bool(&conf_prune_bind_mounts, optarg) != 0) +- error(EXIT_FAILURE, 0, _("invalid value `%s' of --%s"), optarg, +- "prune-bind-mounts"); ++ if (parse_bool(&conf_prune_bind_mounts, optarg) != 0) { ++ fprintf(stderr, "%s: invalid value %s of --%s\n", ++ program_invocation_name, optarg, "prune-bind-mounts"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'F': +- if (prunefs_changed != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prunefs"); ++ if (prunefs_changed != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prunefs"); ++ exit(EXIT_FAILURE); ++ } + prunefs_changed = true; + conf_prunefs.clear(); + var_add_values(&conf_prunefs, optarg); + break; + + case 'N': +- if (prunenames_changed != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prunenames"); ++ if (prunenames_changed != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prunenames"); ++ exit(EXIT_FAILURE); ++ } + prunenames_changed = true; + conf_prunenames.clear(); + var_add_values(&conf_prunenames, optarg); + break; + + case 'P': +- if (prunepaths_changed != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prunepaths"); ++ if (prunepaths_changed != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prunepaths"); ++ exit(EXIT_FAILURE); ++ } + prunepaths_changed = true; + conf_prunepaths.clear(); + var_add_values(&conf_prunepaths, optarg); + break; + + case 'U': +- if (conf_scan_root != NULL) +- error(EXIT_FAILURE, 0, _("--%s specified twice"), +- "database-root"); ++ if (conf_scan_root != NULL) { ++ fprintf(stderr, "%s: --%s specified twice\n", ++ program_invocation_name, "database-root"); ++ exit(EXIT_FAILURE); ++ } + conf_scan_root = realpath(optarg, nullptr); +- if (conf_scan_root == NULL) +- error(EXIT_FAILURE, errno, _("invalid value `%s' of --%s"), optarg, +- "database-root"); ++ if (conf_scan_root == NULL) { ++ fprintf(stderr, "%s: %s: invalid value `%s' of --%s\n", ++ program_invocation_name, strerror(errno), optarg, "database-root"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'V': +@@ -517,13 +516,18 @@ parse_arguments(int argc, char *argv[]) + exit(EXIT_SUCCESS); + + case 'l': +- if (got_visibility != false) +- error(EXIT_FAILURE, 0, _("--%s specified twice"), +- "require-visibility"); ++ if (got_visibility != false) { ++ fprintf(stderr, "%s: --%s specified twice\n", ++ program_invocation_name, "require-visibility"); ++ exit(EXIT_FAILURE); ++ } ++ + got_visibility = true; +- if (parse_bool(&conf_check_visibility, optarg) != 0) +- error(EXIT_FAILURE, 0, _("invalid value `%s' of --%s"), optarg, +- "require-visibility"); ++ if (parse_bool(&conf_check_visibility, optarg) != 0) { ++ fprintf(stderr, "%s: invalid value `%s' of --%s", ++ program_invocation_name, optarg, "require-visibility"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'n': +@@ -532,8 +536,11 @@ parse_arguments(int argc, char *argv[]) + break; + + case 'o': +- if (!conf_output.empty()) +- error(EXIT_FAILURE, 0, _("--%s specified twice"), "output"); ++ if (!conf_output.empty()) { ++ fprintf(stderr, "%s: --%s specified twice", ++ program_invocation_name, "output"); ++ exit(EXIT_FAILURE); ++ } + conf_output = optarg; + break; + +@@ -558,8 +565,11 @@ parse_arguments(int argc, char *argv[]) + } + } + options_done: +- if (optind != argc) +- error(EXIT_FAILURE, 0, _("unexpected operand on command line")); ++ if (optind != argc) { ++ fprintf(stderr, "%s: unexpected operand on command line", ++ program_invocation_name); ++ exit(EXIT_FAILURE); ++ } + if (conf_scan_root == NULL) { + static char root[] = "/"; + +-- +2.35.1 + diff --git a/sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch b/sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch new file mode 100644 index 000000000000..a4b9fe4d1bc6 --- /dev/null +++ b/sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch @@ -0,0 +1,30 @@ +https://git.sesse.net/?p=plocate;a=commit;h=0125004cd28c5f9124632b594e51dde73af1691c +https://git.alpinelinux.org/aports/tree/community/plocate/include-statx.patch +https://bugs.gentoo.org/853769 + +From 0125004cd28c5f9124632b594e51dde73af1691c Mon Sep 17 00:00:00 2001 +From: "Steinar H. Gunderson" <steinar+git@gunderson.no> +Date: Sat, 25 Jun 2022 10:01:49 +0200 +Subject: [PATCH 1/2] Add a missing #include. + +Taken from the Alpine Linux packaging; seems to be for statx() +(presumably on musl libc). +--- + io_uring_engine.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/io_uring_engine.h b/io_uring_engine.h +index 688a6ae..bcb1058 100644 +--- a/io_uring_engine.h ++++ b/io_uring_engine.h +@@ -7,6 +7,7 @@ + #include <string_view> + #include <sys/socket.h> + #include <sys/types.h> ++#include <linux/stat.h> + + struct io_uring_sqe; + #ifndef WITHOUT_URING +-- +2.35.1 + diff --git a/sys-apps/plocate/plocate-1.1.16.ebuild b/sys-apps/plocate/plocate-1.1.16.ebuild index baa634d92859..ea20d3fb9b1c 100644 --- a/sys-apps/plocate/plocate-1.1.16.ebuild +++ b/sys-apps/plocate/plocate-1.1.16.ebuild @@ -26,6 +26,8 @@ DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}"/${PN}-1.1.15-meson-use-feature-option-for-libiouring.patch + "${FILESDIR}"/${PN}-1.1.16-error-to-fprintf-exit-musl.patch + "${FILESDIR}"/${PN}-1.1.16-include-linux-stat_h-musl.patch ) pkg_setup() { diff --git a/sys-apps/systemd-utils/Manifest b/sys-apps/systemd-utils/Manifest index 2d720da3bbd3..3a8051dca087 100644 --- a/sys-apps/systemd-utils/Manifest +++ b/sys-apps/systemd-utils/Manifest @@ -5,7 +5,11 @@ AUX systemd-tmpfiles-setup-dev 342 BLAKE2B 95956e57d4f2aa10a09f23c08045ceed6fac3 DIST systemd-musl-patches-250.4.tar.gz 28065 BLAKE2B b8366c4bb29705e3f41f07d0105c4d252d543aaac178e968663660eeb573da034813aa50a96c74ac78ae5efeea379e00df33c5a039ec828cf93450ed23786252 SHA512 66e41fab1873021913c32e3f43300ea7babd18a36e6543838ab7fab4c44f5590c6a7414dd50c7ee81e5513b0e5aa01cb6df4231e8e06c609d63011a32b524213 DIST systemd-musl-patches-251.2.tar.gz 28512 BLAKE2B 4ac6a5220dab8409962a3954af2fb2484af718d0f282129957236ce241fbe8538a90d507a96c7c3d86f4f408ab784a6888b37486405d3276e7734a1bd5aa9680 SHA512 6e56b62234ac54929faea5a7cad699d0b932f869b48e3ba4e1f349a88653b7c787efec24a09b00290c3dc566614e3c1dc2f3c04f04e943f513108a91eca1be82 DIST systemd-stable-250.7.tar.gz 11214975 BLAKE2B 5d94b4b1f8b0cd6e8284a89ac0d4bd373eccdad2c3d6e6c453df79c8df47ee0f9cfbde764b72b1f9d172d07e2d9f1f1f41c1ab254cf4abd0722469ebc3ad7cf8 SHA512 99bc6f0c9757b280cb694f3fb4d6fe04d5ce55583eb2bae5ddeb324bb5ee9930c1720fcc27293d90cddba188473653ec541a471ae8115710a5850c26d0ba215d +DIST systemd-stable-250.8.tar.gz 11215608 BLAKE2B 2a66a2d8cb70f265b59640ace907b8d927018fe11c8977e134a33d67683f06b26c1eb3fd5afe40431bc2c15827ba60c46a37ff1a0a4c716dd24b73aca1583d00 SHA512 653f527f10779a31213da06f7587a3617bd4b823bd3e5a43d626c5a4a7301e4a0fb42cf1fd056d28af6d87e52f258da59d5f0d4a2d98076905f9d3fcda6d18fd DIST systemd-stable-251.2.tar.gz 11434645 BLAKE2B a7e118649a7d27b789206ea9f6f2d0314e44561367506ee763a9e98fb97579b3fc49c7a402c8da142945dc98444558f0e311557f52c50863cebc7532c17c651f SHA512 0c4011b685a1e8d535af123cbaf79ab53d59ea665ca5350ab1077ad4e962b49c1fd5b1b5bb3f28c3e28145dfd02aa83023f78de5edec15afe84e3e06e742a67c +DIST systemd-stable-251.3.tar.gz 11435458 BLAKE2B 544238536848ab390b2476d5ad95d33998674be50020b8db0627bb9d0c86be6576c404ce786b01ceec86f1c75b174c6fc2d7e0d7fbab802a78f48c9d0915c2b8 SHA512 fb5b8dc1742562ef95469e90d406cfb6dfcb337860ad1208b460414b88ff0565071bde797d195faa62761206abc881829de6b1009e5d727cad2dfe0764310d5f EBUILD systemd-utils-250.7.ebuild 11342 BLAKE2B 67a094e130be3b21a647a3db3a66ea0b35b6f4292fa98c3e81d6a2ecd09b291ef08efdbb048e73c5b141b1cf815a4d7a340c6b43c65aa6a3f5b31fa962b60f89 SHA512 2d88c146cebdc0ae5344c80cf807507e343e77ca37af9b0c28cd131ce2f532418e13773ae00a712d54302b8196e4b5696c1a213dbb2472931d79e1f8485b4537 +EBUILD systemd-utils-250.8.ebuild 11350 BLAKE2B faf9c2a6685159fe9352e88ecc5855f38c7806f4a2da41e2e5ad1ce6124a4fbb9b42a71c351070297a821b093856a4b75263865b1ffe0d7fe16ebdced0dfdc64 SHA512 6ebec4e3a65f50467bc3b5995acb0ab483723e87dcfef8d4c5a7b4f26d8116049ed2c4c78f3f03f9216af5dc87767e69195f0bbff909644bfa91e688bf602058 EBUILD systemd-utils-251.2-r1.ebuild 11492 BLAKE2B d32e0222842f5981ee2aab1a3a67b1679e409b195503ad9f7ef185150e5fa2b98504c774f4bbcf5260523309d431582dc75fcf3d67818a981dbaffe40add999a SHA512 b2c1c51130c7ac90a98ae8af25167d2dc47dee6ec92342bd83159898f1a2170b4599c984d00430294cd4ac7895996e7b8682d111ff82148d574e613719b00588 +EBUILD systemd-utils-251.3.ebuild 11492 BLAKE2B d32e0222842f5981ee2aab1a3a67b1679e409b195503ad9f7ef185150e5fa2b98504c774f4bbcf5260523309d431582dc75fcf3d67818a981dbaffe40add999a SHA512 b2c1c51130c7ac90a98ae8af25167d2dc47dee6ec92342bd83159898f1a2170b4599c984d00430294cd4ac7895996e7b8682d111ff82148d574e613719b00588 MISC metadata.xml 571 BLAKE2B 6b3a69524c5fd3fa0bbe534ccbf3598cedcbe51542d738237ca13b465fd342555f35b2ebd1d784b7a81664c58125e01404434ca48a07502343a24dd395618c4c SHA512 8184f6d8107be83d7411f63e86a8469c4b86c96bf4738ebfda8d654e4ecedf334b4319c9d442832c8373a34e7c35ca14b879e75eb4e006d48fa3d667be0a66e4 diff --git a/sys-apps/systemd-utils/systemd-utils-250.8.ebuild b/sys-apps/systemd-utils/systemd-utils-250.8.ebuild new file mode 100644 index 000000000000..9afc4a2e8c10 --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-250.8.ebuild @@ -0,0 +1,500 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{8..11} ) + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs udev usr-ldscript + +DESCRIPTION="Utilities split out from systemd for OpenRC users" +HOMEPAGE="https://systemd.io/" + +if [[ ${PV} == *.* ]]; then + MY_P="systemd-stable-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +else + MY_P="systemd-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +fi + +MUSL_PATCHSET="systemd-musl-patches-250.4" +SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+acl boot +kmod selinux sysusers +tmpfiles test +udev" +REQUIRED_USE="|| ( boot tmpfiles sysusers udev )" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + selinux? ( sys-libs/libselinux:0= ) + tmpfiles? ( + acl? ( sys-apps/acl:0= ) + ) + udev? ( + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + ) + !udev? ( + >=sys-apps/util-linux-2.30:0= + sys-libs/libcap:0= + virtual/libcrypt:= + ) +" +DEPEND="${COMMON_DEPEND} + boot? ( + >=sys-boot/gnu-efi-3.0.2 + ) + >=sys-kernel/linux-headers-3.11 +" +RDEPEND="${COMMON_DEPEND} + boot? ( !<sys-boot/systemd-boot-250 ) + tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 ) + udev? ( + acct-group/audio + acct-group/cdrom + acct-group/dialout + acct-group/disk + acct-group/input + acct-group/kmem + acct-group/kvm + acct-group/lp + acct-group/render + acct-group/sgx + acct-group/tape + acct-group/tty + acct-group/video + !sys-apps/gentoo-systemd-integration + !sys-apps/hwids[udev] + !<sys-fs/udev-250 + !sys-fs/eudev + ) + !sys-apps/systemd +" +PDEPEND=" + udev? ( >=sys-fs/udev-init-scripts-34 ) +" +BDEPEND=" + $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-util/gperf + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig +" + +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +python_check_deps() { + has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" +} + +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" + +src_prepare() { + local PATCHES=( + "${FILESDIR}/250.4-test-systemd-tmpfiles.standalone.patch" + ) + if use elibc_musl; then + PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" ) + fi + default + + # Remove install_rpath; we link statically + local rpath_pattern="install_rpath : rootlibexecdir," + grep -q -e "${rpath_pattern}" meson.build || die + sed -i -e "/${rpath_pattern}/d" meson.build || die +} + +multilib_src_configure() { + # When bumping to 251, please keep this, but add the revert patch + # like in sys-apps/systemd! + # + # Broken with FORTIFY_SOURCE=3 without a patch. And the patch + # wasn't backported to 250.x, but it turns out to break Clang + # anyway: bug #841770. + # + # Our toolchain sets F_S=2 by default w/ >= -O2, so we need + # to unset F_S first, then explicitly set 2, to negate any default + # and anything set by the user if they're choosing 3 (or if they've + # modified GCC to set 3). + # + if is-flagq '-O[23]' || is-flagq '-Ofast' ; then + # We can't unconditionally do this b/c we fortify needs + # some level of optimisation. + filter-flags -D_FORTIFY_SOURCE=3 + append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 + fi + + local emesonargs=( + -Drootprefix="${EPREFIX:-/}" + -Dsysvinit-path= + $(meson_native_use_bool boot efi) + $(meson_native_use_bool boot gnu-efi) + $(meson_native_use_bool selinux) + $(meson_native_use_bool sysusers) + $(meson_use test tests) + $(meson_native_use_bool tmpfiles) + $(meson_use udev hwdb) + + -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" + + # Link staticly with libsystemd-shared + -Dlink-boot-shared=false + -Dlink-udev-shared=false + + # systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target + -Dstandalone-binaries=true + + # Disable all optional features + -Dadm-group=false + -Danalyze=false + -Dapparmor=false + -Daudit=false + -Dbacklight=false + -Dbinfmt=false + -Dbzip2=false + -Dcoredump=false + -Ddbus=false + -Delfutils=false + -Denvironment-d=false + -Dfdisk=false + -Dgcrypt=false + -Dglib=false + -Dgshadow=false + -Dgnutls=false + -Dhibernate=false + -Dhostnamed=false + -Didn=false + -Dima=false + -Dinitrd=false + -Dfirstboot=false + -Dkernel-install=false + -Dldconfig=false + -Dlibcryptsetup=false + -Dlibcurl=false + -Dlibfido2=false + -Dlibidn=false + -Dlibidn2=false + -Dlibiptc=false + -Dlocaled=false + -Dlogind=false + -Dlz4=false + -Dmachined=false + -Dmicrohttpd=false + -Dnetworkd=false + -Dnscd=false + -Dnss-myhostname=false + -Dnss-resolve=false + -Dnss-systemd=false + -Doomd=false + -Dopenssl=false + -Dp11kit=false + -Dpam=false + -Dpcre2=false + -Dpolkit=false + -Dportabled=false + -Dpstore=false + -Dpwquality=false + -Drandomseed=false + -Dresolve=false + -Drfkill=false + -Dseccomp=false + -Dsmack=false + -Dsysext=false + -Dtimedated=false + -Dtimesyncd=false + -Dtpm=false + -Dqrencode=false + -Dquotacheck=false + -Duserdb=false + -Dutmp=false + -Dvconsole=false + -Dwheel-group=false + -Dxdg-autostart=false + -Dxkbcommon=false + -Dxz=false + -Dzlib=false + -Dzstd=false + ) + + if use tmpfiles || use udev; then + emesonargs+=( $(meson_native_use_bool acl) ) + else + emesonargs+=( -Dacl=false ) + fi + + if use udev; then + emesonargs+=( $(meson_native_use_bool kmod) ) + else + emesonargs+=( -Dkmod=false ) + fi + + if use elibc_musl; then + # Avoid redefinition of struct ethhdr. + append-cppflags -D__UAPI_DEF_ETHHDR=0 + fi + + if multilib_is_native_abi || use udev; then + meson_src_configure + fi +} + +efi_arch() { + case "$(tc-arch)" in + amd64) echo x64 ;; + arm) echo arm ;; + arm64) echo aa64 ;; + x86) echo x86 ;; + esac +} + +multilib_src_compile() { + local targets=() + if multilib_is_native_abi; then + if use boot; then + targets+=( + bootctl + man/bootctl.1 + man/kernel-install.8 + src/boot/efi/linux$(efi_arch).{efi,elf}.stub + src/boot/efi/systemd-boot$(efi_arch).efi + ) + fi + if use sysusers; then + targets+=( + systemd-sysusers.standalone + man/sysusers.d.5 + man/systemd-sysusers.8 + ) + if use test; then + targets+=( + systemd-runtest.env + ) + fi + fi + if use tmpfiles; then + targets+=( + systemd-tmpfiles.standalone + man/tmpfiles.d.5 + man/systemd-tmpfiles.8 + ) + if use test; then + targets+=( test-tmpfiles ) + fi + fi + if use udev; then + targets+=( + udevadm + systemd-hwdb + src/udev/ata_id + src/udev/cdrom_id + src/udev/fido_id + src/udev/mtd_probe + src/udev/scsi_id + src/udev/udev.pc + src/udev/v4l_id + man/udev.conf.5 + man/systemd.link.5 + man/hwdb.7 + man/udev.7 + man/systemd-hwdb.8 + man/systemd-udevd.service.8 + man/udevadm.8 + hwdb.d/60-autosuspend-chromiumos.hwdb + rules.d/50-udev-default.rules + rules.d/64-btrfs.rules + ) + if use test; then + targets+=( + # Used by udev-test.pl + systemd-detect-virt + test/sys + test-udev + + test-fido-id-desc + test-udev-builtin + test-udev-event + test-udev-netlink + test-udev-node + test-udev-util + ) + fi + fi + fi + if use udev; then + targets+=( + udev:shared_library + src/libudev/libudev.pc + ) + if use test; then + targets+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + fi + if multilib_is_native_abi || use udev; then + meson_src_compile "${targets[@]}" + fi +} + +multilib_src_test() { + local tests=() + if multilib_is_native_abi; then + if use sysusers; then + tests+=( + test-sysusers.standalone + ) + fi + if use tmpfiles; then + tests+=( + test-systemd-tmpfiles.standalone + test-tmpfiles + ) + fi + if use udev; then + tests+=( + rule-syntax-check + test-fido-id-desc + test-udev-builtin + test-udev-event + test-udev-netlink + test-udev-node + test-udev-util + ) + if [[ -w /dev ]]; then + tests+=( udev-test ) + else + ewarn "Skipping udev-test (needs write access to /dev)" + fi + fi + fi + if use udev; then + tests+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + if [[ ${#tests[@]} -ne 0 ]]; then + meson_src_test "${tests[@]}" + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + if use boot; then + into /usr + dobin bootctl + doman man/{bootctl.1,kernel-install.8} + insinto usr/lib/systemd/boot/efi + doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi} + fi + if use sysusers; then + into / + newbin systemd-sysusers{.standalone,} + doman man/{systemd-sysusers.8,sysusers.d.5} + fi + if use tmpfiles; then + into / + newbin systemd-tmpfiles{.standalone,} + doman man/{systemd-tmpfiles.8,tmpfiles.d.5} + fi + if use udev; then + into / + dobin udevadm systemd-hwdb + dosym ../../bin/udevadm /lib/systemd/systemd-udevd + exeinto /lib/udev + doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id} + insinto /lib/udev/rules.d + doins rules.d/*.rules + insinto /lib/udev/hwdb.d + doins hwdb.d/*.hwdb + insinto /usr/share/pkgconfig + doins src/udev/udev.pc + doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8} + newman man/systemd-udevd.service.8 systemd-udevd.8 + + fi + fi + if use udev; then + into /usr + dolib.so "$(readlink libudev.so.1)" libudev.so{.1,} + gen_usr_ldscript -a udev + insinto "/usr/$(get_libdir)/pkgconfig" + doins src/libudev/libudev.pc + fi +} + +multilib_src_install_all() { + einstalldocs + if use boot; then + into /usr + dobin src/kernel-install/kernel-install + exeinto usr/lib/kernel/install.d + doexe src/kernel-install/*.install + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use tmpfiles; then + doinitd "${FILESDIR}"/systemd-tmpfiles-setup + doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_systemd-tmpfiles + fi + if use udev; then + doheader src/libudev/libudev.h + insinto /etc/udev + doins src/udev/udev.conf + keepdir /etc/udev/{hwdb.d,rules.d} + insinto /lib/systemd/network + doins network/99-default.link + insinto /lib/udev/rules.d + doins rules.d/*.rules + doins "${FILESDIR}"/40-gentoo.rules + insinto /lib/udev/hwdb.d + doins hwdb.d/*.hwdb + dobashcomp shell-completion/bash/udevadm + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_udevadm + fi +} + +add_service() { + local initd=$1 + local runlevel=$2 + + ebegin "Adding '${initd}' service to the '${runlevel}' runlevel" + mkdir -p "${EROOT}/etc/runlevels/${runlevel}" && + ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}" + eend $? +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + add_service systemd-tmpfiles-setup-dev sysinit + add_service systemd-tmpfiles-setup boot + fi + if use udev; then + ebegin "Updating hwdb" + systemd-hwdb --root="${ROOT}" update + eend $? + udev_reload + fi +} diff --git a/sys-apps/systemd-utils/systemd-utils-251.3.ebuild b/sys-apps/systemd-utils/systemd-utils-251.3.ebuild new file mode 100644 index 000000000000..357c32eb616c --- /dev/null +++ b/sys-apps/systemd-utils/systemd-utils-251.3.ebuild @@ -0,0 +1,511 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( python3_{8..11} ) + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +inherit bash-completion-r1 flag-o-matic meson-multilib python-any-r1 toolchain-funcs udev usr-ldscript + +DESCRIPTION="Utilities split out from systemd for OpenRC users" +HOMEPAGE="https://systemd.io/" + +if [[ ${PV} == *.* ]]; then + MY_P="systemd-stable-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd-stable/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +else + MY_P="systemd-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/systemd/systemd/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" +fi + +MUSL_PATCHSET="systemd-musl-patches-251.2" +SRC_URI+=" elibc_musl? ( https://dev.gentoo.org/~floppym/dist/${MUSL_PATCHSET}.tar.gz )" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="+acl boot +kmod selinux sysusers +tmpfiles test +udev" +REQUIRED_USE="|| ( boot tmpfiles sysusers udev )" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + elibc_musl? ( >=sys-libs/musl-1.2.3 ) + selinux? ( sys-libs/libselinux:0= ) + tmpfiles? ( + acl? ( sys-apps/acl:0= ) + ) + udev? ( + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + ) + !udev? ( + >=sys-apps/util-linux-2.30:0= + sys-libs/libcap:0= + virtual/libcrypt:= + ) +" +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-3.11 + boot? ( >=sys-boot/gnu-efi-3.0.2 ) +" +RDEPEND="${COMMON_DEPEND} + boot? ( !<sys-boot/systemd-boot-250 ) + tmpfiles? ( !<sys-apps/systemd-tmpfiles-250 ) + udev? ( + acct-group/audio + acct-group/cdrom + acct-group/dialout + acct-group/disk + acct-group/input + acct-group/kmem + acct-group/kvm + acct-group/lp + acct-group/render + acct-group/sgx + acct-group/tape + acct-group/tty + acct-group/video + !sys-apps/gentoo-systemd-integration + !sys-apps/hwids[udev] + !<sys-fs/udev-250 + !sys-fs/eudev + ) + !sys-apps/systemd +" +PDEPEND=" + udev? ( >=sys-fs/udev-init-scripts-34 ) +" +BDEPEND=" + $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-util/gperf + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig +" + +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +python_check_deps() { + has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" +} + +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" + +src_prepare() { + local PATCHES=( + ) + if use elibc_musl; then + PATCHES+=( "${WORKDIR}/${MUSL_PATCHSET}" ) + fi + default + + # Remove install_rpath; we link statically + local rpath_pattern="install_rpath : rootlibexecdir," + grep -q -e "${rpath_pattern}" meson.build || die + sed -i -e "/${rpath_pattern}/d" meson.build || die +} + +multilib_src_configure() { + # When bumping to 251, please keep this, but add the revert patch + # like in sys-apps/systemd! + # + # Broken with FORTIFY_SOURCE=3 without a patch. And the patch + # wasn't backported to 250.x, but it turns out to break Clang + # anyway: bug #841770. + # + # Our toolchain sets F_S=2 by default w/ >= -O2, so we need + # to unset F_S first, then explicitly set 2, to negate any default + # and anything set by the user if they're choosing 3 (or if they've + # modified GCC to set 3). + # + if is-flagq '-O[23]' || is-flagq '-Ofast' ; then + # We can't unconditionally do this b/c we fortify needs + # some level of optimisation. + filter-flags -D_FORTIFY_SOURCE=3 + append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 + fi + + local emesonargs=( + -Drootprefix="${EPREFIX:-/}" + -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" + -Dsysvinit-path= + $(meson_native_use_bool boot efi) + $(meson_native_use_bool boot gnu-efi) + $(meson_native_use_bool boot kernel-install) + $(meson_native_use_bool selinux) + $(meson_native_use_bool sysusers) + $(meson_use test tests) + $(meson_native_use_bool tmpfiles) + $(meson_use udev hwdb) + + -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" + + # Link staticly with libsystemd-shared + -Dlink-boot-shared=false + -Dlink-udev-shared=false + + # systemd-tmpfiles has a separate "systemd-tmpfiles.standalone" target + -Dstandalone-binaries=true + + # Disable all optional features + -Dadm-group=false + -Danalyze=false + -Dapparmor=false + -Daudit=false + -Dbacklight=false + -Dbinfmt=false + -Dbzip2=false + -Dcoredump=false + -Ddbus=false + -Delfutils=false + -Denvironment-d=false + -Dfdisk=false + -Dgcrypt=false + -Dglib=false + -Dgshadow=false + -Dgnutls=false + -Dhibernate=false + -Dhostnamed=false + -Didn=false + -Dima=false + -Dinitrd=false + -Dfirstboot=false + -Dldconfig=false + -Dlibcryptsetup=false + -Dlibcurl=false + -Dlibfido2=false + -Dlibidn=false + -Dlibidn2=false + -Dlibiptc=false + -Dlocaled=false + -Dlogind=false + -Dlz4=false + -Dmachined=false + -Dmicrohttpd=false + -Dnetworkd=false + -Dnscd=false + -Dnss-myhostname=false + -Dnss-resolve=false + -Dnss-systemd=false + -Doomd=false + -Dopenssl=false + -Dp11kit=false + -Dpam=false + -Dpcre2=false + -Dpolkit=false + -Dportabled=false + -Dpstore=false + -Dpwquality=false + -Drandomseed=false + -Dresolve=false + -Drfkill=false + -Dseccomp=false + -Dsmack=false + -Dsysext=false + -Dtimedated=false + -Dtimesyncd=false + -Dtpm=false + -Dqrencode=false + -Dquotacheck=false + -Duserdb=false + -Dutmp=false + -Dvconsole=false + -Dwheel-group=false + -Dxdg-autostart=false + -Dxkbcommon=false + -Dxz=false + -Dzlib=false + -Dzstd=false + ) + + if use tmpfiles || use udev; then + emesonargs+=( $(meson_native_use_bool acl) ) + else + emesonargs+=( -Dacl=false ) + fi + + if use udev; then + emesonargs+=( $(meson_native_use_bool kmod) ) + else + emesonargs+=( -Dkmod=false ) + fi + + if use elibc_musl; then + # Avoid redefinition of struct ethhdr. + append-cppflags -D__UAPI_DEF_ETHHDR=0 + fi + + if multilib_is_native_abi || use udev; then + meson_src_configure + fi +} + +efi_arch() { + case "$(tc-arch)" in + amd64) echo x64 ;; + arm) echo arm ;; + arm64) echo aa64 ;; + x86) echo x86 ;; + esac +} + +multilib_src_compile() { + local targets=() + if multilib_is_native_abi; then + if use boot; then + targets+=( + bootctl + kernel-install + man/bootctl.1 + man/kernel-install.8 + src/boot/efi/linux$(efi_arch).{efi,elf}.stub + src/boot/efi/systemd-boot$(efi_arch).efi + ) + fi + if use sysusers; then + targets+=( + systemd-sysusers.standalone + man/sysusers.d.5 + man/systemd-sysusers.8 + ) + if use test; then + targets+=( + systemd-runtest.env + ) + fi + fi + if use tmpfiles; then + targets+=( + systemd-tmpfiles.standalone + man/tmpfiles.d.5 + man/systemd-tmpfiles.8 + ) + if use test; then + targets+=( test-tmpfiles ) + fi + fi + if use udev; then + targets+=( + udevadm + systemd-hwdb + src/udev/ata_id + src/udev/cdrom_id + src/udev/fido_id + src/udev/mtd_probe + src/udev/scsi_id + src/udev/udev.pc + src/udev/v4l_id + man/udev.conf.5 + man/systemd.link.5 + man/hwdb.7 + man/udev.7 + man/systemd-hwdb.8 + man/systemd-udevd.service.8 + man/udevadm.8 + hwdb.d/60-autosuspend-chromiumos.hwdb + rules.d/50-udev-default.rules + rules.d/64-btrfs.rules + ) + if use test; then + targets+=( + # Used by udev-test.pl + systemd-detect-virt + test/sys + test-udev + + test-fido-id-desc + test-udev-builtin + test-udev-event + test-udev-netlink + test-udev-node + test-udev-util + ) + fi + fi + fi + if use udev; then + targets+=( + udev:shared_library + src/libudev/libudev.pc + ) + if use test; then + targets+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + fi + if multilib_is_native_abi || use udev; then + meson_src_compile "${targets[@]}" + fi +} + +multilib_src_test() { + local tests=() + if multilib_is_native_abi; then + if use sysusers; then + tests+=( + test-sysusers.standalone + ) + fi + if use tmpfiles; then + tests+=( + test-systemd-tmpfiles.standalone + test-tmpfiles + ) + fi + if use udev; then + tests+=( + rule-syntax-check + test-fido-id-desc + test-udev-builtin + test-udev-event + test-udev-netlink + test-udev-node + test-udev-util + ) + if [[ -w /dev ]]; then + tests+=( udev-test ) + else + ewarn "Skipping udev-test (needs write access to /dev)" + fi + fi + fi + if use udev; then + tests+=( + test-libudev + test-libudev-sym + test-udev-device-thread + ) + fi + if [[ ${#tests[@]} -ne 0 ]]; then + meson_src_test "${tests[@]}" + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + if use boot; then + into /usr + dobin bootctl kernel-install + doman man/{bootctl.1,kernel-install.8} + insinto usr/lib/systemd/boot/efi + doins src/boot/efi/{linux$(efi_arch).{efi,elf}.stub,systemd-boot$(efi_arch).efi} + fi + if use sysusers; then + into / + newbin systemd-sysusers{.standalone,} + doman man/{systemd-sysusers.8,sysusers.d.5} + fi + if use tmpfiles; then + into / + newbin systemd-tmpfiles{.standalone,} + doman man/{systemd-tmpfiles.8,tmpfiles.d.5} + fi + if use udev; then + into / + dobin udevadm systemd-hwdb + dosym ../../bin/udevadm /lib/systemd/systemd-udevd + + exeinto /lib/udev + doexe src/udev/{ata_id,cdrom_id,fido_id,mtd_probe,scsi_id,v4l_id} + + insinto /lib/udev/rules.d + doins rules.d/*.rules + + insinto /lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + insinto /usr/share/pkgconfig + doins src/udev/udev.pc + + doman man/{udev.conf.5,systemd.link.5,hwdb.7,systemd-hwdb.8,udev.7,udevadm.8} + newman man/systemd-udevd.service.8 systemd-udevd.8 + fi + fi + if use udev; then + meson_install --no-rebuild --tags libudev + gen_usr_ldscript -a udev + insinto "/usr/$(get_libdir)/pkgconfig" + doins src/libudev/libudev.pc + fi +} + +multilib_src_install_all() { + einstalldocs + if use boot; then + into /usr + exeinto usr/lib/kernel/install.d + doexe src/kernel-install/*.install + dobashcomp shell-completion/bash/bootctl + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/{_bootctl,_kernel-install} + fi + if use tmpfiles; then + doinitd "${FILESDIR}"/systemd-tmpfiles-setup + doinitd "${FILESDIR}"/systemd-tmpfiles-setup-dev + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_systemd-tmpfiles + fi + if use udev; then + doheader src/libudev/libudev.h + + insinto /etc/udev + doins src/udev/udev.conf + keepdir /etc/udev/{hwdb.d,rules.d} + + insinto /lib/systemd/network + doins network/99-default.link + + # Remove to avoid conflict with elogind + # https://bugs.gentoo.org/856433 + rm rules.d/70-power-switch.rules || die + insinto /lib/udev/rules.d + doins rules.d/*.rules + doins "${FILESDIR}"/40-gentoo.rules + + insinto /lib/udev/hwdb.d + doins hwdb.d/*.hwdb + + dobashcomp shell-completion/bash/udevadm + + insinto /usr/share/zsh/site-functions + doins shell-completion/zsh/_udevadm + fi +} + +add_service() { + local initd=$1 + local runlevel=$2 + + ebegin "Adding '${initd}' service to the '${runlevel}' runlevel" + mkdir -p "${EROOT}/etc/runlevels/${runlevel}" && + ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}" + eend $? +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + add_service systemd-tmpfiles-setup-dev sysinit + add_service systemd-tmpfiles-setup boot + fi + if use udev; then + ebegin "Updating hwdb" + systemd-hwdb --root="${ROOT}" update + eend $? + udev_reload + fi +} diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest index 6b0948a6a5c4..c674c0624824 100644 --- a/sys-apps/systemd/Manifest +++ b/sys-apps/systemd/Manifest @@ -10,7 +10,9 @@ AUX org.freedesktop.hostname1_no_polkit.conf 471 BLAKE2B 50d9f86b2c4813a90eac8a3 AUX systemd-user.pam 122 BLAKE2B cccc07cab47dfc0481438e503c34fa1a0b2c6b1f8ab282197719a523421d2a526f19230bb459e0347cbeb2046e35a407c78178a3fb5b79619e987cbc4ac7d5e4 SHA512 c5437677ff00fbb45798fe594e8d61b1c2bfc2d103105d7bd82e476240452477ac263700800f5d0ba91ddc895eb85f4517d5cb15c80611ec1680a686d47cd781 DIST systemd-stable-250.7.tar.gz 11214975 BLAKE2B 5d94b4b1f8b0cd6e8284a89ac0d4bd373eccdad2c3d6e6c453df79c8df47ee0f9cfbde764b72b1f9d172d07e2d9f1f1f41c1ab254cf4abd0722469ebc3ad7cf8 SHA512 99bc6f0c9757b280cb694f3fb4d6fe04d5ce55583eb2bae5ddeb324bb5ee9930c1720fcc27293d90cddba188473653ec541a471ae8115710a5850c26d0ba215d DIST systemd-stable-251.2.tar.gz 11434645 BLAKE2B a7e118649a7d27b789206ea9f6f2d0314e44561367506ee763a9e98fb97579b3fc49c7a402c8da142945dc98444558f0e311557f52c50863cebc7532c17c651f SHA512 0c4011b685a1e8d535af123cbaf79ab53d59ea665ca5350ab1077ad4e962b49c1fd5b1b5bb3f28c3e28145dfd02aa83023f78de5edec15afe84e3e06e742a67c +DIST systemd-stable-251.3.tar.gz 11435458 BLAKE2B 544238536848ab390b2476d5ad95d33998674be50020b8db0627bb9d0c86be6576c404ce786b01ceec86f1c75b174c6fc2d7e0d7fbab802a78f48c9d0915c2b8 SHA512 fb5b8dc1742562ef95469e90d406cfb6dfcb337860ad1208b460414b88ff0565071bde797d195faa62761206abc881829de6b1009e5d727cad2dfe0764310d5f EBUILD systemd-250.7.ebuild 16382 BLAKE2B 465a4e903c31401e7f0d8804dde61cca9df52176719f71f3f7b6997620ce01e6720bcf9a6505cd3cfe0cf399f6f215c4851a39683e04b1e47f6e4f500fe85018 SHA512 601674acd39e5b6135bf7c0a3495978e54254f590cefc1882f978830829e29d2ed848a3c9749477a7331e3c68eb59beb74e61dd1cbb89ada91b072bbb366325d -EBUILD systemd-251.2.ebuild 15631 BLAKE2B 8786c7c8ec96c36e23c55c961e372efa58cc45f7ff1e1fcea0d9a29edae766992eb451e4b06aec9b917a327524aa6c620333a9a641a8336f1197dadde4b338b8 SHA512 4a36daf5580c83dde46e7b6d7a8bca085ec4d3bed6a8534632f119a9a6c834dbed5f6f8669d5a6551079cabd393389e3432f37d56b19df921f851403de9b6250 +EBUILD systemd-251.2.ebuild 15630 BLAKE2B e107322c07f313e0ec5bffaaace81074c71ad7d8ec33d71382ba9726552b0ebd587b4cd8b3b52093deb38e3d11b115eb41854cc76a43e9794e08eef0d724a30a SHA512 1b9cd6a6dd45185f40272a29a06bcd8eee8de4a0d9a2469aaf487d3bf476dee439170ee089bedce41abbe83bf98bc7f9ed752dcda441eff13bf60c41e2caf005 +EBUILD systemd-251.3.ebuild 15598 BLAKE2B 74279a36d028eda0f23fd9c00f576ca295a26841a91162e7f5e27152d622970e66ca81025d76e281ae1e5d7f870aff19df8e1cec4256433a059511185b026c17 SHA512 86b01c5359c4fa70805b87eda6312d6fe8cea762d7f2ada563b6ab5893a0ec556c007423915ddd800aa1a1cf144250071d7335168cec8156aa05d59f5ec7e56a EBUILD systemd-9999.ebuild 15462 BLAKE2B 1208bd9c96e23d479a545385db048e9f9aac405a5b011fe8de6af40e190ad4e855d69136bab6874d0e152baf5e22b2e03cd6ceb31a0d654c6cc1b7690a625d05 SHA512 1360af2b5fb12c687a773a572fa8a31f03efa7dc949ffae1ceb0f24c10b9e9f7792816f5e2362e9d82b315a6280c5bcddfff2514e33fbc0ffcfff1e0547fee22 MISC metadata.xml 2693 BLAKE2B 20bad229300b6a8df613533c9a66f75364cfc1eccf046999c8fa5646737afeb9b1c048b9954f0f81597b78d51db3a5f5de3416ec46bb997eaced90efb6c3388f SHA512 de6869537d64417c78a41650137cb16e7bc39585fe464befdbc6efca57edfb72bb597d30fd5df1af611390d21114ef80b2c9cafa80fe85da1c563133f1fb8d68 diff --git a/sys-apps/systemd/systemd-251.2.ebuild b/sys-apps/systemd/systemd-251.2.ebuild index cc93232b38b9..ec03de9fc1b8 100644 --- a/sys-apps/systemd/systemd-251.2.ebuild +++ b/sys-apps/systemd/systemd-251.2.ebuild @@ -23,7 +23,7 @@ else MY_P=${MY_PN}-${MY_PV} S=${WORKDIR}/${MY_P} SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" - KEYWORDS="~alpha ~amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" + KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" fi inherit bash-completion-r1 flag-o-matic linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript diff --git a/sys-apps/systemd/systemd-251.3.ebuild b/sys-apps/systemd/systemd-251.3.ebuild new file mode 100644 index 000000000000..f296bf73bc4e --- /dev/null +++ b/sys-apps/systemd/systemd-251.3.ebuild @@ -0,0 +1,535 @@ +# Copyright 2011-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{8..11} ) + +# Avoid QA warnings +TMPFILES_OPTIONAL=1 +UDEV_OPTIONAL=1 + +QA_PKGCONFIG_VERSION=$(ver_cut 1) + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/systemd/systemd.git" + inherit git-r3 +else + if [[ ${PV} == *.* ]]; then + MY_PN=systemd-stable + else + MY_PN=systemd + fi + MY_PV=${PV/_/-} + MY_P=${MY_PN}-${MY_PV} + S=${WORKDIR}/${MY_P} + SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${MY_PV}/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +fi + +inherit bash-completion-r1 flag-o-matic linux-info meson-multilib pam python-any-r1 systemd toolchain-funcs udev usr-ldscript + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="http://systemd.io/" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +IUSE=" + acl apparmor audit build cgroup-hybrid cryptsetup curl +dns-over-tls elfutils + fido2 +gcrypt gnuefi gnutls homed http idn importd iptables +kmod + +lz4 lzma +openssl pam pcre pkcs11 policykit pwquality qrcode + +resolvconf +seccomp selinux split-usr +sysv-utils test tpm vanilla xkb +zstd +" +REQUIRED_USE=" + dns-over-tls? ( || ( gnutls openssl ) ) + homed? ( cryptsetup pam openssl ) + importd? ( curl lzma || ( gcrypt openssl ) ) + pwquality? ( homed ) +" +RESTRICT="!test? ( test )" + +MINKV="4.15" + +COMMON_DEPEND=" + >=sys-apps/util-linux-2.30:0=[${MULTILIB_USEDEP}] + sys-libs/libcap:0=[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + acl? ( sys-apps/acl:0= ) + apparmor? ( sys-libs/libapparmor:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-2.0.1:0= ) + curl? ( net-misc/curl:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + fido2? ( dev-libs/libfido2:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + gnutls? ( >=net-libs/gnutls-3.6.0:0= ) + http? ( >=net-libs/libmicrohttpd-0.9.33:0=[epoll(+)] ) + idn? ( net-dns/libidn2:= ) + importd? ( + app-arch/bzip2:0= + sys-libs/zlib:0= + ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + iptables? ( net-firewall/iptables:0= ) + openssl? ( >=dev-libs/openssl-1.1.0:0= ) + pam? ( sys-libs/pam:=[${MULTILIB_USEDEP}] ) + pkcs11? ( app-crypt/p11-kit:0= ) + pcre? ( dev-libs/libpcre2 ) + pwquality? ( dev-libs/libpwquality:0= ) + qrcode? ( media-gfx/qrencode:0= ) + seccomp? ( >=sys-libs/libseccomp-2.3.3:0= ) + selinux? ( sys-libs/libselinux:0= ) + tpm? ( app-crypt/tpm2-tss:0= ) + xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) + zstd? ( >=app-arch/zstd-1.4.0:0=[${MULTILIB_USEDEP}] ) +" + +# Newer linux-headers needed by ia64, bug #480218 +DEPEND="${COMMON_DEPEND} + >=sys-kernel/linux-headers-${MINKV} + gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) +" + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=acct-group/adm-0-r1 + >=acct-group/wheel-0-r1 + >=acct-group/kmem-0-r1 + >=acct-group/tty-0-r1 + >=acct-group/utmp-0-r1 + >=acct-group/audio-0-r1 + >=acct-group/cdrom-0-r1 + >=acct-group/dialout-0-r1 + >=acct-group/disk-0-r1 + >=acct-group/input-0-r1 + >=acct-group/kvm-0-r1 + >=acct-group/lp-0-r1 + >=acct-group/render-0-r1 + acct-group/sgx + >=acct-group/tape-0-r1 + acct-group/users + >=acct-group/video-0-r1 + >=acct-group/systemd-journal-0-r1 + >=acct-user/root-0-r1 + acct-user/nobody + >=acct-user/systemd-journal-remote-0-r1 + >=acct-user/systemd-coredump-0-r1 + >=acct-user/systemd-network-0-r1 + acct-user/systemd-oom + >=acct-user/systemd-resolve-0-r1 + >=acct-user/systemd-timesync-0-r1 + >=sys-apps/baselayout-2.2 + selinux? ( + sec-policy/selinux-base-policy[systemd] + sec-policy/selinux-ntp + ) + sysv-utils? ( + !sys-apps/openrc[sysv-utils(-)] + !sys-apps/sysvinit + ) + !sysv-utils? ( sys-apps/sysvinit ) + resolvconf? ( !net-dns/openresolv ) + !build? ( || ( + sys-apps/util-linux[kill(-)] + sys-process/procps[kill(+)] + sys-apps/coreutils[kill(-)] + ) ) + !sys-apps/hwids[udev] + !sys-auth/nss-myhostname + !sys-fs/eudev + !sys-fs/udev +" + +# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) +PDEPEND=">=sys-apps/dbus-1.9.8[systemd] + >=sys-fs/udev-init-scripts-34 + policykit? ( sys-auth/polkit ) + !vanilla? ( sys-apps/gentoo-systemd-integration )" + +BDEPEND=" + app-arch/xz-utils:0 + dev-util/gperf + >=dev-util/meson-0.46 + >=sys-apps/coreutils-8.16 + sys-devel/gettext + virtual/pkgconfig + test? ( + app-text/tree + dev-lang/perl + sys-apps/dbus + ) + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.5 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt:0 + $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]') + $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') +" + +python_check_deps() { + has_version -b "dev-python/jinja[${PYTHON_USEDEP}]" && + has_version -b "dev-python/lxml[${PYTHON_USEDEP}]" +} + +QA_FLAGS_IGNORED="usr/lib/systemd/boot/efi/.*" +QA_EXECSTACK="usr/lib/systemd/boot/efi/*" + +pkg_pretend() { + if [[ ${MERGE_TYPE} != buildonly ]]; then + if use test && has pid-sandbox ${FEATURES}; then + ewarn "Tests are known to fail with PID sandboxing enabled." + ewarn "See https://bugs.gentoo.org/674458." + fi + + local CONFIG_CHECK=" ~BINFMT_MISC ~BLK_DEV_BSG ~CGROUPS + ~CGROUP_BPF ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE + ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS + ~TIMERFD ~TMPFS_XATTR ~UNIX ~USER_NS + ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH + ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED + ~!SYSFS_DEPRECATED_V2" + + use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" + use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" + + if kernel_is -ge 5 10 20; then + CONFIG_CHECK+=" ~KCMP" + else + CONFIG_CHECK+=" ~CHECKPOINT_RESTORE" + fi + + if kernel_is -ge 4 18; then + CONFIG_CHECK+=" ~AUTOFS_FS" + else + CONFIG_CHECK+=" ~AUTOFS4_FS" + fi + + if linux_config_exists; then + local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) + if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then + ewarn "It's recommended to set an empty value to the following kernel config option:" + ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" + fi + if linux_chkconfig_present X86; then + CONFIG_CHECK+=" ~DMIID" + fi + fi + + if kernel_is -lt ${MINKV//./ }; then + ewarn "Kernel version at least ${MINKV} required" + fi + + check_extra_config + fi +} + +pkg_setup() { + : +} + +src_unpack() { + default + [[ ${PV} != 9999 ]] || git-r3_src_unpack +} + +src_prepare() { + # Do NOT add patches here + local PATCHES=() + + [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) + + # Add local patches here + PATCHES+=( + # Breaks Clang. Revert the commit for now and force off F_S=3. + # bug #841770. + "${FILESDIR}/251-revert-fortify-source-3-fix.patch" + ) + + if ! use vanilla; then + PATCHES+=( + "${FILESDIR}/gentoo-generator-path-r2.patch" + "${FILESDIR}/gentoo-systemctl-disable-sysv-sync-r1.patch" + "${FILESDIR}/gentoo-journald-audit.patch" + ) + fi + + # Fails with split-usr. + sed -i -e '2i exit 77' test/test-rpm-macros.sh || die + + default +} + +src_configure() { + # Prevent conflicts with i686 cross toolchain, bug 559726 + tc-export AR CC NM OBJCOPY RANLIB + + # Broken with FORTIFY_SOURCE=3 without a patch. We have to revert + # the upstream patch for it because it breaks Clang: bug #841770. + # + # Our toolchain sets F_S=2 by default w/ >= -O2, so we need + # to unset F_S first, then explicitly set 2, to negate any default + # and anything set by the user if they're choosing 3 (or if they've + # modified GCC to set 3). + # + if is-flagq '-O[23]' || is-flagq '-Ofast' ; then + # We can't unconditionally do this b/c we fortify needs + # some level of optimisation. + filter-flags -D_FORTIFY_SOURCE=3 + append-cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 + fi + + python_setup + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=( + --localstatedir="${EPREFIX}/var" + -Dsupport-url="https://gentoo.org/support/" + -Dpamlibdir="$(getpam_mod_dir)" + # avoid bash-completion dep + -Dbashcompletiondir="$(get_bashcompdir)" + # make sure we get /bin:/sbin in PATH + $(meson_use split-usr) + -Dsplit-bin=true + -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")" + -Drootlibdir="${EPREFIX}/usr/$(get_libdir)" + # Avoid infinite exec recursion, bug 642724 + -Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit" + # no deps + -Dima=true + -Ddefault-hierarchy=$(usex cgroup-hybrid hybrid unified) + # Optional components/dependencies + $(meson_native_use_bool acl) + $(meson_native_use_bool apparmor) + $(meson_native_use_bool audit) + $(meson_native_use_bool cryptsetup libcryptsetup) + $(meson_native_use_bool curl libcurl) + $(meson_native_use_bool dns-over-tls dns-over-tls) + $(meson_native_use_bool elfutils) + $(meson_native_use_bool fido2 libfido2) + $(meson_use gcrypt) + $(meson_native_use_bool gnuefi gnu-efi) + $(meson_native_use_bool gnutls) + -Defi-includedir="${ESYSROOT}/usr/include/efi" + -Defi-libdir="${ESYSROOT}/usr/$(get_libdir)" + $(meson_native_use_bool homed) + $(meson_native_use_bool http microhttpd) + $(meson_native_use_bool idn) + $(meson_native_use_bool importd) + $(meson_native_use_bool importd bzip2) + $(meson_native_use_bool importd zlib) + $(meson_native_use_bool kmod) + $(meson_use lz4) + $(meson_use lzma xz) + $(meson_use zstd) + $(meson_native_use_bool iptables libiptc) + $(meson_native_use_bool openssl) + $(meson_use pam) + $(meson_native_use_bool pkcs11 p11kit) + $(meson_native_use_bool pcre pcre2) + $(meson_native_use_bool policykit polkit) + $(meson_native_use_bool pwquality) + $(meson_native_use_bool qrcode qrencode) + $(meson_native_use_bool seccomp) + $(meson_native_use_bool selinux) + $(meson_native_use_bool tpm tpm2) + $(meson_native_use_bool test dbus) + $(meson_native_use_bool xkb xkbcommon) + -Dntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" + # Breaks screen, tmux, etc. + -Ddefault-kill-user-processes=false + -Dcreate-log-dirs=false + + # multilib options + $(meson_native_true backlight) + $(meson_native_true binfmt) + $(meson_native_true coredump) + $(meson_native_true environment-d) + $(meson_native_true firstboot) + $(meson_native_true hibernate) + $(meson_native_true hostnamed) + $(meson_native_true ldconfig) + $(meson_native_true localed) + $(meson_native_true man) + $(meson_native_true networkd) + $(meson_native_true quotacheck) + $(meson_native_true randomseed) + $(meson_native_true rfkill) + $(meson_native_true sysusers) + $(meson_native_true timedated) + $(meson_native_true timesyncd) + $(meson_native_true tmpfiles) + $(meson_native_true vconsole) + ) + + meson_src_configure "${myconf[@]}" +} + +multilib_src_test() { + unset DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR + meson_src_test +} + +multilib_src_install_all() { + local rootprefix=$(usex split-usr '' /usr) + + # meson doesn't know about docdir + mv "${ED}"/usr/share/doc/{systemd,${PF}} || die + + einstalldocs + dodoc "${FILESDIR}"/nsswitch.conf + + if ! use resolvconf; then + rm -f "${ED}${rootprefix}"/sbin/resolvconf || die + fi + + rm "${ED}"/etc/init.d/README || die + rm "${ED}${rootprefix}"/lib/systemd/system-generators/systemd-sysv-generator || die + + if ! use sysv-utils; then + rm "${ED}${rootprefix}"/sbin/{halt,init,poweroff,reboot,runlevel,shutdown,telinit} || die + rm "${ED}"/usr/share/man/man1/init.1 || die + rm "${ED}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 || die + fi + + if ! use resolvconf && ! use sysv-utils; then + rmdir "${ED}${rootprefix}"/sbin || die + fi + + # https://bugs.gentoo.org/761763 + rm -r "${ED}"/usr/lib/sysusers.d || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/{binfmt.d,modules-load.d,tmpfiles.d} + keepdir /etc/kernel/install.d + keepdir /etc/systemd/{network,system,user} + keepdir /etc/udev/rules.d + + keepdir /etc/udev/hwdb.d + + keepdir "${rootprefix}"/lib/systemd/{system-sleep,system-shutdown} + keepdir /usr/lib/{binfmt.d,modules-load.d} + keepdir /usr/lib/systemd/user-generators + keepdir /var/lib/systemd + keepdir /var/log/journal + + # Symlink /etc/sysctl.conf for easy migration. + dosym ../../../etc/sysctl.conf /usr/lib/sysctl.d/99-sysctl.conf + + if use pam; then + newpamd "${FILESDIR}"/systemd-user.pam systemd-user + fi + + if use split-usr; then + # Avoid breaking boot/reboot + dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd + dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown + fi + + gen_usr_ldscript -a systemd udev +} + +migrate_locale() { + local envd_locale_def="${EROOT}/etc/env.d/02locale" + local envd_locale=( "${EROOT}"/etc/env.d/??locale ) + local locale_conf="${EROOT}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +pkg_preinst() { + if ! use split-usr; then + local dir + for dir in bin sbin lib; do + if [[ ! ${EROOT}/${dir} -ef ${EROOT}/usr/${dir} ]]; then + eerror "\"${EROOT}/${dir}\" and \"${EROOT}/usr/${dir}\" are not merged." + eerror "One of them should be a symbolic link to the other one." + FAIL=1 + fi + done + if [[ ${FAIL} ]]; then + eerror "Migration to system layout with merged directories must be performed before" + eerror "rebuilding ${CATEGORY}/${PN} with USE=\"-split-usr\" to avoid run-time breakage." + die "System layout with split directories still used" + fi + fi +} + +pkg_postinst() { + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. + systemd-hwdb --root="${ROOT}" update + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respected, and ensure consistency + # between OpenRC & systemd + migrate_locale + + if [[ -z ${REPLACING_VERSIONS} ]]; then + if type systemctl &>/dev/null; then + systemctl --root="${ROOT:-/}" enable getty@.service remote-fs.target || FAIL=1 + fi + elog "To enable a useful set of services, run the following:" + elog " systemctl preset-all --preset-mode=enable-only" + fi + + if [[ -L ${EROOT}/var/lib/systemd/timesync ]]; then + rm "${EROOT}/var/lib/systemd/timesync" + fi + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} |