Skip to contentSkip to conversation

package/host-e2fsprogs: explicitly do not install udev and systemd files

PATCH New Antoine Tenart 3 participants 3 messages Jul 17, 2020 – Jul 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/host-e2fsprogs: explicitly do not install udev and systemd files

Explicitly do not install udev rules and systemd units when installing the host version of e2fsprogs, as we do not need those files when calling host tools provided by e2fsprogs from Buildroot.

This fixes a weird issue I encountered: host-e2fsprogs was built and installed without any issue when building an image from scratch. But any attempt to rebuild host-e2fsprogs alone was failing during the installation steps as it tried to install files to the host system.

This is because e2fsprogs' build system (autotools) is using the prefix given at configuration time when installing its binaries, configuration files, man pages, etc... but not when installing its systemd units and udev rules.

The issue did not arise when building it from scratch, as host-e2fsprogs do not have a dependency on host-udev/systemd, so its configure script did not automatically enable udev/systemd installation steps at first.

---

Hello,

When looking at this, I agree a good fix would be to fix it upstream, so that systemd and udev files are correctly installed. I believe we would see a similar issue for the target package (and the build configuration to be wrong, depending on the build order of packages). I had a look at the configure.ac file, but I have to admit I'm not familiar at all with autotools, and coming up with a clean fix seemed not straightforward to me. I can give pointers if someone wants to fix it.

I also believe this patch makes sense, even if not for the sole purpose of fixing the host-e2fsprogs installation issue.

Thanks,
Antoine

 package/e2fsprogs/e2fsprogs.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
package/e2fsprogs/e2fsprogs.mk +3 -1
index 41986eec585e..f6642d8de164 100644
@@ -29,7 +29,9 @@ HOST_E2FSPROGS_CONF_OPTS = \
 	--disable-testio-debug \
 	--enable-symlink-install \
 	--enable-elf-shlibs \
-	--with-crond-dir=no
+	--with-crond-dir=no \
+	--with-udev-rules-dir=no \
+	--with-systemd-unit-dir=no
 
 # Set the binary directories to "/bin" and "/sbin", as busybox does,
 # so that we do not end up with two versions of e2fs tools.
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/host-e2fsprogs: explicitly do not install udev and systemd files

Quoted 14 lines · On Fri, 17 Jul 2020 14:06:54 +0200 Antoine Tenart <[email protected]>…

Explicitly do not install udev rules and systemd units when installing the host version of e2fsprogs, as we do not need those files when calling host tools provided by e2fsprogs from Buildroot.

This fixes a weird issue I encountered: host-e2fsprogs was built and installed without any issue when building an image from scratch. But any attempt to rebuild host-e2fsprogs alone was failing during the installation steps as it tried to install files to the host system.

This is because e2fsprogs' build system (autotools) is using the prefix given at configuration time when installing its binaries, configuration files, man pages, etc... but not when installing its systemd units and udev rules.

Quoted 6 lines

The issue did not arise when building it from scratch, as host-e2fsprogs do not have a dependency on host-udev/systemd, so its configure script did not automatically enable udev/systemd installation steps at first.

---

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/host-e2fsprogs: explicitly do not install udev and systemd files

In reply to Antoine Tenart
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Antoine" == Antoine Tenart <[email protected]> writes:

Explicitly do not install udev rules and systemd units when installing the host version of e2fsprogs, as we do not need those files when calling host tools provided by e2fsprogs from Buildroot.

This fixes a weird issue I encountered: host-e2fsprogs was built and installed without any issue when building an image from scratch. But any attempt to rebuild host-e2fsprogs alone was failing during the installation steps as it tried to install files to the host system.

This is because e2fsprogs' build system (autotools) is using the prefix given at configuration time when installing its binaries, configuration files, man pages, etc... but not when installing its systemd units and udev rules.

Quoted 5 lines

The issue did not arise when building it from scratch, as host-e2fsprogs do not have a dependency on host-udev/systemd, so its configure script did not automatically enable udev/systemd installation steps at first.

Committed to 2020.02.x and 2020.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard