-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace eudev with systemd-udevd
Unlike eudev systemd-udevd is actively maintained. Also add support for hwdb Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
- Loading branch information
Showing
30 changed files
with
2,902 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
88 changes: 88 additions & 0 deletions
88
systemd-udevd/patches/0001-chore-musl-headers-compatibility-for-udev.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
From bc049f17be6eca828cc84861877d26092fea71a1 Mon Sep 17 00:00:00 2001 | ||
From: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com> | ||
Date: Sat, 28 Sep 2024 19:09:54 +0200 | ||
Subject: [PATCH] chore: musl headers compatibility for udev | ||
|
||
Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com> | ||
--- | ||
src/basic/linux/if.h | 2 +- | ||
src/basic/linux/if_ether.h | 2 +- | ||
src/basic/linux/libc-compat.h | 10 +++++++--- | ||
src/basic/linux/netdevice.h | 2 +- | ||
4 files changed, 10 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/src/basic/linux/if.h b/src/basic/linux/if.h | ||
index e79f5c8ceb..7a885ea299 100644 | ||
--- a/src/basic/linux/if.h | ||
+++ b/src/basic/linux/if.h | ||
@@ -130,10 +130,10 @@ enum net_device_flags { | ||
#define IFF_LOWER_UP IFF_LOWER_UP | ||
#define IFF_DORMANT IFF_DORMANT | ||
#define IFF_ECHO IFF_ECHO | ||
-#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ | ||
|
||
#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ | ||
IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) | ||
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ | ||
|
||
#define IF_GET_IFACE 0x0001 /* for querying only */ | ||
#define IF_GET_PROTO 0x0002 | ||
diff --git a/src/basic/linux/if_ether.h b/src/basic/linux/if_ether.h | ||
index 69e0457eb2..4bf6341acf 100644 | ||
--- a/src/basic/linux/if_ether.h | ||
+++ b/src/basic/linux/if_ether.h | ||
@@ -166,7 +166,7 @@ | ||
|
||
/* allow libcs like musl to deactivate this, glibc does not implement this. */ | ||
#ifndef __UAPI_DEF_ETHHDR | ||
-#define __UAPI_DEF_ETHHDR 1 | ||
+#define __UAPI_DEF_ETHHDR 0 | ||
#endif | ||
|
||
#if __UAPI_DEF_ETHHDR | ||
diff --git a/src/basic/linux/libc-compat.h b/src/basic/linux/libc-compat.h | ||
index 8254c937c9..3e06d3eabb 100644 | ||
--- a/src/basic/linux/libc-compat.h | ||
+++ b/src/basic/linux/libc-compat.h | ||
@@ -172,18 +172,22 @@ | ||
* unsupported C libraries a way to opt out of any kernel definition. */ | ||
#else /* !defined(__GLIBC__) */ | ||
|
||
+#ifndef NI_IDN | ||
+#define NI_IDN 0 | ||
+#endif | ||
+ | ||
/* Definitions for if.h */ | ||
#ifndef __UAPI_DEF_IF_IFCONF | ||
-#define __UAPI_DEF_IF_IFCONF 1 | ||
+#define __UAPI_DEF_IF_IFCONF 0 | ||
#endif | ||
#ifndef __UAPI_DEF_IF_IFMAP | ||
-#define __UAPI_DEF_IF_IFMAP 1 | ||
+#define __UAPI_DEF_IF_IFMAP 0 | ||
#endif | ||
#ifndef __UAPI_DEF_IF_IFNAMSIZ | ||
#define __UAPI_DEF_IF_IFNAMSIZ 1 | ||
#endif | ||
#ifndef __UAPI_DEF_IF_IFREQ | ||
-#define __UAPI_DEF_IF_IFREQ 1 | ||
+#define __UAPI_DEF_IF_IFREQ 0 | ||
#endif | ||
/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */ | ||
#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS | ||
diff --git a/src/basic/linux/netdevice.h b/src/basic/linux/netdevice.h | ||
index f3770c5b0f..6125206f33 100644 | ||
--- a/src/basic/linux/netdevice.h | ||
+++ b/src/basic/linux/netdevice.h | ||
@@ -31,7 +31,7 @@ | ||
#include <linux/if_packet.h> | ||
#include <linux/if_link.h> | ||
|
||
- | ||
+#undef MAX_ADDR_LEN | ||
#define MAX_ADDR_LEN 32 /* Largest hardware address length */ | ||
|
||
/* Initial net device group. All devices belong to group 0 by default. */ | ||
-- | ||
2.46.1 | ||
|
60 changes: 60 additions & 0 deletions
60
systemd-udevd/patches/0004-missing_type.h-add-comparison_fn_t.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
From 34b7e1ed3b9a896db6fad435fd141c385c7337d1 Mon Sep 17 00:00:00 2001 | ||
From: Chen Qi <Qi.Chen@windriver.com> | ||
Date: Mon, 25 Feb 2019 13:55:12 +0800 | ||
Subject: [PATCH 04/27] missing_type.h: add comparison_fn_t | ||
|
||
Make it work with musl where comparison_fn_t and is not provided. | ||
|
||
Upstream-Status: Inappropriate [musl specific] | ||
|
||
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
[Rebased for v244] | ||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
[Rebased for v242] | ||
Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
[Rebased for v250, Drop __compare_fn_t] | ||
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | ||
--- | ||
src/basic/missing_type.h | 4 ++++ | ||
src/basic/sort-util.h | 1 + | ||
src/libsystemd/sd-journal/catalog.c | 1 + | ||
3 files changed, 6 insertions(+) | ||
|
||
diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | ||
index 1d17705c35..fc33b76ec1 100644 | ||
--- a/src/basic/missing_type.h | ||
+++ b/src/basic/missing_type.h | ||
@@ -10,3 +10,7 @@ | ||
#if !HAVE_CHAR16_T | ||
# define char16_t uint16_t | ||
#endif | ||
+ | ||
+#ifndef __GLIBC__ | ||
+typedef int (*comparison_fn_t)(const void *, const void *); | ||
+#endif | ||
diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h | ||
index 9c818bd747..ef10c8be2c 100644 | ||
--- a/src/basic/sort-util.h | ||
+++ b/src/basic/sort-util.h | ||
@@ -4,6 +4,7 @@ | ||
#include <stdlib.h> | ||
|
||
#include "macro.h" | ||
+#include "missing_type.h" | ||
|
||
/* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the | ||
* external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that | ||
diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c | ||
index a0b673f65f..29dd2fee16 100644 | ||
--- a/src/libsystemd/sd-journal/catalog.c | ||
+++ b/src/libsystemd/sd-journal/catalog.c | ||
@@ -29,6 +29,7 @@ | ||
#include "string-util.h" | ||
#include "strv.h" | ||
#include "tmpfile-util.h" | ||
+#include "missing_type.h" | ||
|
||
const char * const catalog_file_dirs[] = { | ||
"/usr/local/lib/systemd/catalog/", | ||
-- | ||
2.45.1 |
Oops, something went wrong.