[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ltib] patch: nss-mdns, Avahi, dbus, libdaemon
From: |
Fritz Mueller |
Subject: |
[Ltib] patch: nss-mdns, Avahi, dbus, libdaemon |
Date: |
Sun, 5 Feb 2012 14:45:36 -0800 |
(note: this patch includes/obsoletes the separate dbus and libdaemon patches
previous submitted to this list)
Here's a proposed patch that:
- adds Avahi 0.6.30
- upgrades nss-mdns to 0.10
- upgrades dbus to 1.4.16
- upgrades libdaemon to 0.14
- addresses build dependencies between these packages
- adds config file and startup daemon support so the mdns stack works "out of
the box"
Thanks to Mike Goins for getting me started with some work he had done with an
earlier version of the Avahi library stack (see previous posts on this list).
I found that while I could get service advertise to work with those versions, I
could not get service browse and other misc functionality to work. Upgrading
to the latest available Avahi fixed this, and build requirements for that
motivated updating the other libraries in the stack.
As well as the addition of Avahi and upgrades to the other libs, the following
are also addressed:
- move ALSA libs into alphabetical order in packages.lkc
- move d-bus to be after expat in pkg_map to fix existing build-order bug
- change dbus config to write pid/socket files in /tmp for better restart
behavior
- latest nss-mdns requires Avahi, so make it auto-select
- remove nis/nisplus entries from nsswitch.conf in skell package (nis/nisplus
aren't even available in ltib?)
- patch to the skell package to configure nsswitch.conf differently according
to whether nss-mdns is selected
Tarballs for the new packages may be obtained 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
Attached below are two pieces: a CVS diff that captures most of the changes,
followed by the single new file avahi.spec. Please let me know if there is
anything here that seems to need further attention and I will rework and
resubmit.
thanks!
--FritzM.
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 5 Feb 2012 21:31:25 -0000
@@ -262,7 +262,7 @@
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_CAIRO => [ qw/PKG_XORG_SERVER/ ],
PKG_BOOST => [ qw/PKG_BOOST_WANT_HEADER_ONLY/ ],
};
@@ -1570,6 +1570,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 5 Feb 2012 21:31:25 -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
+ 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 5 Feb 2012 21:31:25 -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,8 @@
PKG_WHICH = which
PKG_FAKEROOT = fakeroot
PKG_EXPAT = expat
+PKG_DBUS = dbus
+PKG_AVAHI = avahi
PKG_GDB = gdb
PKG_GDB_BDM = m68k-gdb-bdm
PKG_STRACE = strace
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 5 Feb 2012 21:31:25 -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 5 Feb 2012 21:31:25 -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=/tmp'
eval $config_opts \
./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \
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 5 Feb 2012 21:31:25 -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
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 5 Feb 2012 21:31:25 -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
@@ -34,5 +34,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 5 Feb 2012 21:31:25 -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 5 Feb 2012 21:31:25 -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"
***************** avahi.spec follows ***********************
%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}
%Clean
rm -rf $RPM_BUILD_ROOT
%Files
%defattr(-,root,root)
%{pfx}/*
- [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon,
Fritz Mueller <=
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Mike Goins, 2012/02/10
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Mike Goins, 2012/02/10
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Mike Goins, 2012/02/11
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Fritz Mueller, 2012/02/11
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Mike Goins, 2012/02/11
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Fritz Mueller, 2012/02/11
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Mike Goins, 2012/02/12
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Fritz Mueller, 2012/02/12
- Re: [Ltib] patch: nss-mdns, Avahi, dbus, libdaemon, Mike Goins, 2012/02/12