Browse Source

merge spec file

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@8063 ec354946-7b23-47d6-9f5a-488ba84defc7
Takemikaduchi 10 years ago
parent
commit
def83a477b
2 changed files with 34 additions and 18 deletions
  1. 28 14
      a/apache2/apache2-vl.spec
  2. 6 4
      a/apache2/httpd.conf

+ 28 - 14
a/apache2/apache2-vl.spec

@@ -1,4 +1,5 @@
-%define contentdir /var/www
+%define contentdir %{_datadir}/apache2
+%define docroot /var/www/apache2
 %define suexec_caller apache
 %define mmn 20051115
 %define pkgname apache2
@@ -6,7 +7,7 @@
 Summary: Apache HTTP Server
 Name: %{pkgname}
 Version: 2.2.25
-Release: 1%{_dist_release}
+Release: 2%{_dist_release}
 URL: http://httpd.apache.org/
 
 Vendor: Project Vine
@@ -56,7 +57,9 @@ BuildRequires: db4-devel, expat-devel
 BuildRequires: findutils, perl, openldap-devel, zlib-devel
 BuildRequires: apr-devel, apr-util-devel
 BuildRequires: pcre-devel, sqlite3-devel
+BuildRequires: www-common
 Requires: mailcap, gawk, file, findutils, apr, apr-util
+Requires(pre): www-common
 Requires(pre): chkconfig, mktemp, fileutils
 Requires(pre): sh-utils, textutils, shadow-utils
 Requires(post): alternatives
@@ -177,7 +180,7 @@ AP_CONFOPTS="\
 	--with-apr=%{_prefix} --with-apr-util=%{_prefix} \
 	--enable-suexec --with-suexec \
 	--with-suexec-caller=%{suexec_caller} \
-	--with-suexec-docroot=%{contentdir} \
+	--with-suexec-docroot=%{docroot} \
 	--with-suexec-logfile=%{_localstatedir}/log/apache2/suexec.log \
 	--with-suexec-bin=%{_libdir}/%{pkgname}/suexec \
 	--with-suexec-uidmin=500 --with-suexec-gidmin=500 \
@@ -246,7 +249,7 @@ mv $RPM_BUILD_ROOT%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \
 # Make the MMN accessible to module packages
 echo %{mmn} > $RPM_BUILD_ROOT%{_includedir}/apache2/.mmn
 
-# docroot
+# contentdir
 # mkdir $RPM_BUILD_ROOT%{contentdir}/html
 install -m 644 $RPM_SOURCE_DIR/index.html.ja \
 	$RPM_BUILD_ROOT%{contentdir}/error/noindex.html
@@ -255,6 +258,9 @@ rm -r $RPM_BUILD_ROOT%{contentdir}/manual/style
 install -m 644 $RPM_SOURCE_DIR/vine.png \
 	$RPM_BUILD_ROOT%{contentdir}/icons
 
+# docroot
+mkdir -p $RPM_BUILD_ROOT%{docroot}/html
+
 # logs
 # rmdir $RPM_BUILD_ROOT%{_sysconfdir}/apache2/logs
 mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/apache2
@@ -331,14 +337,10 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/apache2/conf/mime.types \
       $RPM_BUILD_ROOT%{_libdir}/apache2/modules/*.exp \
       $RPM_BUILD_ROOT%{_libdir}/apache2/build/config.nice \
       $RPM_BUILD_ROOT%{_sbindir}/{apache2,checkgid,dbmmanage,envvars*} \
+      $RPM_BUILD_ROOT%{docroot}/html/* \
       $RPM_BUILD_ROOT%{contentdir}/html/* \
       $RPM_BUILD_ROOT%{contentdir}/cgi-bin/*
 
-%pre
-# Add the "apache" user
-/usr/sbin/useradd -c "Apache" -u 48 \
-	-s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || :
-
 %triggerpostun -- apache < 2.0
 /sbin/chkconfig --add apache2
 
@@ -448,9 +450,11 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{contentdir}/error/*.var
 %config(noreplace) %{contentdir}/error/include/*.html
 
+%dir %{docroot}/html
+
 %attr(0700,root,root) %dir %{_localstatedir}/log/apache2
 
-%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
+%attr(0700,www-data,www-data) %dir %{_localstatedir}/lib/dav
 
 %{_mandir}/man1/*
 
@@ -467,10 +471,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0700,root,root) %dir %{_sysconfdir}/apache2/conf/ssl.*
 %config %{_sysconfdir}/apache2/conf/Makefile
 %config %{_sysconfdir}/apache2/conf/ssl.*/*
-%attr(0700,apache,root) %dir %{_localstatedir}/cache/mod_ssl
-%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.dir
-%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.pag
-%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.sem
+%attr(0700,www-data,root) %dir %{_localstatedir}/cache/mod_ssl
+%attr(0600,www-data,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.dir
+%attr(0600,www-data,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.pag
+%attr(0600,www-data,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.sem
 
 %files devel
 %defattr(-,root,root)
@@ -482,6 +486,16 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/apache2/build/*.sh
 
 %changelog
+* Wed Dec 25 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.2.25-2
+- merge VineSeed spec file
+  * Wed Oct 24 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.23-2
+  - rebuild with pcre-8.31
+
+  * Wed Mar 21 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.2.23-1
+  - update to 2.2.23
+  - add R(pre): www-common, BR: www-common
+  - move apache contents to %{contentdir}
+
 * Sat Sep 28 2013 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.2.25-1
 - new upstream release with security fix (CVE-2013-1862,1896)
 - drop patch100 (is included in new release)

+ 6 - 4
a/apache2/httpd.conf

@@ -227,8 +227,8 @@ Include conf.d/*.conf
 #  when the value of (unsigned)Group is above 60000; 
 #  don't use Group #-1 on these systems!
 #
-User apache
-Group apache
+User www-data
+Group www-data
 
 ### Section 2: 'Main' server configuration
 #
@@ -277,7 +277,8 @@ UseCanonicalName Off
 # documents. By default, all requests are taken from this directory, but
 # symbolic links and aliases may be used to point to other locations.
 #
-DocumentRoot "/var/www/html"
+#DocumentRoot "/var/www/html"
+DocumentRoot "/var/www/apache2/html"
 
 #
 # Each directory to which Apache has access can be configured with respect
@@ -302,7 +303,8 @@ DocumentRoot "/var/www/html"
 #
 # This should be changed to whatever you set DocumentRoot to.
 #
-<Directory "/var/www/html">
+#<Directory "/var/www/html">
+<Directory "/var/www/apache2/html">
 
 #
 # Possible values for the Options directive are "None", "All",