Bug 201661 - ntp can't be reproducibly built
Summary: ntp can't be reproducibly built
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Xin LI
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-07-17 21:21 UTC by Xin LI
Modified: 2015-07-24 22:10 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer freebsd_triage 2015-07-17 21:21:38 UTC
NTP 4.2.8p3 uses __DATE__ and __TIME__ and a parses it in ntpcal_get_build_date().  This prevents reproducible build.

Proposed change would be https://reviews.freebsd.org/D3122 which uses MKREPRO_DATE and MKREPRO_TIME to give reproducible results.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-07-19 19:24:06 UTC
A commit references this bug:

Author: delphij
Date: Sun Jul 19 19:23:39 UTC 2015
New revision: 285701
URL: https://svnweb.freebsd.org/changeset/base/285701

Log:
  Use fixed date/time (the time choosen was the time the import was done on
  -HEAD) in libntp so we can make reproducible build.

  PR:		bin/201661
  Reviewed by:	gjb, cy, roberto
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D3122

Changes:
  head/usr.sbin/ntp/config.h
Comment 2 Xin LI freebsd_committer freebsd_triage 2015-07-19 19:24:26 UTC
MFC reminder.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-07-24 19:52:51 UTC
A commit references this bug:

Author: delphij
Date: Fri Jul 24 19:51:52 UTC 2015
New revision: 285856
URL: https://svnweb.freebsd.org/changeset/base/285856

Log:
  MFC r285701:

  Use fixed date/time (the time choosen was the time the import was done
  on -HEAD) in libntp so we can make reproducible build.

  PR:		bin/201661
  Differential Revision:	https://reviews.freebsd.org/D3122

  While I'm there also remove libmd from linkage as reported in bin/201738

  PR:		bin/201738
  Submitted by:	John Marshall

Changes:
_U  stable/10/
  stable/10/usr.sbin/ntp/config.h
  stable/10/usr.sbin/ntp/ntpd/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-07-24 22:09:08 UTC
A commit references this bug:

Author: delphij
Date: Fri Jul 24 22:08:58 UTC 2015
New revision: 285861
URL: https://svnweb.freebsd.org/changeset/base/285861

Log:
  MFS r285856:

  MFC r285701:

  Use fixed date/time (the time choosen was the time the import was done
  on -HEAD) in libntp so we can make reproducible build.

  PR:		bin/201661
  Differential Revision:	https://reviews.freebsd.org/D3122

  While I'm there also remove libmd from linkage as reported in bin/201738

  PR:		bin/201738
  Submitted by:	John Marshall
  Approved by:	re (gjb)

Changes:
_U  releng/10.2/
  releng/10.2/usr.sbin/ntp/config.h
  releng/10.2/usr.sbin/ntp/ntpd/Makefile
Comment 5 Xin LI freebsd_committer freebsd_triage 2015-07-24 22:10:00 UTC
Applied to all needed branches.