Bug#1071363: snappy-tools: FTBFS: snappy.cpp:575:51: error: call of overloaded ‘Compress({anonymous}::fd_source*, {anonymous}::FILE_sink*)’ is ambiguous

2024-05-17 Thread наб
hrow_out_of_range_fmtPKcz@GLIBCXX_3.4.20
@@ -71,0 +80 @@
+V _ZTIN6snappy17SnappyIOVecReaderE
@@ -75,0 +85 @@
+V _ZTSN6snappy17SnappyIOVecReaderE
@@ -79,0 +90 @@
+V _ZTVN6snappy17SnappyIOVecReaderE
@@ -87,0 +99,5 @@
+W _ZN6snappy17SnappyIOVecReader4PeekEPm
+W _ZN6snappy17SnappyIOVecReader4SkipEm
+W _ZN6snappy17SnappyIOVecReaderD0Ev
+W _ZN6snappy17SnappyIOVecReaderD1Ev
+W _ZN6snappy17SnappyIOVecReaderD2Ev
@@ -96,0 +113 @@
+W _ZNK6snappy17SnappyIOVecReader9AvailableEv

I have tested this briefly and it works with snappy-tools built for
snappy 1.1.9 (bookworm), and src:snappy-tools builds against it.
Maybe a migration is unnecessary?

Best,
Description: release 1.2.0 added CompressionOptions without backward compatibilty
 Add API calls without CompressionOptions which calls the new functions with
 empty options.
Author: наб 
Bug-Debian: https://bugs.debian.org/1070217
Forwarded: no
Last-Update: 2024-05-18

--- snappy-1.2.0.orig/snappy.cc
+++ snappy-1.2.0/snappy.cc
@@ -1792,6 +1792,10 @@ bool GetUncompressedLength(Source* sourc
   return decompressor.ReadUncompressedLength(result);
 }
 
