[systemd-devel] [PATCH] build-sys: Stop depending on current configure options for EXTRA_DIST
Lennart Poettering
lennart at poettering.net
Fri May 29 03:20:22 PDT 2015
On Thu, 28.05.15 12:16, Martin Pitt (martin.pitt at ubuntu.com) wrote:
> Hello all,
>
> for the quest of doing daily builds/distcheck/etc. on Debian/Ubuntu I
> started running distcheck on current trunk. It failed with
>
> GEN units/kmod-static-nodes.service
> make[3]: *** No rule to make target 'units/systemd-sysusers.service.in', needed by 'units/systemd-sysusers.service'. Stop.
>
> because I apparently ./configure'd my checkout with a few --disable-*.
> But "make dist" really ought to not depend on my configure options.
> The problem is that several (not all) of the EXTRA_DIST are
> conditional.
>
> This patch makes them all unconditional, so that "make dist" should
> produce more reliable tarballs.
>From all I can see this looks fine. Please push.
>
> Martin
>
> --
> Martin Pitt | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
> From d9602540fb4c511eb3d60ce6708367d1d1e90fd0 Mon Sep 17 00:00:00 2001
> From: Martin Pitt <martin.pitt at ubuntu.com>
> Date: Thu, 28 May 2015 12:03:17 +0200
> Subject: [PATCH] build-sys: Stop depending on current configure options for
> EXTRA_DIST
>
> Consistently move EXTRA_DIST out of conditional blocks. This would have
> produced incomplete dist tarballs when being run in a built tree with not
> every feature enabled, which can cause broken dist tarballs.
> ---
> Makefile.am | 99 ++++++++++++++++++++++++++++---------------------------------
> 1 file changed, 46 insertions(+), 53 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index e8abef0..8d9044f 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -733,12 +733,6 @@ man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE
> $(AM_V_at)$(MKDIR_P) $(dir $@)
> $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
>
> -EXTRA_DIST += \
> - man/systemd.index.xml \
> - man/index.html \
> - man/systemd.directives.xml \
> - man/glib-event-glue.c
> -
> CLEANFILES += \
> man/systemd.index.xml \
> man/systemd.directives.xml
> @@ -754,7 +748,12 @@ EXTRA_DIST += \
> $(man_MANS) \
> tools/make-man-index.py \
> tools/make-directive-index.py \
> - tools/xml_helper.py
> + tools/xml_helper.py \
> + man/systemd.index.xml \
> + man/index.html \
> + man/systemd.directives.xml \
> + man/glib-event-glue.c \
> + $(NULL)
>
> # ------------------------------------------------------------------------------
> noinst_LTLIBRARIES += \
> @@ -2323,15 +2322,15 @@ nodist_sysusers_DATA = \
> sysusers.d/systemd.conf \
> sysusers.d/basic.conf
>
> +INSTALL_DIRS += \
> + $(sysusersdir)
> +endif
> +
> EXTRA_DIST += \
> units/systemd-sysusers.service.in \
> sysusers.d/systemd.conf.m4 \
> sysusers.d/basic.conf.in
>
> -INSTALL_DIRS += \
> - $(sysusersdir)
> -endif
> -
> # ------------------------------------------------------------------------------
> dist_factory_etc_DATA = \
> factory/etc/nsswitch.conf
> @@ -2360,13 +2359,13 @@ rootbin_PROGRAMS += \
> nodist_systemunit_DATA += \
> units/systemd-firstboot.service
>
> -EXTRA_DIST += \
> - units/systemd-firstboot.service.in
> -
> SYSINIT_TARGET_WANTS += \
> systemd-firstboot.service
> endif
>
> +EXTRA_DIST += \
> + units/systemd-firstboot.service.in
> +
> # ------------------------------------------------------------------------------
> systemd_machine_id_setup_SOURCES = \
> src/machine-id-setup/machine-id-setup-main.c \
> @@ -2497,11 +2496,6 @@ systemd_hibernate_resume_generator_LDADD = \
> libsystemd-label.la \
> libsystemd-shared.la
>
> -EXTRA_DIST += \
> - units/systemd-hibernate.service.in \
> - units/systemd-hibernate-resume at .service.in \
> - units/systemd-hybrid-sleep.service.in
> -
> dist_systemunit_DATA += \
> units/hibernate.target \
> units/hybrid-sleep.target
> @@ -2512,6 +2506,11 @@ nodist_systemunit_DATA += \
> units/systemd-hybrid-sleep.service
> endif
>
> +EXTRA_DIST += \
> + units/systemd-hibernate.service.in \
> + units/systemd-hibernate-resume at .service.in \
> + units/systemd-hybrid-sleep.service.in
> +
> # ------------------------------------------------------------------------------
> if ENABLE_EFI
> systemgenerator_PROGRAMS += \
> @@ -2697,7 +2696,6 @@ $(stub): $(stub_solib)
>
> # ------------------------------------------------------------------------------
> CLEANFILES += test-efi-disk.img
> -EXTRA_DIST += test/test-efi-create-disk.sh
>
> test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh
> $(AM_V_GEN)test/test-efi-create-disk.sh
> @@ -2707,6 +2705,8 @@ test-efi: test-efi-disk.img
> endif
> endif
>
> +EXTRA_DIST += test/test-efi-create-disk.sh
> +
> # ------------------------------------------------------------------------------
> if HAVE_BLKID
> systemgenerator_PROGRAMS += \
> @@ -3952,11 +3952,6 @@ dist_udevhwdb_DATA = \
> hwdb/70-pointingstick.hwdb \
> hwdb/70-touchpad.hwdb
>
> -EXTRA_DIST += \
> - units/systemd-hwdb-update.service.in \
> - hwdb/ids-update.pl \
> - hwdb/sdio.ids
> -
> SYSINIT_TARGET_WANTS += \
> systemd-hwdb-update.service
>
> @@ -3972,6 +3967,11 @@ hwdb-remove-hook:
> -test -n "$(DESTDIR)" || rm -f /etc/udev/hwdb.bin
> endif
>
> +EXTRA_DIST += \
> + units/systemd-hwdb-update.service.in \
> + hwdb/ids-update.pl \
> + hwdb/sdio.ids
> +
> # ------------------------------------------------------------------------------
> TESTS += \
> test/udev-test.pl \
> @@ -4369,9 +4369,6 @@ dist_systemunit_DATA += \
> nodist_systemunit_DATA += \
> units/systemd-journal-remote.service
>
> -EXTRA_DIST += \
> - units/systemd-journal-remote.service.in
> -
> journal-remote-install-hook: journal-install-hook
> -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote
> -chown 0:0 $(DESTDIR)/var/log/journal/remote
> @@ -4385,6 +4382,7 @@ nodist_pkgsysconf_DATA += \
> src/journal-remote/journal-remote.conf
>
> EXTRA_DIST += \
> + units/systemd-journal-remote.service.in \
> src/journal-remote/journal-remote.conf.in
>
> endif
> @@ -4411,15 +4409,14 @@ systemd_journal_upload_LDADD = \
> nodist_systemunit_DATA += \
> units/systemd-journal-upload.service
>
> -EXTRA_DIST += \
> - units/systemd-journal-upload.service.in
> -
> nodist_pkgsysconf_DATA += \
> src/journal-remote/journal-upload.conf
>
> +endif
> +
> EXTRA_DIST += \
> + units/systemd-journal-upload.service.in \
> src/journal-remote/journal-upload.conf.in
> -endif
>
> # using _CFLAGS = in the conditional below would suppress AM_CFLAGS
> journalctl_CFLAGS = \
> @@ -4967,10 +4964,10 @@ dist_pkgsysconf_DATA += \
>
> nodist_systemunit_DATA += \
> units/systemd-bootchart.service
> +endif
>
> EXTRA_DIST += \
> units/systemd-bootchart.service.in
> -endif
>
> # ------------------------------------------------------------------------------
> if ENABLE_QUOTACHECK
> @@ -5439,9 +5436,6 @@ SYSTEM_UNIT_ALIASES += \
> BUSNAMES_TARGET_WANTS += \
> org.freedesktop.machine1.busname
>
> -EXTRA_DIST += \
> - units/systemd-machined.service.in
> -
> libnss_mymachines_la_SOURCES = \
> src/nss-mymachines/nss-mymachines.sym \
> src/nss-mymachines/nss-mymachines.c
> @@ -5464,6 +5458,9 @@ lib_LTLIBRARIES += \
>
> endif
>
> +EXTRA_DIST += \
> + units/systemd-machined.service.in
> +
> # ------------------------------------------------------------------------------
> if ENABLE_IMPORTD
>
> @@ -5591,9 +5588,6 @@ dist_rootlibexec_DATA = \
> nodist_systemunit_DATA += \
> units/systemd-importd.service
>
> -EXTRA_DIST += \
> - units/systemd-importd.service.in
> -
> dist_systemunit_DATA_busnames += \
> units/org.freedesktop.import1.busname
>
> @@ -5641,6 +5635,11 @@ endif
>
> endif
>
> +EXTRA_DIST += \
> + units/systemd-importd.service.in \
> + src/resolve/resolved.conf.in
> +
> +
> # ------------------------------------------------------------------------------
> if ENABLE_RESOLVED
> systemd_resolved_SOURCES = \
> @@ -5714,9 +5713,6 @@ dist_dbuspolicy_DATA += \
> dist_dbussystemservice_DATA += \
> src/resolve/org.freedesktop.resolve1.service
>
> -EXTRA_DIST += \
> - units/systemd-resolved.service.m4.in
> -
> SYSTEM_UNIT_ALIASES += \
> systemd-resolved.service dbus-org.freedesktop.resolve1.service
>
> @@ -5729,9 +5725,6 @@ GENERAL_ALIASES += \
> nodist_pkgsysconf_DATA += \
> src/resolve/resolved.conf
>
> -EXTRA_DIST += \
> - src/resolve/resolved.conf.in
> -
> tests += \
> test-dns-domain
>
> @@ -5796,6 +5789,9 @@ rootlibexec_PROGRAMS += \
>
> endif
>
> +EXTRA_DIST += \
> + units/systemd-resolved.service.m4.in
> +
> # ------------------------------------------------------------------------------
> if ENABLE_NETWORKD
> rootlibexec_PROGRAMS += \
> @@ -5959,13 +5955,12 @@ BUSNAMES_TARGET_WANTS += \
> gperf_gperf_sources += \
> src/network/networkd-network-gperf.gperf \
> src/network/networkd-netdev-gperf.gperf
> +endif
>
> EXTRA_DIST += \
> units/systemd-networkd.service.m4.in \
> units/systemd-networkd-wait-online.service.in
>
> -endif
> -
> # ------------------------------------------------------------------------------
> if ENABLE_LOGIND
> systemd_logind_SOURCES = \
> @@ -6190,14 +6185,14 @@ rootlibexec_PROGRAMS += \
> nodist_systemunit_DATA += \
> units/systemd-user-sessions.service
>
> -EXTRA_DIST += \
> - units/systemd-user-sessions.service.in
> -
> MULTI_USER_TARGET_WANTS += \
> systemd-user-sessions.service
>
> endif
>
> +EXTRA_DIST += \
> + units/systemd-user-sessions.service.in
> +
> # ------------------------------------------------------------------------------
>
> if HAVE_PYTHON_DEVEL
> @@ -6359,9 +6354,6 @@ clean-python:
>
> # ------------------------------------------------------------------------------
> if ENABLE_COMPAT_LIBS
> -EXTRA_DIST += \
> - src/compat-libs/linkwarning.h
> -
> libsystemd-%.c: src/compat-libs/libsystemd-%.sym
> $(AM_V_at)$(MKDIR_P) $(dir $@)
> $(AM_V_GEN)sed -r -n 's/^ +(sd_.*);/obsolete_lib(\1,$(notdir $(basename $<)));/p' <$< >$@
> @@ -6471,6 +6463,7 @@ UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
> endif
>
> EXTRA_DIST += \
> + src/compat-libs/linkwarning.h \
> src/compat-libs/libsystemd-journal.pc.in \
> src/compat-libs/libsystemd-login.pc.in \
> src/compat-libs/libsystemd-id128.pc.in \
> --
> 2.1.4
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list