]> sourceware.org Git - systemtap.git/commitdiff
RHBZ1121363: make dracut module directory configurable
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 10 Apr 2015 18:46:10 +0000 (14:46 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 10 Apr 2015 19:24:01 +0000 (15:24 -0400)
The place where dracut loads modules for the "service systemtap onboot ..."
facility is fixed, but we want its subdirectory to be configurable,
so that different stap installations can avoid stepping on each other.
So now "configure --with-dracutstap=DRACUT_D/MODULEDIR" is available.

configure
configure.ac
initscript/99stap/module-setup.sh.in
initscript/systemtap.in
systemtap.spec

index 438fd2bc61f5f42a129aeeb6c6fc3798ca4bff7f..c37cbfc7dac9d96876649b1a76f3572480b78536 100755 (executable)
--- a/configure
+++ b/configure
@@ -669,6 +669,7 @@ avahi_LIBS
 avahi_CFLAGS
 BUILD_SERVER_FALSE
 BUILD_SERVER_TRUE
+dracutstap
 HAVE_NSS_FALSE
 HAVE_NSS_TRUE
 nss_LIBS
@@ -850,6 +851,7 @@ enable_crash
 enable_docs
 enable_refdocs
 with_nss
+with_dracutstap
 enable_server
 with_avahi
 with_rpm
@@ -1546,6 +1548,7 @@ Optional Packages:
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
   --without-nss           Do not use NSS even if present
+  --with-dracutstap=DIR   Install dracut module files in DIR
   --without-avahi         Do not use Avahi even if present
   --with-rpm              query rpm database for missing debuginfos
   --with-elfutils=DIRECTORY
@@ -10093,6 +10096,21 @@ else
 fi
 
 
+
+# Check whether --with-dracutstap was given.
+if test "${with_dracutstap+set}" = set; then :
+  withval=$with_dracutstap;
+fi
+
+if test "x$with_dracutstap" != "x"; then :
+  dracutstap="$with_dracutstap"
+else
+  dracutstap=/usr/lib/dracut/modules.d/99stap
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: using dracut module directory $dracutstap" >&5
+$as_echo "$as_me: using dracut module directory $dracutstap" >&6;}
+
+
 # Check whether --enable-server was given.
 if test "${enable_server+set}" = set; then :
   enableval=$enable_server; enable_server=$enableval
index e387916f8138f8a8d3a3605c5b36b39cb813ea05..6255018ec7f72a5d25575d56855b7b103e9c31f6 100644 (file)
@@ -324,6 +324,17 @@ AS_IF([test "x$with_nss" != "xno"], [
 
 AM_CONDITIONAL([HAVE_NSS], [test "${have_nss}" = "yes"])
 
+dnl Handle dracut directory configuration.  Note we hard-code /usr by default,
+dnl instead of $prefix, because dracut is a system service that doesn't listen
+dnl at relocatable directories.
+AC_ARG_WITH([dracutstap],
+  AS_HELP_STRING([--with-dracutstap=DIR],
+    [Install dracut module files in DIR]))
+AS_IF([test "x$with_dracutstap" != "x"],[dracutstap="$with_dracutstap"],
+            [dracutstap=/usr/lib/dracut/modules.d/99stap])
+AC_MSG_NOTICE([using dracut module directory $dracutstap])
+AC_SUBST(dracutstap)
+
 dnl Handle the option to build the compile server.
 AC_ARG_ENABLE([server],
   AS_HELP_STRING([--enable-server],
index 7b2b4018a7fb8304ac7c8a4e93491e2d6168ebd2..3a3de78c2f5c7005aae417c2ea13a7e35a6a522f 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # NB: $moddir only works in install()
-. @prefix@/lib/dracut/modules.d/99stap/params.conf
+. @dracutstap@/params.conf
 
 # Return 0 --> install stap module
 # Return 1 --> skip stap module
index cd65b3fdb72412c220b4582406debca1c3abc7de..87554579d008468a9bc95a52d80826edc8bc92cc 100755 (executable)
@@ -59,7 +59,7 @@ TEMP_PATH=/tmp
 LOG_FILE=@localstatedir@/log/systemtap.log
 
 # NB: this path is also used in 99stap/module-setup.sh
-DRACUT_SRC=@prefix@/lib/dracut/modules.d/99stap/params.conf
+DRACUT_SRC=@dracutstap@/params.conf
 
 # FAIL unless all scripts succeeded to run
 PASSALL=yes
index 303c2831e094ab78ddcb145bb942d252ac5bd58d..de854be8b0fe4b73861ebd66a790eaf249c2a7d5 100644 (file)
@@ -53,8 +53,7 @@
    %endif
 %endif
 
-%define dracutlibdir %{_prefix}/lib/dracut
-%define dracutstap %{dracutlibdir}/modules.d/99stap
+%define dracutstap %{_prefix}/lib/dracut/modules.d/99stap
 
 Name: systemtap
 Version: 2.8
@@ -453,7 +452,13 @@ cd ..
 %global virt_config --disable-virt
 %endif
 
-%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
+%if %{with_dracut}
+%global dracut_config --with-dracutstap=%{dracutstap}
+%else
+%global dracut_config
+%endif
+
+%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}"
 make %{?_smp_mflags}
 
 %if %{with_emacsvim}
This page took 0.044523 seconds and 5 git commands to generate.