package/avahi: use upstream-provided systemd files

When using the buildroot-provided avahi-daemon.service file, bootup never
finishes, because multi-user.target is waiting for avahi-daemon to exit,
which is caused by "Type=oneshot" (in avahi-daemon.service).

Upstream's systemd files get already installed to /lib/systemd.
They're not an exact copy of S50avahi-daemon, but work flawlessly,
so use these units:

* avahi-daemon.service, auto-enabled (ln -fs in AVAHI_INSTALL_INIT_SYSTEMD)
* avahi-daemon.socket,
  not auto-enabled, but a dependency of avahi-daemon.service
* avahi-dnsconfd.service, auto-enabled

[Thomas: use simpler absolute paths for the symbolic links instead of
relative paths. Suggested by Maxime Hadjinlian.]

Signed-off-by: André Erdmann <dywi@mailerd.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
avahi: fix indentation in AVAHI_INSTALL_INIT_SYSTEMD

The indentation for commands should be made with tabs, not spaces, so
fix that up in AVAHI_INSTALL_INIT_SYSTEMD.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
avahi: remove useless 'mkdir -p' in AVAHI_INSTALL_INIT_SYSTEMD

In AVAHI_INSTALL_INIT_SYSTEMD, since we're using 'install -D' to
install /usr/lib/tmpfiles.d/avahi.conf in $(TARGET_DIR), there's no
need to have a 'mkdir -p' before that, since 'install -D' creates the
directories as needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
avahi: do not install S05avahi-setup.sh in systemd setup

The AVAHI_INSTALL_AUTOIPD was unconditionally installing
S05avahi-setup.sh to /etc/init.d/, even in systemd
configurations. Therefore, this commit:

 * Moves the installation of S05avahi-setup.sh to a separate variable
   called AVAHI_INSTALL_AUTOIPD_INIT_SYSV.

 * Makes sure to use 'install -D' and a full destination path when
   installing S05avahi-setup.sh.

 * Moves the definition of AVAHI_INSTALL_AUTOIPD inside the
   BR2_PACKAGE_AVAHI_AUTOIPD conditional, so that both the variable
   definition and its addition to AVAHI_POST_INSTALL_TARGET_HOOKS are
   enclosed in the conditional.

 * Moves the S50avahi-daemon installation from AVAHI_INSTALL_INIT_SYSV
   to AVAHI_INSTALL_DAEMON_INIT_SYSV.

 * Uses 'install -D' to install S50avahi-daemon.

 * Adds a AVAHI_INSTALL_INIT_SYSV definition which calls both
   AVAHI_INSTALL_AUTOIPD_INIT_SYSV and AVAHI_INSTALL_DAEMON_INIT_SYSV.

Note: in a systemd configuration, there is no provision to do what
S05avahi-setup.sh is doing for sysv init configurations. Maybe this is
something that our systemd people should have a look at.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
bandwidthd: Version bump to handle indirect deps properly

Thanks to Romain Naour, Baruch Siach and Thomas Petazzoni, I've
solved the build issues in certain cases for bandwidthd.

The issue was that libpcap and libpng would depend on other libraries
and upon testing for pcap/libpng the tests would fail due to not
being able to find the other libraries.

Bandwidthd's configure script now uses pkg-config for libpng
and pcap-config for libpcap. pcap-config's path is specified
in configure's arguments.

Some other tweaks have been made including the layout and flow
of configure.ac is a bit more logical, and the handling of postgres
and sqlite has been tweaked. Finally, the test for X.Org has been
removed.

[Thomas: re-add Nathaniel SoB line, which was misplaced in the commit
log, and therefore dropped when applying the patch.]

Fixes: http://autobuild.buildroot.org/results/eb4/eb48acec37a7fd1714b267b105816bf0053d40e9/build-end.log
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Romain Naour <romain.naour@openwide.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Nathaniel Roach <nroach44@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/alsa-utils: Switch ALSA_UTILS_SITE to official site

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/alsa-lib: Switch ALSA_LIB_SITE to official site

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configs/qemu: update to the latest possible kernel version

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
xserver_xorg-server: Bump version to 1.16.1

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libpciaccess: Add optional support for zlib

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/cdrkit: download from alternate site

www.cdrkit.org looks dead, the cdrkit archive always downloads from the
buildroot.org mirror. This patch points the downloader to the Debian
archive site.

Signed-off-by: Karoly Kasza <kaszak@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
rpi-userland: bump revision and add patch to fix compile with musl

We can not bump to the latest cset, because it breaks weston. So we
add a patch to backport upstream fixes for musl:

  http://lists.busybox.net/pipermail/buildroot/2014-October/109309.html
  https://github.com/raspberrypi/userland/pull/201

[Thomas: adjust commit log as suggested by Yann E. Morin.]

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
cppdb: enable postgresql support

Also:
Fix mysql support.
Add hash file.
Forcibly disable automatic db support when it's not selected.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
infra: Move --enable/--disable-debug to package/Makefile.in

A lot of packages ignored BR2_ENABLE_DEBUG. This patch simplifies the handling of
this option by adding the corresponding configure option to the global Makefile
for target packages.

For host packages --disable-debug is added to the global Makefile.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
infra: Remove --disable-gtk-doc from packages, already defined in pkg-autotools.mk

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
tar: bump to version 1.28

Also add hash file and set eprefix to / otherwise when busybox is around
we've got duplicate tar applications (/bin/tar for busybox, /usr/bin/tar
for full-blown) normally making busybox still win in directory search.

[Thomas: slightly improve the comment that explains why we pass
--exec-prefix.]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
pkg-stats: add statistics about hash files

As discussed during the Buildroot meeting, this commit extends the
pkg-stats script to include statistics about the number of packages
having vs. not having the hash file.

As of today, we have 104 packages with the hash file, and 1274
packages without.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
pps-tools: new package

Added pps-tools package to add support to the ntpd for a
pps source (requires timepps.h from pps-tools as part of ntpd
build).

[Thomas:
  - Use $(TARGET_MAKE_ENV) at install time.
  - Alphabetic ordering in package/Config.in, noticed by Jerzy
    Grzegorek.]

Signed-off-by: Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
ntp: Adding pps support to ntpd

Added an option for the ntpd application to support pps inputs.

Signed-off-by: Bryan Brinsko <bryan.brinsko@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
uclibc: add hash file

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>