summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/bash/PKGBUILD28
-rw-r--r--testing/bash/system.bashrc2
-rw-r--r--testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch33
-rw-r--r--testing/dhcpcd/0001-set-MTU-via-sysfs-if-file-is-available.patch61
-rw-r--r--testing/dhcpcd/PKGBUILD57
-rw-r--r--testing/dhcpcd/dhcpcd.conf.d6
-rw-r--r--testing/dhcpcd/remove_ifconfig.patch20
7 files changed, 192 insertions, 15 deletions
diff --git a/testing/bash/PKGBUILD b/testing/bash/PKGBUILD
index c12cd512c..6a0ae5ae2 100644
--- a/testing/bash/PKGBUILD
+++ b/testing/bash/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 153410 2012-03-13 01:18:55Z allan $
+# $Id: PKGBUILD 153697 2012-03-18 06:05:58Z eric $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>
@@ -6,7 +6,7 @@ pkgname=bash
_basever=4.2
_patchlevel=024 #prepare for some patches
pkgver=$_basever.$_patchlevel
-pkgrel=1
+pkgrel=2
pkgdesc="The GNU Bourne Again shell"
arch=('i686' 'x86_64')
license=('GPL')
@@ -29,7 +29,7 @@ if [ $_patchlevel -gt 000 ]; then
fi
build() {
- cd ${srcdir}/${pkgname}-$_basever
+ cd "${srcdir}"/${pkgname}-$_basever
for (( p=1; p<=$((10#${_patchlevel})); p++ )); do
msg "applying patch bash${_basever//./}-$(printf "%03d" $p)"
patch -Np0 -i $srcdir/bash${_basever//./}-$(printf "%03d" $p)
@@ -48,28 +48,28 @@ build() {
}
check() {
- cd ${srcdir}/${pkgname}-$_basever
+ cd "${srcdir}"/${pkgname}-$_basever
make check
}
package() {
- cd ${srcdir}/${pkgname}-$_basever
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}"/${pkgname}-$_basever
+ make DESTDIR="${pkgdir}" install
# for now, bash is our default /bin/sh
- cd ${pkgdir}/bin
+ cd "${pkgdir}"/bin
ln -s bash sh
- install -dm755 ${pkgdir}/etc/skel/
+ install -dm755 "${pkgdir}"/etc/skel/
# system-wide configuration files
- install -m644 ${srcdir}/system.bashrc ${pkgdir}/etc/bash.bashrc
- install -m644 ${srcdir}/system.bash_logout ${pkgdir}/etc/bash.bash_logout
+ install -m644 "${srcdir}"/system.bashrc "${pkgdir}"/etc/bash.bashrc
+ install -m644 "${srcdir}"/system.bash_logout "${pkgdir}"/etc/bash.bash_logout
# user configuration file skeletons
- install -m644 ${srcdir}/dot.bashrc ${pkgdir}/etc/skel/.bashrc
- install -m644 ${srcdir}/dot.bash_profile ${pkgdir}/etc/skel/.bash_profile
- install -m644 ${srcdir}/dot.bash_logout ${pkgdir}/etc/skel/.bash_logout
+ install -m644 "${srcdir}"/dot.bashrc "${pkgdir}"/etc/skel/.bashrc
+ install -m644 "${srcdir}"/dot.bash_profile "${pkgdir}"/etc/skel/.bash_profile
+ install -m644 "${srcdir}"/dot.bash_logout "${pkgdir}"/etc/skel/.bash_logout
}
md5sums=('3fb927c7c33022f1c327f14a81c0d4b0'
@@ -77,7 +77,7 @@ md5sums=('3fb927c7c33022f1c327f14a81c0d4b0'
'027d6bd8f5f6a06b75bb7698cb478089'
'2902e0fee7a9168f3a4fd2ccd60ff047'
'42f4400ed2314bd7519c020d0187edc5'
- 'fe5d3a367f7d5f754214dc05e3d958ab'
+ '3546099a1b2f667adc9794f52e78e35b'
'472f536d7c9e8250dc4568ec4cfaf294'
'1100bc1dda2cdc06ac44d7e5d17864a3'
'a7184b76eb4a079f10174a0a8f574819'
diff --git a/testing/bash/system.bashrc b/testing/bash/system.bashrc
index 84de2898c..a2231e861 100644
--- a/testing/bash/system.bashrc
+++ b/testing/bash/system.bashrc
@@ -20,4 +20,4 @@ case ${TERM} in
;;
esac
-[ -r /etc/bash_completion ] && . /etc/bash_completion
+[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
diff --git a/testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch b/testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch
new file mode 100644
index 000000000..4420d0b63
--- /dev/null
+++ b/testing/dhcpcd/0001-Set-hostname-via-proc-if-file-is-available.patch
@@ -0,0 +1,33 @@
+From d345b36b483fec8fb2def5f3acdc2d3c5faa94eb Mon Sep 17 00:00:00 2001
+From: Dan McGee <dan@archlinux.org>
+Date: Sun, 19 Jun 2011 16:04:25 -0500
+Subject: [PATCH] Set hostname via /proc if file is available
+
+On Linux, the hostname can be set via this file if available, precluding
+the need for a `hostname` binary.
+
+Signed-off-by: Dan McGee <dan@archlinux.org>
+---
+ dhcpcd-hooks/30-hostname | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/dhcpcd-hooks/30-hostname b/dhcpcd-hooks/30-hostname
+index 65d1a13..af94262 100644
+--- a/dhcpcd-hooks/30-hostname
++++ b/dhcpcd-hooks/30-hostname
+@@ -21,7 +21,11 @@ need_hostname()
+ try_hostname()
+ {
+ if valid_domainname "$1"; then
+- hostname "$1"
++ if [ -w /proc/sys/kernel/hostname ]; then
++ echo "$1" > /proc/sys/kernel/hostname
++ else
++ hostname "$1"
++ fi
+ else
+ syslog err "Invalid hostname: $1"
+ fi
+--
+1.7.5.4
+
diff --git a/testing/dhcpcd/0001-set-MTU-via-sysfs-if-file-is-available.patch b/testing/dhcpcd/0001-set-MTU-via-sysfs-if-file-is-available.patch
new file mode 100644
index 000000000..7e78ecd0d
--- /dev/null
+++ b/testing/dhcpcd/0001-set-MTU-via-sysfs-if-file-is-available.patch
@@ -0,0 +1,61 @@
+From 950c00d1b183796034d227ef47a90eb248d79b72 Mon Sep 17 00:00:00 2001
+From: Dave Reisner <d@falconindy.com>
+Date: Tue, 21 Jun 2011 09:32:47 -0400
+Subject: [PATCH] set MTU via sysfs if file is available
+
+On Linux, a network interface's MTU can be set by writing to
+/sys/class/net/$interface/mtu, which removes the dependency on ifconfig.
+
+Signed-off-by: Dave Reisner <d@falconindy.com>
+---
+ dhcpcd-hooks/10-mtu | 4 ++--
+ dhcpcd-run-hooks.in | 11 +++++++++++
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/dhcpcd-hooks/10-mtu b/dhcpcd-hooks/10-mtu
+index 639697c..8763930 100644
+--- a/dhcpcd-hooks/10-mtu
++++ b/dhcpcd-hooks/10-mtu
+@@ -7,7 +7,7 @@ if [ "$reason" = PREINIT -a -e "$mtu_dir/$interface" ]; then
+ elif [ -n "$new_interface_mtu" ] && $if_up; then
+ # The smalled MTU dhcpcd can work with is 576
+ if [ "$new_interface_mtu" -ge 576 ]; then
+- if ifconfig "$interface" mtu "$new_interface_mtu"; then
++ if set_mtu "$interface" "$new_interface_mtu"; then
+ syslog info "$interface: MTU set to $new_interface_mtu"
+ # Save the MTU so we can restore it later
+ if [ ! -e "$mtu_dir/$interface" ]; then
+@@ -21,7 +21,7 @@ elif [ -e "$mtu_dir/$interface" ]; then
+ # No MTU in this state, so restore the prior MTU
+ mtu=$(cat "$mtu_dir/$interface")
+ syslog info "$interface: MTU restored to $mtu"
+- ifconfig "$interface" mtu "$mtu"
++ set_mtu "$interface" "$mtu"
+ rm "$mtu_dir/$interface"
+ fi
+ fi
+diff --git a/dhcpcd-run-hooks.in b/dhcpcd-run-hooks.in
+index 0e60338..843f3ca 100644
+--- a/dhcpcd-run-hooks.in
++++ b/dhcpcd-run-hooks.in
+@@ -215,6 +215,17 @@ service_condcommand()
+ service_exists $1 && service_status $1 && service_cmd $1 $2
+ }
+
++# Set MTU for an interface
++set_mtu() {
++ local interface=$1 mtu=$2
++
++ if [ -e /sys/class/net/$interface/mtu ]; then
++ echo "$mtu" > /sys/class/net/$interface/mtu
++ else
++ ifconfig "$interface" mtu "$mtu"
++ fi
++}
++
+ # We source each script into this one so that scripts run earlier can
+ # remove variables from the environment so later scripts don't see them.
+ # Thus, the user can create their dhcpcd.enter/exit-hook script to configure
+--
+1.7.5.4
+
diff --git a/testing/dhcpcd/PKGBUILD b/testing/dhcpcd/PKGBUILD
new file mode 100644
index 000000000..aaba80b87
--- /dev/null
+++ b/testing/dhcpcd/PKGBUILD
@@ -0,0 +1,57 @@
+# $Id: PKGBUILD 153720 2012-03-18 17:01:24Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tom Killian <tom.archlinux.org>
+# Contributor: Judd Vinet <jvinet.zeroflux.org>
+
+_gitrev=8316b24
+pkgname=dhcpcd
+pkgver=5.5.4
+pkgrel=2
+pkgdesc="RFC2131 compliant DHCP client daemon"
+url="http://roy.marples.name/dhcpcd/"
+arch=('i686' 'x86_64')
+license=('BSD')
+groups=('base')
+depends=('glibc' 'sh')
+backup=('etc/conf.d/dhcpcd' 'etc/dhcpcd.conf')
+options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory
+#source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2" \
+source=("ftp://ftp.archlinux.org/other/dhcpcd/dhcpcd-r8316b24.tar.bz2" \
+ 'dhcpcd.conf.d')
+sha1sums=('1e3e47b2aabed38e81cd695d1f11527fd41b3637'
+ 'b67b9ce6a2faaca75fea356966a16be2283b7db0')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # remove net-tools dep (upstream now)
+# patch -Np1 -i ${srcdir}/0001-Set-hostname-via-proc-if-file-is-available.patch
+# patch -Np1 -i ${srcdir}/0001-set-MTU-via-sysfs-if-file-is-available.patch
+
+ # configure variables
+ ./configure --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd \
+ --rundir=/run
+
+ # Build
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+
+ # Create Binary Symlink
+ install -d ${pkgdir}/usr/sbin
+ ln -sf /sbin/dhcpcd ${pkgdir}/usr/sbin/dhcpcd
+
+ # Install Configuration File used in /etc/rc.d/network
+ install -D -m644 ../dhcpcd.conf.d $pkgdir/etc/conf.d/$pkgname
+
+ # Install License
+ install -d $pkgdir/usr/share/licenses/$pkgname
+ awk '{if(FNR<27)print $0}' ${srcdir}/${pkgname}-${pkgver}/configure.h \
+ >> ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ # Set Options in /etc/dhcpcd.conf
+ echo noipv4ll >> ${pkgdir}/etc/dhcpcd.conf # Disable ip4vall
+}
diff --git a/testing/dhcpcd/dhcpcd.conf.d b/testing/dhcpcd/dhcpcd.conf.d
new file mode 100644
index 000000000..83c6f14ad
--- /dev/null
+++ b/testing/dhcpcd/dhcpcd.conf.d
@@ -0,0 +1,6 @@
+#
+# Arguments to be passed to the DHCP client daemon
+#
+
+DHCPCD_ARGS="-q"
+
diff --git a/testing/dhcpcd/remove_ifconfig.patch b/testing/dhcpcd/remove_ifconfig.patch
new file mode 100644
index 000000000..5bcc4a68f
--- /dev/null
+++ b/testing/dhcpcd/remove_ifconfig.patch
@@ -0,0 +1,20 @@
+--- dhcpcd-hooks/10-mtu.orig 2011-11-04 07:45:46.477712667 +0100
++++ dhcpcd-hooks/10-mtu 2011-11-04 07:46:38.964379550 +0100
+@@ -7,7 +7,7 @@
+ elif [ -n "$new_interface_mtu" ] && $if_up; then
+ # The smalled MTU dhcpcd can work with is 576
+ if [ "$new_interface_mtu" -ge 576 ]; then
+- if ifconfig "$interface" mtu "$new_interface_mtu"; then
++ if ip link set "$interface" mtu "$new_interface_mtu"; then
+ syslog info "$interface: MTU set to $new_interface_mtu"
+ # Save the MTU so we can restore it later
+ if [ ! -e "$mtu_dir/$interface" ]; then
+@@ -21,7 +21,7 @@
+ # No MTU in this state, so restore the prior MTU
+ mtu=$(cat "$mtu_dir/$interface")
+ syslog info "$interface: MTU restored to $mtu"
+- ifconfig "$interface" mtu "$mtu"
++ ip link set "$interface" mtu "$new_interface_mtu"
+ rm "$mtu_dir/$interface"
+ fi
+ fi