aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallmetango <callmetango@users.noreply.github.com>2020-07-03 12:52:24 +0200
committerAnthony G. Basile <blueness@gentoo.org>2020-07-09 13:07:31 -0400
commit030030e9b669fa92b24c2e84b009b6b0c7282608 (patch)
tree30fe26376ac3a12cf9bc89d84f1966f8b345a27b /sys-auth/elogind/files
parentsys-apps/bubblewrap: version bump to 0.4.1 (diff)
downloadmusl-030030e9b669fa92b24c2e84b009b6b0c7282608.tar.gz
musl-030030e9b669fa92b24c2e84b009b6b0c7282608.tar.bz2
musl-030030e9b669fa92b24c2e84b009b6b0c7282608.zip
sys-auth/elogind: make it compile on musl with SELinux
* remove non-POSIX mallinfo from debug outputs Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'sys-auth/elogind/files')
-rw-r--r--sys-auth/elogind/files/elogind-241.4-broken-test.patch15
-rw-r--r--sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch35
-rw-r--r--sys-auth/elogind/files/elogind-243.7-nodocs.patch29
-rw-r--r--sys-auth/elogind/files/elogind.conf.in7
-rw-r--r--sys-auth/elogind/files/elogind.init25
5 files changed, 111 insertions, 0 deletions
diff --git a/sys-auth/elogind/files/elogind-241.4-broken-test.patch b/sys-auth/elogind/files/elogind-241.4-broken-test.patch
new file mode 100644
index 0000000..d273582
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-241.4-broken-test.patch
@@ -0,0 +1,15 @@
+--- a/src/test/meson.build 2019-11-15 08:59:47.000000000 +0100
++++ b/src/test/meson.build 2019-11-30 13:04:45.051316140 +0100
+@@ -1014,9 +1014,9 @@
+ # '', 'timeout=120'],
+ #endif // 0
+
+- [['src/libelogind/sd-login/test-login.c'],
+- [],
+- []],
++# [['src/libelogind/sd-login/test-login.c'],
++# [],
++# []],
+
+ [['src/libelogind/sd-device/test-sd-device.c'],
+ [],
diff --git a/sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch b/sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch
new file mode 100644
index 0000000..b9b1700
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-243.7-musl-mallinfo.patch
@@ -0,0 +1,35 @@
+diff -Naur elogind-243.7.orig/src/basic/selinux-util.c elogind-243.7/src/basic/selinux-util.c
+--- elogind-243.7.orig/src/basic/selinux-util.c 2020-03-12 20:33:40.000000000 +0100
++++ elogind-243.7/src/basic/selinux-util.c 2020-07-03 12:29:16.140181565 +0200
+@@ -63,7 +63,6 @@
+
+ #if HAVE_SELINUX
+ usec_t before_timestamp, after_timestamp;
+- struct mallinfo before_mallinfo, after_mallinfo;
+
+ if (label_hnd)
+ return 0;
+@@ -71,7 +70,6 @@
+ if (!mac_selinux_use())
+ return 0;
+
+- before_mallinfo = mallinfo();
+ before_timestamp = now(CLOCK_MONOTONIC);
+
+ label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
+@@ -83,13 +81,9 @@
+ int l;
+
+ after_timestamp = now(CLOCK_MONOTONIC);
+- after_mallinfo = mallinfo();
+
+- l = after_mallinfo.uordblks > before_mallinfo.uordblks ? after_mallinfo.uordblks - before_mallinfo.uordblks : 0;
+-
+- log_debug("Successfully loaded SELinux database in %s, size on heap is %iK.",
+- format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0),
+- (l+1023)/1024);
++ log_debug("Successfully loaded SELinux database in %s",
++ format_timespan(timespan, sizeof(timespan), after_timestamp - before_timestamp, 0));
+ }
+ #endif
+
diff --git a/sys-auth/elogind/files/elogind-243.7-nodocs.patch b/sys-auth/elogind/files/elogind-243.7-nodocs.patch
new file mode 100644
index 0000000..0ec0aa3
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-243.7-nodocs.patch
@@ -0,0 +1,29 @@
+We don't want the build system to install to docdir for us.
+
+--- a/meson.build 2020-03-12 20:33:40.000000000 +0100
++++ b/meson.build 2020-03-12 22:46:08.020716935 +0100
+@@ -3352,15 +3352,11 @@
+ # install_data('modprobe.d/systemd.conf',
+ # install_dir : modprobedir)
+ #endif // 0
+-install_data('LICENSE.GPL2',
+- 'LICENSE.LGPL2.1',
+ #if 0 /// elogind has upgraded to markdown, and the NEWS file is useless
+ # 'NEWS',
+ # 'README',
+ #else // 0
+- 'README.md',
+ #endif // 0
+- 'docs/CODING_STYLE.md',
+ #if 0 /// irrelevant for elogind
+ # 'docs/DISTRO_PORTING.md',
+ # 'docs/ENVIRONMENT.md',
+@@ -3369,8 +3365,6 @@
+ # 'docs/TRANSLATORS.md',
+ # 'docs/UIDS-GIDS.md',
+ #endif // 0
+- 'src/libelogind/sd-bus/GVARIANT-SERIALIZATION',
+- install_dir : docdir)
+
+ #if 0 /// UNNEEDED by elogind
+ # meson.add_install_script('sh', '-c', mkdir_p.format(systemdstatedir))
diff --git a/sys-auth/elogind/files/elogind.conf.in b/sys-auth/elogind/files/elogind.conf.in
new file mode 100644
index 0000000..7b05b35
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.conf.in
@@ -0,0 +1,7 @@
+# /etc/conf.d/elogind: config file for /etc/init.d/elogind
+
+# this is the elogind executable
+ELOGIND_EXEC="/@libdir@/elogind/elogind"
+
+# this is where elogind will store its pid file
+ELOGIND_PIDFILE="/run/elogind.pid"
diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
new file mode 100644
index 0000000..019c3af
--- /dev/null
+++ b/sys-auth/elogind/files/elogind.init
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need dbus
+
+ # Make sure elogind is up before xdm starts any dm
+ before xdm
+}
+
+start() {
+ ebegin "Starting elogind"
+
+ start-stop-daemon --start --quiet \
+ --pidfile "${ELOGIND_PIDFILE}" \
+ --exec "${ELOGIND_EXEC}" -- --daemon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping elogind"
+ start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+ eend $?
+}