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

2012-06-03 Thread Bryan Kadzban
Bruce Dubbs wrote:
> Bryan Kadzban wrote:
> 
>> Probably also want to double check whether any of the following are
>> still being built or checked for:
>>
>> acl  (libsystemd-acl.la)
>> tcpwrap  (see if configure is checking for it)
>> hostnamed  (systemd-hostnamed)
>> timedated  (systemd-timedated)
>> localed  (libsystemd-dbus.la, systemd-localed, etc.)
>> coredump  (libsystemd-journal.la, systemd-coredump)
>> audit  (see if configure is checking for it)
>> ima  (libsystemd-core.la; safest to kill it I think)
>> pam  (pam_systemd.la)
>>
>> since each of them has a --disable-X flag too.
> 
> Just a note.  I'm doing my checks in a Chapter 6 (SVN-20120603) type 
> environment.  There is no hint of tcpwrappers, pam, etc..  Those other 
> things that can be specified seem to be checked and automatically set as 
> not available.

I thought PAM was an option we mentioned on the shadow page, pointing to
BLFS -- although now that I go look, it doesn't seem to be there. Huh.
Oh well.

Are any of the files mentioned (lib*.la, systemd-*) present in the
directory after installation is finished? If not, then they shouldn't
need to be specifically disable, but if they are present, either the
patch might need more work, or they could be disabled individually.



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-06-03 Thread Bruce Dubbs
Bryan Kadzban wrote:

> Probably also want to double check whether any of the following are
> still being built or checked for:
> 
> acl  (libsystemd-acl.la)
> tcpwrap  (see if configure is checking for it)
> hostnamed  (systemd-hostnamed)
> timedated  (systemd-timedated)
> localed  (libsystemd-dbus.la, systemd-localed, etc.)
> coredump  (libsystemd-journal.la, systemd-coredump)
> audit  (see if configure is checking for it)
> ima  (libsystemd-core.la; safest to kill it I think)
> pam  (pam_systemd.la)
> 
> since each of them has a --disable-X flag too.

Just a note.  I'm doing my checks in a Chapter 6 (SVN-20120603) type 
environment.  There is no hint of tcpwrappers, pam, etc..  Those other 
things that can be specified seem to be checked and automatically set as 
not available.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-06-03 Thread Bryan Kadzban
Bruce Dubbs wrote:
> I grabbed the current git version of Makefile.am and applied the patch 
> with no errors.  autoreconf also works without error.
> 
> ./configure --disable-systemd --with-usb-ids-path=no \
>  --with-pci-ids-path=no
> 
> ...
> 
> configure: error: Package requirements (glib-2.0 >= 2.22.0 gobject-2.0 
>  >= 2.22.0) were not met:

glib is only required for gudev and introspection; "--disable-gudev
--disable-introspection" should mean you don't need to set GLIB_CFLAGS
or GLIB_LIBS either. :-)

> ./configure --disable-systemd --with-usb-ids-path=no
> --with-pci-ids-path=no \
>  GLIB_CFLAGS=-I/usr/include \
>  GLIB_LIBS=-lglib --disable-keymap \
>  --disable-logind --disable-gudev
> 
> seems to be needed.  make completes.

That seems reasonable, although looking at previous udev builds, I'm
thinking we also need:

