libfaketime intercepts various system calls that programs use to
retrieve the current date and time. It then reports modified (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.

libfaketime allows you to specify both absolute dates (e.g. 01/01/2004)
and relative dates (e.g., 10 days ago).

libfaketime might be used for various purposes, for example
  - deterministic build processes
  - debugging time-related issues, such as expired SSL certificates
  - testing software for year-2038 compliance

libfaketime ships with a command line wrapper called "faketime" that
makes it easier to use, but does not expose all of libfaketime's
functionality. If your use case is not covered by the faketime command,
make sure to look in this documentation whether it can be achieved by
using libfaketime directly.

For more information, see https://github.com/wolfcw/libfaketime

Signed-off-by: Andreas Pretzsch <a...@cn-eng.de>
---
Tested with PTXdist 2016.01.0, but simple, so should work for PTXdist upstream.

 rules/libfaketime.in   | 27 ++++++++++++++++++++++
 rules/libfaketime.make | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100644 rules/libfaketime.in
 create mode 100644 rules/libfaketime.make

diff --git a/rules/libfaketime.in b/rules/libfaketime.in
new file mode 100644
index 0000000..87c42c0
--- /dev/null
+++ b/rules/libfaketime.in
@@ -0,0 +1,27 @@
+## SECTION=debug_tools
+
+config LIBFAKETIME
+       tristate
+       prompt "libfaketime"
+       help
+         libfaketime intercepts various system calls that programs use to
+         retrieve the current date and time. It then reports modified (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.
+
+         libfaketime allows you to specify both absolute dates (e.g. 
01/01/2004)
+         and relative dates (e.g., 10 days ago).
+
+         libfaketime might be used for various purposes, for example
+           - deterministic build processes
+           - debugging time-related issues, such as expired SSL certificates
+           - testing software for year-2038 compliance
+
+         libfaketime ships with a command line wrapper called "faketime" that
+         makes it easier to use, but does not expose all of libfaketime's
+         functionality. If your use case is not covered by the faketime 
command,
+         make sure to look in this documentation whether it can be achieved by
+         using libfaketime directly.
+
+         For more information, see https://github.com/wolfcw/libfaketime
diff --git a/rules/libfaketime.make b/rules/libfaketime.make
new file mode 100644
index 0000000..3736904
--- /dev/null
+++ b/rules/libfaketime.make
@@ -0,0 +1,62 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Andreas Pretzsch <a...@cn-eng.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+PACKAGES-$(PTXCONF_LIBFAKETIME) += libfaketime
+
+LIBFAKETIME_VERSION    := 0.9.7
+LIBFAKETIME_MD5                := 8617e2c6caf0977b3ce9a271f867302c
+LIBFAKETIME            := libfaketime-$(LIBFAKETIME_VERSION)
+LIBFAKETIME_SUFFIX     := tar.gz
+LIBFAKETIME_URL                := 
https://github.com/wolfcw/libfaketime/archive/v$(LIBFAKETIME_VERSION).$(LIBFAKETIME_SUFFIX)
+LIBFAKETIME_SOURCE     := $(SRCDIR)/$(LIBFAKETIME).$(LIBFAKETIME_SUFFIX)
+LIBFAKETIME_DIR                := $(BUILDDIR)/$(LIBFAKETIME)
+LIBFAKETIME_LICENSE    := GPL-2.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+LIBFAKETIME_CONF_TOOL  := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+LIBFAKETIME_MAKE_ENV   := $(CROSS_ENV)
+LIBFAKETIME_MAKE_OPT   := PREFIX=/usr
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+LIBFAKETIME_INSTALL_OPT        := PREFIX=/usr install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libfaketime.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, libfaketime)
+       @$(call install_fixup, libfaketime,PRIORITY,optional)
+       @$(call install_fixup, libfaketime,SECTION,base)
+       @$(call install_fixup, libfaketime,AUTHOR,"Andreas Pretzsch 
<a...@cn-eng.de>")
+       @$(call install_fixup, libfaketime,DESCRIPTION,missing)
+
+       @$(call install_lib, libfaketime, 0, 0, 0644, faketime/libfaketime)
+       @$(call install_lib, libfaketime, 0, 0, 0644, faketime/libfaketimeMT)
+       @$(call install_copy, libfaketime, 0, 0, 0755, -, /usr/bin/faketime)
+
+       @$(call install_finish, libfaketime)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.9.3


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to