mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Remove some serious foot-shooting potential from the release Makefile. For
some unknown reason, when LOCAL_PATCHES and LOCAL_SCRIPT were originally added, they were silently ignored if the actual file did not exist. As a result, if one mistyped the pathname to a patch or script, then the release silently succeeded. However, it was not built with the desired changes and no warning was given to inform the builder either. This commit explicitly checks to see that all of the defined patches and scripts exist up front and bails if any of them do not exist. I lost several hours of valuable sleeping time this evening due to this "feature" so I've finally gone and ripped out. I've tripped over this in the past several other times as well. Glanced at by: scottl
This commit is contained in:
parent
208f2fd1ed
commit
db8714af52
1 changed files with 13 additions and 3 deletions
|
|
@ -314,6 +314,18 @@ release rerelease:
|
|||
@echo "unset NOPORTS, or set at least DOMINIMALDOCPORTS to YES!"
|
||||
@exit 1
|
||||
.endif
|
||||
.if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES)
|
||||
.for p in ${LOCAL_PATCHES}
|
||||
.if !exists(${p})
|
||||
@echo "The patch file ${p} does not exist!"
|
||||
@exit 1
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.if defined(LOCAL_SCRIPT) && !exists(${LOCAL_SCRIPT})
|
||||
@echo "The local script ${LOCAL_SCRIPT} does not exist!"
|
||||
@exit 1
|
||||
.endif
|
||||
.if make(release)
|
||||
.if exists(${CHROOTDIR})
|
||||
# The first command will fail on a handful of files that have their schg
|
||||
|
|
@ -347,12 +359,10 @@ release rerelease:
|
|||
.endif
|
||||
.if defined(LOCAL_PATCHES) && !empty(LOCAL_PATCHES)
|
||||
.for p in ${LOCAL_PATCHES}
|
||||
.if exists(${p})
|
||||
patch -d ${CHROOTDIR}/usr/${RELEASESRCMODULE} ${PATCH_FLAGS} < ${p}
|
||||
.endif
|
||||
.endfor
|
||||
.endif
|
||||
.if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT})
|
||||
.if defined(LOCAL_SCRIPT)
|
||||
cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} \
|
||||
RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT}
|
||||
.endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue