mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libfaketime: new package for libfaketime 0.9.7
@ 2017-11-27  2:20 Andreas Pretzsch
  0 siblings, 0 replies; only message in thread
From: Andreas Pretzsch @ 2017-11-27  2:20 UTC (permalink / raw)
  To: ptxdist

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 <apr@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 <apr@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 <apr@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-27  2:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27  2:20 [ptxdist] [PATCH] libfaketime: new package for libfaketime 0.9.7 Andreas Pretzsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox