From 664842115bf75832b93b0582044ae01078a090c3 Mon Sep 17 00:00:00 2001 From: D Woodfall Date: Mon, 6 Feb 2023 04:59:30 +0000 Subject: network/libressl: Added (OpenSSL fork by OpenBSD) Signed-off-by: bedlam --- network/libressl/README | 50 ++++++++++++++++ network/libressl/doinst.sh | 5 ++ network/libressl/douninst.sh | 5 ++ network/libressl/libressl.SlackBuild | 107 +++++++++++++++++++++++++++++++++++ network/libressl/libressl.info | 12 ++++ network/libressl/slack-desc | 19 +++++++ 6 files changed, 198 insertions(+) create mode 100644 network/libressl/README create mode 100644 network/libressl/doinst.sh create mode 100644 network/libressl/douninst.sh create mode 100644 network/libressl/libressl.SlackBuild create mode 100644 network/libressl/libressl.info create mode 100644 network/libressl/slack-desc diff --git a/network/libressl/README b/network/libressl/README new file mode 100644 index 0000000000..e39ca00245 --- /dev/null +++ b/network/libressl/README @@ -0,0 +1,50 @@ +LibreSSL is a fork of OpenSSL 1.0.1g developed by the OpenBSD project. +Our goal is to modernize the codebase, improve security, and apply best +practice development processes from OpenBSD. + +********************************************************************* +NOTE! This contains libtls so the standalone libtls package should be +removed before building and installing libressl. +********************************************************************* + +Compatibility with OpenSSL: + +LibreSSL is API compatible with OpenSSL 1.0.1, but does not yet include +all new APIs from OpenSSL 1.0.2 and later. LibreSSL also includes APIs +not yet present in OpenSSL. The current common API subset is OpenSSL +1.0.1. + +LibreSSL is not ABI compatible with any release of OpenSSL, or +necessarily earlier releases of LibreSSL. You will need to relink your +programs to LibreSSL in order to use it, just as in moving between major +versions of OpenSSL. LibreSSL's installed library version numbers are +incremented to account for ABI and API changes. + +Compatibility with other operating systems: + +While primarily developed on and taking advantage of APIs available on +OpenBSD, the LibreSSL portable project attempts to provide working +alternatives for other operating systems, and assists with improving +OS-native implementations where possible. + +At the time of this writing, LibreSSL is known to build and work on: + +* Linux (kernel 3.17 or later recommended) +* FreeBSD (tested with 9.2 and later) +* NetBSD (7.0 or later recommended) +* HP-UX (11i) +* Solaris (11 and later preferred) +* Mac OS X (tested with 10.8 and later) +* AIX (5.3 and later) + +LibreSSL also supports the following Windows environments: +* Microsoft Windows (Windows 7 / Windows Server 2008r2 or later, x86 and + x64) +* Wine (32-bit and 64-bit) +* Mingw-w64, Cygwin, and Visual Studio + +Please report bugs either to the public libressl@openbsd.org mailing +list, or to the github + +Severe vulnerabilities or bugs requiring coordination with OpenSSL can +be sent to the core team at libressl-security@openbsd.org. diff --git a/network/libressl/doinst.sh b/network/libressl/doinst.sh new file mode 100644 index 0000000000..2adf7cb85e --- /dev/null +++ b/network/libressl/doinst.sh @@ -0,0 +1,5 @@ +# Update all the shared library links: +if [ -x /sbin/ldconfig ]; then + echo "Updating shared library links: /sbin/ldconfig" + /sbin/ldconfig 2>/dev/null +fi diff --git a/network/libressl/douninst.sh b/network/libressl/douninst.sh new file mode 100644 index 0000000000..2adf7cb85e --- /dev/null +++ b/network/libressl/douninst.sh @@ -0,0 +1,5 @@ +# Update all the shared library links: +if [ -x /sbin/ldconfig ]; then + echo "Updating shared library links: /sbin/ldconfig" + /sbin/ldconfig 2>/dev/null +fi diff --git a/network/libressl/libressl.SlackBuild b/network/libressl/libressl.SlackBuild new file mode 100644 index 0000000000..1edbb38342 --- /dev/null +++ b/network/libressl/libressl.SlackBuild @@ -0,0 +1,107 @@ +#!/bin/bash + +# slackbuild script for libressl by D Woodfall +# +# WTFPL licence + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=libressl +VERSION=${VERSION:-3.7.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + \ + -o \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +PREFIX=/opt/$PRGNAM + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --enable-nc \ + --disable-tests \ + --disable-static \ + --prefix=$PREFIX \ + --libdir=$PREFIX/lib${LIBDIRSUFFIX} \ + --sysconfdir=$PREFIX/etc \ + --mandir=$PREFIX/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +mkdir -p $PKG/etc/ld.so.conf.d/ +echo $PREFIX/lib${LIBDIRSUFFIX} > $PKG/etc/ld.so.conf.d/$PRGNAM.conf + +mkdir -p $PKG/usr/bin +mv $PKG$PREFIX/bin/nc $PKG/usr/bin/nc-tls + +rm -f $PKG$PREFIX/{,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 + +find $PKG$PREFIX/man -type f -exec gzip -9 {} \; +for i in $( find $PKG$PREFIX/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/man/man1 +mv $PKG$PREFIX/man/man1/nc.1.gz $PKG/usr/man/man1/nc-tls.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING ChangeLog README.md $CWD/README \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/$PRGNAM-$VERSION-relnotes.txt > \ + $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-$VERSION-relnotes.txt + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/douninst.sh > $PKG/install/douninst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/network/libressl/libressl.info b/network/libressl/libressl.info new file mode 100644 index 0000000000..2c28fb82f6 --- /dev/null +++ b/network/libressl/libressl.info @@ -0,0 +1,12 @@ +PRGNAM="libressl" +VERSION="3.7.0" +HOMEPAGE="https://www.libressl.org" +DOWNLOAD="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.7.0.tar.gz \ + https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.7.0-relnotes.txt" +MD5SUM="302a11ca828332fae7bcacedf468a52e \ + 3fb3c277d83909dc90163b78b7f39400" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="D Woodfall" +EMAIL="dave@slackbuilds.org" diff --git a/network/libressl/slack-desc b/network/libressl/slack-desc new file mode 100644 index 0000000000..0e240ea20a --- /dev/null +++ b/network/libressl/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +libressl: libressl (OpenSSL fork by OpenBSD) +libressl: +libressl: LibreSSL is a fork of OpenSSL 1.0.1g developed by the OpenBSD +libressl: project. Our goal is to modernize the codebase, improve security, +libressl: and apply best practice development processes from OpenBSD. +libressl: +libressl: https://www.libressl.org +libressl: +libressl: +libressl: +libressl: -- cgit v1.2.3