hobbes1069 pushed to atop (epel7). "Major update (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu May 7 15:16:06 UTC 2015


From f63182871a35111db28da5a0a09ac5694dac8e9f Mon Sep 17 00:00:00 2001
From: "Richard M. Shaw" <hobbes1069 at gmail.com>
Date: Thu, 7 May 2015 10:00:59 -0500
Subject: Major update

- Update to latest upstream release.
- Fixes segmentation faults (BZ#1147145).
- Update spec file to use licence macro where appropriate.
- Modernize spec file and convert to new systemd scriptlets.

diff --git a/.gitignore b/.gitignore
index 725d659..2aa42b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 atop-1.23.tar.gz
 /atop-1.26.tar.gz
 /atop-2.0.2.tar.gz
+/atop-2.1.tar.gz
diff --git a/atop.spec b/atop.spec
index 2cb19f2..3821d65 100644
--- a/atop.spec
+++ b/atop.spec
@@ -1,13 +1,14 @@
 %define _hardened_build 1
+
 Name:           atop
-Version:        2.0.2
-Release:        4%{?dist}
+Version:        2.1
+Release:        1%{?dist}
 Summary:        An advanced interactive monitor to view the load on system and process level
 
 Group:          Applications/System
 License:        GPLv2+
 URL:            http://www.atcomputing.nl/Tools/atop/
-Source0:        http://www.atcomputing.nl/Tools/%{name}/packages/%{name}-%{version}.tar.gz
+Source0:        http://www.atcomputing.nl/download/%{name}-%{version}.tar.gz
 Source1:        atop.logrotate
 #Source2:        atop.init
 Source3:        atop.crondaily
@@ -15,17 +16,16 @@ Source4:        atop.sysconfig
 Source5:        atop.d
 Source6:        atop.service
 Source7:        README.fedora
+
 Patch0:         atop-1.26-cron.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  zlib-devel
 BuildRequires:  ncurses-devel 
-BuildRequires:  systemd-units
+BuildRequires:  systemd
 
-Requires(post): systemd-units
-Requires(post): systemd-sysv
-Requires(preun): systemd-units
-Requires(postun): systemd-units
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
 
 
 %description
@@ -44,16 +44,18 @@ performance-monitors:
 For more informations: http://www.atcomputing.nl/Tools/atop
 The package does not make use of the patches available at 
 http://www.atcomputing.nl/Tools/atop/kernpatch.html
+
  
 %prep
 %setup -q
 %patch0 -p0 -b .cron
 
+
 %build
 make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS"
 
+
 %install
-rm -rf $RPM_BUILD_ROOT
 install -Dp -m 0755 atop $RPM_BUILD_ROOT%{_bindir}/atop
 ln -s atop $RPM_BUILD_ROOT%{_bindir}/atopsar
 install -Dp -m 0644 man/atop.1 $RPM_BUILD_ROOT%{_mandir}/man1/atop.1
@@ -68,43 +70,24 @@ install -Dp -m 0644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/atop.service
 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/atop
 install -m 0644 %{SOURCE7} .
 
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ $1 -eq 1 ] ; then
-    # Initial installation
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post atop.service
 
 %preun
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable atop.service > /dev/null 2>&1 || :
-    /bin/systemctl stop atop.service > /dev/null 2>&1 || :
-fi
+%systemd_preun atop.service
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart atop.service >/dev/null 2>&1 || :
-fi
-
-%triggerun -- atop < 1.26-1
-# Save the current service runlevel info
-# User must manually run systemd-sysv-convert --apply atop
-# to migrate them to systemd targets
-/usr/bin/systemd-sysv-convert --save atop >/dev/null 2>&1 ||:
-
-# Run these because the SysV package being removed won't do them
-/sbin/chkconfig --del atop >/dev/null 2>&1 || :
-/bin/systemctl try-restart atop.service >/dev/null 2>&1 || :
+%systemd_postun_with_restart atop.service
 
 
 %files
-%defattr(-,root,root,-)
-%doc AUTHOR COPYING README ChangeLog README.fedora
+%if 0%{?rhel} || 0%{?fedora} < 21
+%doc COPYING
+%else
+%license COPYING
+%endif
+%doc AUTHOR README ChangeLog README.fedora
 %config(noreplace) %{_sysconfdir}/cron.d/atop
 %config(noreplace) %{_sysconfdir}/logrotate.d/atop
 %config(noreplace) %{_sysconfdir}/sysconfig/atop
@@ -118,7 +101,14 @@ fi
 %attr(0755,root,root) %dir %{_localstatedir}/log/atop
 %{_unitdir}/atop.service
 
+
 %changelog
+* Thu May  7 2015 Richard Shaw <hobbes1069 at gmail.com> - 2.1-1
+- Update to latest upstream release.
+- Fixes segmentation faults (BZ#1147145).
+- Update spec file to use licence macro where appropriate.
+- Modernize spec file and convert to new systemd scriptlets.
+
 * Fri Aug 15 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0.2-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sources b/sources
index 6b953c5..f382000 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f1dd1984584f9635712cb7196e25620c  atop-2.0.2.tar.gz
+d956f5b0c7e0705cff6cf44898d664d7  atop-2.1.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/atop.git/commit/?h=epel7&id=f63182871a35111db28da5a0a09ac5694dac8e9f


More information about the scm-commits mailing list