--prefix=/usr
--with-rootprefix=''
--bindir=/sbin  (for udevadm)
--sysconfdir=/etc  (for udev.conf)
--libexecdir=/lib  (for udevrulesdir, and thus the rules files)
--libdir=/lib  (for libudev, though we should consider moving the .a,
.la, and .so files back to /usr/lib, since they're only needed to link)
--docdir=/usr/share/doc/udev-VERSION  (since we do that elsewhere)
--disable-introspection  (also requires glib)

Probably also want to double check whether any of the following are
still being built or checked for:

acl  (libsystemd-acl.la)
tcpwrap  (see if configure is checking for it)
hostnamed  (systemd-hostnamed)
timedated  (systemd-timedated)
localed  (libsystemd-dbus.la, systemd-localed, etc.)
coredump  (libsystemd-journal.la, systemd-coredump)
audit  (see if configure is checking for it)
ima  (libsystemd-core.la; safest to kill it I think)
pam  (pam_systemd.la)

since each of them has a --disable-X flag too.

> TODO:
> The systemdirneeds to be specified.

systemdir?

> /etc/systemd needs removed
> /usr/lib/systemd needs removed

"make pkgincludedir= pkgsysconfdir= install" fixes those.  Though I
should look into trying to fix automake to avoid creating the directory
if the x_PRIMARIES variable has only spaces in it.

(That would require a new automake release, unfortunately.)

> Not sure if we need to specify libexecdir or not

For the rules, yes.

For systemd-udevd, we need to override rootlibexecdir at "make install"
time as well.  (Would be nice if automake made it easy to rename that
file at install time too.  Or maybe I just don't know how. :-) )

We also need to override pkgconfiglibdir, to put the pkg-config file for
libudev back under /usr.  (Since --libdir=/lib to put the libraries in
the root.)

OTOH maybe we don't need --libdir=/lib, and can use /usr/lib instead;
libudev may not be needed by anything at boot time before mountfs.  I
don't actually know for sure...  :-/

> Rename /usr/share/doc/systemd?  to udev-18x?

--docdir will do that if we want.

> Run the sed against the man pages.

Yup.  Also move the binary, as above.

> Add persistent device support

Yup.  I'd pull them from here:

http://packages.debian.org/search?keywords=udev

since the Debian udev maintainer said he'd be maintaining these scripts
and such, except that Debian unstable is still on -175.  :-/

From -182 would work as well for now, I think.

> Do we skip the keymap stuff?  We did install it in udev-182.  Without 
> --disable-keymap, configure wants gperf.

I'm pretty sure the current book *does* disable keymap.  :-)

Whether that's a good idea or not remains to be seen, but if it requires
gperf, then I'd lean toward disabling it for now and seeing if anyone
asks about it.

> I'm going to wait for -185 to do more.

Yeah, I'm not even sure what the maintainers think about the patches
yet.  :-)



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-06-03 Thread Bruce Dubbs
Bryan Kadzban wrote:
> DJ Lucas wrote:
>> On 06/03/2012 02:03 PM, Bruce Dubbs wrote:
>>> Bryan, I tried the patch you submitted to linux-hotplug yesterday:
>>>
>>> systemd-make-systemd-optional.patch
>>>
>>> It doesn't apply cleanly to either systemd-183 or -184.
>> It applies with offsets to git master...which hopefully soon will be
>> -185.
>>
>> git://anongit.freedesktop.org/systemd/systemd
> 
> Yup, since I was sending it upstream, I figured it'd be better to base
> it off current git, instead of any particular release.  (And on Friday I
> found that something went into git that caused the hunk failure you're
> seeing, though it happened in the other direction for me at the time:
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=01cf0ca850dd1c21e1c405a4493fe61d0c28d721)
> 
> I'm sending a new patch soon that fixes "make dist", as well.  Note that
> the directory overrides I mentioned are no longer required at install
> time either, as long as Makefile.in was generated from Makefile.am using
> automake-1.11.4 or newer (including 1.11.5, 1.12, and 1.12.1).  My
> system still has one of the older .11 releases.

I grabbed the current git version of Makefile.am and applied the patch 
with no errors.  autoreconf also works without error.

./configure --disable-systemd --with-usb-ids-path=no \
 --with-pci-ids-path=no

...

configure: error: Package requirements (glib-2.0 >= 2.22.0 gobject-2.0 
 >= 2.22.0) were not met:

./configure --disable-systemd --with-usb-ids-path=no
--with-pci-ids-path=no \
 GLIB_CFLAGS=-I/usr/include \
 GLIB_LIBS=-lglib --disable-keymap \
 --disable-logind --disable-gudev

seems to be needed.  make completes.

TODO:
The systemdirneeds to be specified.
/etc/systemd needs removed
/usr/lib/systemd needs removed
Not sure if we need to specify libexecdir or not
Rename /usr/share/doc/systemd?  to udev-18x?
Run the sed against the man pages.

Add persistent device support
Do we skip the keymap stuff?  We did install it in udev-182.  Without 
--disable-keymap, configure wants gperf.

I'm going to wait for -185 to do more.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-06-03 Thread Bryan Kadzban
DJ Lucas wrote:
> On 06/03/2012 02:03 PM, Bruce Dubbs wrote:
>> Bryan, I tried the patch you submitted to linux-hotplug yesterday:
>> 
>> systemd-make-systemd-optional.patch
>> 
>> It doesn't apply cleanly to either systemd-183 or -184.
> 
> It applies with offsets to git master...which hopefully soon will be
> -185.
> 
> git://anongit.freedesktop.org/systemd/systemd

Yup, since I was sending it upstream, I figured it'd be better to base
it off current git, instead of any particular release.  (And on Friday I
found that something went into git that caused the hunk failure you're
seeing, though it happened in the other direction for me at the time:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=01cf0ca850dd1c21e1c405a4493fe61d0c28d721)

I'm sending a new patch soon that fixes "make dist", as well.  Note that
the directory overrides I mentioned are no longer required at install
time either, as long as Makefile.in was generated from Makefile.am using
automake-1.11.4 or newer (including 1.11.5, 1.12, and 1.12.1).  My
system still has one of the older .11 releases.



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-06-03 Thread DJ Lucas
On 06/03/2012 02:03 PM, Bruce Dubbs wrote:
> Bryan, I tried the patch you submitted to linux-hotplug yesterday:
>
> systemd-make-systemd-optional.patch
>
> It doesn't apply cleanly to either systemd-183 or -184.
>
>
It applies with offsets to git master...which hopefully soon will be -185.

git://anongit.freedesktop.org/systemd/systemd

-- DJ





-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-06-03 Thread Bruce Dubbs
Bryan, I tried the patch you submitted to linux-hotplug yesterday:

systemd-make-systemd-optional.patch

It doesn't apply cleanly to either systemd-183 or -184.

   -- Bruce

patching file Makefile.am
Hunk #1 succeeded at 201 (offset -1 lines).
Hunk #2 succeeded at 448 (offset -1 lines).
Hunk #3 succeeded at 461 (offset -1 lines).
Hunk #4 FAILED at 520.
Hunk #5 succeeded at 595 (offset -10 lines).
Hunk #6 succeeded at 611 with fuzz 2 (offset -27 lines).
Hunk #7 succeeded at 644 (offset -19 lines).
Hunk #8 succeeded at 686 (offset -19 lines).
Hunk #9 succeeded at 705 (offset -19 lines).
Hunk #10 succeeded at 1349 (offset -22 lines).
Hunk #11 succeeded at 1439 (offset -22 lines).
Hunk #12 succeeded at 1471 (offset -22 lines).
Hunk #13 succeeded at 1494 (offset -22 lines).
Hunk #14 succeeded at 2019 (offset -22 lines).
Hunk #15 succeeded at 2965 with fuzz 1 (offset -44 lines).
Hunk #16 succeeded at 3096 (offset -44 lines).
Hunk #17 succeeded at 3306 (offset -44 lines).
1 out of 17 hunks FAILED -- saving rejects to file Makefile.am.rej

The only differneces between -183 and -184 were the offsets on hunks 15-17.

autoreconf gives:

$ autoreconf
Makefile.am:3358: error: unterminated conditionals: ENABLE_SYSTEMD_TRUE
automake: error: undefined condition 'TRUE' for 'RECURSIVE_TARGETS'
automake: RECURSIVE_TARGETS:
automake:   {
automake: ENABLE_SYSTEMD => {
automake:   type: +=
automake:   where: /usr/share/automake-1.12/am/texinfos.am:
automake:   comment:
automake:   value: dvi-recursive html-recursive info-recursive 
pdf-recursive ps-recursive \
automake:   install-dvi-recursive \
automake:   install-html-recursive \
automake:   install-info-recursive \
automake:   install-pdf-recursive \
automake:   install-ps-recursive all-recursive check-recursive 
installcheck-recursive
automake:   owner: Automake
automake: }
automake:   }
automake:
automake: Please contact .
  at /usr/share/automake-1.12/Automake/Channels.pm line 662.
 Automake::Channels::msg('automake', '', 'undefined condition 
\'TRUE\' for \'RECURSIVE_TARGETS\'\x{a}RECURS...') called at 
/usr/share/automake-1.12/Automake/ChannelDefs.pm line 212
 Automake::ChannelDefs::prog_error('undefined condition \'TRUE\' 
for \'RECURSIVE_TARGETS\'\x{a}RECURS...') called at 
/usr/share/automake-1.12/Automake/Item.pm line 95
 Automake::Item::rdef('Automake::Variable=HASH(0x2c21de0)', 
'Automake::Condition=HASH(0x2289bc0)') called at /usr/bin/automake line 3954
 Automake::handle_subdirs() called at /usr/bin/automake line 8128
 Automake::generate_makefile('Makefile.am', 'Makefile.in') 
called at /usr/bin/automake line 8416
 Automake::handle_makefile('Makefile.in') called at 
/usr/bin/automake line 8430
 Automake::handle_makefiles_serial() called at /usr/bin/automake 
line 8564
autoreconf: automake failed with exit status: 255
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bruce Dubbs
Bryan Kadzban wrote:
> Bruce Dubbs wrote:
>> You are not doing this in an LFS Chapter 6 type of environment.  I did 
>> this and immediately got:
> 
> Yeah, you're right, see my reply to Ken.  No system in the proper state
> to test that at the moment.  :-(
> 
>> Anouther problem is that src/shared/util.c is needed to build the udev 
>> programs but it needs to remove or comment out
>>   #include 
>> (line 53).
> 
> If none of the functions in util.c is called by anything in udev, then
> it may work to exclude src/shared/util.lo file from
> am_libsystemd_shared_la_OBJECTS, like I'm doing with libsystemd-label.la.

There are lots of functions used in that file:

startswith()
strappend()
split()
parse_env_file()
dirent_ensure_type()
...

lots more.  But it's not hard to write a sed to remove that capability line:

sed -i -e '/capability/d' src/shared/util.c

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bruce Dubbs
Bryan Kadzban wrote:
> Bruce Dubbs wrote:
>> Perhaps it's because I invested so much work in the last couple of days, 
>> but I am leaning towards static linking of udevd and udevadm.  At least 
>> the udev part.
> 
> ldd /usr/bin/Xorg
> linux-vdso.so.1 =>  (0x7fff4455c000)
> libudev.so.0 => /usr/lib64/libudev.so.0 (0x7f3046635000)
> 
> So statically installing libudev isn't, I think, going to fly.  At
> least, not for Xorg, which uses libudev to find input devices.  (The
> options were libudev, hal, and possibly dbus, and I don't have either
> hal or dbus.)
> 
> On the other hand, libudev.so.1 (as udev-183 creates) is *not* binary
> compatible with libudev.so.0 (as udev-180 installed).  ARG.  Now I'll
> have to rebuild X when doing this upgrade, or leave the old libudev
> hanging around for a while.
> 
> (Though you're right that neither udevadm nor udevd link against
> libudev.  But I think that makes sense in the case of udevd; libudev is
> the library used to talk to udevd, not the library that udevd itself
> would use.  Not sure what's up with udevadm though.)

I generally feel that I'm behind most of the other devs because I'm at 
GMT-5, but I think you are at GMT-7 so you may be at more of a disadvantage.

I implemented libudev.so.1 an hour or two ago.  :)

I did add the lib in /lib, which upstream doesn't do because they think 
it's too much bother to have separate /lib and /usr/lib.  I think they 
do this because they think everyone should have an initrmfs.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bryan Kadzban
Bruce Dubbs wrote:
> You are not doing this in an LFS Chapter 6 type of environment.  I did 
> this and immediately got:

Yeah, you're right, see my reply to Ken.  No system in the proper state
to test that at the moment.  :-(

> Anouther problem is that src/shared/util.c is needed to build the udev 
> programs but it needs to remove or comment out
>   #include 
> (line 53).

If none of the functions in util.c is called by anything in udev, then
it may work to exclude src/shared/util.lo file from
am_libsystemd_shared_la_OBJECTS, like I'm doing with libsystemd-label.la.




signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bryan Kadzban
Ken Moffat wrote:
>  My first thought was "I wonder how he's disabled the tests for
> intltool and XML::Parser?".  You're on a completed system.

Arg, you're right of course. (I don't have a chapter-6-level system
handy to use for testing, hence my comment earlier about missing some of
the required dependencies.) :-(

> 1. for intltool:
> 
> cat >/tools/bin/intltool-update << "EOF"
> #!/bin/sh
> # simulate intltool-update for systemd configure
> echo 0.40.0
> EOF
> chmod +x /tools/bin/intltool-update
> ln /tools/bin/intltool-{update,extract}
> ln /tools/bin/intltool-{update,merge}

Looks fine.  We can rip that out after installing udev, as well.

> 2. for XML::Parser, hack line 12566 of configure:
> 
> sed -i 's/"x" != "xno-xml"/"xno-xml" != "xno-xml"/' configure

That's ... well, that works, though it's slightly weird. (Less so than
the change above though, I think.)

Might also work to just rip out the IT_PROG_INTLTOOL line in
configure.ac and rerun autoconf? That generates both of these.

> 3. for gperf, build on the intltool hack:
> 
> ln /tools/bin/{intltool-update,gperf}

For gperf, it'd work to stuff "ac_cv_prog_GPERF=/bin/false" into a
config.cache file, and pass --cache=config.cache to configure. It checks
the cache before trying to find the program. As long as it's not set to
an empty string, the configure checks will be happy. :-)

(Though my system obviously has gperf too. :-/)

This might work the same way you're doing libcap, below; then we don't
need the cache file. (Though we do something similar to the cache file
for glibc -- or we used to, anyway. Not sure anymore.)

> 4. for libcap (libcap2 in debian/BLFS-speak):
> 
> 4.1 ac_cv_search_cap_init=yes
> 
>  I put that ahead of the DBUS_ variables, maybe after would look
> better.
> 
>  NB =no is treated as failing

Arg, there's no way to override ac_fn_c_try_link, or get its return from
cache. :-(

>  After configuring, remove the bogosity of CAP_LIBS = yes :
> 
> sed -i 's/\(CAP_LIBS = \)yes/\1/' Makefile

Or override CAP_LIBS="" when running make.



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bryan Kadzban
Bruce Dubbs wrote:
> Perhaps it's because I invested so much work in the last couple of days, 
> but I am leaning towards static linking of udevd and udevadm.  At least 
> the udev part.

ldd /usr/bin/Xorg
linux-vdso.so.1 =>  (0x7fff4455c000)
libudev.so.0 => /usr/lib64/libudev.so.0 (0x7f3046635000)

So statically installing libudev isn't, I think, going to fly.  At
least, not for Xorg, which uses libudev to find input devices.  (The
options were libudev, hal, and possibly dbus, and I don't have either
hal or dbus.)

On the other hand, libudev.so.1 (as udev-183 creates) is *not* binary
compatible with libudev.so.0 (as udev-180 installed).  ARG.  Now I'll
have to rebuild X when doing this upgrade, or leave the old libudev
hanging around for a while.

(Though you're right that neither udevadm nor udevd link against
libudev.  But I think that makes sense in the case of udevd; libudev is
the library used to talk to udevd, not the library that udevd itself
would use.  Not sure what's up with udevadm though.)




signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bruce Dubbs
Ken Moffat wrote:

> 
>  Obviously /lib64 because you are on multilib.  We'll use /lib, but
> I guess the shared lib needs to be accessible from /usr/lib.

We really don't want udev libraries on /usr.  They are used early in the 
boot process before (potentially) mounting /usr.

Perhaps it's because I invested so much work in the last couple of days, 
but I am leaning towards static linking of udevd and udevadm.  At least 
the udev part.

# ldd /sbin/udevadm
 linux-vdso.so.1 (0x7fff50bff000)
 libblkid.so.1   => /lib/libblkid.so.1   (0x7f33d72dc000)
 libkmod.so.2=> /lib64/libkmod.so.2  (0x7f33d70c8000)
 librt.so.1  => /lib/librt.so.1  (0x7f33d7502000)
 libpthread.so.0 => /lib/libpthread.so.0 (0x7f33d686e000)
 libc.so.6   => /lib/libc.so.6   (0x7f33d64ca000)
 libuuid.so.1=> /lib/libuuid.so.1(0x7f33d6cad000)
 liblzma.so.5=> /lib64/liblzma.so.5  (0x7f33d6a8b000)
 libz.so.1   => /lib/libz.so.1   (0x7f33d6eb1000)
 libdl.so.2  => /lib/libdl.so.2  (0x7f33d770a000)
 /lib64/ld-linux-x86-64.so.2 (0x7f33d790e000)

When I look at udev-182, it appears that the programs are statically 
linked too.  The only difference is that -182 doesn't have  libdl.so.2.
That's a mistake in my script since it links fine without it.

Investigating some more, the none of the udev programs need libz, libdl, 
liblzma, or libuuid however,

libuuid.so.1 needed by libblkid.so
liblzma.so.5 needed by libkmod.so
libz.so.1needed by libkmod.so

These don't need to be specified in the link line, but are pulled in 
automatically.

What this all means is that there is no need to install any udev 
libraries or .h files or supporting .pc, .la, .lo etc files.

   -- Bruce


   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Ken Moffat
On Wed, May 30, 2012 at 11:48:22AM -0500, Bruce Dubbs wrote:
> 
> You are not doing this in an LFS Chapter 6 type of environment.  I did 
> this and immediately got:
> 
> ./configure: line 12067: intltool-update: command not found
> checking for intltool >= 0.40.0...  found
> configure: error: Your intltool is too old.  You need intltool 0.40.0 or 
> later.
> 
> Looking at configure, I don't see a way around this without installing 
> intltool or hacking configure.
> 
> Anouther problem is that src/shared/util.c is needed to build the udev 
> programs but it needs to remove or comment out
>   #include 
> (line 53).
> 
>-- Bruce
 Please see my posts from earlier this afternoon - I've sorted those,
albeit messily.

 What I forgot to try when I still had the build dir was 'make
check'.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Bruce Dubbs
Bryan Kadzban wrote:
> Bryan Kadzban wrote:
>> Upgrading kmod now; will see what I hit next.  This might just work; 
>> let's see.  :-)
> 
> Got it to compile all the binaries (I think) we need, by removing a
> couple of totally unnecessary dependencies from libsystemd-label.  :-)
> 
> Reformatting ./configure so the flags look closer to the book:
> 
> 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=

You are not doing this in an LFS Chapter 6 type of environment.  I did 
this and immediately got:

./configure: line 12067: intltool-update: command not found
checking for intltool >= 0.40.0...  found
configure: error: Your intltool is too old.  You need intltool 0.40.0 or 
later.

Looking at configure, I don't see a way around this without installing 
intltool or hacking configure.

Anouther problem is that src/shared/util.c is needed to build the udev 
programs but it needs to remove or comment out
  #include 
(line 53).

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Ken Moffat
On Tue, May 29, 2012 at 11:24:39PM -0700, Bryan Kadzban wrote:
> 
> 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.
> 
 I got the following:
root@ac4tv /home/ken #find /mnt/lfs/tmp/udev-test/ -type f
/mnt/lfs/tmp/udev-test/lib/udev/ata_id
/mnt/lfs/tmp/udev-test/lib/udev/v4l_id
/mnt/lfs/tmp/udev-test/lib/udev/scsi_id
/mnt/lfs/tmp/udev-test/lib/udev/collect
/mnt/lfs/tmp/udev-test/lib/udev/systemd-udevd
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/99-systemd.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-persistent-alsa.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/50-udev-default.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/42-usb-hid-pm.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-persistent-storage-tape.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-persistent-v4l.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/75-tty-description.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/75-probe_mtd.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/95-udev-late.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/80-drivers.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-persistent-serial.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/61-accelerometer.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-persistent-storage.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-persistent-input.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/60-cdrom_id.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/70-uaccess.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/75-net-description.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/71-seat.rules
/mnt/lfs/tmp/udev-test/lib/udev/rules.d/78-sound-card.rules
/mnt/lfs/tmp/udev-test/lib/udev/accelerometer
/mnt/lfs/tmp/udev-test/lib/udev/mtd_probe
/mnt/lfs/tmp/udev-test/lib/udev/cdrom_id
/mnt/lfs/tmp/udev-test/usr/share/man/man8/systemd-udevd.8
/mnt/lfs/tmp/udev-test/usr/share/man/man8/udevadm.8
/mnt/lfs/tmp/udev-test/usr/share/man/man7/udev.7
/mnt/lfs/tmp/udev-test/sbin/udevadm
/mnt/lfs/tmp/udev-test/lib64/libudev.la
/mnt/lfs/tmp/udev-test/lib64/libudev.a
/mnt/lfs/tmp/udev-test/lib64/libudev.so.1.0.0
 Also libudev.so.1 and libudev.so

 Obviously /lib64 because you are on multilib.  We'll use /lib, but
I guess the shared lib needs to be accessible from /usr/lib.

 I'm missing /etc/udev/udev.conf [ probably unnecessary, but is in
src/udev/udev.conf, can be installed by install-dist_udevconfDATA
and creates the directory for 55-lfs.rules ]

 and the two pkgconfig files.

udev.pc can be built and installed by install-sharepkgconfigDATA but
it ought to be fixed to not point to /lib/systemd for udevdir.
Upstream fixed that earlier this week:

diff --git a/src/udev/udev.pc.in b/src/udev/udev.pc.in
index 0b04c02..a0c2e82 100644
--- a/src/udev/udev.pc.in
+++ b/src/udev/udev.pc.in
@@ -2,4 +2,4 @@ Name: udev
Description: udev
Version: @VERSION@
-udevdir=@pkglibexecdir@
+udevdir=@udevlibexecdir@

 So we can sed or patch that.

libudev.pc only gets created and installed with a load of
systemd*.pc files, in install-pkgconfiglibDATA.  Among our options
are to sed all the fields in the .pc.in, and to install the
pkgconfiglib pc files and then remove all the others.

 Renaming systemd-udevd will make it visible to the current
bootscript.

 I think elsewhere there was a decision to do without
99-systemd.rules.

 Certainly, with this approach there is no obvious reason to use a
staging DESTDIR.  I'm impressed with your grasp of libtool.

 Now, I need to get started on some baking, and later I'll try
Bruce's version, with xorg and my own custom rules, if it gets that
far.  Will come back to this, I've got a backup.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-30 Thread Ken Moffat
On Tue, May 29, 2012 at 10:32:29PM -0700, Bryan Kadzban wrote:
> Bryan Kadzban wrote:
> > Upgrading kmod now; will see what I hit next.  This might just work; 
> > let's see.  :-)
> 
> Got it to compile all the binaries (I think) we need, by removing a
> couple of totally unnecessary dependencies from libsystemd-label.  :-)
> 
> Reformatting ./configure so the flags look closer to the book:
> 
> 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=
> 
 My first thought was "I wonder how he's disabled the tests for
intltool and XML::Parser?".  You're on a completed system.

 I'll repeat what I did yesterday to get it to configure:

1. for intltool:

cat >/tools/bin/intltool-update << "EOF"
#!/bin/sh
# simulate intltool-update for systemd configure
echo 0.40.0
EOF
chmod +x /tools/bin/intltool-update
ln /tools/bin/intltool-{update,extract}
ln /tools/bin/intltool-{update,merge}

2. for XML::Parser, hack line 12566 of configure:

sed -i 's/"x" != "xno-xml"/"xno-xml" != "xno-xml"/' configure

(at this stage I'm trying to be straightforward and clear in the
sed)

3. for gperf, build on the intltool hack:

ln /tools/bin/{intltool-update,gperf}

4. for libcap (libcap2 in debian/BLFS-speak):

4.1 ac_cv_search_cap_init=yes

 I put that ahead of the DBUS_ variables, maybe after would look
better.

 NB =no is treated as failing

4.2 touch /usr/include/sys/capability.h

 Will obviously need to remove that after the build - yesterday it
was included by something so I'm keeping it around for the moment.

 At this point it configures.

 After configuring, remove the bogosity of CAP_LIBS = yes :

sed -i 's/\(CAP_LIBS = \)yes/\1/' Makefile

 At this point I'll take a look at your changes to build, and do a
DESTDIR.  Then I'll have a play with Bruce's version.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Bryan Kadzban
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.



signature.asc
Descript

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

2012-05-29 Thread Bryan Kadzban
Bryan Kadzban wrote:
> Upgrading kmod now; will see what I hit next.  This might just work; 
> let's see.  :-)

Got it to compile all the binaries (I think) we need, by removing a
couple of totally unnecessary dependencies from libsystemd-label.  :-)

Reformatting ./configure so the flags look closer to the book:

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.



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Bryan Kadzban
Bryan Kadzban wrote:
> Bryan Kadzban wrote:
>> Let me see if I can hack anything up.
> 
> Still poking.

OK (now that I'm replying to myself here :-) ), I think I have something
that's looking promising.  This makes it all the way through configure,
and part of the way through "make udevd", without issues:

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=

This works with no pkg-config binary in place at all (so it's definitely
not getting any data from there).  The --with-dbus* flags are to prevent
the last few calls to pkg-config on dbus-1.  Most of the other flags are
copied from udev-182.

However, I have not been able to make it "make udevd" yet, because I
still have libkmod-4 installed, not 5.  ("make libudev.la" and "make
libudev-private.la" work correctly, at least inasmuch as they compile
the minimal systemd infrastructure stuff to get a libtool archive.)

Upgrading kmod now; will see what I hit next.  This might just work;
let's see.  :-)



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Bryan Kadzban
Bryan Kadzban wrote:
> Bruce Dubbs wrote:
>> I came up with one problem that I need advice on.  I can't build the
>> keymap program becasue I'm missing keys-from-name.h and
>> keys-to-name.h. The systemd configure/make command generates them
>> using gperf.  In udev-182, there are over 70 entries in
>> src/keymap/keymaps.  This seems to indicate to me that systemd only
>> generates the keymap for the current system.
>>
>> I'm not even sure waht keymap does in this context and I don't know
>> if it's needed or not.
> 
> The keymap builtin (or script?) stuff changes the keymap on keyboards at
> hotplug time (e.g. USB keyboards that are connected to a hub in the
> monitor will need this whenever the monitor is turned off and back on
> again, unless you use the standard Linux kernel US keymap).
> 
> gperf is generating a hashtable from the configuration in the keymaps
> file.  I suspect that file will change with the next release, meaning
> patching in a generated pair of header files is only good for now.  :-/

...Although on udev-182, we do a --disable-keymap, so maybe we should
just turn it off instead of trying to get it to compile?  :-)

> Let me see if I can hack anything up.

Still poking.



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Bryan Kadzban
Bruce Dubbs wrote:
> I came up with one problem that I need advice on.  I can't build the
> keymap program becasue I'm missing keys-from-name.h and
> keys-to-name.h. The systemd configure/make command generates them
> using gperf.  In udev-182, there are over 70 entries in
> src/keymap/keymaps.  This seems to indicate to me that systemd only
> generates the keymap for the current system.
> 
> I'm not even sure waht keymap does in this context and I don't know
> if it's needed or not.

The keymap builtin (or script?) stuff changes the keymap on keyboards at
hotplug time (e.g. USB keyboards that are connected to a hub in the
monitor will need this whenever the monitor is turned off and back on
again, unless you use the standard Linux kernel US keymap).

gperf is generating a hashtable from the configuration in the keymaps
file.  I suspect that file will change with the next release, meaning
patching in a generated pair of header files is only good for now.  :-/

Let me see if I can hack anything up.  It might involve rerunning
autoconf and automake (after ripping out junk from the source files), or
it might involve faking out configure (by creating a broken
config.cache) and going the way Ken was looking (using the Makefile
infrastructure).  But I think either of those should work; we have all
the auto* stuff installed by the time we hit udev in chapter 6.



signature.asc
Description: OpenPGP digital signature
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Bruce Dubbs
Bruce Dubbs wrote:

