Bug#1061077: golang-github-gookit-color: FTBFS in ubuntu due to unknown TERM env

2024-01-17 Thread upils
Package: golang-github-gookit-color
Version: 1.5.4-2
Severity: serious
Tags: ftbfs patch
Justification: fails to build from source
X-Debbugs-Cc: paul.m...@canonical.com

Dear Maintainer,

In ubuntu this package FTBFS because the TERM env var is set to unknown,
thus preventing some tests from working properly.

This is fixed by setting TERM to a "valid" value. Here is a patch:


diff -Nru golang-github-gookit-color-1.5.4/debian/rules 
golang-github-gookit-color-1.5.4/debian/rules
--- golang-github-gookit-color-1.5.4/debian/rules   2023-10-23 
19:08:31.0 +0200
+++ golang-github-gookit-color-1.5.4/debian/rules   2024-01-17 
15:54:30.0 +0100
@@ -3,5 +3,7 @@
 export DH_GOLANG_EXCLUDES := _examples/
 export DH_GOLANG_INSTALL_EXTRA := README.md

+export TERM=xterm-256color
+
 %:
dh $@ --builddirectory=_build --buildsystem=golang --with=golang



-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-14-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



Bug#1060915: golang-entgo-ent: Flaky tests due to relying on default result ordering

2024-01-16 Thread upils
Package: golang-entgo-ent
Version: 0.11.3-4
Severity: serious
Tags: ftbfs patch upstream
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: paul.m...@canonical.com

Dear Maintainer,

A test of the golang test suite of ent is sometimes failing because the results 
fetched from the database are not sorted as expected.

681s === RUN   Example_M2M2Types
681s --- FAIL: Example_M2M2Types (0.00s)
681s got:
681s [Group(id=2, name=GitLab) Group(id=1, name=GitHub)]
681s [Group(id=1, name=GitHub)]
681s [User(id=1, age=30, name=a8m) User(id=2, age=28, name=nati)]
681s want:
681s [Group(id=1, name=GitHub) Group(id=2, name=GitLab)]
681s [Group(id=1, name=GitHub)]
681s [User(id=1, age=30, name=a8m) User(id=2, age=28, name=nati)]

By default sqlite does not guaranty results ordering but this can go unnoticed 
on simple cases. I suspect some race condition somewhere is triggering the bug 
and the 2 results are swapped.

To make it reliable we need to explicitly call .Order(ent.Asc("id")).


-- System Information:
Debian Release: bookworm/sid
  APT prefers jammy-updates
  APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), 
(100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-14-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled