| [34] | 1 | %define contentdir /var/www |
|---|
| 2 | %define suexec_caller apache |
|---|
| 3 | %define mmn 20051115 |
|---|
| 4 | %define vstring Fedora |
|---|
| 5 | %define distro Fedora Core |
|---|
| 6 | |
|---|
| 7 | Summary: Apache HTTP Server |
|---|
| 8 | Name: httpd |
|---|
| 9 | Version: 2.2.3 |
|---|
| 10 | Release: 5 |
|---|
| 11 | URL: http://httpd.apache.org/ |
|---|
| 12 | Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz |
|---|
| 13 | Source1: index.html |
|---|
| 14 | Source3: httpd.logrotate |
|---|
| 15 | Source4: httpd.init |
|---|
| 16 | Source5: httpd.sysconf |
|---|
| 17 | Source7: powered_by_fedora.png |
|---|
| 18 | Source10: httpd.conf |
|---|
| 19 | Source11: ssl.conf |
|---|
| 20 | Source12: welcome.conf |
|---|
| 21 | Source13: manual.conf |
|---|
| 22 | Source14: proxy_ajp.conf |
|---|
| 23 | # Documentation |
|---|
| 24 | Source30: migration.xml |
|---|
| 25 | Source31: migration.css |
|---|
| 26 | Source32: html.xsl |
|---|
| 27 | Source33: README.confd |
|---|
| 28 | # build/scripts patches |
|---|
| 29 | Patch1: httpd-2.1.10-apctl.patch |
|---|
| 30 | Patch2: httpd-2.1.10-apxs.patch |
|---|
| 31 | Patch3: httpd-2.0.45-deplibs.patch |
|---|
| 32 | Patch4: httpd-2.1.10-disablemods.patch |
|---|
| 33 | Patch5: httpd-2.1.10-layout.patch |
|---|
| 34 | Patch6: httpd-2.2.2-ac260.patch |
|---|
| 35 | # Features/functional changes |
|---|
| 36 | Patch20: httpd-2.0.48-release.patch |
|---|
| 37 | Patch21: httpd-2.0.40-xfsz.patch |
|---|
| 38 | Patch22: httpd-2.1.10-pod.patch |
|---|
| 39 | Patch23: httpd-2.0.45-export.patch |
|---|
| 40 | Patch24: httpd-2.0.48-corelimit.patch |
|---|
| 41 | Patch25: httpd-2.0.54-selinux.patch |
|---|
| 42 | # Bug fixes |
|---|
| 43 | Patch50: httpd-2.0.45-encode.patch |
|---|
| 44 | Patch54: httpd-2.2.0-authnoprov.patch |
|---|
| 45 | License: Apache Software License |
|---|
| 46 | Group: System Environment/Daemons |
|---|
| 47 | BuildRoot: %{_tmppath}/%{name}-root |
|---|
| 48 | BuildRequires: autoconf, perl, pkgconfig, xmlto >= 0.0.11, findutils |
|---|
| 49 | BuildRequires: db4-devel, expat-devel, zlib-devel, libselinux-devel |
|---|
| 50 | BuildRequires: apr-devel >= 1.2.0, apr-util-devel >= 1.2.0, pcre-devel >= 5.0, |
|---|
| 51 | Requires: /etc/mime.types, gawk, /usr/share/magic.mime, /usr/bin/find |
|---|
| 52 | Requires: initscripts >= 8.36 |
|---|
| 53 | Obsoletes: httpd-suexec |
|---|
| 54 | Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv |
|---|
| 55 | Prereq: sh-utils, textutils, /usr/sbin/useradd |
|---|
| 56 | Provides: webserver |
|---|
| 57 | Provides: httpd-mmn = %{mmn} |
|---|
| 58 | Obsoletes: apache, secureweb, mod_dav, mod_gzip, stronghold-apache, stronghold-htdocs |
|---|
| 59 | Obsoletes: mod_put, mod_roaming, mod_jk |
|---|
| 60 | Conflicts: pcre < 4.0 |
|---|
| 61 | |
|---|
| 62 | Patch1000: httpd-suexec-scripts.patch |
|---|
| 63 | |
|---|
| 64 | %description |
|---|
| 65 | The Apache HTTP Server is a powerful, efficient, and extensible |
|---|
| 66 | web server. |
|---|
| 67 | |
|---|
| 68 | %package devel |
|---|
| 69 | Group: Development/Libraries |
|---|
| 70 | Summary: Development tools for the Apache HTTP server. |
|---|
| 71 | Obsoletes: secureweb-devel, apache-devel, stronghold-apache-devel |
|---|
| 72 | Requires: apr-devel, apr-util-devel, pkgconfig |
|---|
| 73 | Requires: httpd = %{version}-%{release} |
|---|
| 74 | |
|---|
| 75 | %description devel |
|---|
| 76 | The httpd-devel package contains the APXS binary and other files |
|---|
| 77 | that you need to build Dynamic Shared Objects (DSOs) for the |
|---|
| 78 | Apache HTTP Server. |
|---|
| 79 | |
|---|
| 80 | If you are installing the Apache HTTP server and you want to be |
|---|
| 81 | able to compile or develop additional modules for Apache, you need |
|---|
| 82 | to install this package. |
|---|
| 83 | |
|---|
| 84 | %package manual |
|---|
| 85 | Group: Documentation |
|---|
| 86 | Summary: Documentation for the Apache HTTP server. |
|---|
| 87 | Requires: httpd = %{version}-%{release} |
|---|
| 88 | Obsoletes: secureweb-manual, apache-manual |
|---|
| 89 | |
|---|
| 90 | %description manual |
|---|
| 91 | The httpd-manual package contains the complete manual and |
|---|
| 92 | reference guide for the Apache HTTP server. The information can |
|---|
| 93 | also be found at http://httpd.apache.org/docs/2.2/. |
|---|
| 94 | |
|---|
| 95 | %package -n mod_ssl |
|---|
| 96 | Group: System Environment/Daemons |
|---|
| 97 | Summary: SSL/TLS module for the Apache HTTP server |
|---|
| 98 | Epoch: 1 |
|---|
| 99 | BuildRequires: openssl-devel, distcache-devel |
|---|
| 100 | Requires(post): openssl >= 0.9.7f-4, /bin/cat |
|---|
| 101 | Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmn} |
|---|
| 102 | Obsoletes: stronghold-mod_ssl |
|---|
| 103 | |
|---|
| 104 | %description -n mod_ssl |
|---|
| 105 | The mod_ssl module provides strong cryptography for the Apache Web |
|---|
| 106 | server via the Secure Sockets Layer (SSL) and Transport Layer |
|---|
| 107 | Security (TLS) protocols. |
|---|
| 108 | |
|---|
| 109 | %prep |
|---|
| 110 | %setup -q |
|---|
| 111 | %patch1 -p1 -b .apctl |
|---|
| 112 | %patch2 -p1 -b .apxs |
|---|
| 113 | %patch3 -p1 -b .deplibs |
|---|
| 114 | %patch4 -p1 -b .disablemods |
|---|
| 115 | %patch5 -p1 -b .layout |
|---|
| 116 | %patch6 -p1 -b .ac260 |
|---|
| 117 | |
|---|
| 118 | %patch21 -p0 -b .xfsz |
|---|
| 119 | %patch22 -p1 -b .pod |
|---|
| 120 | %patch23 -p1 -b .export |
|---|
| 121 | %patch24 -p1 -b .corelimit |
|---|
| 122 | %patch25 -p1 -b .selinux |
|---|
| 123 | |
|---|
| 124 | # no -b to prevent droplets in install root |
|---|
| 125 | %patch50 -p1 |
|---|
| 126 | %patch54 -p1 -b .authnoprov |
|---|
| 127 | |
|---|
| 128 | # Patch in vendor/release string |
|---|
| 129 | sed "s/@RELEASE@/%{vstring}/" < %{PATCH20} | patch -p1 |
|---|
| 130 | |
|---|
| 131 | %patch1000 -p1 -b .scripts |
|---|
| 132 | |
|---|
| 133 | # Safety check: prevent build if defined MMN does not equal upstream MMN. |
|---|
| 134 | vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include include/ap_mmn.h | sed -n '/^2/p'` |
|---|
| 135 | if test "x${vmmn}" != "x%{mmn}"; then |
|---|
| 136 | : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}. |
|---|
| 137 | : Update the mmn macro and rebuild. |
|---|
| 138 | exit 1 |
|---|
| 139 | fi |
|---|
| 140 | |
|---|
| 141 | : Building for '%{distro}' with MMN %{mmn} and vendor string '%{vstring}' |
|---|
| 142 | |
|---|
| 143 | %build |
|---|
| 144 | # forcibly prevent use of bundled apr, apr-util, pcre |
|---|
| 145 | rm -rf srclib/{apr,apr-util,pcre} |
|---|
| 146 | |
|---|
| 147 | # regenerate configure scripts |
|---|
| 148 | autoheader && autoconf || exit 1 |
|---|
| 149 | |
|---|
| 150 | # Limit size of CHANGES to recent history |
|---|
| 151 | echo '1,/Changes with Apache MPM/wq' | ed CHANGES |
|---|
| 152 | |
|---|
| 153 | # Before configure; fix location of build dir in generated apxs |
|---|
| 154 | %{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \ |
|---|
| 155 | support/apxs.in |
|---|
| 156 | # update location of migration guide in apachectl |
|---|
| 157 | %{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \ |
|---|
| 158 | support/apachectl.in |
|---|
| 159 | |
|---|
| 160 | # Build the migration guide |
|---|
| 161 | sed 's/@DISTRO@/%{distro}/' < $RPM_SOURCE_DIR/migration.xml > migration.xml |
|---|
| 162 | xmlto -x $RPM_SOURCE_DIR/html.xsl html-nochunks migration.xml |
|---|
| 163 | cp $RPM_SOURCE_DIR/migration.css . # make %%doc happy |
|---|
| 164 | |
|---|
| 165 | CFLAGS=$RPM_OPT_FLAGS |
|---|
| 166 | SH_LDFLAGS="-Wl,-z,relro" |
|---|
| 167 | export CFLAGS SH_LDFLAGS |
|---|
| 168 | |
|---|
| 169 | function mpmbuild() |
|---|
| 170 | { |
|---|
| 171 | mpm=$1; shift |
|---|
| 172 | mkdir $mpm; pushd $mpm |
|---|
| 173 | ../configure \ |
|---|
| 174 | --prefix=%{_sysconfdir}/httpd \ |
|---|
| 175 | --exec-prefix=%{_prefix} \ |
|---|
| 176 | --bindir=%{_bindir} \ |
|---|
| 177 | --sbindir=%{_sbindir} \ |
|---|
| 178 | --mandir=%{_mandir} \ |
|---|
| 179 | --libdir=%{_libdir} \ |
|---|
| 180 | --sysconfdir=%{_sysconfdir}/httpd/conf \ |
|---|
| 181 | --includedir=%{_includedir}/httpd \ |
|---|
| 182 | --libexecdir=%{_libdir}/httpd/modules \ |
|---|
| 183 | --datadir=%{contentdir} \ |
|---|
| 184 | --with-installbuilddir=%{_libdir}/httpd/build \ |
|---|
| 185 | --with-mpm=$mpm \ |
|---|
| 186 | --with-apr=%{_prefix} --with-apr-util=%{_prefix} \ |
|---|
| 187 | --enable-suexec --with-suexec \ |
|---|
| 188 | --with-suexec-caller=%{suexec_caller} \ |
|---|
| 189 | --with-suexec-docroot=%{contentdir} \ |
|---|
| 190 | --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \ |
|---|
| 191 | --with-suexec-bin=%{_sbindir}/suexec \ |
|---|
| 192 | --with-suexec-uidmin=500 --with-suexec-gidmin=100 \ |
|---|
| 193 | --enable-pie \ |
|---|
| 194 | --with-pcre \ |
|---|
| 195 | $* |
|---|
| 196 | |
|---|
| 197 | make %{?_smp_mflags} |
|---|
| 198 | popd |
|---|
| 199 | } |
|---|
| 200 | |
|---|
| 201 | # Build everything and the kitchen sink with the prefork build |
|---|
| 202 | mpmbuild prefork \ |
|---|
| 203 | --enable-mods-shared=all \ |
|---|
| 204 | --enable-ssl --with-ssl --enable-distcache \ |
|---|
| 205 | --enable-proxy \ |
|---|
| 206 | --enable-cache --enable-mem-cache \ |
|---|
| 207 | --enable-file-cache --enable-disk-cache \ |
|---|
| 208 | --enable-ldap --enable-authnz-ldap \ |
|---|
| 209 | --enable-cgid \ |
|---|
| 210 | --enable-authn-anon --enable-authn-alias |
|---|
| 211 | |
|---|
| 212 | # For the other MPMs, just build httpd and no optional modules |
|---|
| 213 | mpmbuild worker --enable-modules=none |
|---|
| 214 | #mpmbuild event --enable-modules=none |
|---|
| 215 | |
|---|
| 216 | %install |
|---|
| 217 | rm -rf $RPM_BUILD_ROOT |
|---|
| 218 | |
|---|
| 219 | # Classify ab and logresolve as section 1 commands, as they are in /usr/bin |
|---|
| 220 | mv docs/man/ab.8 docs/man/ab.1 |
|---|
| 221 | mv docs/man/logresolve.8 docs/man/logresolve.1 |
|---|
| 222 | |
|---|
| 223 | pushd prefork |
|---|
| 224 | make DESTDIR=$RPM_BUILD_ROOT install |
|---|
| 225 | popd |
|---|
| 226 | |
|---|
| 227 | # install alternative MPMs |
|---|
| 228 | install -m 755 worker/httpd $RPM_BUILD_ROOT%{_sbindir}/httpd.worker |
|---|
| 229 | #install -m 755 event/httpd $RPM_BUILD_ROOT%{_sbindir}/httpd.event |
|---|
| 230 | |
|---|
| 231 | # install conf file/directory |
|---|
| 232 | mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
|---|
| 233 | install -m 644 $RPM_SOURCE_DIR/README.confd \ |
|---|
| 234 | $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/README |
|---|
| 235 | for f in ssl.conf welcome.conf manual.conf proxy_ajp.conf; do |
|---|
| 236 | install -m 644 $RPM_SOURCE_DIR/$f $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/$f |
|---|
| 237 | done |
|---|
| 238 | |
|---|
| 239 | rm $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/*.conf |
|---|
| 240 | install -m 644 $RPM_SOURCE_DIR/httpd.conf \ |
|---|
| 241 | $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/httpd.conf |
|---|
| 242 | |
|---|
| 243 | mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig |
|---|
| 244 | install -m 644 $RPM_SOURCE_DIR/httpd.sysconf \ |
|---|
| 245 | $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/httpd |
|---|
| 246 | |
|---|
| 247 | # for holding mod_dav lock database |
|---|
| 248 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav |
|---|
| 249 | |
|---|
| 250 | # create a prototype session cache |
|---|
| 251 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl |
|---|
| 252 | touch $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem} |
|---|
| 253 | |
|---|
| 254 | # create cache root |
|---|
| 255 | mkdir $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_proxy |
|---|
| 256 | |
|---|
| 257 | # move utilities to /usr/bin |
|---|
| 258 | mv $RPM_BUILD_ROOT%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \ |
|---|
| 259 | $RPM_BUILD_ROOT%{_bindir} |
|---|
| 260 | |
|---|
| 261 | # Make the MMN accessible to module packages |
|---|
| 262 | echo %{mmn} > $RPM_BUILD_ROOT%{_includedir}/httpd/.mmn |
|---|
| 263 | |
|---|
| 264 | # docroot |
|---|
| 265 | mkdir $RPM_BUILD_ROOT%{contentdir}/html |
|---|
| 266 | install -m 644 $RPM_SOURCE_DIR/index.html \ |
|---|
| 267 | $RPM_BUILD_ROOT%{contentdir}/error/noindex.html |
|---|
| 268 | |
|---|
| 269 | # remove manual sources |
|---|
| 270 | find $RPM_BUILD_ROOT%{contentdir}/manual \( \ |
|---|
| 271 | -name \*.xml -o -name \*.xml.* -o -name \*.ent -o -name \*.xsl -o -name \*.dtd \ |
|---|
| 272 | \) -print0 | xargs -0 rm -f |
|---|
| 273 | |
|---|
| 274 | # Strip the manual down just to English and replace the typemaps with flat files: |
|---|
| 275 | set +x |
|---|
| 276 | for f in `find $RPM_BUILD_ROOT%{contentdir}/manual -name \*.html -type f`; do |
|---|
| 277 | if test -f ${f}.en; then |
|---|
| 278 | cp ${f}.en ${f} |
|---|
| 279 | rm ${f}.* |
|---|
| 280 | fi |
|---|
| 281 | done |
|---|
| 282 | set -x |
|---|
| 283 | |
|---|
| 284 | install -m 644 $RPM_SOURCE_DIR/powered_by_fedora.png \ |
|---|
| 285 | $RPM_BUILD_ROOT%{contentdir}/icons |
|---|
| 286 | |
|---|
| 287 | # logs |
|---|
| 288 | rmdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logs |
|---|
| 289 | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/httpd |
|---|
| 290 | |
|---|
| 291 | # symlinks for /etc/httpd |
|---|
| 292 | ln -s $RPM_BUILD_ROOT%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs |
|---|
| 293 | ln -s $RPM_BUILD_ROOT%{_localstatedir}/run $RPM_BUILD_ROOT/etc/httpd/run |
|---|
| 294 | ln -s $RPM_BUILD_ROOT%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules |
|---|
| 295 | |
|---|
| 296 | # install SYSV init stuff |
|---|
| 297 | mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d |
|---|
| 298 | install -m755 $RPM_SOURCE_DIR/httpd.init \ |
|---|
| 299 | $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd |
|---|
| 300 | %{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \ |
|---|
| 301 | $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd |
|---|
| 302 | |
|---|
| 303 | # install log rotation stuff |
|---|
| 304 | mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d |
|---|
| 305 | install -m644 $RPM_SOURCE_DIR/httpd.logrotate \ |
|---|
| 306 | $RPM_BUILD_ROOT/etc/logrotate.d/httpd |
|---|
| 307 | |
|---|
| 308 | # fix man page paths |
|---|
| 309 | sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \ |
|---|
| 310 | -e "s|/usr/local/apache2/conf/mime.types|/etc/mime.types|" \ |
|---|
| 311 | -e "s|/usr/local/apache2/conf/magic|/etc/httpd/conf/magic|" \ |
|---|
| 312 | -e "s|/usr/local/apache2/logs/error_log|/var/log/httpd/error_log|" \ |
|---|
| 313 | -e "s|/usr/local/apache2/logs/access_log|/var/log/httpd/access_log|" \ |
|---|
| 314 | -e "s|/usr/local/apache2/logs/httpd.pid|/var/run/httpd.pid|" \ |
|---|
| 315 | -e "s|/usr/local/apache2|/etc/httpd|" < docs/man/httpd.8 \ |
|---|
| 316 | > $RPM_BUILD_ROOT%{_mandir}/man8/httpd.8 |
|---|
| 317 | |
|---|
| 318 | # Make ap_config_layout.h libdir-agnostic |
|---|
| 319 | sed -i '/.*DEFAULT_..._LIBEXECDIR/d;/DEFAULT_..._INSTALLBUILDDIR/d' \ |
|---|
| 320 | $RPM_BUILD_ROOT%{_includedir}/httpd/ap_config_layout.h |
|---|
| 321 | |
|---|
| 322 | # Remove unpackaged files |
|---|
| 323 | rm -f $RPM_BUILD_ROOT%{_libdir}/*.exp \ |
|---|
| 324 | $RPM_BUILD_ROOT/etc/httpd/conf/mime.types \ |
|---|
| 325 | $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.exp \ |
|---|
| 326 | $RPM_BUILD_ROOT%{_libdir}/httpd/build/config.nice \ |
|---|
| 327 | $RPM_BUILD_ROOT%{_bindir}/ap?-config \ |
|---|
| 328 | $RPM_BUILD_ROOT%{_sbindir}/{checkgid,dbmmanage,envvars*} \ |
|---|
| 329 | $RPM_BUILD_ROOT%{contentdir}/htdocs/* \ |
|---|
| 330 | $RPM_BUILD_ROOT%{_mandir}/man1/dbmmanage.* \ |
|---|
| 331 | $RPM_BUILD_ROOT%{contentdir}/cgi-bin/* |
|---|
| 332 | |
|---|
| 333 | rm -rf $RPM_BUILD_ROOT/etc/httpd/conf/{original,extra} |
|---|
| 334 | |
|---|
| 335 | # Make suexec a+rw so it can be stripped. %%files lists real permissions |
|---|
| 336 | chmod 755 $RPM_BUILD_ROOT%{_sbindir}/suexec |
|---|
| 337 | |
|---|
| 338 | %pre |
|---|
| 339 | # Add the "apache" user |
|---|
| 340 | /usr/sbin/useradd -c "Apache" -u 48 \ |
|---|
| 341 | -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || : |
|---|
| 342 | |
|---|
| 343 | %triggerpostun -- apache < 2.0, stronghold-apache < 2.0 |
|---|
| 344 | /sbin/chkconfig --add httpd |
|---|
| 345 | |
|---|
| 346 | # Prevent removal of index.html on upgrades from 1.3 |
|---|
| 347 | %triggerun -- apache < 2.0, stronghold-apache < 2.0 |
|---|
| 348 | if [ -r %{contentdir}/index.html -a ! -r %{contentdir}/index.html.rpmold ]; then |
|---|
| 349 | mv %{contentdir}/index.html %{contentdir}/index.html.rpmold |
|---|
| 350 | fi |
|---|
| 351 | |
|---|
| 352 | %post |
|---|
| 353 | # Register the httpd service |
|---|
| 354 | /sbin/chkconfig --add httpd |
|---|
| 355 | |
|---|
| 356 | %preun |
|---|
| 357 | if [ $1 = 0 ]; then |
|---|
| 358 | /sbin/service httpd stop > /dev/null 2>&1 |
|---|
| 359 | /sbin/chkconfig --del httpd |
|---|
| 360 | fi |
|---|
| 361 | |
|---|
| 362 | %define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt |
|---|
| 363 | %define sslkey %{_sysconfdir}/pki/tls/private/localhost.key |
|---|
| 364 | |
|---|
| 365 | %post -n mod_ssl |
|---|
| 366 | umask 077 |
|---|
| 367 | |
|---|
| 368 | if [ ! -f %{sslkey} ] ; then |
|---|
| 369 | %{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{sslkey} 2> /dev/null |
|---|
| 370 | fi |
|---|
| 371 | |
|---|
| 372 | FQDN=`hostname` |
|---|
| 373 | if [ "x${FQDN}" = "x" ]; then |
|---|
| 374 | FQDN=localhost.localdomain |
|---|
| 375 | fi |
|---|
| 376 | |
|---|
| 377 | if [ ! -f %{sslcert} ] ; then |
|---|
| 378 | cat << EOF | %{_bindir}/openssl req -new -key %{sslkey} \ |
|---|
| 379 | -x509 -days 365 -set_serial $RANDOM \ |
|---|
| 380 | -out %{sslcert} 2>/dev/null |
|---|
| 381 | -- |
|---|
| 382 | SomeState |
|---|
| 383 | SomeCity |
|---|
| 384 | SomeOrganization |
|---|
| 385 | SomeOrganizationalUnit |
|---|
| 386 | ${FQDN} |
|---|
| 387 | root@${FQDN} |
|---|
| 388 | EOF |
|---|
| 389 | fi |
|---|
| 390 | |
|---|
| 391 | %check |
|---|
| 392 | # Check the built modules are all PIC |
|---|
| 393 | if readelf -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so | grep TEXTREL; then |
|---|
| 394 | : modules contain non-relocatable code |
|---|
| 395 | exit 1 |
|---|
| 396 | fi |
|---|
| 397 | |
|---|
| 398 | # Verify that the same modules were built into the httpd binaries |
|---|
| 399 | ./prefork/httpd -l | grep -v prefork > prefork.mods |
|---|
| 400 | for mpm in worker; do |
|---|
| 401 | ./${mpm}/httpd -l | grep -v ${mpm} > ${mpm}.mods |
|---|
| 402 | if ! diff -u prefork.mods ${mpm}.mods; then |
|---|
| 403 | : Different modules built into httpd binaries, will not proceed |
|---|
| 404 | exit 1 |
|---|
| 405 | fi |
|---|
| 406 | done |
|---|
| 407 | |
|---|
| 408 | %clean |
|---|
| 409 | rm -rf $RPM_BUILD_ROOT |
|---|
| 410 | |
|---|
| 411 | %files |
|---|
| 412 | %defattr(-,root,root) |
|---|
| 413 | |
|---|
| 414 | %doc ABOUT_APACHE README CHANGES LICENSE VERSIONING NOTICE |
|---|
| 415 | %doc migration.html migration.css |
|---|
| 416 | |
|---|
| 417 | %dir %{_sysconfdir}/httpd |
|---|
| 418 | %{_sysconfdir}/httpd/modules |
|---|
| 419 | %{_sysconfdir}/httpd/logs |
|---|
| 420 | %{_sysconfdir}/httpd/run |
|---|
| 421 | %dir %{_sysconfdir}/httpd/conf |
|---|
| 422 | %config %{_sysconfdir}/httpd/conf/httpd.conf |
|---|
| 423 | %config(noreplace) %{_sysconfdir}/httpd/conf.d/welcome.conf |
|---|
| 424 | %config(noreplace) %{_sysconfdir}/httpd/conf.d/proxy_ajp.conf |
|---|
| 425 | %config(noreplace) %{_sysconfdir}/httpd/conf/magic |
|---|
| 426 | |
|---|
| 427 | %config(noreplace) %{_sysconfdir}/logrotate.d/httpd |
|---|
| 428 | %config %{_sysconfdir}/rc.d/init.d/httpd |
|---|
| 429 | |
|---|
| 430 | %dir %{_sysconfdir}/httpd/conf.d |
|---|
| 431 | %{_sysconfdir}/httpd/conf.d/README |
|---|
| 432 | |
|---|
| 433 | %config(noreplace) %{_sysconfdir}/sysconfig/httpd |
|---|
| 434 | |
|---|
| 435 | %{_bindir}/* |
|---|
| 436 | %{_sbindir}/ht* |
|---|
| 437 | %{_sbindir}/apachectl |
|---|
| 438 | %{_sbindir}/rotatelogs |
|---|
| 439 | %attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec |
|---|
| 440 | |
|---|
| 441 | %dir %{_libdir}/httpd |
|---|
| 442 | %dir %{_libdir}/httpd/modules |
|---|
| 443 | %{_libdir}/httpd/modules/mod*.so |
|---|
| 444 | %exclude %{_libdir}/httpd/modules/mod_ssl.so |
|---|
| 445 | |
|---|
| 446 | %dir %{contentdir} |
|---|
| 447 | %dir %{contentdir}/cgi-bin |
|---|
| 448 | %dir %{contentdir}/html |
|---|
| 449 | %dir %{contentdir}/icons |
|---|
| 450 | %dir %{contentdir}/error |
|---|
| 451 | %dir %{contentdir}/error/include |
|---|
| 452 | %{contentdir}/icons/* |
|---|
| 453 | %{contentdir}/error/README |
|---|
| 454 | %{contentdir}/error/noindex.html |
|---|
| 455 | %config %{contentdir}/error/*.var |
|---|
| 456 | %config %{contentdir}/error/include/*.html |
|---|
| 457 | |
|---|
| 458 | %attr(0700,root,root) %dir %{_localstatedir}/log/httpd |
|---|
| 459 | %attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav |
|---|
| 460 | %attr(0700,apache,apache) %dir %{_localstatedir}/cache/mod_proxy |
|---|
| 461 | |
|---|
| 462 | %{_mandir}/man?/* |
|---|
| 463 | %exclude %{_mandir}/man8/apxs.8* |
|---|
| 464 | |
|---|
| 465 | %files manual |
|---|
| 466 | %defattr(-,root,root) |
|---|
| 467 | %{contentdir}/manual |
|---|
| 468 | %config %{_sysconfdir}/httpd/conf.d/manual.conf |
|---|
| 469 | |
|---|
| 470 | %files -n mod_ssl |
|---|
| 471 | %defattr(-,root,root) |
|---|
| 472 | %{_libdir}/httpd/modules/mod_ssl.so |
|---|
| 473 | %config(noreplace) %{_sysconfdir}/httpd/conf.d/ssl.conf |
|---|
| 474 | %attr(0700,apache,root) %dir %{_localstatedir}/cache/mod_ssl |
|---|
| 475 | %attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.dir |
|---|
| 476 | %attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.pag |
|---|
| 477 | %attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.sem |
|---|
| 478 | |
|---|
| 479 | %files devel |
|---|
| 480 | %defattr(-,root,root) |
|---|
| 481 | %{_includedir}/httpd |
|---|
| 482 | %{_sbindir}/apxs |
|---|
| 483 | %{_mandir}/man8/apxs.8* |
|---|
| 484 | %dir %{_libdir}/httpd/build |
|---|
| 485 | %{_libdir}/httpd/build/*.mk |
|---|
| 486 | %{_libdir}/httpd/build/*.sh |
|---|
| 487 | |
|---|
| 488 | %changelog |
|---|
| 489 | * Mon Sep 11 2006 Joe Orton <jorton@redhat.com> 2.2.3-5 |
|---|
| 490 | - updated "powered by Fedora" logo (#205573, Diana Fong) |
|---|
| 491 | - tweak welcome page wording slightly (#205880) |
|---|
| 492 | |
|---|
| 493 | * Fri Aug 18 2006 Jesse Keating <jkeating@redhat.com> - 2.2.3-4 |
|---|
| 494 | - rebuilt with latest binutils to pick up 64K -z commonpagesize on ppc* |
|---|
| 495 | (#203001) |
|---|
| 496 | |
|---|
| 497 | * Thu Aug 3 2006 Joe Orton <jorton@redhat.com> 2.2.3-3 |
|---|
| 498 | - init: use killproc() delay to avoid race killing parent |
|---|
| 499 | |
|---|
| 500 | * Fri Jul 28 2006 Joe Orton <jorton@redhat.com> 2.2.3-2 |
|---|
| 501 | - update to 2.2.3 |
|---|
| 502 | - trim %%changelog to >=2.0.52 |
|---|
| 503 | |
|---|
| 504 | * Thu Jul 20 2006 Joe Orton <jorton@redhat.com> 2.2.2-8 |
|---|
| 505 | - fix segfault on dummy connection failure at graceful restart (#199429) |
|---|
| 506 | |
|---|
| 507 | * Wed Jul 19 2006 Joe Orton <jorton@redhat.com> 2.2.2-7 |
|---|
| 508 | - fix "apxs -g"-generated Makefile |
|---|
| 509 | - fix buildconf with autoconf 2.60 |
|---|
| 510 | |
|---|
| 511 | * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.2.2-5.1 |
|---|
| 512 | - rebuild |
|---|
| 513 | |
|---|
| 514 | * Wed Jun 7 2006 Joe Orton <jorton@redhat.com> 2.2.2-5 |
|---|
| 515 | - require pkgconfig for -devel (#194152) |
|---|
| 516 | - fixes for installed support makefiles (special.mk et al) |
|---|
| 517 | - BR autoconf |
|---|
| 518 | |
|---|
| 519 | * Fri Jun 2 2006 Joe Orton <jorton@redhat.com> 2.2.2-4 |
|---|
| 520 | - make -devel package multilib-safe (#192686) |
|---|
| 521 | |
|---|
| 522 | * Thu May 11 2006 Joe Orton <jorton@redhat.com> 2.2.2-3 |
|---|
| 523 | - build DSOs using -z relro linker flag |
|---|
| 524 | |
|---|
| 525 | * Wed May 3 2006 Joe Orton <jorton@redhat.com> 2.2.2-2 |
|---|
| 526 | - update to 2.2.2 |
|---|
| 527 | |
|---|
| 528 | * Thu Apr 6 2006 Joe Orton <jorton@redhat.com> 2.2.0-6 |
|---|
| 529 | - rebuild to pick up apr-util LDAP interface fix (#188073) |
|---|
| 530 | |
|---|
| 531 | * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - (none):2.2.0-5.1.2 |
|---|
| 532 | - bump again for double-long bug on ppc(64) |
|---|
| 533 | |
|---|
| 534 | * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - (none):2.2.0-5.1.1 |
|---|
| 535 | - rebuilt for new gcc4.1 snapshot and glibc changes |
|---|
| 536 | |
|---|
| 537 | * Mon Feb 6 2006 Joe Orton <jorton@redhat.com> 2.2.0-5.1 |
|---|
| 538 | - mod_auth_basic/mod_authn_file: if no provider is configured, |
|---|
| 539 | and AuthUserFile is not configured, decline to handle authn |
|---|
| 540 | silently rather than failing noisily. |
|---|
| 541 | |
|---|
| 542 | * Fri Feb 3 2006 Joe Orton <jorton@redhat.com> 2.2.0-5 |
|---|
| 543 | - mod_ssl: add security fix for CVE-2005-3357 (#177914) |
|---|
| 544 | - mod_imagemap: add security fix for CVE-2005-3352 (#177913) |
|---|
| 545 | - add fix for AP_INIT_* designated initializers with C++ compilers |
|---|
| 546 | - httpd.conf: enable HTMLTable in default IndexOptions |
|---|
| 547 | - httpd.conf: add more "redirect-carefully" matches for DAV clients |
|---|
| 548 | |
|---|
| 549 | * Thu Jan 5 2006 Joe Orton <jorton@redhat.com> 2.2.0-4 |
|---|
| 550 | - mod_proxy_ajp: fix Cookie handling (Mladen Turk, r358769) |
|---|
| 551 | |
|---|
| 552 | * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> |
|---|
| 553 | - rebuilt |
|---|
| 554 | |
|---|
| 555 | * Wed Dec 7 2005 Joe Orton <jorton@redhat.com> 2.2.0-3 |
|---|
| 556 | - strip manual to just English content |
|---|
| 557 | |
|---|
| 558 | * Mon Dec 5 2005 Joe Orton <jorton@redhat.com> 2.2.0-2 |
|---|
| 559 | - don't strip C-L from HEAD responses (Greg Ames, #110552) |
|---|
| 560 | - load mod_proxy_balancer by default |
|---|
| 561 | - add proxy_ajp.conf to load/configure mod_proxy_ajp |
|---|
| 562 | - Obsolete mod_jk |
|---|
| 563 | - update docs URLs in httpd.conf/ssl.conf |
|---|
| 564 | |
|---|
| 565 | * Fri Dec 2 2005 Joe Orton <jorton@redhat.com> 2.2.0-1 |
|---|
| 566 | - update to 2.2.0 |
|---|
| 567 | |
|---|
| 568 | * Wed Nov 30 2005 Joe Orton <jorton@redhat.com> 2.1.10-2 |
|---|
| 569 | - enable mod_authn_alias, mod_authn_anon |
|---|
| 570 | - update default httpd.conf |
|---|
| 571 | |
|---|
| 572 | * Fri Nov 25 2005 Joe Orton <jorton@redhat.com> 2.1.10-1 |
|---|
| 573 | - update to 2.1.10 |
|---|
| 574 | - require apr >= 1.2.0, apr-util >= 1.2.0 |
|---|
| 575 | |
|---|
| 576 | * Wed Nov 9 2005 Tomas Mraz <tmraz@redhat.com> 2.0.54-16 |
|---|
| 577 | - rebuilt against new openssl |
|---|
| 578 | |
|---|
| 579 | * Thu Nov 3 2005 Joe Orton <jorton@redhat.com> 2.0.54-15 |
|---|
| 580 | - log notice giving SELinux context at startup if enabled |
|---|
| 581 | - drop SSLv2 and restrict default cipher suite in default |
|---|
| 582 | SSL configuration |
|---|
| 583 | |
|---|
| 584 | * Thu Oct 20 2005 Joe Orton <jorton@redhat.com> 2.0.54-14 |
|---|
| 585 | - mod_ssl: add security fix for SSLVerifyClient (CVE-2005-2700) |
|---|
| 586 | - add security fix for byterange filter DoS (CVE-2005-2728) |
|---|
| 587 | - add security fix for C-L vs T-E handling (CVE-2005-2088) |
|---|
| 588 | - mod_ssl: add security fix for CRL overflow (CVE-2005-1268) |
|---|
| 589 | - mod_ldap/mod_auth_ldap: add fixes from 2.0.x branch (upstream #34209 etc) |
|---|
| 590 | - add fix for dummy connection handling (#167425) |
|---|
| 591 | - mod_auth_digest: fix hostinfo comparison in CONNECT requests |
|---|
| 592 | - mod_include: fix variable corruption in nested includes (upstream #12655) |
|---|
| 593 | - mod_ssl: add fix for handling non-blocking reads |
|---|
| 594 | - mod_ssl: fix to enable output buffering (upstream #35279) |
|---|
| 595 | - mod_ssl: buffer request bodies for per-location renegotiation (upstream #12355) |
|---|
| 596 | |
|---|
| 597 | * Sat Aug 13 2005 Joe Orton <jorton@redhat.com> 2.0.54-13 |
|---|
| 598 | - don't load by default: mod_cern_meta, mod_asis |
|---|
| 599 | - do load by default: mod_ext_filter (#165893) |
|---|
| 600 | |
|---|
| 601 | * Thu Jul 28 2005 Joe Orton <jorton@redhat.com> 2.0.54-12 |
|---|
| 602 | - drop broken epoch deps |
|---|
| 603 | |
|---|
| 604 | * Thu Jun 30 2005 Joe Orton <jorton@redhat.com> 2.0.54-11 |
|---|
| 605 | - mod_dav_fs: fix uninitialized variable (#162144) |
|---|
| 606 | - add epoch to dependencies as appropriate |
|---|
| 607 | - mod_ssl: drop dependencies on dev, make |
|---|
| 608 | - mod_ssl: mark post script dependencies as such |
|---|
| 609 | |
|---|
| 610 | * Mon May 23 2005 Joe Orton <jorton@redhat.com> 2.0.54-10 |
|---|
| 611 | - remove broken symlink (Robert Scheck, #158404) |
|---|
| 612 | |
|---|
| 613 | * Wed May 18 2005 Joe Orton <jorton@redhat.com> 2.0.54-9 |
|---|
| 614 | - add piped logger fixes (w/Jeff Trawick) |
|---|
| 615 | |
|---|
| 616 | * Mon May 9 2005 Joe Orton <jorton@redhat.com> 2.0.54-8 |
|---|
| 617 | - drop old "powered by Red Hat" logos |
|---|
| 618 | |
|---|
| 619 | * Wed May 4 2005 Joe Orton <jorton@redhat.com> 2.0.54-7 |
|---|
| 620 | - mod_userdir: fix memory allocation issue (upstream #34588) |
|---|
| 621 | - mod_ldap: fix memory corruption issue (Brad Nicholes, upstream #34618) |
|---|
| 622 | |
|---|
| 623 | * Tue Apr 26 2005 Joe Orton <jorton@redhat.com> 2.0.54-6 |
|---|
| 624 | - fix key/cert locations in post script |
|---|
| 625 | |
|---|
| 626 | * Mon Apr 25 2005 Joe Orton <jorton@redhat.com> 2.0.54-5 |
|---|
| 627 | - create default dummy cert in /etc/pki/tls |
|---|
| 628 | - use a pseudo-random serial number on the dummy cert |
|---|
| 629 | - change default ssl.conf to point at /etc/pki/tls |
|---|
| 630 | - merge back -suexec subpackage; SELinux policy can now be |
|---|
| 631 | used to persistently disable suexec (#155716) |
|---|
| 632 | - drop /etc/httpd/conf/ssl.* directories and Makefiles |
|---|
| 633 | - unconditionally enable PIE support |
|---|
| 634 | - mod_ssl: fix for picking up -shutdown options (upstream #34452) |
|---|
| 635 | |
|---|
| 636 | * Mon Apr 18 2005 Joe Orton <jorton@redhat.com> 2.0.54-4 |
|---|
| 637 | - replace PreReq with Requires(pre) |
|---|
| 638 | |
|---|
| 639 | * Mon Apr 18 2005 Joe Orton <jorton@redhat.com> 2.0.54-3 |
|---|
| 640 | - update to 2.0.54 |
|---|
| 641 | |
|---|
| 642 | * Tue Mar 29 2005 Joe Orton <jorton@redhat.com> 2.0.53-6 |
|---|
| 643 | - update default httpd.conf: |
|---|
| 644 | * clarify the comments on AddDefaultCharset usage (#135821) |
|---|
| 645 | * remove all the AddCharset default extensions |
|---|
| 646 | * don't load mod_imap by default |
|---|
| 647 | * synch with upstream 2.0.53 httpd-std.conf |
|---|
| 648 | - mod_ssl: set user from SSLUserName in access hook (upstream #31418) |
|---|
| 649 | - htdigest: fix permissions of created files (upstream #33765) |
|---|
| 650 | - remove htsslpass |
|---|
| 651 | |
|---|
| 652 | * Wed Mar 2 2005 Joe Orton <jorton@redhat.com> 2.0.53-5 |
|---|
| 653 | - apachectl: restore use of $OPTIONS again |
|---|
| 654 | |
|---|
| 655 | * Wed Feb 9 2005 Joe Orton <jorton@redhat.com> 2.0.53-4 |
|---|
| 656 | - update to 2.0.53 |
|---|
| 657 | - move prefork/worker modules comparison to %%check |
|---|
| 658 | |
|---|
| 659 | * Mon Feb 7 2005 Joe Orton <jorton@redhat.com> 2.0.52-7 |
|---|
| 660 | - fix cosmetic issues in "service httpd reload" |
|---|
| 661 | - move User/Group higher in httpd.conf (#146793) |
|---|
| 662 | - load mod_logio by default in httpd.conf |
|---|
| 663 | - apachectl: update for correct libselinux tools locations |
|---|
| 664 | |
|---|
| 665 | * Tue Nov 16 2004 Joe Orton <jorton@redhat.com> 2.0.52-6 |
|---|
| 666 | - add security fix for CVE CAN-2004-0942 (memory consumption DoS) |
|---|
| 667 | - SELinux: run httpd -t under runcon in configtest (Steven Smalley) |
|---|
| 668 | - fix SSLSessionCache comment for distcache in ssl.conf |
|---|
| 669 | - restart using SIGHUP not SIGUSR1 after logrotate |
|---|
| 670 | - add ap_save_brigade fix (upstream #31247) |
|---|
| 671 | - mod_ssl: fix possible segfault in auth hook (upstream #31848) |
|---|
| 672 | - add htsslpass(1) and configure as default SSLPassPhraseDialog (#128677) |
|---|
| 673 | - apachectl: restore use of $OPTIONS |
|---|
| 674 | - apachectl, httpd.init: refuse to restart if $HTTPD -t fails |
|---|
| 675 | - apachectl: run $HTTPD -t in user SELinux context for configtest |
|---|
| 676 | - update for pcre-5.0 header locations |
|---|
| 677 | |
|---|
| 678 | * Sat Nov 13 2004 Jeff Johnson <jbj@redhat.com> 2.0.52-5 |
|---|
| 679 | - rebuild against db-4.3.21 aware apr-util. |
|---|
| 680 | |
|---|
| 681 | * Thu Nov 11 2004 Jeff Johnson <jbj@jbj.org> 2.0.52-4 |
|---|
| 682 | - rebuild against db-4.3-21. |
|---|
| 683 | |
|---|
| 684 | * Thu Sep 28 2004 Joe Orton <jorton@redhat.com> 2.0.52-3 |
|---|
| 685 | - add dummy connection address fixes from HEAD |
|---|
| 686 | - mod_ssl: add security fix for CAN-2004-0885 |
|---|
| 687 | |
|---|
| 688 | * Tue Sep 28 2004 Joe Orton <jorton@redhat.com> 2.0.52-2 |
|---|
| 689 | - update to 2.0.52 |
|---|
| 690 | |
|---|