From owner-svn-ports-head@freebsd.org Thu Oct 22 05:29:38 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D97E43E6C5; Thu, 22 Oct 2020 05:29:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CGwsY6bKcz4Mjg; Thu, 22 Oct 2020 05:29:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C18E011AFE; Thu, 22 Oct 2020 05:29:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09M5TbWn089982; Thu, 22 Oct 2020 05:29:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09M5Tbfn089981; Thu, 22 Oct 2020 05:29:37 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202010220529.09M5Tbfn089981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 22 Oct 2020 05:29:37 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/sysutils/nut-devel: . files X-SVN-Commit-Revision: 552928 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2020 05:29:38 -0000 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);