public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libfaketime] rawhide: 0.9.13 bump
@ 2026-09-03 12:10 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-09-03 12:10 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libfaketime
Branch : rawhide
Commit : ec44de2ffff20efa8a746ffc92170d2bc0973ff9
Author : Petr Písař <ppisar@redhat.com>
Date   : 2026-09-03T13:59:40+02:00
Stats  : +226/-84 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/libfaketime/c/ec44de2ffff20efa8a746ffc92170d2bc0973ff9?branch=rawhide

Log:
0.9.13 bump

---
diff --git a/libfaketime-0.9.12-isoc23.patch b/libfaketime-0.9.12-isoc23.patch
deleted file mode 100644
index 33654cc..0000000
--- a/libfaketime-0.9.12-isoc23.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-commit dbe865dfdba0145d993d70b7fd4ec88b2f47554b
-Author: Tomas Korbar <tkorbar@redhat.com>
-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);

diff --git a/libfaketime-0.9.12-tests-Silence-an-unused-but-set-variable-warning-wit.patch b/libfaketime-0.9.12-tests-Silence-an-unused-but-set-variable-warning-wit.patch
deleted file mode 100644
index c7acac3..0000000
--- a/libfaketime-0.9.12-tests-Silence-an-unused-but-set-variable-warning-wit.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 712733e5f01e45372f3160cfdbcfd91520cb093d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
-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");
--- 
-2.52.0
-

