Skip to content

Commit

Permalink
feat: replace eudev with systemd-udevd
Browse files Browse the repository at this point in the history
Eudev has seen less development effort recently with Gentoo and others moving towards using systemd-udevd which can now be built independently

Update pkgs, include more libraries, change udevd executable name

Signed-off-by: Dmitry Sharshakov <[email protected]>
  • Loading branch information
dsseng committed Oct 2, 2024
1 parent 0a4df4e commit 74c12c2
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 10 deletions.
34 changes: 29 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ ARG PKG_CA_CERTIFICATES
ARG PKG_CRYPTSETUP
ARG PKG_CONTAINERD
ARG PKG_DOSFSTOOLS
ARG PKG_EUDEV
ARG PKG_SYSTEMD_UDEVD
ARG PKG_LIBCAP
ARG PKG_GRUB
ARG PKG_SD_BOOT
ARG PKG_IPTABLES
ARG PKG_IPXE
ARG PKG_LIBINIH
ARG PKG_LIBJSON_C
ARG PKG_LIBPOPT
ARG PKG_LIBSEPOL
ARG PKG_LIBSELINUX
ARG PKG_PCRE2
ARG PKG_LIBURCU
ARG PKG_OPENSSL
ARG PKG_LIBSECCOMP
Expand Down Expand Up @@ -55,8 +59,11 @@ FROM --platform=arm64 ${PKG_CONTAINERD} AS pkg-containerd-arm64
FROM --platform=amd64 ${PKG_DOSFSTOOLS} AS pkg-dosfstools-amd64
FROM --platform=arm64 ${PKG_DOSFSTOOLS} AS pkg-dosfstools-arm64

FROM --platform=amd64 ${PKG_EUDEV} AS pkg-eudev-amd64
FROM --platform=arm64 ${PKG_EUDEV} AS pkg-eudev-arm64
FROM --platform=amd64 ${PKG_SYSTEMD_UDEVD} AS pkg-systemd-udevd-amd64
FROM --platform=arm64 ${PKG_SYSTEMD_UDEVD} AS pkg-systemd-udevd-arm64

FROM --platform=amd64 ${PKG_LIBCAP} AS pkg-libcap-amd64
FROM --platform=arm64 ${PKG_LIBCAP} AS pkg-libcap-arm64

FROM ${PKG_GRUB} AS pkg-grub
FROM --platform=amd64 ${PKG_GRUB} AS pkg-grub-amd64
Expand Down Expand Up @@ -84,6 +91,15 @@ FROM --platform=arm64 ${PKG_LIBPOPT} AS pkg-libpopt-arm64
FROM --platform=amd64 ${PKG_LIBURCU} AS pkg-liburcu-amd64
FROM --platform=arm64 ${PKG_LIBURCU} AS pkg-liburcu-arm64

FROM --platform=amd64 ${PKG_LIBSEPOL} AS pkg-libsepol-amd64
FROM --platform=arm64 ${PKG_LIBSEPOL} AS pkg-libsepol-arm64

FROM --platform=amd64 ${PKG_LIBSELINUX} AS pkg-libselinux-amd64
FROM --platform=arm64 ${PKG_LIBSELINUX} AS pkg-libselinux-arm64

FROM --platform=amd64 ${PKG_PCRE2} AS pkg-pcre2-amd64
FROM --platform=arm64 ${PKG_PCRE2} AS pkg-pcre2-arm64

FROM --platform=amd64 ${PKG_OPENSSL} AS pkg-openssl-amd64
FROM --platform=arm64 ${PKG_OPENSSL} AS pkg-openssl-arm64

