Skip to content

Commit

Permalink
Framework: sync with upstream
Browse files Browse the repository at this point in the history
Taken from: HardenedBSD
  • Loading branch information
fichtner committed Jun 2, 2018
1 parent f1a40c2 commit c22a447
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 28 deletions.
12 changes: 12 additions & 0 deletions MOVED
Original file line number Diff line number Diff line change
Expand Up @@ -10210,3 +10210,15 @@ devel/hs-text||2018-05-25|Removed, no longer supported
science/hs-bio||2018-05-25|Removed, no longer supported
textproc/hs-parsec||2018-05-25|Removed, no longer supported
audio/calf|audio/calf-lv2|2018-05-27|Added -lv2 suffix: the port mostly provides LV2 plugins
net/rubygem-gitaly-proto083|net/rubygem-gitaly-proto|2018-06-01|Has expired: Obsoleted by update of www/gitlab. Please use net/rubygem-gitaly-proto instead.
net/rubygem-gitaly-proto084|net/rubygem-gitaly-proto|2018-06-01|Has expired: Obsoleted by update of www/gitlab. Please use net/rubygem-gitaly-proto instead
textproc/rubygem-github-linguist47|textproc/rubygem-github-linguist|2018-06-01|Has expired: Obsoleted by update of www/gitlab. Please use textproc/rubygem-github-linguist instead
textproc/rubygem-loofah20|textproc/rubygem-loofah|2018-06-01|Has expired: Obsoleted by update of www/gitlab. Please use textproc/rubygem-loofah instead.
www/npm-node4|www/npm|2018-06-01|Has expired: Use www/npm instead
emulators/qemu-launcher||2018-06-01|Has expired: Upstream is gone
textproc/kibana3||2018-06-01|Has expired: End of Life was 2015-11-15, depends on expired www/node4
textproc/kibana41||2018-06-01|Has expired: End of Life was 2016-11-10, depends on expired www/node4
textproc/kibana43||2018-06-01|Has expired: End of Life was 2017-05-24, depends on expired www/node4
textproc/kibana44||2018-06-01|Has expired: End of Life was 2017-08-02, depends on expired www/node4
textproc/kibana45||2018-06-01|Has expired: End of Life was 2017-09-30, depends on expired www/node4
www/node4|www/node|2018-06-01|Has expired: Node.js v4.x reaches end-of-life on 2018-04-30, see https://github.com/nodejs/Release
2 changes: 1 addition & 1 deletion Mk/Scripts/actual-package-depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resolv_symlink() {
return
fi

tgt=`readlink ${file}`
tgt=$(readlink ${file})
case $tgt in
/*)
echo $tgt
Expand Down
2 changes: 0 additions & 2 deletions Mk/Scripts/check_leftovers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ while read modtype path extra; do
share/xml/catalog.ports) ;;
# Ignore ghc's doc index
share/doc/ghc-%%GHC_VERSION%%/*) ;;
share/doc/ghc-%%GHC_VERSION%%/html/libraries/%%PORTNAME%%-%%PORTVERSION%%/html) ;;
# Ignore ghc's package conf
lib/ghc-%%GHC_VERSION%%/package.conf.d/*) ;;
lib/ghc-%%GHC_VERSION%%/package.conf.d/%%PORTNAME%%-%%PORTVERSION%%.conf) ;;
# Ignore common system config files
/etc/group|\
/etc/make.conf|\
Expand Down
2 changes: 1 addition & 1 deletion Mk/Scripts/checksum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if [ -f "${dp_DISTINFO_FILE}" ]; then
if [ "$OK" != "true" ]; then
exit 1
fi
elif [ -n "${@}" ]; then
elif [ -n "${*}" ]; then
${dp_ECHO_MSG} "=> No checksum file (${dp_DISTINFO_FILE})."
exit 1
fi
4 changes: 2 additions & 2 deletions Mk/Scripts/create-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ EOT
[ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]"
[ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]"
[ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]"
[ -n "${dp_NO_ARCH}" ] && echo "arch : `${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2`:*"
[ -n "${dp_NO_ARCH}" ] && echo "abi : `${dp_PKG_BIN} config abi | cut -d: -f1,2`:*"
[ -n "${dp_NO_ARCH}" ] && echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*"
[ -n "${dp_NO_ARCH}" ] && echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*"

# Then the key/values sections
echo "deps: { "
Expand Down
4 changes: 4 additions & 0 deletions Mk/Scripts/depends-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ check_dep() {
fi
[ ${show_dep} -eq 1 ] && echo "${port_display}"
if [ ${recursive} -eq 1 -o ${requires_wrkdir} -eq 1 -a ${show_dep} -eq 1 ]; then
# shellcheck disable=SC2068
# Do not add quotes, we want to split the string here.
check_dep $@
fi
done
}

checked=
# shellcheck disable=SC2068
# Do not add quotes, we want to split the string here.
check_dep $@
4 changes: 2 additions & 2 deletions Mk/Scripts/find-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ if [ $# -ne 1 ]; then
fi

lib=$1
dirs="${LIB_DIRS} `cat ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || :`"
dirs="${LIB_DIRS} $(cat ${LOCALBASE}/libdata/ldconfig/* 2>/dev/null || :)"

for libdir in ${dirs} ; do
test -f ${libdir}/${lib} || continue
libfile=${libdir}/${lib}
[ `file -b -L --mime-type ${libfile}` = "application/x-sharedlib" ] || continue
[ $(file -b -L --mime-type ${libfile}) = "application/x-sharedlib" ] || continue
echo $libfile
break
done
16 changes: 9 additions & 7 deletions Mk/Scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ parse_plist() {
@info\ *|@shell\ *|@xmlcatmgr\ *)
set -- $line
shift
case "$@" in
/*) echo "${comment}$@" ;;
*) echo "${comment}${cwd}/$@" ;;
case "$*" in
/*) echo "${comment}$*" ;;
*) echo "${comment}${cwd}/$*" ;;
esac
;;
@sample\ *)
Expand All @@ -103,12 +103,12 @@ parse_plist() {
@fc\ *|@fcfontsdir\ *|@fontsdir\ *)
set -- $line
shift
case "$@" in
case "$*" in
/*)
echo >&3 "${comment}$@"
echo >&3 "${comment}$*"
;;
*)
echo >&3 "${comment}${cwd}/$@"
echo >&3 "${comment}${cwd}/$*"
;;
esac
;;
Expand Down Expand Up @@ -160,7 +160,7 @@ validate_env() {
}

export_ports_env() {
local export_vars make_cmd make_env var results value uses
local export_vars make_cmd make_env var value uses

if [ -n "${HAVE_PORTS_ENV:-}" ]; then
return 0
Expand Down Expand Up @@ -197,6 +197,8 @@ export_ports_env() {
value="$(eval echo \$${var})"

if [ -n "${value}" ]; then
# shellcheck disable=SC2163
# We want to export the variable which name is in var.
export ${var}
echo "export ${var}=\"${value}\""
fi
Expand Down
2 changes: 1 addition & 1 deletion Mk/Scripts/generate-symbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Maintainer: [email protected]

msg() {
echo "====> $@"
echo "====> $*"
}

msg "Finding symbols"
Expand Down
23 changes: 13 additions & 10 deletions Mk/Scripts/qa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ LF=$(printf '\nX')
LF=${LF%X}

notice() {
echo "Notice: $@" >&2
echo "Notice: $*" >&2
}

warn() {
echo "Warning: $@" >&2
echo "Warning: $*" >&2
}

err() {
echo "Error: $@" >&2
echo "Error: $*" >&2
}

list_stagedir_elfs() {
Expand All @@ -31,7 +31,7 @@ list_stagedir_elfs() {
shebangonefile() {
local f interp interparg badinterp rc

f="$@"
f="$*"
rc=0

# whitelist some files
Expand Down Expand Up @@ -248,9 +248,9 @@ sharedmimeinfo() {
suidfiles() {
local filelist

filelist=`find ${STAGEDIR} -type f \
filelist=$(find ${STAGEDIR} -type f \
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
\( -perm -u+s -or -perm -g+s \)`
\( -perm -u+s -or -perm -g+s \))
if [ -n "${filelist}" ]; then
warn "setuid files in the stage directory (are these necessary?):"
ls -liTd ${filelist}
Expand Down Expand Up @@ -278,12 +278,12 @@ libperl() {
# No results presents a blank line from heredoc.
[ -z "${f}" ] && continue
files=$((files+1))
found=`readelf -d ${f} | awk "BEGIN {libperl=1; rpath=10; runpath=100}
found=$(readelf -d ${f} | awk "BEGIN {libperl=1; rpath=10; runpath=100}
/NEEDED.*${LIBPERL}/ { libperl = 0 }
/RPATH.*perl.*CORE/ { rpath = 0 }
/RUNPATH.*perl.*CORE/ { runpath = 0 }
END {print libperl+rpath+runpath}
"`
")
case "${found}" in
*1)
warn "${f} is not linked with ${LIBPERL}, not respecting lddlflags?"
Expand Down Expand Up @@ -657,7 +657,7 @@ proxydeps() {
if listcontains ${dep_file} "${already}"; then
continue
fi
if $(pkg which -q ${dep_file} > /dev/null 2>&1); then
if pkg which -q ${dep_file} > /dev/null 2>&1; then
dep_file_pkg=$(pkg which -qo ${dep_file})

# Check that the .so we need has a SONAME
Expand Down Expand Up @@ -818,6 +818,9 @@ gemdeps()
{
rc=0
if [ "${PKGBASE%%-*}" = "rubygem" ]; then
# shellcheck disable=SC2153
# In the heredoc, ${PORTNAME} comes from the environment, not
# to be confused with ${portname}
while read -r l; do
if [ -n "${l}" ]; then
name=${l%% *}
Expand Down Expand Up @@ -917,7 +920,7 @@ checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo"
checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors"

ret=0
cd ${STAGEDIR}
cd ${STAGEDIR} || exit 1
for check in ${checks}; do
${check} || ret=1
done
Expand Down
3 changes: 2 additions & 1 deletion Mk/Scripts/smart_makepatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ conserve_old_patches() {
}

install_regenerated_patches() {
local testdir=$(find ${DESTDIR} -empty)
local testdir
testdir=$(find ${DESTDIR} -empty)
if [ -z "${testdir}" ]; then
mkdir -p ${PATCHDIR}
find ${DESTDIR} -type f -exec mv {} ${PATCHDIR}/ \;
Expand Down
2 changes: 1 addition & 1 deletion Tools/scripts/portsvar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#
# $FreeBSD$
#
# MAINTAINER= daichi@FreeBSD.org
# MAINTAINER= ports@FreeBSD.org

usage_msg="usage:
portsvar.sh [-a] [-e] [-w target] [-h] [var=val ...] var1 [var2 ...]
Expand Down

0 comments on commit c22a447

Please sign in to comment.