+size_t Compress(Source* reader, Sink* writer) {
+  return Compress(reader, writer, {});
+}
+
 size_t Compress(Source* reader, Sink* writer, CompressionOptions options) {
   assert(options.level == 1 || options.level == 2);
   int token = 0;
@@ -2299,6 +2303,11 @@ bool IsValidCompressed(Source* compresse
 }
 
 void RawCompress(const char* input, size_t input_length, char* compressed,
+ size_t* compressed_length) {
+  RawCompress(input, input_length, compressed, compressed_length, {});
+}
+
+void RawCompress(const char* input, size_t input_length, char* compressed,
  size_t* compressed_length, CompressionOptions options) {
   ByteArraySource reader(input, input_length);
   UncheckedByteArraySink writer(compressed);
@@ -2309,6 +2318,11 @@ void RawCompress(const char* input, size
 }
 
 void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
+  char* compressed, size_t* compressed_length) {
+  return RawCompressFromIOVec(iov, uncompressed_length, compressed, compressed_length, {});
+}
+
+void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
   char* compressed, size_t* compressed_length,
   CompressionOptions options) {
   SnappyIOVecReader reader(iov, uncompressed_length);
@@ -2319,6 +2333,11 @@ void RawCompressFromIOVec(const struct i
   *compressed_length = writer.CurrentDestination() - compressed;
 }
 
+size_t Compress(const char* input, size_t input_length,
+std::string* compressed) {
+  return Compress(input, input_length, compressed, {});
+}
+
 size_t Compress(const char* input, size_t input_length, std::string* compressed,
 CompressionOptions options) {
   // Pre-grow the buffer to the max length of the compressed output
--- snappy-1.2.0.orig/snappy.h
+++ snappy-1.2.0/snappy.h
@@ -78,8 +78,9 @@ namespace snappy {
 
   // Compress the bytes read from "*reader" and append to "*writer". Return the
   // number of bytes written.
+  size_t Compress(Source* reader, Sink* writer);
   size_t Compress(Source* reader, Sink* writer,
-  CompressionOptions options = {});
+  CompressionOptions options);
 
   // Find the uncompressed length of the given stream, as given by the header.
   // Note that the true length could deviate from this; the stream could e.g.
@@ -99,7 +100,9 @@ namespace snappy {
   //
   // REQUIRES: "input[]" is not an alias of "*compressed".
   size_t Compress(const char* input, size_t input_length,
-  std::string* compressed, CompressionOptions options = {});
+  std::string* compressed);
+  size_t Compress(const char* input, size_t input_length,
+  std::string* compressed, CompressionOptions options);
 
   // Same as `Compress` above but taking an `iovec` array as input. Note that
   // this function preprocesses the inputs to compute the sum of
@@ -151,7 +154,9 @@ namespace snappy {
   //... Process(output, output_length) ...
   //delete [] output;
   void RawCompress(const char* input, size_t input_length, char* compressed,
-   size_t* compressed_length, CompressionOptions options = {});
+   size_t* compressed_length);
+  void RawCompress(const char* input, size_t input_length, char* compressed,
+   size_t* compressed_length, CompressionOptions options);
 
   // Same as `RawCompress` above but taking an `iovec` array as input. Note that
   // `uncompressed_length` is the total number of bytes to be read from the


signature.asc
Description: PGP signature


Bug#1065585: linux-headers-6.7.7-amd64: Depends: linux-compiler-gcc-13-x86 -> linux-image-6.7.7-amd64, gcc-13 => uninstallable on x32

2024-03-06 Thread наб
-image-$ver at all?
one wants to build for linux but not care for or want the image
(and i-t ) quite often.
but whatever.

The real kicker is, I think going by the unmet-dep list,
the gcc-13 dependency, with linux-headers-6.7.7-amd64:amd64
now trying to pull in gcc-13:amd64 for an unknown reason.

linux-headers-6.5.0-5-amd64:amd64 pulled in linux-compiler-gcc-13-x86:x32 ‒
  linux-compiler-gcc-13-x86/unstable 6.5.13-1 amd64
  linux-compiler-gcc-13-x86/unstable 6.5.13-1 i386
  linux-compiler-gcc-13-x86/now 6.5.13-1 x32 [installed,local]
  ii  linux-compiler-gcc-13-x86 6.5.13-1 x32  Compiler for Linux on 
x86 (meta-package)
  Package: linux-compiler-gcc-13-x86
  Version: 6.5.13-1
  Status: install ok installed
  Priority: optional
  Section: kernel
  Source: linux
  Maintainer: Debian Kernel Team 
  Installed-Size: 746 kB
  Depends: gcc-13
  Homepage: https://www.kernel.org/
  Download-Size: unknown
  APT-Manual-Installed: no
  APT-Sources: /var/lib/dpkg/status
  Description: Compiler for Linux on x86 (meta-package)
   This package depends on GCC of the appropriate version and architecture
   for Linux on amd64, i386 and x32.
‒ which correctly and expectedly pulled in gcc-13:x32.
Because this is an x32 host.

Please revert this change and pull in the correct compiler again.

Best,
наб

(One has to assume this would be a similar scenario on an i386 host using
 an amd64 kernel; this is rare in a.d. 2024 probably, but.)

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: amd64, i386

Kernel: Linux 6.5.0-3-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FORCED_MODULE, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled


signature.asc
Description: PGP signature


Bug#1057675: urlview: postinst uses /usr/share/doc content (Policy 12.3): /usr/share/doc/urlview/examples/sample.urlview

2023-12-06 Thread наб
Control: tags -1 + pending

On Thu, Dec 07, 2023 at 02:28:39AM +0100, Andreas Beckmann wrote:
> Package: urlview
> Version: 1b-1
> 
> a test with piuparts revealed that your package uses files from
> /usr/share/doc in its maintainer scripts which is a violation of
> Policy 12.3: "Packages must not require the existence of any files in
> /usr/share/doc/ in order to function."
> https://www.debian.org/doc/debian-policy/ch-docs.html#additional-documentation
> 
> These files must be moved to /usr/share/$PACKAGE and may be symlinked
> from /usr/share/doc/$PACKAGE.
Comparing 0.9-24 and 1b-1, I see that I started to use ucf with a
  /usr/share/urlview/examples/sample.urlview /etc/urlview/system.urlview
stanza. I'm gonna be frank: I don't know why, since this file is already
covered by the conffile mechanism. And, re-reading the conffile sexion,
  https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html
> Note that a package should not modify a dpkg-handled conffile in its
> maintainer scripts. Doing this will lead to dpkg giving the user
> confusing and possibly dangerous options for conffile update when the
> package is upgraded.
which is precisely what ucf does.

Thankfully, we're in a fortunate situation of there having only been one
urlview with ucf, and /e/u/s.u is installed (and conffile-tagged)
in both versions, so an upgrade-test shows we can drop it
with the normal conffile mechanism correctly handling the situation.

Fixed in
  
https://git.sr.ht/~nabijaczleweli/urlview.deb/commit/13cd0e45d02da500ff0b8ed32701bd9ac9131454

Thank you for your report!
This would be a lot uglier if we ended up with multiple versions
with double conffile+ucf handling, I think.

Best,
наб


signature.asc
Description: PGP signature


Bug#1025214: dkms: --environment-overrides causes several module build failures

2022-11-30 Thread наб
Control: severity -1 grave

Hi!

Guess who just spent two hours chasing this down in a big upgrade with
a half-bootable system in the mean-time :)

Retagging as grave ("unusable by most or all users, or causes data loss"
feels more appropriate than "severe violation of Debian policy").
I cannot tell you just how /tempting/ critical ‒ "makes unrelated
software on the system (or the whole system) break" is,
probably would be even more so if I weren't on battery :)

My system's on ZFS. Needs ZFS to boot, actually. It's very cool to see
" doesn't exist" in the log. Much cooler still to find that
I can run make myself in the build directory and it works! Very cool and
fun to spend multiple minutes per iteration with ZFS's long
configuration times!

The dkms bit from apt-listchanges is
-- >8 --
dkms (3.0.8-2) unstable; urgency=medium

  * export-CC, exact-cc: Merge and improve the two patches. Ensure that
compiler is set and exported as early in the prepartion stage as
possible, is not subsequently unset (already unset at the start of the
dkms script), and also export MAKEFLAGS to ensure that environment CC
variable is used by kernel's Makefile. Fixes LP: #1997841
  * Drop dangling unapplied patch from git.

 -- Dimitri John Ledkov   Thu, 24 Nov 2022 
14:59:45 +

dkms (3.0.8-1) unstable; urgency=medium

  [ Andreas Beckmann ]
  * update watch file
  * message consistency

  [ Gianfranco Costamagna ]
  * New upstream version 3.0.8
  * Drop upstream patches:
- 2b76d4aa29e65ae4ed8e89685c4e729f1276c5fc
- 3ca52f8769bdf7ebdc83735355fff7c5c0664152
- 7f3c4b03c506e40f0a5ce9315a8ade88b108ce0f
- 8d60956f6dcda0679066954215eb8be4045413b4
- 985bfd584f0e87bc726865bfdc17887d4713c854
  * Refresh patches

 -- Gianfranco Costamagna   Fri, 18 Nov 2022 22:34:50 
+0100
-- >8 --

I downgraded to 3.0.8-1 from snapshot.d.o (which surprisingly didn't
explode despite how fucked my dpkg config state was). That worked.

Please consider verifying whether an "improvement" doesn't straight-up
break every user before uploading.
This graph shows that the nvidia driver /alone/ is /4%/ of all reporting
installations (unfiltered rdeps for dkms):
  
https://qa.debian.org/popcon-graph.php?packages=zfs-dkms+zfs-dkms+r8168-dkms+nvidia-legacy-390xx-kernel-dkms+nvidia-kernel-dkms+broadcom-sta-dkms+zfs-dkms+acpi-call-dkms+dahdi-dkms+r8168-dkms+nvidia-tesla-470-kernel-dkms+nvidia-tesla-460-kernel-dkms+nvidia-tesla-450-kernel-dkms+nvidia-tesla-418-kernel-dkms+nvidia-legacy-390xx-kernel-dkms+nvidia-kernel-dkms+broadcom-sta-dkms+xtrx-dkms+xtables-addons-dkms+wireguard-dkms+west-chamber-dkms+v4l2loopback-dkms+tp-smapi-dkms+openrazer-driver-dkms+openafs-modules-dkms+octavia-agent+nat-rtsp-dkms+lttng-modules-dkms+live-task-recommended+lime-forensics-dkms+vpoll-dkms+langford-dkms+jool-dkms+iptables-netflow-dkms+gost-crypto-dkms+evdi-dkms+dpdk-kmods-dkms+dm-writeboost-dkms+digimend-dkms+ddcci-dkms+acpi-call-dkms+bbswitch-dkms+adv-17v35x-dkms_installed=on_percent=on_legend=on_ticks=on_date=_date=_date=_fmt=%25Y-%25m=1
:)

At least it didn't migrate to testing.

наб


signature.asc
Description: PGP signature


Bug#1007739: curl breaks stenographer autopkgtest: curl: (27) Out of memory

2022-03-18 Thread наб
I can confirm this is the same bug (the test log errors at the end of
stenocurl, which passes --cacert "$CERTPATH/ca_cert.pem"). This can be
trivially reproduced by running
-- >8 --
$ openssl req -x509 -newkey rsa:4096 -sha256 -days 1 -nodes -keyout 
"/tmp/snakeoil.key" -out "/tmp/snakeoil.crt" -subj "/CN=localhost"
Generating a RSA private key

...
writing new private key to '/tmp/snakeoil.key'
-
$ python3 -uc "
import http.server, ssl, sys, os, time, random

sys.stdin.close()

httpd, err, port = None, None, None
for i in range(1, 100):
port = random.randint(0xC000, 0x) # ephemeral range
try:
httpd = http.server.HTTPServer(('localhost', port), 
http.server.SimpleHTTPRequestHandler)
break
except:
err = sys.exc_info()[1]
time.sleep(i / 100)
if not httpd:
raise err

with open('/tmp/snakeoil.port', 'w') as portf:
print(port, file=portf)

httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, 
keyfile='/tmp/snakeoil.key', certfile='/tmp/snakeoil.crt', 
ssl_version=ssl.PROTOCOL_TLS)

print('{} start on {}'.format(os.getpid(), port))
httpd.serve_forever()
" &

$ read -r port < /tmp/snakeoil.port
$ curl --cacert /tmp/snakeoil.crt https://localhost:$port
curl: (27) Out of memory
$ curl --insecure https://localhost:$port 2>/dev/null | wc
127.0.0.1 - - [18/Mar/2022 15:16:46] "GET / HTTP/1.1" 200 -
 66 1332570
-- >8 --

As well as any program that uses libcurl's CURLOPT_CAINFO:
-- >8 --
# SSL_CA_CERT_FILE=/tmp/snakeoil.crt zfs create -o encryption=on -o 
keyformat=passphrase -o keylocation=https://localhost:$port/PASSPHRASE 
testpool/testfs2
cannot create 'testpool/testfs2': Failed to connect to 
https://localhost:55645/PASSPHRASE: Out of memory
-- >8 --

I've rebuilt curl 7.82.0-1+b1 with upstream commit
  https://github.com/curl/curl/commit/911714d617c106ed5d553bf003e34ec94ab6a136
which fixes this (and applies cleanly), and can also confirm that it
fixes the issue at hand:
-- >8 --
$ curl --cacert /tmp/snakeoil.crt https://localhost:$port 2>/dev/null | wc
127.0.0.1 - - [18/Mar/2022 16:14:26] "GET / HTTP/1.1" 200 -
 45  912530
# SSL_CA_CERT_FILE=/tmp/snakeoil.crt zfs create -o encryption=on -o 
keyformat=passphrase -o keylocation=https://localhost:56107/PASSPHRASE 
testpool/testfs2
$ zfs get keylocation testpool/testfs2
testpool/testfs2keylocation https://localhost:56107/PASSPHRASE local
-- >8 --

