Bug#1062995: tslib: NMU diff for 64-bit time_t transition

2024-02-28 Thread Steve Langasek
On Wed, Feb 28, 2024 at 08:44:13PM +, Martin Kepplinger wrote:
> Am Mittwoch, dem 28.02.2024 um 19:50 + schrieb Steve Langasek:
> > 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 the patch, I'll apply it to the tslib debian package repo.
> So when updating the package later (upstream updates) I only work on
> top of this patch, the package simply is renamed from now on but I
> won't worry about it. Is that the plan? For unstable at least I assume
> so.

Yes, that's the plan! and the next time there is an upstream soname change,
you can drop any t64 references.

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: PGP signature


Bug#1062995: tslib: NMU diff for 64-bit time_t transition

2024-02-28 Thread Martin Kepplinger
Am Mittwoch, dem 28.02.2024 um 19:50 + schrieb Steve Langasek:
> 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!
> 

Thanks for the patch, I'll apply it to the tslib debian package repo.
So when updating the package later (upstream updates) I only work on
top of this patch, the package simply is renamed from now on but I
won't worry about it. Is that the plan? For unstable at least I assume
so.

thanks,

 martin

> 
> -- System Information:
> Debian Release: trixie/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 6.5.0-14-generic (SMP w/12 CPU threads; PREEMPT)
> Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
> Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)



signature.asc
Description: This is a digitally signed message part


Bug#1062995: tslib: NMU diff for 64-bit time_t transition

2024-02-28 Thread Steve Langasek
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-14-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru tslib-1.22/debian/changelog tslib-1.22/debian/changelog
--- tslib-1.22/debian/changelog 2020-07-01 10:52:20.0 +
+++ tslib-1.22/debian/changelog 2024-02-28 19:49:38.0 +
@@ -1,3 +1,10 @@
+tslib (1.22-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Rename libraries for 64-bit time_t transition.  Closes: #1062995
+
+ -- Steve Langasek   Wed, 28 Feb 2024 19:49:38 +
+
 tslib (1.22-1) unstable; urgency=low
 
   * Update to tslib version 1.22
diff -Nru tslib-1.22/debian/control tslib-1.22/debian/control
--- tslib-1.22/debian/control   2019-01-24 08:06:36.0 +
+++ tslib-1.22/debian/control   2024-02-28 19:49:38.0 +
@@ -2,19 +2,20 @@
 Section: embedded
 Priority: optional
 Maintainer: Martin Kepplinger 
-Build-Depends: debhelper (>= 10), automake | automaken, autoconf, libtool, 
pkg-config
+Build-Depends: dpkg-dev (>= 1.22.5), debhelper (>= 10), automake | automaken, 
autoconf, libtool, pkg-config
 Standards-Version: 4.2.1
 Homepage: http://tslib.org
 Vcs-Git: https://github.com/merge/tslib-debian
 Vcs-Browser: https://github.com/merge/tslib-debian
 
-Package: libts0
+Package: libts0t64
+Provides: ${t64:Provides}
 Architecture: any
 Section: libs
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Breaks: tsconf
-Replaces: tsconf
+Breaks: libts0 (<< ${source:Version}), tsconf
+Replaces: libts0, tsconf
 Multi-Arch: same
 Description: touch screen library
  Tslib is an abstraction layer for touchscreen panel events, as well as a
@@ -25,7 +26,7 @@
 Package: libts-dev
 Architecture: any
 Section: libdevel
-Depends: libts0 (=${binary:Version}), ${misc:Depends}
+Depends: libts0t64 (=${binary:Version}), ${misc:Depends}
 Multi-Arch: same
 Description: touch screen library, development files
  Tslib is an abstraction layer for touchscreen panel events, as well as a
@@ -36,7 +37,7 @@
 
 Package: libts-bin
 Architecture: any
-Depends: libts0 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: libts0t64 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Multi-Arch: foreign
 Description: touch screen library utilities
  Tslib is an abstraction layer for touchscreen panel events, as well as a
diff -Nru tslib-1.22/debian/libts0.install tslib-1.22/debian/libts0.install
--- tslib-1.22/debian/libts0.install2018-04-25 10:11:50.0 +
+++ tslib-1.22/debian/libts0.install1970-01-01 00:00:00.0 +
@@ -1,3 +0,0 @@
-usr/lib/*/libts.so.0*
-usr/lib/*/ts0/*.so*
-etc/ts.conf
diff -Nru tslib-1.22/debian/libts0.manpages tslib-1.22/debian/libts0.manpages
--- tslib-1.22/debian/libts0.manpages   2019-05-21 07:13:10.0 +
+++ tslib-1.22/debian/libts0.manpages   1970-01-01 00:00:00.0 +
@@ -1,28 +0,0 @@
-doc/ts_calibrate.1
-doc/ts_close.3
-doc/ts.conf.5
-doc/ts_conf.1
-doc/ts_conf_get.3
-doc/ts_config.3
-doc/ts_conf_set.3
-doc/ts_setup.3
-doc/ts_finddev.1
-doc/ts_harvest.1
-doc/ts_open.3
-doc/ts_print.1
-doc/ts_print_raw.1
-doc/ts_print_mt.1
-doc/ts_read.3
-doc/ts_read_mt.3
-doc/ts_read_raw.3
-doc/ts_read_raw_mt.3
-doc/ts_test.1
-doc/ts_test_mt.1
-doc/ts_uinput.1
-doc/ts_verify.1
-doc/ts_libversion.3
-doc/ts_fd.3
-doc/ts_error_fn.3
-doc/ts_open_restricted.3
-doc/ts_close_restricted.3
-doc/ts_get_eventpath.3
diff -Nru tslib-1.22/debian/libts0.symbols tslib-1.22/debian/libts0.symbols
--- tslib-1.22/debian/libts0.symbols2019-10-22 08:45:52.0 +
+++ tslib-1.22/debian/libts0.symbols1970-01-01 00:00:00.0 +
@@ -1,65 +0,0 @@
-libts.so.0 libts0 #MINVER#
- ts_close@Base 1.0
- ts_config@Base 1.0
- ts_reconfig@Base 1.3
- ts_setup@Base 1.4
- ts_error_fn@Base 1.0
- ts_open_restricted@Base 1.13
- ts_close_restricted@Base 1.13
- ts_conf_get@Base 1.18
- ts_conf_set@Base 1.18
- ts_fd@Base 1.0
- ts_libversion@Base 1.10
- ts_load_module@Base 1.0
- ts_open@Base 1.0
- ts_option@Base 1.1
- ts_print_ascii_logo@Base 1.16
- ts_read@Base 1.0
- ts_read_mt@Base 1.3
- ts_read_raw@Base 1.0
- ts_read_raw_mt@Base 1.3
- tslib_parse_vars@Base 1.0
- tslib_version@Base 1.16
- ts_get_eventpath@Base 1.15
-debounce.so libts0 #MINVER#
- debounce_mod_init@Base 1.2
- mod_init@Base 1.2
-dejitter.so libts0 #MINVER#
- dejitter_mod_init@Base 1.0
- mod_init@Base 1.0
-evthres.so libts0 #MINVER#
- mod_init@Base 

Bug#1062995: tslib: NMU diff for 64-bit time_t transition

2024-02-23 Thread Steve Langasek
Hi Martin,

On Wed, Feb 21, 2024 at 06:56:09AM +, Martin Kepplinger wrote:
> in general, tslib only ever uses time_t differences, so apart from one
> glitch when wrapping around, the library will continue to work after
> 2038 as-is.

Sorry, but that's immaterial: per
,
the ts_read() family of functions take a pointer to a struct that contains a
struct timeval, which means that sizes and offsets of elements in that
struct will be interpreted incorrectly across the ABI horizon.  This is an
ABI break.  It's the last element of struct ts_sample so offsets are not an
issue, but depending on the endianness of the architecture, a caller that
doesn't know you've moved to 64-bit time_t will be reading the wrong word;
and anything caller-side that happens to allocate arrays of ts_sample will
get the wrong size of the element.  (I'm assuming by the description of the
functions in the header that ts_sample is always allocated by the library
and not by the caller.)  But for ts_sample_mt it's even worse, the tv is in
the middle of the struct and throws everything off.

> I'll look at what `__TIMESIZE` currently is on 32bit archs. But given
> the low-impact this has for tslib functionality-wise, I'd rather find
> the correct change (any help appreciated), and increment LT_CURRENT.

> So: where do I start in order to comply with your scripts? do I simply
> add `D__USE_TIME_BITS64` to CPPFLAGS?

Once gcc and dpkg have been uploaded to unstable, we will be batch NMUing
these patches to unstable as well.  There should be no need for you to
manually adjust CPPFLAGS in your package; simply incorporating the NMU
changes will be sufficient.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: PGP signature


Bug#1062995: tslib: NMU diff for 64-bit time_t transition

2024-02-20 Thread Martin Kepplinger
Am Sonntag, dem 04.02.2024 um 10:51 + schrieb Steve Langasek:
> Source: tslib
> Version: 1.22-1
> 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
> tslib 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 tslib
> 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')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 6.5.0-14-generic (SMP w/12 CPU threads; PREEMPT)
> Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
> Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)

hi Steve,

in general, tslib only ever uses time_t differences, so apart from one
glitch when wrapping around, the library will continue to work after
2038 as-is.

I'll look at what `__TIMESIZE` currently is on 32bit archs. But given
the low-impact this has for tslib functionality-wise, I'd rather find
the correct change (any help appreciated), and increment LT_CURRENT.

So: where do I start in order to comply with your scripts? do I simply
add `D__USE_TIME_BITS64` to CPPFLAGS?

thanks,

   martin



Bug#1062995: tslib: NMU diff for 64-bit time_t transition

2024-02-04 Thread Steve Langasek
Source: tslib
Version: 1.22-1
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
tslib 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 tslib
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')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-14-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru tslib-1.22/debian/changelog tslib-1.22/debian/changelog
--- tslib-1.22/debian/changelog 2020-07-01 10:52:20.0 +
+++ tslib-1.22/debian/changelog 2024-02-04 10:48:11.0 +
@@ -1,3 +1,10 @@
+tslib (1.22-1.1) experimental; urgency=medium
+
+  * Non-maintainer upload.
+  * Rename libraries for 64-bit time_t transition.
+
+ -- Steve Langasek   Sun, 04 Feb 2024 10:48:11 +
+
 tslib (1.22-1) unstable; urgency=low
 
   * Update to tslib version 1.22
diff -Nru tslib-1.22/debian/control tslib-1.22/debian/control
--- tslib-1.22/debian/control   2019-01-24 08:06:36.0 +
+++ tslib-1.22/debian/control   2024-02-04 10:48:10.0 +
@@ -8,13 +8,14 @@
 Vcs-Git: https://github.com/merge/tslib-debian
 Vcs-Browser: https://github.com/merge/tslib-debian
 
-Package: libts0
+Package: libts0t64
+Provides: ${t64:Provides}
 Architecture: any
 Section: libs
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Breaks: tsconf
-Replaces: tsconf
+Breaks: libts0 (<< ${source:Version}), tsconf
+Replaces: libts0, tsconf
 Multi-Arch: same
 Description: touch screen library
  Tslib is an abstraction layer for touchscreen panel events, as well as a
@@ -25,7 +26,7 @@
 Package: libts-dev
 Architecture: any
 Section: libdevel
-Depends: libts0 (=${binary:Version}), ${misc:Depends}
+Depends: libts0t64 (=${binary:Version}), ${misc:Depends}
 Multi-Arch: same
 Description: touch screen library, development files
  Tslib is an abstraction layer for touchscreen panel events, as well as a
@@ -36,7 +37,7 @@
 
 Package: libts-bin
 Architecture: any
-Depends: libts0 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Depends: libts0t64 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Multi-Arch: foreign
 Description: touch screen library utilities
  Tslib is an abstraction layer for touchscreen panel events, as well as a
diff -Nru tslib-1.22/debian/libts0.install tslib-1.22/debian/libts0.install
--- tslib-1.22/debian/libts0.install2018-04-25 10:11:50.0 +
+++ tslib-1.22/debian/libts0.install1970-01-01 00:00:00.0 +
@@ -1,3 +0,0 @@
-usr/lib/*/libts.so.0*
-usr/lib/*/ts0/*.so*
-etc/ts.conf
diff -Nru tslib-1.22/debian/libts0.manpages tslib-1.22/debian/libts0.manpages
--- tslib-1.22/debian/libts0.manpages   2019-05-21 07:13:10.0 +
+++ tslib-1.22/debian/libts0.manpages   1970-01-01 00:00:00.0 +
@@ -1,28 +0,0 @@
-doc/ts_calibrate.1
-doc/ts_close.3
-doc/ts.conf.5
-doc/ts_conf.1
-doc/ts_conf_get.3
-doc/ts_config.3
-doc/ts_conf_set.3
-doc/ts_setup.3
-doc/ts_finddev.1
-doc/ts_harvest.1
-doc/ts_open.3
-doc/ts_print.1
-doc/ts_print_raw.1
-doc/ts_print_mt.1
-doc/ts_read.3
-doc/ts_read_mt.3
-doc/ts_read_raw.3
-doc/ts_read_raw_mt.3
-doc/ts_test.1
-doc/ts_test_mt.1
-doc/ts_uinput.1
-doc/ts_verify.1
-doc/ts_libversion.3
-doc/ts_fd.3
-doc/ts_error_fn.3