summaryrefslogtreecommitdiff
path: root/source/installer/sources
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-12-15 20:39:53 +0000
committerEric Hameleers <alien@slackware.com>2020-12-16 08:59:50 +0100
commitc56a16f1ecd0afa42c16dab6fdfb1f0b667dc287 (patch)
treed954850372722972b665c6894a50f57f2463a5ae /source/installer/sources
parent0dc2fd5cf511a8234b81a1df1444fb2a0a131eaa (diff)
downloadcurrent-c56a16f1ecd0afa42c16dab6fdfb1f0b667dc287.tar.gz
Tue Dec 15 20:39:53 UTC 202020201215203953
d/python-pip-20.3.3-x86_64-1.txz: Upgraded. kde/sddm-0.19.0-x86_64-3.txz: Rebuilt. In SDDM's Xsession script, don't source $HOME/.xsession as this may launch the wrong session type or cause dbus-run-session to start twice breaking logout. l/orc-0.4.32-x86_64-1.txz: Upgraded. l/pipewire-0.3.18-x86_64-1.txz: Upgraded. l/python-chardet-4.0.0-x86_64-1.txz: Upgraded. l/python-packaging-20.8-x86_64-1.txz: Upgraded. n/samba-4.13.3-x86_64-1.txz: Upgraded. xap/mozilla-thunderbird-78.6.0-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/78.6.0/releasenotes/ xfce/mousepad-0.5.0-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/installer/sources')
-rwxr-xr-xsource/installer/sources/dropbear/dropbear.Slackbuild104
-rw-r--r--source/installer/sources/dropbear/dropbear_emptypass.patch8
-rw-r--r--source/installer/sources/dropbear/localoptions.h2
-rw-r--r--source/installer/sources/dropbear/slack-desc6
4 files changed, 63 insertions, 57 deletions
diff --git a/source/installer/sources/dropbear/dropbear.Slackbuild b/source/installer/sources/dropbear/dropbear.Slackbuild
index 2954effd..71228638 100755
--- a/source/installer/sources/dropbear/dropbear.Slackbuild
+++ b/source/installer/sources/dropbear/dropbear.Slackbuild
@@ -1,8 +1,7 @@
#!/bin/sh
-# $Id: dropbear.Slackbuild,v 1.7 2008/03/13 13:42:33 root Exp root $
-# Copyright 2007, Piter Punk, São Paulo, Brazil
-# Adaptations for Slackware installer:
-# Copyright 2008, Eric Hameleers, Eindhoven, Netherlands
+
+# Copyright 2007, Piter Punk, São Paulo, Brazil
+# Copyright 2008, Eric Hameleers, Eindhoven, Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,18 +21,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=dropbear
-VERSION=20171018_fa3b0dd3
-BUILD=${BUILD:-1}
-TAG=${TAG:-''}
+cd $(dirname $0) ; CWD=$(pwd)
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+PKGNAM=dropbear
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# The programs we want to have as symlinks to dropbearmulti binary:
PROGS="dropbear dbclient dropbearkey dropbearconvert scp ssh"
@@ -43,15 +35,34 @@ PROGS="dropbear dbclient dropbearkey dropbearconvert scp ssh"
# and adding symlinks for ssh and scp without worry
# about overwriting any pre-existing binaries.
-CWD=$(pwd)
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
TMP=${TMP:-/tmp}
-PKG=$TMP/pkg-$PRGNAM
+PKG=$TMP/package-$PKGNAM
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
@@ -63,11 +74,10 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
-cd $TMP || exit 1
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z || exit 1
-cd $PRGNAM-$VERSION || exit 1
-
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -76,10 +86,7 @@ find . \
-exec chmod 644 {} \;
# Patch to allow empty passwords (used in Slackware's installer):
-patch -p1 < $CWD/dropbear_emptypass.patch || exit 1
-
-autoconf || exit 1
-autoheader || exit 1
+patch -p1 < $CWD/dropbear_emptypass.patch
cp $CWD/localoptions.h .
@@ -95,47 +102,46 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-wtmpx \
--disable-pututline \
--disable-pututxline \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
-make PROGRAMS="$PROGS" MULTI="1" SCPPROGRESS="1" || exit 1
+make PROGRAMS="$PROGS" MULTI="1" SCPPROGRESS="1" $NUMJOBS || exit 1
mkdir -p $PKG/sbin $PKG/bin $PKG/lib
make DESTDIR=$PKG MULTI="1" install || exit 1
# Copy manpages to package
mkdir -p $PKG/usr/man/man1
-mkdir -p $PKG/usr/man/man8
cp dbclient.1 $PKG/usr/man/man1
+mkdir -p $PKG/usr/man/man8
cp dropbearkey.8 dropbear.8 $PKG/usr/man/man8
+# Link binaries to dropbearmulti since the 'make install' does not do that
+# if we build a multicall binary.
+ln -s /bin/dropbearmulti $PKG/sbin/dropbear
+for i in $(echo $PROGS | sed -e 's/dropbear //') ; do
+ ln -s /bin/dropbearmulti $PKG/bin/$i
+done
+
if [ -d $PKG/usr/man ]; then
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi
-# Link binaries to dropbearmulti since the 'make install' does not do that
-# if we build a multicall binary.
-(cd $PKG/bin
- ln -s ../bin/dropbearmulti ../sbin/dropbear
- for i in $(echo $PROGS | sed -e 's/dropbear //') ; do
- ln -s dropbearmulti $i
- done
-)
-
-make install DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
mkdir -p $PKG/etc/rc.d $PKG/etc/dropbear
cp $CWD/rc.dropbear.new $PKG/etc/rc.d/ # doinst.sh will handle .new
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a CHANGES INSTALL LICENSE MULTI README SMALL TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+ $PKG/usr/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/installer/sources/dropbear/dropbear_emptypass.patch b/source/installer/sources/dropbear/dropbear_emptypass.patch
index a3f27f47..4365bfe3 100644
--- a/source/installer/sources/dropbear/dropbear_emptypass.patch
+++ b/source/installer/sources/dropbear/dropbear_emptypass.patch
@@ -1,7 +1,7 @@
-diff -Nur dropbear-20171018_fa3b0dd3.orig/svr-authpasswd.c dropbear-20171018_fa3b0dd3/svr-authpasswd.c
---- dropbear-20171018_fa3b0dd3.orig/svr-authpasswd.c 2018-01-13 19:19:59.000000000 -0600
-+++ dropbear-20171018_fa3b0dd3/svr-authpasswd.c 2018-01-13 23:07:16.441369958 -0600
-@@ -88,12 +88,16 @@
+diff -Nur dropbear-2020.81.orig/svr-authpasswd.c dropbear-2020.81/svr-authpasswd.c
+--- dropbear-2020.81.orig/svr-authpasswd.c 2020-10-29 08:35:50.000000000 -0500
++++ dropbear-2020.81/svr-authpasswd.c 2020-12-06 02:20:50.744491126 -0600
+@@ -98,12 +98,16 @@
}
/* check for empty password */
diff --git a/source/installer/sources/dropbear/localoptions.h b/source/installer/sources/dropbear/localoptions.h
index 2e6a966f..380805b3 100644
--- a/source/installer/sources/dropbear/localoptions.h
+++ b/source/installer/sources/dropbear/localoptions.h
@@ -1,4 +1,4 @@
/* These override content of default_options.h */
#define INETD_MODE 0
#define DROPBEAR_DH_GROUP16 1
-#define DROPBEAR_PATH_SSH_PROGRAM "/bin/dbclient"
+#define DROPBEAR_PATH_SSH_PROGRAM "/usr/bin/dbclient"
diff --git a/source/installer/sources/dropbear/slack-desc b/source/installer/sources/dropbear/slack-desc
index ca261902..94eeac05 100644
--- a/source/installer/sources/dropbear/slack-desc
+++ b/source/installer/sources/dropbear/slack-desc
@@ -1,8 +1,8 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# 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
+# 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------------------------------------------------------|