Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit d50eccc

Browse files
author
pierre
committed
Add OpenSSL 1.1 compatibility package
git-svn-id: file:///srv/repos/svn-packages/svn@433976 eb2447ed-0c53-47e4-bac8-5bc4a241df78
0 parents  commit d50eccc

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

trunk/PKGBUILD

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
2+
3+
pkgname=openssl-1.1
4+
_pkgname=openssl
5+
_ver=1.1.1m
6+
# use a pacman compatible version scheme
7+
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
8+
pkgrel=1
9+
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
10+
arch=('x86_64')
11+
url='https://www.openssl.org'
12+
license=('custom:BSD')
13+
depends=('glibc')
14+
conflicts('openssl<3')
15+
makedepends=('perl')
16+
source=("https://www.openssl.org/source/${_pkgname}-${_ver}.tar.gz"{,.asc}
17+
'ca-dir.patch')
18+
sha256sums=('f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96'
19+
'SKIP'
20+
'75aa8c2c638c8a3ebfd9fa146fc61c7ff878fc997dc6aa10d39e4b2415d669b2')
21+
validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491'
22+
'7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C')
23+
24+
prepare() {
25+
cd "$srcdir/$_pkgname-$_ver"
26+
27+
# set ca dir to /etc/ssl by default
28+
patch -p0 -i "$srcdir/ca-dir.patch"
29+
}
30+
31+
build() {
32+
cd "$srcdir/$_pkgname-$_ver"
33+
34+
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
35+
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib/openssl-1.1 \
36+
shared no-ssl3-method enable-ec_nistp_64_gcc_128 linux-x86_64 \
37+
"-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
38+
39+
make depend
40+
make
41+
}
42+
43+
check() {
44+
cd "$srcdir/$_pkgname-$_ver"
45+
46+
# the test fails due to missing write permissions in /etc/ssl
47+
# revert this patch for make test
48+
patch -p0 -R -i "$srcdir/ca-dir.patch"
49+
50+
make test
51+
52+
patch -p0 -i "$srcdir/ca-dir.patch"
53+
# re-run make to re-generate CA.pl from th patched .in file.
54+
make apps/CA.pl
55+
}
56+
57+
package() {
58+
cd "$srcdir/$_pkgname-$_ver"
59+
60+
make DESTDIR="$pkgdir" install_sw
61+
62+
# Move some files around
63+
install -m755 -d "$pkgdir/usr/include/openssl-1.1"
64+
mv "$pkgdir/usr/include/openssl" "$pkgdir/usr/include/openssl-1.1/"
65+
mv "$pkgdir/usr/lib/openssl-1.1/libcrypto.so.1.1" "$pkgdir/usr/lib/"
66+
mv "$pkgdir/usr/lib/openssl-1.1/libssl.so.1.1" "$pkgdir/usr/lib/"
67+
ln -sf ../libssl.so.1.1 "$pkgdir/usr/lib/openssl-1.1/libssl.so"
68+
ln -sf ../libcrypto.so.1.1 "$pkgdir/usr/lib/openssl-1.1/libcrypto.so"
69+
mv "$pkgdir/usr/bin/openssl" "$pkgdir/usr/bin/openssl-1.1"
70+
71+
# Update includedir in .pc files
72+
sed -e 's|/include$|/include/openssl-1.1|' -i "$pkgdir"/usr/lib/openssl-1.1/pkgconfig/*.pc
73+
74+
rm -rf "$pkgdir"/{etc,usr/bin/c_rehash}
75+
76+
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
77+
}

trunk/ca-dir.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
--- apps/CA.pl.in 2019-09-10 15:13:07.000000000 +0200
2+
+++ apps/CA.pl.in 2019-10-06 09:34:23.960864556 +0200
3+
@@ -33,7 +33,7 @@
4+
my $PKCS12 = "$openssl pkcs12";
5+
6+
# default openssl.cnf file has setup as per the following
7+
-my $CATOP = "./demoCA";
8+
+my $CATOP = "/etc/ssl";
9+
my $CAKEY = "cakey.pem";
10+
my $CAREQ = "careq.pem";
11+
my $CACERT = "cacert.pem";
12+
--- apps/openssl.cnf 2019-09-10 15:13:07.000000000 +0200
13+
+++ apps/openssl.cnf 2019-10-06 09:34:23.960864556 +0200
14+
@@ -42,7 +42,7 @@
15+
####################################################################
16+
[ CA_default ]
17+
18+
-dir = ./demoCA # Where everything is kept
19+
+dir = /etc/ssl # Where everything is kept
20+
certs = $dir/certs # Where the issued certs are kept
21+
crl_dir = $dir/crl # Where the issued crl are kept
22+
database = $dir/index.txt # database index file.
23+
@@ -325,7 +325,7 @@
24+
[ tsa_config1 ]
25+
26+
# These are used by the TSA reply generation only.
27+
-dir = ./demoCA # TSA root directory
28+
+dir = /etc/ssl # TSA root directory
29+
serial = $dir/tsaserial # The current serial number (mandatory)
30+
crypto_device = builtin # OpenSSL engine to use for signing
31+
signer_cert = $dir/tsacert.pem # The TSA signing certificate

0 commit comments

Comments
 (0)