Opened 16 years ago

Closed 16 years ago

#2170 closed defect (fixed)

Udev-config Makefile

Reported by: randy@… Owned by: lfs-book@…
Priority: normal Milestone: 7.0
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by randy@…)

The Makefile in the udev-config tarball does not play nicely with DESTDIR. I recommend changing the "shell udevd --version" command to be "shell $(DESTDIR)/sbin/udevd --version".

Otherwise udevd is not in the path and ....

Change History (8)

comment:1 by randy@…, 16 years ago

Description: modified (diff)

comment:2 by randy@…, 16 years ago

Description: modified (diff)

comment:3 by alexander@…, 16 years ago

I suggest dropping the version check completely or at least with non-empty DESTDIR. Rationale: "make DESTDIR=/mnt/lfs install" may be run from a recovery CD such as Knoppix, with a possibly incomatible version of glibc, causing udevd to fail.

comment:4 by bryan@linuxfromscratch.org, 16 years ago

The version check is only there to get a version number for the ${DOC_DIR} variable. I don't remember the rationale for having DOC_DIR contain the version of udev, but I suspect it had something to do with the fact that udev-config didn't really have a version. (Well, it has a date/time stamp, when it gets packaged for the book. But that's about it...)

It would work to use $(PREFIX)/share/doc/udev-config instead of a directory for udev that's version-specific. (On the only system I have access to at the moment, which is Debian testing, most of the subdirectories of /usr/share/doc don't have versions in their names.) I'm not sure if people will look for udev-config docs, or if they'll go looking for udev docs and not be able to find them. (But I do suspect that if we call the directory udev-config, then people looking for udev will also see it.) Or maybe it just doesn't matter that much. ;-)

It would also work to remove the version check from the Makefile and provide UDEV_VERSION from the command line when installing udev-config. Making the install command in the XML look something like this should work:

make install UDEV_VERSION=&udev-version;

I'd probably remove the line that sets UDEV_VERSION (don't provide a default), and leave in the check whether it's set to anything. That way some value must be used, and we don't end up creating a /usr/share/doc/udev- directory with a space for a version but no version number.

comment:5 by bryan@linuxfromscratch.org, 16 years ago

Er, "make install-doc UDEV_VERSION=blah" (and install-extra-doc), not install. But I think the idea is clear. (Should have previewed once or twice more.)

But the more I think about it, the more I like using /usr/share/doc/udev-config instead. (Well, $(PREFIX), and add $(DESTDIR) too when installing the files, but that's the path in the final system.) Yes, we're documenting rules that came from udev (in install-extra-doc at least), and not udev-config, but I think that's fine.

comment:6 by dnicholson@…, 16 years ago

Or /usr/share/doc/udev-config-$udev_config_version. After all, it's that particular version of udev-config that is being documented, not udev itself.

comment:7 by bryan@linuxfromscratch.org, 16 years ago

$udev_config_version would work, if we wanted to pull it from the XML entity and force the Makefile variable from the installation command.

I have my local copy of udev-config modified to simply use $(DESTDIR)$(PREFIX)/share/doc/udev-config -- I'll wait another day or so for other comments (if any), then I'll probably just check that in.

(Of course that still won't help until we get ticket #2057 figured out, because the current udev-config can't be used with udev-113. I'm leaning back toward "manually" looping through /sys/class/net/*, copying the udev whitelist from its rules file, and calling the script manually for each device whose name matches the whitelist. At least that way we have something that works for everybody, and it's relatively simple. The problem is, it'd require cut-and-paste to get the loop to happen correctly. Although actually, we could put a script into udev-config to do this, then have the user just run the script. It'd fix typo issues, anyway. Hmm...)

comment:8 by bryan@linuxfromscratch.org, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r8542; put into the book in r8545.

Note: See TracTickets for help on using tickets.