Changeset View
Standalone View
Mk/bsd.port.mk
| Show First 20 Lines • Show All 2,044 Lines • ▼ Show 20 Lines | |||||
| DO_NADA?= ${TRUE} | DO_NADA?= ${TRUE} | ||||
| # Use this as the first operand to always build dependency. | # Use this as the first operand to always build dependency. | ||||
| NONEXISTENT?= /nonexistent | NONEXISTENT?= /nonexistent | ||||
| CHECKSUM_ALGORITHMS?= sha256 | CHECKSUM_ALGORITHMS?= sha256 | ||||
| DISTINFO_FILE?= ${MASTERDIR}/distinfo | DISTINFO_FILE?= ${MASTERDIR}/distinfo | ||||
emaste: 1449231300 is Fri 4 Dec 2015 12:15:00 UTC
Presumably will update if/when ready to commit. | |||||
Not Done Inline ActionsWe should also explain why there is a default value for TIMESTAMP in a comment, since the value seems strangely arbitrary. (I mean, it is arbitrary, but reasonably so.) emaste: We should also explain why there is a default value for `TIMESTAMP` in a comment, since the… | |||||
| # Timestamp for package archive metadata, for reproducible builds, with a | |||||
| # default for ports that do not override it via distinfo. | |||||
| TIMESTAMP= 1500000000 | |||||
Not Done Inline ActionsThis will hurt dependency calculation for Poudriere. Please wrap in something like this to prevent running on depends targets and -V, unless looking at -V TIMESTAMP .if !make(*depends*) && empty(.MAKEFLAGS:M-V) && empty(.MAKEFLAGS:M*TIMESTAMP) bdrewery: This will hurt dependency calculation for Poudriere. Please wrap in something like this to… | |||||
Not Done Inline ActionsNo *, just :MTIMESTAMP bdrewery: No *, just :MTIMESTAMP | |||||
Not Done Inline ActionsWhat about: .if !make(*depends*) && empty(.MAKEFLAGS:M-V) && \
empty(.MAKEFLAGS:MTIMESTAMP) && exists(${DISTINFO_FILE})
TIMESTAMP!= ${AWK} -F' = ' -v ts=${TIMESTAMP} '/^TIMESTAMP/ { ts=$$2 } END { print ts}' ${DISTINFO_FILE}
.endifemaste: What about:
```
.if !make(*depends*) && empty(.MAKEFLAGS:M-V) && \
empty(.MAKEFLAGS… | |||||
Not Done Inline ActionsThis is probably OK but can we just whitelist the target it is needed in instead? make package? bdrewery: This is probably OK but can we just whitelist the target it is needed in instead? `make… | |||||
Not Done Inline ActionsSome ports may wish to use it for the build (via SOURCE_DATE_EPOCH=` in the environment or similar approaches) emaste: Some ports may wish to use it for the build (via SOURCE_DATE_EPOCH=` in the environment or… | |||||
| .if !make(*depends*) && empty(.MAKEFLAGS:M-V) && \ | |||||
| empty(.MAKEFLAGS:MTIMESTAMP) && exists(${DISTINFO_FILE}) | |||||
| TIMESTAMP!= ${AWK} -F' = ' -v ts=${TIMESTAMP} '/^TIMESTAMP/ { ts=$$2 } END { print ts}' ${DISTINFO_FILE} | |||||
| .endif | |||||
| MAKE_FLAGS?= -f | MAKE_FLAGS?= -f | ||||
| MAKEFILE?= Makefile | MAKEFILE?= Makefile | ||||
| MAKE_CMD?= ${BSDMAKE} | MAKE_CMD?= ${BSDMAKE} | ||||
| MAKE_ENV+= PREFIX=${PREFIX} \ | MAKE_ENV+= PREFIX=${PREFIX} \ | ||||
| LOCALBASE=${LOCALBASE} \ | LOCALBASE=${LOCALBASE} \ | ||||
| LIBDIR="${LIBDIR}" \ | LIBDIR="${LIBDIR}" \ | ||||
| CC="${CC}" CFLAGS="${CFLAGS}" \ | CC="${CC}" CFLAGS="${CFLAGS}" \ | ||||
| CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ | CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ | ||||
| LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ | LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ | ||||
| CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ | CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ | ||||
| MANPREFIX="${MANPREFIX}" | MANPREFIX="${MANPREFIX}" | ||||
| .if empty(USES:Mpython*) | |||||
| PKG_ENV+= SOURCE_DATE_EPOCH=${TIMESTAMP} | |||||
| .endif | |||||
matUnsubmitted Not Done Inline ActionsWhy the guard on USES=python? mat: Why the guard on `USES=python`? | |||||
emasteAuthorUnsubmitted Not Done Inline ActionsSee @antoine's comment above,
We have to somehow address python ports for reproducible builds but I hope we can apply to everything else at first at least. emaste: See @antoine's comment above,
> This causes problem with at least all python ports:
We have to… | |||||
| # Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. | # Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. | ||||
| # gcc 4.x enable strict aliasing optimization with -O2 which is known to break | # gcc 4.x enable strict aliasing optimization with -O2 which is known to break | ||||
| # a lot of ports. | # a lot of ports. | ||||
| .if !defined(WITHOUT_NO_STRICT_ALIASING) | .if !defined(WITHOUT_NO_STRICT_ALIASING) | ||||
| .if ${CC} != "icc" | .if ${CC} != "icc" | ||||
| .if empty(CFLAGS:M-fno-strict-aliasing) | .if empty(CFLAGS:M-fno-strict-aliasing) | ||||
| CFLAGS+= -fno-strict-aliasing | CFLAGS+= -fno-strict-aliasing | ||||
| ▲ Show 20 Lines • Show All 1,826 Lines • ▼ Show 20 Lines | |||||
| # List all algorithms here, all the variables name must begin with dp_ | # List all algorithms here, all the variables name must begin with dp_ | ||||
| _CHECKSUM_INIT_ENV= \ | _CHECKSUM_INIT_ENV= \ | ||||
| dp_SHA256=${SHA256} | dp_SHA256=${SHA256} | ||||
| .if !target(makesum) | .if !target(makesum) | ||||
| # Some port change the options with OPTIONS_*_FORCE when make(makesum) to be | # Some port change the options with OPTIONS_*_FORCE when make(makesum) to be | ||||
| # able to add all distfiles in one go. | # able to add all distfiles in one go. | ||||
| # For this to work, we need to call the do-fetch script directly here so that | # For this to work, we need to call the do-fetch script directly here so that | ||||
Not Done Inline ActionsMaybe TIMESTAMP = ##### for consistency with other lines in the file? emaste: Maybe `TIMESTAMP = #####` for consistency with other lines in the file?
| |||||
| # the options consistent when fetching and when makesum'ing. | # the options consistent when fetching and when makesum'ing. | ||||
| # As we're fetching new distfiles, that are not in the distinfo file, disable | # As we're fetching new distfiles, that are not in the distinfo file, disable | ||||
| # checksum and sizes checks. | # checksum and sizes checks. | ||||
| makesum: | makesum: | ||||
| .if !empty(DISTFILES) | .if !empty(DISTFILES) | ||||
Not Done Inline Actionsjust rm -f rather than testing first? emaste: just `rm -f` rather than testing first? | |||||
| @${SETENV} \ | @${SETENV} \ | ||||
| ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ | ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ | ||||
| dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ | dp_NO_CHECKSUM=yes dp_DISABLE_SIZE=yes \ | ||||
| dp_SITE_FLAVOR=MASTER \ | dp_SITE_FLAVOR=MASTER \ | ||||
| ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} | ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} | ||||
| .endif | .endif | ||||
| .if defined(PATCHFILES) && !empty(PATCHFILES) | .if defined(PATCHFILES) && !empty(PATCHFILES) | ||||
| @${SETENV} \ | @${SETENV} \ | ||||
| ▲ Show 20 Lines • Show All 1,516 Lines • Show Last 20 Lines | |||||
1449231300 is Fri 4 Dec 2015 12:15:00 UTC
Presumably will update if/when ready to commit.