diff options
author | Xiao-Long Chen | 2015-06-08 20:40:09 -0400 |
---|---|---|
committer | Xiao-Long Chen | 2015-06-08 20:40:09 -0400 |
commit | 801436b12df9ce0ce9556bb4f022cd266c82bb59 (patch) | |
tree | cd5ce43bca9d34a0dfe3dc3b4540137fe598b8af | |
download | aur-801436b12df9ce0ce9556bb4f022cd266c82bb59.tar.gz |
Import from old AUR
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 75 | ||||
-rw-r--r-- | mod_nss-conf.patch | 75 | ||||
-rw-r--r-- | mod_nss-gencert.patch | 40 | ||||
-rw-r--r-- | mod_nss.install | 9 |
5 files changed, 228 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b7a509cc9cbc --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +# Generated by makepkg 4.2.0 +# Thu Jan 1 00:09:00 UTC 2015 +pkgbase = mod_nss + pkgdesc = SSL/TLS module for the Apache HTTP server + pkgver = 1.0.11 + pkgrel = 1 + url = https://fedorahosted.org/mod_nss/ + install = mod_nss.install + arch = i686 + arch = x86_64 + license = Apache + depends = apache + depends = apr + depends = nspr + depends = nss + backup = etc/httpd/conf/extra/nss.conf + backup = etc/httpd/alias/secmod.db + backup = etc/httpd/alias/cert8.db + backup = etc/httpd/alias/key3.db + backup = etc/httpd/alias/install.log + source = https://fedorahosted.org/released/mod_nss/mod_nss-1.0.11.tar.gz + source = mod_nss-conf.patch + source = mod_nss-gencert.patch + sha512sums = 659ce74a48bf09d5ade3c1cc7f64bb3b529049f8591519000d59079485c8231a60a681718a380fa4ec9897216909f24dc6bab88d023a00dd2d6b08d997b5ef47 + sha512sums = 90e6f55cf1ccc4e33062d7077b6cb3e065b31e1c9947fd2246c682994f50fff62c2c9e9424b65bae4bea5ed8e0c4d9748ddbaa23c93d4da7106b914a8aa74539 + sha512sums = bbfd2b85e1aa2daf312ca621b309fd626f8fc6e5ed5ebc2321f95351347284ba5d57bda9be646fff4ff7d9656939db779d4344de9689eaa9fd63aacb79821ead + +pkgname = mod_nss + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d5a0d7032eed --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to> + +pkgname=mod_nss +pkgver=1.0.11 +pkgrel=1 +pkgdesc="SSL/TLS module for the Apache HTTP server" +arch=(i686 x86_64) +url="https://fedorahosted.org/mod_nss/" +license=(Apache) +depends=(apache apr nspr nss) +backup=(etc/httpd/conf/extra/nss.conf + etc/httpd/alias/secmod.db + etc/httpd/alias/cert8.db + etc/httpd/alias/key3.db + etc/httpd/alias/install.log) +install=mod_nss.install +# Patches are from Fedora +source=("https://fedorahosted.org/released/mod_nss/mod_nss-${pkgver}.tar.gz" + mod_nss-conf.patch + mod_nss-gencert.patch) +sha512sums=('659ce74a48bf09d5ade3c1cc7f64bb3b529049f8591519000d59079485c8231a60a681718a380fa4ec9897216909f24dc6bab88d023a00dd2d6b08d997b5ef47' + '90e6f55cf1ccc4e33062d7077b6cb3e065b31e1c9947fd2246c682994f50fff62c2c9e9424b65bae4bea5ed8e0c4d9748ddbaa23c93d4da7106b914a8aa74539' + 'bbfd2b85e1aa2daf312ca621b309fd626f8fc6e5ed5ebc2321f95351347284ba5d57bda9be646fff4ff7d9656939db779d4344de9689eaa9fd63aacb79821ead') + +prepare() { + cd "${pkgname}-${pkgver}" + patch -p1 -i ../mod_nss-conf.patch + patch -p1 -i ../mod_nss-gencert.patch + + # Update timestamps to avoid regeneration + touch nss_expr_*.[chyl] +} + +build() { + cd "${pkgname}-${pkgver}" + + export APXS=/usr/bin/apxs + + autoreconf -vfi + ./configure \ + --prefix=/usr \ + --with-apr-config \ + --enable-ecc + make all +} + +check() { + cd "${pkgname}-${pkgver}" + make check +} + +package() { + cd "${pkgname}-${pkgver}" + + install -dm755 "${pkgdir}/etc/httpd/conf/extra/" + install -dm755 "${pkgdir}/etc/httpd/alias/" + install -dm755 "${pkgdir}/usr/lib/httpd/modules/" + install -dm755 "${pkgdir}/usr/bin/" + install -dm755 "${pkgdir}/usr/share/man/man8/" + + install -m644 gencert.8 "${pkgdir}/usr/share/man/man8/" + install -m644 nss_pcache.8 "${pkgdir}/usr/share/man/man8/" + install -m644 nss.conf "${pkgdir}/etc/httpd/conf/extra/" + install -m755 .libs/libmodnss.so "${pkgdir}/usr/lib/httpd/modules/" + install -m755 nss_pcache "${pkgdir}/usr/bin/" + install -m755 gencert "${pkgdir}/usr/bin/" + + perl -pi -e "s:/usr/lib:/usr/bin:" "${pkgdir}/usr/bin/gencert" + + ln -s ../../../usr/lib/libnssckbi.so "${pkgdir}/etc/httpd/alias/" + touch "${pkgdir}/etc/httpd/alias/secmod.db" + touch "${pkgdir}/etc/httpd/alias/cert8.db" + touch "${pkgdir}/etc/httpd/alias/key3.db" + touch "${pkgdir}/etc/httpd/alias/install.log" +} diff --git a/mod_nss-conf.patch b/mod_nss-conf.patch new file mode 100644 index 000000000000..51fd900b55b1 --- /dev/null +++ b/mod_nss-conf.patch @@ -0,0 +1,75 @@ +From bc24e3c0a438a2b6f177227b3340b516c15292a8 Mon Sep 17 00:00:00 2001 +From: Rob Crittenden <rcritten@redhat.com> +Date: Thu, 20 Feb 2014 17:21:41 -0500 +Subject: [PATCH] Configure nss.conf.in to match Fedora filesystem layout + +--- + nss.conf.in | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +diff --git a/nss.conf.in b/nss.conf.in +index c941ecf..349a810 100644 +--- a/nss.conf.in ++++ b/nss.conf.in +@@ -8,14 +8,16 @@ + # consult the online docs. You have been warned. + # + ++LoadModule nss_module modules/libmodnss.so ++ + # + # When we also provide SSL we have to listen to the + # standard HTTP port (see above) and to the HTTPS port + # + # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two +-# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443" ++# Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443" + # +-Listen 443 ++Listen 8443 + + ## + ## SSL Global Context +@@ -79,17 +81,17 @@ NSSRequireSafeNegotiation off + ## SSL Virtual Host Context + ## + +-<VirtualHost _default_:443> ++<VirtualHost _default_:8443> + + # General setup for the virtual host + #DocumentRoot "@apache_prefix@/htdocs" +-#ServerName www.example.com:443 ++#ServerName www.example.com:8443 + #ServerAdmin you@example.com + + # mod_nss can log to separate log files, you can choose to do that if you'd like + # LogLevel is not inherited from httpd.conf. +-#ErrorLog @apache_prefix@/logs/error_log +-#TransferLog @apache_prefix@/logs/access_log ++ErrorLog @apache_prefix@/logs/error_log ++TransferLog @apache_prefix@/logs/access_log + LogLevel warn + + # SSL Engine Switch: +@@ -133,7 +135,7 @@ NSSNickname Server-Cert + # The NSS security database directory that holds the certificates and + # keys. The database consists of 3 files: cert8.db, key3.db and secmod.db. + # Provide the directory that these files exist. +-NSSCertificateDatabase @apache_conf@ ++NSSCertificateDatabase /etc/httpd/alias + + # Database Prefix: + # In order to be able to store multiple NSS databases in one directory +@@ -209,7 +211,7 @@ NSSCertificateDatabase @apache_conf@ + <Files ~ "\.(cgi|shtml|phtml|php3?)$"> + NSSOptions +StdEnvVars + </Files> +-<Directory "@apache_prefix@/cgi-bin"> ++<Directory "/var/www/cgi-bin"> + NSSOptions +StdEnvVars + </Directory> + +-- +1.7.11.7 + diff --git a/mod_nss-gencert.patch b/mod_nss-gencert.patch new file mode 100644 index 000000000000..a993e2d5dcc4 --- /dev/null +++ b/mod_nss-gencert.patch @@ -0,0 +1,40 @@ +From 2d99bb694029f06d3bb7810922e755c57229b951 Mon Sep 17 00:00:00 2001 +From: Rob Crittenden <rcritten@redhat.com> +Date: Tue, 2 Dec 2014 11:34:23 -0500 +Subject: [PATCH] Modify gencert to create a password-less database + +--- + gencert.in | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/gencert.in b/gencert.in +index ffccaab..1808f42 100755 +--- a/gencert.in ++++ b/gencert.in +@@ -85,12 +85,11 @@ fi + + DBDIR=$1 + +-echo "httptest" > $DEST/pw.txt ++echo -e "\n" > $DEST/pw.txt + + echo "" + echo "#####################################################################" +-echo "Generating new server certificate and key database. The password" +-echo "is httptest" ++echo "Generating new server certificate and key database." + echo "#####################################################################" + $CERTUTIL -N -d $DBDIR -f $DEST/pw.txt + +@@ -207,8 +206,4 @@ echo "#####################################################################" + rm $DEST/pw.txt + rm $DEST/noise + +-echo "" +-echo "The database password is httptest" +-echo "" +- + exit 0 +-- +1.9.3 + diff --git a/mod_nss.install b/mod_nss.install new file mode 100644 index 000000000000..ef12764fbdee --- /dev/null +++ b/mod_nss.install @@ -0,0 +1,9 @@ +post_install() { + if [ ! -e etc/httpd/alias/key3.db ]; then + gencert etc/httpd/alias &>etc/httpd/alias/install.log + echo "mod_nss certificate database generated." + fi + + find etc/httpd/alias -user root -name '*.db' -exec chgrp apache {} \; + find etc/httpd/alias -user root -name '*.db' -exec chmod g+r {} \; +} |