2014-10-28 16:59:55 +00:00
|
|
|
Summary: Manipulate system time per process for testing purposes
|
|
|
|
Name: libfaketime
|
2022-01-27 00:06:31 +00:00
|
|
|
Version: 0.9.10
|
2023-02-21 08:28:20 +00:00
|
|
|
Release: 4%{?dist}
|
2014-10-28 16:59:55 +00:00
|
|
|
License: GPLv2+
|
2019-08-29 18:15:14 +00:00
|
|
|
Url: https://github.com/wolfcw/libfaketime
|
2022-01-27 00:06:31 +00:00
|
|
|
Source: libfaketime-0.9.10.tar.gz
|
|
|
|
Patch0: libfaketime-backports.patch
|
2020-09-02 19:49:04 +00:00
|
|
|
Patch1: libfaketime-symver.patch
|
2022-01-27 00:06:31 +00:00
|
|
|
Patch2: 0001-Disable-unused-result-warning-in-tests.patch
|
|
|
|
Patch3: 0001-Fix-gettimeofday-aarch64_epel8.patch
|
2014-10-28 16:59:55 +00:00
|
|
|
|
2019-10-29 21:50:18 +00:00
|
|
|
Provides: faketime
|
|
|
|
|
2018-07-24 14:58:24 +00:00
|
|
|
BuildRequires: gcc
|
2019-08-29 18:15:14 +00:00
|
|
|
BuildRequires: perl-interpreter
|
|
|
|
BuildRequires: perl-Time-HiRes
|
2021-01-05 01:47:47 +00:00
|
|
|
BuildRequires: make
|
2023-02-21 08:28:20 +00:00
|
|
|
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
2022-01-27 00:06:31 +00:00
|
|
|
Excludearch: %{ix86} %{arm}
|
|
|
|
%endif
|
2019-10-29 21:50:18 +00:00
|
|
|
|
2014-10-28 16:59:55 +00:00
|
|
|
%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
|
2019-08-29 18:15:14 +00:00
|
|
|
%patch0 -p1
|
2020-09-02 22:41:10 +00:00
|
|
|
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 9
|
2020-09-02 19:49:04 +00:00
|
|
|
%patch1 -p1
|
2020-09-02 22:41:10 +00:00
|
|
|
%endif
|
2023-02-22 01:07:42 +00:00
|
|
|
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
2020-09-02 22:41:10 +00:00
|
|
|
%patch2 -p1
|
2022-01-27 00:06:31 +00:00
|
|
|
%endif
|
|
|
|
%if 0%{?rhel} == 8
|
|
|
|
%ifarch aarch64
|
|
|
|
%patch3 -p1
|
|
|
|
%endif
|
|
|
|
%endif
|
2014-10-28 16:59:55 +00:00
|
|
|
|
|
|
|
%build
|
2022-01-27 00:06:31 +00:00
|
|
|
|
2019-08-29 18:15:14 +00:00
|
|
|
cd src
|
2019-09-04 01:07:31 +00:00
|
|
|
|
|
|
|
# https://github.com/wolfcw/libfaketime/blob/master/README.packagers
|
|
|
|
# Upstream libfaketime requires a mess of different compile time flags for different glibc versions and architectures.
|
|
|
|
# https://github.com/wolfcw/libfaketime/pull/178
|
|
|
|
# Goal is to build time autodetect these with autotools in the next release ...
|
|
|
|
|
|
|
|
FAKETIME_COMPILE_CFLAGS="BOGUS"
|
2019-08-29 18:15:14 +00:00
|
|
|
%if 0%{?el7}
|
|
|
|
%ifarch x86_64
|
2019-09-04 01:07:31 +00:00
|
|
|
echo "force_monotonic https://github.com/wolfcw/libfaketime/issues/202"
|
2019-08-29 18:15:14 +00:00
|
|
|
export FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX"
|
|
|
|
%endif
|
|
|
|
%ifarch aarch64 ppc64le
|
2019-09-04 01:07:31 +00:00
|
|
|
echo "force_monotonic and pthread_nonver https://github.com/wolfcw/libfaketime/issues/205"
|
2019-08-29 18:15:14 +00:00
|
|
|
export FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER"
|
|
|
|
%endif
|
2019-11-15 22:19:39 +00:00
|
|
|
%ifarch armv7hl
|
|
|
|
unset FAKETIME_COMPILE_CFLAGS
|
|
|
|
%endif
|
2019-09-04 01:07:31 +00:00
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} == 30 || 0%{?el8}
|
|
|
|
# only ppc64le needs a workaround
|
2019-08-29 18:15:14 +00:00
|
|
|
%ifarch ppc64le
|
|
|
|
echo "pthread_nonver https://github.com/wolfcw/libfaketime/issues/204"
|
|
|
|
export FAKETIME_COMPILE_CFLAGS="-DFORCE_PTHREAD_NONVER"
|
|
|
|
%else
|
|
|
|
unset FAKETIME_COMPILE_CFLAGS
|
|
|
|
%endif
|
|
|
|
%endif
|
2022-01-27 00:06:31 +00:00
|
|
|
%if 0%{?fedora} >= 31 || 0%{?rhel} >=9
|
2019-09-04 01:07:31 +00:00
|
|
|
# for reasons we don't know the old glibc workaround is required here but not on archv7hl and aarch64 ...
|
|
|
|
%ifarch i686 x86_64 s390x
|
|
|
|
echo "force_monotonic"
|
|
|
|
export FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX"
|
|
|
|
%endif
|
|
|
|
%ifarch ppc64le
|
|
|
|
echo "force_monotonic and pthread_nonver"
|
|
|
|
export FAKETIME_COMPILE_CFLAGS="-DFORCE_MONOTONIC_FIX -DFORCE_PTHREAD_NONVER"
|
|
|
|
%endif
|
|
|
|
%ifarch armv7hl aarch64
|
|
|
|
unset FAKETIME_COMPILE_CFLAGS
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
if [ "$FAKETIME_COMPILE_CFLAGS" == "BOGUS" ]; then
|
|
|
|
echo "SHOULD NEVER REACH HERE ... YOU HAVE AN UNTESTED VERSION+ARCH, see rpm spec for details ... ABORT"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-08-29 18:15:14 +00:00
|
|
|
CFLAGS="%{optflags} -Wno-nonnull-compare -Wno-strict-aliasing" make %{?_smp_mflags} \
|
2014-10-28 16:59:55 +00:00
|
|
|
PREFIX="%{_prefix}" LIBDIRNAME="/%{_lib}/faketime" all
|
|
|
|
|
|
|
|
%check
|
2019-10-29 21:50:18 +00:00
|
|
|
make %{?_smp_mflags} -C test
|
2014-10-28 16:59:55 +00:00
|
|
|
|
|
|
|
%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.*
|
|
|
|
|
2019-10-29 21:50:18 +00:00
|
|
|
|
2016-10-12 17:09:31 +00:00
|
|
|
%files
|
2014-10-28 16:59:55 +00:00
|
|
|
%{_bindir}/faketime
|
|
|
|
%dir %attr(0755, root, root) %{_libdir}/faketime/
|
|
|
|
%attr(0755, root, root) %{_libdir}/faketime/libfaketime*so.*
|
2019-10-29 21:50:18 +00:00
|
|
|
%license COPYING
|
|
|
|
%doc README NEWS README.developers
|
2014-10-28 16:59:55 +00:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
|
|
|
%changelog
|
2023-02-21 08:51:11 +00:00
|
|
|
* Tue Feb 21 2023 Pablo Greco <pgreco@centosproject.org> - 0.9.10-4
|
2023-02-21 08:28:20 +00:00
|
|
|
- Also disable i686 in rhel>=10 (ELN failures)
|
|
|
|
|
2023-01-19 16:18:28 +00:00
|
|
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
2022-07-21 17:46:43 +00:00
|
|
|
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.10-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-01-27 00:06:31 +00:00
|
|
|
* Tue May 10 2022 Pablo Greco <pgreco@centosproject.org> - 0.9.10-1
|
|
|
|
- Update to 0.9.10
|
|
|
|
- Disable i686 and armhfp in fedora >=36
|
|
|
|
|
2022-01-20 16:11:31 +00:00
|
|
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-13
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
2021-07-22 11:21:13 +00:00
|
|
|
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-12
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-01-26 17:02:37 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-11
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-09-02 22:44:27 +00:00
|
|
|
* Wed Sep 02 2020 Pablo Greco <pgreco@centosproject.org> - 0.9.8-10
|
2020-09-02 22:41:10 +00:00
|
|
|
- Conditionals to build 0.9.8-9 in f31 and epel7-8
|
|
|
|
- Use upstream's version of the gcc10 fix
|
|
|
|
|
2020-09-02 19:49:04 +00:00
|
|
|
* Wed Sep 02 2020 Jeff Law <law@redhat.com> - 0.9.8-9
|
|
|
|
- Use symver attribute instead of asms for symbol versioning
|
|
|
|
- Enable LTO
|
|
|
|
|
2020-07-28 04:37:37 +00:00
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-8
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-10 17:37:40 +00:00
|
|
|
* Fri Jul 10 2020 Jeff Law <law@redhat.com> - 0.9.8-7
|
|
|
|
- Disable LTO
|
|
|
|
|
2020-02-08 13:48:22 +00:00
|
|
|
* Sat Feb 08 2020 Pablo Greco <pgreco@centosproject.org> - 0.9.8-6
|
|
|
|
- Fix build with gcc10
|
|
|
|
|
2020-01-29 09:05:50 +00:00
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-10-29 21:50:18 +00:00
|
|
|
* Tue Oct 29 2019 Paul Wouters <pwouters@redhat.com> - 0.9.8-5
|
|
|
|
- Resolves: rhbz#1766749 libfaketime rfe: please add Provides:faketime
|
|
|
|
- Use license tag, remove duplicate README entry, update make test target
|
|
|
|
|
2019-09-04 01:07:31 +00:00
|
|
|
* Tue Sep 03 2019 Warren Togami <warren@blockstream.com> - 0.9.8-4
|
|
|
|
- upstream says to use FORCE_PTHREAD_NONVER on any glibc+arch that gets stuck
|
|
|
|
For Fedora 31+ "make test" gets stuck on i686 x86_64 ppc64le s390x
|
|
|
|
|
|
|
|
* Wed Aug 28 2019 Warren Togami <warren@blockstream.com> - 0.9.8-3
|
2019-08-29 18:15:14 +00:00
|
|
|
- 0.9.8
|
|
|
|
- x86_64 EL7: DFORCE_MONOTONIC_FIX
|
|
|
|
aarch64 EL7: DFORCE_MONOTONIC_FIX and FORCE_PTHREAD_NONVER
|
|
|
|
ppc64le EL7: DFORCE_MONOTONIC_FIX and FORCE_PTHREAD_NONVER
|
|
|
|
ppc64le F30+ FORCE_PTHREAD_NONVER
|
|
|
|
|
2019-02-01 07:06:26 +00:00
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-9
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
2018-07-13 08:05:07 +00:00
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-8
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
2018-02-07 21:36:05 +00:00
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
2017-08-03 01:26:45 +00:00
|
|
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
|
|
2017-07-26 18:49:25 +00:00
|
|
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-02-10 18:38:19 +00:00
|
|
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
2016-10-12 17:09:31 +00:00
|
|
|
* Wed Oct 12 2016 Paul Wouters <pwouters@redhat.com> - 0.9.6-4
|
|
|
|
- Add support for CLOCK_BOOTTIME (patch by Mario Pareja <pareja.mario@gmail.com>)
|
|
|
|
|
2016-02-04 03:08:35 +00:00
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.6-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
2015-06-17 15:14:55 +00:00
|
|
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
|
2014-10-28 16:59:55 +00:00
|
|
|
* Tue Oct 28 2014 Paul Wouters <pwouters@redhat.com> - 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 <pwouters@redhat.com> - 0.9.5-4
|
|
|
|
- Infinite recursion patch is still needed, make test causes
|
|
|
|
segfaults otherwise.
|
|
|
|
|
|
|
|
* Mon Oct 14 2013 Paul Wouters <pwouters@redhat.com> - 0.9.5-3
|
|
|
|
- Work around from upstream for autodetecting glibc version bug on i686
|
|
|
|
|
|
|
|
* Mon Oct 14 2013 Paul Wouters <pwouters@redhat.com> - 0.9.5-2
|
|
|
|
- Remove use of ifarch for _lib macro for multilib
|
|
|
|
|
|
|
|
* Sun Oct 13 2013 Paul Wouters <pwouters@redhat.com> - 0.9.5-1
|
|
|
|
- Initial package
|