diff --git a/libfaketime-0.9.13-Remove-tests-passing-NULL-to-sem_timedwait-and-clock.patch b/libfaketime-0.9.13-Remove-tests-passing-NULL-to-sem_timedwait-and-clock.patch
new file mode 100644
index 0000000..f641472
--- /dev/null
+++ b/libfaketime-0.9.13-Remove-tests-passing-NULL-to-sem_timedwait-and-clock.patch
@@ -0,0 +1,218 @@
+From 79aaa421ff8a6beb339ddc4e8c0e1dec65c27f9a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Thu, 3 Sep 2026 13:40:41 +0200
+Subject: [PATCH] Remove tests passing NULL to sem_timedwait() and
+ clock_gettime()
+
+Some functests/test_clock_contract.sh tests failed with glibc on
+x86_64 Linux:
+
+    Begin functests/test_clock_contract.sh
+    # PLATFORM=linuxlike
+    out=2020-06-15 12:00:00 realtime clock should honor absolute configuration - ok
+    out=2020 fractional realtime values should retain the calendar second - ok
+    out=ok monotonic clock should not move backwards - ok
+    out=ok short relative sleep should return - ok
+    out=ok invalid clock id should fail - ok
+    out= null clock output should fail with EFAULT expected=clock_gettime(NULL) returned EFAULT - bad
+    out=realtime and monotonic past deadlines returned ETIMEDOUT past realtime and monotonic deadlines should time out - ok
+    out= semaphore timed-wait contract should be preserved expected=semaphore realtime, monotonic, and null handling passed - bad
+    out= semaphore timed-wait contract should be preserved expected=semaphore realtime, monotonic, and null handling passed - bad
+    out= semaphore timed-wait contract should be preserved expected=semaphore realtime, monotonic, and null handling passed - bad
+    out=positive poll timeout was preserved positive poll timeout should not be truncated to zero - ok
+    out=select, pselect, and ppoll timeout contracts passed select, pselect, and ppoll timeout contracts should be preserved - ok
+    # functests/test_clock_contract.sh summary: 8 succeeded, 4 failed
+    # End functests/test_clock_contract.sh - BAD
+
+These 4 tests pass a NULL pointer to a syscall and expect that -1 with
+an approriate errno is returned. But that's not true for glibc on
+x86_64 Linux: clock_gettime() is implemented as VDSO and segfaults
+instead, sem_timedwait() also segfaults.
+
+This patch removes the affected tests.
+
+Resolve: #554
+---
+ test/Makefile                         |  9 +++------
+ test/Makefile.OSX                     |  9 +++------
+ test/clock_error_test.c               | 28 ---------------------------
+ test/functests/test_clock_contract.sh |  9 ---------
+ test/sem_contract_test.c              | 11 -----------
+ 5 files changed, 6 insertions(+), 60 deletions(-)
+ delete mode 100644 test/clock_error_test.c
+
+diff --git a/test/Makefile b/test/Makefile
+index 87530b6..c1314df 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -10,7 +10,7 @@ OBJ = ${SRC:.c=.o}
+ TEST_SNIPPETS = $(notdir $(basename $(wildcard snippets/*.c)))
+ EXPECTATIONS = $(notdir $(basename $(wildcard snippets/*.variable)))
+ 
+-ALL_TESTS = timetest test shm_layout_test abi_info_test set_mtime time_ops_test clock_consistency_test clock_error_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test timerfd_contract_test asan_preload_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test
++ALL_TESTS = timetest test shm_layout_test abi_info_test set_mtime time_ops_test clock_consistency_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test timerfd_contract_test asan_preload_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test
+ 
+ TIME64_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64
+ IS_GLIBC := $(shell if $(CC) -dM -E -include features.h - < /dev/null 2>/dev/null | grep -q '^#define __GLIBC__ '; then echo 1; else echo 0; fi)
+@@ -90,9 +90,6 @@ time_ops_test: time_ops_test.c ../src/time_ops.h
+ clock_consistency_test: clock_consistency_test.c
+ 	${CC} -o $@ ${CFLAGS} $<
+ 
+-clock_error_test: clock_error_test.c
+-	${CC} -o $@ ${CFLAGS} $<
+-
+ wait_contract_test: wait_contract_test.c
+ 	${CC} -o $@ ${CFLAGS} $< ${LDFLAGS}
+ 
+@@ -129,7 +126,7 @@ syscall_contract_test: syscall_contract_test.c
+ futex_contract_test: futex_contract_test.c
+ 	${CC} -o $@ ${CFLAGS} $<
+ 
+-test: timetest abi_info_test shm_layout_test time64_contract_test time_ops_test clock_consistency_test set_mtime clock_error_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test timerfd_contract_test asan_preload_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.so ${RANDOM_TEST_DEP} ${FILE_TIMESTAMP_TEST_DEP} ${FAKE_PID_TEST_DEP} ${SYSCALL_TEST_DEP} ${FUTEX_TEST_DEP} functest
++test: timetest abi_info_test shm_layout_test time64_contract_test time_ops_test clock_consistency_test set_mtime wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test timerfd_contract_test asan_preload_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.so ${RANDOM_TEST_DEP} ${FILE_TIMESTAMP_TEST_DEP} ${FAKE_PID_TEST_DEP} ${SYSCALL_TEST_DEP} ${FUTEX_TEST_DEP} functest
+ 	@echo
+ 	@./abi_info_test
+ 	@./time64_contract_test
+@@ -179,7 +176,7 @@ use_lib_%: _use_lib_test.c snippets/%.c lib%.so
+ ## cleanup and metainformation
+ 
+ clean:
+-	@rm -f ${OBJ} timetest shm_layout_test abi_info_test time64_contract_test set_mtime time_ops_test clock_consistency_test clock_error_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test timerfd_contract_test asan_preload_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test futex_contract_test init_reentry.so fake_pid_test fake_pid_contract_test random_test file_timestamp_test syscall_contract_test getrandom_test syscall_test $(foreach f,${TEST_SNIPPETS},use_lib_${f} lib${f}.so run_${f}) variadic_promotion variadic/*.o repeat_random libmallocintercept.so
++	@rm -f ${OBJ} timetest shm_layout_test abi_info_test time64_contract_test set_mtime time_ops_test clock_consistency_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test timerfd_contract_test asan_preload_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test futex_contract_test init_reentry.so fake_pid_test fake_pid_contract_test random_test file_timestamp_test syscall_contract_test getrandom_test syscall_test $(foreach f,${TEST_SNIPPETS},use_lib_${f} lib${f}.so run_${f}) variadic_promotion variadic/*.o repeat_random libmallocintercept.so
+ 
+ distclean: clean
+ 	@echo
+diff --git a/test/Makefile.OSX b/test/Makefile.OSX
+index 30341a7..39b0d11 100644
+--- a/test/Makefile.OSX
++++ b/test/Makefile.OSX
+@@ -14,7 +14,7 @@ ifneq ($(filter -DFAKE_PID,${CFLAGS}),)
+ FAKE_PID_TEST_DEP = fake_pid_contract_test
+ endif
+ 
+-all: timetest abi_info_test shm_layout_test set_mtime time_ops_test clock_consistency_test macos_clock_test clock_error_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.dylib ${FILE_TIMESTAMP_TEST_DEP} ${FAKE_PID_TEST_DEP} test
++all: timetest abi_info_test shm_layout_test set_mtime time_ops_test clock_consistency_test macos_clock_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.dylib ${FILE_TIMESTAMP_TEST_DEP} ${FAKE_PID_TEST_DEP} test
+ 
+ .c.o:
+ 	${CC} -c ${CFLAGS} $<
+@@ -37,9 +37,6 @@ time_ops_test: time_ops_test.c ../src/time_ops.h
+ clock_consistency_test: clock_consistency_test.c
+ 	${CC} -o $@ ${CFLAGS} $<
+ 
+-clock_error_test: clock_error_test.c
+-	${CC} -o $@ ${CFLAGS} $< ../src/libfaketime.1.dylib
+-
+ wait_contract_test: wait_contract_test.c
+ 	${CC} -o $@ ${CFLAGS} $<
+ 
+@@ -76,7 +73,7 @@ fake_pid_contract_test: fake_pid_contract_test.c
+ macos_clock_test: macos_clock_test.c
+ 	${CC} -o $@ ${CFLAGS} $< ../src/libfaketime.1.dylib
+ 
+-test: timetest abi_info_test shm_layout_test time_ops_test clock_consistency_test set_mtime macos_clock_test clock_error_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.dylib ${RANDOM_TEST_DEP} ${FILE_TIMESTAMP_TEST_DEP} ${FAKE_PID_TEST_DEP} functest
++test: timetest abi_info_test shm_layout_test time_ops_test clock_consistency_test set_mtime macos_clock_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.dylib ${RANDOM_TEST_DEP} ${FILE_TIMESTAMP_TEST_DEP} ${FAKE_PID_TEST_DEP} functest
+ 	@echo
+ 	@./abi_info_test
+ 	@./time_ops_test
+@@ -87,7 +84,7 @@ functest:
+ 	./testframe.sh functests
+ 
+ clean:
+-	@rm -f ${OBJ} timetest abi_info_test shm_layout_test set_mtime time_ops_test clock_consistency_test macos_clock_test clock_error_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.dylib file_timestamp_test fake_pid_contract_test
++	@rm -f ${OBJ} timetest abi_info_test shm_layout_test set_mtime time_ops_test clock_consistency_test macos_clock_test wait_contract_test wait_api_contract_test sem_contract_test wait_timeout_contract_test fd_leak_test fd_liveness_test emfile_clock_test timezone_contract_test init_reentry.dylib file_timestamp_test fake_pid_contract_test
+ 
+ distclean: clean
+ 	@echo
+diff --git a/test/clock_error_test.c b/test/clock_error_test.c
+deleted file mode 100644
+index 43842a0..0000000
+--- a/test/clock_error_test.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-#include <errno.h>
+-#include <stdint.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <time.h>
+-
+-#ifdef __APPLE__
+-int macos_clock_gettime(clockid_t clk_id, struct timespec *tp);
+-#define test_clock_gettime macos_clock_gettime
+-#else
+-#define test_clock_gettime clock_gettime
+-#endif
+-
+-int main(void)
+-{
+-  int (*clock_gettime_fn)(clockid_t, struct timespec *) = test_clock_gettime;
+-  struct timespec *output = (struct timespec *)(uintptr_t)0;
+-
+-  errno = 0;
+-  if (clock_gettime_fn(CLOCK_REALTIME, output) != -1 || errno != EFAULT)
+-  {
+-    fprintf(stderr, "clock_gettime(NULL) returned errno %d\n", errno);
+-    return EXIT_FAILURE;
+-  }
+-
+-  puts("clock_gettime(NULL) returned EFAULT");
+-  return EXIT_SUCCESS;
+-}
+diff --git a/test/functests/test_clock_contract.sh b/test/functests/test_clock_contract.sh
+index 1425889..e7afe02 100644
+--- a/test/functests/test_clock_contract.sh
++++ b/test/functests/test_clock_contract.sh
+@@ -20,7 +20,6 @@ run()
+ 	run_testcase monotonic_is_non_decreasing
+ 	run_testcase sleep_returns
+ 	run_testcase invalid_clock_id_fails
+-	run_testcase null_clock_output_fails
+ 	run_testcase past_wait_deadlines_timeout
+ 	run_testcase semaphore_deadlines
+ 	run_testcase semaphore_deadlines_absolute
+@@ -118,14 +117,6 @@ invalid_clock_id_fails()
+ 	asserteq "$result" "ok" "invalid clock id should fail"
+ }
+ 
+-null_clock_output_fails()
+-{
+-	typeset result
+-	result=$(fakecmd "+0" ./clock_error_test)
+-	asserteq "$result" "clock_gettime(NULL) returned EFAULT" \
+-		"null clock output should fail with EFAULT"
+-}
+-
+ past_wait_deadlines_timeout()
+ {
+ 	typeset result
+diff --git a/test/sem_contract_test.c b/test/sem_contract_test.c
+index e72f00f..6d20102 100644
+--- a/test/sem_contract_test.c
++++ b/test/sem_contract_test.c
+@@ -87,7 +87,6 @@ int main(void)
+   char name[64];
+   sem_t *semaphore;
+   struct timespec deadline;
+-  int (*sem_timedwait_fn)(sem_t *, const struct timespec *) = sem_timedwait;
+ 
+   (void)snprintf(name, sizeof(name), "/libfaketime-sem-%ld", (long)getpid());
+   sem_unlink(name);
+@@ -117,16 +116,6 @@ int main(void)
+     return EXIT_FAILURE;
+   }
+ 
+-  report_case("null-deadline");
+-  errno = 0;
+-  if (sem_timedwait_fn(semaphore, NULL) != -1 || errno != EINVAL)
+-  {
+-    fprintf(stderr, "null semaphore deadline returned errno %d\n", errno);
+-    sem_close(semaphore);
+-    sem_unlink(name);
+-    return EXIT_FAILURE;
+-  }
+-
+   report_case("realtime-future");
+   if (check_future_realtime_wait(semaphore) != EXIT_SUCCESS)
+   {
+-- 
+2.55.0
+

diff --git a/libfaketime.spec b/libfaketime.spec
index 9b2d354..2dc918d 100644
--- a/libfaketime.spec
+++ b/libfaketime.spec
@@ -1,7 +1,7 @@
 %define _lto_cflags %{nil}
 
 Name:       libfaketime
-Version:    0.9.12
+Version:    0.9.13
 Release:    %autorelease
 Summary:    Manipulate system time per process for testing purposes
 # COPYING:                  GPLv2 text
@@ -9,25 +9,24 @@ Summary:    Manipulate system time per process for testing purposes
 # README:                   "GNU General Public License, see COPYING"
 # src/faketime.c:           GPL-2.0-only
 # src/faketime_common.h:    GPL-2.0-only
+# src/ft_sem.c:             GPL-2.0-only
+# src/ft_sem.h:             GPL-2.0-only
 # src/libfaketime.c:        GPL-2.0-only AND GPL-3.0-only
 # src/time_ops.h:           GPL-2.0-only
 # src/uthash.h:             BSD-1-Clause
 ## Not in any binary package
 # src/timeprivacy:          BSD-2-Clause
-# test/libmallocintercept.c:    GPL-2.0-only
 # test/timetest.c:          GPL-2.0-or-later
 License:    GPL-3.0-only AND GPL-2.0-only AND BSD-1-Clause
 SourceLicense:  %{license} AND GPL-2.0-or-later AND BSD-2-Clause
 URL:        https://github.com/wolfcw/libfaketime
 Source:     %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
-# In upstream after 0.9.12, <https://github.com/wolfcw/libfaketime/pull/525>
-Patch0:     libfaketime-0.9.12-isoc23.patch
 # Make the libraries executable, needed for stripping them. Not suitable for
 # upstream, e.g. Debian does not like it.
-Patch1:     libfaketime-0.9.12-Dynamic-libraries-are-expected-to-be-executable-on-F.patch
-# Adapt to GCC 16, in upstream after 0.9.12,
-# <https://github.com/wolfcw/libfaketime/pull/528>
-Patch2:     libfaketime-0.9.12-tests-Silence-an-unused-but-set-variable-warning-wit.patch
+Patch0:     libfaketime-0.9.12-Dynamic-libraries-are-expected-to-be-executable-on-F.patch
+# Remove tests which pass NULL to syscalls and are surprised with a segfault,
+# proposed upstream, <https://github.com/wolfcw/libfaketime/issues/554>
+Patch1:     libfaketime-0.9.13-Remove-tests-passing-NULL-to-sem_timedwait-and-clock.patch
 BuildRequires:  coreutils
 BuildRequires:  gcc
 BuildRequires:  make

diff --git a/sources b/sources
index 2925416..37274f5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (libfaketime-0.9.12.tar.gz) = c08325b2acd6a0ea3e3af5443f506714901c0be2be1acff5db9b9234b751f6cf653c69ae3ae86219ecb548e3c514adb8cc392af5cc9e2b354722f9d18bee4750
+SHA512 (libfaketime-0.9.13.tar.gz) = 0116e40310684d02dc1af6691e09c001e2b0a692baf0bdcba23d5693faa1874d34b1dd6391f01ccfb1edced2c6317734335f643103887445372c355e1656e664

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-03 12:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 12:10 [rpms/libfaketime] rawhide: 0.9.13 bump 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox