]> granicus.if.org Git - apache/commitdiff
Fix the RPM spec file to autogenerate self-signed certs in the place
authorGraham Leggett <minfrin@apache.org>
Sat, 5 Jun 2010 14:19:26 +0000 (14:19 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 5 Jun 2010 14:19:26 +0000 (14:19 +0000)
where the default httpd-ssl.conf expects to find them.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951725 13f79535-47bb-0310-9956-ffa450edef68

build/rpm/httpd.spec.in

index 6524a9beb3ed474d9b878edc07a3f5d23a3fcb62..f362c6e14ac0a4afe621ca531d08f19b557ab284 100644 (file)
@@ -175,6 +175,7 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd/cache-root
 ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs
 ln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/etc/httpd/run
 ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
 
 # install SYSV init stuff
 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
@@ -216,8 +217,8 @@ fi
 %post -n mod_ssl
 umask 077
 
-if [ ! -f %{_sysconfdir}/httpd/conf/ssl.key/server.key ] ; then
-%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/httpd/conf/ssl.key/server.key 2> /dev/null
+if [ ! -f %{_sysconfdir}/httpd/conf/server.key ] ; then
+%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/httpd/conf/server.key 2> /dev/null
 fi
 
 FQDN=`hostname`
@@ -225,8 +226,8 @@ if [ "x${FQDN}" = "x" ]; then
    FQDN=localhost.localdomain
 fi
 
-if [ ! -f %{_sysconfdir}/httpd/conf/ssl.crt/server.crt ] ; then
-cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/httpd/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/httpd/conf/ssl.crt/server.crt 2>/dev/null
+if [ ! -f %{_sysconfdir}/httpd/conf/server.crt ] ; then
+cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/httpd/conf/server.key -x509 -days 365 -out %{_sysconfdir}/httpd/conf/server.crt 2>/dev/null
 --
 SomeState
 SomeCity
@@ -267,6 +268,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/httpd/logs
 %{_sysconfdir}/httpd/run
 %dir %{_sysconfdir}/httpd/conf
+%dir %{_sysconfdir}/httpd/conf.d
 %config(noreplace) %{_sysconfdir}/httpd/conf/httpd.conf
 %config(noreplace) %{_sysconfdir}/httpd/conf/magic
 %config(noreplace) %{_sysconfdir}/httpd/conf/mime.types