<div dir="auto">Thanks for the update.<div dir="auto"><br></div><div dir="auto">I'm currently away from a PC so can't dig into libusb nuances. Cursorily I remember discussions that FreeBSD at least had a different implementation or build of libusb, in particular for error handling (-1 or more nuanced IIRC). Not sure which side NetBSD picked.</div><div dir="auto"><br></div><div dir="auto">As for shells, historically Solaris/illumos had a system shell (at some point also statically linked and so self-sufficient) as the efficient standard interpreter and root recovery shell (but not too convenient, no cruft). Since /usr could and still can be a separate partition, dataset or an NFS mount, and /bin is nowadays a symlink to usr/bin, the system/root shell remained separate from interactive one(s) for users - the choice of which can vary with no impact to init scripts, service methods and other system tooling. So yes, /sbin/sh is the correct thing :)</div><div dir="auto"><br></div><div dir="auto">Jim</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 1, 2022, 15:05 Greg Troxel <<a href="mailto:gdt@lexort.com">gdt@lexort.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I am taking the tarball I built from rc1 and using it as if released in<br>
pkgsrc.  The great news is that it only took me about 15 minutes to<br>
update the package.<br>
<br>
I am getting one error:<br>
<br>
  => Checking for non-existent script interpreters in ups-nut-2.7.4.1<br>
  ERROR: [<a href="http://check-interpreter.mk" rel="noreferrer noreferrer" target="_blank">check-interpreter.mk</a>] The interpreter "/sbin/sh" of "/tmp/work/sysutils/ups-nut/work/.destdir/usr/pkg/share/nut/solaris-init/nut" does not exist.<br>
<br>
And I wonder:<br>
<br>
  Should the solaris-init file only be installed on Solaris?<br>
<br>
  Is /sbin/sh really right?  I've never heard of 1) sh in sbin or 2) a<br>
  system without /bin/sh as POSIX requires.<br>
<br>
I've appended my diff, trimmed to remove pkgsrc stuff not of interest.<br>
<br>
  - The PLIST diff is perhaps interesting, showing the files installed<br>
    by 2.7.4.1 and not installed by 2.7.4.<br>
<br>
  - It looks like drivers/hidparser.c has been rewritten so that the<br>
    previous BIGENDIAN branch that used "long" when it should perhaps be<br>
    fixed-width is no longer present, and this was fixed in<br>
    24293b3f6d0cd157ac76f4901e0b6732068b55d4<br>
    and thus it really is  correct for me to just drop the patch.<br>
<br>
  - We had a patch to change libusb_strerror to be >=0 instead of >0,<br>
    and I am not entirely sure why or what the correct semantics are.<br>
    Looking at libusb.h (focusing on libusb1), it seems 0 is<br>
    LIBUSB_SUCCESS, which isn't an error.  Is the idea that if you<br>
    called libusb_strerror with 0, that was wrong and hence should be<br>
    logged?  I am not really following the mapping from enum<br>
    libusb_error to this function.  Also the name is confusing as<br>
    strerror indicates a translation from errno to a string, and this<br>
    function takes both and does logging.<br>
<br>
And that's it, a wicked short list, as we say in Boston.<br>
<br>
I will try to actually run it when I can schedule a maintenance window.<br>
<br>
<br>
Index: PLIST<br>
===================================================================<br>
RCS file: /cvsroot/pkgsrc/sysutils/ups-nut/PLIST,v<br>
retrieving revision 1.28<br>
diff -u -p -r1.28 PLIST<br>
--- PLIST       13 Jul 2020 18:50:05 -0000      1.28<br>
+++ PLIST       1 Apr 2022 12:26:28 -0000<br>
@@ -6,14 +6,18 @@ bin/upsrw<br>
 bin/upssched-cmd<br>
 include/nut-scan.h<br>
 include/nutclient.h<br>
+include/nutclientmem.h<br>
 include/nutscan-device.h<br>
 include/nutscan-init.h<br>
 include/nutscan-ip.h<br>
+include/nutscan-serial.h<br>
 include/parseconf.h<br>
 include/upsclient.h<br>
 lib/<a href="http://libnutclient.la" rel="noreferrer noreferrer" target="_blank">libnutclient.la</a><br>
