[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug#1064361: libreadline8t64: file loss due to concurrent /usr-move and
From: |
Helmut Grohne |
Subject: |
Bug#1064361: libreadline8t64: file loss due to concurrent /usr-move and package rename (DEP17 P1) |
Date: |
Tue, 20 Feb 2024 10:19:12 +0100 |
Package: libreadline8t64
Version: 8.2-3.1~exp1
Severity: serious
Tags: patch
User: helmutg@debian.org
Usertags: dep17p1
Control: affects -1 + libreadline8
X-Debbugs-Cc: vorlon@debian.org, mwhudson@debian.org, bug-readline@gnu.org
Hi,
readline upstream: Please skip the next paragraph.
the time64 transition causes a DEP17 P1 problem for the actual shared
libraries contained in libreadline8t64. These were located below /lib in
libreadline8 in bookworm and thus can be lost in an upgrade. I'm
attaching a patch to add protective diversions for this situation. Since
this library is rather close to essential, I'm using the conservative
method of keeping the diversions beyond postinst. In forky, we can
remove the diversions and in forky+1, we can remove the maintainer
scripts introduced here.
Given the proximity of readline to the base system (e.g. fdisk and
python3 depend on it), I also looked into alternatives.
https://adrien.dcln.fr/misc/armhf-time_t/2024-02-01T09:53:00/compat_reports/libreadline-dev/base_to_lfs/compat_report.html
indicates that we are not faced with LFS ABI changes, but
https://adrien.dcln.fr/misc/armhf-time_t/2024-02-01T09:53:00/compat_reports/libreadline-dev/lfs_to_time_t/compat_report.html
indicates that we are faced with history_get_time changing its return
type from 32bit to 64bit. Providing ABI duality here is even easier than
in the case of libselinux and upstream is vaguely active (last commit 3
weeks ago). Also note that this function already handles range errors
and returns 0 in that case. This behaviour could naturally be extended
for 2038. I think providing duality here would reduce the risk of failed
upgrades breaking user systems.
Context:
https://sources.debian.org/src/readline/8.2-3/history.c/?hl=241#L241
Sketch:
// .h
#if time64 changes ABI
typedef time_t time64_t;
typedef int32_t time32_t;
time64_t history_get_time64 (HIST_ENTRY *hist);
time32_t history_get_time (HIST_ENTRY *hist);
#define history_get_time history_get_time64
#else
time_t history_get_time (HIST_ENTRY *hist);
#endif
// .c
time_t
// The earlier #define may change the function name
history_get_time (HIST_ENTRY *hist)
{
// original function unchanged
}
#if time64 changes ABI
#undef history_get_time
time32_t
history_get_time (HIST_ENTRY *hist)
{
time64_t ret64 = history_get_time(hist);
time32_t ret32 = ret64;
if ((time64_t)ret32 != ret64)
return (time32_t)0;
return ret32;
}
#endif
I've directly Cced readline upstream to see whether they're interested.
Helmut
readline_8.2-3.1~exp1.1.debdiff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug#1064361: libreadline8t64: file loss due to concurrent /usr-move and package rename (DEP17 P1),
Helmut Grohne <=