Code: Select all
--- apcupsd.spec.orig 2017-05-04 21:20:35.000000000 +0100
+++ apcupsd.spec 2019-10-28 19:52:12.291282368 +0000
@@ -18,8 +18,10 @@
Patch1: apcupsd-3.14.4-shutdown.patch
BuildRequires: glibc-devel, gd-devel
-BuildRequires: net-snmp-devel, tcp_wrappers-devel, libusb-devel
-BuildRequires: gtk2-devel, gnome-vfs2-devel, desktop-file-utils
+BuildRequires: net-snmp-devel, libusb-devel
+BuildRequires: gtk2-devel, desktop-file-utils
+BuildRequires: glib2-devel, GConf2-devel, gtk2-devel
+#BuildRequires: gtk2-devel, gnome-vfs2-devel, desktop-file-utils
# This is part of util-linux in Fedora, but on EL7 it's in sysvinit-tools.
BuildRequires: /usr/bin/wall
Requires: /bin/mail /usr/bin/wall
@@ -85,7 +87,7 @@
--enable-modbus-usb \
--enable-gapcmon \
--enable-pcnet \
- --with-libwrap=%{_libdir} \
+ --without-libwrap \
--with-serial-dev= \
--with-upstype=usb \
--with-upscable=usb \
If you haven't used mock before then you need to install it from the epel-playground or epel-testing repos and update to the latest mock-core-configs package from those repos too. Once it's installed you have to add your user to the 'mock' group with usermod -a -G mock $me then logout and back in to pick up that change (or use newgrp). Once you've done that, set up your user's rpm tree using rpmdev-setuptree (from rpmdevtools) and rpm --install the apcupsd SRPM as your own user. That will place apcupsd.spec in ~/rpmbuild/SPECS and you can apply that patch and then rebuild the SRPM with rpmbuild -bs apcupsd.spec and then feed that into mock --rebuild ~/rpmbuild/SRPMS/apcupsd-3.14.14-5.el8.src.rpm
At the end it should say something like : INFO: Done(/home/trevor/rpmbuild/SRPMS/apcupsd-3.14.14-5.el8.src.rpm) Config(default) 1 minutes 50 seconds