Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock Control: affects -1 + src:patch
Hi RMs, Please pre-approve unblocking of package patch. [ Reason ] Main issue is that patch fails to build on Hurd-i386 due to 32 bit time_t. Fix this with disabling year 2038 checks on this platform. Then an upstream small fix not to check read only state check on files when the output file is specified (to be a new one for example). [ Impact ] This would help Hurd-i386 be in line with the Trixie release. The other saves disk IO. [ Tests ] I've checked the build on a porter machine and confirm the fix is working. The read only check change has an upstream test case. [ Risks ] Hurd-i386 fix is effective only for that architecture and confirmed working. The read only check is a behaviour change, only when a different output file is specified than the default (actual working) one. Mainly a new file specified in that case when the now missing check just saves disk IO. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing Regards, Laszlo/GCS
diff -Nru patch-2.8/debian/changelog patch-2.8/debian/changelog --- patch-2.8/debian/changelog 2025-04-06 21:10:31.000000000 +0200 +++ patch-2.8/debian/changelog 2025-06-13 20:59:38.000000000 +0200 @@ -1,3 +1,13 @@ +patch (2.8-2) unstable; urgency=medium + + [ Samuel Thibault <sthiba...@debian.org> ] + * Pass --disable-year2038 for hurd-i386 case to fix FTBFS (closes: #815457). + + [ Laszlo Boszormenyi (GCS) ] + * Backport upstream fix: skip read-only check when output file specified. + + -- Laszlo Boszormenyi (GCS) <g...@debian.org> Fri, 13 Jun 2025 20:59:38 +0200 + patch (2.8-1) unstable; urgency=medium * New upstream release. diff -Nru patch-2.8/debian/patches/series patch-2.8/debian/patches/series --- patch-2.8/debian/patches/series 2025-04-06 21:10:31.000000000 +0200 +++ patch-2.8/debian/patches/series 2025-06-13 00:38:08.000000000 +0200 @@ -1,4 +1,4 @@ m-merge add_some_missing_filename_quoting.patch reject_empty_filenames.patch - +skip_read-only_check_when_output_file_specified.patch diff -Nru patch-2.8/debian/patches/skip_read-only_check_when_output_file_specified.patch patch-2.8/debian/patches/skip_read-only_check_when_output_file_specified.patch --- patch-2.8/debian/patches/skip_read-only_check_when_output_file_specified.patch 1970-01-01 01:00:00.000000000 +0100 +++ patch-2.8/debian/patches/skip_read-only_check_when_output_file_specified.patch 2025-06-13 00:14:05.000000000 +0200 @@ -0,0 +1,48 @@ +From d161c9a9dbd24bb7e0356e4e07983345777d85aa Mon Sep 17 00:00:00 2001 +From: Daniel Black <dan...@mariadb.org> +Date: Thu, 1 May 2025 14:33:19 +1000 +Subject: Skip read-only check when output file specified + +Only check if input files are read-only when overwriting them; skip +that check when the output goes to a different file. + +* src/patch.c (main): Set read_only_behavior to RO_IGNORE when an output +file has been specified. +* tests/read-only-files: Add test case. +--- + src/patch.c | 5 ++++- + tests/read-only-files | 5 +++++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/patch.c b/src/patch.c +index 91cb646..42c093c 100644 +--- a/src/patch.c ++++ b/src/patch.c +@@ -204,7 +204,10 @@ main (int argc, char **argv) + + init_output (&outstate); + if (outfile) +- outstate.ofp = open_outfile (outfile); ++ { ++ outstate.ofp = open_outfile (outfile); ++ read_only_behavior = RO_IGNORE; ++ } + + /* Make sure we clean up in case of disaster. */ + init_signals (); +diff --git a/tests/read-only-files b/tests/read-only-files +index b66ddb9..9f6bf7c 100644 +--- a/tests/read-only-files ++++ b/tests/read-only-files +@@ -67,3 +67,8 @@ check 'patch -f -p0 --read-only=ignore < f.diff || echo "Status: $?"' <<EOF + patching file f + patching file f + EOF ++ ++check 'patch -o - f /dev/null || echo "Status: $?"' <<EOF ++patching file - (read from f) ++three ++EOF +-- +cgit v1.2.3 + diff -Nru patch-2.8/debian/rules patch-2.8/debian/rules --- patch-2.8/debian/rules 2018-08-05 13:10:39.000000000 +0200 +++ patch-2.8/debian/rules 2025-06-13 00:14:05.000000000 +0200 @@ -12,6 +12,10 @@ CONFFLAGS = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) endif +ifeq ($(DEB_HOST_ARCH),hurd-i386) + CONFFLAGS += --disable-year2038 +endif + export DEB_CFLAGS_MAINT_APPEND = -Wall -g override_dh_auto_clean: