mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Andreas Pretzsch <apr@cn-eng.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] libfaketime: new package for libfaketime 0.9.7
Date: Mon, 27 Nov 2017 03:20:21 +0100	[thread overview]
Message-ID: <1511749221-16349-1-git-send-email-apr@cn-eng.de> (raw)

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

                 reply	other threads:[~2017-11-27  2:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511749221-16349-1-git-send-email-apr@cn-eng.de \
    --to=apr@cn-eng.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox