Hello all,

After I added file creation stuff to spacewalk-java.spec, I forgot to remove it from spacewalk-setup. Even worse, there is a "chattr +a" line in spacewalk-setup creating an unmovable file. Also, the attributes on the audit-review.log are incorrect in the spec file - updates kill the file, making it a rather useless log. I have added the %ghost attribute, which I understand corrects this (and a %config(noreplace) just to be certain).

Thanks,

Joshua Roys
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index eaab22c..fef9f1a 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -216,6 +216,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %pre
 rm -f %{realcobsnippetsdir}/spacewalk
+if [ -e /var/satellite/systemlogs/audit-review.log ] ; then
+       chattr -a /var/satellite/systemlogs/audit-review.log
+fi
 
 %post -n spacewalk-taskomatic
 # This adds the proper /etc/rc*.d links for the script
@@ -238,7 +241,7 @@ fi
 %config(noreplace) %{_sysconfdir}/tomcat5/Catalina/localhost/rhn.xml
 %{realcobsnippetsdir}/spacewalk
 %attr(755, apache, root) %{_var}/satellite/systemlogs
-%attr(644, tomcat, root) %{_var}/satellite/systemlogs/audit-review.log
+%ghost %config(noreplace) %verify(not md5 size mtime) %attr(644, tomcat, root) 
%{_var}/satellite/systemlogs/audit-review.log
 
 %files -n spacewalk-taskomatic
 %attr(755, root, root) %{_initrddir}/taskomatic
diff --git a/spacewalk/setup/bin/spacewalk-setup 
b/spacewalk/setup/bin/spacewalk-setup
index f920e6f..e389729 100755
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@ -112,11 +112,6 @@ mkdir_mount_points($config_opts->{'mount_point'},
        $config_opts->{'kickstart_mount_point'});
 setup_sudoers(\%opts, \%answers);
 
-my $aurev_fn = $config_opts->{'mount_point'} . '/systemlogs/audit-review.log';
-qx(touch $aurev_fn);
-qx(chown tomcat $aurev_fn);
-qx(chattr +a $aurev_fn);
-
 print Spacewalk::Setup::loc("* Activating $product_name.\n");
 load_satellite_certificate(\%opts, \%answers);
 
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to