Hello community,

here is the log from the commit of package apcupsd for openSUSE:Factory checked 
in at 2018-03-19 23:39:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apcupsd (Old)
 and      /work/SRC/openSUSE:Factory/.apcupsd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apcupsd"

Mon Mar 19 23:39:45 2018 rev:64 rq:588548 version:3.14.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/apcupsd/apcupsd.changes  2017-12-20 
10:40:42.955288073 +0100
+++ /work/SRC/openSUSE:Factory/.apcupsd.new/apcupsd.changes     2018-03-19 
23:40:16.733239454 +0100
@@ -1,0 +2,9 @@
+Thu Mar 15 11:04:07 UTC 2018 - tchva...@suse.com
+
+- Drop support for < sle12, also removes patch:
+  * apcupsd-pm-utils.patch
+- Drop intitscript
+- Format with spec-cleaner
+- Use license macros instead of %doc macros
+
+-------------------------------------------------------------------
@@ -24 +33 @@
-  are commented out, so this file acts as example only.
+  are commented out, so this file acts as example only. bsc#950950

Old:
----
  apcupsd-pm-utils.patch
  apcupsd.init

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ apcupsd.spec ++++++
--- /var/tmp/diff_new_pack.eJ9cEq/_old  2018-03-19 23:40:17.965195013 +0100
+++ /var/tmp/diff_new_pack.eJ9cEq/_new  2018-03-19 23:40:17.969194869 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package apcupsd
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,25 +18,22 @@
 
 #Compat macro for new _fillupdir macro introduced in Nov 2017
 %if ! %{defined _fillupdir}
-  %define _fillupdir /var/adm/fillup-templates
+  %define _fillupdir %{_localstatedir}/adm/fillup-templates
 %endif
-
-%define apache_serverroot %(%{_sbindir}/apxs2 -q datadir 2>/dev/null || 
%{_sbindir}/apxs -q PREFIX)
 Name:           apcupsd
 Version:        3.14.14
 Release:        0
 Summary:        APC UPS Daemon (Powerful Daemon for APC UPSs)
-License:        GPL-2.0
+License:        GPL-2.0-only
 Group:          Hardware/UPS
 Url:            http://www.apcupsd.com/
-Source:         
https://sourceforge.net/projects/apcupsd/files/apcupsd%20-%20Stable/%{version}/apcupsd-%{version}.tar.gz
-Source1:        apcupsd.init
+Source:         
https://sourceforge.net/projects/apcupsd/files/apcupsd%%20-%%20Stable/%{version}/apcupsd-%{version}.tar.gz
 Source2:        README.SUSE
 Source4:        %{name}.hibernate
 Source5:        %{name}.sysconfig
 Source6:        %{name}.logrotate
 Source7:        apcupsd-httpd.conf
-Source8:        
https://sourceforge.net/projects/apcupsd/files/apcupsd%20-%20Stable/%{version}/apcupsd-%{version}.tar.gz.sig
+Source8:        
https://sourceforge.net/projects/apcupsd/files/apcupsd%%20-%%20Stable/%{version}/apcupsd-%{version}.tar.gz.sig
 Source9:        %{name}.keyring
 Source10:       %{name}.firewall
 # PATCH-FIX-OPENSUSE apcupsd-suse.patch sbra...@suse.cz -- Do not perform halt 
script alternation on install.
@@ -47,45 +44,32 @@
 Patch11:        apcupsd-3.14.8-systemd.patch
 # PATCH-FIX-OPENSUSE apcupsd-3.14.9-fixgui.patch rhbz#578276 
p.drou...@gmail.com -- fix crash in gui
 Patch13:        apcupsd-3.14.9-fixgui.patch
-# PATCH-FEATURE-OPENSUSE apcupsd-pm-utils.patch sbra...@suse.cz -- Use 
pm-utils in openSUSE < 13.1 and SLE < 12
-Patch15:        apcupsd-pm-utils.patch
+BuildRequires:  apache-rpm-macros
 BuildRequires:  apache2-devel
 BuildRequires:  distribution-release
 BuildRequires:  dos2unix
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
-BuildRequires:  gconf2-devel
-BuildRequires:  gd-devel
-BuildRequires:  gnome-vfs2-devel
-BuildRequires:  gtk2-devel
 BuildRequires:  libusb-devel
 BuildRequires:  mailx
 BuildRequires:  ncurses-devel
+BuildRequires:  pkgconfig
+BuildRequires:  systemd-rpm-macros
+BuildRequires:  systemd-sysvinit
 BuildRequires:  tcpd-devel
 BuildRequires:  update-desktop-files
