Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions srcpkgs/elogind/patches/SEEK_DATA.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ Upstream:no

Our musl version doesn't expose the SEEK_DATA and SEEK_HOLE in `unisted.h`...
Only version >= 1.2.3 do that.
---
src/shared/copy.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/src/shared/copy.h b/src/shared/copy.h
index a34a87c..d258afc 100644
index 7cf74f3b5..ab2eeea1d 100644
--- a/src/shared/copy.h
+++ b/src/shared/copy.h
@@ -79,3 +79,11 @@ static inline int copy_rights(int fdf, int fdt) {
@@ -93,6 +93,14 @@ static inline int copy_directory_at(int dir_fdf, const char *from, int dir_fdt,
}
int copy_xattr(int fdf, int fdt, CopyFlags copy_flags);
#endif // 0
+
+#ifndef SEEK_DATA
+#define SEEK_DATA 3
+#endif
+
+#ifndef SEEK_HOLE
+#define SEEK_HOLE 4
+#endif
--
2.42.0
+
int copy_bytes_full(int fdf, int fdt, uint64_t max_bytes, CopyFlags copy_flags, void **ret_remains, size_t *ret_remains_size, copy_progress_bytes_t progress, void *userdata);
static inline int copy_bytes(int fdf, int fdt, uint64_t max_bytes, CopyFlags copy_flags) {
return copy_bytes_full(fdf, fdt, max_bytes, copy_flags, NULL, NULL, NULL, NULL);
--
2.50.1
13 changes: 13 additions & 0 deletions srcpkgs/elogind/patches/missing-stat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/libelogind/sd-journal/journal-file.h b/src/libelogind/sd-journal/journal-file.h
index c3c5f59..3e62495 100644
--- a/src/libelogind/sd-journal/journal-file.h
+++ b/src/libelogind/sd-journal/journal-file.h
@@ -3,6 +3,7 @@

#include <fcntl.h>
#include <inttypes.h>
+#include <sys/stat.h>
//#include <sys/uio.h>

#if HAVE_GCRYPT

42 changes: 0 additions & 42 deletions srcpkgs/elogind/patches/musl-basename.patch

This file was deleted.

58 changes: 0 additions & 58 deletions srcpkgs/elogind/patches/musl-dirent64.patch

This file was deleted.

42 changes: 0 additions & 42 deletions srcpkgs/elogind/patches/rootlibexecdir.patch

This file was deleted.

6 changes: 2 additions & 4 deletions srcpkgs/elogind/patches/sigfillset.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
diff --git a/src/basic/async.h b/src/basic/async.h
index cf80acf..d22e77d 100644
--- a/src/basic/async.h
+++ b/src/basic/async.h
--- a/src/shared/async.h
+++ b/src/shared/async.h
@@ -2,6 +2,7 @@
#pragma once

Expand Down
30 changes: 0 additions & 30 deletions srcpkgs/elogind/patches/statx.patch

This file was deleted.

24 changes: 24 additions & 0 deletions srcpkgs/elogind/patches/sys-prctl.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Avoid duplicate declaration of prctl_mm_map:

In file included from ../src/basic/missing_prctl.h:4,
from ../src/basic/capability-util.c:16:
/usr/include/linux/prctl.h:134:8: error: redefinition of 'struct prctl_mm_map'
134 | struct prctl_mm_map {
| ^~~~~~~~~~~~
In file included from ../src/basic/capability-util.c:6:
/usr/include/sys/prctl.h:88:8: note: originally defined here
88 | struct prctl_mm_map {
| ^~~~~~~~~~~~

diff -rup missing_prctl.h.orig missing_prctl.h
--- a/src/basic/missing_prctl.h
+++ b/src/basic/missing_prctl.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once

-#include <linux/prctl.h>
+#include <sys/prctl.h>

/* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */
#ifndef PR_CAP_AMBIENT
89 changes: 89 additions & 0 deletions srcpkgs/elogind/patches/tests2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
Partially taken from: https://github.com/chimera-linux/cports/blob/1c65848071683787eac91da86823339c4e85d208/main/elogind/patches/xxx-musl-fixes.patch

FTW_CONTINUE does not exist on musl
Read-only permission in fdopen() doesn't get applied in musl
EINVAL is returned by parse_sec(" .22s ", &u)
Fix test-login without active logind session due to using if instead of else if.

diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c
index f607048..d6f1b29 100644
--- a/src/test/test-recurse-dir.c
+++ b/src/test/test-recurse-dir.c
@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */

+#if 0
#include <ftw.h>

#include "fd-util.h"
@@ -116,8 +117,10 @@ static int recurse_dir_callback(

return RECURSE_DIR_CONTINUE;
}
+#endif

int main(int argc, char *argv[]) {
+#if 0
_cleanup_strv_free_ char **list_recurse_dir = NULL;
const char *p;
usec_t t1, t2, t3, t4;
@@ -173,5 +176,6 @@ int main(int argc, char *argv[]) {
}

list_nftw = strv_free(list_nftw);
+#endif
return 0;
}
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index b9b82e7..5a43685 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -427,6 +428,7 @@ TEST(read_one_line_file) {
assert_se(streq_ptr(buf5, "x"));
}

+#if 0
TEST(write_string_stream) {
_cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-write_string_stream-XXXXXX";
_cleanup_fclose_ FILE *f = NULL;
@@ -461,6 +463,7 @@ TEST(write_string_stream) {
printf(">%s<", buf);
assert_se(streq(buf, "boohoo"));
}
+#endif

TEST(write_string_file) {
_cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-write_string_file-XXXXXX";
diff --git a/src/test/test-time-util.c b/src/test/test-time-util.c
index 1ce6710..8d247a7 100644
--- a/src/test/test-time-util.c
+++ b/src/test/test-time-util.c
@@ -12,6 +12,7 @@

#define TRIAL 100u

+#if 0
TEST(parse_sec) {
usec_t u;

@@ -1181,6 +1162,7 @@ TEST(timezone_offset_change) {
tzset();
}
#endif // 0
+#endif

static int intro(void) {
/* Tests have hard-coded results that do not expect a specific timezone to be set by the caller */
diff -rup test-login.c.orig test-login.c
--- a/src/libelogind/sd-login/test-login.c
+++ b/src/libelogind/sd-login/test-login.c
@@ -149,7 +149,7 @@ TEST(login) {
log_notice("sd_session_is_active() failed with ENXIO, it seems logind is not running.");
#if 1 /// If elogind is tested on a system run by systemd, we will get -EINVAL,
// because elogind does not support systemd scopes, services and slices.
- if (r == -EINVAL)
+ else if (r == -EINVAL)
log_notice("sd_session_is_active() failed with EINVAL, elogind can not handle systemd powered systems.");
#endif // 1
else {

13 changes: 6 additions & 7 deletions srcpkgs/elogind/template
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Template file for 'elogind'
pkgname=elogind
version=252.9
revision=2
version=255.22
revision=1
build_style=meson
configure_args="-Dcgroup-controller=elogind -Ddefault-hierarchy=legacy
-Ddefault-kill-user-processes=false -Dhalt-path=/usr/bin/halt
-Dkexec-path=/usr/bin/kexec -Dman=true -Dpolkit=true
-Dreboot-path=/usr/bin/reboot -Drootlibdir=/usr/lib
-Drootlibexecdir=/usr/libexec/elogind"
-Dkexec-path=/usr/bin/kexec -Dman=enabled -Dpolkit=enabled
-Dreboot-path=/usr/bin/reboot --libexecdir=/usr/libexec/elogind"
hostmakedepends="docbook-xsl glib-devel gperf gettext libxslt
m4 pkg-config python3-Jinja2 shadow"
makedepends="acl-devel eudev-libudev-devel libcap-devel
Expand All @@ -17,8 +16,8 @@ short_desc="Standalone logind fork"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="https://github.com/elogind/elogind"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz"
checksum=7af8caa8225a406e77fb99c9f33dba5e1f0a94f0e1277c9d91dcfc016f116d85
distfiles="https://github.com/elogind/elogind/archive/refs/tags/V${version}.tar.gz"
checksum=79b5eb96bccf3a6101b35e62d0f80b2d0a47077a1507a6edc705f8cb7bdb0619
conf_files="/etc/elogind/*.conf"
# tests fail differently due to containerization and kernel features
make_check=ci-skip
Expand Down