summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/dropbear/README16
-rw-r--r--network/dropbear/doinst.sh5
-rw-r--r--network/dropbear/dropbear.SlackBuild31
-rw-r--r--network/dropbear/rc.dropbear.new3
4 files changed, 39 insertions, 16 deletions
diff --git a/network/dropbear/README b/network/dropbear/README
index 6b32bd804e..bae1c188d1 100644
--- a/network/dropbear/README
+++ b/network/dropbear/README
@@ -6,8 +6,14 @@ distributed under a MIT-style license. Dropbear is particularly
useful for "embedded"-type Linux (or other Unix) systems, such as
wireless routers.
-Please note that this package conflicts with OpenSSH's scp binary.
-Installing this package will overwrite this file with a symbolic link
-to the dropbearmulti binary, so a backup of /usr/bin/scp will be made
-if it exists. After uninstalling dropbear, you can restore the backup
-with 'mv /usr/bin/scp.openssh /usr/bin/scp'.
+Please note the Dropbear distribution includes a standalone version of
+OpenSSH's scp program. This slackbuild will build this by default, thus
+creating a package which conflicts with OpenSSH's scp binary. Installing this
+package will overwrite this file with a symbolic link to the dropbearmulti
+binary, so a backup of /usr/bin/scp will be made if it exists. After
+uninstalling dropbear, you can restore the backup with 'mv
+/usr/bin/scp.openssh /usr/bin/scp'.
+
+If you do not want to build the scp binary, use:
+
+ WITH_SCP=no ./dropbear.SlackBuild
diff --git a/network/dropbear/doinst.sh b/network/dropbear/doinst.sh
index 0ab69ba9ff..54972f010c 100644
--- a/network/dropbear/doinst.sh
+++ b/network/dropbear/doinst.sh
@@ -22,12 +22,7 @@ preserve_perms() {
config $NEW
}
-if [ -e usr/bin/scp ]; then
- mv usr/bin/scp usr/bin/scp.openssh
-fi
-
preserve_perms etc/rc.d/rc.dropbear.new
-config etc/rc.d/rc.dropbear.new
# Create a logfile if one doesn't already exist
if [ ! -e var/log/dropbear.log ]; then
diff --git a/network/dropbear/dropbear.SlackBuild b/network/dropbear/dropbear.SlackBuild
index 6b86ba9ff3..6a4ed654e9 100644
--- a/network/dropbear/dropbear.SlackBuild
+++ b/network/dropbear/dropbear.SlackBuild
@@ -23,7 +23,7 @@
PRGNAM=dropbear
VERSION=${VERSION:-2017.75}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -72,7 +72,8 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --bindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--disable-syslog \
@@ -84,11 +85,21 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-pututxline \
--build=$ARCH-slackware-linux
-make \
- PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" \
- MULTI="1"
+PROGRAMS="dropbear dbclient dropbearkey dropbearconvert"
+
+WITH_SCP=${WITH_SCP:-yes}
+
+if [ "$WITH_SCP" = "yes" ] ; then
+ PROGRAMS="$PROGRAMS scp"
+fi
+
+make strip \
+ PROGRAMS="$PROGRAMS" \
+ MULTI=1
+
make install \
- MULTI="1" \
+ PROGRAMS="$PROGRAMS" \
+ MULTI=1 \
DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
@@ -107,5 +118,13 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
+if [ "$WITH_SCOPE" = "yes" ] ; then
+ cat << EOF >> $PKG/install/doinst.sh
+if [ -e usr/bin/scp ]; then
+ mv usr/bin/scp usr/bin/scp.openssh
+fi
+EOF
+fi
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/dropbear/rc.dropbear.new b/network/dropbear/rc.dropbear.new
index 3135486afe..c6d5cbe286 100644
--- a/network/dropbear/rc.dropbear.new
+++ b/network/dropbear/rc.dropbear.new
@@ -9,6 +9,9 @@ dropbear_start() {
if [ ! -f /etc/dropbear/dropbear_dss_host_key ]; then
/usr/bin/dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
fi
+ if [ ! -f /etc/dropbear/dropbear_ecdsa_host_key ]; then
+ /usr/bin/dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key
+ fi
/usr/sbin/dropbear 2>> /var/log/dropbear.log
}