Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libfaketime for openSUSE:Factory 
checked in at 2026-06-15 19:49:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libfaketime (Old)
 and      /work/SRC/openSUSE:Factory/.libfaketime.new.1981 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libfaketime"

Mon Jun 15 19:49:15 2026 rev:8 rq:1359406 version:0.9.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/libfaketime/libfaketime.changes  2025-11-24 
14:15:04.940152338 +0100
+++ /work/SRC/openSUSE:Factory/.libfaketime.new.1981/libfaketime.changes        
2026-06-15 19:53:09.407855309 +0200
@@ -1,0 +2,11 @@
+Wed Jun 10 04:03:12 UTC 2026 - [email protected]
+
+- Disable lto
+- Add fix-build-with-ISO_C23.patch (gh#wolfcw/libfaketime#524)
+- Add fix-build-with-gcc-16.patch (gh#wolfcw/libfaketime#528)
+- Add %{set_build_flags}
+- Add %check/test section
+- Add FAKETIME_COMPILE_CFLAGS for ppc64le & riscv64
+- Make the libraries executable, needed for stripping them
+
+-------------------------------------------------------------------

New:
----
  fix-build-with-ISO_C23.patch
  fix-build-with-gcc-16.patch

----------(New B)----------
  New:- Disable lto
- Add fix-build-with-ISO_C23.patch (gh#wolfcw/libfaketime#524)
- Add fix-build-with-gcc-16.patch (gh#wolfcw/libfaketime#528)
  New:- Add fix-build-with-ISO_C23.patch (gh#wolfcw/libfaketime#524)
- Add fix-build-with-gcc-16.patch (gh#wolfcw/libfaketime#528)
- Add %{set_build_flags}
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libfaketime.spec ++++++
--- /var/tmp/diff_new_pack.MmmYBi/_old  2026-06-15 19:53:10.011880641 +0200
+++ /var/tmp/diff_new_pack.MmmYBi/_new  2026-06-15 19:53:10.011880641 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libfaketime
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,27 +16,53 @@
 #
 
 
+%define _lto_cflags %{nil}
+
 Name:           libfaketime
 Version:        0.9.12
 Release:        0
 Summary:        FakeTime Preload Library
 License:        GPL-2.0-only
-Group:          System/Libraries
 URL:            https://github.com/wolfcw/libfaketime
-Source:         
https://github.com/wolfcw/libfaketime/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM fix-build-with-ISO_C23.patch gh#wolfcw/libfaketime#524
+Patch0:         fix-build-with-ISO_C23.patch
+# PATCH-FIX-UPSTREAM fix-build-with-gcc-16.patch gh#wolfcw/libfaketime#528
+Patch1:         fix-build-with-gcc-16.patch
+BuildRequires:  bash
+BuildRequires:  gcc
+BuildRequires:  make
+BuildRequires:  perl
 
 %description
-report faked system time to programs without having to change the system-wide 
time
+Report faked system time to programs without having to change the system-wide 
time.
 
 %prep
-%autosetup
+%autosetup -p1
 
 %build
-make %{?_smp_mflags} PREFIX=%{_prefix} LIBDIRNAME=/%{_lib}/%{name}
+%ifarch ppc64le
+export FAKETIME_COMPILE_CFLAGS="-DFORCE_PTHREAD_NONVER"
+%endif
+%ifarch riscv64
+export FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER"
+%endif
+%{set_build_flags}
+%make_build PREFIX=%{_prefix} LIBDIRNAME=/%{_lib}/%{name}
 
 %install
-make install DESTDIR=%{buildroot} PREFIX=%{_prefix} LIBDIRNAME=/%{_lib}/%{name}
-rm %{buildroot}%{_datadir}/doc/faketime/*
+%make_install PREFIX=%{_prefix} LIBDIRNAME=/%{_lib}/%{name}
+chmod -c 0755 %{buildroot}%{_libdir}/%{name}/libfaketime*.so.1
+rm -r %{buildroot}%{_datadir}/doc/faketime
+
+%check
+%ifarch ppc64le
+export FAKETIME_COMPILE_CFLAGS="-DFORCE_PTHREAD_NONVER"
+%endif
+%ifarch riscv64
+export FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER"
+%endif
+make PREFIX=%{_prefix} LIBDIRNAME=/%{_lib}/%{name} -C test
 
 %files
 %doc NEWS README

++++++ fix-build-with-ISO_C23.patch ++++++
commit dbe865dfdba0145d993d70b7fd4ec88b2f47554b
Author: Tomas Korbar <[email protected]>
Date:   Mon Dec 15 11:03:21 2025 +0100

    Add const qualifiers to fix build with ISO C23
    
    Fix https://github.com/wolfcw/libfaketime/issues/524

diff --git a/src/libfaketime.c b/src/libfaketime.c
index ef1dca9..02839c8 100644
--- a/src/libfaketime.c
+++ b/src/libfaketime.c
@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
 static void parse_ft_string(const char *user_faked_time)
 {
   struct tm user_faked_time_tm;
-  char * tmp_time_fmt;
+  const char * tmp_time_fmt;
   char * nstime_str;
 
   if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN))
@@ -3338,7 +3338,7 @@ static void prepare_config_contents(char *contents)
 bool str_array_contains(const char *haystack, const char *needle)
 {
   size_t needle_len = strlen(needle);
-  char *pos = strstr(haystack, needle);
+  const char *pos = strstr(haystack, needle);
   while (pos) {
     if (pos == haystack || *(pos - 1) == ',') {
       char nextc = *(pos + needle_len);

++++++ fix-build-with-gcc-16.patch ++++++
>From 712733e5f01e45372f3160cfdbcfd91520cb093d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]>
Date: Tue, 6 Jan 2026 10:18:50 +0100
Subject: [PATCH] tests: Silence an unused-but-set-variable warning with GCC 16
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Compiling tests with GCC 16 results into this warning:

    gcc -shared -o libmallocintercept.so -fpic -std=gnu99 -Wall -DFAKE_STAT 
-Werror -Wextra  -U_FILE_OFFSET_BITS -U_TIME_BITS libmallocintercept.c
    libmallocintercept.c: In function ‘free’:
    libmallocintercept.c:79:12: error: variable ‘ptr2’ set but not used 
[-Werror=unused-but-set-variable=]
       79 |   long int ptr2 = (long int) ptr; ptr2 -= (long int) ptr;
          |            ^~~~
    cc1: all warnings being treated as errors

The ptr2 variable was added in the past to silence compiler warnings,
probably for the very same reason (commits
75cbe8e507fa6e83a51e868b2ab9cbd0141c9e55 and
2bfbe19f719c34f07656cd1513b79209f7d22b61). GCC 16 is smarter and
discovers that the ptr2 variables is not needed.

This patch changes the work around to "(void) unused_variable;" idiom
recommended by GCC manual and already used in print_msg().
---
 test/libmallocintercept.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/libmallocintercept.c b/test/libmallocintercept.c
index 61edbb8..845b11c 100644
--- a/test/libmallocintercept.c
+++ b/test/libmallocintercept.c
@@ -76,7 +76,7 @@ void *malloc(size_t size) {
 }
 
 void free(void *ptr) {
-  long int ptr2 = (long int) ptr; ptr2 -= (long int) ptr;
+       (void) ptr; /* unused */
        print_msg("Called free() on from libmallocintercept...");
        poke_faketime();
        print_msg("successfully\n");

Reply via email to