Okay, here (attached) are the revised patches, incorporating improvements/suggestions from Mike.

nss-avahi-dbus-libdaemon.patch is the unified patch against the CVS tree for changes to existing files

avahi.spec is a new file to be placed in ltib/dist/lfs-5.1/avahi

skell-1.19-avahi-dbus.patch is a new file to be placed in the package pool

New/updated tarballs needing to be added to the package pool available here:

  http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.10.tar.gz
  http://avahi.org/download/avahi-0.6.30.tar.gz
  http://dbus.freedesktop.org/releases/dbus/dbus-1.4.16.tar.gz
  http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.14.tar.gz

Index: ltib
===================================================================
RCS file: /sources/ltib/ltib/ltib,v
retrieving revision 1.78
diff -u -a -r1.78 ltib
--- ltib	29 Nov 2011 07:43:55 -0000	1.78
+++ ltib	12 Feb 2012 21:09:28 -0000
@@ -262,8 +262,9 @@
            PKG_BASH     => [ qw/PKG_BASH_WANT_NO_SH_SYMLINK/  ],
            PKG_DHCP     => [ qw/PKG_DHCP_WANT_SERVER PKG_DHCP_WANT_CLIENT/ ],
            PKG_PPP      => [ qw/PKG_PPP_WANT_FILTER/ ],
-           PKG_SKELL    => [ qw/PKG_SKELL_WANT_TERMINFO/ ],
+           PKG_SKELL    => [ qw/PKG_SKELL_WANT_TERMINFO PKG_NSS_MDNS/ ],
+           PKG_DBUS     => [ qw/PKG_AVAHI/ ],
            PKG_CAIRO    => [ qw/PKG_XORG_SERVER/ ],
            PKG_BOOST    => [ qw/PKG_BOOST_WANT_HEADER_ONLY/ ],
                };
 
@@ -1570,6 +1571,7 @@
     $ENV{LTIB_BATCH}      = $cf->{batch} || "";
     $ENV{PKG_BUSYBOX}    = $pcf->{PKG_BUSYBOX} || "";
     $ENV{PKG_SYSVINIT}    = $pcf->{PKG_SYSVINIT} || "";
+    $ENV{PKG_NSS_MDNS}    = $pcf->{PKG_NSS_MDNS} || "";
     $ENV{INITTAB_LINE}    = $pcf->{INITTAB_LINE} || "";
     $ENV{SOFT_FP_ARCH} = $pcf->{SOFT_FP_ARCH} || "";
     $ENV{GLIBC_WANT_KERNEL_HEADERS} = $pcf->{GLIBC_WANT_KERNEL_HEADERS} || "";
Index: config/userspace/packages.lkc
===================================================================
RCS file: /sources/ltib/ltib/config/userspace/packages.lkc,v
retrieving revision 1.45
diff -u -a -r1.45 packages.lkc
--- config/userspace/packages.lkc	31 Oct 2011 20:34:42 -0000	1.45
+++ config/userspace/packages.lkc	12 Feb 2012 21:09:28 -0000
@@ -5,6 +5,24 @@
 -source packages.lkc
 
 comment 'Common package selection list'
+config PKG_ALSA_LIB
+    bool "alsa-lib"
+    help
+       The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
+       functionality to the Linux operating system.  The alsa-lib user-space
+       library simplifies application programming and provides a higher level
+       of audio functionality compared to OSS.
+
+config PKG_ALSA_UTILS
+    select PKG_ALSA_LIB
+    select PKG_NCURSES
+    bool "alsa-utils"
+    help
+       This package contains the command line utilities for the ALSA project.
+       The package can be compiled only with the installed ALSA driver and
+       the ALSA C library.  Utilities include: alsaconf, alsactl, aplay/arecord,
+       amixer, alsamixer, amidi, and iecset.
+
 config PKG_APPTRK
     depends LINTARCH != arm
     bool "Apptrk"
@@ -86,23 +104,17 @@
 
        This fails on debian as autoconf is not on the host
 
-config PKG_ALSA_LIB
-    bool "alsa-lib"
-    help
-       The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
-       functionality to the Linux operating system.  The alsa-lib user-space
-       library simplifies application programming and provides a higher level
-       of audio functionality compared to OSS.
-
-config PKG_ALSA_UTILS
-    select PKG_ALSA_LIB
-    select PKG_NCURSES
-    bool "alsa-utils"
-    help
-       This package contains the command line utilities for the ALSA project.
-       The package can be compiled only with the installed ALSA driver and
-       the ALSA C library.  Utilities include: alsaconf, alsactl, aplay/arecord,
-       amixer, alsamixer, amidi, and iecset.
+config PKG_AVAHI
+    select PKG_DBUS
+    select PKG_EXPAT
+    select PKG_LIBDAEMON
+    bool "Avahi"
+    help 
+       Avahi is a system which facilitates service discovery on a local
+       network via the mDNS/DNS-SD protocol suite. This enables you to plug
+       your laptop or computer into a network and instantly be able to view
+       other people who you can chat with, find printers to print to or find
+       files being shared. Compatible technology is found in Apple MacOS X
+       (branded Bonjour and sometimes Zeroconf).
 
 config PKG_BASH
     depends CAP_HAS_MMU
