From 8ff4f2f51a6cf07fc33742ce3bee81328896e49b Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Fri, 25 May 2018 23:29:36 +0000 Subject: Fri May 25 23:29:36 UTC 2018 patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific. --- patches/source/dhcpcd/COPYRIGHT | 26 ++++ patches/source/dhcpcd/dhcpcd.SlackBuild | 133 +++++++++++++++++++++ patches/source/dhcpcd/doinst.sh | 15 +++ .../Actually-validate-the-search-list.patch | 25 ++++ ...nf-Don-t-invoke-wpa_supplicant-by-default.patch | 26 ++++ .../patches/dhcpcd.dho_optionsoverloaded.dos.patch | 11 ++ patches/source/dhcpcd/slack-desc | 19 +++ 7 files changed, 255 insertions(+) create mode 100644 patches/source/dhcpcd/COPYRIGHT create mode 100755 patches/source/dhcpcd/dhcpcd.SlackBuild create mode 100644 patches/source/dhcpcd/doinst.sh create mode 100644 patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch create mode 100644 patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch create mode 100644 patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch create mode 100644 patches/source/dhcpcd/slack-desc (limited to 'patches/source/dhcpcd') diff --git a/patches/source/dhcpcd/COPYRIGHT b/patches/source/dhcpcd/COPYRIGHT new file mode 100644 index 000000000..a75c8ce10 --- /dev/null +++ b/patches/source/dhcpcd/COPYRIGHT @@ -0,0 +1,26 @@ +/* + * dhcpcd - DHCP client daemon + * Copyright (c) 2006-2012 Roy Marples + * All rights reserved + + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. + */ diff --git a/patches/source/dhcpcd/dhcpcd.SlackBuild b/patches/source/dhcpcd/dhcpcd.SlackBuild new file mode 100755 index 000000000..9dd01a04c --- /dev/null +++ b/patches/source/dhcpcd/dhcpcd.SlackBuild @@ -0,0 +1,133 @@ +#!/bin/sh + +# Copyright 2008, 2009, 2010, 2013, 2014 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. + + +VERSION=${VERSION:-$(echo dhcpcd-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-3_slack14.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 + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-dhcpcd + +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 + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf dhcpcd-$VERSION +tar xvf $CWD/dhcpcd-$VERSION.tar.?z* || exit 1 +cd dhcpcd-$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 {} \; + +patch -p1 < $CWD/patches/Actually-validate-the-search-list.patch || exit 1 +patch -p1 < $CWD/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch || exit 1 +patch -p1 < $CWD/patches/dhcpcd.dho_optionsoverloaded.dos.patch || exit 1 + +# At this point, it should be safe to assume that /var will be mounted by the +# time dhcpcd is called, as all non-root local filesystems are mounted from +# /etc/rc.d/rc.S, and /var should not be on a network filesystem. As such, +# we'll use the FHS layout instead of putting things in /etc/dhcpc + +# Yes, /lib/dhcpcd is correct, even on x86_64. +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sbindir=/sbin \ + --sysconfdir=/etc \ + --dbdir=/var/lib/dhcpcd \ + --libexecdir=/lib/dhcpcd \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG HOOKSCRIPTS="50-ntp.conf 50-yp.conf" || exit 1 + +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Let's not clobber the config file +mv $PKG/etc/dhcpcd.conf $PKG/etc/dhcpcd.conf.new + +# 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 + +mkdir -p $PKG/usr/doc/dhcpcd-$VERSION +cp -a README* $PKG/usr/doc/dhcpcd-$VERSION +zcat $CWD/COPYRIGHT.gz > $PKG/usr/doc/dhcpcd-$VERSION/COPYRIGHT + +# 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 + +cd $PKG +/sbin/makepkg -l y -c n $TMP/dhcpcd-$VERSION-$ARCH-$BUILD.txz + diff --git a/patches/source/dhcpcd/doinst.sh b/patches/source/dhcpcd/doinst.sh new file mode 100644 index 000000000..a1a93b209 --- /dev/null +++ b/patches/source/dhcpcd/doinst.sh @@ -0,0 +1,15 @@ +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... +} + +config etc/dhcpcd.conf.new + diff --git a/patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch b/patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch new file mode 100644 index 000000000..3d84a6d61 --- /dev/null +++ b/patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch @@ -0,0 +1,25 @@ +From 118b94bdffca7e33a5e0d6b596eb7e51e7109e68 Mon Sep 17 00:00:00 2001 +From: Roy Marples +Date: Tue, 6 Aug 2013 12:34:08 +0100 +Subject: [PATCH 1/2] Actually validate the search list. Fixes #280 + +--- + dhcpcd-hooks/20-resolv.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dhcpcd-hooks/20-resolv.conf b/dhcpcd-hooks/20-resolv.conf +index d0dce41..05316c9 100644 +--- a/dhcpcd-hooks/20-resolv.conf ++++ b/dhcpcd-hooks/20-resolv.conf +@@ -115,7 +115,7 @@ add_resolv_conf() + if [ -n "$new_domain_search" -a \ + "$new_domain_search" != "$new_domain_name" ] + then +- if valid_domainname_list; then ++ if valid_domainname_list $new_domain_search; then + conf="${conf}search $new_domain_search$NL" + else + syslog err "Invalid domain name in list: $new_domain_search" +-- +1.8.3.2 + diff --git a/patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch b/patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch new file mode 100644 index 000000000..464d54bd9 --- /dev/null +++ b/patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch @@ -0,0 +1,26 @@ +From d968ff96e1e4354c591e49fe79b4f4ce0e553f61 Mon Sep 17 00:00:00 2001 +From: Robby Workman +Date: Sun, 11 Aug 2013 23:12:57 -0500 +Subject: [PATCH 2/2] dhcpcd.conf: Don't invoke wpa_supplicant by default + +Slackware's network init script (rc.inet1) and/or +NetworkManager itself handles this just fine. +--- + dhcpcd.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/dhcpcd.conf b/dhcpcd.conf +index 349c6f2..30aacca 100644 +--- a/dhcpcd.conf ++++ b/dhcpcd.conf +@@ -30,3 +30,7 @@ require dhcp_server_identifier + # A hook script is provided to lookup the hostname if not set by the DHCP + # server, but it should not be run by default. + nohook lookup-hostname ++ ++# We run wpa_supplicant from rc.inet1 and/or NM handles it on its own ++nohook wpa_supplicant ++ +-- +1.8.3.2 + diff --git a/patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch b/patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch new file mode 100644 index 000000000..77007cf90 --- /dev/null +++ b/patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch @@ -0,0 +1,11 @@ +--- ./dhcp.c.orig 2013-08-02 15:12:22.000000000 -0500 ++++ ./dhcp.c 2014-08-01 15:34:23.681955373 -0500 +@@ -345,7 +345,7 @@ + case DHO_OPTIONSOVERLOADED: + /* Ensure we only get this option once */ + if (!overl) +- overl = p[1]; ++ overl = 0x80 | p[1]; + break; + } + l = *p++; diff --git a/patches/source/dhcpcd/slack-desc b/patches/source/dhcpcd/slack-desc new file mode 100644 index 000000000..04859d7cb --- /dev/null +++ b/patches/source/dhcpcd/slack-desc @@ -0,0 +1,19 @@ +# 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------------------------------------------------------| +dhcpcd: dhcpcd (DHCP client daemon) +dhcpcd: +dhcpcd: The DHCP client program dhcpcd is used to connect to a network by +dhcpcd: contacting a DHCP server. dhcpcd gets an IP address and other +dhcpcd: information from a corresponding DHCP server, configures the network +dhcpcd: interface automatically, and tries to renew the lease time according +dhcpcd: to RFC2131 or RFC1541 depending on the command line option. +dhcpcd: +dhcpcd: +dhcpcd: +dhcpcd: -- cgit v1.2.3