aboutsummaryrefslogtreecommitdiff
path: root/network/dropbear
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-12 01:26:26 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-16 12:11:22 +0700
commitd013a1a5b1f7ebba4c1bf840ff174efb2d032efc (patch)
treead9d7c0361a572e7508123ca76481aa0a19f06d3 /network/dropbear
parent21214a6d0b5eca7dc616d58b647e972599bd279d (diff)
network/dropbear: Don't overwrite /usr/bin/scp by default; fix docs.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/dropbear')
-rw-r--r--network/dropbear/README21
-rw-r--r--network/dropbear/dropbear.SlackBuild35
2 files changed, 33 insertions, 23 deletions
diff --git a/network/dropbear/README b/network/dropbear/README
index 5da4e54160d99..1b5798c8e62b8 100644
--- a/network/dropbear/README
+++ b/network/dropbear/README
@@ -6,14 +6,17 @@ distributed under a MIT-style license. Dropbear is particularly
useful for "embedded"-type Linux (or other Unix) systems, such as
wireless routers.
-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'.
+Please note the Dropbear distribution includes a standalone version of
+OpenSSH's scp program. This SlackBuild will NOT build this by default,
+thus creating a package which will not conflict with OpenSSH's scp
+binary.
-If you do not want to build the scp binary, use:
+If you want to build dropbear's scp binary, use:
- WITH_SCP=no ./dropbear.SlackBuild
+ WITH_SCP=yes ./dropbear.SlackBuild
+
+Installing the package built with WITH_SCP=yes 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'.
diff --git a/network/dropbear/dropbear.SlackBuild b/network/dropbear/dropbear.SlackBuild
index d7b3e9003c685..cfd8242264834 100644
--- a/network/dropbear/dropbear.SlackBuild
+++ b/network/dropbear/dropbear.SlackBuild
@@ -21,12 +21,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220411 bkw: Modified by SlackBuilds.org, BUILD=3:
+# - change the WITH_SCP option so it defaults to no. in other words,
+# the default behaviour is to *not* conflict with a Slackware package.
+# - use relative symlinks for binaries.
+# - add missing SlackBuild to doc dir.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dropbear
VERSION=${VERSION:-2020.81}
SRCVERSION="DROPBEAR_$VERSION"
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +44,6 @@ if [ -z "$ARCH" ]; then
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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -75,9 +78,9 @@ cd $PRGNAM-$SRCVERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
autoreconf -if
@@ -100,9 +103,8 @@ CXXFLAGS="$SLKCFLAGS" \
PROGRAMS="dropbear dbclient dropbearkey dropbearconvert"
-WITH_SCP=${WITH_SCP:-yes}
-
-if [ "$WITH_SCP" = "yes" ] ; then
+# 20220412 bkw: disabled by default. please don't change it back.
+if [ "${WITH_SCP:-no}" = "yes" ] ; then
PROGRAMS="$PROGRAMS scp"
fi
@@ -115,17 +117,22 @@ make install \
MULTI=1 \
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
+gzip -9 $PKG/usr/man/man*/*
-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
+# 20220412 bkw: use relative symlinks.
+for i in $PROGRAMS; do
+ BIN=$PKG/usr/bin/$i
+ SBIN=$PKG/usr/sbin/$i
+ [ -L $BIN ] && rm -f $BIN && ln -s dropbearmulti $BIN
+ [ -L $SBIN ] && rm -f $SBIN && ln -s ../bin/dropbearmulti $SBIN
+done
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.dropbear.new > $PKG/etc/rc.d/rc.dropbear.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES INSTALL LICENSE MULTI README SMALL $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES LICENSE MULTI README SMALL $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc