Hello community, here is the log from the commit of package nut for openSUSE:Factory checked in at 2017-10-06 11:03:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nut (Old) and /work/SRC/openSUSE:Factory/.nut.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nut" Fri Oct 6 11:03:50 2017 rev:59 rq:531564 version:2.7.4 Changes: -------- --- /work/SRC/openSUSE:Factory/nut/nut.changes 2017-09-28 12:35:18.272236287 +0200 +++ /work/SRC/openSUSE:Factory/.nut.new/nut.changes 2017-10-06 11:03:54.801142504 +0200 @@ -1,0 +2,7 @@ +Mon Oct 2 08:25:15 UTC 2017 - [email protected] + +- Fix rpm groups +- Reduce the supported distros by keeping sle12+ only +- Convert to pkgconfig style dependencies + +------------------------------------------------------------------- Old: ---- upsd-early-powerdown.init upsd.init ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nut.spec ++++++ --- /var/tmp/diff_new_pack.l0Md0K/_old 2017-10-06 11:03:55.872980404 +0200 +++ /var/tmp/diff_new_pack.l0Md0K/_new 2017-10-06 11:03:55.876979800 +0200 @@ -31,29 +31,8 @@ # Collect all devices listed in ups-nut-device.fdi: %define USBHIDDRIVERS %(zcat %{SOURCE0} | tr a-z A-Z | grep -a -A1 USBHID-UPS | sed -n 's/.*ATTR{IDVENDOR}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, ATTR{IDPRODUCT}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, MODE=.*/modalias%{LBRACE}usb:v%{BACKSLASH}1p%{BACKSLASH}2d*dc*dsc*dp*ic*isc*ip*%{RBRACE}/p' | tr '%{BACKSLASH}n' ' ') %define USBNONHIDDRIVERS %(zcat %{SOURCE0} | tr a-z A-Z | grep -a -A1 _USB | sed -n 's/.*ATTR{IDVENDOR}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, ATTR{IDPRODUCT}==%{QUOTE}%{BACKSLASH}%{LBRACE}[^%{QUOTE}]*%{BACKSLASH}%{RBRACE}%{QUOTE}, MODE=.*/modalias%{LBRACE}usb:v%{BACKSLASH}1p%{BACKSLASH}2d*dc*dsc*dp*ic*isc*ip*%{RBRACE}/p' | tr '%{BACKSLASH}n' ' ') -%if 0%{?suse_version} > 1210 %define systemdsystemdutildir %(pkg-config --variable=systemdutildir systemd) -%define with_systemd 1 -%systemd_requires -%else -%define _libexecdir %{_prefix}/lib -%define _udevrulesdir %{_sysconfdir}/udev/rules.d/ -%define with_systemd 0 -%endif -# SLE <= 12 lacks needed packages -%if 0%{?sle_version} == 0 -%if 0%{?suse_version} < 1200 -%define with_doc 0 -%else -%define with_doc 1 -%endif -%else -%if 0%{?sle_version} < 130000 -%define with_doc 0 -%else -%define with_doc 1 -%endif -%endif +%define bashcompletionsdir %(pkg-config bash-completion --variable=completionsdir) Name: nut Version: 2.7.4 Release: 0 @@ -62,9 +41,7 @@ Group: Hardware/UPS Url: http://www.networkupstools.org/ Source: http://www.networkupstools.org/source/2.7/%{name}-%{version}.tar.gz -Source1: upsd.init Source2: README.SUSE -Source3: upsd-early-powerdown.init Source5: nut.firewall.in Source6: nut.system-sleep Source7: nut.sleep @@ -81,25 +58,26 @@ # PATCH-FIX-UPSTREAM use-pkg-config-gdlib.diff [email protected] -- Use pkg-config to obtain CFLAGS and LDFLAGS to use when building with gd Patch10: use-pkg-config-gdlib.diff BuildRequires: apache2-devel +BuildRequires: asciidoc BuildRequires: avahi-devel -BuildRequires: dbus-1-glib-devel +BuildRequires: dblatex BuildRequires: gcc-c++ -BuildRequires: gd-devel BuildRequires: libcppunit-devel -BuildRequires: libneon-devel -BuildRequires: libopenssl-devel BuildRequires: libtool BuildRequires: libusb-devel +BuildRequires: libxml2-tools +BuildRequires: libxslt-tools BuildRequires: net-snmp-devel -BuildRequires: pkg-config +BuildRequires: pkgconfig +BuildRequires: source-highlight BuildRequires: tcpd-devel -%if 0%{?suse_version} >= 1200 -%if 0%{?suse_version} >= 1330 -BuildRequires: bash-completion-devel -%else -BuildRequires: bash-completion -%endif -%endif +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(gdlib) +BuildRequires: pkgconfig(libpowerman) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(neon) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(udev) Requires: logrotate Requires: usbutils Requires(post): udev @@ -114,34 +92,14 @@ Provides: nut-classic = %{version} Obsoletes: nut-classic < %{version} Obsoletes: nut-hal < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} > 1230 -BuildRequires: powerman-devel -BuildRequires: systemd-devel -BuildRequires: udev -%ifarch %ix86 x86_64 ia64 -BuildRequires: freeipmi-devel +%{?systemd_requires} +BuildRequires: pkgconfig(bash-completion) +%ifarch %{ix86} x86_64 ia64 +BuildRequires: pkgconfig(libfreeipmi) %endif -%else -Requires(pre): %insserv_prereq -BuildRequires: pm-utils -Requires: powersave -%endif -%if %suse_version >= 1330 +%if 0%{?suse_version} >= 1330 Requires(pre): user(upsd) %endif -%if %with_doc -BuildRequires: asciidoc -BuildRequires: dblatex -BuildRequires: libxml2-tools -BuildRequires: libxslt-tools -BuildRequires: source-highlight -%endif -%if 0%{?suse_version} >= 1200 -%define bashcompletionsdir %(pkg-config bash-completion --variable=completionsdir) -%else -%define bashcompletionsdir %{_sysconfdir}/bash_completion.d -%endif %description Core package of Network UPS Tools. @@ -200,12 +158,10 @@ %package doc-images Summary: Network UPS Tools - Images for Documentation Group: Documentation/Other +Requires: %{name}-doc-images = %{version} Recommends: %{name} = %{version} Enhances: %{name} -Requires: %{name}-doc-images = %{version} -%if 0%{?suse_version} > 1200 BuildArch: noarch -%endif %description doc-images Images for the documentation. It is a supplementary package for some NUT @@ -217,12 +173,10 @@ %package doc-asciidoc Summary: Network UPS Tools - Documentation in AsciiDoc Format Group: Documentation/Other +Requires: %{name}-doc-images = %{version} Recommends: %{name} = %{version} Enhances: %{name} -Requires: %{name}-doc-images = %{version} -%if 0%{?suse_version} > 1200 BuildArch: noarch -%endif %description doc-asciidoc NUT manuals in AsciiDoc format (human readable source). @@ -230,15 +184,12 @@ Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS hardware. -%if %with_doc %package doc-pdf Summary: Network UPS Tools - Documentation in PDF -Group: Documentation/PDF +Group: Documentation/Other Recommends: %{name} = %{version} Enhances: %{name} -%if 0%{?suse_version} > 1200 BuildArch: noarch -%endif %description doc-pdf User manual in PDF format. @@ -249,12 +200,10 @@ %package doc-html Summary: Network UPS Tools - Documentation in HTML Group: Documentation/HTML +Requires: %{name}-doc-images = %{version} Recommends: %{name} = %{version} Enhances: %{name} -Requires: %{name}-doc-images = %{version} -%if 0%{?suse_version} > 1200 BuildArch: noarch -%endif %description doc-html User manual in HTML format. @@ -264,12 +213,10 @@ %package devel-doc-pdf Summary: Network UPS Tools - Documentation in PDF -Group: Documentation/PDF +Group: Documentation/Other Recommends: %{name} = %{version} Enhances: %{name} -%if 0%{?suse_version} > 1200 BuildArch: noarch -%endif %description devel-doc-pdf Developer manual in PDF format. @@ -279,15 +226,13 @@ %package devel-doc-html Summary: Network UPS Tools - Documentation in HTML +# For CSS files: Group: Documentation/HTML +Requires: %{name}-doc-html = %{version} +Requires: %{name}-doc-images = %{version} Recommends: %{name} = %{version} Enhances: %{name} -Requires: %{name}-doc-images = %{version} -# For CSS files: -Requires: %{name}-doc-html = %{version} -%if 0%{?suse_version} > 1200 BuildArch: noarch -%endif %description devel-doc-html Developer manual in HTML format. @@ -295,11 +240,9 @@ Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS hardware. -%endif %prep %setup -q -cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} . -mv upsd-early-powerdown.init upsd-early-powerdown +cp -a %{SOURCE2} %{SOURCE5} %{SOURCE6} %{SOURCE7} . %patch0 %patch3 %patch7 -p1 @@ -308,51 +251,35 @@ %patch10 -p1 sed -i s/@now@/`date -r ChangeLog +%%Y-%%m-%%d`/g docs/docinfo.xml.in -sed -i "s/@UPSD_USER@/%{USER}/g" upsd.init sed -i s:%{_prefix}/local/ups/bin:/bin: conf/upssched.conf.sample.in %build autoreconf -fvi -# documentation fails to build -> disable %configure \ --disable-static \ --sysconfdir=%{CONFPATH} \ --datadir=%{_datadir}/nut \ --with-all \ -%if %with_doc --with-doc \ -%else - --without-doc \ -%endif --with-ssl \ --with-openssl \ --without-nss \ --with-wrap \ -%if 0%{?suse_version} <= 1230 - --without-ipmi \ -%endif -%ifnarch %ix86 x86_64 ia64 +%ifnarch %{ix86} x86_64 ia64 --without-ipmi \ %endif -%if 0%{?suse_version} <= 1110 - --without-powerman \ -%endif --with-htmlpath=%{HTMLPATH} \ --with-cgipath=%{CGIPATH} \ --with-statepath=%{STATEPATH} \ --with-drvpath=%{MODELPATH} \ --with-user=%{USER} \ --with-group=%{GROUP} \ -%if 0%{with_systemd} --with-udev-dir=%{_libexecdir}/udev \ -%else - --with-udev-dir=%{_sysconfdir}/udev \ -%endif --enable-option-checking=fatal # There is a bug in doc build that makes impossible to build in parallel cd docs -make +make -j1 cd .. make %{?_smp_mflags} PORT=$(sed -n 's/#define PORT //p' config.log) @@ -362,21 +289,15 @@ sed s/@PORT@/$PORT/ <nut.firewall.in >nut.firewall %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} +%make_install find %{buildroot} -type f -name "*.la" -delete -print mkdir -p %{buildroot}%{STATEPATH} # initscript mkdir -p %{buildroot}%{_sbindir} -%if 0%{with_systemd} ln -s service %{buildroot}%{_sbindir}/rcnut-driver ln -s service %{buildroot}%{_sbindir}/rcnut-server ln -s service %{buildroot}%{_sbindir}/rcnut-monitor -%else -mkdir -p %{buildroot}%{_sysconfdir}/init.d -install -m 755 upsd.init %{buildroot}%{_sysconfdir}/init.d/upsd -ln -sf ../..%{_sysconfdir}/init.d/upsd %{buildroot}%{_sbindir}/rcupsd -%endif mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d install -m 644 scripts/logrotate/nutlogd %{buildroot}%{_sysconfdir}/logrotate.d/nut mkdir -p %{buildroot}%{STATEPATH} @@ -384,13 +305,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services cp nut.firewall %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/nut -%if 0%{with_systemd} install -d %{buildroot}%{_libexecdir}/systemd/system-sleep install nut.system-sleep %{buildroot}%{_libexecdir}/systemd/system-sleep/%{name}.sh -%else -mkdir -p %{buildroot}%{_libexecdir}/pm-utils/sleep.d -install nut.sleep %{buildroot}%{_libexecdir}/pm-utils/sleep.d/99nut -%endif # Rename web pages to not conflict with apache2-example-pages or user home page: mkdir %{buildroot}%{HTMLPATH}/nut %{buildroot}%{CGIPATH}/nut @@ -402,22 +318,18 @@ # Documentation mkdir -p %{buildroot}%{_docdir}/%{name} -cp -a AUTHORS COPYING ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING upsd-early-powerdown %{buildroot}%{_docdir}/%{name}/ +cp -a AUTHORS COPYING ChangeLog MAINTAINERS NEWS README README.SUSE UPGRADING %{buildroot}%{_docdir}/%{name}/ cp -a docs/*.txt docs/cables docs/images %{buildroot}%{_docdir}/%{name}/ -%if %with_doc cp -a docs/*.css docs/*.html docs/*.pdf %{buildroot}%{_docdir}/%{name}/ -%endif # Not needed for packaged contents: rm %{buildroot}%{_docdir}/%{name}/packager-guide.* %pre -%if %suse_version < 1330 +%if 0%{?suse_version} < 1330 getent passwd %{USER} >/dev/null || useradd -r -g %{GROUP} -s /bin/false -c "UPS daemon" -d /sbin %{USER} 2>/dev/null %endif -%if 0%{with_systemd} %service_add_pre nut-driver.service nut-server.service nut-monitor.service -%endif %post # Be sure that all files are owned by a dedicated user. @@ -434,92 +346,38 @@ # Be sure that all files are owned by a dedicated user. /bin/chown %{USER}:root %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users /bin/chmod 600 %{CONFPATH}/upsd.conf %{CONFPATH}/upsmon.conf %{CONFPATH}/upsd.users -# Install or remove HALT_POWERDOWN_INSERT -# It was last installed in 1310, but it is obsolete since dropping sysvinit support. -%if 0%{?suse_version} < 1310 -if grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd try-powerdown\|\)"' etc/sysconfig/shutdown ; then - sed -i 's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1%{_sysconfdir}/init.d/upsd try-powerdown":' etc/sysconfig/shutdown -else - # User configured Suspend-to-disc. Keep it unchanged and be silent. - if ! grep -q '^HALT_POWERDOWN_INSERT="%{_bindir}/powersave -U' etc/sysconfig/shutdown ; then - echo >&2 "nut: WARNING: Unknown value of HALT_POWERDOWN_INSERT in %{_sysconfdir}/sysconfig/shutdown." - echo >&2 " Keeping unchanged. Should be:" - echo >&2 "HALT_POWERDOWN_INSERT=\"%{_sysconfdir}/init.d/upsd try-powerdown\"" - echo >&2 "or" - echo >&2 "HALT_POWERDOWN_INSERT=\"%{_bindir}/powersave -U\"" - fi -fi -%endif # Migrate Suspend to Disc to the new convention (bnc#449861 and later bnc#871406): # It was never on by default, but documentation up to 11.0 recommends # "shutdown -z +0" for suspend to disc. It was discontinued before 11.0. # Documentation since 11.0 up to 13.1 recommends /powersave -U. # pm-utils (and powersave) were obsoleted after 13.1 in favor of systemd. -%if 0%{with_systemd} if grep "shutdown -z +0" %{_sysconfdir}/ups/upsmon.conf ; then sed -i 's:/sbin/shutdown -z +0:%{_bindir}/systemctl hibernate:;s:shutdown -z +0:%{_bindir}/systemctl hibernate:' %{_sysconfdir}/ups/upsmon.conf fi if grep "powersave -U" %{_sysconfdir}/ups/upsmon.conf ; then sed -i 's:%{_bindir}/powersave -U:%{_bindir}/systemctl hibernate:;s:powersave -U:%{_bindir}/systemctl hibernate:' %{_sysconfdir}/ups/upsmon.conf fi -%else -if grep "shutdown -z +0" %{_sysconfdir}/ups/upsmon.conf ; then - sed -i 's:/sbin/shutdown -z +0:%{_bindir}/powersave -U:;s:shutdown -z +0:%{_bindir}/powersave -U:' %{_sysconfdir}/ups/upsmon.conf -fi -%endif # And finally trigger udev to set permissions according to newly installed rules files. /sbin/udevadm trigger --subsystem-match=usb --property-match=DEVTYPE=usb_device -%if 0%{with_systemd} %service_add_post nut-driver.service nut-server.service nut-monitor.service -%else -%{fillup_and_insserv -f -n upsd} -%endif %preun -%if 0%{with_systemd} %service_del_preun nut-driver.service nut-server.service nut-monitor.service -%else -%{stop_on_removal upsd} -%endif %postun -# Remove HALT_POWERDOWN_INSERT -# It was last installed in 1310, but it is obsolete since dropping sysvinit support. -%if 0%{?suse_version} < 1310 -if test $1 -eq 0 -a ! -f %{_sysconfdir}/init.d/upsd ; then - if grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/upsd try-powerdown\|%{_bindir}/powersave -U\)"' etc/sysconfig/shutdown ; then - sed -i 's:^\(HALT_POWERDOWN_INSERT="\)\(%{_sysconfdir}/init\.d/upsd try-powerdown\|%{_bindir}/powersave -U\)":\1":' etc/sysconfig/shutdown - else - echo >&2 "nut: 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 %{_sysconfdir}/init.d/upsd-early-powerdown ; then - echo >&2 "nut: WARNING: You may want to remove your %{_sysconfdir}/init.d/upsd-early-powerdown." - fi -fi -%endif -%if 0%{with_systemd} %service_del_postun nut-driver.service nut-server.service nut-monitor.service -%else -%{restart_on_update upsd} -%insserv_cleanup -%endif %post -n libupsclient1 -p /sbin/ldconfig - %postun -n libupsclient1 -p /sbin/ldconfig %files -%defattr(-,root,root) %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/[A-EG-Z]* -%doc %{_docdir}/%{name}/upsd-early-powerdown %config %{_sysconfdir}/logrotate.d/* %{_bindir}/* %{_datadir}/nut -%{_mandir}/man5/*.* -%{_mandir}/man8/*.* +%{_mandir}/man5/*%{ext_man} +%{_mandir}/man8/*%{ext_man} %exclude %{_mandir}/man8/netxml-ups*.* %exclude %{_mandir}/man8/snmp-ups*.* %dir %{_libexecdir}/ups @@ -540,76 +398,58 @@ %exclude %{MODELPATH}/snmp-ups %exclude %{MODELPATH}/netxml-ups %attr(700,%{USER},%{GROUP}) %{STATEPATH} -%if 0%{with_systemd} %{_unitdir}/*.service %{systemdsystemdutildir}/system-shutdown/* %{_libexecdir}/systemd/system-sleep/%{name}.sh -%else -%{_libexecdir}/pm-utils/sleep.d/99nut -%{_sysconfdir}/init.d/* -%endif %{bashcompletionsdir}/* %files drivers-net -%defattr(-,root,root) %{MODELPATH}/snmp-ups %{MODELPATH}/netxml-ups -%{_mandir}/man8/netxml-ups*.* -%{_mandir}/man8/snmp-ups*.* +%{_mandir}/man8/netxml-ups*%{ext_man} +%{_mandir}/man8/snmp-ups*%{ext_man} %files -n libupsclient1 -%defattr(-,root,root) %{_libdir}/*.so.* %files cgi -%defattr(-,root,root) %{CGIPATH}/nut %{HTMLPATH}/nut %config(noreplace) %{CONFPATH}/upsstats-single.html %config(noreplace) %{CONFPATH}/upsstats.html %files devel -%defattr(-,root,root) %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%{_mandir}/man3/*.* +%{_mandir}/man3/*%{ext_man} %files doc-images -%defattr(-,root,root) %doc %dir %{_docdir}/%{name} %{_docdir}/%{name}/images %files doc-asciidoc -%defattr(-,root,root) %doc %dir %{_docdir}/%{name} %{_docdir}/%{name}/*.txt %{_docdir}/%{name}/cables -%if %with_doc %files doc-pdf -%defattr(-,root,root) %doc %dir %{_docdir}/%{name} %{_docdir}/%{name}/FAQ.pdf %{_docdir}/%{name}/cables.pdf %{_docdir}/%{name}/user-manual.pdf %files doc-html -%defattr(-,root,root) %{_docdir}/%{name}/FAQ.html %{_docdir}/%{name}/cables.html %{_docdir}/%{name}/user-manual.html %{_docdir}/%{name}/*.css %files devel-doc-pdf -%defattr(-,root,root) %doc %dir %{_docdir}/%{name} %{_docdir}/%{name}/developer-guide.pdf %files devel-doc-html -%defattr(-,root,root) %{_docdir}/%{name}/developer-guide.html -%endif - %changelog
