Bug#1068710: tiktoken: pybuild-autopkgtest fails with ModuleNotFoundError(s)

2024-04-11 Thread Nick Rosbrook
> Are you sure this patch worked in Ubuntu?  As far as I can tell, the
> autopkgtest script still fail on Debian.
>

Yes, here is the autopkgtest result page for Ubuntu:
https://autopkgtest.ubuntu.com/packages/tiktoken. Looking at the
Debian autopkgtest logs, the failure looks different:
https://ci.debian.net/packages/t/tiktoken/unstable/amd64/45200281/.

-Nick



Bug#1065761: m4api: FTBFS on arm{el,hf}: /<>/m4api.c:413:10: error: implicit declaration of function ‘m4SetBinary’ [-Werror=implicit-function-declaration]

2024-04-10 Thread Nick Rosbrook
Package: m4api
Followup-For: Bug #1065761
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to fix the implicit
declarations.

  * debian/patches: fix several implicit declarations (LP: #2060847)


Thanks for considering the patch.

-Nick
diff -Nru 
m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch 
m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch
--- m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch   
1969-12-31 19:00:00.0 -0500
+++ m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch   
2024-04-10 13:41:11.0 -0400
@@ -0,0 +1,27 @@
+Description: Fix several implicit declarations
+Author: Nick Rosbrook 
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/2060847
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066290
+Last-Update: 2024-04-10
+--- a/m4api.c
 b/m4api.c
+@@ -391,6 +391,8 @@
+   return 0;
+ }
+ 
++int m4SetBinary(m4Handle *dev, struct m4ConfigField *field, char const *val);
++
+ int m4SetFloat(m4Handle *dev, enum m4FieldID fid, float val) {
+   char binary[2];
+   int ival;
+--- a/m4ctl.c
 b/m4ctl.c
+@@ -17,6 +17,8 @@
+  */
+ 
+ #include 
++#include 
++#include 
+ #include 
+ 
+ #include "m4api.h"
diff -Nru m4api-0.3~0.9646fd/debian/patches/series 
m4api-0.3~0.9646fd/debian/patches/series
--- m4api-0.3~0.9646fd/debian/patches/series1969-12-31 19:00:00.0 
-0500
+++ m4api-0.3~0.9646fd/debian/patches/series2024-04-10 13:40:41.0 
-0400
@@ -0,0 +1 @@
+fix-several-implicit-declarations.patch


Bug#1066379: loqui: FTBFS: loqui-core-gtk.gob:256:25: error: implicit declaration of function ‘account_list_dialog_open_for_connect’ [-Werror=implicit-function-declaration]

2024-04-10 Thread Nick Rosbrook
Package: loqui
Followup-For: Bug #1066379
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

This FTBFS is due to a missing include of account_list_dialog.h. In
Ubuntu we applied this patch to fix it.

  * debian/patches: fix implicit declaration of
account_list_dialog_open_for_connect


Thanks for considering the patch.

-Nick
diff -Nru 
loqui-0.7.0/debian/patches/0002-add-missing-include-account_list_dialog.h.patch 
loqui-0.7.0/debian/patches/0002-add-missing-include-account_list_dialog.h.patch
--- 
loqui-0.7.0/debian/patches/0002-add-missing-include-account_list_dialog.h.patch 
1969-12-31 19:00:00.0 -0500
+++ 
loqui-0.7.0/debian/patches/0002-add-missing-include-account_list_dialog.h.patch 
2024-04-10 11:51:39.0 -0400
@@ -0,0 +1,16 @@
+Description: Fix implicit declaration of account_list_dialog_open_for_connect
+ The account_list_dialog.h header needs to be included for this.
+Author: Nick Rosbrook 
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/loqui/+bug/2060834
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066379
+Last-Update: 2024-04-10
+--- a/src/loqui-core-gtk.gob
 b/src/loqui-core-gtk.gob
+@@ -63,6 +63,7 @@
+ #include "loqui_stock.h"
+ #include "prefs_general_upgrader.h"
+ #include "loqui-notifier-gtk.h"
++#include "account_list_dialog.h"
+ 
+ %}
+ 
diff -Nru loqui-0.7.0/debian/patches/series loqui-0.7.0/debian/patches/series
--- loqui-0.7.0/debian/patches/series   2021-08-14 23:24:56.0 -0400
+++ loqui-0.7.0/debian/patches/series   2024-04-10 11:47:31.0 -0400
@@ -1 +1,2 @@
 0001-Add-missing-Makefile.in.patch
+0002-add-missing-include-account_list_dialog.h.patch


Bug#1068710: tiktoken: pybuild-autopkgtest fails with ModuleNotFoundError(s)

2024-04-09 Thread Nick Rosbrook
Package: tiktoken
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch

Dear Maintainer,

In Ubuntu, I noticed that the autopkgtests were failing for tiktoken[1].
The failure is due to missing 'pytest' and 'hypothesis' python modules.
Looking at [2], I see the same failures in Debian. I applied this
patch in Ubuntu to fix the autopkgtest:

  * debian/control: Build-Depends: python3-{pytest,hypothesis}

Thanks for considering the patch.

-Nick

[1] https://bugs.launchpad.net/bugs/2060690
[2] https://ci.debian.net/packages/t/tiktoken/
diff -Nru tiktoken-0.6.0/debian/control tiktoken-0.6.0/debian/control
--- tiktoken-0.6.0/debian/control   2024-04-01 04:25:31.0 -0400
+++ tiktoken-0.6.0/debian/control   2024-04-09 10:23:56.0 -0400
@@ -11,6 +10,8 @@
  , python3-all
  , python3-setuptools-rust
  , python3-regex
+ , python3-hypothesis
+ , python3-pytest
  , librust-bstr-dev (>= 0.0.1~)
  , librust-fancy-regex-dev
  , librust-pyo3-dev


Bug#1061785: automake-1.16 fails its autopkg tests with Python 3.12

2024-02-01 Thread Nick Rosbrook
Package: automake-1.16
Followup-For: Bug #1061785
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

The reason for the autopkgtest failure is that the imp module was
removed from python 3.12. The t/ax/am-test-lib.sh script currently
calls imp.get_tag(), and the recommended[1] way to replace this
functionality is to use sys.implementation.cache_tag.

Thanks for considering the patch.

[1] https://docs.python.org/3.10/library/imp.html#imp.get_tag
diff -Nru 
automake-1.16-1.16.5/debian/patches/python3.12-do-not-import-imp.patch 
automake-1.16-1.16.5/debian/patches/python3.12-do-not-import-imp.patch
--- automake-1.16-1.16.5/debian/patches/python3.12-do-not-import-imp.patch  
1969-12-31 19:00:00.0 -0500
+++ automake-1.16-1.16.5/debian/patches/python3.12-do-not-import-imp.patch  
2024-02-01 13:42:56.0 -0500
@@ -0,0 +1,19 @@
+Description: Do not try to import imp module
+ The imp module has been deprecated for a while, and was removed in python3.12.
+ Following the recommendation from python documentation, replace imp.get_tag()
+ usage with sys.implementation.cache_tag.
+Author: Nick Rosbrook 
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061785
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/automake-1.16/+bug/2051972
+Last-Update: 2024-02-01
+--- a/t/ax/am-test-lib.sh
 b/t/ax/am-test-lib.sh
