Search
j0ke.net Open Build Service
>
Projects
>
SUSE
:
Manager
:
1.2
>
spacewalk-config
> spacewalk-config.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File spacewalk-config.spec of Package spacewalk-config
# # spec file for package spacewalk-config # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} %define apacheconfdir %{_sysconfdir}/apache2 %define apachepkg apache2 %define apache_user wwwrun %define apache_group www %else %define apacheconfdir %{_sysconfdir}/httpd %define apachepkg httpd %define apache_user apache %define apache_group apache %endif Name: spacewalk-config Summary: Spacewalk Configuration Version: 1.2.7 Release: 0.7.3 Url: http://fedorahosted.org/spacewalk Source0: spacewalk-config-git-5f02cae65a6b7a48035b55f5126998d3b33bee73.tar.gz License: GPL v2 only Group: Applications/System BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Requires: perl(Satcon) Requires: perl(Apache::DBI) Obsoletes: rhn-satellite-config < 5.3.0 Provides: rhn-satellite-config = 5.3.0 %if 0%{?suse_version} Requires(post): aaa_base Requires(preun): aaa_base # will not work with apache 2.1 Requires(pre): %{apachepkg} >= 2.2 %else Requires(post): chkconfig Requires(preun): chkconfig # This is for /sbin/service Requires(preun): initscripts Requires: %{apachepkg} %endif # We need package httpd to be able to assign group apache in files section Requires: openssl %global prepdir %{_var}/lib/rhn/rhn-satellite-prep %if 0%{?suse_version} BuildRequires: %{apachepkg} BuildRequires: openssl BuildRequires: cobbler %endif %description Common Spacewalk configuration files and templates. %prep %setup -q -n spacewalk-config-git-5f02cae65a6b7a48035b55f5126998d3b33bee73 echo "%{name} %{version}" > version %build %install rm -Rf $RPM_BUILD_ROOT mkdir $RPM_BUILD_ROOT mv etc $RPM_BUILD_ROOT/ mv var $RPM_BUILD_ROOT/ mv usr $RPM_BUILD_ROOT/ tar -C $RPM_BUILD_ROOT%{prepdir} -cf - etc \ | tar -C $RPM_BUILD_ROOT -xvf - echo "" > $RPM_BUILD_ROOT/%{_sysconfdir}/rhn/rhn.conf %if 0%{?suse_version} ## we cant have files in sysconfig #%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/spacewalk #mv $RPM_BUILD_ROOT/%{prepdir} $RPM_BUILD_ROOT%{_datadir}/spacewalk # this is because we cant read the apache server.key because # abuild user export NO_BRP_STALE_LINK_ERROR=yes %{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/private %{__mkdir_p} $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/servercerts %{__mkdir_p} $RPM_BUILD_ROOT/%{apacheconfdir}/conf.d %{__mkdir_p} $RPM_BUILD_ROOT/%{apacheconfdir}/ssl.key %{__mkdir_p} $RPM_BUILD_ROOT/%{apacheconfdir}/ssl.crt %{__rm} $RPM_BUILD_ROOT/etc/pki/tls/private/spacewalk.key.symlink %{__rm} $RPM_BUILD_ROOT/etc/pki/tls/certs/spacewalk.crt.symlink #touch $RPM_BUILD_ROOT%{apacheconfdir}/ssl.key/spacewalk.key #touch $RPM_BUILD_ROOT%{apacheconfdir}/ssl.crt/spacewalk.crt ln -sf ../../../%{apacheconfdir}/ssl.key/spacewalk.key $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/private/spacewalk.key ln -sf ../../../%{apacheconfdir}/ssl.crt/spacewalk.crt $RPM_BUILD_ROOT/%{_sysconfdir}/ssl/servercerts/spacewalk.crt mv $RPM_BUILD_ROOT/etc/httpd/conf.d/* $RPM_BUILD_ROOT%{apacheconfdir}/conf.d %else find $RPM_BUILD_ROOT -name '*.symlink' | \ while read filename ; do linkname=${filename%.symlink} ; \ target=`sed -s 's/^Link to //' $filename` ; \ ln -sf $target $linkname ; \ rm -f $filename ; \ done %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %config(noreplace) %{_sysconfdir}/rhn/satellite-httpd/conf/rhn/rhn_monitoring.conf %config(noreplace) %{apacheconfdir}/conf.d/zz-spacewalk-www.conf %config(noreplace) %{_sysconfdir}/webapp-keyring.gpg %dir %{_var}/lib/cobbler/ %dir %{_var}/lib/cobbler/kickstarts/ %dir %{_var}/lib/cobbler/snippets/ %config(noreplace) %{_var}/lib/cobbler/kickstarts/spacewalk-sample.ks %config(noreplace) %{_var}/lib/cobbler/snippets/spacewalk_file_preservation %attr(0750,root,%{apache_group}) %dir %{_sysconfdir}/rhn %dir %{_sysconfdir}/rhn/satellite-httpd %dir %{_sysconfdir}/rhn/satellite-httpd/conf %dir %{_sysconfdir}/rhn/satellite-httpd/conf/rhn %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rhn/cluster.ini %attr(0640,root,%{apache_group}) %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/rhn/rhn.conf # NOTE: If if you change these, you need to make a corresponding change in # spacewalk/install/Spacewalk-Setup/bin/spacewalk-setup %if 0%{?suse_version} %dir %{_sysconfdir}/ssl/servercerts %config(noreplace) %{_sysconfdir}/ssl/private/spacewalk.key %config(noreplace) %{_sysconfdir}/ssl/servercerts/spacewalk.crt %else %config(noreplace) %{_sysconfdir}/pki/tls/private/spacewalk.key %config(noreplace) %{_sysconfdir}/pki/tls/certs/spacewalk.crt %endif %config(noreplace) %{_sysconfdir}/satname %{_var}/lib/rhn %dir %{_prefix}/share/rhn %attr(0755,root,root) %{_prefix}/share/rhn/satidmap.pl %attr(0755,root,root) %{_prefix}/share/rhn/startup.pl %doc LICENSE %pre # This section is needed here because previous versions of spacewalk-config # (and rhn-satellite-config) "owned" the satellite-httpd service. We need # to keep this section here indefinitely, because Satellite 5.2 could # be upgraded directly to our version of Spacewalk. if [ -f /etc/init.d/satellite-httpd ] ; then /sbin/service satellite-httpd stop >/dev/null 2>&1 /sbin/chkconfig --del satellite-httpd %{__perl} -i -ne 'print unless /satellite-httpd\.pid/' /etc/logrotate.d/httpd fi %if 0%{?suse_version} %post %define dest %{_sysconfdir}/sysconfig/apache2 sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES version sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES proxy sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES proxy_ajp sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES rewrite sysconf_addword /etc/sysconfig/apache2 APACHE_SERVER_FLAGS SSL %else %define dest %{_sysconfdir}/sysconfig/httpd %endif %changelog * Fri Feb 11 2011 dmacvicar@suse.de - debrand renew/ redirection rule (bnc#667911) * Fri Jan 28 2011 mc@suse.de - fix monitoring config to get scout config push working (bnc#665898) * Wed Sep 15 2010 mantel@suse.de - Initial release of spacewalk-config