]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
feat(Makefile): do not install network-legacy by default 1607/head
authorJo Zzsi <jozzsicsataban@gmail.com>
Thu, 6 Nov 2025 12:28:38 +0000 (07:28 -0500)
committerBenjamin Drung <bdrung@ubuntu.com>
Wed, 3 Dec 2025 20:40:20 +0000 (21:40 +0100)
This commit is the next step in the multi year effort to
discourage the usage or network-legacy dracut module.

This commit changes the default build/packaging so that
distributions wish to continue using network-legacy would
have to explicitly opt in to it in the packaging step.

.github/workflows/integration-extra.yml
Makefile
configure

index 704a555edf09f5b7a0db5b1f4c9f081b38f944a8..0343d09b2d22614a3405a239cd4f2dff801680c5 100644 (file)
@@ -231,7 +231,7 @@ jobs:
             - name: "Checkout Repository"
               uses: actions/checkout@v6
             - name: "${{ matrix.container }} TEST-${{ matrix.test }}"
-              run: USE_NETWORK=${{ matrix.network }} ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
+              run: USE_NETWORK=${{ matrix.network }} CONFIGURE_ARG='--enable-network-legacy' ./test/test-container.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
     omitsystemd:
         # run this test on all containers
         name: ${{ matrix.test }} on ${{ matrix.container }} with no systemd
index 96c01e9e242997557d8d0fffc0568731b94f6050..b2cccf0f922021cf4198a2a7d57616b16468dc48 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -275,6 +275,9 @@ endif
        install -m 0644 shell-completion/bash/lsinitrd $(DESTDIR)${bashcompletiondir}/lsinitrd
        mkdir -p $(DESTDIR)${pkgconfigdatadir}
        install -m 0644 dracut.pc $(DESTDIR)${pkgconfigdatadir}/dracut.pc
+ifneq ($(enable_network_legacy),yes)
+       rm -r $(DESTDIR)$(pkglibdir)/modules.d/[0-9][0-9]network-legacy
+endif
        if ! [ -n "$(systemdsystemunitdir)" ]; then \
                rm -rf $(DESTDIR)$(pkglibdir)/test/TEST-[0-9][0-9]-*SYSTEMD* ;\
                rm -rf $(DESTDIR)$(pkglibdir)/modules.d/*systemd* $(DESTDIR)$(mandir)/man8/*.service.* ; \
index 6cdf271eb195e1540be9e5f2b02d30080735e968..a6d499da7ce723dd7c0cd13b2dd521e4c9c3c062 100755 (executable)
--- a/configure
+++ b/configure
@@ -82,6 +82,7 @@ while (($# > 0)); do
         --enable-dracut-cpio) enable_dracut_cpio=yes ;;
         --disable-dracut-cpio) enable_dracut_cpio=no ;;
         --enable-test) enable_test=yes ;;
+        --enable-network-legacy) enable_network_legacy=yes ;;
         --configprofile) read_arg configprofile "$@" || shift ;;
         --disable-asciidoctor) disable_asciidoctor=yes ;;
         *) echo "Ignoring unknown option '$1'" ;;
@@ -209,6 +210,7 @@ mandir ?= ${mandir:-${prefix}/share/man}
 disable_asciidoctor ?= ${disable_asciidoctor:-no}
 enable_documentation ?= ${enable_documentation:-yes}
 enable_test ?= ${enable_test:-no}
+enable_network_legacy ?= ${enable_network_legacy:-no}
 enable_dracut_cpio ?= ${enable_dracut_cpio}
 bindir ?= ${bindir:-${prefix}/bin}
 KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ") ${KMOD_CFLAGS_EXTRA}