Bug#1108479: unblock: nut/2.8.1-5

2025-07-06 Thread Laurent Bigonville

Le 5/07/25 à 15:41, Paul Gevers a écrit :

Control: tags -1 moreinfo

Hi Laurent,
On 29-06-2025 14:13, Laurent Bigonville wrote:

Please unblock package nut



src:nut isn't a key package and has passing autopkgtests, so it 
doesn't need any action from our side. Having said that, I do wonder...

Right, so only 12 days to go before it migrates



The patch only changes the file name of the libraty from lib.so to
lib.so.SONAME, so as long as the SONAME is not changing there is no
risks



So, how is this intended to work with transitions? Just rebuilding 
src:nut will not magically fix the patch.


Well plan here was a quick fix for Trixie (there are no transitions 
happening when a version is released, isn't it?)


For the next release, 2.8.3 (currently in experimental), includes an 
other fix, the build system capture the file name of the library at 
compilation time and then use that name to dynamically load at runtime.


So I guess it's "OK"?



Bug#1108479: unblock: nut/2.8.1-5

2025-07-05 Thread Paul Gevers

Control: tags -1 moreinfo

Hi Laurent,
On 29-06-2025 14:13, Laurent Bigonville wrote:

Please unblock package nut



src:nut isn't a key package and has passing autopkgtests, so it doesn't 
need any action from our side. Having said that, I do wonder...



The patch only changes the file name of the libraty from lib.so to
lib.so.SONAME, so as long as the SONAME is not changing there is no
risks



So, how is this intended to work with transitions? Just rebuilding 
src:nut will not magically fix the patch.


Paul



OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1108479: unblock: nut/2.8.1-5

2025-06-29 Thread Laurent Bigonville
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:nut
User: [email protected]
Usertags: unblock

Please unblock package nut

[ Reason ]
nut-scanner tool is currently not working properly as it dynamically
load some libraries and it only looks for the .so files installed by the
corresponding -dev packages and not the runtime ones.

[ Impact ]
nut-scanner is a tool to automatically detect the UPS installed on the
system or network. Without this tool the users need to write the
configration by hand. nut is not completely broken, but it's less
convinient for the user

[ Tests ]
I installed the runtime libraries without the corresponding -dev package
and the tool is able to load the library and is not complaining anymore

[ Risks ]
The patch only changes the file name of the libraty from lib.so to
lib.so.SONAME, so as long as the SONAME is not changing there is no
risks 

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
This fix will be limited to trixie and upstream has a different fix in
a new release. 


unblock nut/2.8.1-5
diff --git a/debian/changelog b/debian/changelog
index 5820897..f2db884 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+nut (2.8.1-5) unstable; urgency=medium
+
+  * d/p/fixsoname.patch: Fix name of the dynamicly loaded libraties in
+nut-scanner (Closes: #1070205)
+
+ -- Laurent Bigonville   Fri, 27 Jun 2025 23:04:07 +0200
+
 nut (2.8.1-4.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/patches/fixsoname.patch b/debian/patches/fixsoname.patch
new file mode 100644
index 000..ff32b00
--- /dev/null
+++ b/debian/patches/fixsoname.patch
@@ -0,0 +1,128 @@
+Description: Fix name of the dynamicly loaded libraties in nut-scanner
+ This is a temporary fix for Trixie, upstream implemented an other fix
+Author: Laurent Bigonville 
+Forwarded: not-needed
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070205
+
+--- a/tools/nut-scanner/nutscan-init.c
 b/tools/nut-scanner/nutscan-init.c
+@@ -159,9 +159,9 @@ void nutscan_init(void)
+ 
+ #ifdef WITH_USB
+  #if WITH_LIBUSB_1_0
+-  libname = get_libname("libusb-1.0" SOEXT);
++  libname = get_libname("libusb-1.0" ".so.0");
+  #else
+-  libname = get_libname("libusb-0.1" SOEXT);
++  libname = get_libname("libusb-0.1" ".so.4");
+   #ifdef WIN32
+   /* TODO: Detect DLL name at build time, or rename it at install time? */
+   /* libusb-compat built for mingw per NUT instructions */
+@@ -185,9 +185,9 @@ void nutscan_init(void)
+   "trying to load it with libtool default resolver",
+   __func__, "LibUSB");
+  #if WITH_LIBUSB_1_0
+-  nutscan_avail_usb = nutscan_load_usb_library("libusb-1.0" 
SOEXT);
++  nutscan_avail_usb = nutscan_load_usb_library("libusb-1.0" 
".so.0");
+  #else
+-  nutscan_avail_usb = nutscan_load_usb_library("libusb-0.1" 
SOEXT);
++  nutscan_avail_usb = nutscan_load_usb_library("libusb-0.1" 
".so.4");
+   #ifdef WIN32
+   if (!nutscan_avail_usb) {
+   nutscan_avail_usb = 
nutscan_load_usb_library("libusb-0-1-4" SOEXT);
+@@ -206,7 +206,7 @@ void nutscan_init(void)
+ #endif/* WITH_USB */
+ 
+ #ifdef WITH_SNMP
+-  libname = get_libname("libnetsnmp" SOEXT);
++  libname = get_libname("libnetsnmp" ".so.40");
+  #ifdef WIN32
+   if (!libname) {
+   libname = get_libname("libnetsnmp-40" SOEXT);
+@@ -222,7 +222,7 @@ void nutscan_init(void)
+   upsdebugx(1, "%s: get_libname() did not resolve libname for %s, 
"
+   "trying to load it with libtool default resolver",
+   __func__, "LibSNMP");
+-  nutscan_avail_snmp = nutscan_load_snmp_library("libnetsnmp" 
SOEXT);
++  nutscan_avail_snmp = nutscan_load_snmp_library("libnetsnmp" 
".so.40");
+ #ifdef WIN32
+   if (!nutscan_avail_snmp) {
+   nutscan_avail_snmp = 
nutscan_load_snmp_library("libnetsnmp-40" SOEXT);
+@@ -237,9 +237,9 @@ void nutscan_init(void)
+ #endif/* WITH_SNMP */
+ 
+ #ifdef WITH_NEON
+-  libname = get_libname("libneon" SOEXT);
++  libname = get_libname("libneon" ".so.27");
+   if (!libname) {
+-  libname = get_libname("libneon-gnutls" SOEXT);
++  libname = get_libname("libneon-gnutls" ".so.27");
+   }
+  #ifdef WIN32
+   if (!libname) {
+@@ -259,9 +259,9 @@ void nutscan_init(void)
+   upsdebugx(1, "%s: get_libname() did not resolve libname for %s, 
"
+   "trying to load it with libtool default resolver",
+   __func__, "LibNeon");
+-  nutscan_avail_xml_http = nutscan_load_neon_library("libneon" 
SOEXT);
++