Date: Thu, 22 Oct 2020 05:29:37 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r552928 - in head/sysutils/nut-devel: . files Message-ID: <202010220529.09M5Tbfn089981@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Thu Oct 22 05:29:37 2020 New Revision: 552928 URL: https://svnweb.freebsd.org/changeset/ports/552928 Log: Revert upstream 73c8644. It results in a usbhid-ups bus fault. Upstream issue: https://github.com/networkupstools/nut/issues/835 Added: head/sysutils/nut-devel/files/patch-drivers_main.c (contents, props changed) Modified: head/sysutils/nut-devel/Makefile (contents, props changed) Modified: head/sysutils/nut-devel/Makefile ============================================================================== --- head/sysutils/nut-devel/Makefile Thu Oct 22 05:23:36 2020 (r552927) +++ head/sysutils/nut-devel/Makefile Thu Oct 22 05:29:37 2020 (r552928) @@ -3,6 +3,7 @@ PORTNAME= nut PORTVERSION= ${NUT_COMMIT_DATE} +PORTREVISION= 1 CATEGORIES= sysutils PKGNAMESUFFIX= -devel # MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/ Added: head/sysutils/nut-devel/files/patch-drivers_main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/nut-devel/files/patch-drivers_main.c Thu Oct 22 05:29:37 2020 (r552928) @@ -0,0 +1,44 @@ +diff --git drivers/main.c drivers/main.c +old mode 100755 +new mode 100644 +index f53322e2..0b6759dd +--- drivers/main.c ++++ drivers/main.c +@@ -607,9 +607,9 @@ int main(int argc, char **argv) + + become_user(new_uid); + +- /* Only switch to statepath if we're not powering off or just dumping data, for discovery */ ++ /* Only switch to statepath if we're not powering off */ + /* This avoid case where ie /var is umounted */ +- if ((!do_forceshutdown) && (dump_data < 0) && (chdir(dflt_statepath()))) ++ if ((!do_forceshutdown) && (chdir(dflt_statepath()))) + fatal_with_errno(EXIT_FAILURE, "Can't chdir to %s", dflt_statepath()); + + /* Setup signals to communicate with driver once backgrounded. */ +@@ -642,11 +642,8 @@ int main(int argc, char **argv) + sleep(5); + } + +- /* Only write pid if we're not just dumping data, for discovery */ +- if (dump_data < 0) { +- pidfn = xstrdup(buffer); +- writepid(pidfn); /* before backgrounding */ +- } ++ pidfn = xstrdup(buffer); ++ writepid(pidfn); /* before backgrounding */ + } + + /* clear out callback handler data */ +@@ -701,10 +698,7 @@ int main(int argc, char **argv) + } + + /* now we can start servicing requests */ +- /* Only write pid if we're not just dumping data, for discovery */ +- if (dump_data < 0) { +- dstate_init(progname, upsname); +- } ++ dstate_init(progname, upsname); + + /* The poll_interval may have been changed from the default */ + dstate_setinfo("driver.parameter.pollinterval", "%d", poll_interval);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010220529.09M5Tbfn089981>