From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 16 Dec 2024 08:02:07 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tN57G-008iuq-2x for lore@lore.pengutronix.de; Mon, 16 Dec 2024 08:02:07 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tN57H-0004Og-3i; Mon, 16 Dec 2024 08:02:07 +0100 Received: from mail.thorsis.com ([217.92.40.78]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tN56y-0004Mu-0r for ptxdist@pengutronix.de; Mon, 16 Dec 2024 08:01:48 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4A387148874E for ; Mon, 16 Dec 2024 08:01:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1734332506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EPgXQCIxBE0bRcl0KHCAaj0nQBhY46HVb8vjb7wlksI=; b=whLqzPPXVaj//plv9//bKEv8GZ9N3bIUdoZe/BB7mMupRgKncZkGAwygaQluZGFpbuMfqX 0FReLN6ctTrg7SI0clxCjB2uESzpQL80pBzTOKc9cgnerDQDIQeSoFSJk+iAladUNtxzYY y1pETQR07iFLOrR0Wi9rDgbR6DLcgKhX8Hxz1dyxGKUAUND9/f3tbk7Vaqmu7JYFBmoUrs EOwRPaLzr44C96KXPJWw1Qq1ouCMiWeE2Gw21s2iJsqpAuC+E72um5thqHKlvIfq9Sgq4h BUYdxvp7fsopTD6cLS7hcIy4xVw7izJSSi7svjoSDGvYYfXDF9/WimWl3iCNbw== From: Alexander Dahl To: ptxdist@pengutronix.de Date: Mon, 16 Dec 2024 08:01:39 +0100 Message-Id: <20241216070139.8009-1-ada@thorsis.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH v2] libfaketime: version bump 0.9.7 -> 0.9.10 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Fixes, improved error message output, improved testing. Some new features, see release notes. Patch stack is down to one. Patch 1 was adapted. Patch 2 issue was solved upstream in a similar way by a different developer. Patch 3 issue aka GCC 8 fixes, were solved upstream, too. Link: https://github.com/wolfcw/libfaketime/releases/tag/v0.9.8 Link: https://github.com/wolfcw/libfaketime/releases/tag/v0.9.9 Link: https://github.com/wolfcw/libfaketime/releases/tag/v0.9.10 Signed-off-by: Alexander Dahl --- Notes: v1 -> v2: - re-added patch stack - re-worded commit message ...-buildsystem-avoid-Werror-on-release.patch | 8 ++-- .../series | 4 +- ...ketime-fix-format-truncation-warning.patch | 41 ----------------- ...libfaketime-fix-casting-hell-warning.patch | 44 ------------------- rules/libfaketime.make | 4 +- 5 files changed, 7 insertions(+), 94 deletions(-) rename patches/{libfaketime-0.9.7 => libfaketime-0.9.10}/0001-buildsystem-avoid-Werror-on-release.patch (74%) rename patches/{libfaketime-0.9.7 => libfaketime-0.9.10}/series (39%) delete mode 100644 patches/libfaketime-0.9.7/0002-faketime-fix-format-truncation-warning.patch delete mode 100644 patches/libfaketime-0.9.7/0003-libfaketime-fix-casting-hell-warning.patch diff --git a/patches/libfaketime-0.9.7/0001-buildsystem-avoid-Werror-on-release.patch b/patches/libfaketime-0.9.10/0001-buildsystem-avoid-Werror-on-release.patch similarity index 74% rename from patches/libfaketime-0.9.7/0001-buildsystem-avoid-Werror-on-release.patch rename to patches/libfaketime-0.9.10/0001-buildsystem-avoid-Werror-on-release.patch index af60f7bdb..ae92f8ee1 100644 --- a/patches/libfaketime-0.9.7/0001-buildsystem-avoid-Werror-on-release.patch +++ b/patches/libfaketime-0.9.10/0001-buildsystem-avoid-Werror-on-release.patch @@ -25,15 +25,15 @@ Signed-off-by: Juergen Borleis 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile -index a557c3847341..27118abcf23d 100644 +index 62e924c08dc0..0aee90212d29 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -62,7 +62,7 @@ PREFIX ?= /usr/local +@@ -110,7 +110,7 @@ PREFIX ?= /usr/local LIBDIRNAME ?= /lib/faketime PLATFORM ?=$(shell uname) --CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' -+CFLAGS += -std=gnu99 -Wall -Wextra -Wno-nonnull-compare -DFAKE_STAT -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' +-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS) ++CFLAGS += -std=gnu99 -Wall -Wextra -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS) ifeq ($(PLATFORM),SunOS) CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 endif diff --git a/patches/libfaketime-0.9.7/series b/patches/libfaketime-0.9.10/series similarity index 39% rename from patches/libfaketime-0.9.7/series rename to patches/libfaketime-0.9.10/series index 5ed1cf68e..20edb71e7 100644 --- a/patches/libfaketime-0.9.7/series +++ b/patches/libfaketime-0.9.10/series @@ -1,6 +1,4 @@ # generated by git-ptx-patches #tag:base --start-number 1 0001-buildsystem-avoid-Werror-on-release.patch -0002-faketime-fix-format-truncation-warning.patch -0003-libfaketime-fix-casting-hell-warning.patch -# 324f635631c9304e302c860942b23b40 - git-ptx-patches magic +# c1c73f576c0ffd760a7fc16e6cba529e - git-ptx-patches magic diff --git a/patches/libfaketime-0.9.7/0002-faketime-fix-format-truncation-warning.patch b/patches/libfaketime-0.9.7/0002-faketime-fix-format-truncation-warning.patch deleted file mode 100644 index 830c810f6..000000000 --- a/patches/libfaketime-0.9.7/0002-faketime-fix-format-truncation-warning.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Juergen Borleis -Date: Thu, 23 May 2019 11:30:23 +0200 -Subject: [PATCH] faketime: fix format truncation warning. - -GCC8 states: - - faketime.c:289:45: error: '%s' directive output may be truncated writing - up to 4095 bytes into a region of size between 0 and 4095 - [-Werror=format-truncation=] - -Using snprintf() is a good idea to not write behind the end of an array, -but a truncation of the content is an ugly failure as well. - -Since both input buffers are 4096 bytes in size, the output buffer must be -at least twice in size. ---- - src/faketime.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/faketime.c b/src/faketime.c -index 138ebbd55388..647c0f0c318c 100644 ---- a/src/faketime.c -+++ b/src/faketime.c -@@ -209,7 +209,7 @@ int main (int argc, char **argv) - int shm_fd; - sem_t *sem; - struct ft_shared_s *ft_shared; -- char shared_objs[PATH_BUFSIZE]; -+ char shared_objs[PATH_BUFSIZE * 2]; - - /* - * Casting of getpid() return value to long needed to make GCC on SmartOS -@@ -286,7 +286,7 @@ int main (int argc, char **argv) - exit(EXIT_FAILURE); - } - -- snprintf(shared_objs, PATH_BUFSIZE, "%s %s", sem_name, shm_name); -+ snprintf(shared_objs, sizeof(shared_objs), "%s %s", sem_name, shm_name); - setenv("FAKETIME_SHARED", shared_objs, true); - sem_close(sem); - } diff --git a/patches/libfaketime-0.9.7/0003-libfaketime-fix-casting-hell-warning.patch b/patches/libfaketime-0.9.7/0003-libfaketime-fix-casting-hell-warning.patch deleted file mode 100644 index 7cb00af9e..000000000 --- a/patches/libfaketime-0.9.7/0003-libfaketime-fix-casting-hell-warning.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Juergen Borleis -Date: Thu, 23 May 2019 11:33:15 +0200 -Subject: [PATCH] libfaketime: fix casting hell warning - -GCC8 states: - - libfaketime.c:1986:24: error: cast between incompatible function types - from 'int (*)(pthread_mutex_t *)' {aka 'int (*)(union *)'} - to 'void (*)(void *)' [-Werror=cast-function-type] - -Let the compiler inline a new function instead, which correctly casts the -value. ---- - src/libfaketime.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/src/libfaketime.c b/src/libfaketime.c -index eb2d01bb6631..acf586223dec 100644 ---- a/src/libfaketime.c -+++ b/src/libfaketime.c -@@ -1953,6 +1953,14 @@ static void remove_trailing_eols(char *line) - } - } - -+#ifdef PTHREAD -+/* to avoid a cast() hell and compiler warnings */ -+static void thread_cleanup_locks(void *p) -+{ -+ pthread_mutex_t *time_mutex = (pthread_mutex_t*)p; -+ pthread_mutex_unlock(time_mutex); -+} -+#endif - - /* - * ======================================================================= -@@ -1983,7 +1991,7 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp) - #ifdef PTHREAD_SINGLETHREADED_TIME - static pthread_mutex_t time_mutex=PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&time_mutex); -- pthread_cleanup_push((void (*)(void *))pthread_mutex_unlock, (void *)&time_mutex); -+ pthread_cleanup_push(thread_cleanup_locks, (void *)&time_mutex); - #endif - - if ((limited_faking && diff --git a/rules/libfaketime.make b/rules/libfaketime.make index e9c56c5d1..b3ea8edc8 100644 --- a/rules/libfaketime.make +++ b/rules/libfaketime.make @@ -8,8 +8,8 @@ PACKAGES-$(PTXCONF_LIBFAKETIME) += libfaketime -LIBFAKETIME_VERSION := 0.9.7 -LIBFAKETIME_MD5 := 8617e2c6caf0977b3ce9a271f867302c +LIBFAKETIME_VERSION := 0.9.10 +LIBFAKETIME_MD5 := bbeaa43f514fc8e637e5efdac53e2671 LIBFAKETIME := libfaketime-$(LIBFAKETIME_VERSION) LIBFAKETIME_SUFFIX := tar.gz LIBFAKETIME_URL := https://github.com/wolfcw/libfaketime/archive/v$(LIBFAKETIME_VERSION).$(LIBFAKETIME_SUFFIX) base-commit: 5bce7bd2012d3582d97fe579d6c5cefedf37f46a -- 2.39.5