From 2a9be4c67b38d8db3ddd9d1fa5dd59c95bac088f Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Oct 28 2014 16:59:55 +0000 Subject: -fix debug symbols --- diff --git a/libfaketime-0.9.5rc2-Makefile.patch b/libfaketime-0.9.5rc2-Makefile.patch deleted file mode 100644 index a8b9d93..0000000 --- a/libfaketime-0.9.5rc2-Makefile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur libfaketime-0.9.5rc2-orig/src/Makefile libfaketime-0.9.5rc2/src/Makefile ---- libfaketime-0.9.5rc2-orig/src/Makefile 2013-10-04 04:21:42.000000000 -0400 -+++ libfaketime-0.9.5rc2/src/Makefile 2013-10-04 17:37:31.346865090 -0400 -@@ -76,7 +76,7 @@ - ${CC} -o $@ -Wl,-soname,$@ ${LDFLAGS} ${LIB_LDFLAGS} $< ${LDADD} - - ${BINS}: faketime.c -- ${CC} -o $@ ${CFLAGS} ${EXTRA_FLAGS} $< ${LDFLAGS} -+ ${CC} -o $@ ${CFLAGS} ${EXTRA_FLAGS} -lpthread $< ${LDFLAGS} - - clean: - @rm -f ${LIBS_OBJ} ${LIBS} ${BINS} diff --git a/libfaketime.spec b/libfaketime.spec new file mode 100644 index 0000000..ef2aa74 --- /dev/null +++ b/libfaketime.spec @@ -0,0 +1,62 @@ +Summary: Manipulate system time per process for testing purposes +Name: libfaketime +Version: 0.9.6 +Release: 1%{?dist} +License: GPLv2+ +Url: http://www.code-wizards.com/projects/%{name}/ +Source: http://www.code-wizards.com/projects/%{name}/%{name}-%{version}.tar.gz +Group: System Environment/Libraries +Patch1: libfaketime-0.9.5-fix-infinite-recursion-on-real_clock_gettime.patch + +%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 +# 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-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 +* 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