From 264e3fd53acb5b039b3bc65a4988cf36cae584e3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: May 26 2014 08:33:18 +0000 Subject: * Mon May 26 2014 Fabian Affolter - 4.0.1-1 - Spec file update - Update to lastest upstream release 4.0.1 --- diff --git a/.gitignore b/.gitignore index 51bdabc..ae67bf7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /openvas-scanner-3.3.1.tar.gz /openvas-scanner-3.4+beta1.tar.gz /openvas-scanner-3.4+beta2.tar.gz +/openvas-scanner-4.0.1.tar.gz diff --git a/openvas-scanner.spec b/openvas-scanner.spec index 3523643..d52ef0e 100644 --- a/openvas-scanner.spec +++ b/openvas-scanner.spec @@ -1,15 +1,15 @@ -%define tar_version 3.4+beta2 +#%global tar_version 3.4+beta2 Name: openvas-scanner +Version: 4.0.1 +Release: 1%{?dist} Summary: Open Vulnerability Assessment (OpenVAS) Scanner -Version: 3.4 -Release: 4.beta2%{?dist} -URL: http://www.openvas.org + License: GPLv2 -Group: System Environment/Libraries +URL: http://www.openvas.org -#Source0: http://wald.intevation.org/frs/download.php/1240/%{name}-%{version}.tar.gz -Source0: http://wald.intevation.org/frs/download.php/1240/%{name}-%{tar_version}.tar.gz +Source0: http://wald.intevation.org/frs/download.php/1640/%{name}-%{version}.tar.gz +#Source0: http://wald.intevation.org/frs/download.php/1640/%{name}-%{tar_version}.tar.gz Source1: openvas-scanner.initd Source2: openvassd.conf Source3: openvas-scanner.logrotate @@ -18,31 +18,30 @@ Source5: openvas-nvt-sync-cron Source6: openvas-nvt-sync-cronjob Source7: openvas-scanner.service -#Separate nvt and gsf feeds to separate directories -#Separation of feeds is currently not possible because nasl script_dependencies doesn't search in all include_folders +# Separate nvt and gsf feeds to separate directories +# Separation of feeds is currently not possible because nasl script_dependencies doesn't search in all include_folders #Patch0: openvas-scanner-nvtfeed.patch -#Put certs to /etc/pki as suggested by http://fedoraproject.org/wiki/PackagingDrafts/Certificates -#Not reported upstream as it is RedHat/Fedora specific +# Put certs to /etc/pki as suggested by http://fedoraproject.org/wiki/PackagingDrafts/Certificates +# Not reported upstream as it is RedHat/Fedora specific Patch1: openvas-scanner-pki.patch -#Put openvas-mkcert-client to bin directory instead of sbin and install its man page -#Reported upstream http://wald.intevation.org/tracker/?func=detail&aid=1941&group_id=29&atid=220 +# Put openvas-mkcert-client to bin directory instead of sbin and install its man page +# Reported upstream http://wald.intevation.org/tracker/?func=detail&aid=1941&group_id=29&atid=220 Patch2: openvas-scanner-mkcertclient.patch -#Allow compile time definition of the directory to store openvassd.rules -#Reported upstream http://wald.intevation.org/tracker/?func=detail&aid=1940&group_id=29&atid=220 +# Allow compile time definition of the directory to store openvassd.rules +# Reported upstream http://wald.intevation.org/tracker/?func=detail&aid=1940&group_id=29&atid=220 Patch3: openvas-scanner-rulesdir.patch -#Fix compile time errors for F15 where variables set but not used are reported as error -#Reported upstream http://wald.intevation.org/tracker/?func=detail&aid=1942&group_id=29&atid=220 +# Fix compile time errors for F15 where variables set but not used are reported as error +# Reported upstream http://wald.intevation.org/tracker/?func=detail&aid=1942&group_id=29&atid=220 #Patch4: openvas-scanner-notused.patch -#Replace _BSD_SOURCE and _SVID_SOURCE with _DEFAULT_SOURCE otherwise build fails with Werror +# Replace _BSD_SOURCE and _SVID_SOURCE with _DEFAULT_SOURCE otherwise build fails with Werror Patch5: openvas-scanner-3.4+beta2-bsdsource.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: openvas-libraries-devel >= 6.0 +BuildRequires: openvas-libraries-devel >= 7.0 BuildRequires: cmake >= 2.6.0 BuildRequires: glib2-devel BuildRequires: libpcap-devel @@ -52,6 +51,7 @@ BuildRequires: libksba-devel BuildRequires: pkgconfig BuildRequires: systemd-units BuildRequires: libgcrypt-devel +BuildRequires: systemd # This is introduced to accomodate difference in RHEL5/CentOS5 %if %{defined rhel} @@ -67,14 +67,9 @@ BuildRequires: libuuid-devel BuildRequires: libuuid-devel %endif - -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units -# This is actually needed for the %triggerun script but Requires(triggerun) -# is not valid. We can use %post because this particular %triggerun script -# should fire just after this package is installed. -Requires(post): systemd-sysv +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd #Required by the openvas-nvt-sync and greenbone-nvt-sync Requires: /usr/bin/md5sum @@ -100,12 +95,10 @@ Requires(preun): initscripts SysV style init script for %{name}. It needs to be installed only if systemd is not used as the system init process. - - %prep -#%setup -q -%setup -q -n %{name}-%{tar_version} -#Separation of feeds not possible because nasl script_dependencies doesn't search in all include_folders +%setup -q +#%setup -q -n %{name}-%{tar_version} +# Separation of feeds not possible because nasl script_dependencies doesn't search in all include_folders #patch0 -p 1 -b .nvtfeed %patch1 -p 1 -b .pkipath %patch2 -p 1 -b .mkcert @@ -119,27 +112,21 @@ for i in CHANGES ChangeLog; do mv -f $i.utf8 $i; done - - %build #configure --disable-static export CFLAGS=-Werror=unused-but-set-variable %cmake -DLOCALSTATEDIR:PATH=%{_var} -DOPENVASSD_RULES:PATH=%{_sysconfdir}/openvas/openvassd.rules make %{?_smp_mflags} - - %install -rm -rf %{buildroot} - make install DESTDIR=%{buildroot} INSTALL="install -p" find %{buildroot} -name '*.la' -exec rm -f {} ';' -#Config directory +# Config directory mkdir -p %{buildroot}/%{_sysconfdir}/openvas chmod 755 %{buildroot}/%{_sysconfdir}/openvas -#Make directories for the certificates +# Make directories for the certificates mkdir -p %{buildroot}/%{_sysconfdir}/pki/openvas/CA chmod 755 %{buildroot}/%{_sysconfdir}/pki/openvas chmod 755 %{buildroot}/%{_sysconfdir}/pki/openvas/CA @@ -147,14 +134,14 @@ mkdir -p %{buildroot}/%{_sysconfdir}/pki/openvas/private/CA chmod 700 %{buildroot}/%{_sysconfdir}/pki/openvas/private chmod 700 %{buildroot}/%{_sysconfdir}/pki/openvas/private/CA -#Make directories for the NVT feeds +# Make directories for the NVT feeds mkdir -p %{buildroot}/%{_var}/lib/openvas/plugins chmod 755 %{buildroot}/%{_var}/lib/openvas/plugins -#Separation of feeds not possible because nasl script_dependencies doesn't search in all include_folders +# Separation of feeds not possible because nasl script_dependencies doesn't search in all include_folders #mkdir -p _{buildroot}/_{_var}/lib/openvas/plugins/nvt #mkdir -p _{buildroot}/_{_var}/lib/openvas/plugins/gsf -#Log direcotry +# Log direcotry mkdir -p %{buildroot}/%{_var}/log/openvas # Make plugin cache directory @@ -175,9 +162,8 @@ sed -e "s:@@OPENVAS_PLUGINS@@:%{_var}/lib/openvas/plugins:g install -Dp -m 644 openvassd.conf %{buildroot}/%{_sysconfdir}/openvas/ -# install log rotation stuff -install -m 644 -Dp %{SOURCE3} \ - %{buildroot}/%{_sysconfdir}/logrotate.d/openvas-scanner +# Install log rotation stuff +install -m 644 -Dp %{SOURCE3} %{buildroot}/%{_sysconfdir}/logrotate.d/openvas-scanner # Install sysconfig configration install -Dp -m 644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/sysconfig/openvas-scanner @@ -188,43 +174,14 @@ install -Dp -m 755 %{SOURCE5} %{buildroot}/%{_sbindir}/ # Install cront jobs to periodically update plugins install -Dp -m 644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/cron.d/openvas-sync-plugins - - -%clean -rm -rf %{buildroot} - - - %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post %{name}.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable openvas-scanner.service > /dev/null 2>&1 || : - /bin/systemctl stop openvas-scanner.service > /dev/null 2>&1 || : -fi +%systemd_preun %{name}.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart openvas-scanner >/dev/null 2>&1 || : -fi - -%triggerun -- openvas-scanner < 3.2.5-5 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply openvas-scanner -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save openvas-scanner >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del openvas-scanner >/dev/null 2>&1 || : -/bin/systemctl try-restart openvas-scanner.service >/dev/null 2>&1 || : - +%systemd_postun_with_restart %{name}.service %post sysvinit # This adds the proper /etc/rc*.d links for the script @@ -243,10 +200,7 @@ if [ $1 -ge 1 ]; then /sbin/service openvas-scanner condrestart >/dev/null 2>&1 fi - - %files -%defattr(-,root,root,-) %doc CHANGES ChangeLog COPYING README %dir %{_sysconfdir}/openvas %dir %{_sysconfdir}/pki/openvas @@ -282,14 +236,14 @@ fi %{_mandir}/man8/greenbone-nvt-sync.8.* #attr(644,root,root) _{_libdir}/openvas/plugins/*.nes - - %files sysvinit -%defattr(-,root,root,-) %{_initddir}/openvas-scanner - %changelog +* Mon May 26 2014 Fabian Affolter - 4.0.1-1 +- Spec file update +- Update to lastest upstream release 4.0.1 + * Thu Apr 24 2014 Tomáš Mráz - 3.4-4.beta2 - Rebuild for new libgcrypt diff --git a/sources b/sources index befe49a..8baff65 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d17e85eefff8e70baae99f37346ffd38 openvas-scanner-3.4+beta2.tar.gz +c274c6a4d5b958cca0a4ffc1a6dfee92 openvas-scanner-4.0.1.tar.gz