> I still need to create install.sh

This is what I came up with:
---
cd build

SBIN=/sbin
UDEVLIBEXECDIR=/lib/udev

cp -v udevadm $SBIN

mkdir -p $UDEVLIBEXECDIR/{rules.d,devices/pts}
mknod -m 0666 $UDEVLIBEXECDIR/devices/null c 1 3

cp -v udevd accelerometer scsi_id ata_id cdrom_id \
   v4l_id mtd_probe collect $UDEVLIBEXECDIR

# None of these programs need any udev libraries,
# so we don't install any

cp -v rules/*.rules src/login/*.rules $UDEVLIBEXECDIR/rules.d

sed -i -e "s,systemd.*-,,gi" man/udev.7 man/*udev*.8

cp -v man/udev.7   /usr/share/man/man7
cp -v man/*udev*.8 /usr/share/man/man8

---

In the make script I have  -DUDEVLIBEXECDIR="/usr/libexec/udev"
but that needs to be changed to /lib/udev.

I came up with one problem that I need advice on.  I can't build the 
keymap program becasue I'm missing keys-from-name.h and keys-to-name.h. 
  The systemd configure/make command generates them using gperf.  In 
udev-182, there are over 70 entries in src/keymap/keymaps.  This seems 
to indicate to me that systemd only generates the keymap for the current 
system.

I'm not even sure waht keymap does in this context and I don't know if 
it's needed or not.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Bruce Dubbs
OK, I've been able to build udev from the systemd sources in the LFS 
Chapter 6 environment.  Here is the procedure:


1.  Place make.sh and cfg.h in the top level systemd directory

2.  Comment out an unneeded header that we don't have
sed -i -e 's#^.*capability.h#//&#'  src/shared/util.c

3.  Run 'sh make.sh'.  On my system it takes 9 seconds vs the systemd 
time of about 60 seconds.


The executables will be in the build directory.
I still need to create install.sh

Eventually, we can cut the book's instructions down to:

patch -Np1 -i ../systemd-183-udev_only-1.patch
sh make.sh
sh install.sh



I also need to do testing, but it's looking OK for now.

Let me know if you can see some ways to improve the script.

   -- Bruce
/* Define to 1 if you have the  header file. */
#define HAVE_DLFCN_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the  header file. */
#define HAVE_UNISTD_H 1

/* Define if XZ is available */
#define HAVE_XZ 1

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Enable GNU extensions on systems that have them.  */
#define _GNU_SOURCE 1

/* Version number of package */
#define VERSION "183"



make.sh
Description: Bourne shell script
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-29 Thread Ken Moffat
On Tue, May 29, 2012 at 12:55:36AM -0500, Bruce Dubbs wrote:
> 
> The script I built to compile and link the programs is fairly long (and 
> ugly to my taste), but also pretty straight forward.  I haven't tested 
> the programs yet, but the build is clean.
> 
> If we have to, we can create a 'patch' to add the script to the source 
> and create the executables with that.  I wouldn't bother trying to 
> create libraries for LFS.  I don't know of anything that would want to 
> link against them except the current udev files.  Each executable is 
> about 200K so the overhead isn't too bad.
> 
 I'm trying a different approach at the moment (hack 'configure'
enough to complete, then see if I can use existing Makefile targets
to do most of the heavy lifting).  So far I've only got through the
trivial part (intltool, XML::Parser, gperf) - changed one line in
configure, created a script at /tools/bin/intltool-update to report
0.40.0, linked that also as intltool-extract, intltool-merge, gperf.

 Now I'm on to the *fun* parts (libcap, dbus) which I think will
require some more substantial changes to configure - don't hold your
breathe waiting!

 Partly I'm doing this to ensure all the important -D defines in the
