Thanks, applied as 98b7369d24250ef2203b7dd2ea485b65913adc12. Michael
[sent from post-receive hook] On Thu, 16 Jan 2025 17:09:30 +0100, Alexander Dahl <[email protected]> wrote: > 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 <[email protected]> > Message-Id: <[email protected]> > Signed-off-by: Michael Olbrich <[email protected]> > > 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 af60f7bdb0e4..ae92f8ee1cb0 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 <[email protected]> > 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.10/series > b/patches/libfaketime-0.9.10/series > new file mode 100644 > index 000000000000..20edb71e738a > --- /dev/null > +++ b/patches/libfaketime-0.9.10/series > @@ -0,0 +1,4 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-buildsystem-avoid-Werror-on-release.patch > +# 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 830c810f645c..000000000000 > --- > a/patches/libfaketime-0.9.7/0002-faketime-fix-format-truncation-warning.patch > +++ /dev/null > @@ -1,41 +0,0 @@ > -From: Juergen Borleis <[email protected]> > -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 7cb00af9e2c2..000000000000 > --- > a/patches/libfaketime-0.9.7/0003-libfaketime-fix-casting-hell-warning.patch > +++ /dev/null > @@ -1,44 +0,0 @@ > -From: Juergen Borleis <[email protected]> > -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 <anonymous> *)'} > - 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/patches/libfaketime-0.9.7/series > b/patches/libfaketime-0.9.7/series > deleted file mode 100644 > index 5ed1cf68eaca..000000000000 > --- a/patches/libfaketime-0.9.7/series > +++ /dev/null > @@ -1,6 +0,0 @@ > -# 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 > diff --git a/rules/libfaketime.make b/rules/libfaketime.make > index e9c56c5d134c..b3ea8edc82bc 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)
