packages: nexus/nexus.spec - don't install log4j.properties. use one genera...
pawelz
pawelz at pld-linux.org
Fri Sep 25 12:34:54 CEST 2009
Author: pawelz Date: Fri Sep 25 10:34:54 2009 GMT
Module: packages Tag: HEAD
---- Log message:
- don't install log4j.properties. use one generated by nexus
- allow nexus to generate its config files, but mark it as %config
- some fixes in %files
---- Files affected:
packages/nexus:
nexus.spec (1.10 -> 1.11)
---- Diffs:
================================================================
Index: packages/nexus/nexus.spec
diff -u packages/nexus/nexus.spec:1.10 packages/nexus/nexus.spec:1.11
--- packages/nexus/nexus.spec:1.10 Thu Sep 24 22:25:52 2009
+++ packages/nexus/nexus.spec Fri Sep 25 12:34:49 2009
@@ -11,7 +11,6 @@
# Source0-md5: 1eec39a389ff86931237e00a5861bd2c
Source1: %{name}-context.xml
Source2: %{name}-plexus.properties
-Source3: %{name}-log4j.properties
URL: http://nexus.sonatype.org/
BuildRequires: jpackage-utils
BuildRequires: rpm-javaprov
@@ -39,18 +38,29 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/nexus,%{_datadir}/nexus,/var/log/nexus,%{_sharedstatedir}/{nexus,tomcat/conf/Catalina/localhost}}
-#install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/web.xml
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/nexus,%{_datadir}/nexus,/var/log/nexus,%{_sharedstatedir}/{nexus/conf,tomcat/conf/Catalina/localhost}}
install %{SOURCE1} $RPM_BUILD_ROOT%{_sharedstatedir}/tomcat/conf/Catalina/localhost/nexus.xml
install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/plexus.properties
-install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/nexus/log4j.properties
cp -a . $RPM_BUILD_ROOT%{_datadir}/nexus
mv $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/web.xml
ln -sf %{_sysconfdir}/nexus/web.xml $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/web.xml
ln -sf %{_sysconfdir}/nexus/plexus.properties $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/plexus.properties
-ln -sf %{_sysconfdir}/nexus/log4j.properties $RPM_BUILD_ROOT%{_datadir}/nexus/WEB-INF/log4j.properties
+
+# These files are configs, but they should be created by nexus. So lets
+# install them as %%ghost %%config, and link to /etc/nexus
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/log4j.properties
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/nexus.xml
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/security.xml
+touch $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/conf/lvo-plugin.xml
+ln -sf %{_sharedstatedir}/nexus/conf/log4j.properties $RPM_BUILD_ROOT%{_sysconfdir}/nexus/log4j.properties
+ln -sf %{_sharedstatedir}/nexus/conf/nexus.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/nexus.xml
+ln -sf %{_sharedstatedir}/nexus/conf/security.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/security.xml
+ln -sf %{_sharedstatedir}/nexus/conf/lvo-plugin.xml $RPM_BUILD_ROOT%{_sysconfdir}/nexus/lvo-plugin.xml
+
+# log directory
+ln -s /var/log/nexus $RPM_BUILD_ROOT%{_sharedstatedir}/nexus/logs
%clean
rm -rf $RPM_BUILD_ROOT
@@ -59,21 +69,37 @@
%defattr(644,root,root,755)
%attr(770,root,servlet) %{_datadir}/nexus
-%attr(770,root,servlet) %{_sharedstatedir}/nexus
+%dir %attr(770,root,servlet) %{_sharedstatedir}/nexus
+%dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/logs
+%dir %attr(770,root,servlet) %{_sharedstatedir}/nexus/conf
%attr(770,root,servlet) /var/log/nexus
%dir %{_sysconfdir}/nexus
-%attr(644,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/log4j.properties
%attr(644,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/plexus.properties
%attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nexus/web.xml
%attr(660,root,servlet) %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/tomcat/conf/Catalina/localhost/nexus.xml
+# These files are created by nexus, but they are config files.
+%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/log4j.properties
+%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/nexus.xml
+%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/security.xml
+%ghost %config(noreplace) %verify(not md5 mtime size) %{_sharedstatedir}/nexus/conf/lvo-plugin.xml
+%{_sysconfdir}/nexus/log4j.properties
+%{_sysconfdir}/nexus/nexus.xml
+%{_sysconfdir}/nexus/security.xml
+%{_sysconfdir}/nexus/lvo-plugin.xml
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.11 2009/09/25 10:34:49 pawelz
+- don't install log4j.properties. use one generated by nexus
+- allow nexus to generate its config files, but mark it as %config
+- some fixes in %files
+
Revision 1.10 2009/09/24 20:25:52 pawelz
- install log4j.properties
- install /var/log/nexus directory
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nexus/nexus.spec?r1=1.10&r2=1.11&f=u
More information about the pld-cvs-commit
mailing list