Bug#1062896: shishi: NMU diff for 64-bit time_t transition

2024-03-15 Thread Simon Josefsson via Discussion list for GNU Shishi
reopen 1062896
thanks

Benjamin Drung  writes:

> Source: shishi
> Dear maintainer,
>
> Please find attached a final version of this patch for the time_t
> transition.  This patch is being uploaded to unstable.
>
> Note that this adds a versioned build-dependency on dpkg-dev, to guard
> against accidental backports with a wrong ABI.

Thanks for working on this.

I noticed that autopkgtest for 1.0.3-2.1 fails on i386:

https://ci.debian.net/packages/s/shishi/testing/i386/43439759/

It is time related:

100s PASS: gcc tests/gztime.c
100s Segmentation fault

Debugging this (with help from #debian-devel) led me down several chains
of discoveries.  I believe that this package has enabled and assumes
64-bit time_t on all 32-bit platforms for a long time, including i386.
Look at how the old version before your changes behave:

jas@kaka:~$ podman run --arch=386 -it --rm debian:testing
root@78d65bc11b9f:/# cat /etc/apt/sources.list.d/debian.sources | sed 's,: 
deb,: deb-src,' > /etc/apt/sources.list.d/src.sources
root@78d65bc11b9f:/# apt update
root@78d65bc11b9f:~# apt install libshishi-dev build-essential
Get:76 http://deb.debian.org/debian testing/main i386 libshishi-dev i386 
1.0.3-2 [217 kB]
root@78d65bc11b9f:~# apt source shishi
root@78d65bc11b9f:~# cd shishi-1.0.3/
root@78d65bc11b9f:~/shishi-1.0.3# touch config.h
root@78d65bc11b9f:~/shishi-1.0.3# WORKDIR=.
root@78d65bc11b9f:~/shishi-1.0.3# gcc -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 
-I$WORKDIR -Ilib/gl -D_GL_ATTRIBUTE_CONST= -DPACKAGE='"shishi"' -o $WORKDIR/foo 
tests/gztime.c `pkg-config --cflags --libs shishi`
root@78d65bc11b9f:~/shishi-1.0.3# ./foo
root@78d65bc11b9f:~/shishi-1.0.3# gcc -I$WORKDIR -Ilib/gl 
-D_GL_ATTRIBUTE_CONST= -DPACKAGE='"shishi"' -o $WORKDIR/foo tests/gztime.c 
`pkg-config --cflags --libs shishi`
root@78d65bc11b9f:~/shishi-1.0.3# ./foo
Segmentation fault (core dumped)
root@78d65bc11b9f:~/shishi-1.0.3# 

This suggests passing 32-bit time_t to this library break before your
change, and it breaks after your changes too.  See earlier debci failure
for 1.0.3-2 without your t64 changes here that confirms this hypothesis:

https://ci.debian.net/packages/s/shishi/testing/i386/43917754/

So the library is 64-bit only even on 32-bit architectures, or at least
i386, I briefly compared build logs on armhf too.

You can re-run the snippet above on unstable instead, and you will see
it behaves the same for 1.0.3-2.1.  So the t64 patches did not modify
any ABI at all.

As far as I understand, this means this package does not need any
t64-migration at all, and your NMU should be reverted.  Do you agree?

Arguable the package header .h file should not use the time_t type since
the shared library ABI will only work if the application uses 64-bit
time_t, but on i386 the normal approach is to have 32-bit time_t.  This
would be an upstream wishlist, it was suggested to replace time_t with
int64_t so that callers that pass 32-bit time_t would get automatically
extended, which is one solution.

/Simon

> Thanks!
>
>
> -- System Information:
> Debian Release: trixie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 6.5.0-21-generic (SMP w/16 CPU threads; PREEMPT)
> Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
> TAINT_UNSIGNED_MODULE
> Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: unable to detect
>
> diff -Nru shishi-1.0.3/debian/changelog shishi-1.0.3/debian/changelog
> --- shishi-1.0.3/debian/changelog 2024-01-30 16:09:13.0 +
> +++ shishi-1.0.3/debian/changelog 2024-02-29 15:52:14.0 +
> @@ -1,3 +1,10 @@
> +shishi (1.0.3-2.1) unstable; urgency=medium
> +
> +  * Non-maintainer upload.
> +  * Rename libraries for 64-bit time_t transition.  Closes: #1062896
> +
> + -- Benjamin Drung   Thu, 29 Feb 2024 15:52:14 +
> +
>  shishi (1.0.3-2) unstable; urgency=medium
>  
>[ Simon Josefsson ]
> diff -Nru shishi-1.0.3/debian/control shishi-1.0.3/debian/control
> --- shishi-1.0.3/debian/control   2024-01-30 15:57:25.0 +
> +++ shishi-1.0.3/debian/control   2024-02-29 15:52:14.0 +
> @@ -5,7 +5,7 @@
>  Uploaders:
>   Simon Josefsson ,
>   Russ Allbery ,
> -Build-Depends:
> +Build-Depends: dpkg-dev (>= 1.22.5),
>   debhelper-compat (= 13),
>   libgcrypt-dev,
>   libgnutls28-dev,
> @@ -25,7 +25,10 @@
>  Homepage: https://www.gnu.org/software/shishi/
>  Rules-Requires-Root: no
>  
> -Package: libshishi0
> +Package: libshishi0t64
> +Provides: ${t64:Provides}
> +Replaces: libshishi0
> +Breaks: libshishi0 (<< ${source:Version})
>  Section: libs
>  Architecture: any
>  Multi-Arch: same
> @@ -63,7 +66,7 @@
>  Architecture: any
>  Multi-Arch: same
>  Depends:
> - libshisa0 (= ${binary:Version}),
> + libshisa0t64 (= ${binary:Version}),
>   libshishi-dev (= ${binary:Version}),
>   ${misc:Depends},
>  Description: Development files for the Shishi

Processed: Re: Bug#1062896: shishi: NMU diff for 64-bit time_t transition

2024-03-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> reopen 1062896
Bug #1062896 {Done: Benjamin Drung } [src:shishi] shishi: 
NMU diff for 64-bit time_t transition
'reopen' may be inappropriate when a bug has been closed with a version;
all fixed versions will be cleared, and you may need to re-add them.
Bug reopened
No longer marked as fixed in versions shishi/1.0.3-2.1.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
1062896: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062896
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#1062896: shishi: NMU diff for 64-bit time_t transition

2024-02-29 Thread Benjamin Drung
Source: shishi
Dear maintainer,

Please find attached a final version of this patch for the time_t
transition.  This patch is being uploaded to unstable.

Note that this adds a versioned build-dependency on dpkg-dev, to guard
against accidental backports with a wrong ABI.

Thanks!


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-21-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
diff -Nru shishi-1.0.3/debian/changelog shishi-1.0.3/debian/changelog
--- shishi-1.0.3/debian/changelog   2024-01-30 16:09:13.0 +
+++ shishi-1.0.3/debian/changelog   2024-02-29 15:52:14.0 +
@@ -1,3 +1,10 @@
+shishi (1.0.3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Rename libraries for 64-bit time_t transition.  Closes: #1062896
+
+ -- Benjamin Drung   Thu, 29 Feb 2024 15:52:14 +
+
 shishi (1.0.3-2) unstable; urgency=medium
 
   [ Simon Josefsson ]
diff -Nru shishi-1.0.3/debian/control shishi-1.0.3/debian/control
--- shishi-1.0.3/debian/control 2024-01-30 15:57:25.0 +
+++ shishi-1.0.3/debian/control 2024-02-29 15:52:14.0 +
@@ -5,7 +5,7 @@
 Uploaders:
  Simon Josefsson ,
  Russ Allbery ,
-Build-Depends:
+Build-Depends: dpkg-dev (>= 1.22.5),
  debhelper-compat (= 13),
  libgcrypt-dev,
  libgnutls28-dev,
@@ -25,7 +25,10 @@
 Homepage: https://www.gnu.org/software/shishi/
 Rules-Requires-Root: no
 
-Package: libshishi0
+Package: libshishi0t64
+Provides: ${t64:Provides}
+Replaces: libshishi0
+Breaks: libshishi0 (<< ${source:Version})
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -63,7 +66,7 @@
 Architecture: any
 Multi-Arch: same
 Depends:
- libshisa0 (= ${binary:Version}),
+ libshisa0t64 (= ${binary:Version}),
  libshishi-dev (= ${binary:Version}),
  ${misc:Depends},
 Description: Development files for the Shishi Kerberos v5 KDC database library
@@ -73,7 +76,10 @@
  This package contain all files necessary for developing programs with
  Shishi KDC database support.
 
-Package: libshisa0
+Package: libshisa0t64
+Provides: ${t64:Provides}
+Replaces: libshisa0
+Breaks: libshisa0 (<< ${source:Version})
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -99,7 +105,7 @@
 Depends:
  libgnutls28-dev,
  libidn-dev,
- libshishi0 (= ${binary:Version}),
+ libshishi0t64 (= ${binary:Version}),
  ${misc:Depends},
 Description: Development files for the Shishi Kerberos v5 library
  Shishi is an implementation of the kerberos v5 network authentication
diff -Nru shishi-1.0.3/debian/libshisa0.dirs shishi-1.0.3/debian/libshisa0.dirs
--- shishi-1.0.3/debian/libshisa0.dirs  2022-08-07 02:17:31.0 +
+++ shishi-1.0.3/debian/libshisa0.dirs  1970-01-01 00:00:00.0 +
@@ -1 +0,0 @@
-/var/lib/shishi
diff -Nru shishi-1.0.3/debian/libshisa0.install 
shishi-1.0.3/debian/libshisa0.install
--- shishi-1.0.3/debian/libshisa0.install   2022-08-07 02:17:31.0 
+
+++ shishi-1.0.3/debian/libshisa0.install   1970-01-01 00:00:00.0 
+
@@ -1 +0,0 @@
-usr/lib/*/libshisa.so.*
diff -Nru shishi-1.0.3/debian/libshisa0.symbols 
shishi-1.0.3/debian/libshisa0.symbols
--- shishi-1.0.3/debian/libshisa0.symbols   2022-08-07 02:17:31.0 
+
+++ shishi-1.0.3/debian/libshisa0.symbols   1970-01-01 00:00:00.0 
+
@@ -1,37 +0,0 @@
-libshisa.so.0 libshisa0 #MINVER#
-* Build-Depends-Package: libshisa-dev
- SHISA_0.0@SHISA_0.0 0.0.39
- shisa@SHISA_0.0 0.0.39
- shisa_cfg@SHISA_0.0 0.0.39
- shisa_cfg_db@SHISA_0.0 0.0.39
- shisa_cfg_default_systemfile@SHISA_0.0 0.0.39
- shisa_cfg_from_file@SHISA_0.0 0.0.39
- shisa_done@SHISA_0.0 0.0.39
- shisa_enumerate_principals@SHISA_0.0 0.0.39
- shisa_enumerate_realms@SHISA_0.0 0.0.39
- shisa_file_done@SHISA_0.0 0.0.39
- shisa_file_enumerate_principals@SHISA_0.0 0.0.39
- shisa_file_enumerate_realms@SHISA_0.0 0.0.39
- shisa_file_init@SHISA_0.0 0.0.39
- shisa_file_key_add@SHISA_0.0 0.0.39
- shisa_file_key_remove@SHISA_0.0 0.0.39
- shisa_file_key_update@SHISA_0.0 0.0.39
- shisa_file_keys_find@SHISA_0.0 0.0.39
- shisa_file_principal_add@SHISA_0.0 0.0.39
- shisa_file_principal_find@SHISA_0.0 0.0.39
- shisa_file_principal_remove@SHISA_0.0 0.0.39
- shisa_file_principal_update@SHISA_0.0 0.0.39
- shisa_info@SHISA_0.0 0.0.39
- shisa_init@SHISA_0.0 0.0.39
- shisa_init_with_paths@SHISA_0.0 0.0.39
- shisa_key_add@SHISA_0.0 0.0.39
- shisa_key_free@SHISA_0.0 0.0.39
- shisa_key_remove@SHISA_0.0 0.0.39
- shisa_key_update@SHISA_0.0 0.0.39
- shisa_keys_find@SHISA_0.0 0.0.39
- shisa_keys_free@SHISA_0.0 0.0.39
- shisa_principal_add@SHISA_0.0 0.0.39
- shisa_principal_find@SHISA_0.0 0.0.39
- shisa_principal_remove@SHISA_0.0 0.0.39
- shisa_principal_update@SHISA_0.0 0.0.39
- shisa_strer

Bug#1062896: shishi: NMU diff for 64-bit time_t transition

2024-02-03 Thread Sergio Durigan Junior
Source: shishi
Version: 1.0.3-2
Severity: serious
Tags: patch pending sid trixie
Justification: library ABI skew on upgrade
User: debian-...@lists.debian.org
Usertags: time-t

NOTICE: these changes must not be uploaded to unstable yet!

Dear maintainer,

As part of the 64-bit time_t transition required to support 32-bit
architectures in 2038 and beyond
(https://wiki.debian.org/ReleaseGoals/64bit-time), we have identified
shishi as a source package shipping runtime libraries whose ABI
either is affected by the change in size of time_t, or could not be
analyzed via abi-compliance-checker (and therefore to be on the safe
side we assume is affected).

To ensure that inconsistent combinations of libraries with their
reverse-dependencies are never installed together, it is necessary to
have a library transition, which is most easily done by renaming the
runtime library package.

Since turning on 64-bit time_t is being handled centrally through a change
to the default dpkg-buildflags (https://bugs.debian.org/1037136), it is
important that libraries affected by this ABI change all be uploaded close
together in time.  Therefore I have prepared a 0-day NMU for shishi
which will initially be uploaded to experimental if possible, then to
unstable after packages have cleared binary NEW.

Please find the patch for this NMU attached.

If you have any concerns about this patch, please reach out ASAP.  Although
this package will be uploaded to experimental immediately, there will be a
period of several days before we begin uploads to unstable; so if information
becomes available that your package should not be included in the transition,
there is time for us to amend the planned uploads.



-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-5-amd64 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
diff -Nru shishi-1.0.3/debian/changelog shishi-1.0.3/debian/changelog
--- shishi-1.0.3/debian/changelog   2024-01-30 16:09:13.0 +
+++ shishi-1.0.3/debian/changelog   2024-02-03 21:57:34.0 +
@@ -1,3 +1,10 @@
+shishi (1.0.3-2.1) experimental; urgency=medium
+
+  * Non-maintainer upload.
+  * Rename libraries for 64-bit time_t transition.
+
+ -- Sergio Durigan Junior   Sat, 03 Feb 2024 21:57:34 
+
+
 shishi (1.0.3-2) unstable; urgency=medium
 
   [ Simon Josefsson ]
diff -Nru shishi-1.0.3/debian/control shishi-1.0.3/debian/control
--- shishi-1.0.3/debian/control 2024-01-30 15:57:25.0 +
+++ shishi-1.0.3/debian/control 2024-02-03 21:57:34.0 +
@@ -25,7 +25,10 @@
 Homepage: https://www.gnu.org/software/shishi/
 Rules-Requires-Root: no
 
-Package: libshishi0
+Package: libshishi0t64
+Provides: ${t64:Provides}
+Replaces: libshishi0
+Breaks: libshishi0 (<< ${source:Version})
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -63,7 +66,7 @@
 Architecture: any
 Multi-Arch: same
 Depends:
- libshisa0 (= ${binary:Version}),
+ libshisa0t64 (= ${binary:Version}),
  libshishi-dev (= ${binary:Version}),
  ${misc:Depends},
 Description: Development files for the Shishi Kerberos v5 KDC database library
@@ -73,7 +76,10 @@
  This package contain all files necessary for developing programs with
  Shishi KDC database support.
 
-Package: libshisa0
+Package: libshisa0t64
+Provides: ${t64:Provides}
+Replaces: libshisa0
+Breaks: libshisa0 (<< ${source:Version})
 Section: libs
 Architecture: any
 Multi-Arch: same
@@ -99,7 +105,7 @@
 Depends:
  libgnutls28-dev,
  libidn-dev,
- libshishi0 (= ${binary:Version}),
+ libshishi0t64 (= ${binary:Version}),
  ${misc:Depends},
 Description: Development files for the Shishi Kerberos v5 library
  Shishi is an implementation of the kerberos v5 network authentication
diff -Nru shishi-1.0.3/debian/libshisa0.dirs shishi-1.0.3/debian/libshisa0.dirs
--- shishi-1.0.3/debian/libshisa0.dirs  2022-08-07 02:17:31.0 +
+++ shishi-1.0.3/debian/libshisa0.dirs  1970-01-01 00:00:00.0 +
@@ -1 +0,0 @@
-/var/lib/shishi
diff -Nru shishi-1.0.3/debian/libshisa0.install 
shishi-1.0.3/debian/libshisa0.install
--- shishi-1.0.3/debian/libshisa0.install   2022-08-07 02:17:31.0 
+
+++ shishi-1.0.3/debian/libshisa0.install   1970-01-01 00:00:00.0 
+
@@ -1 +0,0 @@
-usr/lib/*/libshisa.so.*
diff -Nru shishi-1.0.3/debian/libshisa0.symbols 
shishi-1.0.3/debian/libshisa0.symbols
--- shishi-1.0.3/debian/libshisa0.symbols   2022-08-07 02:17:31.0 
+
+++ shishi-1.0.3/debian/libshisa0.symbols   1970-01-01 00:00:00.0 
+
@@ -1,37 +0,0 @@
-libshisa.so.0 libshisa0 #MINVER#
-* Build-Depends-Package: libshisa-dev
- SHISA_0.0@SHISA_0.0 0.0.39
- shisa@SHISA_0.0 0.0.39
- shisa_cfg@SHISA_0.0 0.0.39
- shis