+BuildRequires:  pkgconfig(gconf-2.0)
+BuildRequires:  pkgconfig(gdlib)
+BuildRequires:  pkgconfig(gnome-vfs-2.0)
+BuildRequires:  pkgconfig(gtk+-2.0)
+BuildRequires:  pkgconfig(systemd)
 BuildRequires:  pkgconfig(x11)
 Requires:       %{_bindir}/mail
 Requires(post): %fillup_prereq
-Requires(post): %{_bindir}/grep
-# sed and grep are still prerequred to finish upgrade from sysvinit scripts:
-Requires(post): %{_bindir}/sed
-Suggests:       logrotate
-%if 0%{?suse_version} > 1210
-BuildRequires:  systemd-rpm-macros
-BuildRequires:  systemd-sysvinit
-%else
-BuildRequires:  sysvinit
-%endif
-%if 0%{?suse_version} >= 1310
-BuildRequires:  systemd
-%else
-BuildRequires:  pm-utils
-%endif
-%if 0%{?suse_version} > 1220
+Requires(post): grep
+Requires(post): sed
+Recommends:     logrotate
 %{?systemd_requires}
-%else
-Requires(post): %insserv_prereq
-%endif
 
 %description
 Controls and monitors the status of an APC UPS under Linux. Allows your
@@ -120,38 +104,27 @@
 
 %prep
 %setup -q
-cp -a %{SOURCE1} platforms/suse/apcupsd.in
 cp -a %{SOURCE2} %{SOURCE4} .
 %patch0
 %patch2
 %patch11 -p1
 %patch13 -p1
-sed -i '/^#!/d' %{SOURCE1}
-%if 0%{?suse_version} < 1310
-%patch15
-%endif
 
 %build
 %configure \
        --sysconfdir=%{_sysconfdir}/%{name} \
        --with-libwrap \
        --enable-all \
-       --enable-nls \
        --with-lock-dir=%{_localstatedir}/lock \
-       --with-cgi-bin=%{apache_serverroot}/cgi-bin \
+       --with-cgi-bin=%{apache_datadir}/cgi-bin \
        --with-distname=$(grep ID_LIKE %{_sysconfdir}/os-release | cut -d = -f 
2 | tr -d '"')
 make %{?_smp_mflags}
 
 %install
-make DESTDIR=%{buildroot} install %{?_smp_mflags}
+%make_install
 install -m744 platforms/apccontrol \
               %{buildroot}%{_sysconfdir}/%{name}/apccontrol
-%if 0%{?suse_version} > 1220
 ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