Makefile get set correctly so that udevd will find the other progs,
and partly to rely on the existing infrastructure.  I'm also hoping
this approach will be more-easily maintainable (if it works).

 But meanwhile, good luck with your testing.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-28 Thread Bruce Dubbs
I've been able to build udevadm, udevd, and accelerometer in the new 
distribution.  I had to build each file separately and come up with the 
link scripts, but none of the spurious packages are needed.  I'll check 
the other libexec programs tomorrow.

Optimally we need to get upstream to split their libraries so that the 
files that don't need all the extra packages are in a separate 
directory.  These are the files needed:

src/libudev/libudev-list.o
src/libudev/libudev-queue-private.o
src/libudev/libudev-util.o
src/libudev/libudev-monitor.o
src/libudev/libudev.o
src/libudev/libudev-device.o
src/libudev/libudev-device-private.o
src/libudev/libudev-queue.o
src/libudev/libudev-enumerate.o

src/shared/util.o
src/shared/log.o
src/shared/dev-setup.o
src/shared/label.o
src/shared/cgroup-util.o
src/shared/strv.o
src/shared/path-util.o
src/shared/hashmap.o
src/shared/set.o
src/shared/conf-files.o
src/shared/exit-status.o
src/shared/mkdir.o

src/login/sd-login.o
src/libsystemd-daemon/sd-daemon.o

The script I built to compile and link the programs is fairly long (and 
ugly to my taste), but also pretty straight forward.  I haven't tested 
the programs yet, but the build is clean.

If we have to, we can create a 'patch' to add the script to the source 
and create the executables with that.  I wouldn't bother trying to 
create libraries for LFS.  I don't know of anything that would want to 
link against them except the current udev files.  Each executable is 
about 200K so the overhead isn't too bad.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-28 Thread Ken Moffat
On Mon, May 28, 2012 at 07:27:18PM -0500, Bruce Dubbs wrote:
> 
> Well there is also:
> 
> sed -i -e "s,systemd.*-,,gi" man/udev.7 man/*udev*.8
>^ ^^
> :)
> 

 Yes, much nicer :)

> And of course after installation:
> 
> pushd /usr/share/man/man8
> mv -v systemd-udevd.8 udevd.8
> popd
> 
> Or we could do a manual installation and get it with:
> 
> cp -v /man/systemd-udevd.8 /usr/share/man/man8/udevd.8
> 

 Of course.  For anyone playing along at home, don't rename the page
before trying to build.  I suppose that might change if you replace
configure.  For instaling, whichever variant fits better with what
we end up doing.

> Might want to dow the same with man/*.html too.
> 
>-- Bruce
 For a minimal build with your switches and my additionss as in the
ticket, it didn't get installed.  I suppose that BLFS might wish to
do that.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


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

2012-05-28 Thread Bruce Dubbs
LFS Trac wrote:

> Comment(by ken@…):
> 
>  For the man pages (without renaming until after the build/install), the
>  slackware sed isn't enough to catch the systemd\- items in the text, nor
>  the SYSTEMD\- header on systemd-udevd.8. The following sed fixes all of
>  this, and (applied before configure) doesn't break the build.
> 
>  {{{
>  sed -i -e "s,systemd.*-,,g" \
>  -i -e "s,SYSTEMD.*-,,g" man/udev.7 man/udevadm.8 man/systemd-udevd.8
>  }}}
> 

Well there is also:

sed -i -e "s,systemd.*-,,gi" man/udev.7 man/*udev*.8
   ^ ^^
:)

And of course after installation:

pushd /usr/share/man/man8
mv -v systemd-udevd.8 udevd.8
popd

Or we could do a manual installation and get it with:

cp -v /man/systemd-udevd.8 /usr/share/man/man8/udevd.8

Might want to dow the same with man/*.html too.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page