Summary: | sysutils/nut upgrade fails when /usr/local/etc/syslog.d/nut does not exist | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | ddrinnon | ||||||||
Component: | Individual Port(s) | Assignee: | Cy Schubert <cy> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | CC: | alexander.gubar, dvl | ||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(cy) |
||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Description
ddrinnon
2019-10-13 19:34:21 UTC
Are you building from port or installing the binary package via pkg? (In reply to Cy Schubert from comment #1) I am building from the port with Poudriere. uname -a: FreeBSD nas01.cdor.net 11.3-RELEASE-p3 FreeBSD 11.3-RELEASE-p3 #0: Mon Aug 19 21:08:43 UTC 2019 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 pkg info nut: nut-2.7.4_13 Name : nut Version : 2.7.4_13 Installed on : Sun Oct 13 12:49:11 2019 MST Origin : sysutils/nut Architecture : FreeBSD:11:amd64 Prefix : /usr/local Categories : sysutils Licenses : Maintainer : cy@FreeBSD.org WWW : http://www.networkupstools.org/ Comment : Network UPS Tools Options : AVAHI : off BASH : off CGI : on DOCS : on FREEIPMI : off IPMIPSU : off IPMI_OFF : on NEON : on NSS : off OPENSSL : off PDU : off SERIAL : on SNMP : on SSL_OFF : on USB : on Shared Libs required: libgd.so.6 libpkg.so.4 libneon.so.27 libnetsnmp.so.30 Shared Libs provided: libnutclient.so.0 libupsclient.so.4 Annotations : FreeBSD_version: 1103000 repo_type : binary repository : head Flat size : 6.36MiB Description : This is a developing project to monitor a large assortment of UPS hardware. Network communications are used so that multiple systems can monitor a single physical UPS and shut down together if necessary without any special "sharing hardware" on the UPS itself. CGI scripts are provided to monitor UPS status via a WEB browser. WWW: http://www.networkupstools.org/ *** Bug 249062 has been marked as a duplicate of this bug. *** Created attachment 218014 [details]
Try this patch in you poudriere
Give this patch a spin, please.
Cy - I tried the patch and it didn't work - the /usr/local/etc/syslog.d directory did not get created. I will attach my patched sysutils/nut/Makefile and below is the output of the pkg upgrade on my nut server: [root@aux01 /usr/local/etc]# pkg upgrade Updating head repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.txz: 100% 384 KiB 393.3kB/s 00:01 Processing entries: 100% head repository update completed. 1558 packages processed. All repositories are up to date. Checking for upgrades (2 candidates): 100% Processing candidates (2 candidates): 100% The following 1 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: nut: 2.7.4_14 -> 2.7.4_15 Number of packages to be upgraded: 1 1 MiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching nut-2.7.4_15.txz: 100% 1 MiB 1.2MB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Upgrading nut from 2.7.4_14 to 2.7.4_15... [1/1] Extracting nut-2.7.4_15: 100% You may need to manually remove /usr/local/etc/nut/nut.conf if it is no longer needed. You may need to manually remove /usr/local/etc/nut/ups.conf if it is no longer needed. You may need to manually remove /usr/local/etc/nut/upsd.conf if it is no longer needed. You may need to manually remove /usr/local/etc/nut/upsd.users if it is no longer needed. You may need to manually remove /usr/local/etc/nut/upsmon.conf if it is no longer needed. cp: /usr/local/etc/syslog.d/nut: No such file or directory pkg: POST-INSTALL script failed [root@aux01 /usr/local/etc]# ls syslog.d ls: syslog.d: No such file or directory [root@aux01 /usr/local/etc]# Created attachment 218015 [details]
my patched Makefile
I copied the patch to sysutils/nut/patch.txt and ran patch <patch.txt
Created attachment 218088 [details]
I used this at home to create /usr/local/etc/syslog.d
How about this patch? I'm using it at home, and it goes beyond what you need by also fixing file permissions, but it does create the directory.
Dan Langille's patch worked for me - it created /usr/local/etc/syslog.d/nut without any errors. That may be because of pkg-plist (In reply to Dan Langille from comment #7) Looks good. Can you commit it for me, please. nevermind, this needs to be fixed in nut-devel too. Committed to git tree. Will push later tonight. A commit references this bug: Author: cy Date: Thu Sep 24 00:54:59 UTC 2020 New revision: 549866 URL: https://svnweb.freebsd.org/changeset/ports/549866 Log: Create syslog.d subdir if it doesn't exist, allowing install/upgrade to complete. PR: 241234 Submitted by: dvl Reported by: dvl, ddrinnon@cdor.net Changes: head/sysutils/nut/Makefile head/sysutils/nut/pkg-plist head/sysutils/nut-devel/Makefile head/sysutils/nut-devel/pkg-plist A commit references this bug: Author: cy Date: Thu Sep 24 00:55:03 UTC 2020 New revision: 549867 URL: https://svnweb.freebsd.org/changeset/ports/549867 Log: Fix permissions. PR: 241234 Submitted by: dvl Changes: head/sysutils/nut/Makefile head/sysutils/nut/pkg-plist head/sysutils/nut-devel/Makefile head/sysutils/nut-devel/pkg-plist Thank you for fixing this! It's been bugging me for a while :) It's seems to be broken. HTTPD error log says: [Fri Sep 25 11:27:23.117124 2020] [cgi:error] [pid 72959] [client 10.x.x.x:61405] AH01215: upsstats: Can't open /usr/local/etc/nut/upsstats.html: Permission denied: /usr/local/www/apache24/cgi-bin/nut/upsstats.cgi, referer: http://10.x.x.y/nut/header.html Copy&Past from sample file doesn't help. This is not the same problem. Open a new PR. (In reply to Cy Schubert from comment #17) done https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249893 |