Ana Guerrero 2025-02-05 16:23:13 +00:00 committed by Git OBS Bridge
commit 8739fb5a1d
3 changed files with 95 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 3 09:47:37 UTC 2025 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to drop date+hostname from build results
(boo#1047218, boo#1084909)
-------------------------------------------------------------------
Mon May 13 11:41:05 UTC 2024 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -336,6 +336,7 @@ Patch104: Report-error-if-dimensions-of-chunked-storage-in-data-layout-2.p
Patch105: When-evicting-driver-info-block-NULL-the-corresponding-entry.patch
Patch107: Validate-location-offset-of-the-accumulated-metadata-when-comparing.patch
Patch109: Hot-fix-for-CVE-2020-10812.patch
Patch110: reproducible.patch
BuildRequires: fdupes
BuildRequires: hostname
@ -600,6 +601,7 @@ hdf5%{?my_suffix}-devel
requires "libhdf5_hl_cpp%{sonum_HL_CXX}%{?my_suffix}-<targettype> = <version>"
EOF
%endif
%patch -P110 -p1
%build

87
reproducible.patch Normal file
View File

@ -0,0 +1,87 @@
Date: 2025-02-03
Author: Bernhard M. Wiedemann
Fix reproducible builds
by not including date + hostname
This can be dropped after we get upstream commit d4605919f970e2f84d00d802f1b01db1b98fafc6
diff --git a/src/H5make_libsettings.c b/src/H5make_libsettings.c
index af6c5cf..d5b866d 100644
--- a/src/H5make_libsettings.c
+++ b/src/H5make_libsettings.c
@@ -135,8 +135,6 @@ print_header(void)
{
time_t now = HDtime(NULL);
struct tm *tm = HDlocaltime(&now);
- char real_name[30];
- char host_name[256];
int i;
const char *s;
#ifdef H5_HAVE_GETPWUID
@@ -150,65 +148,12 @@ print_header(void)
This machine-generated source code contains\n\
information about the library build configuration\n";
- /*
- * The real name is the first item from the passwd gecos field.
- */
-#ifdef H5_HAVE_GETPWUID
- {
- size_t n;
- char *comma;
-
- if ((pwd = HDgetpwuid(HDgetuid()))) {
- if ((comma = HDstrchr(pwd->pw_gecos, ','))) {
- n = MIN(sizeof(real_name) - 1, (unsigned)(comma - pwd->pw_gecos));
- HDstrncpy(real_name, pwd->pw_gecos, n);
- real_name[n] = '\0';
- }
- else {
- HDstrncpy(real_name, pwd->pw_gecos, sizeof(real_name));
- real_name[sizeof(real_name) - 1] = '\0';
- }
- }
- else
- real_name[0] = '\0';
- }
-#else
- real_name[0] = '\0';
-#endif
-
- /*
- * The FQDM of this host or the empty string.
- */
-#ifdef H5_HAVE_GETHOSTNAME
- if (HDgethostname(host_name, sizeof(host_name)) < 0)
- host_name[0] = '\0';
-#else
- host_name[0] = '\0';
-#endif
-
/*
* The file header: warning, copyright notice, build information.
*/
fprintf(rawoutstream, "/* Generated automatically by H5make_libsettings -- do not edit */\n\n\n");
HDfputs(FileHeader, rawoutstream); /*the copyright notice--see top of this file */
- fprintf(rawoutstream, " *\n * Created:\t\t%s %2d, %4d\n", month_name[tm->tm_mon], tm->tm_mday,
- 1900 + tm->tm_year);
- if (pwd || real_name[0] || host_name[0]) {
- fprintf(rawoutstream, " *\t\t\t");
- if (real_name[0])
- fprintf(rawoutstream, "%s <", real_name);
-#ifdef H5_HAVE_GETPWUID
- if (pwd)
- HDfputs(pwd->pw_name, rawoutstream);
-#endif
- if (host_name[0])
- fprintf(rawoutstream, "@%s", host_name);
- if (real_name[0])
- fprintf(rawoutstream, ">");
- HDfputc('\n', rawoutstream);
- }
-
fprintf(rawoutstream, " *\n * Purpose:\t\t");
for (s = purpose; *s; s++) {