[lfs-dev] [LFS Trac] #3098: udev/systemd 183 is out

Bryan Kadzban bryan at kadzban.is-a-geek.net
Tue May 29 23:24:39 PDT 2012


Bryan Kadzban wrote:
> DBUS_CFLAGS=" " \
> DBUS_LIBS=" " \
> BLKID_CFLAGS="-I/usr/include/blkid" \
> BLKID_LIBS="-L/lib64 -lblkid" \
> KMOD_CFLAGS="-I/usr/include" \
> KMOD_LIBS="-L/lib64 -lkmod" \
> ./configure --prefix=/usr \
>             --with-rootprefix='' \
>             --bindir=/sbin \
>             --sysconfdir=/etc \
>             --libexecdir=/lib \
>             --libdir=/lib64 \
>             --disable-introspection \
>             --disable-keymap \
>             --disable-gudev \
>             --with-usb-ids-path=no \
>             --with-pci-ids-path=no \
>             --disable-acl \
>             --disable-tcpwrap \
>             --disable-hostnamed \
>             --disable-timedated \
>             --disable-localed \
>             --disable-coredump \
>             --disable-audit \
>             --disable-ima \
>             --disable-pam \
>             --with-dbuspolicydir= \
>             --with-dbussessionservicedir= \
>             --with-dbussystemservicedir= \
>             --with-dbusinterfacedir= \
>             --with-pamlibdir=
> 
> make am_libsystemd_label_la_OBJECTS="\
>     src/shared/libsystemd_label_la-dev-setup.lo \
>     src/shared/libsystemd_label_la-mkdir.lo \
>     src/shared/libsystemd_label_la-label.lo" \
>   ata_id cdrom_id accelerometer scsi_id v4l_id mtd_probe collect \
>   systemd-udevd
> 
> Haven't yet figured out how to install just these bits though.  Time to
> keep digging through the Makefile.am.

Minor modifications to the make command (configure is still fine):

make bin_PROGRAMS=udevadm \
  rootlibexec_PROGRAMS=systemd-udevd \
  rootlibexecdir=/sbin \
  lib_LTLIBRARIES=libudev.la \
  am_libsystemd_label_la_OBJECTS="\
    src/shared/libsystemd_label_la-dev-setup.lo \
    src/shared/libsystemd_label_la-mkdir.lo \
    src/shared/libsystemd_label_la-label.lo" \
  MANPAGES="man/udev.7 man/udevadm.8 man/systemd-udevd.8" \
  MANPAGES_ALIAS="" \
  ata_id cdrom_id accelerometer scsi_id v4l_id mtd_probe collect \
  systemd-udevd udevadm rules/99-systemd.rules

(forgot udevadm and 99-systemd.rules, which is generated at build time,
and might as well set some automake variables that we'll need for the
install).  Then, to install:

make DESTDIR=/tmp/udev-test \
  bin_PROGRAMS=udevadm \
  rootlibexec_PROGRAMS=systemd-udevd \
  rootlibexecdir=/lib/udev \
  lib_LTLIBRARIES=libudev.la \
  am_libsystemd_label_la_OBJECTS="\
    src/shared/libsystemd_label_la-dev-setup.lo \
    src/shared/libsystemd_label_la-mkdir.lo \
    src/shared/libsystemd_label_la-label.lo" \
  MANPAGES="man/udev.7 man/udevadm.8 man/systemd-udevd.8" \
  MANPAGES_ALIAS="" \
  install-dist_udevrulesDATA install-binPROGRAMS \
  install-rootlibexecPROGRAMS install-libLTLIBRARIES \
  install-udevlibexecPROGRAMS install-man7 install-man8

seems to generate the right set of binaries and files under
/tmp/udev-test. Of course we still have to rename
/lib/udev/systemd-udevd to plain old /lib/udev/udevd. (Or change the
target in rootlibexecdir, actually. Looks like our bootscripts already
handle the other path though.)  Don't strictly need the DESTDIR either,
of course.

Also have to fix up the manpages, though the seds that have been
floating around are probably fine for those.

Last, we'll still have to find the Debian rule-generator stuff and pull
that in, but those don't need a build.  We could even put them into the
udev-config package, I suppose.  Hmm.

Anyone want to double check that this will actually work, and I didn't
miss a dependency?  :-)

FWIW, the rationale for the make arguments: bin_PROGRAMS is set to
remove a bunch of systemd stuff from /sbin. rootlibexec_PROGRAMS is the
same, but for /lib/udev. lib_LTLIBRARIES is the same, but for --libdir.
MANPAGES and MANPAGES_ALIAS are set to prevent trying to install
manpages for systemd.

am_libsystemd_label_la_OBJECTS is the magic automake variable that
controls which .lo files need to be built into libsystemd-label.la; this
is here to remove a bunch of .lo files whose sources require dbus.

install-dist_udevrulesDATA is the automake target to install the udev
rules files (into udevrulesdir). (This will also autogenerate
rules/99-systemd.rules if needed, but we might as well do it during the
build I think. It'd work to remove it from dist_udevrules_DATA as well,
but the remainder of the items in that variable is a very very large
list, and I think I'd rather just remove it from the system afterward.)

install-binPROGRAMS is the magic automake target to install the programs
that go into bindir (so, udevadm). install-rootlibexecPROGRAMS is the
same, but for rootlibexecdir (so, systemd-udev).

install-libLTLIBRARIES is the same, but for libdir (so, libudev.la /
libudev.so*). This setup still dynamically links against libudev, so we
still need to install it. (Besides, xorg needs it too.)

install-udevlibexecPROGRAMS is for the udev helpers (/lib/udev/*_id and
accelerometer).

install-man7 and install-man8 are for the manpages.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20120529/bf8d286d/attachment.sig>


More information about the lfs-dev mailing list