+lib/<a href="http://libnutclientstub.la" rel="noreferrer noreferrer" target="_blank">libnutclientstub.la</a><br>
 lib/<a href="http://libupsclient.la" rel="noreferrer noreferrer" target="_blank">libupsclient.la</a><br>
 lib/pkgconfig/libnutclient.pc<br>
+lib/pkgconfig/libnutclientstub.pc<br>
 lib/pkgconfig/libnutscan.pc<br>
 lib/pkgconfig/libupsclient.pc<br>
 libexec/nut/al175<br>
@@ -44,8 +48,9 @@ libexec/nut/metasys<br>
 libexec/nut/mge-shut<br>
 libexec/nut/mge-utalk<br>
 libexec/nut/microdowell<br>
+libexec/nut/microsol-apc<br>
 libexec/nut/nutdrv_qx<br>
-libexec/nut/oldmge-shut<br>
+libexec/nut/nutdrv_siemens-sitop<br>
 libexec/nut/oneac<br>
 libexec/nut/optiups<br>
 libexec/nut/powercom<br>
@@ -120,7 +125,9 @@ man/man3/upscli_init.3<br>
 man/man3/upscli_list_next.3<br>
 man/man3/upscli_list_start.3<br>
 man/man3/upscli_readline.3<br>
+man/man3/upscli_readline_timeout.3<br>
 man/man3/upscli_sendline.3<br>
+man/man3/upscli_sendline_timeout.3<br>
 man/man3/upscli_splitaddr.3<br>
 man/man3/upscli_splitname.3<br>
 man/man3/upscli_ssl.3<br>
@@ -160,9 +167,12 @@ man/man8/metasys.8<br>
 man/man8/mge-shut.8<br>
 man/man8/mge-utalk.8<br>
 man/man8/microdowell.8<br>
+man/man8/microsol-apc.8<br>
+man/man8/nut-driver-enumerator.8<br>
 man/man8/nut-recorder.8<br>
 man/man8/nut-scanner.8<br>
 man/man8/nutdrv_qx.8<br>
+man/man8/nutdrv_siemens_sitop.8<br>
 man/man8/nutupsdrv.8<br>
 man/man8/oneac.8<br>
 man/man8/optiups.8<br>
@@ -179,6 +189,7 @@ man/man8/upscmd.8<br>
 man/man8/upscode2.8<br>
 man/man8/upsd.8<br>
 man/man8/upsdrvctl.8<br>
+man/man8/upsdrvsvcctl.8<br>
 man/man8/upslog.8<br>
 man/man8/upsmon.8<br>
 man/man8/upsrw.8<br>
@@ -196,6 +207,7 @@ share/doc/nut/NEWS<br>
 share/doc/nut/README<br>
 share/doc/nut/UPGRADING<br>
 share/doc/nut/acknowledgements.txt<br>
+share/doc/nut/asciidoc.txt<br>
 share/doc/nut/cables.txt<br>
 share/doc/nut/cables/apc-rs500-serial.txt<br>
 share/doc/nut/cables/apc.txt<br>
@@ -205,9 +217,12 @@ share/doc/nut/cables/mgeups.txt<br>
 share/doc/nut/cables/powerware.txt<br>
 share/doc/nut/cables/repotec.txt<br>
 share/doc/nut/cables/sms.txt<br>
+share/doc/nut/ci-farm-lxc-setup.txt<br>
 share/doc/nut/config-notes.txt<br>
+share/doc/nut/config-prereqs.txt<br>
 share/doc/nut/configure.txt<br>
 share/doc/nut/contact-closure.txt<br>
+share/doc/nut/daisychain.txt<br>
 share/doc/nut/design.txt<br>
 share/doc/nut/developer-guide.txt<br>
 share/doc/nut/developers.txt<br>
@@ -230,6 +245,7 @@ share/doc/nut/security.txt<br>
 share/doc/nut/snmp-subdrivers.txt<br>
 share/doc/nut/snmp.txt<br>
 share/doc/nut/sock-protocol.txt<br>
+share/doc/nut/solaris-usb.txt<br>
 share/doc/nut/support.txt<br>
 share/doc/nut/user-manual.txt<br>
 share/examples/nut/nut.conf.sample<br>
@@ -240,5 +256,6 @@ share/examples/nut/upsmon.conf.sample<br>
 share/examples/nut/upssched.conf.sample<br>
 share/nut/cmdvartab<br>
 share/nut/driver.list<br>
+share/nut/solaris-init/nut<br>
 @pkgdir share/doc/nut/drivers<br>
 @pkgdir etc/nut<br>
Index: patches/patch-drivers_hidparser.c<br>
===================================================================<br>
RCS file: patches/patch-drivers_hidparser.c<br>
diff -N patches/patch-drivers_hidparser.c<br>
--- patches/patch-drivers_hidparser.c   10 Nov 2015 08:52:38 -0000      1.1<br>
+++ /dev/null   1 Jan 1970 00:00:00 -0000<br>
@@ -1,17 +0,0 @@<br>
-$NetBSD: patch-drivers_hidparser.c,v 1.1 2015/11/10 08:52:38 mrg Exp $<br>
-<br>
-work around horrible big-endian code that assumes "long" is 32 bits.<br>
-enables usb-nut-ups to work on sparc64.<br>
-<br>
-<br>
---- drivers/hidparser.c.orig   2012-07-31 10:38:59.000000000 -0700<br>
-+++ drivers/hidparser.c        2015-11-10 00:30:11.000000000 -0800<br>
-@@ -163,7 +163,7 @@<br>
- #if WORDS_BIGENDIAN<br>
-                       {<br>
-                               int     i;<br>
--                              unsigned long   valTmp = 0;<br>
-+                              unsigned valTmp = 0;<br>
- <br>
-                               for (i = 0; i < ItemSize[pParser->Item & SIZE_MASK]; i++) {<br>
-                                       memcpy(&valTmp, &pParser->ReportDesc[(pParser->Pos)+i], 1);<br>
Index: patches/patch-drivers_libusb0.c<br>
===================================================================<br>
RCS file: patches/patch-drivers_libusb0.c<br>
diff -N patches/patch-drivers_libusb0.c<br>
--- /dev/null   1 Jan 1970 00:00:00 -0000<br>
+++ patches/patch-drivers_libusb0.c     1 Apr 2022 12:26:28 -0000<br>
@@ -0,0 +1,12 @@<br>
+$NetBSD$<br>
+<br>
+--- drivers/libusb0.c.orig     2022-03-27 12:59:49.000000000 +0000<br>
++++ drivers/libusb0.c<br>
+@@ -532,6 +532,7 @@ static int libusb_open(usb_dev_handle **<br>
+  */<br>
+ static int libusb_strerror(const int ret, const char *desc)<br>
+ {<br>
++      /* \todo: Possibly change to >= */<br>
+       if (ret > 0) {<br>
+               return ret;<br>
+       }<br>
Index: patches/patch-drivers_libusb1.c<br>
===================================================================<br>
RCS file: patches/patch-drivers_libusb1.c<br>
diff -N patches/patch-drivers_libusb1.c<br>
--- /dev/null   1 Jan 1970 00:00:00 -0000<br>
+++ patches/patch-drivers_libusb1.c     1 Apr 2022 12:26:28 -0000<br>
@@ -0,0 +1,12 @@<br>
+$NetBSD$<br>
+<br>
+--- drivers/libusb1.c.orig     2022-03-27 12:59:49.000000000 +0000<br>
++++ drivers/libusb1.c<br>
+@@ -599,6 +599,7 @@ static int nut_libusb_open(libusb_device<br>
+  */<br>
+ static int nut_libusb_strerror(const int ret, const char *desc)<br>
+ {<br>
++      /* \todo: Possibly change to >= */<br>
+       if (ret > 0) {<br>
+               return ret;<br>
+       }<br>
<br>
<br>
<br>
_______________________________________________<br>
Nut-upsdev mailing list<br>
<a href="mailto:Nut-upsdev@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsdev@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev</a><br>
</blockquote></div>