Expand Down Expand Up @@ -611,12 +627,16 @@ COPY --link --from=pkg-flannel-cni-amd64 / /rootfs
COPY --link --from=pkg-cryptsetup-amd64 / /rootfs
COPY --link --from=pkg-containerd-amd64 / /rootfs
COPY --link --from=pkg-dosfstools-amd64 / /rootfs
COPY --link --from=pkg-eudev-amd64 / /rootfs
COPY --link --from=pkg-systemd-udevd-amd64 / /rootfs
COPY --link --from=pkg-libcap-amd64 / /rootfs
COPY --link --from=pkg-iptables-amd64 / /rootfs
COPY --link --from=pkg-libinih-amd64 / /rootfs
COPY --link --from=pkg-libjson-c-amd64 / /rootfs
COPY --link --from=pkg-libpopt-amd64 / /rootfs
COPY --link --from=pkg-liburcu-amd64 / /rootfs
COPY --link --from=pkg-libsepol-amd64 / /rootfs
COPY --link --from=pkg-libselinux-amd64 / /rootfs
COPY --link --from=pkg-pcre2-amd64 / /rootfs
COPY --link --from=pkg-openssl-amd64 / /rootfs
COPY --link --from=pkg-libseccomp-amd64 / /rootfs
COPY --link --from=pkg-lvm2-amd64 / /rootfs
Expand Down Expand Up @@ -677,12 +697,16 @@ COPY --link --from=pkg-flannel-cni-arm64 / /rootfs
COPY --link --from=pkg-cryptsetup-arm64 / /rootfs
COPY --link --from=pkg-containerd-arm64 / /rootfs
COPY --link --from=pkg-dosfstools-arm64 / /rootfs
COPY --link --from=pkg-eudev-arm64 / /rootfs
COPY --link --from=pkg-systemd-udevd-arm64 / /rootfs
COPY --link --from=pkg-libcap-arm64 / /rootfs
COPY --link --from=pkg-iptables-arm64 / /rootfs
COPY --link --from=pkg-libinih-arm64 / /rootfs
COPY --link --from=pkg-libjson-c-arm64 / /rootfs
COPY --link --from=pkg-libpopt-arm64 / /rootfs
COPY --link --from=pkg-liburcu-arm64 / /rootfs
COPY --link --from=pkg-libsepol-arm64 / /rootfs
COPY --link --from=pkg-libselinux-arm64 / /rootfs
COPY --link --from=pkg-pcre2-arm64 / /rootfs
COPY --link --from=pkg-openssl-arm64 / /rootfs
COPY --link --from=pkg-libseccomp-arm64 / /rootfs
COPY --link --from=pkg-lvm2-arm64 / /rootfs
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ARTIFACTS := _out
TOOLS ?= ghcr.io/siderolabs/tools:v1.9.0-alpha.0-2-g9f2189b

PKGS_PREFIX ?= ghcr.io/siderolabs
PKGS ?= v1.9.0-alpha.0-9-g6f40fbb
PKGS ?= v1.9.0-alpha.0-11-g232a153
EXTRAS ?= v1.9.0-alpha.0

KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
Expand All @@ -32,14 +32,18 @@ PKG_APPARMOR ?= $(PKGS_PREFIX)/apparmor:$(PKGS)
PKG_CRYPTSETUP ?= $(PKGS_PREFIX)/cryptsetup:$(PKGS)
PKG_CONTAINERD ?= $(PKGS_PREFIX)/containerd:$(PKGS)
PKG_DOSFSTOOLS ?= $(PKGS_PREFIX)/dosfstools:$(PKGS)
PKG_EUDEV ?= $(PKGS_PREFIX)/eudev:$(PKGS)
PKG_SYSTEMD_UDEVD ?= $(PKGS_PREFIX)/systemd-udevd:$(PKGS)
PKG_LIBCAP ?= $(PKGS_PREFIX)/libcap:$(PKGS)
PKG_GRUB ?= $(PKGS_PREFIX)/grub:$(PKGS)
PKG_SD_BOOT ?= $(PKGS_PREFIX)/sd-boot:$(PKGS)
PKG_IPTABLES ?= $(PKGS_PREFIX)/iptables:$(PKGS)
PKG_IPXE ?= $(PKGS_PREFIX)/ipxe:$(PKGS)
PKG_LIBINIH ?= $(PKGS_PREFIX)/libinih:$(PKGS)
PKG_LIBJSON_C ?= $(PKGS_PREFIX)/libjson-c:$(PKGS)
PKG_LIBPOPT ?= $(PKGS_PREFIX)/libpopt:$(PKGS)
PKG_LIBSEPOL ?= $(PKGS_PREFIX)/libsepol:$(PKGS)
PKG_LIBSELINUX ?= $(PKGS_PREFIX)/libselinux:$(PKGS)
PKG_PCRE2 ?= $(PKGS_PREFIX)/pcre2:$(PKGS)
PKG_LIBURCU ?= $(PKGS_PREFIX)/liburcu:$(PKGS)
PKG_OPENSSL ?= $(PKGS_PREFIX)/openssl:$(PKGS)
PKG_LIBSECCOMP ?= $(PKGS_PREFIX)/libseccomp:$(PKGS)
Expand Down Expand Up @@ -196,13 +200,17 @@ COMMON_ARGS += --build-arg=PKG_APPARMOR=$(PKG_APPARMOR)
COMMON_ARGS += --build-arg=PKG_CRYPTSETUP=$(PKG_CRYPTSETUP)
COMMON_ARGS += --build-arg=PKG_CONTAINERD=$(PKG_CONTAINERD)
COMMON_ARGS += --build-arg=PKG_DOSFSTOOLS=$(PKG_DOSFSTOOLS)
COMMON_ARGS += --build-arg=PKG_EUDEV=$(PKG_EUDEV)
COMMON_ARGS += --build-arg=PKG_SYSTEMD_UDEVD=$(PKG_SYSTEMD_UDEVD)
COMMON_ARGS += --build-arg=PKG_LIBCAP=$(PKG_LIBCAP)
COMMON_ARGS += --build-arg=PKG_GRUB=$(PKG_GRUB)
COMMON_ARGS += --build-arg=PKG_SD_BOOT=$(PKG_SD_BOOT)
COMMON_ARGS += --build-arg=PKG_IPTABLES=$(PKG_IPTABLES)
COMMON_ARGS += --build-arg=PKG_IPXE=$(PKG_IPXE)
COMMON_ARGS += --build-arg=PKG_LIBINIH=$(PKG_LIBINIH)
COMMON_ARGS += --build-arg=PKG_LIBJSON_C=$(PKG_LIBJSON_C)
COMMON_ARGS += --build-arg=PKG_LIBSEPOL=$(PKG_LIBSEPOL)
COMMON_ARGS += --build-arg=PKG_LIBSELINUX=$(PKG_LIBSELINUX)
COMMON_ARGS += --build-arg=PKG_PCRE2=$(PKG_PCRE2)
COMMON_ARGS += --build-arg=PKG_LIBPOPT=$(PKG_LIBPOPT)
COMMON_ARGS += --build-arg=PKG_LIBURCU=$(PKG_LIBURCU)
COMMON_ARGS += --build-arg=PKG_OPENSSL=$(PKG_OPENSSL)
Expand Down
2 changes: 1 addition & 1 deletion internal/app/machined/pkg/system/services/udevd.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (c *Udevd) Runner(r runtime.Runtime) (runner.Runner, error) {
args := &runner.Args{
ID: c.ID(r),
ProcessArgs: []string{
"/sbin/udevd",
"/sbin/systemd-udevd",
"--resolve-names=never",
},
}
Expand Down
1 change: 1 addition & 0 deletions internal/integration/api/extensions_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ func (suite *ExtensionsSuiteQEMU) TestExtensionsStargz() {

// TestExtensionsMdADM verifies mdadm is working, udev rules work and the raid is mounted on reboot.
func (suite *ExtensionsSuiteQEMU) TestExtensionsMdADM() {
suite.T().Skip("skipped - see https://github.com/siderolabs/talos/issue/9423")
node := suite.RandomDiscoveredNodeInternalIP(machine.TypeWorker)

userDisks, err := suite.UserDisks(suite.ctx, node)
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinery/gendata/data/pkgs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.9.0-alpha.0-9-g6f40fbb
v1.9.0-alpha.0-11-g232a153

0 comments on commit 74c12c2

Please sign in to comment.