diff -Nru tp-smapi-0.45/debian/changelog tp-smapi-0.45/debian/changelog --- tp-smapi-0.45/debian/changelog 2025-08-15 20:57:20.000000000 +0200 +++ tp-smapi-0.45/debian/changelog 2026-10-02 13:32:46.000000000 +0200 @@ -1,3 +1,12 @@ +tp-smapi (0.45-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * d/p/use_strscpy_instead_of_strncpy_since_7.2.patch: fixes build against + Linux kernel 7.2 + (Closes: #1146537) + + -- Héctor Orón Martínez Fri, 02 Oct 2026 13:32:46 +0200 + tp-smapi (0.45-1) unstable; urgency=medium * New upstream version 0.45 diff -Nru tp-smapi-0.45/debian/patches/series tp-smapi-0.45/debian/patches/series --- tp-smapi-0.45/debian/patches/series 2025-08-15 20:26:52.000000000 +0200 +++ tp-smapi-0.45/debian/patches/series 2026-10-02 13:25:02.000000000 +0200 @@ -1 +1,2 @@ +use_strscpy_instead_of_strncpy_since_7.2.patch 1000-appstream-metainfo.patch diff -Nru tp-smapi-0.45/debian/patches/use_strscpy_instead_of_strncpy_since_7.2.patch tp-smapi-0.45/debian/patches/use_strscpy_instead_of_strncpy_since_7.2.patch --- tp-smapi-0.45/debian/patches/use_strscpy_instead_of_strncpy_since_7.2.patch 1970-01-01 01:00:00.000000000 +0100 +++ tp-smapi-0.45/debian/patches/use_strscpy_instead_of_strncpy_since_7.2.patch 2026-10-02 13:30:59.000000000 +0200 @@ -0,0 +1,23 @@ +Description: Replace removed kernel strncpy() API with strscpy() + tp_smapi uses strncpy() in show_tp_ec_bat_str(). The kernel-side + strncpy() API was removed in Linux 7.2, causing the external module + to fail to build with an implicit declaration error. + . + Replace it with strscpy(), the kernel API intended for bounded string + copies, so that tp_smapi builds with Linux 7.2 and later kernels. +Author: Héctor Orón Martínez +Origin: vendor +Forwarded: https://github.com/linux-thinkpad/tp_smapi/pull/81/changes +Bug-Debian: https://bugs.debian.org/1146537 +Last-Update: 2026-10-02 +--- a/tp_smapi.c ++++ b/tp_smapi.c +@@ -669,7 +669,7 @@ + ret = read_tp_ec_row(arg0, bat, 0, row); + if (ret) + return ret; +- strncpy(buf, (char *)row+offset, maxlen); ++ strscpy(buf, (char *)row+offset, maxlen); + buf[maxlen] = 0; + strcat(buf, "\n"); + return strlen(buf);