diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-04-22 13:13:40 -0300 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-04-22 21:19:29 +0000 |
commit | 90fb87a27a9dd90d94b22b68c79c5d00d88a2119 (patch) | |
tree | 950d7777936cadebaa455c3e999532596da13f37 /testing/elogind | |
parent | 13326724cf35c8fba7906236feee9c039b635bbc (diff) | |
download | aports-90fb87a27a9dd90d94b22b68c79c5d00d88a2119.tar.bz2 aports-90fb87a27a9dd90d94b22b68c79c5d00d88a2119.tar.xz |
testing/elogind: new aport
Diffstat (limited to 'testing/elogind')
-rw-r--r-- | testing/elogind/APKBUILD | 98 | ||||
-rw-r--r-- | testing/elogind/reverse_CLOSE_ON_EXEC_removal.patch | 14 | ||||
-rw-r--r-- | testing/elogind/reverse_DISABLE_BUFFER_in_cg_attach.patch | 13 | ||||
-rw-r--r-- | testing/elogind/skip-failing-tests.patch | 54 |
4 files changed, 179 insertions, 0 deletions
diff --git a/testing/elogind/APKBUILD b/testing/elogind/APKBUILD new file mode 100644 index 0000000000..c423c4e24b --- /dev/null +++ b/testing/elogind/APKBUILD @@ -0,0 +1,98 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> +# Maintainer: Leo <thinkabit.ukim@gmail.com> +pkgname=elogind +pkgver=241.2 +pkgrel=0 +pkgdesc="Standalone fork of systemd's elogind" +url="https://github.com/elogind/elogind" +arch="all" +license="GPL-2.0-or-later LGPL-2.1-or-later" +depends="dbus" +makedepends=" + meson + docbook-xsl + gettext-dev + git + gperf + intltool + libxslt-dev + glib-dev + acl-dev + eudev-dev + libcap-dev + libseccomp-dev + linux-pam-dev + m4 + dbus-dev + pcre2-dev" +subpackages=" + $pkgname-dev + $pkgname-doc + $pkgname-lang + lib$pkgname:libs + $pkgname-zsh-completion:zshcomp:noarch + $pkgname-bash-completion:bashcomp:noarch" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/elogind/elogind/archive/v${pkgver}.tar.gz + skip-failing-tests.patch + reverse_DISABLE_BUFFER_in_cg_attach.patch + reverse_CLOSE_ON_EXEC_removal.patch" +builddir="$srcdir/$pkgname-$pkgver" + +build() { + export LDFLAGS="$LDFLAGS -lintl" + meson \ + --libdir=/usr/lib \ + --libexecdir=/usr/libexec \ + -Dprefix=/usr \ + -Dcgroup-controller=elogind \ + -Dhalt-path=/sbin/halt \ + -Drootlibexecdir=/usr/libexec/elogind \ + -Dreboot-path=/sbin/reboot \ + -Ddefault-hierarchy=hybrid \ + -Ddefault-kill-user-processes=false \ + build + ninja -C build +} + +check() { + ninja -C build test +} + +package() { + DESTDIR="$pkgdir" ninja -C build install + + # Claim compatiblity with systemd and systemd-logind + ln -s libelogind.pc "$pkgdir"/usr/lib/pkgconfig/libsystemd.pc + ln -s libelogind.pc "$pkgdir"/usr/lib/pkgconfig/libsystemd-logind.pc + ln -s "$pkgdir"/usr/include/elogind "$pkgdir"/usr/include/systemd + + # Install headers from elogind + install -Dm644 src/systemd/sd-id128.h usr/include/sd-id128.h + install -Dm644 src/systemd/_sd-common.h usr/include/_sd-common.h +} + +libs() { + default_libs +} + +zshcomp() { + pkgdesc="Zsh completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share/ +} + +bashcomp() { + pkgdesc="Bash completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share +} + +sha512sums="7f4a822682856547d430f893bb55a9bf5fc2680aff1b31bb3f120f92ccb1d69b848cbba7f59edd3376d083b641d570bf9c56e62a789090e76e4b37dfb375995a elogind-241.2.tar.gz +cb22a9af9a304ce7e42a767b15db93ccad69ccbc67a5e5bccf2a45884c30400d62d9d17ac5b3dc2aadac6aa4a0e5aed6cc385f88da56fde3f87af8dfaea3cf5f skip-failing-tests.patch +52db50ddd1002736fbbbacb1f8142c624cd78d0177bdc6b5669a54b2e59250903bc1b2639333b0563e382b86cf10cd06f159e9391f7e9224932bebfff3056f60 reverse_DISABLE_BUFFER_in_cg_attach.patch +46799574b42eb0974f1648f703e86215571e040463c2957b9aca01b14924677d33d17d68680dafcde6d269062e23be001231d39f0c92e078a8b89c4e531447bb reverse_CLOSE_ON_EXEC_removal.patch" diff --git a/testing/elogind/reverse_CLOSE_ON_EXEC_removal.patch b/testing/elogind/reverse_CLOSE_ON_EXEC_removal.patch new file mode 100644 index 0000000000..98f1fdbcf7 --- /dev/null +++ b/testing/elogind/reverse_CLOSE_ON_EXEC_removal.patch @@ -0,0 +1,14 @@ +diff --git a/src/basic/fileio.c b/src/basic/fileio.c +index e981cd024..ffcbf7309 100644 +--- a/src/basic/fileio.c ++++ b/src/basic/fileio.c +@@ -156,7 +156,7 @@ int write_string_file_ts( + goto fail; + } + +- f = fdopen(fd, "w"); ++ f = fdopen(fd, "we"); + if (!f) { + r = -errno; + safe_close(fd); + diff --git a/testing/elogind/reverse_DISABLE_BUFFER_in_cg_attach.patch b/testing/elogind/reverse_DISABLE_BUFFER_in_cg_attach.patch new file mode 100644 index 0000000000..b9017dcc01 --- /dev/null +++ b/testing/elogind/reverse_DISABLE_BUFFER_in_cg_attach.patch @@ -0,0 +1,13 @@ +diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c +index 9235361b6..11102790e 100644 +--- a/src/basic/cgroup-util.c ++++ b/src/basic/cgroup-util.c +@@ -824,7 +824,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { + + xsprintf(c, PID_FMT "\n", pid); + +- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); ++ r = write_string_file(fs, c, 0); + if (r < 0) + return r; + diff --git a/testing/elogind/skip-failing-tests.patch b/testing/elogind/skip-failing-tests.patch new file mode 100644 index 0000000000..baa6095936 --- /dev/null +++ b/testing/elogind/skip-failing-tests.patch @@ -0,0 +1,54 @@ +See https://github.com/elogind/elogind/issues/133 + +diff --git a/src/test/meson.build b/src/test/meson.build +index d2e6772..5842dfc 100644 +--- a/src/test/meson.build ++++ b/src/test/meson.build +@@ -638,9 +638,9 @@ tests += [ + # []], + #endif // 0 + +- [['src/test/test-path-util.c'], +- [], +- []], ++# [['src/test/test-path-util.c'], ++# [], ++# []], + + #if 0 /// UNNEEDED in elogind + # [['src/test/test-path.c', + + +These require /etc/machine-id in the system. + +diff --git a/src/test/meson.build b/src/test/meson.build +index d2e6772..429bbef 100644 +--- a/src/test/meson.build ++++ b/src/test/meson.build +@@ -280,9 +280,9 @@ tests += [ + # []], + #endif // 0 + +- [['src/test/test-fs-util.c'], +- [], +- []], ++# [['src/test/test-fs-util.c'], ++# [], ++# []], + + [['src/test/test-proc-cmdline.c'], + [], +@@ -743,9 +743,9 @@ tests += [ + # '', 'manual', '-DLOG_REALM=LOG_REALM_UDEV'], + #endif // 0 + +- [['src/test/test-id128.c'], +- [], +- []], ++# [['src/test/test-id128.c'], ++# [], ++# []], + + [['src/test/test-hash.c'], + [], + |