@@ -1957,13 +1969,15 @@
 
 config PKG_NSS_MDNS
     depends CAP_HAS_MMU
+    select PKG_AVAHI
     bool "nss-mdns"
     help
        nss-mdns is a plugin for the GNU Name Service Switch (NSS)
        functionality of the GNU C Library (glibc) providing host name
        resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous,
-       aka Apple Bonjour), effectively allowing name resolution by common
-       Unix/Linux programs in the ad-hoc mDNS domain .local.
+       aka Apple Bonjour, aka Avahi), effectively allowing name resolution
+       by common Unix/Linux programs in the ad-hoc mDNS domain .local.
+       Depends on kernel IP multicasting support, which must be enabled.
 
 config PKG_NTPCLIENT
     bool "ntpclient"
Index: config/userspace/pkg_map
===================================================================
RCS file: /sources/ltib/ltib/config/userspace/pkg_map,v
retrieving revision 1.30
diff -u -a -r1.30 pkg_map
--- config/userspace/pkg_map	28 Nov 2011 17:41:02 -0000	1.30
+++ config/userspace/pkg_map	12 Feb 2012 21:09:28 -0000
@@ -29,7 +29,6 @@
 PKG_SASH                         = sash
 PKG_COREUTILS                    = coreutils
 PKG_SEQ                          = seq
-PKG_DBUS                         = dbus
 PKG_ZLIB                         = zlib
 PKG_LFS_UTILS                    = lfs-utils
 PKG_FINDUTILS                    = findutils
@@ -112,6 +111,9 @@
 PKG_WHICH                        = which
 PKG_FAKEROOT                     = fakeroot
 PKG_EXPAT                        = expat
+PKG_LIBDAEMON                    = libdaemon 
+PKG_DBUS                         = dbus
+PKG_AVAHI                        = avahi
 PKG_GDB                          = gdb
 PKG_GDB_BDM                      = m68k-gdb-bdm
 PKG_STRACE                       = strace
@@ -301,7 +303,6 @@
 PKG_LIBOGG                       = libogg
 PKG_LIBVORBIS                    = libvorbis
 PKG_LIBTHEORA                    = libtheora
-PKG_LIBDAEMON                    = libdaemon 
 PKG_LIBXML_PLUS_PLUS             = libxml++
 PKG_JSON_C                       = json-c
 PKG_DBG                          = dbg
Index: config/userspace/sysconfig.lkc
===================================================================
RCS file: /sources/ltib/ltib/config/userspace/sysconfig.lkc,v
retrieving revision 1.2
diff -u -a -r1.2 sysconfig.lkc
--- config/userspace/sysconfig.lkc	12 Dec 2008 17:11:31 -0000	1.2
+++ config/userspace/sysconfig.lkc	12 Feb 2012 21:09:28 -0000
@@ -214,4 +214,21 @@
       The config file pango.modules must be created on the target.
 endif
 
+config SYSCFG_START_DBUS
+    depends PKG_DBUS
+    bool "start D-Bus system bus daemon"
+    default y
+    help
+        Starts the global D-Bus system bus instance.  This is used by Avahi
+        for communication between Avahi clients and the Avahi daemon, among
+        other things.
+
+config SYSCFG_START_AVAHI
+    depends PKG_AVAHI
+    bool "start Avahi daemon"
+    select SYSCFG_START_DBUS
+    default y
+    help
+        Starts the Avahi mDNS daemon.
+
 endmenu
Index: dist/lfs-5.1/dbus/dbus.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/dbus/dbus.spec,v
retrieving revision 1.1
diff -u -a -r1.1 dbus.spec
--- dist/lfs-5.1/dbus/dbus.spec	5 Jun 2009 10:49:18 -0000	1.1
+++ dist/lfs-5.1/dbus/dbus.spec	12 Feb 2012 21:09:28 -0000
@@ -2,8 +2,8 @@
 
 Summary         : Message bus system for applications to talk to one another
 Name            : dbus
-Version         : 1.2.6
-Release         : 1
+Version         : 1.4.16
+Release         : 2
 License         : AFLv2.1 or GPLv2
 Vendor          : Free Desktop
 Packager        : Thierry Pierret/Stuart Hughes/Tarek Allaoua
@@ -22,7 +22,7 @@
 %Build
 # Note --with-xml could also specify libxml
 config_opts='ac_cv_have_abstract_sockets=yes'
-extra_opts='--with-xml=expat --without-x --enable-tests=no --enable-selinux=no'
+extra_opts='--with-xml=expat --without-x --enable-tests=no --enable-selinux=no --localstatedir=/var --disable-xml-docs --disable-doxygen-docs'
 
 eval $config_opts \
 ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
@@ -35,6 +35,7 @@
 %Install
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
+find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/ -name "*.la" | xargs rm -f
 
 %Clean
 rm -rf $RPM_BUILD_ROOT
Index: dist/lfs-5.1/libdaemon/libdaemon.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/libdaemon/libdaemon.spec,v
retrieving revision 1.1
diff -u -a -r1.1 libdaemon.spec
--- dist/lfs-5.1/libdaemon/libdaemon.spec	6 Jul 2009 10:33:28 -0000	1.1
+++ dist/lfs-5.1/libdaemon/libdaemon.spec	12 Feb 2012 21:09:28 -0000
@@ -2,8 +2,8 @@
 
 Summary         : Lightweight C library that eases the writing of UNIX daemons.
 Name            : libdaemon
-Version         : 0.13
-Release         : 1
+Version         : 0.14
+Release         : 2
 License         : LGPL
 Vendor          : ltib.org
 Packager        : Mike Goins
@@ -27,6 +27,7 @@
 %Install
 rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
+find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/ -name "*.la" | xargs rm -f
 
 %Clean
 rm -rf $RPM_BUILD_ROOT
Index: dist/lfs-5.1/nss-mdns/nss-mdns.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/nss-mdns/nss-mdns.spec,v
retrieving revision 1.1.1.1
diff -u -a -r1.1.1.1 nss-mdns.spec
--- dist/lfs-5.1/nss-mdns/nss-mdns.spec	6 Nov 2007 15:44:42 -0000	1.1.1.1
+++ dist/lfs-5.1/nss-mdns/nss-mdns.spec	12 Feb 2012 21:09:28 -0000
@@ -2,8 +2,8 @@
 
 Summary         : plugin for the GNU Name Service Switch providing host name resolution via Multicast DNS
 Name            : nss-mdns
-Version         : 0.8
-Release         : 1
+Version         : 0.10
+Release         : 2
 License         : LGPL
 Vendor          : Freescale
 Packager        : Alan Tull
@@ -27,6 +27,7 @@
 rm -rf $RPM_BUILD_ROOT
 #make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
 make install prefix=$RPM_BUILD_ROOT/%{pfx}/%{_prefix}
+find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/ -name "*.la" | xargs rm -f
 
 %Clean
 rm -rf $RPM_BUILD_ROOT
@@ -34,5 +35,3 @@
 %Files
 %defattr(-,root,root)
 %{pfx}/*
-
-
Index: dist/lfs-5.1/skell/skell.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/skell/skell.spec,v
retrieving revision 1.4
diff -u -a -r1.4 skell.spec
--- dist/lfs-5.1/skell/skell.spec	20 Nov 2009 19:12:16 -0000	1.4
+++ dist/lfs-5.1/skell/skell.spec	12 Feb 2012 21:09:28 -0000
@@ -3,13 +3,14 @@
 Summary         : Skelleton files for an embedded root filesystem
 Name            : skell
 Version         : 1.19
-Release         : 1
+Release         : 2
 License         : GPL
 Vendor          : Freescale
 Packager        : Steve Papacharalambous/Stuart Hughes
 Group           : System Environment/Utilities
 Source          : %{name}-%{version}.tar.gz
 Patch1          : skell-1.19-ipautoconf.patch
+Patch2          : skell-1.19-avahi-dbus.patch
 BuildRoot       : %{_tmppath}/%{name}
 Prefix          : %{pfx}
 
@@ -19,6 +20,7 @@
 %Prep
 %setup
 %patch1 -p1
+%patch2 -p1
 
 %Build
 
@@ -29,6 +31,10 @@
 then
     rm -rf $RPM_BUILD_ROOT/%{pfx}/usr/share/terminfo
 fi
+if [ "$PKG_NSS_MDNS" = "y" ]
+then
+    sed -i 's/hosts:.*/hosts:      files mdns4_minimal [NOTFOUND=return] dns mdns4/' $RPM_BUILD_ROOT/%{pfx}/etc/nsswitch.conf
+fi
 
 %Clean
 rm -rf $RPM_BUILD_ROOT
