Control: tags -1 + patch

On 2023-01-08 18:35 +0100, Sven Joachim wrote:

> Package: cryptsetup-initramfs
> Version: 2:2.6.0-2
> File: /usr/share/initramfs-tools/hooks/cryptgnupg-sc
> Control: block 1028202 by -1
>
> The file /usr/share/initramfs-tools/hooks/cryptgnupg-sc copies the
> terminfo entry for linux to the initramfs at the end:
>
> [ -f "$DESTDIR/lib/terminfo/l/linux" ] || copy_file terminfo 
> /lib/terminfo/l/linux || RV=$?
>
> After the Bookworm release I intend to relocate the files in
> ncurses-base to /usr/share/terminfo, see
> https://bugs.debian.org/1028202.  To prepare for that, could you please
> look for the "linux" terminfo entry in /usr/share/terminfo/l as well as
> in /lib/terminfo/l ?

Attached patch does that.  I have also created a merge request on Salsa:
https://salsa.debian.org/cryptsetup-team/cryptsetup/-/merge_requests/33.

Cheers,
       Sven

From e0efe9d89e4914b9ffceb2551899dd4c4dd1c6d3 Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenj...@gmx.de>
Date: Fri, 3 Feb 2023 18:53:29 +0100
Subject: [PATCH] cryptgnupg-sc hook: look for entry under /usr/share/terminfo

Future versions of ncurses-base might install their files under
/usr/share/terminfo rather than /lib/terminfo, see
https://bugs.debian.org/1028202.

Closes: #1028234
---
 debian/initramfs/hooks/cryptgnupg-sc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/initramfs/hooks/cryptgnupg-sc b/debian/initramfs/hooks/cryptgnupg-sc
index 752474a9..ad434fef 100644
--- a/debian/initramfs/hooks/cryptgnupg-sc
+++ b/debian/initramfs/hooks/cryptgnupg-sc
@@ -72,6 +72,7 @@ if [ ! -x "$DESTDIR/usr/bin/pinentry" ]; then
     copy_exec "$pinentry"
     ln -s "$pinentry" "$DESTDIR/usr/bin/pinentry"
 fi
-[ -f "$DESTDIR/lib/terminfo/l/linux" ] || copy_file terminfo /lib/terminfo/l/linux || RV=$?
+[ -f "$DESTDIR/lib/terminfo/l/linux" ] || [ -f "$DESTDIR/usr/share/terminfo/l/linux" ] || \
+    copy_file terminfo /lib/terminfo/l/linux || copy_file terminfo /usr/share/terminfo/l/linux || RV=$?

 exit $RV
--
2.39.1

Reply via email to