Skip to content

Commit

Permalink
mk: fix repro.mk, add initial SOURCE_DATE_EPOCH support.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkicoon committed May 15, 2023
1 parent be7c179 commit fa79ebf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mk/repro/repro.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# $NetBSD: repro.mk,v 1.1 2017/11/12 13:34:14 khorben Exp $
# $NetBSD: repro.mk,v 1.2 2023/05/15 17:16:58 nikita Exp $
#
# Infrastructure support for PKGSRC_MKREPRO.
#
# Keywords: reproducible
#

.if ${_PKGSRC_MKREPRO} == "yes"
.if ${PKGSRC_MKREPRO} == "yes"

# force ar(1) to be deterministic
TOOLS_CREATE+= ar
TOOLS_PATH.ar?= ${PKGSRCDIR}/mk/repro/ar
TOOLS_ARGS.ar?= D

# force SOURCE_DATE_EPOCH
# https://reproducible-builds.org/docs/source-date-epoch/
# TODO: is this exported in all necessary envs?
PKGSRC_MAKE_ENV+= SOURCE_DATE_EPOCH=1

.endif

0 comments on commit fa79ebf

Please sign in to comment.