From 9697d9a8659474c328d22cf7624ea6eff5b9c235 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Aug 2019 15:47:40 +0000 Subject: [PATCH] libfaketime fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675271 --- .gitignore | 1 - dead.package | 1 + ...nite-recursion-on-real_clock_gettime.patch | 13 --- libfaketime-0.9.6-boottime.patch | 64 ------------- libfaketime.spec | 94 ------------------- sources | 1 - 6 files changed, 1 insertion(+), 173 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 libfaketime-0.9.5-fix-infinite-recursion-on-real_clock_gettime.patch delete mode 100644 libfaketime-0.9.6-boottime.patch delete mode 100644 libfaketime.spec delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9034363..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/libfaketime-0.9.6.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..1015550 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +libfaketime fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675271 diff --git a/libfaketime-0.9.5-fix-infinite-recursion-on-real_clock_gettime.patch b/libfaketime-0.9.5-fix-infinite-recursion-on-real_clock_gettime.patch deleted file mode 100644 index 9d81e5e..0000000 --- a/libfaketime-0.9.5-fix-infinite-recursion-on-real_clock_gettime.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/libfaketime.c b/src/libfaketime.c -index 3ec372b..f70283b 100644 ---- a/src/libfaketime.c -+++ b/src/libfaketime.c -@@ -1380,7 +1380,7 @@ void __attribute__ ((constructor)) ftpl_init(void) - real_clock_get_time = dlsym(RTLD_NEXT, "clock_get_time"); - real_clock_gettime = apple_clock_gettime; - #else -- real_clock_gettime = dlsym(RTLD_NEXT, "clock_gettime"); -+ real_clock_gettime = dlsym(RTLD_NEXT, "__clock_gettime"); - #ifdef FAKE_TIMERS - real_timer_settime_22 = dlvsym(RTLD_NEXT, "timer_settime","GLIBC_2.2"); - real_timer_settime_233 = dlvsym(RTLD_NEXT, "timer_settime","GLIBC_2.3.3"); diff --git a/libfaketime-0.9.6-boottime.patch b/libfaketime-0.9.6-boottime.patch deleted file mode 100644 index 75956d6..0000000 --- a/libfaketime-0.9.6-boottime.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 628c70a67a94b3020cab79171545721dfd295fcd Mon Sep 17 00:00:00 2001 -From: Mario Pareja -Date: Fri, 9 Jan 2015 18:15:53 +0000 -Subject: [PATCH] Begin adding CLOCK_BOOTTIME support. - ---- - src/faketime_common.h | 2 ++ - src/libfaketime.c | 9 ++++++++- - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/faketime_common.h b/src/faketime_common.h -index ee0d627..7de6cd8 100644 ---- a/src/faketime_common.h -+++ b/src/faketime_common.h -@@ -32,6 +32,8 @@ struct system_time_s - struct timespec mon; - /* System time according to CLOCK_MONOTONIC_RAW */ - struct timespec mon_raw; -+ /* System time according to CLOCK_BOOTTIME */ -+ struct timespec boot; - }; - - /* Data shared among faketime-spawned processes */ -diff --git a/src/libfaketime.c b/src/libfaketime.c -index f4a26be..121bbf6 100644 ---- a/src/libfaketime.c -+++ b/src/libfaketime.c -@@ -208,7 +208,7 @@ static int cache_duration = 10; /* cache fake time input for 10 seconds */ - * Static timespec to store our startup time, followed by a load-time library - * initialization declaration. - */ --static struct system_time_s ftpl_starttime = {{0, -1}, {0, -1}, {0, -1}}; -+static struct system_time_s ftpl_starttime = {{0, -1}, {0, -1}, {0, -1}, {0, -1}}; - - static char user_faked_time_fmt[BUFSIZ] = {0}; - -@@ -319,6 +319,7 @@ static void system_time_from_system (struct system_time_s * systime) - DONT_FAKE_TIME((*real_clock_gettime)(CLOCK_REALTIME, &systime->real)); - DONT_FAKE_TIME((*real_clock_gettime)(CLOCK_MONOTONIC, &systime->mon)); - DONT_FAKE_TIME((*real_clock_gettime)(CLOCK_MONOTONIC_RAW, &systime->mon_raw)); -+ DONT_FAKE_TIME((*real_clock_gettime)(CLOCK_BOOTTIME, &systime->boot)); - #endif - } - -@@ -1834,6 +1835,9 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp) - case CLOCK_MONOTONIC_RAW: - timespecsub(tp, &ftpl_starttime.mon_raw, &tmp_ts); - break; -+ case CLOCK_BOOTTIME: -+ timespecsub(tp, &ftpl_starttime.boot, &tmp_ts); -+ break; - default: - printf("Invalid clock_id for clock_gettime: %d", clk_id); - exit(EXIT_FAILURE); -@@ -1973,6 +1977,9 @@ int fake_clock_gettime(clockid_t clk_id, struct timespec *tp) - case CLOCK_MONOTONIC_RAW: - timespecsub(tp, &ftpl_starttime.mon_raw, &tdiff); - break; -+ case CLOCK_BOOTTIME: -+ timespecsub(tp, &ftpl_starttime.boot, &tdiff); -+ break; - default: - printf("Invalid clock_id for clock_gettime: %d", clk_id); - exit(EXIT_FAILURE); diff --git a/libfaketime.spec b/libfaketime.spec deleted file mode 100644 index ffdc96d..0000000 --- a/libfaketime.spec +++ /dev/null @@ -1,94 +0,0 @@ -Summary: Manipulate system time per process for testing purposes -Name: libfaketime -Version: 0.9.6 -Release: 10%{?dist} -License: GPLv2+ -Url: http://www.code-wizards.com/projects/libfaketime/ -Source: http://www.code-wizards.com/projects/%{name}/%{name}-%{version}.tar.gz -Patch1: libfaketime-0.9.5-fix-infinite-recursion-on-real_clock_gettime.patch -Patch2: libfaketime-0.9.6-boottime.patch - -BuildRequires: gcc -%description -libfaketime intercepts various system calls which programs use to -retrieve the current date and time. It can then report faked dates and -times (as specified by you, the user) to these programs. This means you -can modify the system time a program sees without having to change the -time system- wide. - -%prep -%setup -q -%patch1 -p1 -%patch2 -p1 -# work around from upstream for autodetecting glibc version bug on i686 -sed -i -e 's/__asm__(".symver timer_gettime_22/\/\/__asm__(".symver timer_gettime_22/' src/libfaketime.c -sed -i -e 's/__asm__(".symver timer_settime_22/\/\/__asm__(".symver timer_settime_22/' src/libfaketime.c - - -%build -cd src ; CFLAGS="%{optflags} -Wno-nonnull-compare -Wno-strict-aliasing" make %{?_smp_mflags} \ - PREFIX="%{_prefix}" LIBDIRNAME="/%{_lib}/faketime" all - -%check -make %{?_smp_mflags} -C test all - -%install -make PREFIX="%{_prefix}" DESTDIR=%{buildroot} LIBDIRNAME="/%{_lib}/faketime" install -rm -r %{buildroot}/%{_docdir}/faketime -# needed for stripping/debug package -chmod a+rx %{buildroot}/%{_libdir}/faketime/*.so.* - -%files -%{_bindir}/faketime -%dir %attr(0755, root, root) %{_libdir}/faketime/ -%attr(0755, root, root) %{_libdir}/faketime/libfaketime*so.* -%doc README COPYING NEWS README README.developers -%{_mandir}/man1/* - -%changelog -* Thu Jul 25 2019 Fedora Release Engineering - 0.9.6-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 0.9.6-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 0.9.6-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Feb 07 2018 Fedora Release Engineering - 0.9.6-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 0.9.6-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.9.6-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 0.9.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Oct 12 2016 Paul Wouters - 0.9.6-4 -- Add support for CLOCK_BOOTTIME (patch by Mario Pareja ) - -* Thu Feb 04 2016 Fedora Release Engineering - 0.9.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 0.9.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Tue Oct 28 2014 Paul Wouters - 0.9.6-1 -- Upgraded to 0.9.6 which adds option to disable monotonic time faking -- fix permissions for symbol stripping for debug package - -* Tue Oct 15 2013 Paul Wouters - 0.9.5-4 -- Infinite recursion patch is still needed, make test causes - segfaults otherwise. - -* Mon Oct 14 2013 Paul Wouters - 0.9.5-3 -- Work around from upstream for autodetecting glibc version bug on i686 - -* Mon Oct 14 2013 Paul Wouters - 0.9.5-2 -- Remove use of ifarch for _lib macro for multilib - -* Sun Oct 13 2013 Paul Wouters - 0.9.5-1 -- Initial package diff --git a/sources b/sources deleted file mode 100644 index ab8ac87..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -f522f899d65a057ad69cff9896c75f78 libfaketime-0.9.6.tar.gz