diff --git a/.cvsignore b/.cvsignore index e69de29..6c4912b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +openvas-client-3.0.0.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..ef76913 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +openvas-client-3_0_0-7_fc13:EL-5:openvas-client-3.0.0-7.fc13.src.rpm:1277174779 diff --git a/openvas-client-cflags.patch b/openvas-client-cflags.patch new file mode 100644 index 0000000..cb96d50 --- /dev/null +++ b/openvas-client-cflags.patch @@ -0,0 +1,53 @@ +diff -ru openvas-client-3.0.0.old/src/Makefile openvas-client-3.0.0/src/Makefile +--- openvas-client-3.0.0.old/src/Makefile 2009-09-22 21:26:36.000000000 +0200 ++++ openvas-client-3.0.0/src/Makefile 2010-05-05 22:57:40.000000000 +0200 +@@ -40,7 +40,7 @@ + @rm cflags.tmp + @chmod +x cflags + +-omp-cli.o: omp-cli.c ++omp-cli.o: cflags omp-cli.c + $(CC) $(CFLAGS) $(LIBOPENVAS_CFLAGS) $(OPENVAS_INCLUDE) -c omp-cli.c + + omp-cli: cflags $(OBJS) +diff -ru openvas-client-3.0.0.old/src/util/Makefile openvas-client-3.0.0/src/util/Makefile +--- openvas-client-3.0.0.old/src/util/Makefile 2009-09-22 21:26:36.000000000 +0200 ++++ openvas-client-3.0.0/src/util/Makefile 2010-05-05 22:58:52.000000000 +0200 +@@ -51,29 +51,29 @@ + @rm cflags.tmp + @chmod +x cflags + +-file_utils.o: file_utils.c file_utils.h ++file_utils.o: cflags file_utils.c file_utils.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c file_utils.c + +-openvas-socket.o: openvas-socket.c openvas-socket.h ++openvas-socket.o: cflags openvas-socket.c openvas-socket.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c openvas-socket.c + +-openvas_ssh_key_create.o: openvas_ssh_key_create.c openvas_ssh_key_create.h ++openvas_ssh_key_create.o: cflags openvas_ssh_key_create.c openvas_ssh_key_create.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c openvas_ssh_key_create.c + +-openvas_lsc_target_prep.o: openvas_lsc_target_prep.c openvas_lsc_target_prep.h ++openvas_lsc_target_prep.o: cflags openvas_lsc_target_prep.c openvas_lsc_target_prep.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c openvas_lsc_target_prep.c + +-openvas_lsc_user_rpm.o: openvas_lsc_user_rpm.c openvas_lsc_user_rpm.h ++openvas_lsc_user_rpm.o: cflags openvas_lsc_user_rpm.c openvas_lsc_user_rpm.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -DOPENVASCLIENT_LSCRPMGEN_DIR=\"$(prefix)/share/openvas\" -c openvas_lsc_user_rpm.c + +-parseutils.o: parseutils.c parseutils.h ++parseutils.o: cflags parseutils.c parseutils.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c parseutils.c + +-openvas_lsc_user_makensis.o: openvas_lsc_user_makensis.c\ ++openvas_lsc_user_makensis.o: cflags openvas_lsc_user_makensis.c\ + openvas_lsc_user_makensis.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c openvas_lsc_user_makensis.c + +-openvas_lsc_user_deb.o: openvas_lsc_user_deb.c\ ++openvas_lsc_user_deb.o: cflags openvas_lsc_user_deb.c\ + openvas_lsc_user_deb.h + $(CC) $(CFLAGS) $(OPENVAS_INCLUDE) -c openvas_lsc_user_deb.c + diff --git a/openvas-client-reportcrash.patch b/openvas-client-reportcrash.patch new file mode 100644 index 0000000..3920e89 --- /dev/null +++ b/openvas-client-reportcrash.patch @@ -0,0 +1,11 @@ +--- openvas-client/openvas/latex_output.c 2009/11/10 09:03:52 5830 ++++ openvas-client/openvas/latex_output.c 2010/03/25 21:46:27 7137 +@@ -59,6 +59,7 @@ + { + int pholes, pwarnings, pnotes, all = 0; + ++ if (hosts == 0) return CATEGORY_A; + pholes = (int) (holes*100)/hosts; + pwarnings = (int) (warnings*100)/hosts; + pnotes = (int) (notes*100)/hosts; + diff --git a/openvas-client.desktop b/openvas-client.desktop new file mode 100644 index 0000000..9989173 --- /dev/null +++ b/openvas-client.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Categories=Application;Security;System;X-Fedora; +Name=OpenVAS Client +GenericName=Security scanner +Comment=OpenVAS Client +Exec=OpenVAS-Client +StartupNotify=true +Terminal=false +Type=Application +Encoding=UTF-8 diff --git a/openvas-client.spec b/openvas-client.spec new file mode 100644 index 0000000..727eb15 --- /dev/null +++ b/openvas-client.spec @@ -0,0 +1,128 @@ +Name: openvas-client +Summary: Client component of Open Vulnerability Assessment (OpenVAS) Scanner +Version: 3.0.0 +Release: 7%{?dist} +Source0: http://wald.intevation.org/frs/download.php/685/openvas-client-3.0.0.tar.gz +Source1: openvas-client.desktop +Patch0: openvas-client-reportcrash.patch +#file with cflags is not referenced in Makefile correctly for build +#Patch reported to upstream +#http://wald.intevation.org/tracker/index.php?func=detail&aid=1489&group_id=29&atid=220 +Patch1: openvas-client-cflags.patch +URL: http://www.openvas.org +License: GPLv2 and GPLv2+ +Group: Applications/System +Requires: htmldoc +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRequires: openvas-libraries-devel >= 3.0 +BuildRequires: cmake >= 2.6.0 +BuildRequires: desktop-file-utils +BuildRequires: glibc-devel +BuildRequires: glib2-devel +BuildRequires: zlib-devel +BuildRequires: gtk2-devel +BuildRequires: gpgme-devel +BuildRequires: gnutls-devel +BuildRequires: openssl-devel +BuildRequires: atk-devel +BuildRequires: pango-devel +BuildRequires: gdk-pixbuf-devel +BuildRequires: cairo-devel +BuildRequires: freetype-devel +BuildRequires: fontconfig-devel +BuildRequires: libpcap-devel +BuildRequires: libgcrypt-devel + + +%description +OpenVAS-Client is a client component that is used to access and control +OpenVAS server. It is also used to perform analysis task of results +provided by the server component. + +%prep +%setup -q +%patch0 -p1 -b .reportcrash +%patch1 -p1 -b .cflags + +for i in CHANGES ChangeLog TODO; do + iconv -f iso8859-1 -t utf-8 $i > $i.utf8 && \ + touch -r $i $i.utf8 && \ + mv -f $i.utf8 $i; +done; + +%build +%configure --disable-static +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} INSTALL="install -p" +find %{buildroot} -name '*.la' -exec rm -f {} ';' + +# Fix permission on configuration file +chmod 644 %{buildroot}/%{_sysconfdir}/openvas/openvas-client_log.conf + +# Install desktop entry +desktop-file-install --dir %{buildroot}/%{_datadir}/applications %{SOURCE1} + +# Remove RPM script creator beacuse it's not necessary +rm -rf %{buildroot}/%{_datadir}/openvas + +# Add symlinks for lowercase binary name and manual page name +pushd %{buildroot}/%{_bindir}/ +ln -s OpenVAS-Client openvas-client +cd %{buildroot}/%{_mandir}/man1/ +ln -s OpenVAS-Client.1.gz openvas-client.1.gz +popd + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog CHANGES COPYING COPYING.README README TODO +%dir %{_sysconfdir}/openvas +%config(noreplace) %{_sysconfdir}/openvas/openvas-client_log.conf +%{_bindir}/OpenVAS-Client +%{_bindir}/openvas-client +%{_bindir}/openvasclient-mkcert +%{_bindir}/omp-cli +%{_mandir}/man1/OpenVAS-Client.1.* +%{_mandir}/man1/openvas-client.1.* +%{_mandir}/man1/openvasclient-mkcert.1.* +%{_datadir}/applications/* + +%changelog +* Thu Jun 3 2010 Stjepan Gros - 3.0.0-7 +- Fixed license and source tags + +* Wed May 05 2010 Michal Ambroz - 3.0.0-6 +- Build dependency to zlib-devel, gtk-devel and others ... +- Patched Makefiles for cflags file dependency + +* Sun Apr 18 2010 Stjepan Gros - 3.0.0-5 +- Renamed OpenVAS.desktop into openvas-client.desktop +- Added that the package requires htmldoc +- Added patch from upstream to prevent crash when generating pdf report from empty log +- Added symlink to lower case binary and manual page names +- Changed ownership of /etc/openvasd back to the client + +* Wed Mar 3 2010 Stjepan Gros - 3.0.0-4 +- Changes based on the comments in + https://bugzilla.redhat.com/show_bug.cgi?id=562470#c4 + +* Fri Feb 26 2010 Stjepan Gros - 3.0.0-3 +- Added cmake BR +- Changes based on the comments in + https://bugzilla.redhat.com/show_bug.cgi?id=562470#c2 + +* Sun Feb 7 2010 Stjepan Gros - 3.0.0-2 +- Removed vendor tag in desktop file install +- Added BR for glib2 + +* Sat Feb 6 2010 Stjepan Gros - 3.0.0-1 +- Updated spec file for OpenVAS-Client version 3 + +* Tue Nov 17 2009 Stjepan Gros - 2.0.5-1 +- Minor changes from taken from Xavier Bachelot +- Initial spec file diff --git a/sources b/sources index e69de29..3119dc2 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c5fc0c744865ca2e6c331bab529e11a3 openvas-client-3.0.0.tar.gz