From b76270bf9e6dd375e495fec92140a79a79415d27 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 19 May 2010 08:58:23 +0000 Subject: Slackware 13.1 Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy! --- source/n/alpine/alpine.SlackBuild | 23 +- source/n/autofs/autofs-3.1.7.diff | 11 - source/n/autofs/autofs-3.1.7.tar.bz2.sign | 8 - ...fs-5.0.5-fix-libxml2-workaround-configure.patch | 61 + source/n/autofs/autofs.SlackBuild | 100 +- source/n/autofs/autofs.gcc.fix.diff | 12 - source/n/autofs/autofs.x86_64.diff | 11 - source/n/autofs/doinst.sh | 26 + source/n/bind/bind.SlackBuild | 12 +- source/n/bluez-hcidump/bluez-hcidump.SlackBuild | 34 +- source/n/bluez-hcidump/hci.c_for_bluez-4.61.patch | 21 + source/n/bluez-hcidump/slack-desc | 6 +- source/n/bluez-libs/bluez-libs.SlackBuild | 114 -- source/n/bluez-libs/slack-desc | 19 - source/n/bluez-utils/60-bluetooth.rules | 35 - source/n/bluez-utils/README.SLACKWARE | 18 - source/n/bluez-utils/add-passkey.c | 394 ---- source/n/bluez-utils/bluetooth.conf | 24 - source/n/bluez-utils/bluez-utils.SlackBuild | 188 -- source/n/bluez-utils/doinst.sh | 30 - source/n/bluez-utils/rc.bluetooth | 114 -- source/n/bluez-utils/rc.bluetooth.conf | 33 - source/n/bluez-utils/register-passkeys | 19 - source/n/bluez-utils/slack-desc | 19 - source/n/bluez/bluez.SlackBuild | 196 ++ source/n/bluez/config/bluetooth.modprobe | 3 + source/n/bluez/config/bluetooth.sh | 7 + source/n/bluez/config/rc.bluetooth | 30 + source/n/bluez/doinst.sh | 29 + source/n/bluez/passkey-agent.c | 418 ++++ source/n/bluez/patches/bluez-dbus-config.patch | 25 + source/n/bluez/patches/bluez-run_udev_helper.patch | 12 + .../n/bluez/patches/bluez-unbreak_dell_mouse.patch | 14 + source/n/bluez/slack-desc | 19 + source/n/crda/crda.SlackBuild | 21 +- source/n/curl/cacert.pem | 361 +++- source/n/curl/curl.SlackBuild | 18 +- source/n/dhcp/dhclient-script.PATH.diff | 13 + source/n/dhcp/dhcp.SlackBuild | 132 +- source/n/dhcp/doinst.sh | 21 + source/n/dhcpcd/50-ntp.conf.diff | 19 + source/n/dhcpcd/dhcpcd.SlackBuild | 101 +- source/n/dhcpcd/dhcpcd.vararg.diff | 30 - source/n/dhcpcd/doinst.sh | 15 + source/n/dhcpcd/patches/config.h.diff | 17 - source/n/dhcpcd/patches/dhcpcd.8.in.diff | 12 - source/n/dhcpcd/patches/dhcpcd.sh.diff | 17 - source/n/dirmngr/dirmngr.SlackBuild | 46 +- source/n/dnsmasq/dnsmasq.SlackBuild | 31 +- source/n/dnsmasq/dnsmasq.leasedir.diff | 30 +- source/n/dnsmasq/doinst.sh | 16 +- source/n/epic4/epic4.SlackBuild | 88 - source/n/epic4/slack-desc | 19 - source/n/epic5/epic5.SlackBuild | 107 + source/n/epic5/slack-desc | 19 + source/n/ethtool/ethtool.SlackBuild | 19 +- source/n/fetchmail/fetchmail.SlackBuild | 23 +- source/n/getmail/getmail.SlackBuild | 15 +- source/n/gnupg/gnupg.SlackBuild | 25 +- source/n/gnupg2/gnupg-2.0.14-encode-s2k.patch | 65 + source/n/gnupg2/gnupg2.SlackBuild | 46 +- source/n/gnutls/gnutls.SlackBuild | 58 +- source/n/gpgme/gpgme.SlackBuild | 44 +- source/n/httpd/httpd.SlackBuild | 20 +- ...oute2-2.6.33-fixup_dbpath_and_iptablespath.diff | 34 + source/n/iproute2/iproute2.SlackBuild | 55 +- source/n/iproute2/iproute2.dbpath.diff | 12 - source/n/iproute2/iproute2.iptablespath.diff | 12 - source/n/iptables/iptables.SlackBuild | 24 +- source/n/iputils/iputils.SlackBuild | 32 +- source/n/ipw2200-fw/ipw2200-fw.SlackBuild | 8 +- source/n/irssi/irsi-0.8.14.manpage_fix.diff | 16 - source/n/irssi/irssi.SlackBuild | 49 +- source/n/irssi/irssi.manpage_fix.diff | 16 + source/n/irssi/irssi.ssl_proxy.diff | 24 + .../iwlwifi-1000-ucode.SlackBuild | 57 + source/n/iwlwifi-1000-ucode/slack-desc | 19 + .../iwlwifi-6000-ucode.SlackBuild | 57 + source/n/iwlwifi-6000-ucode/slack-desc | 19 + source/n/lftp/lftp.SlackBuild | 30 +- source/n/libassuan/libassuan.SlackBuild | 48 +- source/n/libgcrypt/libgcrypt.SlackBuild | 56 +- source/n/libgpg-error/libgpg-error.SlackBuild | 58 +- source/n/libksba/libksba.SlackBuild | 46 +- source/n/links/links.SlackBuild | 28 +- source/n/lynx/lynx.SlackBuild | 67 +- source/n/lynx/lynx.cfg.diff | 9 +- source/n/lynx/lynx.path.diff | 27 +- source/n/mcabber/mcabber.SlackBuild | 37 +- source/n/mtr/mtr-0.73.configure.error.diff | 20 - source/n/mtr/mtr.SlackBuild | 45 +- source/n/ncftp/ncftp.SlackBuild | 30 +- source/n/net-snmp/net-snmp.SlackBuild | 43 +- source/n/netatalk/netatalk-2.0.4-afpdconf.diff | 10 - source/n/netatalk/netatalk-2.0.4-without_xfs.diff | 22 - source/n/netatalk/netatalk.SlackBuild | 24 +- source/n/netatalk/netatalk.afpdconf.diff | 10 + source/n/netatalk/netatalk.without_xfs.diff | 22 + .../n/network-scripts/network-scripts.SlackBuild | 8 +- source/n/network-scripts/scripts/rc.inet1 | 6 +- source/n/nfs-utils/nfs-utils-1.1.4.tar.bz2.sign | 8 - source/n/nfs-utils/nfs-utils-1.2.2.tar.bz2.sign | 8 + source/n/nfs-utils/nfs-utils.SlackBuild | 19 +- source/n/nmap/nmap.SlackBuild | 29 +- source/n/nn/m-x86_64.h | 37 + source/n/nn/nn.SlackBuild | 33 +- source/n/nn/nn.diff | 39 +- source/n/ntp/ntp.SlackBuild | 57 +- source/n/ntp/ntp.nano.diff | 17 + source/n/ntp/rc.ntpd | 11 +- source/n/obex-data-server/doinst.sh | 16 + .../n/obex-data-server/obex-data-server.SlackBuild | 114 ++ source/n/obex-data-server/slack-desc | 20 + source/n/obexfs/obexfs.SlackBuild | 106 + source/n/obexfs/slack-desc | 19 + source/n/obexftp/obexftp.SlackBuild | 53 +- source/n/obexftp/ruby_rstringlen.diff | 15 + .../n/openldap-client/openldap-client.SlackBuild | 33 +- source/n/openobex/openobex.SlackBuild | 34 +- source/n/openssh/openssh.SlackBuild | 39 +- source/n/openssl/openssl.SlackBuild | 64 +- source/n/openssl/openssl.no-extssl.diff | 27 - source/n/openvpn/openvpn.SlackBuild | 52 +- source/n/php/channels/pear.php.net.reg | 1 - source/n/php/channels/pecl.php.net.reg | 1 - source/n/php/mod_php.conf.example | 15 +- source/n/php/php.SlackBuild | 44 +- source/n/php/php.gd_libpng-1.4.diff | 12 + source/n/php/php.gmp5.diff | 11 + source/n/pinentry/pinentry.SlackBuild | 44 +- source/n/ppp/ppp.SlackBuild | 18 +- source/n/proftpd/proftpd.SlackBuild | 31 +- source/n/pssh/pssh.SlackBuild | 16 +- source/n/pssh/slack-desc | 4 +- source/n/rdist/rdist-6.1.5-00.linux.diff | 23 + source/n/rdist/rdist-6.1.5-01.links.diff | 74 + source/n/rdist/rdist-6.1.5-03.hardlink.diff | 20 + source/n/rdist/rdist-6.1.5-04.bison.diff | 142 ++ source/n/rdist/rdist-6.1.5-05.varargs.diff | 11 + source/n/rdist/rdist-6.1.5-06.maxargs.diff | 11 + source/n/rdist/rdist-6.1.5-07.lfs.diff | 137 ++ source/n/rdist/rdist-6.1.5-08.cleanup.diff | 2082 ++++++++++++++++++++ source/n/rdist/rdist-6.1.5-09.svr4.diff | 10 + source/n/rdist/rdist-6.1.5-10.ssh.diff | 9 + source/n/rdist/rdist-6.1.5-11.mkstemp.diff | 23 + source/n/rdist/rdist-6.1.5-12.stat64.diff | 80 + .../rdist-6.1.5-14.fix-msgsndnotify-loop.diff | 32 + source/n/rdist/rdist-6.1.5-bison.diff | 142 -- source/n/rdist/rdist-6.1.5-cleanup.diff | 2082 -------------------- source/n/rdist/rdist-6.1.5-varargs.diff | 11 - source/n/rdist/rdist-6.1.5.diff | 107 - source/n/rdist/rdist-eu-license.txt | 118 ++ source/n/rdist/rdist.SlackBuild | 128 +- source/n/rsync/rsync.SlackBuild | 17 +- .../n/rt2860-firmware/rt2860-firmware.SlackBuild | 60 + source/n/rt2860-firmware/slack-desc | 19 + .../n/rt2870-firmware/rt2870-firmware.SlackBuild | 60 + source/n/rt2870-firmware/slack-desc | 19 + source/n/samba/samba.SlackBuild | 38 +- source/n/samba/smb.conf.default | 2 +- source/n/samba/smb.conf.default.orig | 2 +- source/n/samba/smb.conf.diff | 4 +- source/n/sendmail/SlackBuild-sendmail | 20 +- source/n/sendmail/SlackBuild-sendmail-cf | 4 +- source/n/sendmail/site.config.m4 | 1 + source/n/slrn/doinst.sh | 1 + source/n/slrn/slrn.SlackBuild | 22 +- source/n/snownews/snownews.SlackBuild | 31 +- source/n/stunnel/stunnel.SlackBuild | 40 +- source/n/tcpdump/libpcap.20-fix-any-intf.diff | 159 ++ source/n/tcpdump/tcpdump.SlackBuild | 24 +- source/n/tftp-hpa/tftp-hpa-0.48.tar.bz2.sign | 8 - source/n/tftp-hpa/tftp-hpa-0.49.tar.bz2.sign | 8 + source/n/tftp-hpa/tftp-hpa.SlackBuild | 19 +- source/n/traceroute/traceroute.SlackBuild | 52 +- .../n/traceroute/traceroute.no.domain.strip.diff | 30 - source/n/traceroute/traceroute_1.4a12-5.diff | 1152 ----------- source/n/vsftpd/vsftpd.SlackBuild | 35 +- source/n/vsftpd/vsftpd.conf.diff | 17 +- source/n/vsftpd/vsftpd.vsf_findlibs.sh.diff | 87 - source/n/wget/wget.SlackBuild | 32 +- source/n/whois/whois.SlackBuild | 37 +- source/n/wireless-tools/scripts/rc.wireless | 7 +- source/n/wireless-tools/wireless_tools.SlackBuild | 16 +- source/n/wpa_supplicant/wpa_supplicant.SlackBuild | 50 +- source/n/yptools/yp-tools-2.12.tar.bz2.sign | 8 + source/n/yptools/yp-tools-2.9.tar.bz2.sign | 8 - source/n/yptools/ypbind-mt-1.19.1.tar.bz2.sign | 8 - source/n/yptools/ypbind-mt-1.31.tar.bz2.sign | 8 + source/n/yptools/ypserv-2.18.tar.bz2.sign | 8 - source/n/yptools/ypserv-2.23.tar.bz2.sign | 8 + source/n/yptools/yptools.SlackBuild | 22 +- 192 files changed, 7276 insertions(+), 5769 deletions(-) delete mode 100644 source/n/autofs/autofs-3.1.7.diff delete mode 100644 source/n/autofs/autofs-3.1.7.tar.bz2.sign create mode 100644 source/n/autofs/autofs-5.0.5-fix-libxml2-workaround-configure.patch delete mode 100644 source/n/autofs/autofs.gcc.fix.diff delete mode 100644 source/n/autofs/autofs.x86_64.diff create mode 100644 source/n/autofs/doinst.sh create mode 100644 source/n/bluez-hcidump/hci.c_for_bluez-4.61.patch delete mode 100755 source/n/bluez-libs/bluez-libs.SlackBuild delete mode 100644 source/n/bluez-libs/slack-desc delete mode 100644 source/n/bluez-utils/60-bluetooth.rules delete mode 100644 source/n/bluez-utils/README.SLACKWARE delete mode 100644 source/n/bluez-utils/add-passkey.c delete mode 100644 source/n/bluez-utils/bluetooth.conf delete mode 100755 source/n/bluez-utils/bluez-utils.SlackBuild delete mode 100644 source/n/bluez-utils/doinst.sh delete mode 100644 source/n/bluez-utils/rc.bluetooth delete mode 100644 source/n/bluez-utils/rc.bluetooth.conf delete mode 100644 source/n/bluez-utils/register-passkeys delete mode 100644 source/n/bluez-utils/slack-desc create mode 100755 source/n/bluez/bluez.SlackBuild create mode 100644 source/n/bluez/config/bluetooth.modprobe create mode 100644 source/n/bluez/config/bluetooth.sh create mode 100644 source/n/bluez/config/rc.bluetooth create mode 100644 source/n/bluez/doinst.sh create mode 100644 source/n/bluez/passkey-agent.c create mode 100644 source/n/bluez/patches/bluez-dbus-config.patch create mode 100644 source/n/bluez/patches/bluez-run_udev_helper.patch create mode 100644 source/n/bluez/patches/bluez-unbreak_dell_mouse.patch create mode 100644 source/n/bluez/slack-desc create mode 100644 source/n/dhcp/dhclient-script.PATH.diff create mode 100644 source/n/dhcp/doinst.sh create mode 100644 source/n/dhcpcd/50-ntp.conf.diff delete mode 100644 source/n/dhcpcd/dhcpcd.vararg.diff create mode 100644 source/n/dhcpcd/doinst.sh delete mode 100644 source/n/dhcpcd/patches/config.h.diff delete mode 100644 source/n/dhcpcd/patches/dhcpcd.8.in.diff delete mode 100644 source/n/dhcpcd/patches/dhcpcd.sh.diff delete mode 100755 source/n/epic4/epic4.SlackBuild delete mode 100644 source/n/epic4/slack-desc create mode 100755 source/n/epic5/epic5.SlackBuild create mode 100644 source/n/epic5/slack-desc create mode 100644 source/n/gnupg2/gnupg-2.0.14-encode-s2k.patch create mode 100644 source/n/iproute2/iproute2-2.6.33-fixup_dbpath_and_iptablespath.diff delete mode 100644 source/n/iproute2/iproute2.dbpath.diff delete mode 100644 source/n/iproute2/iproute2.iptablespath.diff delete mode 100644 source/n/irssi/irsi-0.8.14.manpage_fix.diff create mode 100644 source/n/irssi/irssi.manpage_fix.diff create mode 100644 source/n/irssi/irssi.ssl_proxy.diff create mode 100755 source/n/iwlwifi-1000-ucode/iwlwifi-1000-ucode.SlackBuild create mode 100644 source/n/iwlwifi-1000-ucode/slack-desc create mode 100755 source/n/iwlwifi-6000-ucode/iwlwifi-6000-ucode.SlackBuild create mode 100644 source/n/iwlwifi-6000-ucode/slack-desc delete mode 100644 source/n/mtr/mtr-0.73.configure.error.diff delete mode 100644 source/n/netatalk/netatalk-2.0.4-afpdconf.diff delete mode 100644 source/n/netatalk/netatalk-2.0.4-without_xfs.diff create mode 100644 source/n/netatalk/netatalk.afpdconf.diff create mode 100644 source/n/netatalk/netatalk.without_xfs.diff delete mode 100644 source/n/nfs-utils/nfs-utils-1.1.4.tar.bz2.sign create mode 100644 source/n/nfs-utils/nfs-utils-1.2.2.tar.bz2.sign create mode 100644 source/n/nn/m-x86_64.h create mode 100644 source/n/ntp/ntp.nano.diff create mode 100644 source/n/obex-data-server/doinst.sh create mode 100755 source/n/obex-data-server/obex-data-server.SlackBuild create mode 100644 source/n/obex-data-server/slack-desc create mode 100755 source/n/obexfs/obexfs.SlackBuild create mode 100644 source/n/obexfs/slack-desc create mode 100644 source/n/obexftp/ruby_rstringlen.diff delete mode 100644 source/n/openssl/openssl.no-extssl.diff delete mode 100644 source/n/php/channels/pear.php.net.reg delete mode 100644 source/n/php/channels/pecl.php.net.reg create mode 100644 source/n/php/php.gd_libpng-1.4.diff create mode 100644 source/n/php/php.gmp5.diff create mode 100644 source/n/rdist/rdist-6.1.5-00.linux.diff create mode 100644 source/n/rdist/rdist-6.1.5-01.links.diff create mode 100644 source/n/rdist/rdist-6.1.5-03.hardlink.diff create mode 100644 source/n/rdist/rdist-6.1.5-04.bison.diff create mode 100644 source/n/rdist/rdist-6.1.5-05.varargs.diff create mode 100644 source/n/rdist/rdist-6.1.5-06.maxargs.diff create mode 100644 source/n/rdist/rdist-6.1.5-07.lfs.diff create mode 100644 source/n/rdist/rdist-6.1.5-08.cleanup.diff create mode 100644 source/n/rdist/rdist-6.1.5-09.svr4.diff create mode 100644 source/n/rdist/rdist-6.1.5-10.ssh.diff create mode 100644 source/n/rdist/rdist-6.1.5-11.mkstemp.diff create mode 100644 source/n/rdist/rdist-6.1.5-12.stat64.diff create mode 100644 source/n/rdist/rdist-6.1.5-14.fix-msgsndnotify-loop.diff delete mode 100644 source/n/rdist/rdist-6.1.5-bison.diff delete mode 100644 source/n/rdist/rdist-6.1.5-cleanup.diff delete mode 100644 source/n/rdist/rdist-6.1.5-varargs.diff delete mode 100644 source/n/rdist/rdist-6.1.5.diff create mode 100644 source/n/rdist/rdist-eu-license.txt create mode 100755 source/n/rt2860-firmware/rt2860-firmware.SlackBuild create mode 100644 source/n/rt2860-firmware/slack-desc create mode 100755 source/n/rt2870-firmware/rt2870-firmware.SlackBuild create mode 100644 source/n/rt2870-firmware/slack-desc create mode 100644 source/n/tcpdump/libpcap.20-fix-any-intf.diff delete mode 100644 source/n/tftp-hpa/tftp-hpa-0.48.tar.bz2.sign create mode 100644 source/n/tftp-hpa/tftp-hpa-0.49.tar.bz2.sign delete mode 100644 source/n/traceroute/traceroute.no.domain.strip.diff delete mode 100644 source/n/traceroute/traceroute_1.4a12-5.diff delete mode 100644 source/n/vsftpd/vsftpd.vsf_findlibs.sh.diff create mode 100644 source/n/yptools/yp-tools-2.12.tar.bz2.sign delete mode 100644 source/n/yptools/yp-tools-2.9.tar.bz2.sign delete mode 100644 source/n/yptools/ypbind-mt-1.19.1.tar.bz2.sign create mode 100644 source/n/yptools/ypbind-mt-1.31.tar.bz2.sign delete mode 100644 source/n/yptools/ypserv-2.18.tar.bz2.sign create mode 100644 source/n/yptools/ypserv-2.23.tar.bz2.sign (limited to 'source/n') diff --git a/source/n/alpine/alpine.SlackBuild b/source/n/alpine/alpine.SlackBuild index 6ed64d10d..1dd64e6a6 100755 --- a/source/n/alpine/alpine.SlackBuild +++ b/source/n/alpine/alpine.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,12 +23,22 @@ PKGNAM=alpine VERSION=${VERSION:-2.00} -ARCH=${ARCH:-x86_64} -ALPINEBUILD=${ALPINEBUILD:-2} +ALPINEBUILD=${ALPINEBUILD:-3} IMAPDBUILD=${IMAPDBUILD:-2} PINEPGP=${PINEPGP:-0.18.0} -NUMJOBS=${NUMJOBS:-" -j7 "} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +# There are reports that > 1 won't work here: +NUMJOBS=${NUMJOBS:-" -j1 "} CWD=$(pwd) TMP=${TMP:-/tmp} @@ -86,11 +96,6 @@ zcat $CWD/alpine.tech-notes.txt.diff.gz | patch -p1 --verbose || exit 1 # Build and install: # Since we build non-compliant to RFC3501 we have to answer 'y' half-way: -echo y | make $NUMJOBS EXTRACFLAGS="-fPIC" SSLTYPE=unix -echo y | make $NUMJOBS EXTRACFLAGS="-fPIC" SSLTYPE=unix -echo y | make $NUMJOBS EXTRACFLAGS="-fPIC" SSLTYPE=unix -echo y | make $NUMJOBS EXTRACFLAGS="-fPIC" SSLTYPE=unix -echo y | make $NUMJOBS EXTRACFLAGS="-fPIC" SSLTYPE=unix echo y | make $NUMJOBS EXTRACFLAGS="-fPIC" SSLTYPE=unix || exit 1 make install SSLTYPE=unix DESTDIR=$PKG || exit 1 diff --git a/source/n/autofs/autofs-3.1.7.diff b/source/n/autofs/autofs-3.1.7.diff deleted file mode 100644 index 7849eae95..000000000 --- a/source/n/autofs/autofs-3.1.7.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./modules/lookup_program.c.orig Sat Mar 24 14:16:45 2001 -+++ ./modules/lookup_program.c Sat Mar 24 14:18:18 2001 -@@ -16,7 +16,7 @@ - - #include - #include --#include -+#include - #include - #include - #include diff --git a/source/n/autofs/autofs-3.1.7.tar.bz2.sign b/source/n/autofs/autofs-3.1.7.tar.bz2.sign deleted file mode 100644 index 8f80176b7..000000000 --- a/source/n/autofs/autofs-3.1.7.tar.bz2.sign +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.0.4 (GNU/Linux) -Comment: See http://www.kernel.org/signature.html for info - -iD8DBQA6A7VZyGugalF9Dw4RAkieAJ96c+Si+lGnoSf0OJCanmwE7dilBwCgieKQ -SshwUTt1sSA9Iu3meWUm2yk= -=1kDE ------END PGP SIGNATURE----- diff --git a/source/n/autofs/autofs-5.0.5-fix-libxml2-workaround-configure.patch b/source/n/autofs/autofs-5.0.5-fix-libxml2-workaround-configure.patch new file mode 100644 index 000000000..197ac6bd3 --- /dev/null +++ b/source/n/autofs/autofs-5.0.5-fix-libxml2-workaround-configure.patch @@ -0,0 +1,61 @@ +autofs-5.0.5 - fix libxml2 workaround configure + +From: Ian Kent + +The configure logic related to work around the libxml2 library +reload issues is not quite right. The xml code is needed if +ldap is used so it is sufficient to require inclusion of the +workaround code if autofs is being built with LDAP support. +--- + +diff --git a/daemon/Makefile b/daemon/Makefile +index 371ec72..9e9d635 100644 +--- a/daemon/Makefile ++++ b/daemon/Makefile +@@ -23,10 +23,8 @@ LDFLAGS += -rdynamic + LIBS = -ldl + + ifeq ($(LDAP), 1) +- ifeq ($(SASL), 1) + CFLAGS += $(XML_FLAGS) + LIBS += $(XML_LIBS) +- endif + endif + + all: automount +diff --git a/daemon/automount.c b/daemon/automount.c +index 979ecd6..7c44d4b 100644 +--- a/daemon/automount.c ++++ b/daemon/automount.c +@@ -38,10 +38,12 @@ + #include + + #include "automount.h" +-#ifdef LIBXML2_WORKAROUND ++#if defined(LIBXML2_WORKAROUND) || defined(TIRPC_WORKAROUND) + #include ++#ifdef WITH_LDAP + #include + #endif ++#endif + + const char *program; /* Initialized with argv[0] */ + const char *version = VERSION_STRING; /* Program version */ +@@ -2110,7 +2112,7 @@ int main(int argc, char *argv[]) + exit(1); + } + +-#ifdef LIBXML2_WORKAROUND ++#if defined(WITH_LDAP) && defined(LIBXML2_WORKAROUND) + void *dh_xml2 = dlopen("libxml2.so", RTLD_NOW); + if (!dh_xml2) + dh_xml2 = dlopen("libxml2.so.2", RTLD_NOW); +@@ -2158,7 +2160,7 @@ int main(int argc, char *argv[]) + if (dh_tirpc) + dlclose(dh_tirpc); + #endif +-#ifdef LIBXML2_WORKAROUND ++#if defined(WITH_LDAP) && defined( LIBXML2_WORKAROUND) + if (dh_xml2) { + xmlCleanupParser(); + dlclose(dh_xml2); diff --git a/source/n/autofs/autofs.SlackBuild b/source/n/autofs/autofs.SlackBuild index 8886f3f1e..7fb29caeb 100755 --- a/source/n/autofs/autofs.SlackBuild +++ b/source/n/autofs/autofs.SlackBuild @@ -1,6 +1,7 @@ + #!/bin/sh -# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,34 +22,49 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -VERSION=3.1.7 -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} +PKGNAM=autofs +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-1} -if [ "$ARCH" = "x86_64" ]; then +NUMJOBS=${NUMJOBS:-" -j7 "} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else + SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi CWD=$(pwd) TMP=${TMP:-/tmp} -PKG=$TMP/package-autofs +PKG=$TMP/package-$PKGNAM rm -rf $PKG -mkdir -p $TMP $PKG/usr/{sbin,man/man{5,8}} +mkdir -p $TMP $PKG cd $TMP -tar xvf $CWD/autofs-$VERSION.tar.bz2 || exit 1 -cd autofs-$VERSION || exit 1 -zcat $CWD/autofs-$VERSION.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 -# Allow x86_64 arch: -zcat $CWD/autofs.x86_64.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 -# Compensate for modern compiler requirements: -zcat $CWD/autofs.gcc.fix.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 -sed -i -e "s/OPEN_MAX/NR_OPEN/" $(grep -lr OPEN_MAX *) +rm -rf $PKGNAM-$VERSION +tar xf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 +cd $PKGNAM-$VERSION || exit 1 +zcat $CWD/autofs-5.0.5-fix-libxml2-workaround-configure.patch.gz | patch -p1 || exit 1 chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -56,22 +72,54 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# SASL requires krb5: + +CFLAGS="$SLKCFLAGS" \ +CPPFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --mandir=/usr/man \ --libdir=/usr/lib${LIBDIRSUFFIX} \ + --with-openldap \ + --without-sasl \ --build=$ARCH-slackware-linux -make || exit 1 +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 -make install INSTALLROOT=$PKG || exit 1 +mv $PKG/etc/init.d $PKG/etc/rc.d +mv $PKG/etc/rc.d/autofs $PKG/etc/rc.d/rc.autofs.new +chmod 644 $PKG/etc/rc.d/rc.autofs.new -strip $PKG/usr/sbin/* -gzip -9 $PKG/usr/man/man*/* +# Prep the config files: +( cd $PKG/etc + for file in auto.master auto.misc autofs_ldap_auth.conf default/autofs ; do + mv $file ${file}.new + done +) + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress and if needed symlink the man pages: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi mkdir -p $PKG/usr/doc/autofs-$VERSION cp -a \ - COPYING COPYRIGHT NEWS README README.options TODO \ - multiserver_mount.patch samples \ + COPYING* COPYRIGHT CREDITS INSTALL README* \ + samples \ $PKG/usr/doc/autofs-$VERSION ( cd $PKG/usr/doc/autofs-$VERSION find . \( -name Makefile -o -name *.in \) -exec rm -f {} \; @@ -79,10 +127,18 @@ cp -a \ find . -type f -exec chmod 644 {} \; ) +# If there's a CHANGELOG, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r CHANGELOG ]; then + DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION) + cat CHANGELOG | head -n 1000 > $DOCSDIR/CHANGELOG + touch -r CHANGELOG $DOCSDIR/CHANGELOG +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh -# Build the package: cd $PKG /sbin/makepkg -l y -c n $TMP/autofs-$VERSION-$ARCH-$BUILD.txz diff --git a/source/n/autofs/autofs.gcc.fix.diff b/source/n/autofs/autofs.gcc.fix.diff deleted file mode 100644 index 8b30019f7..000000000 --- a/source/n/autofs/autofs.gcc.fix.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur autofs-3.1.7/modules/lookup_file.c autofs-3.1.7-gcc/modules/lookup_file.c ---- autofs-3.1.7/modules/lookup_file.c 2000-11-04 07:05:17.000000000 +0000 -+++ autofs-3.1.7-gcc/modules/lookup_file.c 2006-08-16 18:21:21.000000000 +0100 -@@ -197,7 +197,7 @@ - } - break; - } -- next_char: /* End of loop, since we can't continue; -+ next_char:; /* End of loop, since we can't continue; - inside a switch */ - } - diff --git a/source/n/autofs/autofs.x86_64.diff b/source/n/autofs/autofs.x86_64.diff deleted file mode 100644 index 8c4bf677c..000000000 --- a/source/n/autofs/autofs.x86_64.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- autofs-3.1.7/include/linux/auto_fs.h 2000-11-04 07:05:18.000000000 +0000 -+++ auto_fs.h 2006-10-19 13:46:21.000000000 +0000 -@@ -45,7 +45,7 @@ - * If so, 32-bit user-space code should be backwards compatible. - */ - --#if defined(__sparc__) || defined(__mips__) -+#if defined(__sparc__) || defined(__mips__) || defined(__s390__) || defined(__x86_64__) - typedef unsigned int autofs_wqt_t; - #else - typedef unsigned long autofs_wqt_t; diff --git a/source/n/autofs/doinst.sh b/source/n/autofs/doinst.sh new file mode 100644 index 000000000..0b0d80309 --- /dev/null +++ b/source/n/autofs/doinst.sh @@ -0,0 +1,26 @@ +config() { + NEW="$1" + OLD="`dirname $NEW`/`basename $NEW .new`" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.autofs.new: +if [ -e etc/rc.d/rc.autofs ]; then + cp -a etc/rc.d/rc.autofs etc/rc.d/rc.autofs.new.incoming + cat etc/rc.d/rc.autofs.new > etc/rc.d/rc.autofs.new.incoming + mv etc/rc.d/rc.autofs.new.incoming etc/rc.d/rc.autofs.new +fi + +config etc/auto.master.new +config etc/auto.misc.new +config etc/autofs_ldap_auth.conf.new +config etc/default/autofs.new + +config etc/rc.d/rc.autofs.new + diff --git a/source/n/bind/bind.SlackBuild b/source/n/bind/bind.SlackBuild index afcde9e1b..73b7d2ff2 100755 --- a/source/n/bind/bind.SlackBuild +++ b/source/n/bind/bind.SlackBuild @@ -22,11 +22,19 @@ PKGNAM=bind -VERSION=${VERSION:-9.4.3-P3} -ARCH=${ARCH:-x86_64} +VERSION=${VERSION:-9.4.3-P4} NUMJOBS=${NUMJOBS:-" -j7 "} BUILD=${BUILD:-1} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi CWD=$(pwd) TMP=/bind-$(mcookie) diff --git a/source/n/bluez-hcidump/bluez-hcidump.SlackBuild b/source/n/bluez-hcidump/bluez-hcidump.SlackBuild index 0bef3fb99..ac2a8442c 100755 --- a/source/n/bluez-hcidump/bluez-hcidump.SlackBuild +++ b/source/n/bluez-hcidump/bluez-hcidump.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006-2010 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,17 +23,32 @@ PKGNAM=bluez-hcidump VERSION=${VERSION:-1.42} -ARCH=${ARCH:-x86_64} +BUILD=${BUILD:-3} + NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-2} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi CWD=$(pwd) @@ -55,6 +70,9 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Patch to build with bluez+>4.61 +zcat $CWD/hci.c_for_bluez-4.61.patch.gz | patch -p1 || exit 1 + # Configure: CFLAGS="$SLKCFLAGS" \ ./configure \ @@ -98,9 +116,17 @@ fi # Add a documentation directory: mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION cp -a \ - AUTHORS COPYING ChangeLog INSTALL NEWS README \ + AUTHORS COPYING* INSTALL NEWS README* \ $PKG/usr/doc/${PKGNAM}-$VERSION +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + mkdir -p $PKG/install #zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/source/n/bluez-hcidump/hci.c_for_bluez-4.61.patch b/source/n/bluez-hcidump/hci.c_for_bluez-4.61.patch new file mode 100644 index 000000000..bcd6b4a0a --- /dev/null +++ b/source/n/bluez-hcidump/hci.c_for_bluez-4.61.patch @@ -0,0 +1,21 @@ +diff -Nur bluez-hcidump-1.42.orig//parser/hci.c bluez-hcidump-1.42/parser/hci.c +--- bluez-hcidump-1.42.orig//parser/hci.c 2008-06-15 07:46:13.000000000 -0500 ++++ bluez-hcidump-1.42/parser/hci.c 2010-03-02 23:15:35.171713301 -0600 +@@ -1973,7 +1973,7 @@ + + static inline void read_inquiry_transmit_power_level_dump(int level, struct frame *frm) + { +- read_inquiry_transmit_power_level_rp *rp = frm->ptr; ++ read_inq_response_tx_power_level_rp *rp = frm->ptr; + + p_indent(level, frm); + printf("status 0x%2.2x level %d\n", rp->status, rp->level); +@@ -2325,7 +2325,7 @@ + case OCF_READ_EXT_INQUIRY_RESPONSE: + read_ext_inquiry_response_dump(level, frm); + return; +- case OCF_READ_INQUIRY_TRANSMIT_POWER_LEVEL: ++ case OCF_READ_INQ_RESPONSE_TX_POWER_LEVEL: + read_inquiry_transmit_power_level_dump(level, frm); + return; + case OCF_READ_DEFAULT_ERROR_DATA_REPORTING: diff --git a/source/n/bluez-hcidump/slack-desc b/source/n/bluez-hcidump/slack-desc index e4c8205c2..591118373 100644 --- a/source/n/bluez-hcidump/slack-desc +++ b/source/n/bluez-hcidump/slack-desc @@ -6,10 +6,10 @@ # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| -bluez-hcidump: bluez-hcidump (Linux Bluetooth(TM) analyzer) +bluez-hcidump: bluez-hcidump (Bluetooth analyzer) bluez-hcidump: -bluez-hcidump: The bluez-hcidump package contains a network analyzer for -bluez-hcidump: Bluetooth(TM). The hcidump utility reads raw HCI data coming from and +bluez-hcidump: The bluez-hcidump package contains a network analyzer for Bluetooth. +bluez-hcidump: This utility (hcidump) utility reads raw HCI data coming from and bluez-hcidump: going to a Bluetooth device and prints commands, events and data. bluez-hcidump: bluez-hcidump: For more info, visit: http://www.bluez.org diff --git a/source/n/bluez-libs/bluez-libs.SlackBuild b/source/n/bluez-libs/bluez-libs.SlackBuild deleted file mode 100755 index e25d346d7..000000000 --- a/source/n/bluez-libs/bluez-libs.SlackBuild +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh - -# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -PKGNAM=bluez-libs -VERSION=${VERSION:-3.36} -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-2} - - -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-${PKGNAM} -rm -rf $PKG -mkdir -p $TMP $PKG - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -fi - -cd $TMP -rm -rf ${PKGNAM}-${VERSION} -tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1 -cd ${PKGNAM}-$VERSION - -# Make sure ownerships and permissions are sane: -chown -R root:root . -find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# Configure: -CFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --mandir=/usr/man \ - --disable-static \ - --build=$ARCH-slackware-linux - -# Build and install: -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG || exit 1 - -# Strip binaries: -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - -# Compress and link manpages, if any: -if [ -d $PKG/usr/man ]; then - ( cd $PKG/usr/man - for manpagedir in $(find . -type d -name "man*") ; do - ( cd $manpagedir - for eachpage in $( find . -type l -maxdepth 1) ; do - ln -s $( readlink $eachpage ).gz $eachpage.gz - rm $eachpage - done - gzip -9 *.* - ) - done - ) -fi - -# Compress info files, if any: -if [ -d $PKG/usr/info ]; then - ( cd $PKG/usr/info - rm -f dir - gzip -9 * - ) -fi - -# Add a documentation directory: -mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION -cp -a \ - AUTHORS COPYING ChangeLog INSTALL NEWS README \ - $PKG/usr/doc/${PKGNAM}-$VERSION - -mkdir -p $PKG/install -#zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz - diff --git a/source/n/bluez-libs/slack-desc b/source/n/bluez-libs/slack-desc deleted file mode 100644 index f9a57e285..000000000 --- a/source/n/bluez-libs/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':'. - - |-----handy-ruler------------------------------------------------------| -bluez-libs: bluez-libs (Bluetooth(TM) wireless libraries) -bluez-libs: -bluez-libs: The bluez-libs package contains an implementation of the Bluetooth(TM) -bluez-libs: wireless standards specifications for Linux. -bluez-libs: -bluez-libs: For more info, visit: http://www.bluez.org -bluez-libs: -bluez-libs: -bluez-libs: -bluez-libs: -bluez-libs: diff --git a/source/n/bluez-utils/60-bluetooth.rules b/source/n/bluez-utils/60-bluetooth.rules deleted file mode 100644 index 0957225fd..000000000 --- a/source/n/bluez-utils/60-bluetooth.rules +++ /dev/null @@ -1,35 +0,0 @@ -# Brain Boxes BL-620 Bluetooth Adapter -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Brain Boxes", SYSFS{prod_id2}=="Bluetooth PC Card", ENV{HCIOPTS}="bboxes", RUN+="bluetooth_serial" - -# Xircom CreditCard Bluetooth Adapter -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Xircom", SYSFS{prod_id3}=="CBT", ENV{HCIOPTS}="xircom", RUN+="bluetooth_serial" - -# Xircom RealPort2 Bluetooth Adapter -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Xircom", SYSFS{prod_id3}=="CBT", ENV{HCIOPTS}="xircom", RUN+="bluetooth_serial" - -# IBM Bluetooth PC Card II -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="IBM", SYSFS{prod_id2}=="Bluetooth PC Card II", ENV{HCIOPTS}="tdk", RUN+="bluetooth_serial" - -# TDK Bluetooth PC Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="TDK", SYSFS{prod_id2}=="Bluetooth PC Card II", ENV{HCIOPTS}="tdk", RUN+="bluetooth_serial" - -# AmbiCom BT2000C Bluetooth PC/CF Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="AmbiCom BT2000C", SYSFS{prod_id2}=="Bluetooth PC/CF Card", ENV{HCIOPTS}="bt2000c", RUN+="bluetooth_serial" - -# COM One Platinium Bluetooth PC Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="COM1 SA", SYSFS{prod_id2}=="MC310 CARD", ENV{HCIOPTS}="comone", RUN+="bluetooth_serial" - -# Sphinx PICO Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="SPHINX", SYSFS{prod_id2}=="BT-CARD", ENV{HCIOPTS}="picocard", RUN+="bluetooth_serial" - -# H-Soft blue+Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="H-Soft", SYSFS{prod_id2}=="Blue+CARD", ENV{HCIOPTS}="$sysfs{manf_id},$sysfs{card_id}", RUN+="bluetooth_serial" - -# Compaq iPAQ Bluetooth Sleeve, Belkin F8T020, any other muppet who used an OXCF950 and didn't bother to program it appropriately. -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="CF CARD", SYSFS{prod_id2}=="GENERIC", ENV{HCIOPTS}="$sysfs{manf_id},$sysfs{card_id}", RUN+="bluetooth_serial" - -# Zoom Bluetooth Card and Sitecom CN-504 Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="PCMCIA", SYSFS{prod_id2}=="Bluetooth Card", ENV{HCIOPTS}="zoom", RUN+="bluetooth_serial" - -# CC&C BT0100M -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Bluetooth BT0100M", ENV{HCIOPTS}="bcsp 115200", RUN+="bluetooth_serial" diff --git a/source/n/bluez-utils/README.SLACKWARE b/source/n/bluez-utils/README.SLACKWARE deleted file mode 100644 index 795c8c5a2..000000000 --- a/source/n/bluez-utils/README.SLACKWARE +++ /dev/null @@ -1,18 +0,0 @@ -PIN (or passkey) management ---------------------------- -since bluez 3.0 the old pin_helper script has been replaced by -the dbus interface. To add a default passkey for every outgoing -request (e.g. the old /etc/bluetooth/pin file) drop it into -/etc/bluetooth/passkeys/default. (e.g. echo -n "1234" > -/etc/bluetooth/passkeys/default ) -To add a passkey for a specific outgoing connection replace default -with the device's address. ( /etc/bluetooth/passkeys/aa:bb:cc:dd:ee:ff -will contain passkey for aa:bb:cc:dd:ee:ff ). -After adding a passkey you should restart bluetooth with - -/etc/init.d/bluetooth restart - -and the new passkeys will be registered. - - -(This behaviour has been copied from Debian) diff --git a/source/n/bluez-utils/add-passkey.c b/source/n/bluez-utils/add-passkey.c deleted file mode 100644 index b9dcbb517..000000000 --- a/source/n/bluez-utils/add-passkey.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * add-passkey.c: - * registers as an agent for the bluez bluetooth linux stack, the code is - * shamelessly stolen from bluez source found at http://bluez.sf.net - * - * BlueZ - Bluetooth protocol stack for Linux - * - * Copyright (C) 2005-2006 Marcel Holtmann - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include - -#define INTERFACE "org.bluez.Security" - -// FIXME assumption -#define PASSKEYMAXLENGTH 255 - -static char *passkey = NULL; -static char *address = NULL; - -static volatile sig_atomic_t __io_canceled = 0; -static volatile sig_atomic_t __io_terminated = 0; - -static void sig_term(int sig) -{ - __io_canceled = 1; -} - -static DBusHandlerResult agent_filter(DBusConnection *conn, - DBusMessage *msg, void *data) -{ - const char *name, *old, *new; - - if (!dbus_message_is_signal(msg, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - - if (!dbus_message_get_args(msg, NULL, - DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &old, - DBUS_TYPE_STRING, &new, DBUS_TYPE_INVALID)) { - fprintf(stderr, "Invalid arguments for NameOwnerChanged signal"); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - - if (!strcmp(name, "org.bluez") && *new == '\0') { - __io_terminated = 1; - } - - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -static DBusHandlerResult request_message(DBusConnection *conn, - DBusMessage *msg, void *data) -{ - DBusMessage *reply; - const char *path, *address; - - if (!passkey) - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - - if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &path, - DBUS_TYPE_STRING, &address, DBUS_TYPE_INVALID)) { - fprintf(stderr, "Invalid arguments for passkey Request method"); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - - reply = dbus_message_new_method_return(msg); - if (!reply) { - fprintf(stderr, "Can't create reply message\n"); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - - dbus_message_append_args(reply, DBUS_TYPE_STRING, &passkey, - DBUS_TYPE_INVALID); - - dbus_connection_send(conn, reply, NULL); - - dbus_connection_flush(conn); - - dbus_message_unref(reply); - - return DBUS_HANDLER_RESULT_HANDLED; -} - -static DBusHandlerResult release_message(DBusConnection *conn, - DBusMessage *msg, void *data) -{ - DBusMessage *reply; - - if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_INVALID)) { - fprintf(stderr, "Invalid arguments for passkey Release method"); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - - reply = dbus_message_new_method_return(msg); - if (!reply) { - fprintf(stderr, "Can't create reply message\n"); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; - } - - dbus_message_append_args(reply, DBUS_TYPE_INVALID); - - dbus_connection_send(conn, reply, NULL); - - dbus_connection_flush(conn); - - dbus_message_unref(reply); - - if (!__io_canceled) - fprintf(stderr, "Passkey service has been released\n"); - - __io_terminated = 1; - - return DBUS_HANDLER_RESULT_HANDLED; -} - -static DBusHandlerResult agent_message(DBusConnection *conn, - DBusMessage *msg, void *data) -{ - if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Request")) - return request_message(conn, msg, data); - - if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Release")) - return release_message(conn, msg, data); - - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; -} - -static const DBusObjectPathVTable agent_table = { - .message_function = agent_message, -}; - -static int register_agent(DBusConnection *conn, const char *agent_path, - const char *remote_address, int use_default) -{ - DBusMessage *msg, *reply; - DBusError err; - const char *path, *method, *address = remote_address; - - if (!dbus_connection_register_object_path(conn, agent_path, - &agent_table, NULL)) { - fprintf(stderr, "Can't register path object path for agent\n"); - return -1; - } - - if (use_default) { - path = "/org/bluez"; - method = "RegisterDefaultPasskeyAgent"; - } else { - path = "/org/bluez/hci0"; - method = "RegisterPasskeyAgent"; - } - - msg = dbus_message_new_method_call("org.bluez", path, INTERFACE, method); - if (!msg) { - fprintf(stderr, "Can't allocate new method call\n"); - return -1; - } - - if (use_default) - dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, - DBUS_TYPE_INVALID); - else - dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, - DBUS_TYPE_STRING, &address, DBUS_TYPE_INVALID); - - dbus_error_init(&err); - - reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err); - - dbus_message_unref(msg); - - if (!reply) { - fprintf(stderr, "Can't register passkey agent\n"); - if (dbus_error_is_set(&err)) { - fprintf(stderr, "%s\n", err.message); - dbus_error_free(&err); - } - return -1; - } - - dbus_message_unref(reply); - - dbus_connection_flush(conn); - - return 0; -} - -static int unregister_agent(DBusConnection *conn, const char *agent_path, - const char *remote_address, int use_default) -{ - DBusMessage *msg, *reply; - DBusError err; - const char *path, *method, *address = remote_address; - - if (use_default) { - path = "/org/bluez"; - method = "UnregisterDefaultPasskeyAgent"; - } else { - path = "/org/bluez/hci0"; - method = "UnregisterPasskeyAgent"; - } - - msg = dbus_message_new_method_call("org.bluez", path, INTERFACE, method); - if (!msg) { - fprintf(stderr, "Can't allocate new method call\n"); - dbus_connection_close(conn); - exit(1); - } - - if (use_default) - dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, - DBUS_TYPE_INVALID); - else - dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, - DBUS_TYPE_STRING, &address, DBUS_TYPE_INVALID); - - dbus_error_init(&err); - - reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err); - - dbus_message_unref(msg); - - if (!reply) { - fprintf(stderr, "Can't unregister passkey agent\n"); - if (dbus_error_is_set(&err)) { - fprintf(stderr, "%s\n", err.message); - dbus_error_free(&err); - } - return -1; - } - - dbus_message_unref(reply); - - dbus_connection_flush(conn); - - dbus_connection_unregister_object_path(conn, agent_path); - - return 0; -} - -static void usage(void) -{ -// printf("Bluetooth passkey agent ver %s\n\n", VERSION); - - printf("Usage:\n" - "\tadd-passkey [--passkey-fd n] [--default] [--path agent-path] [address]\n" - "\n" - "add-passkey will read from passkey-fd (default: stdin) adding a default passkey\n" - "if --default is given, or for a specific address if supplied on commandline.\n\n" - "--default or address are mandatory.\n" - "this program is based on bluez passkey-agent.c from http://bluez.sf.net\n" - "\n"); -} - -static struct option main_options[] = { - { "passkey-fd", 1, 0, 'f'}, - { "default", 0, 0, 'd' }, - { "path", 1, 0, 'p' }, - { "help", 0, 0, 'h' }, - { 0, 0, 0, 0 } -}; - -int main(int argc, char *argv[]) -{ - struct sigaction sa; - DBusConnection *conn; - char match_string[128], default_path[128], *agent_path = NULL; - int opt, use_default = 0, passkey_fd = 0; - char *tmppasskey; - - snprintf(default_path, sizeof(default_path), - "/org/bluez/passkey_agent_%d", getpid()); - - while ((opt = getopt_long(argc, argv, "+fdp:h", main_options, NULL)) != EOF) { - switch(opt) { - case 'f': - passkey_fd = atoi(optarg); - case 'd': - use_default = 1; - break; - case 'p': - if (optarg[0] != '/') { - fprintf(stderr, "Invalid path\n"); - exit(1); - } - agent_path = strdup(optarg); - break; - case 'h': - usage(); - exit(0); - default: - exit(1); - } - } - - argc -= optind; - argv += optind; - optind = 0; - - if (argc < 1 && !use_default) { - usage(); - exit(1); - } - - passkey = malloc(PASSKEYMAXLENGTH * sizeof(char)); - - if (!read(passkey_fd, passkey, PASSKEYMAXLENGTH)) { - fprintf(stderr, "Unable to read passkey from fd %d\n", passkey_fd); - exit(1); - } - - if (tmppasskey = index(passkey, '\n')) { - *tmppasskey = '\0'; - } - - address = (argc > 0) ? strdup(argv[0]) : NULL; - - if (!use_default && !address) { - usage(); - exit(1); - } - - if (!agent_path) - agent_path = strdup(default_path); - - conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL); - if (!conn) { - fprintf(stderr, "Can't get on system bus"); - exit(1); - } - - if (register_agent(conn, agent_path, address, use_default) < 0) { - dbus_connection_close(conn); - exit(1); - } - - if (!dbus_connection_add_filter(conn, agent_filter, NULL, NULL)) - fprintf(stderr, "Can't add signal filter"); - - snprintf(match_string, sizeof(match_string), - "interface=%s,member=NameOwnerChanged,arg0=%s", - DBUS_INTERFACE_DBUS, "org.bluez"); - - dbus_bus_add_match(conn, match_string, NULL); - - memset(&sa, 0, sizeof(sa)); - sa.sa_flags = SA_NOCLDSTOP; - sa.sa_handler = sig_term; - sigaction(SIGTERM, &sa, NULL); - sigaction(SIGINT, &sa, NULL); - - while (!__io_canceled && !__io_terminated) { - if (dbus_connection_read_write_dispatch(conn, 100) != TRUE) - break; - } - - if (!__io_terminated) - unregister_agent(conn, agent_path, address, use_default); - - if (passkey) - free(passkey); - - dbus_connection_close(conn); - - return 0; -} diff --git a/source/n/bluez-utils/bluetooth.conf b/source/n/bluez-utils/bluetooth.conf deleted file mode 100644 index c0476237a..000000000 --- a/source/n/bluez-utils/bluetooth.conf +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/n/bluez-utils/bluez-utils.SlackBuild b/source/n/bluez-utils/bluez-utils.SlackBuild deleted file mode 100755 index 7f8b95746..000000000 --- a/source/n/bluez-utils/bluez-utils.SlackBuild +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/sh -# -# SlackBuild for bluez-utils -# http://www.bluez.org -# By SukkoPera -# Thanks a lot to CAT for his Slackware package cration -# guide (http://www.slacky.it/misto/tutorial/spunleashed.txt) -# -# Check out -# - http://www.sukkopera.tk -# - http://www.slacky.it -# - http://www.nyft.org -# -# Notes: -# - Many files and the whole PIN management system have been stolen from the -# Debian package. Thanks. -# -# Rewritten for Slackware 2007-05 - -NAME=bluez-utils -VERSION=${VERSION:-3.36} -ARCH=${ARCH:-x86_64} -NUMJOBS=${NUMJOBS:-" -j7 "} -BUILD=${BUILD:-7} - - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-$NAME - -rm -rf $PKG -mkdir -p $TMP $PKG -mkdir -p $PKG/etc/rc.d \ - $PKG/etc/bluetooth/passkeys \ - $PKG/usr/lib${LIBDIRSUFFIX}/bluetooth -# Is there any reason for a non-root user to be able to see these? -chmod 700 $PKG/etc/bluetooth/passkeys -cd $TMP -rm -rf $NAME-$VERSION -tar xvf $CWD/${NAME}-${VERSION}.tar.bz2 || exit 1 -cd $NAME-$VERSION - -chown -R root:root . -find . \ - \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --mandir=/usr/man \ - --localstatedir=/var \ - --enable-tools\ - --enable-bccmd \ - --enable-hid2hci \ - --enable-dfutool \ - --enable-hidd \ - --enable-pand \ - --enable-dund \ - --enable-cups \ - --enable-manpages \ - --enable-configfiles \ - --build=$ARCH-slackware-linux - -make $NUMJOBS || make || exit 1 -make install DESTDIR=$PKG - -mkdir -p $PKG/lib/udev -cp -a scripts/bluetooth_serial $PKG/lib/udev/bluetooth_serial || exit 1 -chmod 755 $PKG/lib/udev/bluetooth_serial - -mkdir -p $PKG/lib/udev/rules.d -cp -a scripts/bluetooth.rules $PKG/lib/udev/rules.d/60-bluetooth.rules || exit 1 -chmod 644 $PKG/lib/udev/rules.d/60-bluetooth.rules - -# This appears to be gone/obsolete: -#if [ ! -e $PKG/etc/bluetooth/transfer.service ]; then -# cat transfer/transfer.service > $PKG/etc/bluetooth/transfer.service -#fi -#if [ ! -e $PKG/usr/lib${LIBDIRSUFFIX}/bluetooth/bluetoothd-service-transfer -a -e transfer/bluetoothd-service-transfer ]; then -# cat transfer/bluetoothd-service-transfer > $PKG/usr/lib${LIBDIRSUFFIX}/bluetooth/bluetoothd-service-transfer -# chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/bluetooth/bluetoothd-service-transfer -#fi - -# Install Debian's add-passkey program: -DEBDEST=/usr/lib${LIBDIRSUFFIX}/bluetooth -gcc $(pkg-config --libs --cflags dbus-1) -DDBUS_API_SUBJECT_TO_CHANGE \ - $CWD/add-passkey.c -o $PKG/$DEBDEST/add-passkey || exit 1 -cp $CWD/register-passkeys $PKG/$DEBDEST -if [ "$ARCH" = "x86_64" ]; then - sed -i "s,/usr/lib/,/usr/lib${LIBDIRSUFFIX}/,g" $PKG/$DEBDEST/register-passkeys -fi -chmod a+x $PKG/$DEBDEST/* - -# Default PIN (wow, does this seem insecure!) -#echo "1234" > $PKG/etc/bluetooth/passkeys/default -touch $PKG/etc/bluetooth/passkeys/default - -mkdir -p $PKG/usr/doc/$NAME-$VERSION -cp -a \ - AUTHORS ChangeLog COPYING* INSTALL NEWS README $CWD/README.SLACKWARE \ - $PKG/usr/doc/$NAME-$VERSION -( cd $PKG/etc/bluetooth - ln -sf /usr/doc/$NAME-$VERSION/README.SLACKWARE . -) - -# Arrange init scripts and config files: -CONF=/etc/rc.d/rc.bluetooth.conf -mkdir -p $PKG/etc/rc.d -cp $CWD/rc.bluetooth $PKG/etc/rc.d/rc.bluetooth -if [ "$ARCH" = "x86_64" ]; then - sed -i "s,/usr/lib/,/usr/lib${LIBDIRSUFFIX}/,g" $PKG/etc/rc.d/rc.bluetooth -fi -cp -a $CWD/rc.bluetooth.conf $PKG/etc/rc.d/rc.bluetooth.conf -sed -i "s:\(HIDD_ENABLE=\).*:\1false:" $PKG/$CONF || exit 1 -sed -i "s:\(HID2HCI_ENABLE=\).*:\1false:" $PKG/$CONF || exit 1 - -mkdir -p $PKG/etc/bluetooth -cp -a audio/audio.conf $PKG/etc/bluetooth -cp -a audio/asound.conf $PKG/etc/bluetooth -cp -a input/input.conf $PKG/etc/bluetooth -cp -a hcid/hcid.conf $PKG/etc/bluetooth -cp -a network/network.conf $PKG/etc/bluetooth -cp -a rfcomm/rfcomm.conf $PKG/etc/bluetooth -chmod 644 $PKG/etc/bluetooth/*.conf - -# Do not overwrite configuration -# Well, let the dbus file be overwritten, as it is not usually user-edited. -( cd $PKG - for file in \ - etc/bluetooth/audio.conf \ - etc/asound.conf \ - etc/bluetooth/asound.conf \ - etc/bluetooth/input.conf \ - etc/bluetooth/hcid.conf \ - etc/bluetooth/network.conf \ - etc/bluetooth/rfcomm.conf \ - etc/bluetooth/passkeys/default \ - etc/rc.d/rc.bluetooth \ - etc/rc.d/rc.bluetooth.conf ; do - mv ${file} ${file}.new - done -) - -# Replace the bluetooth.conf file with one from BlueZ4 that works with the newest dbus: -cat $CWD/bluetooth.conf > $PKG/etc/dbus-1/system.d/bluetooth.conf - -# Compress and if needed symlink the man pages: -if [ -d $PKG/usr/man ]; then - ( cd $PKG/usr/man - for manpagedir in $(find . -type d -name "man*") ; do - ( cd $manpagedir - for eachpage in $( find . -type l -maxdepth 1) ; do - ln -s $( readlink $eachpage ).gz $eachpage.gz - rm $eachpage - done - gzip -9 *.? - ) - done - ) -fi - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc -zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh - -cd $PKG -/sbin/makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.txz - diff --git a/source/n/bluez-utils/doinst.sh b/source/n/bluez-utils/doinst.sh deleted file mode 100644 index e738d14bd..000000000 --- a/source/n/bluez-utils/doinst.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -config() { - NEW="$1" - OLD="`dirname $NEW`/`basename $NEW .new`" - # If there's no config file by that name, mv it over: - if [ ! -r $OLD ]; then - mv $NEW $OLD - elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy - rm $NEW - fi - # Otherwise, we leave the .new copy for the admin to consider... -} -if [ ! -e etc/rc.d/rc.bluetooth -o ! -x etc/rc.d/rc.bluetooth ]; then - chmod 644 etc/rc.d/rc.bluetooth.new -else - chmod 755 etc/rc.d/rc.bluetooth.new -fi -config etc/rc.d/rc.bluetooth.new -config etc/rc.d/rc.bluetooth.conf.new -config etc/bluetooth/asound.conf.new -config etc/bluetooth/audio.conf.new -config etc/bluetooth/hcid.conf.new -config etc/bluetooth/input.conf.new -config etc/bluetooth/network.conf.new -config etc/bluetooth/rfcomm.conf.new -config etc/bluetooth/passkeys/default.new - -if [ ! -e etc/asound.conf ]; then - ( cd etc ; ln -sf bluetooth/asound.conf . ) -fi diff --git a/source/n/bluez-utils/rc.bluetooth b/source/n/bluez-utils/rc.bluetooth deleted file mode 100644 index cf891dcf9..000000000 --- a/source/n/bluez-utils/rc.bluetooth +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/sh -# -# Start/stop the Bluetooth daemons -# -# This version has been modified by SukkoPera, taking inspiration from then -# Debian init script, to add support for register-passkeys. Modified by -# Patrick Volkerding to add "restart" support, and cleaned up a tiny bit. - -set -e - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DESC="Bluetooth subsystem" - -# The register-passkeys script was originally written by Debian: -REGISTER_PASSKEYS=/usr/lib/bluetooth/register-passkeys - -HCID_NAME=hcid -HIDD_NAME=hidd -HID2HCI_NAME=hid2hci -RFCOMM_NAME=rfcomm -PAND_NAME=pand -DUND_NAME=dund - -HCID_EXEC="`which $HCID_NAME || true`" -HIDD_EXEC="`which $HIDD_NAME || true`" -HID2HCI_EXEC="`which $HID2HCI_NAME || true`" -RFCOMM_EXEC="`which $RFCOMM_NAME || true`" -PAND_EXEC="`which $PAND_NAME || true`" -DUND_EXEC="`which $DUND_NAME || true`" - -HCID_CONFIG="/etc/bluetooth/hcid.conf" -RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf" - -# Source rc.bluetooth.conf -. /etc/rc.d/rc.bluetooth.conf - -bluetooth_start() { - echo -n "Starting $DESC: " - if [ -x "$HIDD_EXEC" ] ; then - if $HIDD_ENABLE && [ -x "$HIDD_EXEC" -a -n "$HIDD_OPTIONS" ] ; then - $HIDD_EXEC $HIDD_OPTIONS || true - echo -n " $HIDD_NAME" - fi - else - echo "BlueZ does not appear to be installed!" - exit - fi - # Separate sdp daemon is depreciated, now internal function. - if $SDPD_ENABLE ; then - $HCID_EXEC -s -f $HCID_CONFIG - echo -n " $HCID_NAME sdp" - else - $HCID_EXEC -f $HCID_CONFIG - echo -n " $HCID_NAME" - fi - if $HID2HCI_ENABLE && [ -x "$HID2HCI_EXEC" ] ; then - $HID2HCI_EXEC --tohci > /dev/null 2>&1 || true - echo -n " $HID2HCI_NAME" - fi - if $RFCOMM_ENABLE && [ -x "$RFCOMM_EXEC" -a -f "$RFCOMM_CONFIG" ] ; then - $RFCOMM_EXEC -f $RFCOMM_CONFIG bind all || true - echo -n " $RFCOMM_NAME" - fi - if $DUND_ENABLE && [ -x "$DUND_EXEC" -a -n "$DUND_OPTIONS" ] ; then - $DUND_EXEC $DUND_OPTIONS - echo -n " $DUND_NAME" - fi - if $PAND_ENABLE && [ -x "$PAND_EXEC" -a -n "$PAND_OPTIONS" ] ; then - $PAND_EXEC $PAND_OPTIONS - echo -n " $PAND_NAME" - fi - if [ -x $REGISTER_PASSKEYS ]; then - $REGISTER_PASSKEYS - echo -n " passkeys" - fi - echo "." -} - -bluetooth_stop() { - echo -n "Stopping $DESC: " - killall $PAND_NAME > /dev/null 2>&1 || true - echo -n " $PAND_NAME" - killall $DUND_NAME > /dev/null 2>&1 || true - echo -n " $DUND_NAME" - if [ -x "$RFCOMM_EXEC" ] ; then - $RFCOMM_EXEC release all > /dev/null 2>&1 || true - echo -n " $RFCOMM_NAME" - fi - killall $HIDD_NAME > /dev/null 2>&1 || true - echo -n " $HIDD_NAME" - killall $HCID_NAME > /dev/null 2>&1 || true - echo -n " $HCID_NAME" - echo "." -} - -case "$1" in - start) - bluetooth_start - ;; - stop) - bluetooth_stop - ;; - restart) - bluetooth_stop - sleep 1 - bluetooth_start - ;; - *) - echo "Usage: $0 start|stop|restart" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/source/n/bluez-utils/rc.bluetooth.conf b/source/n/bluez-utils/rc.bluetooth.conf deleted file mode 100644 index 09df405fb..000000000 --- a/source/n/bluez-utils/rc.bluetooth.conf +++ /dev/null @@ -1,33 +0,0 @@ -# /etc/rc.d/rc.bluetooth.conf -# -# This file contains the configuration for the Bluetooth subsystem, BlueZ. - -# The lines below allow you to configure which BlueZ daemons will be started, -# along with any daemon-specific options. - -# Allowed values for each (unless otherwise noted) are "true" and "false" - -# ============================================================================= - -# The SDP daemon allows clients to detect supported Bluetooth services -SDPD_ENABLE=true - -# The HID daemon supports Bluetooth Human Interface Devices -HIDD_ENABLE=false -HIDD_OPTIONS="--server" - -# This switches your Bluetooth device into HCI mode, use this if your input -# device does not support Bluetooth HID -HID2HCI_ENABLE=false - -# The RFCOMM daemon is used to simulate serial connections over Bluetooth -RFCOMM_ENABLE=true - -# The DUN daemon is used for Dial Up Networking over Bluetooth -DUND_ENABLE=false -DUND_OPTIONS="--listen --persist --msdun call dun" - -# The PAN daemon is used to setup a Bluetooth network. -PAND_ENABLE=false -PAND_OPTIONS="--listen --role NAP" - diff --git a/source/n/bluez-utils/register-passkeys b/source/n/bluez-utils/register-passkeys deleted file mode 100644 index f57042c3c..000000000 --- a/source/n/bluez-utils/register-passkeys +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# register every passkey found in $PASSKEYS_DIR - -PASSKEYS_DIR="/etc/bluetooth/passkeys/" -PASSKEY_AGENT="/usr/lib/bluetooth/add-passkey" - -cd $PASSKEYS_DIR - -for f in $(ls -1 ${PASSKEYS_DIR}); do - if [ ! -r "$f" ]; then continue; fi - - # default passkey - if [ "$f" == "default" ]; then - cat "$f" | $PASSKEY_AGENT --default > /dev/null 2>&1 & - # specific passkey - elif echo "$f" | egrep -q '([0-9a-fA-F]{1,2}:){5}[0-9a-fA-F]{1,2}'; then - cat "$f" | $PASSKEY_AGENT "$f" > /dev/null 2>&1 & - fi -done diff --git a/source/n/bluez-utils/slack-desc b/source/n/bluez-utils/slack-desc deleted file mode 100644 index 159f02466..000000000 --- a/source/n/bluez-utils/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line -# up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':'. - - |-----handy-ruler------------------------------------------------------| -bluez-utils: bluez-utils (Utilities for working with Bluetooth(TM)) -bluez-utils: -bluez-utils: The bluez-utils package contains utilities for supporting -bluez-utils: Bluetooth(TM) on Linux. -bluez-utils: -bluez-utils: For more info, visit: http://www.bluez.org -bluez-utils: -bluez-utils: -bluez-utils: -bluez-utils: -bluez-utils: diff --git a/source/n/bluez/bluez.SlackBuild b/source/n/bluez/bluez.SlackBuild new file mode 100755 index 000000000..ec5cba262 --- /dev/null +++ b/source/n/bluez/bluez.SlackBuild @@ -0,0 +1,196 @@ +#!/bin/sh + +# Slackware build script for bluez-utils - http://www.bluez.org + +# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PKGNAM=bluez +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +NUMJOBS=${NUMJOBS:-" -j7 "} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/${PKGNAM}-${VERSION}.tar.?z* || exit 1 +cd $PKGNAM-$VERSION + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Fixup the dbus config file for our usage: +zcat $CWD/patches/bluez-dbus-config.patch.gz | patch -p1 --verbose || exit 1 + +# Use a wrapper to check rc.bluetooth mode before starting bluetoothd +zcat $CWD/patches/bluez-run_udev_helper.patch.gz | patch -p1 --verbose || exit 1 + +# Unbreak a Dell USB mouse +# https://bugzilla.novell.com/show_bug.cgi?id=522287 +# https://bugzilla.redhat.com/show_bug.cgi?id=517088 +zcat $CWD/patches/bluez-unbreak_dell_mouse.patch.gz | patch -p1 --verbose || exit 1 + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --mandir=/usr/man \ + --localstatedir=/var \ + --enable-gstreamer \ + --enable-alsa \ + --enable-usb \ + --enable-netlink \ + --enable-tools\ + --enable-bccmd \ + --enable-hid2hci \ + --enable-dfutool \ + --enable-hidd \ + --enable-pand \ + --enable-dund \ + --enable-cups \ + --enable-service \ + --enable-udevrules \ + --enable-configfiles \ + --disable-silent-rules \ + --build=$ARCH-slackware-linux + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG + +# I'm don't think we need this, but I'll leave it commented just in case: +# http://bugs.archlinux.org/task/4930 +# The dbus-1 and bluetooth linkages are obvious, but I had to get the rt and +# pthread ones from the old bluez-utils (VERSION=3.36) tests/Makefile +#gcc $SLKCFLAGS $(pkg-config --cflags dbus-1) -DVERSION=3.36 \ +# -L$(pwd)/lib/.libs -ldbus-1 -lbluetooth -lpthread -lrt \ +# $CWD/passkey-agent.c -o $PKG/usr/bin/passkey-agent || exit 1 + +cp -a scripts/bluetooth_serial $PKG/lib/udev/bluetooth_serial || exit 1 +chmod 0755 $PKG/lib/udev/bluetooth_serial + +cat $CWD/config/bluetooth.sh > $PKG/lib/udev/bluetooth.sh +chmod 0755 $PKG/lib/udev/bluetooth.sh + +# SuSE says this is safe... :-) +mkdir -p $PKG/etc/modprobe.d +cat $CWD/config/bluetooth.modprobe > $PKG/etc/modprobe.d/bluetooth.conf + +mkdir -p $PKG/etc/bluetooth +cp -a audio/audio.conf $PKG/etc/bluetooth +cp -a input/input.conf $PKG/etc/bluetooth +cp -a network/network.conf $PKG/etc/bluetooth +cp -a serial/serial.conf $PKG/etc/bluetooth +cp -a tools/rfcomm.conf $PKG/etc/bluetooth +chmod 644 $PKG/etc/bluetooth/*.conf + +# Do not overwrite configuration +# Well, let the dbus file be overwritten, as it is not usually user-edited. +( cd $PKG + for file in \ + etc/alsa/bluetooth.conf \ + etc/bluetooth/audio.conf \ + etc/bluetooth/input.conf \ + etc/bluetooth/network.conf \ + etc/bluetooth/serial.conf \ + etc/bluetooth/rfcomm.conf \ + etc/bluetooth/main.conf \ + etc/modprobe.d/bluetooth.conf ; do + mv ${file} ${file}.new + done +) + +# Add an init script +mkdir -p $PKG/etc/rc.d +cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new + +# Compress and if needed symlink the man pages: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a \ + AUTHORS COPYING* INSTALL NEWS README* \ + $PKG/usr/doc/$PKGNAM-$VERSION + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz + diff --git a/source/n/bluez/config/bluetooth.modprobe b/source/n/bluez/config/bluetooth.modprobe new file mode 100644 index 000000000..3072d7885 --- /dev/null +++ b/source/n/bluez/config/bluetooth.modprobe @@ -0,0 +1,3 @@ +# use "reset=1" as default, since it should be safe for recent devices and +# solves all kind of problems. +options btusb reset=1 diff --git a/source/n/bluez/config/bluetooth.sh b/source/n/bluez/config/bluetooth.sh new file mode 100644 index 000000000..22034551c --- /dev/null +++ b/source/n/bluez/config/bluetooth.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Check whether /etc/rc.d/rc.bluetooth is executable before starting +# the bluetooth subsystem for hotplugged bluetooth devices +[ -x /etc/rc.d/rc.bluetooth ] && exec /usr/sbin/bluetoothd --udev +exit 0 + diff --git a/source/n/bluez/config/rc.bluetooth b/source/n/bluez/config/rc.bluetooth new file mode 100644 index 000000000..12540d833 --- /dev/null +++ b/source/n/bluez/config/rc.bluetooth @@ -0,0 +1,30 @@ +#!/bin/sh + +bluez_start() { + # bluetoothd requires dbus, but dbus isn't started early enough during + # system boot, so we have to re-trigger the events now + udevadm trigger --subsystem-match=bluetooth --action=add +} + +bluez_stop() { + pkill -TERM bluetoothd 1>/dev/null 2>/dev/null +} + +case "$1" in + start) + bluez_start + ;; + stop) + bluez_stop + ;; + restart) + bluez_stop + sleep 1 + bluez_start + ;; + *) + printf "Usage: $N {start|stop|restart}\n" + exit 1 + ;; +esac + diff --git a/source/n/bluez/doinst.sh b/source/n/bluez/doinst.sh new file mode 100644 index 000000000..1711435e0 --- /dev/null +++ b/source/n/bluez/doinst.sh @@ -0,0 +1,29 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.bluetooth.new: +if [ -e etc/rc.d/rc.bluetooth ]; then + cp -a etc/rc.d/rc.bluetooth etc/rc.d/rc.bluetooth.new.incoming + cat etc/rc.d/rc.bluetooth.new > etc/rc.d/rc.bluetooth.new.incoming + mv etc/rc.d/rc.bluetooth.new.incoming etc/rc.d/rc.bluetooth.new +fi + +config etc/alsa/bluetooth.conf.new +config etc/rc.d/rc.bluetooth.new +config etc/bluetooth/audio.conf.new +config etc/bluetooth/input.conf.new +config etc/bluetooth/main.conf.new +config etc/bluetooth/network.conf.new +config etc/bluetooth/serial.conf.new +config etc/bluetooth/rfcomm.conf.new +config etc/modprobe.d/bluetooth.conf.new + diff --git a/source/n/bluez/passkey-agent.c b/source/n/bluez/passkey-agent.c new file mode 100644 index 000000000..8ac91d27d --- /dev/null +++ b/source/n/bluez/passkey-agent.c @@ -0,0 +1,418 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2004-2008 Marcel Holtmann + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include + +#define INTERFACE "org.bluez.Security" + +static char *passkey = NULL; +static char *address = NULL; + +static int do_reject = 0; + +static volatile sig_atomic_t __io_canceled = 0; +static volatile sig_atomic_t __io_terminated = 0; + +static void sig_term(int sig) +{ + __io_canceled = 1; +} + +static DBusHandlerResult agent_filter(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + const char *name, *old, *new; + + if (!dbus_message_is_signal(msg, DBUS_INTERFACE_DBUS, "NameOwnerChanged")) + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + + if (!dbus_message_get_args(msg, NULL, + DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &old, + DBUS_TYPE_STRING, &new, DBUS_TYPE_INVALID)) { + fprintf(stderr, "Invalid arguments for NameOwnerChanged signal"); + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } + + if (!strcmp(name, "org.bluez") && *new == '\0') { + fprintf(stderr, "Passkey service has been terminated\n"); + __io_terminated = 1; + } + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +static DBusHandlerResult request_message(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + DBusMessage *reply; + const char *path, *address; + dbus_bool_t numeric; + + if (!passkey) + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + + if (!dbus_message_get_args(msg, NULL, + DBUS_TYPE_STRING, &path, DBUS_TYPE_STRING, &address, + DBUS_TYPE_BOOLEAN, &numeric, DBUS_TYPE_INVALID)) { + fprintf(stderr, "Invalid arguments for passkey Request method"); + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } + + if (do_reject) { + reply = dbus_message_new_error(msg, + "org.bluez.Error.Rejected", ""); + goto send; + } + + reply = dbus_message_new_method_return(msg); + if (!reply) { + fprintf(stderr, "Can't create reply message\n"); + return DBUS_HANDLER_RESULT_NEED_MEMORY; + } + + printf("Passkey request for device %s\n", address); + + dbus_message_append_args(reply, DBUS_TYPE_STRING, &passkey, + DBUS_TYPE_INVALID); + +send: + dbus_connection_send(conn, reply, NULL); + + dbus_connection_flush(conn); + + dbus_message_unref(reply); + + return DBUS_HANDLER_RESULT_HANDLED; +} + +static DBusHandlerResult cancel_message(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + DBusMessage *reply; + const char *path, *address; + + if (!dbus_message_get_args(msg, NULL, + DBUS_TYPE_STRING, &path, DBUS_TYPE_STRING, &address, + DBUS_TYPE_INVALID)) { + fprintf(stderr, "Invalid arguments for passkey Confirm method"); + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } + + printf("Request canceled for device %s\n", address); + + reply = dbus_message_new_method_return(msg); + if (!reply) { + fprintf(stderr, "Can't create reply message\n"); + return DBUS_HANDLER_RESULT_NEED_MEMORY; + } + + dbus_connection_send(conn, reply, NULL); + + dbus_connection_flush(conn); + + dbus_message_unref(reply); + + return DBUS_HANDLER_RESULT_HANDLED; +} + +static DBusHandlerResult release_message(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + DBusMessage *reply; + + if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_INVALID)) { + fprintf(stderr, "Invalid arguments for passkey Release method"); + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } + + if (!__io_canceled) + fprintf(stderr, "Passkey service has been released\n"); + + __io_terminated = 1; + + reply = dbus_message_new_method_return(msg); + if (!reply) { + fprintf(stderr, "Can't create reply message\n"); + return DBUS_HANDLER_RESULT_NEED_MEMORY; + } + + dbus_connection_send(conn, reply, NULL); + + dbus_connection_flush(conn); + + dbus_message_unref(reply); + + return DBUS_HANDLER_RESULT_HANDLED; +} + +static DBusHandlerResult agent_message(DBusConnection *conn, + DBusMessage *msg, void *data) +{ + if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Request")) + return request_message(conn, msg, data); + + if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Cancel")) + return cancel_message(conn, msg, data); + + if (dbus_message_is_method_call(msg, "org.bluez.PasskeyAgent", "Release")) + return release_message(conn, msg, data); + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +static const DBusObjectPathVTable agent_table = { + .message_function = agent_message, +}; + +static int register_agent(DBusConnection *conn, const char *agent_path, + const char *remote_address, int use_default) +{ + DBusMessage *msg, *reply; + DBusError err; + const char *path, *method, *address = remote_address; + + if (!dbus_connection_register_object_path(conn, agent_path, + &agent_table, NULL)) { + fprintf(stderr, "Can't register object path for agent\n"); + return -1; + } + + if (use_default) { + path = "/org/bluez"; + method = "RegisterDefaultPasskeyAgent"; + } else { + path = "/org/bluez/hci0"; + method = "RegisterPasskeyAgent"; + } + + msg = dbus_message_new_method_call("org.bluez", path, INTERFACE, method); + if (!msg) { + fprintf(stderr, "Can't allocate new method call\n"); + return -1; + } + + if (use_default) + dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, + DBUS_TYPE_INVALID); + else + dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, + DBUS_TYPE_STRING, &address, DBUS_TYPE_INVALID); + + dbus_error_init(&err); + + reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err); + + dbus_message_unref(msg); + + if (!reply) { + fprintf(stderr, "Can't register passkey agent\n"); + if (dbus_error_is_set(&err)) { + fprintf(stderr, "%s\n", err.message); + dbus_error_free(&err); + } + return -1; + } + + dbus_message_unref(reply); + + dbus_connection_flush(conn); + + return 0; +} + +static int unregister_agent(DBusConnection *conn, const char *agent_path, + const char *remote_address, int use_default) +{ + DBusMessage *msg, *reply; + DBusError err; + const char *path, *method, *address = remote_address; + + if (use_default) { + path = "/org/bluez"; + method = "UnregisterDefaultPasskeyAgent"; + } else { + path = "/org/bluez/hci0"; + method = "UnregisterPasskeyAgent"; + } + + msg = dbus_message_new_method_call("org.bluez", path, INTERFACE, method); + if (!msg) { + fprintf(stderr, "Can't allocate new method call\n"); + dbus_connection_unref(conn); + exit(1); + } + + if (use_default) + dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, + DBUS_TYPE_INVALID); + else + dbus_message_append_args(msg, DBUS_TYPE_STRING, &agent_path, + DBUS_TYPE_STRING, &address, DBUS_TYPE_INVALID); + + dbus_error_init(&err); + + reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err); + + dbus_message_unref(msg); + + if (!reply) { + fprintf(stderr, "Can't unregister passkey agent\n"); + if (dbus_error_is_set(&err)) { + fprintf(stderr, "%s\n", err.message); + dbus_error_free(&err); + } + return -1; + } + + dbus_message_unref(reply); + + dbus_connection_flush(conn); + + dbus_connection_unregister_object_path(conn, agent_path); + + return 0; +} + +static void usage(void) +{ + printf("Bluetooth passkey agent ver %s\n\n", VERSION); + + printf("Usage:\n" + "\tpasskey-agent [--default] [--path agent-path] [address]\n" + "\n"); +} + +static struct option main_options[] = { + { "default", 0, 0, 'd' }, + { "reject", 0, 0, 'r' }, + { "path", 1, 0, 'p' }, + { "help", 0, 0, 'h' }, + { 0, 0, 0, 0 } +}; + +int main(int argc, char *argv[]) +{ + struct sigaction sa; + DBusConnection *conn; + char match_string[128], default_path[128], *agent_path = NULL; + int opt, use_default = 0; + + snprintf(default_path, sizeof(default_path), + "/org/bluez/passkey_agent_%d", getpid()); + + while ((opt = getopt_long(argc, argv, "+dp:h", main_options, NULL)) != EOF) { + switch(opt) { + case 'd': + use_default = 1; + break; + case 'r': + do_reject = 1; + break; + case 'p': + if (optarg[0] != '/') { + fprintf(stderr, "Invalid path\n"); + exit(1); + } + agent_path = strdup(optarg); + break; + case 'h': + usage(); + exit(0); + default: + exit(1); + } + } + + argc -= optind; + argv += optind; + optind = 0; + + if (argc < 1) { + usage(); + exit(1); + } + + passkey = strdup(argv[0]); + address = (argc > 1) ? strdup(argv[1]) : NULL; + + if (!use_default && !address) { + usage(); + exit(1); + } + + if (!agent_path) + agent_path = strdup(default_path); + + conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL); + if (!conn) { + fprintf(stderr, "Can't get on system bus"); + exit(1); + } + + if (register_agent(conn, agent_path, address, use_default) < 0) { + dbus_connection_unref(conn); + exit(1); + } + + if (!dbus_connection_add_filter(conn, agent_filter, NULL, NULL)) + fprintf(stderr, "Can't add signal filter"); + + snprintf(match_string, sizeof(match_string), + "interface=%s,member=NameOwnerChanged,arg0=%s", + DBUS_INTERFACE_DBUS, "org.bluez"); + + dbus_bus_add_match(conn, match_string, NULL); + + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDSTOP; + sa.sa_handler = sig_term; + sigaction(SIGTERM, &sa, NULL); + sigaction(SIGINT, &sa, NULL); + + while (!__io_canceled && !__io_terminated) { + if (dbus_connection_read_write_dispatch(conn, 500) != TRUE) + break; + } + + if (!__io_terminated) + unregister_agent(conn, agent_path, address, use_default); + + if (passkey) + free(passkey); + + dbus_connection_unref(conn); + + return 0; +} diff --git a/source/n/bluez/patches/bluez-dbus-config.patch b/source/n/bluez/patches/bluez-dbus-config.patch new file mode 100644 index 000000000..4160600a5 --- /dev/null +++ b/source/n/bluez/patches/bluez-dbus-config.patch @@ -0,0 +1,25 @@ +Use the plugdev group for bluetooth on Slackware, and allow this to + work as expected with our current setup. + +diff -Nur bluez-4.61.orig//src/bluetooth.conf bluez-4.61/src/bluetooth.conf +--- bluez-4.61.orig//src/bluetooth.conf 2010-02-18 17:48:50.434527785 -0600 ++++ bluez-4.61/src/bluetooth.conf 2010-02-18 17:47:30.727431004 -0600 +@@ -11,11 +11,16 @@ + + + ++ + + + +- +- ++ ++ ++ ++ ++ + + +