Bug 13081 - host-e2fsprogs attempts to create udev rules.d on build host if not exists
Summary: host-e2fsprogs attempts to create udev rules.d on build host if not exists
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-18 02:47 UTC by Christian Stewart
Modified: 2020-07-18 13:51 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
hacky fix for e2fs progs writing to host system (1.73 KB, patch)
2020-07-18 06:21 UTC, Christian Stewart
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Stewart 2020-07-18 02:47:34 UTC
If the /usr/lib/udev path does not exist on the build host, the "installdirs-udev" step of the "install-progs-recursive" step of host-e2fsprogs host-install in Buildroot attempts to create it.

This is a leak out of the Buildroot host dir structure.

Log output:

making install in po
if test "e2fsprogs" = "gettext-tools"; then \
  /bin/mkdir -p /home/paralin/repos/skiff-configs/skiff/workspaces/desktop/host/share/gettext/po; \
  for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot   Makevars.t
emplate; do \
    /usr/bin/install -c -m 644 ./$file \
               a    /home/paralin/repos/skiff-configs/skiff/workspaces/desktop/host/share/gettext/po/$file; \
  done; \
  for file in Makevars; do \
    rm -f /home/paralin/repos/skiff-configs/skiff/workspaces/desktop/host/share/gettext/po/$file; \
  done; \
else \
  : ; \
fi
making install in scrub
       :MKDIR_P /usr/lib/udev/rules.d
/bin/mkdir: cannot create directory '/usr/lib/udev': Permission denied
make[5]: *** [Makefile:420: installdirs-udev] Error 1
make[4]: *** [Makefile:433: install-progs-recursive] Error 1
make[3]: *** [package/pkg-generic.mk:280: /home/paralin/repos/skiff-configs/skiff/workspaces/desktop/build/host-e2fsprogs-1.45.6/.stamp_host_insta
lled] Error 2
Comment 1 Christian Stewart 2020-07-18 02:49:18 UTC
Seems like the /usr/lib/systemd/system path also leaks:

making install in scrub
        MKDIR_P /usr/lib/udev/rules.d
       iMKDIR_P /usr/lib/systemd/system
/bin/mkdir: cannot create directory '/usr/lib/systemd/system': Permission denied
Comment 2 Christian Stewart 2020-07-18 06:21:18 UTC
Created attachment 8536 [details]
hacky fix for e2fs progs writing to host system
Comment 3 Christian Stewart 2020-07-18 06:21:25 UTC
The attached patch disables e2fsprogs scrub utilities by removing them from the Makefile.in. This fixes the build on systems where the paths it tries to mkdir -p do not already exist. But, a better patch is probably needed for upstream.