Skip to contentSkip to conversation

Allow to to install systemd generators dependend on --with-systemd unit-dir-path location

PATCH In review Salvatore Bonaccorso 2 participants 6 messages Jun 28, 2020 – Sep 23, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Allow to to install systemd generators dependend on --with-systemd unit-dir-path location

Currently --with-systemd=unit-dir-path would be ignored to install the systemd generators and they are unconditionally installed in /usr/lib/systemd/system-generators . Distributions installing systemd unit files in /lib/systemd/system would though install the systemd-generators in /lib/systemd/system-generators.

Make the installation of the systemd unit generators relative depending on the unit-dir-path passed for --with-systemd.

Salvatore Bonaccorso (2):
systemd/Makefile: Drop exlicit setting of unit_dir systemd generators: Install depending on location for systemd unit
files

 systemd/Makefile.am | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/2 systemd/Makefile: Drop exlicit setting of unit_dir

The used variable is named unitdir in configure.ac and systemd/Makefile.am otherwise but is used in a single place as unit_dir.

The setting has no effect, but if later commits would use a base to the systemd unit files directory for installing further files this would void the possibility to explicitly set a systemd unit files directory via configure with --with-systemd=unit-dir-path.

Fixes 0fbf91a4fd90 ("Include systemd unit files in "dist" and "install".")
---
 systemd/Makefile.am | 1 -
 1 file changed, 1 deletion(-)
systemd/Makefile.am +0 -1
index 75cdd9f54c81..f089c8831902 100644
@@ -45,7 +45,6 @@ man5_MANS	= nfs.conf.man
 man7_MANS	= nfs.systemd.man
 EXTRA_DIST = $(unit_files) $(man5_MANS) $(man7_MANS)
 
-unit_dir = /usr/lib/systemd/system
 generator_dir = /usr/lib/systemd/system-generators
 
 EXTRA_PROGRAMS	= nfs-server-generator rpc-pipefs-generator
Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/2 systemd generators: Install depending on location for systemd unit files

In reply to Salvatore Bonaccorso

While it is possible to configure the systemd unit files directory on configure time with --with-systemd=unit-dir-path, this path is not taken into account for installing the systemd unit generators, as they are installed unconditionally in /usr/lib/systemd/system-generators.

---
 systemd/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
systemd/Makefile.am +1 -1
index f089c8831902..9ee4f1c8f967 100644
@@ -45,7 +45,7 @@ man5_MANS	= nfs.conf.man
 man7_MANS	= nfs.systemd.man
 EXTRA_DIST = $(unit_files) $(man5_MANS) $(man7_MANS)
 
-generator_dir = /usr/lib/systemd/system-generators
+generator_dir = $(unitdir)/../system-generators
 
 EXTRA_PROGRAMS	= nfs-server-generator rpc-pipefs-generator
 genexecdir = $(generator_dir)
Signature · 1 line
2.27.0
#3 lore raw
In reply to Salvatore Bonaccorso

Hi,

Quoted 9 lines · Salvatore Bonaccorso

Currently --with-systemd=unit-dir-path would be ignored to install the systemd generators and they are unconditionally installed in /usr/lib/systemd/system-generators . Distributions installing systemd unit files in /lib/systemd/system would though install the systemd-generators in /lib/systemd/system-generators.

Make the installation of the systemd unit generators relative depending on the unit-dir-path passed for --with-systemd.

Quoted 7 lines

Salvatore Bonaccorso (2):
systemd/Makefile: Drop exlicit setting of unit_dir systemd generators: Install depending on location for systemd unit
files

 systemd/Makefile.am | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

is this something we could have applied or is there something wrong with the patches which I should fix first?

Regards,
Salvatore

#4 lore raw

Hey!

Quoted 17 lines · Salvatore Bonaccorso

Hi,

Quoted 14 lines · Salvatore Bonaccorso

Currently --with-systemd=unit-dir-path would be ignored to install the systemd generators and they are unconditionally installed in /usr/lib/systemd/system-generators . Distributions installing systemd unit files in /lib/systemd/system would though install the systemd-generators in /lib/systemd/system-generators.

Make the installation of the systemd unit generators relative depending on the unit-dir-path passed for --with-systemd.

Salvatore Bonaccorso (2):
systemd/Makefile: Drop exlicit setting of unit_dir systemd generators: Install depending on location for systemd unit
files

Quoted 5 lines
Quoted 2 lines
  systemd/Makefile.am | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

is this something we could have applied or is there something wrong with the patches which I should fix first?

Sorry for the delay... I took a lot of PTO this summer...

Looking at it now...

steved.

Quoted 4 lines

Regards,
Salvatore

#5 lore raw
In reply to Salvatore Bonaccorso
Quoted 9 lines · Salvatore Bonaccorso

Currently --with-systemd=unit-dir-path would be ignored to install the systemd generators and they are unconditionally installed in /usr/lib/systemd/system-generators . Distributions installing systemd unit files in /lib/systemd/system would though install the systemd-generators in /lib/systemd/system-generators.

Make the installation of the systemd unit generators relative depending on the unit-dir-path passed for --with-systemd.

Quoted 8 lines

Salvatore Bonaccorso (2):
systemd/Makefile: Drop exlicit setting of unit_dir systemd generators: Install depending on location for systemd unit
files

  systemd/Makefile.am | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

Committed... (tag: nfs-utils-2-5-5-rc3)

In the future, If have not responded in a month please feel free to ping me... because mostly likely it has fell off my radar... my apologies for taking so long...

steved.