Skip to contentSkip to conversation

Fix configure --with-systemd-modules-load=DIR

PATCH Superseded Olaf Hering 3 participants 5 messages Oct 10, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix configure --with-systemd-modules-load=DIR

Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both XEN_SYSTEMD_DIR and XEN_SYSTEMD_MODULES_LOAD to DIR1. The reason is that both AC_ARG_WITH() use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.

Please rerun autogen.sh after applying this patch.

Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Wei Liu <[email protected]>
---
 m4/systemd.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
m4/systemd.m4 +1 -1
index 629d202..51331f5 100644
@@ -24,7 +24,7 @@ AC_DEFUN([AX_SYSTEMD_OPTIONS], [
 		[SYSTEMD_DIR="$withval"],[SYSTEMD_DIR=""])
 	AC_SUBST(SYSTEMD_DIR)
 
-	AC_ARG_WITH(systemd,
+	AC_ARG_WITH(systemd_modules_load,
 		AS_HELP_STRING([--with-systemd-modules-load=DIR],
 		[set directory for systemd modules load files [PREFIX/lib/modules-load.d/]]),
 		[SYSTEMD_MODULES_LOAD="$withval"], [SYSTEMD_MODULES_LOAD=""])
#1 lore raw

Olaf Hering writes ("[PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):

Quoted 5 lines

Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both XEN_SYSTEMD_DIR and XEN_SYSTEMD_MODULES_LOAD to DIR1. The reason is that both AC_ARG_WITH() use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.

...

m4/systemd.m4 AC_DEFUN([AX_SYSTEMD_OPTIONS], [ · line 27

Quoted 2 lines
m4/systemd.m4 +1 -1
-	AC_ARG_WITH(systemd,
+	AC_ARG_WITH(systemd_modules_load,

AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.

Also I think PACKAGE in AC_ARG_WITH should have hyphens, not underscores.

Ian.

#2 lore raw
Quoted 6 lines · Ian Jackson

Olaf Hering writes ("[PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):

Quoted 5 lines

Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both XEN_SYSTEMD_DIR and XEN_SYSTEMD_MODULES_LOAD to DIR1. The reason is that both AC_ARG_WITH() use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.

Quoted 6 lines

...

m4/systemd.m4 AC_DEFUN([AX_SYSTEMD_OPTIONS], [ · line 27

Quoted 2 lines
m4/systemd.m4 +1 -1
-	AC_ARG_WITH(systemd,
+	AC_ARG_WITH(systemd_modules_load,

AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.

It did not, at least I was able to change the variable to the desired value. But you are right, sysconfig-leaf-dir in another file does not have underscores. Do you want me to resend, or will you fix it up manually to systemd-modules-load once you merge it?

Olaf

#3 lore raw
Quoted 15 lines · Olaf Hering
Quoted 6 lines · Ian Jackson

Olaf Hering writes ("[PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):

Quoted 5 lines

Currently --with-systemd=DIR1 --with-systemd-modules-load=DIR2 will set both XEN_SYSTEMD_DIR and XEN_SYSTEMD_MODULES_LOAD to DIR1. The reason is that both AC_ARG_WITH() use 'systemd' as the name for the internal variable. As a result the value of the first option is also use as the value for the second option. Fix this by using another variable name.

Quoted 6 lines

...

m4/systemd.m4 AC_DEFUN([AX_SYSTEMD_OPTIONS], [ · line 27

Quoted 2 lines
m4/systemd.m4 +1 -1
-	AC_ARG_WITH(systemd,
+	AC_ARG_WITH(systemd_modules_load,

AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.

Quoted 4 lines

It did not, at least I was able to change the variable to the desired value. But you are right, sysconfig-leaf-dir in another file does not have underscores. Do you want me to resend, or will you fix it up manually to systemd-modules-load once you merge it?

Best to have a new patch for something not related to this one please.

Ian

#4 lore raw
In reply to Olaf Hering

Olaf Hering writes ("Re: [PATCH for-xen-4.5] Fix configure --with-systemd-modules-load=DIR"):

Quoted 8 lines · Ian Jackson
Quoted 2 lines

AFAICT this changes the command line option. I don't understand how --with-systemd-modules-load worked at all before this.

It did not, at least I was able to change the variable to the desired value. But you are right, sysconfig-leaf-dir in another file does not have underscores. Do you want me to resend, or will you fix it up manually to systemd-modules-load once you merge it?

Please resend.

Thanks,
Ian.