From: Graham Leggett Date: Sat, 5 Jun 2010 14:19:26 +0000 (+0000) Subject: Fix the RPM spec file to autogenerate self-signed certs in the place X-Git-Tag: 2.3.6~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c8bfdbb26a3a5c6c8717e17b228c5a6b86faa2f;p=apache Fix the RPM spec file to autogenerate self-signed certs in the place 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 --- diff --git a/build/rpm/httpd.spec.in b/build/rpm/httpd.spec.in index 6524a9beb3..f362c6e14a 100644 --- a/build/rpm/httpd.spec.in +++ b/build/rpm/httpd.spec.in @@ -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