From d42cb9692f145d439b836f61a0b7f551a87d3484 Mon Sep 17 00:00:00 2001 From: Eric Le Bihan Date: Mon, 2 Jun 2014 12:25:58 +0200 Subject: [PATCH 1/1] build-sys: revert use of ln relative option. Systemd build system now uses the `--relative` option from `ln(1)`. This option was added to GNU coreutils 8.16, which is not widely deployed yet by GNU/Linux distributions (not available in Debian Wheezy for example). This patch reverts the following commits: - 446883528524429283626208928b51f49f28f810 - 0ce91e4e3ba60d5c87307c1be4a3f6095790c4c2 - 5e11d962c02d583f38991adc4eec78872ccb23e4 - e2438b7a321de8050f5db6793599a1668c91ccf5 Signed-off-by: Eric Le Bihan --- Makefile.am | 30 ++++++++---------------------- configure.ac | 2 -- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5b26bc3..799a22f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -212,8 +212,8 @@ define move-to-rootlibdir if test "$(libdir)" != "$(rootlibdir)"; then \ $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \ - rm -f $(DESTDIR)$(libdir)/$$libname && \ - $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ + so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \ + $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \ fi endef @@ -237,6 +237,7 @@ USER_BUSNAMES_TARGET_WANTS = SYSTEM_UNIT_ALIASES = USER_UNIT_ALIASES = + GENERAL_ALIASES = install-target-wants-hook: @@ -272,9 +273,9 @@ install-aliases-hook: set -- $(SYSTEM_UNIT_ALIASES) && \ dir=$(systemunitdir) && $(install-aliases) set -- $(USER_UNIT_ALIASES) && \ - dir=$(userunitdir) && $(install-relative-aliases) + dir=$(userunitdir) && $(install-aliases) set -- $(GENERAL_ALIASES) && \ - dir= && $(install-relative-aliases) + dir= && $(install-aliases) define install-aliases while [ -n "$$1" ]; do \ @@ -285,15 +286,6 @@ define install-aliases done endef -define install-relative-aliases - while [ -n "$$1" ]; do \ - $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \ - rm -f $(DESTDIR)$$dir/$$2 && \ - $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \ - shift 2 || exit $$?; \ - done -endef - INSTALL_EXEC_HOOKS += \ install-target-wants-hook \ install-directories-hook \ @@ -316,10 +308,6 @@ AM_V_LN = $(AM_V_LN_$(V)) AM_V_LN_ = $(AM_V_LN_$(AM_DEFAULT_VERBOSITY)) AM_V_LN_0 = @echo " LN " $@; -AM_V_RM = $(AM_V_RM_$(V)) -AM_V_RM_ = $(AM_V_RM_$(AM_DEFAULT_VERBOSITY)) -AM_V_RM_0 = @echo " RM " $@; - # ------------------------------------------------------------------------------ rootbin_PROGRAMS = \ systemctl \ @@ -1907,8 +1895,7 @@ systemd_dbus1_generator_LDADD = \ dbus1-generator-install-hook: $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir) - $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator - $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator + $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator dbus1-generator-uninstall-hook: rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator @@ -2041,8 +2028,7 @@ systemd_bus_proxyd_LDADD = \ bus-proxyd-install-hook: $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(bindir) - $(AM_V_RM)rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge - $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge + $(AM_V_LN)$(LN_S) -f $(rootlibexecdir)/systemd-bus-proxyd $(DESTDIR)$(bindir)/systemd-stdio-bridge bus-proxyd-uninstall-hook: rm -f $(DESTDIR)$(bindir)/systemd-stdio-bridge @@ -5102,7 +5088,7 @@ GENERAL_ALIASES += \ $(systemunitdir)/remote-fs.target $(pkgsysconfdir)/system/multi-user.target.wants/remote-fs.target \ $(systemunitdir)/getty@.service $(pkgsysconfdir)/system/getty.target.wants/getty@tty1.service \ $(pkgsysconfdir)/user $(sysconfdir)/xdg/systemd/user \ - $(dbussystemservicedir)/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service + ../system-services/org.freedesktop.systemd1.service $(dbussessionservicedir)/org.freedesktop.systemd1.service if HAVE_SYSV_COMPAT INSTALL_DIRS += \ diff --git a/configure.ac b/configure.ac index 5133c12..7e3938e 100644 --- a/configure.ac +++ b/configure.ac @@ -76,8 +76,6 @@ AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin]) AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin]) -AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) - M4_DEFINES= # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line -- 1.7.10.4