nbdkit/0027-Fix-podwrapper.pl.in-Use-short-commit-date.patch
Richard W.M. Jones d2ce66ec1f Rebase to new stable branch version 1.28.3
Fix nbdkit-cow-filter cow-block-size=4096

resolves: rhbz#2011709, rhbz#2029751
2021-12-07 10:08:43 +00:00

32 lines
1.1 KiB
Diff

From fb7749b3497a7aaf1b00e975af166af029209c01 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Tue, 30 Nov 2021 12:42:01 -0600
Subject: [PATCH] Fix "podwrapper.pl.in: Use short commit date"
This reverts commit 750ad5972bb082d188f17f8f71ef1ec0c616c676, then
fixes the broken newline as suggested in the thread at
https://listman.redhat.com/archives/libguestfs/2021-November/msg00275.html.
(cherry picked from commit 80036dbb0b8f9e0aab5994d80de6321c2a55c669)
---
podwrapper.pl.in | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index abad578d..6f256ba8 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -233,8 +233,7 @@ my $date;
my $filename = "$abs_top_srcdir/.git";
if (!$date && -d $filename) {
local $ENV{GIT_DIR} = $filename;
- $_ = `git show -O/dev/null -s --format=%ci`;
- $date = $1 if /^(\d+-\d+-\d+)\s/;
+ $date = `git show -O/dev/null -s --format=format:%cs`;
}
if (!$date) {
my ($day, $month, $year) = (gmtime($ENV{SOURCE_DATE_EPOCH} || time))[3,4,5];
--
2.31.1