Index: dist/lfs-5.1/sysconfig/sysconfig.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/sysconfig/sysconfig.spec,v
retrieving revision 1.7
diff -u -a -r1.7 sysconfig.spec
--- dist/lfs-5.1/sysconfig/sysconfig.spec	18 Mar 2009 18:20:35 -0000	1.7
+++ dist/lfs-5.1/sysconfig/sysconfig.spec	12 Feb 2012 21:09:28 -0000
@@ -91,14 +91,22 @@
 then
 	pango=pango
 fi
+if [ "$SYSCFG_START_DBUS" = "y" ]
+then
+	dbus=dbus
+fi
+if [ "$SYSCFG_START_AVAHI" = "y" ]
+then
+	avahi=avahi
+fi
 
 cat <<EOF > $RPM_BUILD_ROOT/%{pfx}/etc/rc.d/rc.conf
-all_services="mount-proc-sys mdev udev hostname devfsd depmod modules filesystems syslog network inetd portmap dropbear sshd boa smb dhcpd settime qtopia watchdog gtk2 pango"
-all_services_r="pango gtk2 watchdog qtopia settime dhcpd smb boa sshd dropbear portmap inetd network syslog filesystems modules depmod devfsd hostname udev mdev mount-proc-sys"
+all_services="mount-proc-sys mdev udev hostname devfsd depmod modules filesystems syslog network inetd portmap dropbear sshd boa smb dhcpd settime qtopia watchdog gtk2 pango dbus avahi"
+all_services_r="avahi dbus pango gtk2 watchdog qtopia settime dhcpd smb boa sshd dropbear portmap inetd network syslog filesystems modules depmod devfsd hostname udev mdev mount-proc-sys"
 
-cfg_services="mount-proc-sys $mdev $udev hostname $devfsd depmod modules filesystems $syslog $network $inetd $portmap $dropbear $sshd $boa $smb $dhcpd $settime $qtopia $watchdog $gtk2 $pango"
+cfg_services="mount-proc-sys $mdev $udev hostname $devfsd depmod modules filesystems $syslog $network $inetd $portmap $dropbear $sshd $boa $smb $dhcpd $settime $qtopia $watchdog $gtk2 $pango $dbus $avahi"
 
-cfg_services_r="$pango $gtk2 $watchdog $qtopia $settime $dhcpd $smb $boa $sshd $dropbear $portmap $inetd $network $syslog filesystems modules depmod $devfsd hostname $udev $mdev mount-proc-sys"
+cfg_services_r="$avahi $dbus $pango $gtk2 $watchdog $qtopia $settime $dhcpd $smb $boa $sshd $dropbear $portmap $inetd $network $syslog filesystems modules depmod $devfsd hostname $udev $mdev mount-proc-sys"
 
 export HOSTNAME="${SYSCFG_HOSTNAME:-$PLATFORM}"
 export NTP_SERVER="$SYSCFG_NTP_SERVER"
%define pfx /opt/freescale/rootfs/%{_target_cpu}

Summary         : Avahi mDNS/DNS-SD service discovery suite
Name            : avahi
Version         : 0.6.30
Release         : 1
License         : LGPL
Vendor          : Avid Technology
Packager        : Fritz Mueller
Group           : xxxx
URL             : http://avahi.org
Source          : %{name}-%{version}.tar.gz
BuildRoot       : %{_tmppath}/%{name}
Prefix          : %{pfx}

%Description
%{summary}

%Prep
%setup 

%Build
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} --with-distro=debian --disable-nls --disable-glib --disable-gobject --disable-qt3 --disable-qt4 --disable-gtk --disable-gtk3 --disable-gdbm --disable-mono --disable-monodoc --disable-autoipd --disable-python --disable-doxygen-doc --disable-manpages --enable-compat-libdns_sd
make

%Install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT/%{pfx}
find $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/lib/ -name "*.la" | xargs rm -f

%Clean
rm -rf $RPM_BUILD_ROOT

%Files
%defattr(-,root,root)
%{pfx}/*
diff --exclude CVS --exclude .git -uNr skell-1.19/etc/group skell-1.19.modified/etc/group
--- skell-1.19/etc/group	2008-09-23 05:48:38.000000000 -0700
+++ skell-1.19.modified/etc/group	2012-02-01 00:06:18.674206376 -0800
@@ -50,5 +50,8 @@
 mysql:x:27:
 ldap:x:55:
 pvm:x:24:
+messagebus:x:78:
+avahi:x:79:
+netdev:x:97:
 nogroup:x:65534:
 user:x:500:
diff --exclude CVS --exclude .git -uNr skell-1.19/etc/nsswitch.conf skell-1.19.modified/etc/nsswitch.conf
--- skell-1.19/etc/nsswitch.conf	2008-09-23 05:48:38.000000000 -0700
+++ skell-1.19.modified/etc/nsswitch.conf	2012-02-02 16:47:13.765266235 -0800
@@ -20,18 +20,18 @@
 #	compat			Use NIS on compat mode
 #	[NOTFOUND=return]	Stop searching if not found so far
 #
-passwd:     files nisplus nis
-shadow:     files nisplus nis
-group:      files nisplus nis
-hosts:      files nisplus nis dns
-services:   files nisplus
+passwd:     files
+shadow:     files
+group:      files
+hosts:      files dns
+services:   files
 networks:   files
-protocols:  files nisplus
+protocols:  files
 rpc:        files
 ethers:     files
 netmasks:   files
-netgroup:   files nisplus
-publickey:  nisplus
-automount:  files nisplus
-aliases:    files nisplus
-bootparams: nisplus [NOTFOUND=return] files
+netgroup:   files
+publickey:  files
+automount:  files
+aliases:    files
+bootparams: files
diff --exclude CVS --exclude .git -uNr skell-1.19/etc/passwd skell-1.19.modified/etc/passwd
--- skell-1.19/etc/passwd	2008-09-23 05:48:38.000000000 -0700
+++ skell-1.19.modified/etc/passwd	2012-02-01 00:21:18.033985341 -0800
@@ -36,4 +36,6 @@
 mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
 ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false
 pvm:x:24:24::/usr/share/pvm3:/bin/bash
+messagebus:x:78:78::/tmp/run/dbus:/bin/false
+avahi:x:79:79::/var/run/avahi-daemon:/bin/false
 user:x:500:500:Linux User,,,:/home/user:/bin/sh
diff --exclude CVS --exclude .git -uNr skell-1.19/etc/rc.d/init.d/avahi skell-1.19.modified/etc/rc.d/init.d/avahi
--- skell-1.19/etc/rc.d/init.d/avahi	1969-12-31 16:00:00.000000000 -0800
+++ skell-1.19.modified/etc/rc.d/init.d/avahi	2012-02-03 18:38:43.443503004 -0800
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ ! -x /usr/sbin/avahi-daemon ]
+then
+    exit 0
+fi
+
+if [ "$1" = "stop" -o "$1" = "restart" ]
+then                                                                            
+    echo "Stopping Avahi daemon: "
+    /usr/sbin/avahi-daemon -c && /usr/sbin/avahi-daemon -k
+fi
+
+if [ "$1" = "start" -o "$1" = "restart" ]                                       
+then
+    echo "Starting Avahi daemon: "
+    /usr/sbin/avahi-daemon -c || /usr/sbin/avahi-daemon -D
+fi
diff --exclude CVS --exclude .git -uNr skell-1.19/etc/rc.d/init.d/dbus skell-1.19.modified/etc/rc.d/init.d/dbus
--- skell-1.19/etc/rc.d/init.d/dbus	1969-12-31 16:00:00.000000000 -0800
+++ skell-1.19.modified/etc/rc.d/init.d/dbus	2012-01-29 22:57:47.470502319 -0800
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+if [ ! -x /usr/bin/dbus-daemon ]
+then
+    exit 0
+fi
+
+if [ "$1" = "stop" -o "$1" = "restart" ]
+then                                                                            
+    echo "Stopping dbus system daemon: "
+    killall -q /usr/bin/dbus-daemon
+    rm -f /tmp/run/dbus/*
+fi
+
+if [ "$1" = "start" -o "$1" = "restart" ]                                       
+then
+    echo "Starting dbus system daemon: "
+    /usr/bin/dbus-daemon --system
+fi
diff --exclude CVS --exclude .git -uNr skell-1.19/etc/shadow skell-1.19.modified/etc/shadow
--- skell-1.19/etc/shadow	2008-09-23 05:48:39.000000000 -0700
+++ skell-1.19.modified/etc/shadow	2012-02-01 00:06:57.338536445 -0800
@@ -36,4 +36,6 @@
 mysql:!!:11851:0:99999:7:::
 ldap:!!:11851:0:99999:7:::
 pvm:!!:11851:0:99999:7:::
+messagebus:!!:11851:0:99999:7:::
+avahi:!!:11851:0:99999:7:::
 user:$1$pJefShJL$CoX8T20vn1g.ug0jZIczM.:11851:0:99999:7:::
_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib

Reply via email to