rpm/0003-Error-out-on-a-missing-changelog-date.patch
Michael Schröder 738d805716 Accepting request 1146788 from home:jzerebecki:branches:Base:System
Changed this how you suggested.

- Add patches to enable reproducible builds by default (bsc#1148824). For
  upstream versions see:
  https://github.com/rpm-software-management/rpm/pull/2880
  0001-Add-option-to-set-mtime-of-files-in-rpms.patch
  0002-log-build-time-if-it-is-set-from-SOURCE_DATE_EPOCH.patch
  0003-Error-out-on-a-missing-changelog-date.patch

OBS-URL: https://build.opensuse.org/request/show/1146788
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=669
2024-02-15 13:18:45 +00:00

31 lines
924 B
Diff

From 973f94bafea8e641ed747d3c420ea1bc2e1cb37f Mon Sep 17 00:00:00 2001
From: Jan Zerebecki <jan.suse@zerebecki.de>
Date: Thu, 15 Feb 2024 08:03:05 +0100
Subject: [PATCH 3/3] Error out on a missing changelog date
if it is needed as the source for SOURCE_DATE_EPOCH, instead of only
logging a warning.
---
build/build.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/build/build.c b/build/build.c
index 2693d80b3..ce7bc8b88 100644
--- a/build/build.c
+++ b/build/build.c
@@ -344,8 +344,10 @@ static rpmRC buildSpec(rpmts ts, BTA_t buildArgs, rpmSpec spec, int what)
setenv("SOURCE_DATE_EPOCH", sdestr, 0);
rpmtdFreeData(&td);
} else {
- rpmlog(RPMLOG_WARNING, _("source_date_epoch_from_changelog set but "
+ rpmlog(RPMLOG_ERR, _("source_date_epoch_from_changelog set but "
"%%changelog is missing\n"));
+ rc = RPMRC_FAIL;
+ goto exit;
}
}
--
2.30.2