-%else
-mkdir -p %{buildroot}%{_initddir}
-ln -sf ../..%{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
-%endif
 %suse_update_desktop_file gapcmon
 chmod 644 %{buildroot}/%{_datadir}/pixmaps/*.png
 # Cleanup for later doc macro processing
@@ -165,25 +138,17 @@
 %fdupes -s examples/rpt/
 
 rm -r %{buildroot}/%{_datadir}/hal
-%if 0%{?suse_version} >= 1310
 mkdir -p %{buildroot}%{_libexecdir}/systemd/system-sleep
 sed "s:@PWRFAILDIR@:%{_sysconfdir}/%{name}:g" <%{name}.hibernate 
>%{buildroot}%{_libexecdir}/systemd/system-sleep/apcupsd.sh
 chmod +x %{buildroot}%{_libexecdir}/systemd/system-sleep/apcupsd.sh
-%else
-mkdir -p %{buildroot}%{_sysconfdir}/pm/sleep.d
-sed "s:@PWRFAILDIR@:%{_sysconfdir}/%{name}:g" <%{name}.hibernate 
>%{buildroot}%{_sysconfdir}/pm/sleep.d/99apcupsd
-chmod +x %{buildroot}%{_sysconfdir}/pm/sleep.d/99%{name}
-%endif
 
 mkdir -p %{buildroot}%{_fillupdir}
 cp %{SOURCE5} %{buildroot}%{_fillupdir}/sysconfig.%{name}
 
 # systemd support and remove initd support for opensuse 12.2 and higher
-%if 0%{?suse_version} > 1210
 install -p -D -m644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service
 install -p -D -m755 %{name}_shutdown 
%{buildroot}%{_libexecdir}/systemd/system-shutdown/%{name}_shutdown
 rm %{buildroot}%{_initddir}/%{name}
-%endif
 
 install -d %{buildroot}%{_sysconfdir}/logrotate.d
 install -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
@@ -194,12 +159,9 @@
 install -m 644 -D %{SOURCE10} 
%{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
 
 %pre
-%if 0%{?suse_version} > 1220
 %service_add_pre %{name}.service
-%endif
 
 %post
-%if 0%{?suse_version} > 1220
 %fillup_only
 %service_add_post %{name}.service
 # Remove HALT_POWERDOWN_INSERT, it is not needed with systemd (it was last 
time filled in 13.1).
@@ -219,66 +181,24 @@
 fi
 # User installed file, by default in docdir. Not needed any more, and will 
never be.
 rm -f etc/init.d/apcupsd-early-powerdown
-%else
-%{fillup_and_insserv %{name}}
-# HALT_POWERDOWN_INSERT is supported since SuSE Linux 10.1, SLES 10.
-# Install HALT_POWERDOWN_INSERT
-if usr/bin/grep -q 
'^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/%{name}/apccontrol 
killpower\|%{_sysconfdir}/init\.d/apcupsd try-powerdown\|\)"' 
etc/sysconfig/shutdown ; then
-  usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1%{_initddir}/apcupsd 
try-powerdown":' etc/sysconfig/shutdown
-else
-  echo >&2 "%{name}: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
%{_sysconfdir}/sysconfig/shutdown."
-  echo >&2 "         Keeping unchanged. Should be:"
-  echo >&2 "HALT_POWERDOWN_INSERT=\"%{_initddir}/apcupsd try-powerdown\""
-fi
-%endif
 
 %preun
-%if 0%{?suse_version} > 1220
 %service_del_preun %{name}.service
-%else
-%{stop_on_removal apcupsd}
-%endif
 
 %postun
-%if 0%{?suse_version} > 1220
 %service_del_postun %{name}.service
-%else
-# Remove HALT_POWERDOWN_INSERT
-if test $1 -eq 0 -a ! -f %{_initddir}/%{name} ; then
-  if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/apcupsd 
try-powerdown\)"' etc/sysconfig/shutdown ; then
-    usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\)\(%{_sysconfdir}/init\.d/apcupsd 
try-powerdown\)":\1":' etc/sysconfig/shutdown
-  else
-    echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
%{_sysconfdir}/sysconfig/shutdown."
-    echo >&2 "         Keeping unchanged. Should be:"
-    echo >&2 "HALT_POWERDOWN_INSERT=\"\""
-  fi
-  if test -f etc/init.d/apcupsd-early-powerdown ; then
-    echo >&2 "%{name}: WARNING: You may want to remove your 
%{_initddir}/apcupsd-early-powerdown."
-  fi
-fi
-%{restart_on_update apcupsd}
-%insserv_cleanup
-%endif
 
 %files
-%defattr(-,root,root)
-%doc COPYING ChangeLog examples ReleaseNotes README.SUSE
+%license COPYING
+%doc ChangeLog examples ReleaseNotes README.SUSE
 %{_sbindir}/%{name}
 %{_sbindir}/apcaccess
 %{_sbindir}/apctest
 %{_sbindir}/smtp
 %{_sbindir}/rc%{name}
-%if 0%{?suse_version} <= 1220
-%{_initddir}/%{name}
-%else
 %{_unitdir}/%{name}.service
 %{_libexecdir}/systemd/system-shutdown/%{name}_shutdown
-%endif
-%if 0%{?suse_version} >= 1310
 %{_libexecdir}/systemd/system-sleep/%{name}.sh
-%else
-%{_sysconfdir}/pm/sleep.d/99%{name}
-%endif
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/changeme
 %config(noreplace) %{_sysconfdir}/%{name}/commfailure
@@ -293,20 +213,18 @@
 %{_fillupdir}/sysconfig.%{name}
 
 %files gui
-%defattr(-,root,root)
 %{_bindir}/gapcmon
 %{_datadir}/applications/gapcmon.desktop
 %{_datadir}/pixmaps/*.png
 
 %files cgi
-%defattr(-,root,root,-)
 %config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf
 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.css
 %config(noreplace) %{_sysconfdir}/%{name}/hosts.conf
 %config(noreplace) %{_sysconfdir}/%{name}/multimon.conf
-%{apache_serverroot}/cgi-bin/multimon.cgi
-%{apache_serverroot}/cgi-bin/upsfstats.cgi
-%{apache_serverroot}/cgi-bin/upsstats.cgi
-%{apache_serverroot}/cgi-bin/upsimage.cgi
+%{apache_datadir}/cgi-bin/multimon.cgi
+%{apache_datadir}/cgi-bin/upsfstats.cgi
+%{apache_datadir}/cgi-bin/upsstats.cgi
+%{apache_datadir}/cgi-bin/upsimage.cgi
 
 %changelog



Reply via email to