+@@ -631,7 +631,7 @@
+ python_has_pep3147 ()
+ {
+   if test -z "$am_pep3147_tag"; then
+-am_pep3147_tag=$($PYTHON -c 'import imp; print(imp.get_tag())') \
++am_pep3147_tag=$($PYTHON -c 'import sys; 
print(sys.implementation.cache_tag)') \
+   || am_pep3147_tag=none
+   fi
+   test $am_pep3147_tag != none
diff -Nru automake-1.16-1.16.5/debian/patches/series 
automake-1.16-1.16.5/debian/patches/series
--- automake-1.16-1.16.5/debian/patches/series  2022-03-15 19:03:50.0 
-0400
+++ automake-1.16-1.16.5/debian/patches/series  2024-02-01 13:36:58.0 
-0500
@@ -3,3 +3,4 @@
 0003-t-python-prefix.sh-Respect-PYTHON-environment-variable.patch
 python3.10.patch
 python3.10-sysconfig.patch
+python3.12-do-not-import-imp.patch


Bug#1028633:

2023-07-05 Thread Nick Rosbrook
Hi,

I have opened a pull request[1] to fix this FTBFS. We experienced the
same problem in Ubuntu[2], and these changes resolved the problem for
us.

Thanks,
Nick

[1] https://salsa.debian.org/science-team/mlpack/-/merge_requests/2
[2] https://bugs.launchpad.net/ubuntu/+source/mlpack/+bug/2025291



Bug#1026725: python-structlog: FTBFS: dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.11 3.10" returned exit code 13

2023-02-09 Thread Nick Rosbrook
Package: python-structlog
Followup-For: Bug #1026725
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

I found that an upstream commit[1] already contained the fix for this.
This patch just takes the relevant portion of that commit.

Thanks,
Nick

[1] 
https://github.com/hynek/structlog/commit/1012f5606b356d4fe1a9027513602c758bf51ab8
diff -Nru 
python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch
 
python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch
--- 
python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch
  1969-12-31 19:00:00.0 -0500
+++ 
python-structlog-20.1.0/debian/patches/fix-assertion-in-test_delattr_missing.patch
  2023-02-08 15:50:24.0 -0500
@@ -0,0 +1,20 @@
+Description: Fix test_delattr_missing for python 3.11
+Origin: upstream, 
https://github.com/hynek/structlog/commit/1012f5606b356d4fe1a9027513602c758bf51ab8
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026725
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/python-structlog/+bug/2006634
+Last-Update: 2023-02-08
+---
+--- a/tests/test_threadlocal.py
 b/tests/test_threadlocal.py
+@@ -251,7 +251,10 @@
+ with pytest.raises(AttributeError) as e:
+ d._tl.__delattr__("does_not_exist")
+ 
+-assert "does_not_exist" == e.value.args[0]
++assert e.value.args[0] in (
++"does_not_exist",
++"'_thread._local' object has no attribute 'does_not_exist'",
++)
+ 
+ def test_del(self, D):
+ """
diff -Nru python-structlog-20.1.0/debian/patches/series 
python-structlog-20.1.0/debian/patches/series
--- python-structlog-20.1.0/debian/patches/series   1969-12-31 
19:00:00.0 -0500
+++ python-structlog-20.1.0/debian/patches/series   2023-02-08 
15:46:13.0 -0500
@@ -0,0 +1 @@
+fix-assertion-in-test_delattr_missing.patch


Bug#1030867: aseba: Missing builds on s390x and ppc64el

2023-02-08 Thread Nick Rosbrook
Package: aseba
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch

Dear Maintainer,

In Ubuntu, aseba previously built on s390x and ppc64el. I see build
architectures were restricted[1] in a recent version. I have tested
s390x and ppc64el builds in Ubuntu, and would like to re-enable those
arches.

Thanks for considering the patch.

-Nick

[1] 
https://salsa.debian.org/science-team/aseba/-/commit/d5ad0ce97c814ccac777cf5ee86eeaaf4b5a9bac
[2] 
https://launchpad.net/~enr0n/+archive/ubuntu/proposed-migration/+packages?field.name_filter=aseba_filter=published_filter=lunar
diff -Nru aseba-1.6.99+dfsg/debian/control aseba-1.6.99+dfsg/debian/control
--- aseba-1.6.99+dfsg/debian/control2022-07-15 12:25:36.0 -0400
+++ aseba-1.6.99+dfsg/debian/control2023-02-07 09:58:53.0 -0500
@@ -18,7 +18,7 @@
 Homepage: https://github.com/aseba-community/aseba
 
 Package: aseba
-Architecture: any-amd64 any-i386 arm64 mips64el mipsel riscv64
+Architecture: any-amd64 any-i386 arm64 mips64el mipsel riscv64 s390x ppc64el
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Suggests: aseba-plugin-blockly
 Description: Event-based framework for distributed mobile robots control


Bug#1030829: mmc-utils: FTBFS on ppc64el with error: ‘cnt’ may be used uninitialized

2023-02-07 Thread Nick Rosbrook
Package: mmc-utils
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch

Dear Maintainer,

In Ubuntu, mcc-utils FTBFS[1] on ppc64el with the following:

 In file included from /usr/include/endian.h:35,
  from /usr/include/powerpc64le-linux-gnu/sys/types.h:176,
  from /usr/include/stdlib.h:395,
  from mmc_cmds.c:21:
 In function ‘__bswap_32’,
 inlined from ‘do_rpmb_write_block’ at mmc_cmds.c:2462:27:
 /usr/include/powerpc64le-linux-gnu/bits/byteswap.h:52:10: error: ‘cnt’ may be 
used uninitialized [-Werror=maybe-uninitialized]
52 |   return __builtin_bswap32 (__bsx);
   |  ^
 mmc_cmds.c: In function ‘do_rpmb_write_block’:
 mmc_cmds.c:2439:22: note: ‘cnt’ was declared here
  2439 | unsigned int cnt;
   |  ^~~
 cc1: all warnings being treated as errors
 make[1]: *** [Makefile:36: mmc_cmds.o] Error 1
 make[1]: Leaving directory '/<>'
 dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" returned 
exit code 2
 make: *** [debian/rules:8: binary-arch] Error 25
 dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit 
status 2
 


This was already fixed upstream[2]. We applied the patch in Ubuntu to fix
the build on ppc64el.

Thanks,
Nick

[1] 
https://launchpadlibrarian.net/648312622/buildlog_ubuntu-lunar-ppc64el.mmc-utils_0+git20220624.d7b343fd-1_BUILDING.txt.gz
[2] 
https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/commit/?id=5086e7c0de4d0094f8674368a88d931b27589d53
diff -Nru 
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
 
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
--- 
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
 1969-12-31 19:00:00.0 -0500
+++ 
mmc-utils-0+git20220624.d7b343fd/debian/patches/0003-fix-warning-on-uninitialized-cnt.patch
 2023-02-07 15:14:11.0 -0500
@@ -0,0 +1,54 @@
+Description: mmc-utils: fix warning on uninitialized 'cnt'
+Origin: 
https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/commit/?id=5086e7c0de4d0094f8674368a88d931b27589d53
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/mmc-utils/+bug/2006505
+Last-Update: 2023-02-07
+---
+From 5086e7c0de4d0094f8674368a88d931b27589d53 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti 
+Date: Sun, 18 Sep 2022 18:17:51 +0200
+Subject: mmc-utils: fix warning on uninitialized 'cnt'
+
+When building following warning shows up:
+```
+In function '__bswap_32',
+inlined from 'do_rpmb_write_block' at mmc_cmds.c:2293:27:
+/home/autobuild/autobuild/instance-15/output-1/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/bits/byteswap.h:52:10:
 error: 'cnt' may be used uninitialized [-Werror=maybe-uninitialized]
+   52 |   return __builtin_bswap32 (__bsx);
+  |  ^
+mmc_cmds.c: In function 'do_rpmb_write_block':
+mmc_cmds.c:2270:22: note: 'cnt' was declared here
+2270 | unsigned int cnt;
+  |  ^~~
+cc1: all warnings being treated as errors
+```
+This is due to function rpmb_read_counter() that doesn't set its
+argument 'unsigned int *cnt' in all return points. So let's set
+*cnt to 0 in the return point that misses to initialize it.
+
+Signed-off-by: Giulio Benetti 
+Reviewed-by: Avri Altman 
+Link: 
https://lore.kernel.org/r/20220918161751.1132590-1-giulio.bene...@benettiengineering.com
+Signed-off-by: Ulf Hansson 
+---
+ mmc_cmds.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index ef1d8c6..29abd1d 100644
+--- a/mmc_cmds.c
 b/mmc_cmds.c
+@@ -2238,8 +2238,10 @@ int rpmb_read_counter(int dev_fd, unsigned int *cnt)
+   }
+ 
+   /* Check RPMB response */
+-  if (frame_out.result != 0)
++  if (frame_out.result != 0) {
++  *cnt = 0;
+   return be16toh(frame_out.result);
++  }
+ 
+   *cnt = be32toh(frame_out.write_counter);
+ 
+-- 
+cgit 
+
diff -Nru mmc-utils-0+git20220624.d7b343fd/debian/patches/series 
mmc-utils-0+git20220624.d7b343fd/debian/patches/series
--- mmc-utils-0+git20220624.d7b343fd/debian/patches/series  2022-08-04 
02:07:11.0 -0400
+++ mmc-utils-0+git20220624.d7b343fd/debian/patches/series  2023-02-07 
15:09:50.0 -0500
@@ -1,2 +1,3 @@
 0001-Fix-typo.patch
 0002-man-mmc.1-Fix-warning-macro-not-defined.patch
+0003-fix-warning-on-uninitialized-cnt.patch


Bug#1026094: prometheus-ipmi-exporter: autopkgtest/build fails due to API change in prometheus exporter-toolkit

2022-12-14 Thread Nick Rosbrook
Package: prometheus-ipmi-exporter
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch

Dear Maintainer,

Recent API changes in the github.com/prometheus/exporter-toolkit/web
package, which are included in golang-github-prometheus-exporter-toolkit
0.8.2-1, cause the autopkgtest (and re-build) to fail.

This can be fixed by an upstream commit that adapts to the new API.

Thanks,
Nick
diff -Nru 
prometheus-ipmi-exporter-1.6.1/debian/patches/02-fix-build-with-new-exporter-toolkit.patch
 
prometheus-ipmi-exporter-1.6.1/debian/patches/02-fix-build-with-new-exporter-toolkit.patch
--- 
prometheus-ipmi-exporter-1.6.1/debian/patches/02-fix-build-with-new-exporter-toolkit.patch
  1969-12-31 19:00:00.0 -0500
+++ 
prometheus-ipmi-exporter-1.6.1/debian/patches/02-fix-build-with-new-exporter-toolkit.patch
  2022-12-13 15:51:36.0 -0500
@@ -0,0 +1,33 @@
+Description: Fix build with golang-github-prometheus-exporter-toolkit 0.8.2
+Origin: upstream, 
https://github.com/prometheus-community/ipmi_exporter/commit/e8989cfdf79bebb2e3d84e43f65a7fc027ee7bba.patch
+Bug-Ubuntu: https://launchpad.net/bugs/1999574
+Last-Update: 2022-12-13
+---
+--- a/main.go
 b/main.go
+@@ -41,11 +41,7 @@
+   "freeipmi.path",
+   "Path to FreeIPMI executables.",
+   ).Default("/usr/sbin").String()
+-  listenAddress = kingpin.Flag(
+-  "web.listen-address",
+-  "Address to listen on for web interface and telemetry.",
+-  ).Default(":9290").String()
+-  webConfig = webflag.AddFlags(kingpin.CommandLine)
++  webConfig = webflag.AddFlags(kingpin.CommandLine, ":9290")
+ 
+   sc = {
+   C: {},
+@@ -169,10 +165,8 @@
+ `))
+   })
+ 
+-  level.Info(logger).Log("msg", "Listening on", "address", *listenAddress)
+-
+-  srv := {Addr: *listenAddress}
+-  if err := web.ListenAndServe(srv, *webConfig, logger); err != nil {
++  srv := {}
++  if err := web.ListenAndServe(srv, webConfig, logger); err != nil {
+   level.Error(logger).Log("msg", "HTTP listener stopped", 
"error", err)
+   os.Exit(1)
+   }
diff -Nru prometheus-ipmi-exporter-1.6.1/debian/patches/series 
prometheus-ipmi-exporter-1.6.1/debian/patches/series
--- prometheus-ipmi-exporter-1.6.1/debian/patches/series2022-06-22 
07:19:56.0 -0400
+++ prometheus-ipmi-exporter-1.6.1/debian/patches/series2022-12-13 
15:23:10.0 -0500
@@ -1 +1,2 @@
 01-debian-defaults.patch
+02-fix-build-with-new-exporter-toolkit.patch


Bug#1023667: xen-tools: xt-guess-suite-and-mirror cannot handle deb http://ports.ubuntu.com/ubuntu-ports

2022-11-08 Thread Nick Rosbrook
Source: xen-tools
Version: 4.9.1-1
Severity: normal

Dear Maintainer,

The xt-guess-suite-and-mirror tools is not able to handle sources.list
entries like this:

  deb http://ports.ubuntu.com/ubuntu-ports kinetic main restricted

This comes from a default installation of Ubuntu Kinetic on arm64
(raspberry pi). Specifically, the tool is not able to handle the
ubuntu-ports portion of the entry.

This is what the tool reports:

  pi@ubuntu:~$ xt-guess-suite-and-mirror --mirror
  Couldn't find a useful entry in the sources.list files of the Dom0. Tried:
/etc/apt/sources.list
  pi@ubuntu:~$ xt-guess-suite-and-mirror --suite
  Couldn't find a useful entry in the sources.list files of the Dom0. Tried:
/etc/apt/sources.list

I would expect it to correctly report 'http://ports.ubuntu.com/ubuntu-ports'
and 'kinetic' instead. 

Thanks,
Nick



Bug#1020528: dh-python: attempting to diff static library files raises UnicodeDecodeError

2022-09-22 Thread Nick Rosbrook
Package: dh-python
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

In verbose mode, if files differ in share_files(), dhpython will try to
show a diff of the files. When these files are static libraries, this
raises a UnicodeDecodeError. For example, from a recent numpy build on
Ubuntu kinetic[1].

In Ubuntu, the attached patch was applied to avoid diffing .a files,
just as is currently done for .so files:

  * dhpython/fs.py: do not try to diff static libraries in verbose mode (LP: 
#1990562)

Thanks,
Nick

[1] 
https://launchpadlibrarian.net/624822201/buildlog_ubuntu-kinetic-arm64.numpy_1%3A1.21.5-1build2_BUILDING.txt.gz
diff -Nru dh-python-5.20220819/dhpython/fs.py 
dh-python-5.20220819ubuntu1/dhpython/fs.py
--- dh-python-5.20220819/dhpython/fs.py 2022-08-19 16:34:55.0 -0400
+++ dh-python-5.20220819ubuntu1/dhpython/fs.py  2022-09-22 10:38:23.0 
-0400
@@ -144,7 +144,7 @@
 else:
 # The files differed so we cannot collapse them.
 log.warn('Paths differ: %s and %s', fpath1, fpath2)
-if options.verbose and not i.endswith('.so'):
+if options.verbose and not i.endswith(('.so','.a')):
 with open(fpath1) as fp1:
 fromlines = fp1.readlines()
 with open(fpath2) as fp2:


Bug#1016330: generate-ninja: FTBFS: dwz: debian/generate-ninja/usr/bin/gn: Unknown debugging section .debug_addr

2022-08-16 Thread Nick Rosbrook
Package: generate-ninja
Followup-For: Bug #1016330
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch

Hi,

In Ubuntu, we fixed the FTBFS by forcing gn to build as DWARFv4 to
remain compatible with dh_dwz:

  * debian/rules: Set -gdwarf-4 in CXXFLAGS to remain compatible with dh_dwz
and fix FTBFS (LP: #1984224).

Thanks,
Nick
diff -Nru generate-ninja-0.0~git20220314.bd99dbf/debian/rules 
generate-ninja-0.0~git20220314.bd99dbf/debian/rules
--- generate-ninja-0.0~git20220314.bd99dbf/debian/rules 2022-03-21 
02:51:44.0 -0400
+++ generate-ninja-0.0~git20220314.bd99dbf/debian/rules 2022-08-10 
11:14:05.0 -0400
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 include /usr/share/dpkg/buildflags.mk
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-CXXFLAGS += $(CPPFLAGS) -fPIE
+CXXFLAGS += $(CPPFLAGS) -fPIE -gdwarf-4
 LDFLAGS += -pie
 
 include /usr/share/dpkg/architecture.mk


Bug#1015381: deepin-album: ftbfs with LTO (link time optimization) enabled

2022-08-16 Thread Nick Rosbrook
Package: deepin-album
Followup-For: Bug #1015381
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch

Hi,

In Ubuntu, we disabled LTO to fix the build:

  * debian/rules: disable LTO to fix the build (LP: #1984124).

Thanks,
Nick
diff -Nru deepin-album-5.9.1+dfsg/debian/rules 
deepin-album-5.9.1+dfsg/debian/rules
--- deepin-album-5.9.1+dfsg/debian/rules2022-03-31 14:17:10.0 
-0400
+++ deepin-album-5.9.1+dfsg/debian/rules2022-08-09 12:24:42.0 
-0400
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 include /usr/share/dpkg/default.mk
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all,optimize=-lto
 export DEB_CXXFLAGS_MAINT_APPEND = -Wl,-z,now
 
 export QT_SELECT := 5


Bug#1017469: libxsmm: FTBFS with undefined reference to pthread_yield

2022-08-16 Thread Nick Rosbrook
Package: libxsmm
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

With glibc >= 2.34, libxsmm FTBFS with an undefined reference to
pthread_yield. Fixes have been committed upstream, but not yet included
in a release.

In Ubuntu, we cherry-picked the upstream commits to fix the build:

  * debian/patches: Cherry-pick upstream patches to fix undefined reference to
pthread_yield (LP: #1984111).

Thanks,
Nick
diff -Nru 
libxsmm-1.17/debian/patches/0003-Issue-551-rely-on-sched_yield-rather-than-pthread_yi.patch
 
libxsmm-1.17/debian/patches/0003-Issue-551-rely-on-sched_yield-rather-than-pthread_yi.patch
--- 
libxsmm-1.17/debian/patches/0003-Issue-551-rely-on-sched_yield-rather-than-pthread_yi.patch
 1969-12-31 19:00:00.0 -0500
+++ 
libxsmm-1.17/debian/patches/0003-Issue-551-rely-on-sched_yield-rather-than-pthread_yi.patch
 2022-08-09 10:18:54.0 -0400
@@ -0,0 +1,25 @@
+Description: rely on sched_yield rather than pthread_yield (GLIBC 2.34 and 
later).
+Author: Hans Pabst 
+Origin: upstream, 
https://github.com/libxsmm/libxsmm/commit/161ee78f1ccbbe6ce2c0439d6889221cca77ce13
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libxsmm/+bug/1984111
+Last-Update: 2022-08-09
+---
+
+--- a/include/libxsmm_sync.h
 b/include/libxsmm_sync.h
+@@ -462,6 +462,10 @@
+ #   define LIBXSMM_TLS_GETVALUE(KEY) pthread_getspecific(KEY)
+ #   if defined(__APPLE__) && defined(__MACH__)
+ # define LIBXSMM_SYNC_YIELD pthread_yield_np()
++#   elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
++  && LIBXSMM_VERSION2(2, 34) <= LIBXSMM_VERSION2(__GLIBC__, 
__GLIBC_MINOR__)
++  LIBXSMM_EXTERN int sched_yield(void); /* sched.h */
++# define LIBXSMM_SYNC_YIELD sched_yield()
+ #   else
+ # if defined(__USE_GNU) || !defined(__BSD_VISIBLE)
+   LIBXSMM_EXTERN int pthread_yield(void) LIBXSMM_THROW;
+@@ -813,4 +817,3 @@
+ LIBXSMM_API unsigned int libxsmm_get_tid(void);
+ 
+ #endif /*LIBXSMM_SYNC_H*/
+-
diff -Nru 
libxsmm-1.17/debian/patches/0004-Fixed-potential-issue-about-undefined-pthread_yield.patch
 
libxsmm-1.17/debian/patches/0004-Fixed-potential-issue-about-undefined-pthread_yield.patch
--- 
libxsmm-1.17/debian/patches/0004-Fixed-potential-issue-about-undefined-pthread_yield.patch
  1969-12-31 19:00:00.0 -0500
+++ 
libxsmm-1.17/debian/patches/0004-Fixed-potential-issue-about-undefined-pthread_yield.patch
  2022-08-09 10:18:54.0 -0400
@@ -0,0 +1,33 @@
+Description: Fixed potential issue about undefined pthread_yield (linkage).
+Author: Hans Pabst 
+Origin: upstream, 
https://github.com/libxsmm/libxsmm/commit/304de784a56c3d7763c92b1801e059c3d39e14dc
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libxsmm/+bug/1984111
+Last-Update: 2022-08-09
+---
+diff --git a/include/libxsmm_macros.h b/include/libxsmm_macros.h
+index 1795ce763..e4d31c9d3 100644
+--- a/include/libxsmm_macros.h
 b/include/libxsmm_macros.h
+@@ -844,6 +844,7 @@ LIBXSMM_API_INLINE int libxsmm_nonconst_int(int i) { 
return i; }
+ #   include 
+ # else
+ #   include 
++#   include 
+ # endif
+ #endif
+ #if !defined(LIBXSMM_ASSERT)
+diff --git a/include/libxsmm_sync.h b/include/libxsmm_sync.h
+index b64a55f09..d92dad2c8 100644
+--- a/include/libxsmm_sync.h
 b/include/libxsmm_sync.h
+@@ -466,8 +466,8 @@ typedef enum libxsmm_atomic_kind {
+ #   define LIBXSMM_TLS_GETVALUE(KEY) pthread_getspecific(KEY)
+ #   if defined(__APPLE__) && defined(__MACH__)
+ # define LIBXSMM_SYNC_YIELD pthread_yield_np()
+-#   elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) \
+-  && LIBXSMM_VERSION2(2, 34) <= LIBXSMM_VERSION2(__GLIBC__, 
__GLIBC_MINOR__)
++#   elif defined(_POSIX_PRIORITY_SCHEDULING) || (defined(__GLIBC__) && 
defined(__GLIBC_MINOR__) \
++  && LIBXSMM_VERSION2(2, 34) <= LIBXSMM_VERSION2(__GLIBC__, 
__GLIBC_MINOR__))
+   LIBXSMM_EXTERN int sched_yield(void); /* sched.h */
+ # define LIBXSMM_SYNC_YIELD sched_yield()
+ #   else
diff -Nru libxsmm-1.17/debian/patches/series libxsmm-1.17/debian/patches/series
--- libxsmm-1.17/debian/patches/series  2022-03-19 19:49:47.0 -0400
+++ libxsmm-1.17/debian/patches/series  2022-08-09 10:18:54.0 -0400
@@ -1,2 +1,4 @@
 0001-Makefile-rebuild-fix.patch
 0002-Makefile-fix-pkgconfigdir.patch
+0003-Issue-551-rely-on-sched_yield-rather-than-pthread_yi.patch
+0004-Fixed-potential-issue-about-undefined-pthread_yield.patch


Bug#1016411: ghdl FTBFS with LLVM 14 as default

2022-08-16 Thread Nick Rosbrook
Package: ghdl
Followup-For: Bug #1016411
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, this patch was applied to fix the build with LLVM 14.0.
Additionally, we opted to skip the build tests on armhf until upstream
provides a solution[1].

  * debian/patches/llvm14.0.patch: Allow building with LLVM 14.0
(LP: #1983908).
  * debian/rules: Skip testsuite on armhf (LP: #1984138).

Thanks,
Nick

[1] https://github.com/ghdl/ghdl/issues/2170
diff -Nru ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch 
ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch
--- ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch   1969-12-31 
19:00:00.0 -0500
+++ ghdl-1.0.0+dfsg/debian/patches/llvm14.0.patch   2022-08-09 
11:40:42.0 -0400
@@ -0,0 +1,33 @@
+Description: Enable building with LLVM 14.0
+ Allow the configure script to handle LLVM 14.0, and use DWARFv4 format to 
remain
+ compatible with dwz.
+Author: Nick Rosbrook 
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ghdl/+bug/1983908
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016411
+Forwarded: no, the DWARFv4 piece is packaging specific due to dh_dwz
+Last-Update: 2022-08-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure
 b/configure
+@@ -283,6 +283,7 @@
+check_version 11.1.0 $llvm_version ||
+check_version 12.0 $llvm_version ||
+check_version 13.0 $llvm_version ||
++   check_version 14.0 $llvm_version ||
+false; then
+ echo "Debugging is enabled with llvm $llvm_version"
+   else
+--- a/Makefile.in
 b/Makefile.in
+@@ -59,6 +59,10 @@
+ 
+ VHDL_LIB_DIR=$(prefix)/$(libdirsuffix)/vhdl
+ 
++ifeq "$(backend)" "llvm"
++ OPT_FLAGS+=-gdwarf-4
++endif
++
+ ifeq "$(enable_checks)" "true"
+  # Debug + checks
+  OPT_FLAGS+=-g
diff -Nru ghdl-1.0.0+dfsg/debian/patches/series 
ghdl-1.0.0+dfsg/debian/patches/series
--- ghdl-1.0.0+dfsg/debian/patches/series   2022-02-14 17:10:35.0 
-0500
+++ ghdl-1.0.0+dfsg/debian/patches/series   2022-08-09 11:40:42.0 
-0400
@@ -7,3 +7,4 @@
 llvm12.0.patch
 llvm11.1.0.patch
 llvm13.0.patch
+llvm14.0.patch
diff -Nru ghdl-1.0.0+dfsg/debian/rules ghdl-1.0.0+dfsg/debian/rules
--- ghdl-1.0.0+dfsg/debian/rules2022-02-14 17:10:35.0 -0500
+++ ghdl-1.0.0+dfsg/debian/rules2022-08-09 11:40:42.0 -0400
@@ -197,6 +197,9 @@
@echo 
@echo Run testsuite
@echo 
+ifeq ($(DEB_HOST_ARCH),armhf)
+   @echo Skipping testsuite on armhf
+else
# With some paths patched for the Debian packaging, the tests will not
# work right when run from the build directory. To keep it simple
# simply install into a temporary location and tell the testsuite to
@@ -219,6 +222,7 @@
ln -sf lib/ghdl/gcc/libexec $(TESTRUNDIR)/gcc/usr/libexec; \
debian/tests/ghdl-tests buildtest gcc; \
fi
+endif
 
 override_dh_gencontrol:
if [ -n "$(WITH_GCC)" ]; then \


Bug#1017468: openfst: FTBFS in dh_auto_test due to excessive memory usage

2022-08-16 Thread Nick Rosbrook
Package: openfst
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear Maintainer,

The openfst build was failing both locally and on Ubuntu build
infrastructure[1] during dh_auto_test. In both situations, the build
process was getting killed due to excessive memory usage. In Ubuntu, the
attached patch was applied to reduce the memory usage during
dh_auto_test.

  * debian/rules: Set --max-parallel=2 in override_dh_auto_test to avoid
excessive memory usage resulting in FTBFS (LP: #1984137).

Thanks,
Nick

[1] 
https://launchpadlibrarian.net/617386196/buildlog_ubuntu-kinetic-amd64.openfst_1.7.9-4_BUILDING.txt.gz
diff -Nru openfst-1.7.9/debian/rules openfst-1.7.9/debian/rules
--- openfst-1.7.9/debian/rules  2022-04-05 08:03:00.0 -0400
+++ openfst-1.7.9/debian/rules  2022-08-09 16:50:53.0 -0400
@@ -37,6 +37,9 @@
 ifneq ($(findstring mips,$(DEB_BUILD_ARCH)),)
 override_dh_auto_test:
# Tests disabled on MIPS
+else
+override_dh_auto_test:
+   dh_auto_test --max-parallel=2
 endif
 
 override_dh_missing:


Bug#1011734: ruby-certificate-authority: FTBFS: ERROR: Test "ruby3.0" failed: Failure/Error: expect(@cert_with_extensions.extensions["authorityKeyIdentifier"]).to eq(expected_authorityKeyIdentifier)

2022-07-18 Thread Nick Rosbrook
Package: ruby-certificate-authority
Followup-For: Bug #1011734
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch

Hi,

This was caused by a string format change in openssl >= 3.0. I created
an upstream issue with more information [1].

In Ubuntu, we applied this patch to resolve the FTBFS:

  * debian/patches/0004-remove-keyid-prefix-from-test-string.patch: 
Remove 'keyid:' prefix from test string to fix build with openssl >= 3.0.
(LP: #1981458)

Thanks,
Nick

[1] https://github.com/cchandler/certificate_authority/issues/62
diff -Nru 
ruby-certificate-authority-1.0.0/debian/patches/0004-remove-keyid-prefix-from-test-string.patch
 
ruby-certificate-authority-1.0.0/debian/patches/0004-remove-keyid-prefix-from-test-string.patch
--- 
ruby-certificate-authority-1.0.0/debian/patches/0004-remove-keyid-prefix-from-test-string.patch
 1969-12-31 19:00:00.0 -0500
+++ 
ruby-certificate-authority-1.0.0/debian/patches/0004-remove-keyid-prefix-from-test-string.patch
 2022-07-12 11:00:53.0 -0400
@@ -0,0 +1,21 @@
+Description: Remove 'keyid:' prefix from x509 v3 authorityKeyIdentifier test
+ This test case does a simple check for the expected authorityKeyIdentifier 
value
+ on a certificate, which includes a 'keyid:' prefix. This prefix was removed in
+ OpenSSL 3.0, which causes this test case to fail. Just remove the prefix from 
the
+ expected string to fix the test.
+Author: Nick Rosbrook 
+Bug: https://github.com/cchandler/certificate_authority/issues/62
+Bug-Ubuntu: 
https://bugs.launchpad.net/ubuntu/+source/ruby-certificate-authority/+bug/1981458
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1011734
+Last-Update: 2022-07-12
+--- a/spec/units/certificate_spec.rb
 b/spec/units/certificate_spec.rb
+@@ -423,7 +423,7 @@
+   expect(@cert_with_extensions.extensions["subjectKeyIdentifier"]).to 
eq(expected_subjectKeyIdentifier)
+ 
+   expected_authorityKeyIdentifier = 
CertificateAuthority::Extensions::AuthorityKeyIdentifier.new
+-  expected_authorityKeyIdentifier.identifier = 
"keyid:4C:58:CB:25:F0:41:4F:52:F4:28:C8:81:43:9B:A6:A8:A0:E6:92:E5"
++  expected_authorityKeyIdentifier.identifier = 
"4C:58:CB:25:F0:41:4F:52:F4:28:C8:81:43:9B:A6:A8:A0:E6:92:E5"
+   expect(@cert_with_extensions.extensions["authorityKeyIdentifier"]).to 
eq(expected_authorityKeyIdentifier)
+ 
+   expected_authorityInfoAccess = 
CertificateAuthority::Extensions::AuthorityInfoAccess.new
diff -Nru ruby-certificate-authority-1.0.0/debian/patches/series 
ruby-certificate-authority-1.0.0/debian/patches/series
--- ruby-certificate-authority-1.0.0/debian/patches/series  2022-02-20 
17:24:24.0 -0500
+++ ruby-certificate-authority-1.0.0/debian/patches/series  2022-07-12 
11:00:53.0 -0400
@@ -1,3 +1,4 @@
 0001-Build-a-string-config-for-OpenSSL-Config-as-opposed-.patch
 0002-gemspec-don-t-use-git-to-get-list-of-files.patch
 0003-gemspec-don-t-load-file-from-lib-explicitly.patch
+0004-remove-keyid-prefix-from-test-string.patch


Bug#1004508: ocrad: autopkgtest regression: undefined reference to `png_g*

2022-07-18 Thread Nick Rosbrook
In order to avoid future problems with compiling `ocradcheck`, would
it be better to build an additional binary package (ocradcheck or
ocrad-test) which can be installed during autopkgtest? This seems less
error-prone.

-Nick



Bug#1014924: gtk-gnutella: FTBFS with glibc >= 2.34

2022-07-14 Thread Nick Rosbrook
Package: gtk-gnutella
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Hi,

This is technically not a problem in Debian yet, since sid is on glibc
2.33. But, once glibc >= 2.34 is in place, this package will FTBFS. The
cause is that gtk-gnutella uses preprocessor directives to check
PTHREAD_STACK_MIN at compile time, but in glibc >= 2.34,
PTHREAD_STACK_MIN may be dynamic and cannot be checked at compile time.

In Ubuntu, we pulled an upstream patch to fix compilation with newer
glibc:

  * debian/patches/0001-Fix-compilation-with-newest-glibc.patch: Fix FTBFS
against glibc >= 2.34 by checking dynamically-defined PTHREAD_STACK_MIN 
at run time instead of compile time (LP: #1981474).

This patch should be safe for glibc < 2.34 as well.

Thanks,
Nick
diff -Nru 
gtk-gnutella-1.1.15/debian/patches/0001-Fix-compilation-with-newest-glibc.patch 
gtk-gnutella-1.1.15/debian/patches/0001-Fix-compilation-with-newest-glibc.patch
--- 
gtk-gnutella-1.1.15/debian/patches/0001-Fix-compilation-with-newest-glibc.patch 
1969-12-31 19:00:00.0 -0500
+++ 
gtk-gnutella-1.1.15/debian/patches/0001-Fix-compilation-with-newest-glibc.patch 
2022-07-12 14:20:53.0 -0400
@@ -0,0 +1,63 @@
+Description: Fix compilation with newest glibc
+  The PTHREAD_STACK_MIN value is no longer a constant but rather
+  defined as sysconf(_SC_THREAD_STACK_MIN).
+Author: Raphael Manfredi 
+Origin: upstream, 
https://github.com/gtk-gnutella/gtk-gnutella/commit/31d06cecac572852c6e5e8d85cea641883cbe4c6
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk-gnutella/+bug/1981474
+Last-Update: 2022-07-12
+---
+From: Raphael Manfredi 
+Date: Mon, 9 Aug 2021 09:36:00 +0200
+Subject: [PATCH] Fix compilation with newest glibc.
+
+The PTHREAD_STACK_MIN value is no longer a constant but rather
+defined as sysconf(_SC_THREAD_STACK_MIN).
+
+Therefore, we must avoid using cpp computations on that value.
+---
+ src/lib/thread.c | 7 +--
+ src/lib/thread.h | 2 +-
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/lib/thread.c b/src/lib/thread.c
+index 178c09794..e7a702029 100644
+--- a/src/lib/thread.c
 b/src/lib/thread.c
+@@ -9705,7 +9705,7 @@ thread_launch_trampoline(void *arg)
+  * In case PTHREAD_STACK_MIN is not defined by .
+  */
+ #ifndef PTHREAD_STACK_MIN
+-#define PTHREAD_STACK_MIN 0
++#define PTHREAD_STACK_MIN 1024U
+ #endif
+ 
+ /**
+@@ -9737,12 +9737,7 @@ thread_launch(struct thread_element *te,
+   pthread_attr_init();
+ 
+   if (stack != 0) {
+-  /* Avoid compiler warning when PTHREAD_STACK_MIN == 0 */
+-#if PTHREAD_STACK_MIN != 0
+   stacksize = MAX(PTHREAD_STACK_MIN, stack);
+-#else
+-  stacksize = stack;
+-#endif
+   stacksize = MAX(stacksize, THREAD_STACK_MIN);
+   } else {
+   stacksize = MAX(THREAD_STACK_DFLT, PTHREAD_STACK_MIN);
+diff --git a/src/lib/thread.h b/src/lib/thread.h
+index 73e15fa36..740f3a6f9 100644
+--- a/src/lib/thread.h
 b/src/lib/thread.h
+@@ -63,7 +63,7 @@ typedef size_t thread_qid_t; /* Quasi Thread ID */
+ typedef unsigned int thread_key_t;/* Local thread storage key */
+ 
+ #define THREAD_MAX64  /**< Max amount of 
threads we can track */
+-#define THREAD_STACK_DFLT (65536 * PTRSIZE)   /**< Default stack 
requested */
++#define THREAD_STACK_DFLT (65536U * PTRSIZE)  /**< Default stack 
requested */
+ #define THREAD_LOCAL_MAX  1024/**< Max amount of thread-local keys */
+ 
+ #define THREAD_SUSPEND_TIMEOUT90  /**< secs: thread max 
suspension time */
+-- 
+2.34.1
+
diff -Nru gtk-gnutella-1.1.15/debian/patches/series 
gtk-gnutella-1.1.15/debian/patches/series
--- gtk-gnutella-1.1.15/debian/patches/series   2020-02-26 04:01:31.0 
-0500
+++ gtk-gnutella-1.1.15/debian/patches/series   2022-07-12 14:17:33.0 
-0400
@@ -1 +1,2 @@
 # Auto-applied patches
+0001-Fix-compilation-with-newest-glibc.patch


Bug#1006507: mit-scheme: FTBFS with OpenSSL 3.0

2022-03-21 Thread Nick Rosbrook
Package: mit-scheme
Version: 11.2-2
Followup-For: Bug #1006507
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to fix the mit-scheme build:

  * d/p/0001-microcode-Make-definition-for-chacha_core-match-decl.patch:
Pull in upstream patch to fix -Werror=array-parameter build error.
(LP: #1965163).

Thanks,
Nick
diff -Nru 
mit-scheme-11.2/debian/patches/0001-microcode-Make-definition-for-chacha_core-match-decl.patch
 
mit-scheme-11.2/debian/patches/0001-microcode-Make-definition-for-chacha_core-match-decl.patch
--- 
mit-scheme-11.2/debian/patches/0001-microcode-Make-definition-for-chacha_core-match-decl.patch
  1969-12-31 19:00:00.0 -0500
+++ 
mit-scheme-11.2/debian/patches/0001-microcode-Make-definition-for-chacha_core-match-decl.patch
  2022-03-16 13:36:47.0 -0400
@@ -0,0 +1,29 @@
+Description: Make definition for chacha_core match declaration.
+ Makes no semantic difference but some compilers object now.
+Origin: upstream, 
https://git.savannah.gnu.org/cgit/mit-scheme.git/commit/?id=837bb3f1ca75f867e115bf3a195de2f78517dce1
+Last-Update: 2022-03-16
+---
+From 837bb3f1ca75f867e115bf3a195de2f78517dce1 Mon Sep 17 00:00:00 2001
+From: Taylor R Campbell 
+Date: Fri, 7 May 2021 16:02:08 +
+Subject: [PATCH] microcode: Make definition for chacha_core match declaration.
+
+Makes no semantic difference but some compilers object now.
+---
+ src/microcode/chacha.i | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+--- a/src/microcode/chacha.i
 b/src/microcode/chacha.i
+@@ -77,8 +77,10 @@
+ static const uint8_t chacha_core_constant32[16] = "expand 32-byte k";
+ 
+ void
+-chacha_core(uint8_t *out, const uint8_t *in, const uint8_t *k,
+-const uint8_t *c)
++chacha_core(uint8_t out[chacha_core_OUTPUTBYTES],
++const uint8_t in[chacha_core_INPUTBYTES],
++const uint8_t k[chacha_core_KEYBYTES],
++const uint8_t c[chacha_core_CONSTBYTES])
+ {
+   uint32_t x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15;
+   uint32_t j0,j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15;
diff -Nru mit-scheme-11.2/debian/patches/series 
mit-scheme-11.2/debian/patches/series
--- mit-scheme-11.2/debian/patches/series   2021-08-25 06:09:35.0 
-0400
+++ mit-scheme-11.2/debian/patches/series   2022-03-16 13:15:56.0 
-0400
@@ -4,3 +4,4 @@
 0004-makeinfo-5-fix.patch
 0005-man-page.patch
 0007-verbose-texi2dvi.patch
+0001-microcode-Make-definition-for-chacha_core-match-decl.patch


Bug#1008052: python-pecan FTBFS: build tests fail with python3.10

2022-03-21 Thread Nick Rosbrook
Package: python-pecan
Version: 1.3.3-4
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to fix the build tests when
using python3.10:

  * debian/patches/fix-tests-on-python-3.10.patch: Pull in upstream patch to
fix build tests on python3.10 (LP: #1965132).

Thanks,
Nick
diff -Nru python-pecan-1.3.3/debian/patches/fix-tests-on-python-3.10.patch 
python-pecan-1.3.3/debian/patches/fix-tests-on-python-3.10.patch
--- python-pecan-1.3.3/debian/patches/fix-tests-on-python-3.10.patch
1969-12-31 19:00:00.0 -0500
+++ python-pecan-1.3.3/debian/patches/fix-tests-on-python-3.10.patch
2022-03-18 15:41:48.0 -0400
@@ -0,0 +1,87 @@
+Description: Fix tests to work on Python 3.10
+Origin: upstream, 
https://github.com/pecan/pecan/pull/131/commits/f189d0eafbaacc5b5093bb8854cd2068e22b6c08
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-pecan/+bug/1965132
+---
+From f189d0eafbaacc5b5093bb8854cd2068e22b6c08 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras 
+Date: Wed, 8 Dec 2021 07:01:16 +0200
+Subject: [PATCH] Fix tests to work on Python 3.10
+
+Python 3.10 adds the class name to the exception; adjust four tests
+affected by this change.
+
+Fixes: https://github.com/pecan/pecan/issues/130
+---
+ pecan/tests/test_base.py | 18 +-
+ pecan/tests/test_no_thread_locals.py | 20 ++--
+ 2 files changed, 27 insertions(+), 11 deletions(-)
+--- a/pecan/tests/test_base.py
 b/pecan/tests/test_base.py
+@@ -456,8 +456,12 @@
+ assert type(ex) == TypeError
+ assert ex.args[0] in (
+ "index() takes exactly 2 arguments (1 given)",
+-"index() missing 1 required positional argument: 'id'"
+-)  # this messaging changed in Python 3.3
++"index() missing 1 required positional argument: 'id'",
++(
++"TestControllerArguments.app_..RootController."
++"index() missing 1 required positional argument: 'id'"
++),
++)  # this messaging changed in Python 3.3 and again in Python 3.10
+ 
+ def test_single_argument(self):
+ r = self.app_.get('/1')
+@@ -994,9 +998,13 @@
+ except Exception as ex:
+ assert type(ex) == TypeError
+ assert ex.args[0] in (
+-"eater() takes at least 2 arguments (1 given)",
+-"eater() missing 1 required positional argument: 'id'"
+-)  # this messaging changed in Python 3.3
++"eater() takes exactly 2 arguments (1 given)",
++"eater() missing 1 required positional argument: 'id'",
++(
++"TestControllerArguments.app_..RootController."
++"eater() missing 1 required positional argument: 'id'"
++),
++)  # this messaging changed in Python 3.3 and again in Python 3.10
+ 
+ def test_one_remainder(self):
+ r = self.app_.get('/eater/1')
+--- a/pecan/tests/test_no_thread_locals.py
 b/pecan/tests/test_no_thread_locals.py
+@@ -361,9 +361,13 @@
+ except Exception as ex:
+ assert type(ex) == TypeError
+ assert ex.args[0] in (
+-"index() takes exactly 4 arguments (3 given)",
+-"index() missing 1 required positional argument: 'id'"
+-)  # this messaging changed in Python 3.3
++"index() takes exactly 2 arguments (1 given)",
++"index() missing 1 required positional argument: 'id'",
++(
++"TestControllerArguments.app_..RootController."
++"index() missing 1 required positional argument: 'id'"
++),
++)  # this messaging changed in Python 3.3 and again in Python 3.10
+ 
+ def test_single_argument(self):
+ r = self.app_.get('/1')
+@@ -763,9 +767,13 @@
+ except Exception as ex:
+ assert type(ex) == TypeError
+ assert ex.args[0] in (
+-"eater() takes at least 4 arguments (3 given)",
+-"eater() missing 1 required positional argument: 'id'"
+-)  # this messaging changed in Python 3.3
++"eater() takes exactly 2 arguments (1 given)",
++"eater() missing 1 required positional argument: 'id'",
++(
++"TestControllerArguments.app_..RootController."
++"eater() missing 1 required positional argument: 'id'"
++),
++)  # this messaging changed in Python 3.3 and again in Python 3.10
+ 
+ def test_one_remainder(self):
+ r = self.app_.get('/eater/1')
diff -Nru python-pecan-1.3.3/debian/patches/series 

Bug#1008050: golang-github-valyala-fasthttp: autopkgtest regression: 32-bit tests running on s390x

2022-03-21 Thread Nick Rosbrook
Package: golang-github-valyala-fasthttp
Version: 1:1.31.0-3
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to fix autopkgtest on s390x:

  * debian/patches/0001-bytesconv-add-appropriate-build-tags-for-s390x.patch:
Add appropriate build tags for s390x. This fixes an autopkgtest regression
on this architecture (LP: #1965134).

Thanks,
Nick
diff -Nru 
golang-github-valyala-fasthttp-1.31.0/debian/patches/0001-bytesconv-add-appropriate-build-tags-for-s390x.patch
 
golang-github-valyala-fasthttp-1.31.0/debian/patches/0001-bytesconv-add-appropriate-build-tags-for-s390x.patch
--- 
golang-github-valyala-fasthttp-1.31.0/debian/patches/0001-bytesconv-add-appropriate-build-tags-for-s390x.patch
  1969-12-31 19:00:00.0 -0500
+++ 
golang-github-valyala-fasthttp-1.31.0/debian/patches/0001-bytesconv-add-appropriate-build-tags-for-s390x.patch
  2022-03-16 09:52:43.0 -0400
@@ -0,0 +1,73 @@
+Description: Add appropriate build tags for s390x
+ The bytesconv 32-bit tests fail on s390x, because it is a 64-bit
+ architecture. Add the appropriate build flags so that 32-bit tests do
+ not run on this architecture.
+Author: Nick Rosbrook 
+Forwarded: https://github.com/valyala/fasthttp/pull/1250
+Last-Update: 2022-03-16
+---
+From d6c6e4a7cc9c17158dc2c93090e5b7d26ca42e15 Mon Sep 17 00:00:00 2001
+From: Nick Rosbrook 
+Date: Wed, 16 Mar 2022 09:41:03 -0400
+Subject: [PATCH] bytesconv: add appropriate build tags for s390x
+
+The bytesconv 32-bit tests fail on s390x, because it is a 64-bit
+architecture. Add the appropriate build flags so that 32-bit tests do
+not run on this architecture.
+---
+ bytesconv_32.go  | 4 ++--
+ bytesconv_32_test.go | 4 ++--
+ bytesconv_64.go  | 4 ++--
+ bytesconv_64_test.go | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+diff --git a/bytesconv_32.go b/bytesconv_32.go
+index 6a6fec2..b574883 100644
+--- a/bytesconv_32.go
 b/bytesconv_32.go
+@@ -1,5 +1,5 @@
+-//go:build !amd64 && !arm64 && !ppc64 && !ppc64le
+-// +build !amd64,!arm64,!ppc64,!ppc64le
++//go:build !amd64 && !arm64 && !ppc64 && !ppc64le && !s390x
++// +build !amd64,!arm64,!ppc64,!ppc64le,!s390x
+ 
+ package fasthttp
+ 
+diff --git a/bytesconv_32_test.go b/bytesconv_32_test.go
+index cec5aa9..3f5d5de 100644
+--- a/bytesconv_32_test.go
 b/bytesconv_32_test.go
+@@ -1,5 +1,5 @@
+-//go:build !amd64 && !arm64 && !ppc64 && !ppc64le
+-// +build !amd64,!arm64,!ppc64,!ppc64le
++//go:build !amd64 && !arm64 && !ppc64 && !ppc64le && !s390x
++// +build !amd64,!arm64,!ppc64,!ppc64le,!s390x
+ 
+ package fasthttp
+ 
+diff --git a/bytesconv_64.go b/bytesconv_64.go
+index 1300d5a..94d0ec6 100644
+--- a/bytesconv_64.go
 b/bytesconv_64.go
+@@ -1,5 +1,5 @@
+-//go:build amd64 || arm64 || ppc64 || ppc64le
+-// +build amd64 arm64 ppc64 ppc64le
++//go:build amd64 || arm64 || ppc64 || ppc64le || s390x
++// +build amd64 arm64 ppc64 ppc64le s390x
+ 
+ package fasthttp
+ 
+diff --git a/bytesconv_64_test.go b/bytesconv_64_test.go
+index 5351591..0689809 100644
+--- a/bytesconv_64_test.go
 b/bytesconv_64_test.go
+@@ -1,5 +1,5 @@
+-//go:build amd64 || arm64 || ppc64 || ppc64le
+-// +build amd64 arm64 ppc64 ppc64le
++//go:build amd64 || arm64 || ppc64 || ppc64le || s390x
++// +build amd64 arm64 ppc64 ppc64le s390x
+ 
+ package fasthttp
+ 
+-- 
+2.32.0
+
diff -Nru golang-github-valyala-fasthttp-1.31.0/debian/patches/series 
golang-github-valyala-fasthttp-1.31.0/debian/patches/series
--- golang-github-valyala-fasthttp-1.31.0/debian/patches/series 1969-12-31 
19:00:00.0 -0500
+++ golang-github-valyala-fasthttp-1.31.0/debian/patches/series 2022-03-16 
09:44:45.0 -0400
@@ -0,0 +1 @@
+0001-bytesconv-add-appropriate-build-tags-for-s390x.patch


Bug#995624: pktstat FTBFS: error: format not a string literal and no format arguments [-Werror=format-security]

2022-03-21 Thread Nick Rosbrook
Package: pktstat
Version: 1.8.5-7
Followup-For: Bug #995624
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to fix the pktstat build.

  * debian/patches/0001-Fix-format-string-error-with-recent-ncurses.patch:
Add patch to fix -Werror=format-security build error (LP: #1965174).

Thanks,
Nick
diff -Nru 
pktstat-1.8.5/debian/patches/0001-Fix-format-string-error-with-recent-ncurses.patch
 
pktstat-1.8.5/debian/patches/0001-Fix-format-string-error-with-recent-ncurses.patch
--- 
pktstat-1.8.5/debian/patches/0001-Fix-format-string-error-with-recent-ncurses.patch
 1969-12-31 19:00:00.0 -0500
+++ 
pktstat-1.8.5/debian/patches/0001-Fix-format-string-error-with-recent-ncurses.patch
 2022-03-17 13:23:20.0 -0400
@@ -0,0 +1,26 @@
+Description: Fix format string error with recent ncurses
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995624
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pktstat/+bug/1965174
+Author: Sven Joachim 
+Last-Update: 2022-03-16
+---
+From f3368493fe0365f7f37064fb0ae5fd1fba50fc36 Mon Sep 17 00:00:00 2001
+From: Sven Joachim 
+Date: Thu, 14 Oct 2021 19:40:32 +0200
+Subject: [PATCH] Fix format string error with recent ncurses
+
+---
+ display.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/display.c
 b/display.c
+@@ -669,7 +669,7 @@
+   attron(A_REVERSE);
+   printw("%c", h->name[0]);
+   attroff(A_UNDERLINE);
+-  printw((char *)h->name + 1);
++  printw("%s", (char *)h->name + 1);
+   attrset(0);
+   printw(" ");
+   }
diff -Nru pktstat-1.8.5/debian/patches/series 
pktstat-1.8.5/debian/patches/series
--- pktstat-1.8.5/debian/patches/series 2021-08-24 15:20:56.0 -0400
+++ pktstat-1.8.5/debian/patches/series 2022-03-16 15:17:07.0 -0400
@@ -1 +1,2 @@
 10-CVE-2013-0350-bug-701211-no-tmp.patch
+0001-Fix-format-string-error-with-recent-ncurses.patch


Bug#997847: golang-github-hashicorp-go-slug: autopkgtest regression: testdata/archive-dir: no such file or directory

2022-03-21 Thread Nick Rosbrook
Package: golang-github-hashicorp-go-slug
Version: 0.7.0-1
Followup-For: Bug #997847
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to fix autopkgtest
regressions:

  * debian/patches/disable-strange-tests.patch: Refresh the patch to include
new tests that try to access testdata/archive-dir. This fixes an
autopkgtest failure (LP: #1965429).

Thanks,
Nick
diff -Nru 
golang-github-hashicorp-go-slug-0.7.0/debian/patches/disable-strange-tests.patch
 
golang-github-hashicorp-go-slug-0.7.0/debian/patches/disable-strange-tests.patch
--- 
golang-github-hashicorp-go-slug-0.7.0/debian/patches/disable-strange-tests.patch
2021-10-05 14:31:50.0 -0400
+++ 
golang-github-hashicorp-go-slug-0.7.0/debian/patches/disable-strange-tests.patch
2022-03-17 14:36:15.0 -0400
@@ -1,11 +1,20 @@
 Description: some tests require files in paths that are not compatible with 
Debian packaging
  in order to make life easier, these tests are disabled
 Author: Thorsten Alteholz 
-Index: golang-github-hashicorp-go-slug-0.7.0/slug_test.go
-===
 golang-github-hashicorp-go-slug-0.7.0.orig/slug_test.go2021-10-06 
06:10:32.879315260 +
-+++ golang-github-hashicorp-go-slug-0.7.0/slug_test.go 2021-10-06 
06:13:39.728065809 +
-@@ -14,231 +14,231 @@
+--- a/slug_test.go
 b/slug_test.go
+@@ -2,10 +2,8 @@
+ 
+ import (
+   "archive/tar"
+-  "bytes"
+   "compress/gzip"
+   "errors"
+-  "io"
+   "io/ioutil"
+   "os"
+   "path/filepath"
+@@ -14,338 +12,338 @@
"testing"
  )
  
@@ -234,6 +243,113 @@
 -  t.Fatalf("\nexpect:\n%#v\n\nactual:\n%#v", expect, meta)
 -  }
 -}
+-
+-func TestPackWithoutIgnoring(t *testing.T) {
+-  slug := bytes.NewBuffer(nil)
+-
+-  // By default NewPacker() creates a Packer that does not use
+-  // .terraformignore or dereference symlinks.
+-  p, err := NewPacker()
+-  if err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-
+-  meta, err := p.Pack("testdata/archive-dir", slug)
+-  if err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-
+-  gzipR, err := gzip.NewReader(slug)
+-  if err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-
+-  tarR := tar.NewReader(gzipR)
+-  var (
+-  fileList []string
+-  slugSize int64
+-  )
+-
+-  for {
+-  hdr, err := tarR.Next()
+-  if err == io.EOF {
+-  break
+-  }
+-  if err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-
+-  fileList = append(fileList, hdr.Name)
+-  if hdr.Typeflag == tar.TypeReg || hdr.Typeflag == tar.TypeRegA {
+-  slugSize += hdr.Size
+-  }
+-  }
+-
+-  // baz.txt would normally be ignored, but should not be
+-  var bazFound bool
+-  for _, file := range fileList {
+-  if file == "baz.txt" {
+-  bazFound = true
+-  }
+-  }
+-  if !bazFound {
+-  t.Fatal("expected file baz.txt to be present, but not found")
+-  }
+-
+-  // .terraform/file.txt would normally be ignored, but should not be
+-  var dotTerraformFileFound bool
+-  for _, file := range fileList {
+-  if file == ".terraform/file.txt" {
+-  dotTerraformFileFound = true
+-  }
+-  }
+-  if !dotTerraformFileFound {
+-  t.Fatal("expected file .terraform/file.txt to be present, but 
not found")
+-  }
+-
+-  // Check the metadata
+-  expect := {
+-  Files: fileList,
+-  Size:  slugSize,
+-  }
+-  if !reflect.DeepEqual(meta, expect) {
+-  t.Fatalf("\nexpect:\n%#v\n\nactual:\n%#v", expect, meta)
+-  }
+-}
+-
+-func TestUnpack(t *testing.T) {
+-  // First create the slug file so we can try to unpack it.
+-  slug := bytes.NewBuffer(nil)
+-
+-  if _, err := Pack("testdata/archive-dir", slug, true); err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-
+-  // Create a dir to unpack into.
+-  dst, err := ioutil.TempDir("", "slug")
+-  if err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-  defer os.RemoveAll(dst)
+-
+-  // Now try unpacking it.
+-  if err := Unpack(slug, dst); err != nil {
+-  t.Fatalf("err: %v", err)
+-  }
+-
+-  // Verify all the files
+-  verifyFile(t, filepath.Join(dst, "foo.txt"), 0, "foo\n")
+-  verifyFile(t, filepath.Join(dst, "bar.txt"), 0, "bar\n")
+-  verifyFile(t, filepath.Join(dst, "sub", "bar.txt"), os.ModeSymlink, 
"../bar.txt")
+-  verifyFile(t, filepath.Join(dst, "sub", "zip.txt"), 0, "zip\n")
+-
+-  // Check that we can 

Bug#1006763: python-reportlab: fails to build with python3.10

2022-03-04 Thread Nick Rosbrook
Package: python-reportlab
Version: 3.6.7-1.1
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Hi,

The package fails to build with python3.10 because the VER3 variable is
incorrectly set to '3.1', which leads to PYTHONPATH being empty. This
patch corrects this by using py3versions to set VER3:

  * Non-maintainer upload.
  * d/rules: Use py3versions to set VER3 variable.

Thanks,
Nick
diff -Nru python-reportlab-3.6.7/debian/rules 
python-reportlab-3.6.7/debian/rules
--- python-reportlab-3.6.7/debian/rules 2021-09-15 08:01:53.0 -0400
+++ python-reportlab-3.6.7/debian/rules 2022-03-04 07:57:07.0 -0500
@@ -5,7 +5,7 @@
 
 # all versions
 PY3VERS:= $(shell py3versions -vs)
-VER3   := $(shell /usr/bin/python3 -c 'import sys; print(sys.version[:3])')
+VER3   := $(shell py3versions -vd)
 
 include /usr/share/python3/python.mk