Argus SPEC file for RPM building
Chris Wilson
chris-argus at qwirx.com
Sun Sep 20 18:26:35 EDT 2009
Hi all,
On Sun, 20 Sep 2009, Chris Wilson wrote:
> I just tried to build Argus 3.0.0 RPMs as a normal user (not as root)
> and discovered that it was not possible, because argus.spec does not use
> buildroots and tries to install Argus on the host system in order to
> create the RPM. This is generally seen as a Bad and Dangerous Thing(TM).
>
> Please find attached a patch to argus.spec to enable the RPM to be built
> as a non-root user, and without installing it on the host system.
Similarly for argus-clients.
Cheers, Chris.
--
_____ __ _
\ __/ / ,__(_)_ | Chris Wilson <chris+sig at qwirx.com> Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |
-------------- next part --------------
--- argus-clients-3.0.0/lib/argus-clients.spec 2008-02-05 03:37:43.000000000 +0000
+++ /usr/src/redhat/SPECS/argus-clients.spec 2009-09-20 23:23:01.000000000 +0100
@@ -9,6 +9,7 @@
Group: Applications/Internet
Source0: ftp://ftp.qosient.com/argus/%{name}-%{ver}.%{rel}.tar.gz
URL: http://qosient.com/argus
+BuildRoot: /var/tmp/argus-clients-buildroot
%description
Argus Clients contains a number of programs that process Argus data.
@@ -25,41 +26,48 @@
%build
%configure --prefix=/usr
make
-mkdir -p %{argusdir}
-mkdir -p %{argusbin}
-mkdir -p %{argusdocs}
-mkdir -p %{argusdata}
-mkdir -p %{arguslib}
-
-cp -Rp support %{argusdocs}
-cp -Rp doc/* %{argusdocs}
-
-install -m 0555 -o root -g root bin/ra %{argusbin}
-install -m 0555 -o root -g root bin/rabins %{argusbin}
-install -m 0555 -o root -g root bin/racluster %{argusbin}
-install -m 0555 -o root -g root bin/racount %{argusbin}
-install -m 0555 -o root -g root bin/radium %{argusbin}
-install -m 0555 -o root -g root bin/ragraph %{argusbin}
-install -m 0555 -o root -g root bin/ragrep %{argusbin}
-install -m 0555 -o root -g root bin/rahisto %{argusbin}
-install -m 0555 -o root -g root bin/ramatrix %{argusbin}
-install -m 0555 -o root -g root bin/ranonymize %{argusbin}
-install -m 0555 -o root -g root bin/rapath %{argusbin}
-install -m 0555 -o root -g root bin/rapolicy %{argusbin}
-install -m 0555 -o root -g root bin/rasort %{argusbin}
-install -m 0555 -o root -g root bin/rasplit %{argusbin}
-install -m 0555 -o root -g root bin/rastrip %{argusbin}
-install -m 0555 -o root -g root bin/ratop %{argusbin}
-install -m 0555 -o root -g root bin/raxml %{argusbin}
-
-install -m 0444 -o root -g root man/man1/ra* %{_mandir}/man1/
-install -m 0444 -o root -g root man/man5/*.5 %{_mandir}/man5/
-install -m 0444 -o root -g root man/man8/*.8 %{_mandir}/man8/
-
-install -m 0644 -o root -g root support/Config/ranonymize.conf %{argusdata}
-install -m 0644 -o root -g root support/Config/racluster.conf %{argusdata}
-install -m 0644 -o root -g root support/Config/radium.conf %{argusdata}
-install -m 0644 -o root -g root support/Config/rarc %{argusdata}/ra.conf
+mkdir -p $RPM_BUILD_ROOT%{argusdir}
+mkdir -p $RPM_BUILD_ROOT%{argusbin}
+mkdir -p $RPM_BUILD_ROOT%{argusdocs}
+mkdir -p $RPM_BUILD_ROOT%{argusdata}
+mkdir -p $RPM_BUILD_ROOT%{arguslib}
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5
+mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
+
+cp -Rp support $RPM_BUILD_ROOT%{argusdocs}
+cp -Rp doc/* $RPM_BUILD_ROOT%{argusdocs}
+
+install bin/ra $RPM_BUILD_ROOT%{argusbin}
+install bin/rabins $RPM_BUILD_ROOT%{argusbin}
+install bin/racluster $RPM_BUILD_ROOT%{argusbin}
+install bin/racount $RPM_BUILD_ROOT%{argusbin}
+install bin/radark $RPM_BUILD_ROOT%{argusbin}
+install bin/radump $RPM_BUILD_ROOT%{argusbin}
+install bin/rafilteraddr $RPM_BUILD_ROOT%{argusbin}
+install bin/ragraph $RPM_BUILD_ROOT%{argusbin}
+install bin/ragrep $RPM_BUILD_ROOT%{argusbin}
+install bin/rahisto $RPM_BUILD_ROOT%{argusbin}
+install bin/ranonymize $RPM_BUILD_ROOT%{argusbin}
+install bin/rapath $RPM_BUILD_ROOT%{argusbin}
+install bin/rapolicy $RPM_BUILD_ROOT%{argusbin}
+install bin/raports $RPM_BUILD_ROOT%{argusbin}
+install bin/rasort $RPM_BUILD_ROOT%{argusbin}
+install bin/rasplit $RPM_BUILD_ROOT%{argusbin}
+install bin/rastream $RPM_BUILD_ROOT%{argusbin}
+install bin/rastrip $RPM_BUILD_ROOT%{argusbin}
+install bin/ratemplate $RPM_BUILD_ROOT%{argusbin}
+install bin/ratimerange $RPM_BUILD_ROOT%{argusbin}
+install bin/ratop $RPM_BUILD_ROOT%{argusbin}
+install bin/ratree $RPM_BUILD_ROOT%{argusbin}
+
+install man/man1/ra* $RPM_BUILD_ROOT%{_mandir}/man1/
+install man/man5/*.5 $RPM_BUILD_ROOT%{_mandir}/man5/
+install man/man8/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
+
+install support/Config/ranonymize.conf $RPM_BUILD_ROOT%{argusdata}
+install support/Config/racluster.conf $RPM_BUILD_ROOT%{argusdata}
+install support/Config/rarc $RPM_BUILD_ROOT%{argusdata}/ra.conf
%post
@@ -68,27 +76,14 @@
%postun
%files
-%defattr(-,root,root)
-%{argusbin}/ra
-%{argusbin}/rabins
-%{argusbin}/racluster
-%{argusbin}/racount
-%{argusbin}/radium
-%{argusbin}/ragrep
-%{argusbin}/rasort
-%{argusbin}/rasplit
-%{argusbin}/rastrip
-%{argusbin}/ratop
+%defattr(0555,root,root)
+%{argusbin}
-%{argusdata}/ra.conf
+%defattr(0644,root,root)
+%{argusdata}
+%defattr(0444,root,root)
%doc %{argusdocs}
-%{_mandir}/man1/ra.1
-%{_mandir}/man1/rabins.1
-%{_mandir}/man1/racluster.1
-%{_mandir}/man1/racount.1
-%{_mandir}/man1/rasort.1
-%{_mandir}/man1/rasplit.1
-%{_mandir}/man5/rarc.5
-%{_mandir}/man5/racluster.5
-%{_mandir}/man8/radium.8
+%{_mandir}/man1
+%{_mandir}/man5
+%{_mandir}/man8
More information about the argus
mailing list