diff --git a/.gitignore b/.gitignore index 8d08d5f..9da25ad 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ nut-2.4.3.tar.gz /nut-2.6.3.tar.gz /nut-2.6.4.tar.gz /nut-2.6.5.tar.gz +/nut-2.7.1.tar.gz +/nut-2.7.2.tar.gz +/nut-2.7.4.tar.gz +/nut-2.8.0.tar.gz diff --git a/nut-2.2.1-conf.patch b/nut-2.2.1-conf.patch deleted file mode 100644 index beebdf6..0000000 --- a/nut-2.2.1-conf.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: nut/conf/upssched.conf.sample.in -=================================================================== ---- nut/conf/upssched.conf.sample.in (revision 2057) -+++ nut/conf/upssched.conf.sample.in (revision 2070) -@@ -14,7 +14,7 @@ - # A shell script with a big case..esac construct should work nicely for this. - # An example has been provided to help you get started. - --CMDSCRIPT @BINDIR@/upssched-cmd -+CMDSCRIPT @bindir@/upssched-cmd - - # ============================================================================ - # diff --git a/nut-2.6.0-usbget.patch b/nut-2.6.0-usbget.patch deleted file mode 100644 index 2d9242a..0000000 --- a/nut-2.6.0-usbget.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: /trunk/drivers/libhid.c -=================================================================== ---- trunk/drivers/libhid.c (revision 2719) -+++ trunk/drivers/libhid.c (revision 2893) -@@ -142,5 +142,4 @@ - int id = pData->ReportID; - int r; -- unsigned char buf[SMALLBUF]; - - if (rbuf->ts[id] + age > time(NULL)) { -@@ -150,15 +149,12 @@ - } - -- r = comm_driver->get_report(udev, id, buf, sizeof(buf)); -+ r = comm_driver->get_report(udev, id, rbuf->data[id], rbuf->len[id]); - if (r <= 0) { - return -1; - } - -- /* broken report descriptors are common, so store whatever we can */ -- memcpy(rbuf->data[id], buf, (r < rbuf->len[id]) ? r : rbuf->len[id]); -- - if (rbuf->len[id] != r) { - upsdebugx(2, "%s: expected %d bytes, but got %d instead", __func__, rbuf->len[id], r); -- upsdebug_hex(3, "Report[err]", buf, r); -+ upsdebug_hex(3, "Report[err]", rbuf->data[id], r); - } else { - upsdebug_hex(3, "Report[get]", rbuf->data[id], rbuf->len[id]); diff --git a/nut-2.6.3-tmpfiles.patch b/nut-2.6.3-tmpfiles.patch index 7fb2e24..d1f09b4 100644 --- a/nut-2.6.3-tmpfiles.patch +++ b/nut-2.6.3-tmpfiles.patch @@ -1,11 +1,33 @@ -diff -up nut-2.6.4/scripts/systemd/nut-monitor.service.in.tmpfiles nut-2.6.4/scripts/systemd/nut-monitor.service.in ---- nut-2.6.4/scripts/systemd/nut-monitor.service.in.tmpfiles 2012-05-02 23:35:36.000000000 +0200 -+++ nut-2.6.4/scripts/systemd/nut-monitor.service.in 2012-06-14 11:38:42.408504102 +0200 -@@ -3,6 +3,7 @@ Description=Network UPS Tools - power de - After=local-fs.target network.target nut-server.service +diff -up nut-2.8.0/scripts/systemd/nut-driver-enumerator.service.in.tmpfiles nut-2.8.0/scripts/systemd/nut-driver-enumerator.service.in +--- nut-2.8.0/scripts/systemd/nut-driver-enumerator.service.in.tmpfiles 2022-05-09 16:42:37.296229637 +0200 ++++ nut-2.8.0/scripts/systemd/nut-driver-enumerator.service.in 2022-05-09 16:42:51.139030657 +0200 +@@ -23,6 +23,7 @@ Type=oneshot + # don't want it to fail the unit (when it can't restart). + Environment=REPORT_RESTART_42=no + EnvironmentFile=-@CONFPATH@/nut.conf ++ExecStartPre=-/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/nut-common.conf + ExecStart=@NUT_LIBEXECDIR@/nut-driver-enumerator.sh + ExecReload=@NUT_LIBEXECDIR@/nut-driver-enumerator.sh +diff -up nut-2.8.0/scripts/systemd/nut-driver@.service.in.tmpfiles nut-2.8.0/scripts/systemd/nut-driver@.service.in +--- nut-2.8.0/scripts/systemd/nut-driver@.service.in.tmpfiles 2022-05-09 16:41:00.952614514 +0200 ++++ nut-2.8.0/scripts/systemd/nut-driver@.service.in 2022-05-09 16:41:42.783013227 +0200 +@@ -40,6 +40,7 @@ PartOf=nut-driver.target [Service] -+ExecStartPre=-/usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/nut-client.conf - ExecStart=@SBINDIR@/upsmon + EnvironmentFile=-@CONFPATH@/nut.conf + SyslogIdentifier=%N ++ExecStartPre=-/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/nut-common.conf + ExecStart=/bin/sh -c 'NUTDEV="`@NUT_LIBEXECDIR@/nut-driver-enumerator.sh --get-device-for-service %i`" && [ -n "$NUTDEV" ] || { echo "FATAL: Could not find a NUT device section for service unit %i" >&2 ; exit 1 ; } ; @SBINDIR@/upsdrvctl start "$NUTDEV"' + ExecStop=/bin/sh -c 'NUTDEV="`@NUT_LIBEXECDIR@/nut-driver-enumerator.sh --get-device-for-service %i`" && [ -n "$NUTDEV" ] || { echo "FATAL: Could not find a NUT device section for service unit %i" >&2 ; exit 1 ; } ; @SBINDIR@/upsdrvctl stop "$NUTDEV"' + # Restart really always, do not stop trying: +diff -up nut-2.8.0/scripts/systemd/nut-monitor.service.in.tmpfiles nut-2.8.0/scripts/systemd/nut-monitor.service.in +--- nut-2.8.0/scripts/systemd/nut-monitor.service.in.tmpfiles 2022-05-09 12:57:35.160646121 +0200 ++++ nut-2.8.0/scripts/systemd/nut-monitor.service.in 2022-05-09 16:40:18.289227772 +0200 +@@ -18,6 +18,7 @@ PartOf=nut.target + [Service] + EnvironmentFile=-@CONFPATH@/nut.conf + SyslogIdentifier=%N ++ExecStartPre=-/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/nut-common.conf + ExecStart=@SBINDIR@/upsmon -F + ExecReload=@SBINDIR@/upsmon -c reload PIDFile=@PIDPATH@/upsmon.pid - Type=forking diff --git a/nut-2.6.5-dlfix.patch b/nut-2.6.5-dlfix.patch deleted file mode 100644 index 9198f65..0000000 --- a/nut-2.6.5-dlfix.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -up nut-2.6.5/tools/nut-scanner/scan_avahi.c.dlfix nut-2.6.5/tools/nut-scanner/scan_avahi.c ---- nut-2.6.5/tools/nut-scanner/scan_avahi.c.dlfix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_avahi.c 2012-09-06 12:56:45.383206759 +0200 -@@ -36,7 +36,7 @@ - #include - - /* dynamic link library stuff */ --static char * libname = "libavahi-client"; -+static char * libname = LIBAVAHI_CLIENT_PATH; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - -@@ -99,7 +99,7 @@ int nutscan_load_avahi_library() - return 0; - } - -- dl_handle = lt_dlopenext(libname); -+ dl_handle = lt_dlopen(libname); - if (!dl_handle) { - dl_error = lt_dlerror(); - goto err; -diff -up nut-2.6.5/tools/nut-scanner/scan_ipmi.c.dlfix nut-2.6.5/tools/nut-scanner/scan_ipmi.c ---- nut-2.6.5/tools/nut-scanner/scan_ipmi.c.dlfix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_ipmi.c 2012-09-06 12:56:55.760402197 +0200 -@@ -30,7 +30,7 @@ - #define NUT_IPMI_DRV_NAME "nut-ipmipsu" - - /* dynamic link library stuff */ --static char * libname = "libfreeipmi"; -+static char * libname = LIBFREEIPMI_PATH; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - -@@ -83,7 +83,7 @@ int nutscan_load_ipmi_library() - return 0; - } - -- dl_handle = lt_dlopenext(libname); -+ dl_handle = lt_dlopen(libname); - if (!dl_handle) { - dl_error = lt_dlerror(); - goto err; -diff -up nut-2.6.5/tools/nut-scanner/scan_nut.c.dlfix nut-2.6.5/tools/nut-scanner/scan_nut.c ---- nut-2.6.5/tools/nut-scanner/scan_nut.c.dlfix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_nut.c 2012-09-06 12:54:59.308897430 +0200 -@@ -26,7 +26,7 @@ - #include - - /* dynamic link library stuff */ --static char * libname = "libupsclient"; -+static char * libname = LIBUPSCLIENT_PATH; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - -@@ -66,7 +66,7 @@ int nutscan_load_upsclient_library() - return 0; - } - -- dl_handle = lt_dlopenext(libname); -+ dl_handle = lt_dlopen(libname); - if (!dl_handle) { - dl_error = lt_dlerror(); - goto err; -diff -up nut-2.6.5/tools/nut-scanner/scan_snmp.c.dlfix nut-2.6.5/tools/nut-scanner/scan_snmp.c ---- nut-2.6.5/tools/nut-scanner/scan_snmp.c.dlfix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_snmp.c 2012-09-06 12:57:16.250774817 +0200 -@@ -74,7 +74,7 @@ static int thread_count = 0; - long g_usec_timeout ; - - /* dynamic link library stuff */ --static char * libname = "libnetsnmp"; -+static char * libname = LIBNETSNMP_PATH; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - -@@ -119,7 +119,7 @@ int nutscan_load_snmp_library() - return 0; - } - -- dl_handle = lt_dlopenext(libname); -+ dl_handle = lt_dlopen(libname); - if (!dl_handle) { - dl_error = lt_dlerror(); - goto err; -diff -up nut-2.6.5/tools/nut-scanner/scan_usb.c.dlfix nut-2.6.5/tools/nut-scanner/scan_usb.c ---- nut-2.6.5/tools/nut-scanner/scan_usb.c.dlfix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_usb.c 2012-09-06 12:56:34.007987045 +0200 -@@ -28,7 +28,7 @@ - #include - - /* dynamic link library stuff */ --static char * libname = "libusb"; -+static char * libname = LIBUSB_PATH; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - static int (*nut_usb_close)(usb_dev_handle *dev); -@@ -58,7 +58,7 @@ int nutscan_load_usb_library() - return 0; - } - -- dl_handle = lt_dlopenext(libname); -+ dl_handle = lt_dlopen(libname); - if (!dl_handle) { - dl_error = lt_dlerror(); - goto err; -diff -up nut-2.6.5/tools/nut-scanner/scan_xml_http.c.dlfix nut-2.6.5/tools/nut-scanner/scan_xml_http.c ---- nut-2.6.5/tools/nut-scanner/scan_xml_http.c.dlfix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_xml_http.c 2012-09-06 12:57:28.617991656 +0200 -@@ -33,7 +33,7 @@ - #include - - /* dynamic link library stuff */ --static char * libname = "libneon"; -+static char * libname = LIBNEON_PATH; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - -@@ -64,7 +64,7 @@ int nutscan_load_neon_library() - return 0; - } - -- dl_handle = lt_dlopenext(libname); -+ dl_handle = lt_dlopen(libname); - if (!dl_handle) { - dl_error = lt_dlerror(); - goto err; diff --git a/nut-2.6.5-foreground.patch b/nut-2.6.5-foreground.patch deleted file mode 100644 index 639cc54..0000000 --- a/nut-2.6.5-foreground.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff -up nut-2.6.5/clients/upsmon.c.foreground nut-2.6.5/clients/upsmon.c ---- nut-2.6.5/clients/upsmon.c.foreground 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/clients/upsmon.c 2012-09-11 17:54:55.109343036 +0200 -@@ -1659,6 +1659,7 @@ static void help(const char *progname) - printf(" - reload: reread configuration\n"); - printf(" - stop: stop monitoring and exit\n"); - printf(" -D raise debugging level\n"); -+ printf(" -F run in foreground, do not daemonize\n"); - printf(" -h display this help\n"); - printf(" -K checks POWERDOWNFLAG, sets exit code to 0 if set\n"); - printf(" -p always run privileged (disable privileged parent)\n"); -@@ -1873,7 +1874,7 @@ static void check_parent(void) - int main(int argc, char *argv[]) - { - const char *prog = xbasename(argv[0]); -- int i, cmd = 0, checking_flag = 0; -+ int i, cmd = 0, checking_flag = 0, foreground = 0; - - printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); - -@@ -1884,7 +1885,7 @@ int main(int argc, char *argv[]) - - run_as_user = xstrdup(RUN_AS_USER); - -- while ((i = getopt(argc, argv, "+Dhic:f:pu:VK46")) != -1) { -+ while ((i = getopt(argc, argv, "+DFhic:f:pu:VK46")) != -1) { - switch (i) { - case 'c': - if (!strncmp(optarg, "fsd", strlen(optarg))) -@@ -1901,6 +1902,9 @@ int main(int argc, char *argv[]) - case 'D': - nut_debug_level++; - break; -+ case 'F': -+ foreground = 1; -+ break; - case 'f': - free(configfile); - configfile = xstrdup(optarg); -@@ -1976,9 +1980,9 @@ int main(int argc, char *argv[]) - exit(EXIT_FAILURE); - } - -- if (nut_debug_level < 1) { -+ if (!foreground && nut_debug_level < 1) { - background(); -- } else { -+ } else if (nut_debug_level >= 1) { - upsdebugx(1, "debug level is '%d'", nut_debug_level); - } - -diff -up nut-2.6.5/scripts/systemd/nut-monitor.service.in.foreground nut-2.6.5/scripts/systemd/nut-monitor.service.in ---- nut-2.6.5/scripts/systemd/nut-monitor.service.in.foreground 2012-09-11 17:56:05.037920175 +0200 -+++ nut-2.6.5/scripts/systemd/nut-monitor.service.in 2012-09-11 17:56:05.038920183 +0200 -@@ -4,9 +4,8 @@ After=local-fs.target network.target nut - - [Service] - ExecStartPre=-/usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/nut-client.conf --ExecStart=@SBINDIR@/upsmon --PIDFile=@PIDPATH@/upsmon.pid --Type=forking -+ExecStart=@SBINDIR@/upsmon -F -+Type=simple - - [Install] - WantedBy=multi-user.target -diff -up nut-2.6.5/scripts/systemd/nut-server.service.in.foreground nut-2.6.5/scripts/systemd/nut-server.service.in ---- nut-2.6.5/scripts/systemd/nut-server.service.in.foreground 2012-09-11 17:56:19.850042294 +0200 -+++ nut-2.6.5/scripts/systemd/nut-server.service.in 2012-09-11 17:56:19.851042303 +0200 -@@ -5,8 +5,8 @@ Requires=nut-driver.service - Before=nut-monitor.service - - [Service] --ExecStart=@SBINDIR@/upsd --Type=forking -+ExecStart=@SBINDIR@/upsd -F -+Type=simple - - [Install] - WantedBy=multi-user.target -diff -up nut-2.6.5/server/upsd.c.foreground nut-2.6.5/server/upsd.c ---- nut-2.6.5/server/upsd.c.foreground 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/server/upsd.c 2012-09-11 17:54:55.109343036 +0200 -@@ -819,6 +819,7 @@ static void help(const char *progname) - printf(" - reload: reread configuration files\n"); - printf(" - stop: stop process and exit\n"); - printf(" -D raise debugging level\n"); -+ printf(" -F run in foreground, do not daemonize\n"); - printf(" -h display this help\n"); - printf(" -r chroots to \n"); - printf(" -q raise log level threshold\n"); -@@ -882,7 +883,7 @@ void check_perms(const char *fn) - - int main(int argc, char **argv) - { -- int i, cmd = 0; -+ int i, cmd = 0, foreground = 0; - char *chroot_path = NULL; - const char *user = RUN_AS_USER; - struct passwd *new_uid = NULL; -@@ -898,7 +899,7 @@ int main(int argc, char **argv) - - printf("Network UPS Tools %s %s\n", progname, UPS_VERSION); - -- while ((i = getopt(argc, argv, "+h46p:qr:i:fu:Vc:D")) != -1) { -+ while ((i = getopt(argc, argv, "+hF46p:qr:i:fu:Vc:D")) != -1) { - switch (i) { - case 'h': - help(progname); -@@ -936,6 +937,10 @@ int main(int argc, char **argv) - nut_debug_level++; - break; - -+ case 'F': -+ foreground = 1; -+ break; -+ - case '4': - opt_af = AF_INET; - break; -@@ -1023,7 +1028,7 @@ int main(int argc, char **argv) - /* handle upsd.users */ - user_load(); - -- if (!nut_debug_level) { -+ if (!nut_debug_level && !foreground) { - background(); - writepid(pidfn); - } else { diff --git a/nut-2.6.5-ipmifix.patch b/nut-2.6.5-ipmifix.patch deleted file mode 100644 index db7bff8..0000000 --- a/nut-2.6.5-ipmifix.patch +++ /dev/null @@ -1,138 +0,0 @@ -diff -up nut-2.6.5/drivers/nut-libfreeipmi.c.ipmifix nut-2.6.5/drivers/nut-libfreeipmi.c ---- nut-2.6.5/drivers/nut-libfreeipmi.c.ipmifix 2012-07-31 19:38:59.000000000 +0200 -+++ nut-2.6.5/drivers/nut-libfreeipmi.c 2012-09-04 09:42:48.000000000 +0200 -@@ -49,6 +49,36 @@ - #include "nut-ipmi.h" - #include "dstate.h" - -+#ifdef HAVE_FREEIPMI_11X_12X -+#define ipmi_fru_parse_ctx_t ipmi_fru_ctx_t -+#define nut_ipmi_fru_parse_close_device_id nut_ipmi_fru_close_device_id -+#define nut_ipmi_fru_parse_ctx_destroy nut_ipmi_fru_ctx_destroy -+#define nut_ipmi_fru_parse_ctx_create nut_ipmi_fru_ctx_create -+#define nut_ipmi_fru_parse_ctx_set_flags nut_ipmi_fru_ctx_set_flags -+#define nut_ipmi_fru_parse_open_device_id nut_ipmi_fru_open_device_id -+#define nut_ipmi_fru_parse_ctx_errormsg nut_ipmi_fru_ctx_errormsg -+#define nut_ipmi_fru_parse_next nut_ipmi_fru_next -+#define IPMI_FRU_PARSE_AREA_SIZE_MAX IPMI_FRU_AREA_SIZE_MAX -+#define IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS -+#define IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION -+#define IPMI_FRU_PARSE_AREA_TYPE_BOARD_INFO_AREA IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA -+#define ipmi_fru_parse_field_t ipmi_fru_field_t -+#define ipmi_fru_parse_ctx_create ipmi_fru_ctx_create -+#define ipmi_fru_parse_ctx_set_flags ipmi_fru_ctx_set_flags -+#define ipmi_fru_parse_ctx_strerror ipmi_fru_ctx_strerror -+#define ipmi_fru_parse_ctx_errnum ipmi_fru_ctx_errnum -+#define ipmi_fru_parse_open_device_id ipmi_fru_open_device_id -+#define ipmi_fru_parse_ctx_errormsg ipmi_fru_ctx_errormsg -+#define ipmi_fru_parse_read_data_area ipmi_fru_read_data_area -+#define ipmi_fru_parse_type_length_field_to_string ipmi_fru_type_length_field_to_string -+#define ipmi_fru_parse_close_device_id ipmi_fru_close_device_id -+#define ipmi_fru_parse_ctx_destroy ipmi_fru_ctx_destroy -+#define ipmi_fru_parse_multirecord_power_supply_information ipmi_fru_multirecord_power_supply_information -+#define ipmi_fru_parse_board_info_area ipmi_fru_board_info_area -+#define ipmi_fru_parse_next ipmi_fru_next -+#define IPMI_FRU_PARSE_AREA_STRING_MAX IPMI_FRU_AREA_STRING_MAX -+#endif -+ - /* FreeIPMI defines */ - #define IPMI_FRU_STR_BUFLEN 1024 - /* haven't seen a motherboard with more than 2-3 so far, -diff -up nut-2.6.5/m4/nut_check_libfreeipmi.m4.ipmifix nut-2.6.5/m4/nut_check_libfreeipmi.m4 ---- nut-2.6.5/m4/nut_check_libfreeipmi.m4.ipmifix 2012-07-31 19:38:56.000000000 +0200 -+++ nut-2.6.5/m4/nut_check_libfreeipmi.m4 2012-09-04 09:45:45.399328962 +0200 -@@ -66,15 +66,23 @@ if test -z "${nut_have_libfreeipmi_seen} - dnl when version cannot be tested (prior to 1.0.5, with no pkg-config) - dnl we have to check for some specific functions - AC_SEARCH_LIBS([ipmi_ctx_find_inband], [freeipmi], [], [nut_have_freeipmi=no]) -- AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [], [nut_have_freeipmi=no]) - - AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [nut_have_freeipmi_monitoring=yes], [nut_have_freeipmi_monitoring=no]) - AC_SEARCH_LIBS([ipmi_monitoring_sensor_read_record_id], [ipmimonitoring], [], [nut_have_freeipmi_monitoring=no]) - - dnl Check for FreeIPMI 1.1.X / 1.2.X which implies API changes! -- AC_SEARCH_LIBS([ipmi_sdr_cache_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=no], []) -+ nut_have_freeipmi_old="${nut_have_freeipmi}" -+ AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [nut_have_freeipmi_11x_12x=no], [nut_have_freeipmi_old=no]) -+ AC_SEARCH_LIBS([ipmi_sdr_cache_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=no], [nut_have_freeipmi_old=no]) -+ AC_SEARCH_LIBS([ipmi_fru_ctx_create], [freeipmi], [nut_have_freeipmi_11x_12x=yes], [nut_have_freeipmi_11x_12x=no]) - AC_SEARCH_LIBS([ipmi_sdr_ctx_destroy], [freeipmi], [nut_have_freeipmi_11x_12x=yes], [nut_have_freeipmi_11x_12x=no]) - -+ if test "${nut_have_freeipmi}${nut_have_freeipmi_11x_12x}" = "yesyes"; then -+ AC_DEFINE(HAVE_FREEIPMI_11X_12X, 1, [Define if FreeIPMI 1.1.X / 1.2.X support is available]) -+ elif test "${nut_have_freeipmi_old}" = "no"; then -+ nut_have_freeipmi="no" -+ fi -+ - if test "${nut_have_freeipmi}" = "yes"; then - nut_with_ipmi="yes" - nut_ipmi_lib="(FreeIPMI)" -@@ -84,10 +92,6 @@ if test -z "${nut_have_libfreeipmi_seen} - LIBIPMI_LIBS="${LIBS}" - fi - -- if test "${nut_have_freeipmi_11x_12x}" = "yes"; then -- AC_DEFINE(HAVE_FREEIPMI_11X_12X, 1, [Define if FreeIPMI 1.1.X / 1.2.X support is available]) -- fi -- - if test "${nut_have_freeipmi_monitoring}" = "yes"; then - AC_DEFINE(HAVE_FREEIPMI_MONITORING, 1, [Define if FreeIPMI monitoring support is available]) - fi -diff -up nut-2.6.5/tools/nut-scanner/scan_ipmi.c.ipmifix nut-2.6.5/tools/nut-scanner/scan_ipmi.c ---- nut-2.6.5/tools/nut-scanner/scan_ipmi.c.ipmifix 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/tools/nut-scanner/scan_ipmi.c 2012-09-04 09:42:35.000000000 +0200 -@@ -34,24 +34,50 @@ static char * libname = "libfreeipmi"; - static lt_dlhandle dl_handle = NULL; - static const char *dl_error = NULL; - --static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx); --static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx); - #ifdef HAVE_FREEIPMI_11X_12X - static void (*nut_ipmi_sdr_ctx_destroy) (ipmi_sdr_ctx_t ctx); -+static int (*nut_ipmi_fru_close_device_id) (ipmi_fru_ctx_t ctx); -+static void (*nut_ipmi_fru_ctx_destroy) (ipmi_fru_ctx_t ctx); -+static ipmi_fru_ctx_t (*nut_ipmi_fru_ctx_create) (ipmi_ctx_t ipmi_ctx); -+static int (*nut_ipmi_fru_ctx_set_flags) (ipmi_fru_ctx_t ctx, unsigned int flags); -+static int (*nut_ipmi_fru_open_device_id) (ipmi_fru_ctx_t ctx, uint8_t fru_device_id); -+static char * (*nut_ipmi_fru_ctx_errormsg) (ipmi_fru_ctx_t ctx); -+static int (*nut_ipmi_fru_next) (ipmi_fru_ctx_t ctx); - #else /* HAVE_FREEIPMI_11X_12X */ -+static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx); -+static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx); - static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx); - static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx); --#endif /* HAVE_FREEIPMI_11X_12X */ - static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx); - static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags); - static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id); - static char * (*nut_ipmi_fru_parse_ctx_errormsg) (ipmi_fru_parse_ctx_t ctx); -+static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx); -+#endif /* HAVE_FREEIPMI_11X_12X */ -+ -+#ifndef ipmi_fru_parse_ctx_t -+#define ipmi_fru_parse_ctx_t ipmi_fru_ctx_t -+#endif -+ -+#ifndef nut_ipmi_fru_parse_close_device_id -+#define nut_ipmi_fru_parse_close_device_id nut_ipmi_fru_close_device_id -+#endif -+ -+#define nut_ipmi_fru_parse_ctx_destroy nut_ipmi_fru_ctx_destroy -+#define nut_ipmi_fru_parse_ctx_create nut_ipmi_fru_ctx_create -+#define nut_ipmi_fru_parse_ctx_set_flags nut_ipmi_fru_ctx_set_flags -+#define nut_ipmi_fru_parse_open_device_id nut_ipmi_fru_open_device_id -+#define nut_ipmi_fru_parse_ctx_errormsg nut_ipmi_fru_ctx_errormsg -+#define nut_ipmi_fru_parse_next nut_ipmi_fru_next -+#define IPMI_FRU_PARSE_AREA_SIZE_MAX IPMI_FRU_AREA_SIZE_MAX -+#define IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS -+#define IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION -+ - static int (*nut_ipmi_fru_parse_read_data_area) (ipmi_fru_parse_ctx_t ctx, - unsigned int *area_type, - unsigned int *area_length, - void *areabuf, - unsigned int areabuflen); --static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx); - static ipmi_ctx_t (*nut_ipmi_ctx_create) (void); - static int (*nut_ipmi_ctx_find_inband) (ipmi_ctx_t ctx, - ipmi_driver_type_t *driver_type, diff --git a/nut-2.6.5-pthreadfix.patch b/nut-2.6.5-pthreadfix.patch deleted file mode 100644 index 9aca92b..0000000 --- a/nut-2.6.5-pthreadfix.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up nut-2.6.5/tools/nut-scanner/nut-scanner.c.pthreadfix nut-2.6.5/tools/nut-scanner/nut-scanner.c ---- nut-2.6.5/tools/nut-scanner/nut-scanner.c.pthreadfix 2012-09-06 13:25:03.856936357 +0200 -+++ nut-2.6.5/tools/nut-scanner/nut-scanner.c 2012-09-06 13:25:03.881936493 +0200 -@@ -434,22 +434,22 @@ display_help: - } - - #ifdef HAVE_PTHREAD -- if( allow_usb && nutscan_avail_usb ) { -+ if( allow_usb && nutscan_avail_usb && thread[TYPE_USB]) { - pthread_join(thread[TYPE_USB],NULL); - } -- if( allow_snmp && nutscan_avail_snmp ) { -+ if( allow_snmp && nutscan_avail_snmp && thread[TYPE_SNMP]) { - pthread_join(thread[TYPE_SNMP],NULL); - } -- if( allow_xml && nutscan_avail_xml_http ) { -+ if( allow_xml && nutscan_avail_xml_http && thread[TYPE_XML]) { - pthread_join(thread[TYPE_XML],NULL); - } -- if( allow_oldnut && nutscan_avail_nut ) { -+ if( allow_oldnut && nutscan_avail_nut && thread[TYPE_NUT]) { - pthread_join(thread[TYPE_NUT],NULL); - } -- if( allow_avahi && nutscan_avail_avahi ) { -+ if( allow_avahi && nutscan_avail_avahi && thread[TYPE_AVAHI]) { - pthread_join(thread[TYPE_AVAHI],NULL); - } -- if( allow_ipmi && nutscan_avail_ipmi ) { -+ if( allow_ipmi && nutscan_avail_ipmi && thread[TYPE_IPMI]) { - pthread_join(thread[TYPE_IPMI],NULL); - } - #endif /* HAVE_PTHREAD */ diff --git a/nut-2.6.5-quickfix.patch b/nut-2.6.5-quickfix.patch deleted file mode 100644 index 8330518..0000000 --- a/nut-2.6.5-quickfix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up nut-2.6.5/configure.in.quickfix nut-2.6.5/configure.in ---- nut-2.6.5/configure.in.quickfix 2012-08-10 14:19:55.924431026 +0200 -+++ nut-2.6.5/configure.in 2012-08-10 14:20:13.332566508 +0200 -@@ -986,9 +986,8 @@ dnl Override installation directory, wit - dnl prefix. This is needed for 'distcheck*' targets, otherwise - dnl files will try to get intalled to the actual system directories - if test -n "${systemdsystemunitdir}"; then -- systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" -+ systemdsystemshutdowndir="/lib/systemd/system-shutdown" - AC_MSG_RESULT(using ${systemdsystemunitdir}) -- systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`" - else - AC_MSG_RESULT(no) - fi diff --git a/nut-2.6.5-rmpidf.patch b/nut-2.6.5-rmpidf.patch index ada8d70..54c6e1e 100644 --- a/nut-2.6.5-rmpidf.patch +++ b/nut-2.6.5-rmpidf.patch @@ -1,7 +1,7 @@ -diff -up nut-2.6.5/clients/upsmon.c.rmpidf nut-2.6.5/clients/upsmon.c ---- nut-2.6.5/clients/upsmon.c.rmpidf 2013-02-28 12:08:34.487394359 +0100 -+++ nut-2.6.5/clients/upsmon.c 2013-02-28 12:08:34.494394419 +0100 -@@ -2037,6 +2037,7 @@ int main(int argc, char *argv[]) +diff -up nut-2.8.0/clients/upsmon.c.rmpidf nut-2.8.0/clients/upsmon.c +--- nut-2.8.0/clients/upsmon.c.rmpidf 2022-04-23 13:56:06.000000000 +0200 ++++ nut-2.8.0/clients/upsmon.c 2022-05-09 17:22:34.329547283 +0200 +@@ -2314,6 +2314,7 @@ int main(int argc, char *argv[]) upslogx(LOG_INFO, "Signal %d: exiting", exit_flag); upsmon_cleanup(); @@ -9,48 +9,48 @@ diff -up nut-2.6.5/clients/upsmon.c.rmpidf nut-2.6.5/clients/upsmon.c exit(EXIT_SUCCESS); } -diff -up nut-2.6.5/common/common.c.rmpidf nut-2.6.5/common/common.c ---- nut-2.6.5/common/common.c.rmpidf 2012-07-31 19:38:58.000000000 +0200 -+++ nut-2.6.5/common/common.c 2013-02-28 12:08:34.494394419 +0100 -@@ -229,6 +229,20 @@ void writepid(const char *name) - umask(mask); +diff -up nut-2.8.0/common/common.c.rmpidf nut-2.8.0/common/common.c +--- nut-2.8.0/common/common.c.rmpidf 2022-05-09 17:22:34.329547283 +0200 ++++ nut-2.8.0/common/common.c 2022-05-09 17:26:48.671847245 +0200 +@@ -358,6 +358,20 @@ pid_t parsepid(const char *buf) + return pid; } +/* remove pid file */ +void cleanpid(const char *name) +{ -+ char fn[SMALLBUF]; ++ char fn[SMALLBUF]; + -+ /* use full path if present, else build filename in PIDPATH */ -+ if (*name == '/') -+ snprintf(fn, sizeof(fn), "%s", name); -+ else -+ snprintf(fn, sizeof(fn), "%s/%s.pid", PIDPATH, name); ++ /* use full path if present, else build filename in PIDPATH */ ++ if (*name == '/') ++ snprintf(fn, sizeof(fn), "%s", name); ++ else ++ snprintf(fn, sizeof(fn), "%s/%s.pid", PIDPATH, name); + -+ unlink(fn); ++ unlink(fn); +} + - /* open pidfn, get the pid, then send it sig */ - int sendsignalfn(const char *pidfn, int sig) - { -diff -up nut-2.6.5/include/common.h.rmpidf nut-2.6.5/include/common.h ---- nut-2.6.5/include/common.h.rmpidf 2012-07-31 19:38:56.000000000 +0200 -+++ nut-2.6.5/include/common.h 2013-02-28 12:08:34.495394429 +0100 -@@ -64,6 +64,9 @@ void chroot_start(const char *path); + /* open pidfn, get the pid, then send it sig + * returns negative codes for errors, or + * zero for a successfully sent signal +diff -up nut-2.8.0/include/common.h.rmpidf nut-2.8.0/include/common.h +--- nut-2.8.0/include/common.h.rmpidf 2022-05-09 17:22:34.329547283 +0200 ++++ nut-2.8.0/include/common.h 2022-05-09 17:25:47.439740973 +0200 +@@ -103,6 +103,9 @@ void chroot_start(const char *path); /* write a pid file - is a full pathname *or* just the program name */ void writepid(const char *name); +/* remove pid file */ +void cleanpid(const char *name); + - /* send a signal to another running process */ - int sendsignal(const char *progname, int sig); - -diff -up nut-2.6.5/server/upsd.c.rmpidf nut-2.6.5/server/upsd.c ---- nut-2.6.5/server/upsd.c.rmpidf 2013-02-28 12:08:37.967424582 +0100 -+++ nut-2.6.5/server/upsd.c 2013-02-28 12:08:37.982424720 +0100 -@@ -1040,6 +1040,7 @@ int main(int argc, char **argv) - } + /* parses string buffer into a pid_t if it passes + * a few sanity checks; returns -1 on error */ + pid_t parsepid(const char *buf); +diff -up nut-2.8.0/server/upsd.c.rmpidf nut-2.8.0/server/upsd.c +--- nut-2.8.0/server/upsd.c.rmpidf 2022-04-23 13:56:07.000000000 +0200 ++++ nut-2.8.0/server/upsd.c 2022-05-09 17:22:34.330547269 +0200 +@@ -1515,6 +1515,7 @@ int main(int argc, char **argv) + ssl_cleanup(); upslogx(LOG_INFO, "Signal %d: exiting", exit_flag); + if (*pidfn) cleanpid(pidfn); diff --git a/nut-2.6.5-unreachable.patch b/nut-2.6.5-unreachable.patch index 3c9db41..4166e84 100644 --- a/nut-2.6.5-unreachable.patch +++ b/nut-2.6.5-unreachable.patch @@ -1,7 +1,7 @@ -diff -up nut-2.6.5/scripts/python/app/NUT-Monitor.unreachable nut-2.6.5/scripts/python/app/NUT-Monitor ---- nut-2.6.5/scripts/python/app/NUT-Monitor.unreachable 2012-07-31 19:38:56.000000000 +0200 -+++ nut-2.6.5/scripts/python/app/NUT-Monitor 2013-01-07 18:04:26.532531441 +0100 -@@ -674,6 +674,11 @@ class interface : +diff -up nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in.unreachable nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in +--- nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in.unreachable 2022-05-09 17:20:11.629621005 +0200 ++++ nut-2.8.0/scripts/python/app/NUT-Monitor-py3qt5.in 2022-05-09 17:20:52.674024537 +0200 +@@ -693,6 +693,11 @@ along with this program. If not, see "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF + # State file (e.g. upsd to driver) and pidfile location for NUT: +-d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - +-X @STATEPATH@/nut ++d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - - ++X @STATEPATH@ + EOF + AS_IF([test "$STATEPATH" != "$PIDPATH"], + [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF +-d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - +-X @PIDPATH@/nut ++d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - - ++X @PIDPATH@ + EOF]) + AS_IF([test -n "$ALTPIDPATH" && test "$STATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTPIDPATH"], + [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF +-d @ALTPIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - +-X @ALTPIDPATH@/nut ++d @ALTPIDPATH@ 0770 root @RUN_AS_GROUP@ - - ++X @ALTPIDPATH@ + EOF]) + AS_IF([test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"], + [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF +-d @ALTSTATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - +-X @ALTSTATEPATH@/nut ++d @ALTSTATEPATH@ 0770 root @RUN_AS_GROUP@ - - ++X @ALTSTATEPATH@ + EOF]) + ]) + AC_MSG_RESULT([done]) +diff -up nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in.piddir-owner nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in +--- nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in.piddir-owner 2022-04-26 18:06:27.000000000 -0400 ++++ nut-2.8.0/scripts/systemd/nut-common.tmpfiles.in 2022-11-30 13:30:11.651106256 -0500 +@@ -1,5 +1,5 @@ + # State file (e.g. upsd to driver) and pidfile location for NUT: +-d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - +-X @STATEPATH@/nut +-d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - +-X @PIDPATH@/nut ++d @STATEPATH@ 0770 root @RUN_AS_GROUP@ - - ++X @STATEPATH@ ++d @PIDPATH@ 0770 root @RUN_AS_GROUP@ - - ++X @PIDPATH@ diff --git a/nut-c99-ax_c_printf_null.patch b/nut-c99-ax_c_printf_null.patch new file mode 100644 index 0000000..9db80b0 --- /dev/null +++ b/nut-c99-ax_c_printf_null.patch @@ -0,0 +1,60 @@ +Fix several issues with the AX_C_PRINTF_STRING_NULL check: + +Adjust quoting in the AX_C_PRINTF_STRING_NULL definition. Switch to +strstr from strcasestr (a GNU extension, requires -D_GNU_SOURCE) +and include instead of . Add missing braces +and parentheses. Use double-quote for string literals. + +Submitted upstream: + +diff --git a/m4/ax_c_pragmas.m4 b/m4/ax_c_pragmas.m4 +index 53c1aebf8ea35a1e..14ecd596d3b36573 100644 +--- a/m4/ax_c_pragmas.m4 ++++ b/m4/ax_c_pragmas.m4 +@@ -943,32 +943,32 @@ if test -z "${nut_have_ax_c_printf_string_null_seen}"; then + dnl ### To be sure, bolt the language + AC_LANG_PUSH([C]) + +- AC_CACHE_CHECK([for practical support to pritnf("%s", NULL)], ++ AC_CACHE_CHECK([for practical support to printf("%s", NULL)], + [ax_cv__printf_string_null], + [AX_RUN_OR_LINK_IFELSE( + [AC_LANG_PROGRAM([dnl + #include +-#include +-], [dnl ++#include ++], [[ + char buf[128]; + char *s = NULL; + int res = snprintf(buf, sizeof(buf), "%s", s); + buf[sizeof(buf)-1] = '\0'; + if (res < 0) { +- printf(stderr, "FAILED to snprintf() a NULL string argument"); +- exit 1; ++ fprintf(stderr, "FAILED to snprintf() a NULL string argument\n"); ++ return 1; + } +-if (buf[0] == '\0') +- printf(stderr, "RETURNED empty string from snprintf() with a NULL string argument"); +- exit 0; ++if (buf[0] == '\0') { ++ fprintf(stderr, "RETURNED empty string from snprintf() with a NULL string argument\n"); ++ return 0; + } +-if (strcasestr(buf, 'null') == NULL) +- printf(stderr, "RETURNED some string from snprintf() with a NULL string argument: '%s'", buf); +- exit 0; ++if (strstr(buf, "null") == NULL) { ++ fprintf(stderr, "RETURNED some string from snprintf() with a NULL string argument: '%s'\n", buf); ++ return 0; + } +-printf(stderr, "SUCCESS: RETURNED a string that contains something like 'null' from snprintf() with a NULL string argument: '%s'", buf); +-exit 0; +- ])], ++fprintf(stderr, "SUCCESS: RETURNED a string that contains something like 'null' from snprintf() with a NULL string argument: '%s'\n", buf); ++return 0; ++ ]])], + [ax_cv__printf_string_null=yes], + [ax_cv__printf_string_null=no] + )] diff --git a/nut-c99-c_attribute.patch b/nut-c99-c_attribute.patch new file mode 100644 index 0000000..aff6495 --- /dev/null +++ b/nut-c99-c_attribute.patch @@ -0,0 +1,17 @@ +Call the defined foo function instead of the undeclared func function. + +Submitted upstream: + +diff --git a/m4/ax_c___attribute__.m4 b/m4/ax_c___attribute__.m4 +index 0e952e7841c35b60..780bc2bb14ac5a78 100644 +--- a/m4/ax_c___attribute__.m4 ++++ b/m4/ax_c___attribute__.m4 +@@ -67,7 +67,7 @@ AC_DEFUN([AX_C___ATTRIBUTE__], [ + foo(__attribute__ ((unused)) int i) { + return; + } +- ]], [func(1);])], ++ ]], [foo(1);])], + [ax_cv___attribute__unused_arg=yes], + [ax_cv___attribute__unused_arg=no] + ) diff --git a/nut-c99-strdup.patch b/nut-c99-strdup.patch new file mode 100644 index 0000000..90c83db --- /dev/null +++ b/nut-c99-strdup.patch @@ -0,0 +1,17 @@ +Fix strdup configure test: Remove a call to the undeclared free +function. + +Submitted upstream: + +diff --git a/configure.ac b/configure.ac +index 3aa26c24ebc99bb6..c93ccd1e494874d5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -294,7 +294,6 @@ AC_CACHE_CHECK([for strdup(s)], + char *t = "Test"; + char *s = strdup(t); + if (!s || !(s[0]=='T'&&s[1]=='e'&&s[2]=='s'&&s[3]=='t'&&s[4]=='\0') || s == t) res = 1; +-if (s) free (s); + if (res != 0) return res + /* autoconf adds ";return 0;" */ + ]])], diff --git a/nut-client.tmpfiles b/nut-client.tmpfiles index 56f12eb..c91e2eb 100644 --- a/nut-client.tmpfiles +++ b/nut-client.tmpfiles @@ -1 +1 @@ -D /var/run/nut 0750 nut nut - +D /run/nut 0750 nut nut - diff --git a/nut.spec b/nut.spec index 1a04979..25e8112 100644 --- a/nut.spec +++ b/nut.spec @@ -1,49 +1,55 @@ +%global _hardened_build 1 +#global with_python2 0 +%bcond_with python2 + #TODO: split nut-client so it does not require python %global nut_uid 57 %global nut_gid 57 %global cgidir /var/www/nut-cgi-bin -%global piddir /var/run/nut -%global modeldir /sbin - -%if ! (0%{?fedora} > 12 || 0%{?rhel} > 6) -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} -%endif +%global piddir /run/nut +%global modeldir /usr/sbin +# powerman is retired on Fedora, therefore disable it by default +%bcond_with powerman Summary: Network UPS Tools Name: nut -Version: 2.6.5 -Release: 11%{?dist} -Group: Applications/System +Version: 2.8.0 +Release: 2%{?dist} License: GPLv2+ and GPLv3+ -Url: http://www.networkupstools.org/ -Source: http://www.networkupstools.org/source/2.6/%{name}-%{version}.tar.gz -Source3: nut-client.tmpfiles +Url: https://www.networkupstools.org/ +Source: https://www.networkupstools.org/source/2.8/%{name}-%{version}.tar.gz Source4: libs.sh Patch1: nut-2.6.3-tmpfiles.patch +Patch2: nut-2.8.0-piddir-owner.patch #quick fix. TODO: fix it properly -Patch3: nut-2.6.5-quickfix.patch -Patch4: nut-2.6.5-ipmifix.patch -Patch5: nut-2.6.5-dlfix.patch -Patch6: nut-2.6.5-pthreadfix.patch -Patch7: nut-2.6.5-foreground.patch Patch8: nut-2.6.5-unreachable.patch Patch9: nut-2.6.5-rmpidf.patch +Patch13: nut-c99-c_attribute.patch +Patch14: nut-c99-ax_c_printf_null.patch +Patch15: nut-c99-strdup.patch -Requires(pre): shadow-utils udev -Requires(post): fileutils chkconfig systemd-units -Requires(preun): systemd-units -Requires(postun): fileutils chkconfig systemd-units +Requires(pre): shadow-utils +Requires(post): coreutils systemd +Requires(preun): systemd +Requires(postun): coreutils systemd Obsoletes: nut-hal < 2.6.0-7 +BuildRequires: make BuildRequires: autoconf BuildRequires: automake +BuildRequires: augeas-libs BuildRequires: avahi-devel +BuildRequires: cppunit-devel BuildRequires: dbus-glib-devel +BuildRequires: desktop-file-utils BuildRequires: elfutils-devel BuildRequires: fontconfig-devel +BuildRequires: freeipmi-devel BuildRequires: freetype-devel +BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: gd-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel @@ -54,12 +60,16 @@ BuildRequires: libXpm-devel BuildRequires: neon-devel BuildRequires: net-snmp-devel BuildRequires: netpbm-devel +BuildRequires: nss-devel BuildRequires: openssl-devel BuildRequires: pkgconfig +%if %{with powerman} BuildRequires: powerman-devel -BuildRequires: python-devel -BuildRequires: desktop-file-utils -BuildRequires: freeipmi-devel +%endif +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: /usr/bin/pathfix.py +#BuildRequires: systemd-rpm-macros %ifnarch s390 s390x BuildRequires: libusb-devel @@ -67,6 +77,8 @@ BuildRequires: libusb-devel ExcludeArch: s390 s390x +%global restart_flag %{piddir}/%{name}-restart-after-rpm-install + %description These programs are part of a developing project to monitor the assortment of UPSes that are found out there in the field. Many models have serial @@ -75,12 +87,14 @@ capability has been harnessed where possible to allow for safe shutdowns, live status tracking on web pages, and more. %package client -Group: Applications/System Summary: Network UPS Tools client monitoring utilities -Requires(post): chkconfig -Requires(preun): chkconfig -Requires(pre): shadow-utils udev +Requires(post): systemd +Requires(preun): systemd +Requires(pre): shadow-utils +%if %{with python2} +Requires: pygtk2, pygtk2-libglade #only for python and gui part +%endif #Requires: %description client @@ -89,17 +103,15 @@ ups that the client host has access to, but where the UPS is physically attached to a different computer on the network. %package cgi -Group: Applications/System Summary: CGI utilities for the Network UPS Tools Requires: %{name}-client = %{version}-%{release} webserver -Requires(pre): shadow-utils udev +Requires(pre): shadow-utils %description cgi This package includes CGI programs for accessing UPS status via a web browser. %package xml -Group: Applications/System Summary: XML UPS driver for the Network UPS Tools Requires: %{name}-client = %{version}-%{release} @@ -108,7 +120,6 @@ This package adds the netxml-ups driver, that allows NUT to monitor a XML capable UPS. %package devel -Group: Development/Libraries Summary: Development files for NUT Client Requires: %{name}-client = %{version}-%{release} webserver openssl-devel @@ -119,31 +130,40 @@ necessary to develop NUT client applications. %prep %setup -q %patch1 -p1 -b .tmpfiles -%patch3 -p1 -b .quickfix -%patch4 -p1 -b .ipmifix -%patch5 -p1 -b .dlfix -%patch6 -p1 -b .pthreadfix -%patch7 -p1 -b .foreground +%patch2 -p1 -b .piddir-owner %patch8 -p1 -b .unreachable %patch9 -p1 -b .rmpidf -sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor.desktop -sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 + +sed -i 's|=NUT-Monitor|=nut-monitor|' scripts/python/app/nut-monitor-py3qt5.desktop +sed -i "s|sys.argv\[0\]|'%{_datadir}/%{name}/nut-monitor/nut-monitor'|" scripts/python/app/NUT-Monitor-py3qt5.in sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient-config.in sed -i 's|LIBSSL_LDFLAGS|LIBSSL_LIBS|' lib/libupsclient.pc.in -#fix crlf end of lines -for f in docs/nut-qa.txt docs/website/css/ie-overrides.css docs/website/scripts/filter_png.js -do - sed -i 's/\r\n*$//' $f -done +# workaround for multilib conflicts - caused by patch changing modification time of scripts +find . -mtime -1 -print0 | xargs -0 touch --reference %{SOURCE0} %build autoreconf -i +export CXXFLAGS="-std=c++11 $RPM_OPT_FLAGS" +# prevent assignment of default value, it would break configure's tests +export LDFLAGS="-Wl,-z,now" %configure \ --with-all \ +%if %{without powerman} + --without-powerman \ +%endif --with-libltdl \ - --without-hal \ +%if (0%{?fedora} && 0%{?fedora} < 33) || 0%{?el8} + --with-nss \ +%endif + --without-wrap \ + --without-modbus \ + --without-linux-i2c \ --with-cgi \ + --with-python3 \ --datadir=%{_datadir}/%{name} \ --with-user=%{name} \ --with-group=dialout \ @@ -154,23 +174,21 @@ autoreconf -i --with-cgipath=%{cgidir} \ --with-drvpath=%{modeldir} \ --with-systemdsystemunitdir=%{_unitdir} \ + --with-systemdshutdowndir=/lib/systemd/system-shutdown \ --with-pkgconfig-dir=%{_libdir}/pkgconfig \ --disable-static \ - --with-udev-dir=/lib/udev \ + --with-udev-dir=%{_usr}/lib/udev \ --libdir=%{_libdir} -# --with-doc \ asciidoc >= 8.6.3 is required +# --with-doc # does not work in 2.7.1 sh %{SOURCE4} >>include/config.h #remove rpath sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -make %{?_smp_mflags} +%make_build LDFLAGS="%{__global_ldflags}" %install -rm -rf %{buildroot} - mkdir -p %{buildroot}%{modeldir} \ %{buildroot}%{_sysconfdir}/udev/rules.d \ %{buildroot}%{_sysconfdir}/ups \ @@ -178,19 +196,18 @@ mkdir -p %{buildroot}%{modeldir} \ %{buildroot}%{_localstatedir}/lib/ups \ %{buildroot}%{_libexecdir} -make install DESTDIR=%{buildroot} +%make_install -%if %{?fedora}0 > 140 || %{?rhel}0 > 60 - install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tmpfiles.d/nut-client.conf -%endif +mv %{buildroot}%{_tmpfilesdir}/nut-common.tmpfiles %{buildroot}%{_tmpfilesdir}/nut-common.conf rm -rf %{buildroot}%{_prefix}/html rm -f %{buildroot}%{_libdir}/*.la rm -rf docs/man +rm -rf %{buildroot}%{_datadir}/nut/solaris-init find docs/ -name 'Makefile*' -delete pushd conf; -make install DESTDIR=%{buildroot} +%make_install for file in %{buildroot}%{_sysconfdir}/ups/*.sample do mv $file %{buildroot}%{_sysconfdir}/ups/`basename $file .sample` @@ -198,8 +215,8 @@ done popd #fix collision with virtualbox -mv %{buildroot}/lib/udev/rules.d/52-nut-usbups.rules %{buildroot}/lib/udev/rules.d/62-nut-usbups.rules -mv %{buildroot}/lib/udev/rules.d/52-nut-ipmipsu.rules %{buildroot}/lib/udev/rules.d/62-nut-ipmipsu.rules +#mv %{buildroot}/%{_usr}/lib/udev/rules.d/52-nut-usbups.rules %{buildroot}/%{_usr}/lib/udev/rules.d/62-nut-usbups.rules +mv %{buildroot}/%{_usr}/lib/udev/rules.d/52-nut-ipmipsu.rules %{buildroot}/%{_usr}/lib/udev/rules.d/62-nut-ipmipsu.rules # fix encoding for fe in ./docs/cables/powerware.txt @@ -210,8 +227,9 @@ do done # install PyNUT -install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python_sitelib}/PyNUT.py +install -p -D -m 644 scripts/python/module/PyNUT.py %{buildroot}%{python3_sitelib}/PyNUT.py # install nut-monitor +%if %{with python2} mkdir -p %{buildroot}%{_datadir}/nut/nut-monitor/pixmaps install -p -m 755 scripts/python/app/NUT-Monitor %{buildroot}%{_datadir}/nut/nut-monitor/nut-monitor install -p -m 644 scripts/python/app/gui-1.3.glade %{buildroot}%{_datadir}/nut/nut-monitor @@ -219,15 +237,24 @@ install -p -m 644 scripts/python/app/pixmaps/* %{buildroot}%{_datadir}/nut/nut-m install -p -D scripts/python/app/nut-monitor.png %{buildroot}%{_datadir}/pixmaps/nut-monitor.png desktop-file-install --dir=%{buildroot}%{_datadir}/applications scripts/python/app/nut-monitor.desktop ln -s %{_datadir}/nut/nut-monitor/nut-monitor %{buildroot}%{_bindir}/nut-monitor +%endif %pre /usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \ -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : -/usr/sbin/usermod -G dialout %{name} +/usr/sbin/usermod -G dialout,tty %{name} + +# do not let upsmon run during upgrade rhbz#916472 +# phase 1: stop upsmon before upsd changes +if [ "$1" = "2" ]; then + rm -f %restart_flag + /bin/systemctl is-active nut-monitor.service >/dev/null 2>&1 && touch %restart_flag ||: + /bin/systemctl stop nut-monitor.service >/dev/null 2>&1 +fi + %post /sbin/ldconfig -udevadm control --reload ||: %systemd_post nut-driver.service nut-server.service %preun @@ -240,12 +267,12 @@ udevadm control --reload ||: %pre client /usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \ -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : -/usr/sbin/usermod -G dialout %{name} +/usr/sbin/usermod -G dialout,tty %{name} %pre cgi /usr/sbin/useradd -c "Network UPS Tools" -u %{nut_uid} \ -s /bin/false -r -d %{_localstatedir}/lib/ups %{name} 2> /dev/null || : -/usr/sbin/usermod -G dialout %{name} +/usr/sbin/usermod -G dialout,tty %{name} %post client /sbin/ldconfig @@ -258,47 +285,51 @@ udevadm control --reload ||: /sbin/ldconfig %systemd_postun_with_restart nut-monitor.service -%clean -rm -rf %{buildroot} +%posttrans +# phase 2: start upsmon again +if [ -e %restart_flag ]; then + /bin/systemctl restart nut-monitor.service >/dev/null 2>&1 || : + rm -f %restart_flag +else + # maybe we did not stop it - if we reinstalled just nut-client + /bin/systemctl try-restart nut-monitor.service >/dev/null 2>&1 || : +fi %files -%defattr(-,root,root,-) -%doc COPYING LICENSE-GPL2 LICENSE-GPL3 ChangeLog AUTHORS MAINTAINERS README docs UPGRADING INSTALL NEWS +%license COPYING LICENSE-GPL2 LICENSE-GPL3 +%doc ChangeLog AUTHORS MAINTAINERS README docs UPGRADING INSTALL NEWS %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/nut.conf %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/ups.conf %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.conf %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsd.users -%attr(644,root,root) /lib/udev/rules.d/62-nut-usbups.rules -%attr(644,root,root) /lib/udev/rules.d/62-nut-ipmipsu.rules +%attr(644,root,root) %{_usr}/lib/udev/rules.d/62-nut-usbups.rules +%attr(644,root,root) %{_usr}/lib/udev/rules.d/62-nut-ipmipsu.rules %{modeldir}/* %exclude %{modeldir}/netxml-ups -%{_unitdir}/nut-driver.service +%{_unitdir}/nut-driver-enumerator.path +%{_unitdir}/nut-driver-enumerator.service +%{_unitdir}/nut-driver@.service +%{_unitdir}/nut-driver.target %{_unitdir}/nut-server.service +%{_unitdir}/nut.target %{_sbindir}/upsd %{_bindir}/nut-scanner %{_bindir}/upslog %{_libdir}/libnutscan.so.* +%{_libexecdir}/nut-driver-enumerator.sh +%{_datadir}/augeas/lenses/dist/nut* %{_datadir}/%{name}/cmdvartab %{_datadir}/%{name}/driver.list -%{_mandir}/man3/nutscan_add_device_to_device.3.gz -%{_mandir}/man3/nutscan_add_option_to_device.3.gz -%{_mandir}/man3/nutscan_cidr_to_ip.3.gz -%{_mandir}/man3/nutscan_display_parsable.3.gz -%{_mandir}/man3/nutscan_display_ups_conf.3.gz -%{_mandir}/man3/nutscan_free_device.3.gz -%{_mandir}/man3/nutscan_new_device.3.gz -%{_mandir}/man3/nutscan_scan_avahi.3.gz -%{_mandir}/man3/nutscan_scan_ipmi.3.gz -%{_mandir}/man3/nutscan_scan_nut.3.gz -%{_mandir}/man3/nutscan_scan_snmp.3.gz -%{_mandir}/man3/nutscan_scan_usb.3.gz -%{_mandir}/man3/nutscan_scan_xml_http.3.gz %{_mandir}/man5/nut.conf.5.gz %{_mandir}/man5/ups.conf.5.gz %{_mandir}/man5/upsd.conf.5.gz %{_mandir}/man5/upsd.users.5.gz + + +%{_mandir}/man8/al175.8.gz %{_mandir}/man8/apcsmart.8.gz %{_mandir}/man8/apcsmart-old.8.gz +%{_mandir}/man8/apcupsd-ups.8.gz %{_mandir}/man8/bcmxcp.8* %{_mandir}/man8/bcmxcp_usb.8.gz %{_mandir}/man8/belkin.8.gz @@ -307,7 +338,8 @@ rm -rf %{buildroot} %{_mandir}/man8/bestfortress.8.gz %{_mandir}/man8/bestups.8.gz %{_mandir}/man8/bestuferrups.8.gz -%{_mandir}/man8/blazer.8.gz +%{_mandir}/man8/blazer_ser.8.gz +%{_mandir}/man8/blazer_usb.8.gz %{_mandir}/man8/clone.8.gz %{_mandir}/man8/dummy-ups.8.gz %{_mandir}/man8/everups.8.gz @@ -321,19 +353,28 @@ rm -rf %{buildroot} %{_mandir}/man8/masterguard.8.gz %{_mandir}/man8/metasys.8.gz %{_mandir}/man8/microdowell.8.gz +%{_mandir}/man8/microsol-apc.8.gz %{_mandir}/man8/mge-utalk.8.gz %{_mandir}/man8/mge-shut.8.gz %{_mandir}/man8/nutupsdrv.8.gz +%{_mandir}/man8/nutdrv_atcl_usb.8.gz +%{_mandir}/man8/nutdrv_siemens_sitop.8.gz +%{_mandir}/man8/nut-driver-enumerator.8.gz %{_mandir}/man8/nut-ipmipsu.8.gz %{_mandir}/man8/nut-recorder.8.gz %{_mandir}/man8/nut-scanner.8.gz +%{_mandir}/man8/nutdrv_qx.8.gz %{_mandir}/man8/oneac.8.gz %{_mandir}/man8/optiups.8.gz %{_mandir}/man8/powercom.8.gz +%if %{with powerman} %{_mandir}/man8/powerman-pdu.8.gz +%endif %{_mandir}/man8/powerpanel.8.gz %{_mandir}/man8/rhino.8.gz %{_mandir}/man8/richcomm_usb.8.gz +%{_mandir}/man8/riello_ser.8.gz +%{_mandir}/man8/riello_usb.8.gz %{_mandir}/man8/safenet.8.gz %{_mandir}/man8/snmp-ups.8.gz %{_mandir}/man8/solis.8* @@ -344,20 +385,19 @@ rm -rf %{buildroot} %{_mandir}/man8/upscode2.8* %{_mandir}/man8/upsd.8.gz %{_mandir}/man8/upsdrvctl.8.gz +%{_mandir}/man8/upsdrvsvcctl.8.gz %{_mandir}/man8/upslog.8.gz %{_mandir}/man8/usbhid-ups.8.gz %files client -%doc COPYING LICENSE-GPL2 LICENSE-GPL3 -%defattr(-,root,root) +%license COPYING LICENSE-GPL2 LICENSE-GPL3 %dir %{_sysconfdir}/ups %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upsmon.conf %config(noreplace) %attr(640,root,nut) %{_sysconfdir}/ups/upssched.conf -%if %{?fedora}0 > 140 || %{?rhel}0 > 60 - %config(noreplace) %{_sysconfdir}/tmpfiles.d/nut-client.conf -%endif +%{_tmpfilesdir}/nut-common.conf %dir %attr(750,nut,nut) %{_localstatedir}/lib/ups -%ghost %{piddir} +# upsmon.pid is written as root, so root needs access for now +%ghost %attr(770,root,nut) %{piddir} %{_bindir}/upsc %{_bindir}/upscmd %{_bindir}/upsrw @@ -367,6 +407,8 @@ rm -rf %{buildroot} %{_unitdir}/nut-monitor.service /lib/systemd/system-shutdown/nutshutdown %{_libdir}/libupsclient.so.* +%{_libdir}/libnutclient.so.* +%{_libdir}/libnutclientstub.so.* %{_mandir}/man5/upsmon.conf.5.gz %{_mandir}/man5/upssched.conf.5.gz %{_mandir}/man8/upsc.8.gz @@ -374,14 +416,17 @@ rm -rf %{buildroot} %{_mandir}/man8/upsrw.8.gz %{_mandir}/man8/upsmon.8.gz %{_mandir}/man8/upssched.8.gz -%{_bindir}/nut-monitor -%{python_sitelib}/PyNUT.* +#%%pycached %%{python3_sitelib}/PyNUT.py +# use glob list, as %%pycached does not work... +%{python3_sitelib}/* %{_datadir}/nut +%if %{with python2} +%{_bindir}/nut-monitor %{_datadir}/pixmaps/nut-monitor.png %{_datadir}/applications/nut-monitor.desktop +%endif %files cgi -%defattr(-,root,root,-) %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/hosts.conf %config(noreplace) %attr(600,nut,root) %{_sysconfdir}/ups/upsset.conf %config(noreplace) %attr(644,root,root) %{_sysconfdir}/ups/upsstats.html @@ -395,21 +440,84 @@ rm -rf %{buildroot} %{_mandir}/man8/upsset.cgi.8.gz %files xml -%defattr(-,root,root) %{modeldir}/netxml-ups %doc %{_mandir}/man8/netxml-ups.8.gz %files devel -%defattr(-,root,root,-) %{_includedir}/* %{_mandir}/man3/upscli* %{_mandir}/man3/nutscan* +%{_mandir}/man3/nutclient* +%{_mandir}/man3/libnutclient* %{_libdir}/libupsclient.so +%{_libdir}/libnutclient.so +%{_libdir}/libnutclientstub.so %{_libdir}/libnutscan.so %{_libdir}/pkgconfig/libupsclient.pc +%{_libdir}/pkgconfig/libnutclient.pc +%{_libdir}/pkgconfig/libnutclientstub.pc %{_libdir}/pkgconfig/libnutscan.pc %changelog +* Tue Dec 06 2022 Michal Hlavinka - 2.8.0-2 +- fix STATEPATH location and creation (#2024651) +- merged C99 related changes to configure from fedora +- trim changelog + +* Tue Sep 13 2022 Michal Hlavinka - 2.8.0-1 +- update to 2.8.0 + +* Tue Jun 02 2020 Michal Hlavinka - 2.7.4-3 +- update nut run directories + +* Tue May 26 2020 Orion Poplawski - 2.7.4-2 +- Drop old udev requires/scriptlet +- Add upstream patch for TLS > 1.0 support + +* Tue May 26 2020 Michal Hlavinka - 2.7.4-1 +- nut updated to 2.7.4 + +* Fri May 11 2018 Michal Hlavinka - 2.7.2-4 +- rebuilt with updated freeipmi + +* Mon Feb 23 2015 Michal Hlavinka - 2.7.2-3 +- nut driver needs tmpfiles.d too (#1187286) + +* Tue Aug 26 2014 Michal Hlavinka - 2.7.2-2 +- build without powerman as it is not available in epel7 + +* Tue Apr 22 2014 Michal Hlavinka - 2.7.2-1 +- nut updated to 2.7.2 + +* Thu Apr 17 2014 Michal Hlavinka - 2.7.1-4 +- fix multilib issue (#831429) + +* Thu Mar 06 2014 Michal Hlavinka - 2.7.1-3 +- fix path of nut-driver executable (#1072076) +- fix location of udev rules + +* Thu Mar 06 2014 Michal Hlavinka - 2.7.1-2 +- fix undefined references in libupsclient (#1071919) + +* Thu Feb 27 2014 Michal Hlavinka - 2.7.1-1 +- nut updated to 2.7.1 + +* Tue Sep 24 2013 Michal Hlavinka - 2.6.5-16 +- rebuilt with updated freeipmi (1.3.2) + +* Tue Sep 03 2013 Michal Hlavinka - 2.6.5-15 +- rebuilt with updated freeipmi + +* Sat Aug 03 2013 Fedora Release Engineering - 2.6.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jun 11 2013 Remi Collet - 2.6.5-13 +- rebuild for new GD 2.1.0 + +* Mon Apr 22 2013 Michal Hlavinka - 2.6.5-12 +- do not let upsmon run during update (#916472) +- make binaries hardened (#955157) + * Thu Feb 28 2013 Michal Hlavinka - 2.6.5-11 - clean pid file on exit (#916468) @@ -461,460 +569,3 @@ rm -rf %{buildroot} * Thu Jan 05 2012 Michal Hlavinka - 2.6.3-1 - nut updated to 2.6.3 - -* Tue Dec 06 2011 Adam Jackson - 2.6.2-2 -- Rebuild for new libpng - -* Fri Sep 16 2011 Michal Hlavinka - 2.6.2-1 -- nut updated to 2.6.2 - -* Tue Aug 16 2011 Michal Hlavinka - 2.6.1-4 -- update requirements of packages - -* Fri Jul 22 2011 Michal Hlavinka - 2.6.1-3 -- add initial support for systemd - -* Fri Jul 08 2011 Michal Hlavinka - 2.6.1-2 -- rebuilt for net-snmp update - -* Tue Jun 07 2011 Michal Hlavinka - 2.6.1-1 -- nut updated to 2.6.1 - -* Thu Apr 21 2011 Michal Hlavinka - 2.6.0-8 -- fix usb report reading (#698512) - -* Thu Apr 21 2011 Michal Hlavinka - 2.6.0-7 -- nut-hal should be obsoleted to prevent broken dependency in yum - -* Wed Apr 20 2011 Michal Hlavinka - 2.6.0-6 -- standard dependency adds udev, but we need it for %%pre script - -* Wed Apr 20 2011 Michal Hlavinka - 2.6.0-5 -- drop hal support, it was removed from rawhide - -* Mon Mar 28 2011 Michal Hlavinka - 2.6.0-4 -- fix list of ssl libraries in libupsclient.pc - -* Mon Feb 21 2011 Michal Hlavinka - 2.6.0-3 -- add nut-monitor (gui) to client sub-package - -* Tue Feb 08 2011 Fedora Release Engineering - 2.6.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Jan 17 2011 Michal Hlavinka - 2.6.0-1 -- nut updated to 2.6.0 -- fixed reading of reports bigger than 8 bytes - -* Fri Nov 26 2010 Michal Hlavinka - 2.4.3-9 -- use %%ghost for /var/run/nut (#656645) - -* Fri Nov 05 2010 Michal Hlavinka - 2.4.3-8 -- rebuild because libraries were updated - -* Wed Sep 29 2010 jkeating - 2.4.3-7 -- Rebuilt for gcc bug 634757 - -* Fri Sep 17 2010 Michal Hlavinka - 2.4.3-6 -- fix inconsitent name of upsdrvctl in init script (#633116) - -* Mon Jul 26 2010 Michal Hlavinka - 2.4.3-5 -- fix crash when port= is ommited (#616375) -- fix issue where nut fails to restart because it did not finished termination - yet and old instance blocks devices (#193058) - -* Fri Jul 07 2010 Michal Hlavinka - 2.4.3-4 -- follow licensing guideline update - -* Fri Mar 26 2010 Michal Hlavinka - 2.4.3-3 -- replace BUS with SUBSYSTEMS in udev rules (#573806) - -* Mon Mar 23 2010 Michal Hlavinka - 2.4.3-2 -- reduced size of buffer to maximum size supported by low-speed USB devices -- fixes #575334 - -* Wed Feb 24 2010 Michal Hlavinka - 2.4.3-1 -- cyberpower driver was replaced by the powerpanel driver -- general USB support has been vastly improved, including many bug - fixes, new features and devices -- the virtual driver has been renamed to 'clone' -- the UPower (previously known as DeviceKit-power) rules file is now - generated by NUT -- a lot of new devices supported - -* Thu Nov 05 2009 Michal Hlavinka - 2.4.1-9 -- spec cleanup - -* Fri Aug 21 2009 Tomas Mraz - 2.4.1-8 -- rebuilt with new openssl - -* Sat Jul 25 2009 Fedora Release Engineering - 2.4.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed May 20 2009 Michal Hlavinka - 2.4.1-6 -- fix coexistence with virtualbox (#488368) - -* Wed May 20 2009 Michal Hlavinka - 2.4.1-5 -- add requires for hal (#501687) - -* Fri Apr 17 2009 Michal Hlavinka - 2.4.1-4 -- change group even for existing nut user (#495999) - -* Tue Apr 14 2009 Michal Hlavinka - 2.4.1-3 -- udev changed group from uucp to dialout, follow the change (#494020) - -* Wed Feb 25 2009 Fedora Release Engineering - 2.4.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Tue Feb 17 2009 Michal Hlavinka 2.4.1-1 -- update to 2.4.1 -- added support for microdowell ups - -* Mon Feb 16 2009 Michal Hlavinka 2.4.0-1 -- update to new stable branch 2.4 - -* Sat Jan 17 2009 Tomas Mraz 2.2.2-6 -- rebuild with new openssl - -* Thu Dec 18 2008 Michal Hlavinka 2.2.2-5 -- remove rpath, fix libtool - -* Wed Dec 17 2008 Michal Hlavinka 2.2.2-4 -- fix #476850 - tripplite_usb driver segfaults when UPS on battery - -* Mon Sep 15 2008 Tomas Smetana 2.2.2-3 -- fix #461374 - add missing udev rules - -* Mon Aug 25 2008 Tomas Smetana 2.2.2-2 -- fix requirements in spec file -- build a separate hal package - -* Mon May 12 2008 Tomas Smetana 2.2.2-1 -- new upstream version - -* Tue Feb 12 2008 Tomas Smetana 2.2.1-3 -- fix compilation error with new glibc headers - -* Tue Feb 12 2008 Tomas Smetana 2.2.1-2 -- rebuild (gcc-4.3) - -* Wed Jan 09 2008 Tomas Smetana 2.2.1-1 -- new upstream version - -* Wed Dec 05 2007 Tomas Smetana 2.2.0-6.2 -- rebuild - -* Thu Nov 29 2007 Tomas Smetana 2.2.0-6.1 -- init script update, fix a typo - -* Wed Nov 28 2007 Tomas Smetana 2.2.0-6 -- fix forgotten bug in init script -- do not hardcode the uucp group in udev patch - -* Tue Nov 27 2007 Tomas Smetana 2.2.0-5 -- fix udev rules and hal information files -- fix init script - -* Wed Sep 19 2007 Tomas Smetana 2.2.0-4 -- fix manpages encodings -- run ldconfig after client (un)install -- fix HAL support - -* Thu Sep 06 2007 Tomas Smetana 2.2.0-3 -- fix wrong libssl flags in devel, fix devel package dependencies - -* Wed Aug 15 2007 Tomas Smetana 2.2.0-2 -- fix #249028 - usb udev rules -- update initscript and sysconfig file -- fix calls to open() for compatibility with the new glibc - -* Fri Jul 13 2007 Tomas Smetana 2.2.0-1.1 -- rebuild - -* Fri Jul 13 2007 Tomas Smetana 2.2.0-1 -- new upstream version (Resolves: #248074) -- initscripts update -- spec file cleanup - -* Mon May 07 2007 Arnaud Quette 2.1.0-1 -- update to 2.1.0 development tree -- HAL, ... - -* Mon Mar 26 2007 Than Ngo 2.0.5-3 -- cleanup - -* Tue Jan 23 2007 Karsten Hopp 2.0.5-2 -- rename fatal to fatal_with_errno in ipv6 patch -- fix filelist - -* Tue Jan 23 2007 Karsten Hopp 2.0.5-1 -- update to 2.0.5 - -* Wed Nov 29 2006 Karsten Hopp 2.0.4-2 -- rebuild with new net-snmp-libs -- disable nut-2.0.1-bad.patch, not required - -* Tue Nov 21 2006 Than Ngo - 2.0.4-1 -- add IPv6 support, thanks to Dan KopeƄek (#198394) - -* Wed Jul 12 2006 Jesse Keating - 2.0.3-2.1 -- rebuild - -* Tue May 16 2006 Than Ngo 2.0.3-2 -- fix #191914, BR fontconfig-devel for cgi - -* Mon Apr 24 2006 Than Ngo 2.0.3-1 -- update to 2.0.3 -- drop nut-2.0.2-buffer.patch, it's included in new upstream -- add udev rule #189674, #187105 - -* Fri Feb 10 2006 Jesse Keating - 2.0.2-6.2 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 2.0.2-6.1 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Tue Jan 03 2006 Radek Vokal 2.0.2-6 -- rebuilt against new libnetsnmp - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Wed Nov 23 2005 Than Ngo 2.0.2-5 -- fix for modular X - -* Wed Nov 09 2005 Than Ngo 2.0.2-4 -- rebuilt - -* Mon Nov 07 2005 Than Ngo 2.0.2-3 -- rebuilt - -* Thu Nov 03 2005 Than Ngo 2.0.2-2 -- rebuilt against new libnetsnmp - -* Wed Jul 20 2005 Than Ngo 2.0.2-1 -- fix compiler warnings #156027 -- fix pid issue #159450 -- fix wrong ownership and permissions #159449, #141123 -- update to 2.0.2 - -* Thu Mar 10 2005 Than Ngo 2.0.1-1 -- 2.0.1 -- fix uninit local variable, #131773 - -* Wed Dec 08 2004 Than Ngo 2.0.0-7 -- don't requires libusb-devel on s390/s390x -- add %%{release} in buildroot - -* Thu Nov 25 2004 Miloslav Trmac - 2.0.0-6 -- Convert newhidups.8 to UTF-8 - -* Tue Oct 05 2004 Than Ngo 2.0.0-5 -- more buildrequires -- don't build on s390/s390x - -* Thu Aug 26 2004 Nalin Dahyabhai 2.0.0-4 -- fix syntax error in -client postun scriptlet (#131040) - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Mon May 10 2004 Than Ngo 2.0.0-2 -- fixed permission problem, bug #122867 - -* Fri Apr 02 2004 Than Ngo 2.0.0-1 -- 2.0.0 - -* Sat Feb 14 2004 Than Ngo 1.4.1-3 -- add some missing drivers - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Wed Feb 11 2004 Than Ngo 1.4.1-1 -- 1.4.1 -- fixed permission problem (bug #115290) - -* Wed Sep 24 2003 Mike McLean 1.4.0-3 -- fixed 'nut' user problem with nut-cgi (bug#104872) - -* Mon Sep 15 2003 Than Ngo 1.4.0-2 -- added missing hidups driver (bug #104412) - -* Tue Sep 09 2003 Than Ngo 1.4.0-1 -- 1.4.0 -- fixed permission problem (bug #103023) -- fixed rpm file list (bug #90848) -- added support multiple drivers, thanks to Gilbert E. Detillieux (bug #79465) - -* Thu Jun 26 2003 Than Ngo 1.2.2-3 -- Add variable to ups sysconfig file for upsd (bug #97900) - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Wed May 7 2003 Than Ngo 1.2.2-1 -- 1.2.2 - -* Tue May 06 2003 Phil Knirsch 1.2.0-7 -- Bumped release and rebuilt because of new gd version. - -* Thu Feb 13 2003 Than Ngo 1.2.0-6 -- build with correct userid #84199 -- fix directory permission - -* Tue Feb 11 2003 Than Ngo 1.2.0-5 -- add user nut, bug #81500 -- fix permission issue, bug #81524, #83997 -- own /etc/ups, bug #73959 - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Wed Jan 8 2003 Thomas Woerner 1.2.0-3 -- added html templates for cgi scripts (#78532) -- added hidups driver (#80334) - -* Wed Dec 18 2002 Dan Walsh 1.2.0-2 -- Fix service description - -* Wed Nov 6 2002 han Ngo 1.2.0-1 -- update to 1.2.0 - -* Mon Nov 4 2002 Than Ngo 1.00-1 -- update to 1.00 - -* Wed Jul 31 2002 Than Ngo 0.45.4-5 -- Fixed wrong CMDSCRIPT (bug #69817) - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Sun Jun 02 2002 Than Ngo 0.45.4-3 -- fix forced shutdown (bug #65824, #60516) -- enable hidups driver -- add missing manages (bug #65188) - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Tue Feb 26 2002 Than Ngo 0.45.4-1 -- update to 0.45.4 - -* Wed Jan 09 2002 Tim Powers -- automated rebuild - -* Fri Dec 14 2001 Than Ngo 0.45.3-1 -- update to 0.45.2 -- fix bug #57417 - -* Mon Nov 27 2001 Than Ngo 0.45.2-1 -- update to 0.45.2 -- clean up some patch files for 0.45.2 - -* Tue Jul 24 2001 Than Ngo 0.45.0-3 -- fix build dependencies (bug #49858) - -* Fri Jul 6 2001 Than Ngo 0.45.0-2 -- rebuild - -* Wed Jun 13 2001 Than Ngo -- update to 0.45.0 -- add some patches from alane@geeksrus.net (bug #44361, #44363) - -* Sun Apr 22 2001 Than Ngo -- add all available UPS drivers (Bug #36937) - -* Fri Apr 13 2001 Than Ngo -- update to 0.44.3 (Bug #35255) - -* Fri Feb 9 2001 Than Ngo -- fixed typo (Bug #26535) - -* Tue Feb 6 2001 Trond Eivind Glomsrd -- Fix some of the i18n -- make it exit cleanly if not configured - -* Fri Jan 26 2001 Than Ngo -- initscript internationalisation - -* Thu Jan 11 2001 Than Ngo -- fixed init script error (bug #23525) - -* Sat Oct 21 2000 Than Ngo -- update to 0.44.1 - -* Tue Aug 01 2000 Than Ngo -- rebuilt with Michael changes - -* Mon Jul 31 2000 Michael Stefaniuc -- changed /etc/sysconfig/ups to adress the changes in 0.44.0 -- moved /etc/sysconfig/ups to the server package -- changed the initscript -- small config file patch - -* Fri Jul 28 2000 Than Ngo -- fixed initscripts so that condrestart doesn't return 1 when the test fails - -* Mon Jul 24 2000 Than Ngo -- nut CGIs is disable as default (Bug #14282) - -* Tue Jul 18 2000 Than Ngo -- update to 0.44.0 -- inits back to rc.d/init.d, using service to fire them up - -* Wed Jul 12 2000 Than Ngo -- fix initscript and specfile, it should work with 6.x and 7.x -- add --with-statepath and --sysconfdir to %%configure (thanks Michael) - -* Sat Jul 08 2000 Than Ngo -- add Prereq: /etc/init.d - -* Tue Jun 27 2000 Than Ngo -- don't prereq, only require initscripts - -* Mon Jun 26 2000 Than Ngo -- /etc/rc.d/init.d -> /etc/init.d -- prereq initscripts >= 5.20 - -* Fri Jun 16 2000 Bill Nottingham -- don't run by default - -* Mon Jun 12 2000 Preston Brown -- adopted for Winston. Use our new path macros. -- change nocgi pkg to a cgi pkg (inclusive rather than exclusive). -- new init script - -* Sat May 06 2000 (0.43.2-1) -- Updated Package to new release - -* Thu Jan 20 2000 (0.42.2-1) -- Updated package to new release -- Dropped bestups patch since that is fixed in 0.42.2 - -* Sat Dec 18 1999 (0.42.1-4) -- Package now uses chkconfig - -* Sat Dec 18 1999 (0.42.1-3) -- applied an improved patch to deal with the - bestups string length issue. - -* Sat Dec 11 1999 (0.42.1-1) -- fixed string length in bestups.c line 279. -- upgraded package to 0.42.1 from 0.42.0 - -* Mon Dec 6 1999 (0.42.0-8) -- added requirement of nut-client for nut. - -* Mon Dec 6 1999 (0.42.0-7) -- removed overlapping files between the nut and nut-client rpms - -* Mon Nov 23 1999 (0.42.0-6) -- stop ups before uninstalling - -* Mon Nov 23 1999 (0.42.0-5) -- build against gd 1.6.3 - -* Thu Nov 03 1999 (0.42.0-4) -- Initial build of nut (well almost). -- Removed chmod from the make file so that the package - does not have to be built as root..... diff --git a/sources b/sources index a333d82..3574636 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e6eac4fa04baff0d0a827d64efe81a7e nut-2.6.5.tar.gz +SHA512 (nut-2.8.0.tar.gz) = 3c413ae54088045a713eb80cf1bdda474f41bb3b67c7c0248aa7a0c4d441dce1ff42627a2735273d7e36892d1f2eeb895220cf28af63fec2fa0c7a267f82d577