Compare commits

...
Sign in to create a new pull request.

11 commits

Author SHA1 Message Date
Michal Hlavinka
393aac65a2 fix STATEPATH location and creation (#2024651)
merged C99 related changes to configure from fedora
trim changelog
2022-12-12 23:23:52 +01:00
Michal Hlavinka
0c577010f8 update nut run directories 2020-06-02 19:25:24 +02:00
Orion Poplawski
a95181eec4 Drop old udev requires/scriptlet
Add upstream patch for TLS > 1.0 support
Cleanup spec

Conflicts:
	nut.spec
2020-05-27 17:36:46 -06:00
Michal Hlavinka
e51245f2b5 update sources 2020-05-26 13:28:56 +02:00
Michal Hlavinka
8b3ec16975 nut updated to 2.7.4 2020-05-26 13:22:19 +02:00
Michal Hlavinka
f1e0af4219 rebuilt with updated freeipmi 2018-05-11 14:46:40 +02:00
Michal Hlavinka
412da63740 nut driver needs tmpfiles.d too (#1187286) 2015-02-23 17:49:07 +01:00
Michal Hlavinka
097541dc32 build without powerman as it is not available in epel7 2014-08-27 09:52:57 +02:00
Michal Hlavinka
b7ef114c39 nut updated to 2.7.2 2014-08-20 16:28:16 +02:00
Michal Hlavinka
26e358b744 fix multilib issue (#831429) 2014-04-17 09:47:25 +02:00
Michal Hlavinka
dee53bd723 do not let upsmon run during update (#916472)
- make binaries hardened (#955157)
2013-04-22 17:58:52 +02:00
18 changed files with 421 additions and 1081 deletions

4
.gitignore vendored
View file

@ -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

View file

@ -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
# ============================================================================
#

View file

@ -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]);

View file

@ -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

View file

@ -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 <ltdl.h>
/* 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 <ltdl.h>
/* 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 <ltdl.h>
/* 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 <ltdl.h>
/* 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;

View file

@ -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 <dir> chroots to <dir>\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 {

View file

@ -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,

View file

@ -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 */

View file

@ -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

View file

@ -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 - <name> 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);

View file

@ -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 <h
self.gui_status_notification( _("Device '%s' not found on server") % self.__current_ups, "warning.png" )
return
@ -13,10 +13,10 @@ diff -up nut-2.6.5/scripts/python/app/NUT-Monitor.unreachable nut-2.6.5/scripts/
self.__connected = True
self.__widgets["ups_connect"].hide()
self.__widgets["ups_disconnect"].show()
diff -up nut-2.6.5/scripts/python/module/PyNUT.py.unreachable nut-2.6.5/scripts/python/module/PyNUT.py
--- nut-2.6.5/scripts/python/module/PyNUT.py.unreachable 2012-07-31 19:38:56.000000000 +0200
+++ nut-2.6.5/scripts/python/module/PyNUT.py 2013-01-07 17:41:26.548440712 +0100
@@ -158,6 +158,20 @@ available vars.
diff -up nut-2.8.0/scripts/python/module/PyNUT.py.in.unreachable nut-2.8.0/scripts/python/module/PyNUT.py.in
--- nut-2.8.0/scripts/python/module/PyNUT.py.in.unreachable 2022-05-09 17:20:32.100323526 +0200
+++ nut-2.8.0/scripts/python/module/PyNUT.py.in 2022-05-09 17:21:35.505402117 +0200
@@ -170,6 +170,21 @@ available vars.
return( ups_vars )
@ -33,6 +33,7 @@ diff -up nut-2.6.5/scripts/python/module/PyNUT.py.unreachable nut-2.6.5/scripts/
+
+ self.__srv_handler.read_until( "END LIST CMD %s\n" % ups )
+ return True
+
+
def GetUPSCommands( self, ups="" ) :
""" Get all available commands for the specified UPS

View file

@ -0,0 +1,48 @@
diff -up nut-2.8.0/configure.ac.piddir-owner nut-2.8.0/configure.ac
--- nut-2.8.0/configure.ac.piddir-owner 2022-04-26 18:03:36.000000000 -0400
+++ nut-2.8.0/configure.ac 2022-11-30 13:29:58.418038393 -0500
@@ -2833,23 +2833,23 @@ AS_IF([test -n "$systemdtmpfilesdir"],
[mkdir -p "${TOP_BUILDDIR}"/scripts/systemd
cat > "${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@

View file

@ -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 <string.h> instead of <strings.h>. Add missing braces
and parentheses. Use double-quote for string literals.
Submitted upstream: <https://github.com/networkupstools/nut/pull/1720>
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 <stdio.h>
-#include <strings.h>
-], [dnl
+#include <string.h>
+], [[
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]
)]

17
nut-c99-c_attribute.patch Normal file
View file

@ -0,0 +1,17 @@
Call the defined foo function instead of the undeclared func function.
Submitted upstream: <https://github.com/networkupstools/nut/pull/1720>
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]
)

17
nut-c99-strdup.patch Normal file
View file

@ -0,0 +1,17 @@
Fix strdup configure test: Remove a call to the undeclared free
function.
Submitted upstream: <https://github.com/networkupstools/nut/pull/1720>
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;" */
]])],

View file

@ -1 +1 @@
D /var/run/nut 0750 nut nut -
D /run/nut 0750 nut nut -

755
nut.spec

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
e6eac4fa04baff0d0a827d64efe81a7e nut-2.6.5.tar.gz
SHA512 (nut-2.8.0.tar.gz) = 3c413ae54088045a713eb80cf1bdda474f41bb3b67c7c0248aa7a0c4d441dce1ff42627a2735273d7e36892d1f2eeb895220cf28af63fec2fa0c7a267f82d577