summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEden Rose2017-07-12 23:55:03 -0400
committerEden Rose2017-07-12 23:55:03 -0400
commit06aee81afb7d1d1134865d82890a659cd3aff71b (patch)
treef07aa77badc368880b719f395cd4484851185699
downloadaur-06aee81afb7d1d1134865d82890a659cd3aff71b.tar.gz
Initial Commit - Working, tested 71217. E.R.
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD81
-rw-r--r--ca-dir.patch31
3 files changed, 135 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e17a20c373f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = openssl-git
+ pkgdesc = The Open Source toolkit for Secure Sockets Layer and Transport Layer Security. TLS(1.3), RC5, MD2 enabled. - Git Version
+ pkgver = 1.1.1.dev.20170712.084f9a7046
+ pkgrel = 1
+ url = https://www.openssl.org
+ arch = i686
+ arch = x86_64
+ license = custom:BSD
+ depends = perl
+ optdepends = ca-certificates
+ provides = openssl
+ provides = openssl-git
+ conflicts = openssl
+ replaces = openssl
+ backup = etc/ssl/openssl.cnf
+ source = git+https://github.com/openssl/openssl.git
+ source = ca-dir.patch
+ validpgpkeys = 8657ABB260F056B1E5190839D9C4D26D0E604491
+ md5sums = SKIP
+ md5sums = 02b53865fb70faef763e262b4971aa4b
+
+pkgname = openssl-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..fdae0f9a395
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,81 @@
+# $Id$
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+# Maintainer: Eden Rose <eenov1988@gmail.com>
+
+_pkgname=openssl
+pkgname=openssl-git
+_ver=1.1.0f
+# use a pacman compatible version scheme
+pkgver=1.1.1.dev.20170712.084f9a7046
+#pkgver=$_ver
+pkgrel=1
+pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security. TLS(1.3), RC5, MD2 enabled. - Git Version'
+arch=('i686' 'x86_64')
+url='https://www.openssl.org'
+license=('custom:BSD')
+depends=('perl')
+conflicts=('openssl')
+replaces=('openssl')
+provides=('openssl' 'openssl-git')
+optdepends=('ca-certificates')
+backup=('etc/ssl/openssl.cnf')
+source=(git+https://github.com/openssl/openssl.git
+ "ca-dir.patch")
+md5sums=('SKIP'
+ '02b53865fb70faef763e262b4971aa4b')
+validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491')
+
+
+pkgver() {
+cd "$srcdir/$_pkgname"
+
+ DATE="$(date +%Y%m%d)"
+ VER1=$(cat README | grep "OpenSSL" | head -1 | sed -e 's/ /\n/g' | tail -1 | sed -e 's/-/./g')
+ PV=$(git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo `git rev-parse --short HEAD`) ### get GIT version
+ echo "$VER1"."$DATE"."$PV"
+}
+
+
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+
+ # set ca dir to /etc/ssl by default
+ patch -p0 -i $srcdir/ca-dir.patch
+}
+
+build() {
+ cd "$srcdir/$_pkgname"
+
+ if [ "${CARCH}" == 'x86_64' ]; then
+ openssltarget='linux-x86_64'
+ optflags='enable-ec_nistp_64_gcc_128'
+ elif [ "${CARCH}" == 'i686' ]; then
+ openssltarget='linux-elf'
+ optflags=''
+ fi
+
+
+ # mark stack as non-executable: http://bugs.archlinux.org/task/12434
+ ./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
+ shared zlib-dynamic threads enable-md2 enable-rc5 enable-tls enable-tls1_3 enable-tls1_2 enable-tls1_1 ${optflags} \
+ "${openssltarget}" "-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
+
+ make depend
+ make
+}
+
+check() {
+ cd "$srcdir/$_pkgname"
+ # the test fails due to missing write permissions in /etc/ssl
+ # revert this patch for make test
+ patch -p0 -R -i $srcdir/ca-dir.patch
+ make test
+ patch -p0 -i $srcdir/ca-dir.patch
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+ make DESTDIR=$pkgdir MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
+ install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
diff --git a/ca-dir.patch b/ca-dir.patch
new file mode 100644
index 00000000000..1daba849b4c
--- /dev/null
+++ b/ca-dir.patch
@@ -0,0 +1,31 @@
+--- apps/CA.pl.in 2016-09-26 11:46:04.000000000 +0200
++++ apps/CA.pl.in 2016-11-01 16:02:16.709616823 +0100
+@@ -33,7 +33,7 @@
+ my $PKCS12 = "$openssl pkcs12";
+
+ # default openssl.cnf file has setup as per the following
+-my $CATOP = "./demoCA";
++my $CATOP = "/etc/ssl";
+ my $CAKEY = "cakey.pem";
+ my $CAREQ = "careq.pem";
+ my $CACERT = "cacert.pem";
+--- apps/openssl.cnf 2016-09-26 11:46:04.000000000 +0200
++++ apps/openssl.cnf 2016-11-01 16:02:48.378503427 +0100
+@@ -39,7 +39,7 @@
+ ####################################################################
+ [ CA_default ]
+
+-dir = ./demoCA # Where everything is kept
++dir = /etc/ssl # Where everything is kept
+ certs = $dir/certs # Where the issued certs are kept
+ crl_dir = $dir/crl # Where the issued crl are kept
+ database = $dir/index.txt # database index file.
+@@ -323,7 +323,7 @@
+ [ tsa_config1 ]
+
+ # These are used by the TSA reply generation only.
+-dir = ./demoCA # TSA root directory
++dir = /etc/ssl # TSA root directory
+ serial = $dir/tsaserial # The current serial number (mandatory)
+ crypto_device = builtin # OpenSSL engine to use for signing
+ signer_cert = $dir/tsacert.pem # The TSA signing certificate