If a release with the fix isn't coming out in the near future I think
it'd be nice if a -2 package were published with that commit in as a
patch; this, clearly, breaks primarily autotests (indeed, this driver
is extracted verbatim from the ZFS test suite).

Best,
наб


signature.asc
Description: PGP signature


Bug#1003755: mailutils: mail(1) completely broken, fails with "undefined symbol: mu_stream_timed_getdelim" on start

2022-01-14 Thread наб
Package: mailutils
Version: 1:3.14-1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

I upgraded today;
the changelog in my root mail (heh) shows just 1:3.14-1,
so this is broken vs. previous (1:3.13-1).

When running mail(1), at all, it doesn't:
-- >8 --
$ mail
mail: symbol lookup error: mail: undefined symbol: mu_stream_timed_getdelim
$ date | mail -s test
mail: symbol lookup error: mail: undefined symbol: mu_stream_timed_getdelim
-- >8 --

Kind of a big deal, I think :/
There's usable parts (decoodemail(1)), hence grave.
Nevertheless, well, it's mail(1). Kinda important or whatever.

strace, ldd, readelf -d, readelf -s outputs below.

Alas,
наб

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: amd64, i386

Kernel: Linux 5.15.0-2-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mailutils depends on:
ii  libc6 2.33-2
ii  libcrypt1 1:4.4.27-1
ii  libfribidi0   1.0.8-2
ii  libgnutls30   3.7.2-5
ii  libgsasl7 1.10.0-5+b1
ii  libldap-2.4-2 2.4.59+dfsg-1
ii  libmailutils8 1:3.13-1
ii  libncurses6   6.3-1
ii  libpam0g  1.4.0-11
ii  libreadline8  8.1.2-1
ii  libtinfo6 6.3-1
ii  libunistring2 0.9.10-6
ii  mailutils-common  1:3.14-1

Versions of packages mailutils recommends:
ii  nullmailer [mail-transport-agent]  1:2.2-3

Versions of packages mailutils suggests:
pn  mailutils-doc  
pn  mailutils-mh   

-- no debconf information
execve("/bin/mail", ["mail"], 0xff940354 /* 24 vars */) = 0
brk(NULL)   = 0x58084000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xf7f23000
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=30367, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 30367, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf7f1b000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnux32/libmuaux.so.8", O_RDONLY|O_CLOEXEC) 
= 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 9\0\0004\0\0\0"..., 
512) = 512
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=75572, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 79332, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7f07000
mprotect(0xf7f0a000, 61440, PROT_NONE)  = 0
mmap(0xf7f0a000, 45056, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xf7f0a000
mmap(0xf7f15000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0xe000) = 0xf7f15000
mmap(0xf7f19000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0xf7f19000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnux32/libunistring.so.2", 
O_RDONLY|O_CLOEXEC) = 3
read(3, 
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\320\0\0004\0\0\0"..., 512) 
= 512
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1549716, ...}, AT_EMPTY_PATH) 
= 0
mmap(NULL, 1553604, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7d8b000
mmap(0xf7d97000, 217088, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0xf7d97000
mmap(0xf7dcc000, 1273856, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x41000) = 0xf7dcc000
mmap(0xf7f03000, 16384, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x177000) = 0xf7f03000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnux32/libmu_mbox.so.8", 
O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320(\0\0004\0\0\0"..., 
512) = 512
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=54820, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 57508, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7d7c000
mmap(0xf7d7e000, 32768, PROT_READ|PROT_EXEC, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0xf7d7e000
mmap(0xf7d86000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0xa000) = 0xf7d86000
mmap(0xf7d88000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb000) = 0xf7d88000
close(3)= 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnux32/libmu_mh.so.8", O_RDONLY|O_CLOEXEC) 
= 3
read(3, 
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\23\0\0004\0\0\0"..., 512) = 
512
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=17896, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 20592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7d76000