From dbff767f2d8e3a958d394b7df1c0b42e685b15a9 Mon Sep 17 00:00:00 2001 From: Jonathan Gibert Date: Fri, 14 Feb 2014 14:34:21 +0100 Subject: [PATCH 1/3] Since "Requires squid" is gone, we cannot be sure the squid group exists. revert group ownership in %files to root --- packaging/RPM/squidanalyzer.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packaging/RPM/squidanalyzer.spec b/packaging/RPM/squidanalyzer.spec index 1b373ac..ea95468 100644 --- a/packaging/RPM/squidanalyzer.spec +++ b/packaging/RPM/squidanalyzer.spec @@ -42,24 +42,24 @@ echo -e "#!/bin/sh\n%{_sbindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cro %files -%defattr(-,root,squid) +%defattr(-,root,root) %doc README ChangeLog %{_mandir}/man3/* %{perl_vendorlib}/SquidAnalyzer.pm -%attr(0755,root,squid) %{_sbindir}/squid-analyzer -%attr(0755,root,squid) %dir %{_sysconfdir}/%{name} -%attr(0664,root,squid) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf -%config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/excluded -%config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/network-aliases -%config(noreplace) %attr(0644,root,squid) %{_sysconfdir}/%{name}/user-aliases -%config(noreplace) %attr(0754,root,squid) %{_sysconfdir}/cron.daily/0%{name} -%attr(0755,root,squid) %dir %{_sysconfdir}/%{name}/lang +%attr(0755,root,root) %{_sbindir}/squid-analyzer +%attr(0755,root,root) %dir %{_sysconfdir}/%{name} +%attr(0664,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/excluded +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/network-aliases +%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}/user-aliases +%config(noreplace) %attr(0754,root,root) %{_sysconfdir}/cron.daily/0%{name} +%attr(0755,root,root) %dir %{_sysconfdir}/%{name}/lang %{_sysconfdir}/%{name}/lang/* -%attr(0755,root,squid) %dir %{contentdir}/html/%{name} +%attr(0755,root,root) %dir %{contentdir}/html/%{name} %{contentdir}/html/%{name}/flotr2.js %{contentdir}/html/%{name}/sorttable.js %{contentdir}/html/%{name}/%{name}.css -%attr(0755,root,squid) %dir %{contentdir}/html/%{name}/images +%attr(0755,root,root) %dir %{contentdir}/html/%{name}/images %{contentdir}/html/%{name}/images/*.png %clean From b5f0eef0f5233d4ef6da929fa74048c5e79aec14 Mon Sep 17 00:00:00 2001 From: Jonathan Gibert Date: Fri, 14 Feb 2014 14:36:58 +0100 Subject: [PATCH 2/3] "%make" and "%makeinstall_std" macros does not exists in RHEL5, revert to "make" and "make DESTDIR=%{buildroot} install" which are more compatible --- packaging/RPM/squidanalyzer.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/RPM/squidanalyzer.spec b/packaging/RPM/squidanalyzer.spec index ea95468..23b695b 100644 --- a/packaging/RPM/squidanalyzer.spec +++ b/packaging/RPM/squidanalyzer.spec @@ -30,12 +30,12 @@ or more often with heavy proxy usage. %build perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_sbindir} HTMLDIR=%{contentdir}/html/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes -%make +make %install rm -rf %{buildroot} -%makeinstall_std +make DESTDIR=%{buildroot} install install etc/* %{buildroot}%{_sysconfdir}/%{name}/ install -d %{buildroot}%{_sysconfdir}/cron.daily echo -e "#!/bin/sh\n%{_sbindir}/squid-analyzer" > %{buildroot}%{_sysconfdir}/cron.daily/0%{name} From 1069670d27911897ef63c304c1df7b1c6bc4fc89 Mon Sep 17 00:00:00 2001 From: Jonathan Gibert Date: Fri, 14 Feb 2014 15:14:15 +0100 Subject: [PATCH 3/3] - remove %mkrel macro (mdv specific) - add BuildRoot macro for compatibility with RHEL - remove perl special files (perllocal.pod and packlist) not packaged --- packaging/RPM/squidanalyzer.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packaging/RPM/squidanalyzer.spec b/packaging/RPM/squidanalyzer.spec index 23b695b..2fc8b03 100644 --- a/packaging/RPM/squidanalyzer.spec +++ b/packaging/RPM/squidanalyzer.spec @@ -3,7 +3,7 @@ Summary: Squid proxy log analyzer and report generator Name: squidanalyzer Version: 5.3 -Release: %mkrel 1 +Release: 1 License: GPLv3 Group: Monitoring URL: http://%{name}.darold.net/ @@ -11,6 +11,8 @@ Source: http://prdownloads.sourceforge.net/squid-report/%{name}-%{version}.tar. BuildRequires: perl BuildArch: noarch +Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + %description Squid proxy native log analyzer and reports generator with full statistics about times, hits, bytes, users, networks, top URLs and @@ -30,6 +32,9 @@ or more often with heavy proxy usage. %build perl Makefile.PL DESTDIR=%{buildroot} LOGFILE=%{_logdir}/squid/access.log BINDIR=%{_sbindir} HTMLDIR=%{contentdir}/html/%{name} BASEURL=/%{name} MANDIR=%{_mandir}/man3 QUIET=yes +# remove special files +find %{buildroot} -name "perllocal.pod" -o -name ".packlist" |xargs -i rm -f {} + make %install