View | Details | Raw Unified | Return to bug 250723 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/Scripts/check-desktop-entries.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_CURDIR dp_ECHO_CMD dp_ECHO_MSG dp_EXPR dp_GREP dp_PKGNAME \
11
validate_env dp_CURDIR dp_ECHO_CMD dp_ECHO_MSG dp_EXPR dp_GREP dp_PKGNAME \
11
	dp_SED dp_TR dp_MAKE
12
	dp_SED dp_TR dp_MAKE
12
13
13
[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_CHECK_DESKTOP_ENTRIES}" ] && set -x
14
[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_CHECK_DESKTOP_ENTRIES}" ] && set -x
14
15
15
set -u
16
set -u
16
17
(-)b/Mk/Scripts/check-stagedir.sh (+1 lines)
Lines 5-24 Link Here
5
# MAINTAINER: portmgr@FreeBSD.org
5
# MAINTAINER: portmgr@FreeBSD.org
6
#
6
#
7
# This script serves 2 purposes:
7
# This script serves 2 purposes:
8
# 1. Generate a plist
8
# 1. Generate a plist
9
# 2. Test a plist for issues:
9
# 2. Test a plist for issues:
10
#  a. Files in STAGEDIR that are missing from plist
10
#  a. Files in STAGEDIR that are missing from plist
11
#  b. Files in plist missing from STAGEDIR
11
#  b. Files in plist missing from STAGEDIR
12
#  c. Files in plist which are owned by dependencies/MTREEs
12
#  c. Files in plist which are owned by dependencies/MTREEs
13
13
14
set -e
14
set -e
15
set -o pipefail
15
16
16
. ${SCRIPTSDIR}/functions.sh
17
. ${SCRIPTSDIR}/functions.sh
17
18
18
# lists an mtree file's contents, prefixed to dir.
19
# lists an mtree file's contents, prefixed to dir.
19
listmtree() { # mtreefile prefix
20
listmtree() { # mtreefile prefix
20
	{
21
	{
21
		echo '#mtree'
22
		echo '#mtree'
22
		sed 's/nochange$//;' $1
23
		sed 's/nochange$//;' $1
23
	} | tar -tf- | sed "s,^,$2/,;s,^$2/\.$,$2,;s,^$,/,"
24
	} | tar -tf- | sed "s,^,$2/,;s,^$2/\.$,$2,;s,^$,/,"
24
}
25
}
(-)b/Mk/Scripts/check-vulnerable.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_ECHO_MSG dp_PKG_BIN dp_PORTNAME dp_PKGNAME
11
validate_env dp_ECHO_MSG dp_PKG_BIN dp_PORTNAME dp_PKGNAME
11
12
12
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_VULNERABLE}" ] && set -x
13
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_VULNERABLE}" ] && set -x
13
14
14
set -u
15
set -u
15
16
16
# If the package is pkg, disable these checks, it fails while
17
# If the package is pkg, disable these checks, it fails while
(-)b/Mk/Scripts/check_leftovers.sh (+2 lines)
Lines 16-35 Link Here
16
#  + new-file
16
#  + new-file
17
#  M modified-file reason...
17
#  M modified-file reason...
18
#
18
#
19
# stdout:
19
# stdout:
20
#  same -/+/M format, but with files substituted, without approved
20
#  same -/+/M format, but with files substituted, without approved
21
#  whitelisted files, and hides any directories already in plist.
21
#  whitelisted files, and hides any directories already in plist.
22
#
22
#
23
# The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED=
23
# The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED=
24
# in environment.
24
# in environment.
25
25
26
set -o pipefail
27
26
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x
28
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x
27
29
28
origin="$1"
30
origin="$1"
29
[ $# -eq 1 ] || { echo "Must supply ORIGIN as parameter" >&2; exit 1; }
31
[ $# -eq 1 ] || { echo "Must supply ORIGIN as parameter" >&2; exit 1; }
30
[ -n "${PORTSDIR}" ] || { echo "PORTSDIR must be set" >&2; exit 1; }
32
[ -n "${PORTSDIR}" ] || { echo "PORTSDIR must be set" >&2; exit 1; }
31
33
32
# May be passed in from environment if using an overlay.
34
# May be passed in from environment if using an overlay.
33
: ${portdir:="${PORTSDIR}/${origin}"}
35
: ${portdir:="${PORTSDIR}/${origin}"}
34
36
35
# PREFIX/LOCALBASE may be set in env or want default from port.
37
# PREFIX/LOCALBASE may be set in env or want default from port.
(-)b/Mk/Scripts/checksum.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_CHECKSUM_ALGORITHMS dp_CURDIR dp_DISTDIR dp_DISTINFO_FILE \
11
validate_env dp_CHECKSUM_ALGORITHMS dp_CURDIR dp_DISTDIR dp_DISTINFO_FILE \
11
	dp_DIST_SUBDIR dp_ECHO_MSG dp_FETCH_REGET dp_MAKE dp_MAKEFLAGS \
12
	dp_DIST_SUBDIR dp_ECHO_MSG dp_FETCH_REGET dp_MAKE dp_MAKEFLAGS \
12
	dp_DISABLE_SIZE dp_NO_CHECKSUM
13
	dp_DISABLE_SIZE dp_NO_CHECKSUM
13
14
14
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECKSUM}" ] && set -x
15
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECKSUM}" ] && set -x
15
16
16
set -u
17
set -u
(-)b/Mk/Scripts/create-manifest.sh (-1 / +3 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_ACTUAL_PACKAGE_DEPENDS dp_CATEGORIES dp_COMMENT \
11
validate_env dp_ACTUAL_PACKAGE_DEPENDS dp_CATEGORIES dp_COMMENT \
11
	dp_COMPLETE_OPTIONS_LIST dp_DEPRECATED dp_DESCR dp_EXPIRATION_DATE \
12
	dp_COMPLETE_OPTIONS_LIST dp_DEPRECATED dp_DESCR dp_EXPIRATION_DATE \
12
	dp_GROUPS dp_LICENSE dp_LICENSE_COMB dp_MAINTAINER dp_METADIR \
13
	dp_GROUPS dp_LICENSE dp_LICENSE_COMB dp_MAINTAINER dp_METADIR \
13
	dp_NO_ARCH dp_PKGBASE dp_PKGDEINSTALL dp_PKGINSTALL dp_PKGMESSAGES \
14
	dp_NO_ARCH dp_PKGBASE dp_PKGDEINSTALL dp_PKGINSTALL dp_PKGMESSAGES \
14
	dp_PKGORIGIN dp_PKGPOSTDEINSTALL dp_PKGPOSTINSTALL dp_PKGPOSTUPGRADE \
15
	dp_PKGORIGIN dp_PKGPOSTDEINSTALL dp_PKGPOSTINSTALL dp_PKGPOSTUPGRADE \
15
	dp_PKGPREDEINSTALL dp_PKGPREINSTALL dp_PKGPREUPGRADE dp_PKGUPGRADE \
16
	dp_PKGPREDEINSTALL dp_PKGPREINSTALL dp_PKGPREUPGRADE dp_PKGUPGRADE \
16
	dp_PKGVERSION dp_PKG_BIN dp_PKG_IGNORE_DEPENDS dp_PKG_NOTES \
17
	dp_PKGVERSION dp_PKG_BIN dp_PKG_IGNORE_DEPENDS dp_PKG_NOTES \
Lines 55-75 EOT Link Here
55
# Then, the optional bits
56
# Then, the optional bits
56
[ -z "${dp_WWW}" ] || echo "www: ${dp_WWW}"
57
[ -z "${dp_WWW}" ] || echo "www: ${dp_WWW}"
57
[ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]"
58
[ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]"
58
[ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]"
59
[ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]"
59
[ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]"
60
[ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]"
60
[ -n "${dp_NO_ARCH}" ] && echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*"
61
[ -n "${dp_NO_ARCH}" ] && echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*"
61
[ -n "${dp_NO_ARCH}" ] && echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*"
62
[ -n "${dp_NO_ARCH}" ] && echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*"
62
63
63
# Then the key/values sections
64
# Then the key/values sections
64
echo "deps: { "
65
echo "deps: { "
65
eval ${dp_ACTUAL_PACKAGE_DEPENDS} | grep -v -E ${dp_PKG_IGNORE_DEPENDS} | sort -u
66
# Ignore grep's return value.
67
eval ${dp_ACTUAL_PACKAGE_DEPENDS} | { grep -v -E ${dp_PKG_IGNORE_DEPENDS} || :; } | sort -u
66
echo "}"
68
echo "}"
67
69
68
echo "options: {"
70
echo "options: {"
69
for opt in ${dp_COMPLETE_OPTIONS_LIST}; do
71
for opt in ${dp_COMPLETE_OPTIONS_LIST}; do
70
	if listcontains ${opt} "${dp_PORT_OPTIONS}"; then
72
	if listcontains ${opt} "${dp_PORT_OPTIONS}"; then
71
		echo " ${opt}: on,"
73
		echo " ${opt}: on,"
72
	else
74
	else
73
		echo " ${opt}: off,"
75
		echo " ${opt}: off,"
74
	fi
76
	fi
75
done
77
done
(-)b/Mk/Scripts/depends-list.sh (+1 lines)
Lines 1-15 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# MAINTAINER: portmgr@FreeBSD.org
2
# MAINTAINER: portmgr@FreeBSD.org
3
# $FreeBSD$
3
# $FreeBSD$
4
4
5
set -e
5
set -e
6
set -o pipefail
6
7
7
. ${dp_SCRIPTSDIR}/functions.sh
8
. ${dp_SCRIPTSDIR}/functions.sh
8
9
9
flavors=0
10
flavors=0
10
recursive=0
11
recursive=0
11
missing=0
12
missing=0
12
requires_wrkdir=0
13
requires_wrkdir=0
13
while getopts "fmrw" FLAG; do
14
while getopts "fmrw" FLAG; do
14
	case "${FLAG}" in
15
	case "${FLAG}" in
15
		f)
16
		f)
(-)b/Mk/Scripts/desktop-categories.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_CATEGORIES dp_SORT dp_TR dp_ECHO_CMD
11
validate_env dp_CATEGORIES dp_SORT dp_TR dp_ECHO_CMD
11
12
12
[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_DESKTOP_CATEGORIES}" ] && set -x
13
[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_DESKTOP_CATEGORIES}" ] && set -x
13
14
14
set -u
15
set -u
15
16
16
categories=""
17
categories=""
(-)b/Mk/Scripts/dialog4ports.sh (+1 lines)
Lines 1-14 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
# Maintainer: portmgr@FreeBSD.org
3
# Maintainer: portmgr@FreeBSD.org
4
set -e
4
set -e
5
set -o pipefail
5
6
6
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x
7
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x
7
8
8
if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then
9
if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then
9
	echo "DIALOG4PORTS, MAKE and PORTSDIR required in environment." >&2
10
	echo "DIALOG4PORTS, MAKE and PORTSDIR required in environment." >&2
10
	exit 1
11
	exit 1
11
fi
12
fi
12
13
13
: ${DIALOGPORT:=ports-mgmt/dialog4ports}
14
: ${DIALOGPORT:=ports-mgmt/dialog4ports}
14
: ${DIALOGNAME:=dialog4ports}
15
: ${DIALOGNAME:=dialog4ports}
(-)b/Mk/Scripts/do-depends.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. ${dp_SCRIPTSDIR}/functions.sh
9
. ${dp_SCRIPTSDIR}/functions.sh
9
10
10
validate_env dp_RAWDEPENDS dp_DEPTYPE dp_DEPENDS_TARGET dp_DEPENDS_PRECLEAN \
11
validate_env dp_RAWDEPENDS dp_DEPTYPE dp_DEPENDS_TARGET dp_DEPENDS_PRECLEAN \
11
	dp_DEPENDS_CLEAN dp_DEPENDS_ARGS dp_USE_PACKAGE_DEPENDS \
12
	dp_DEPENDS_CLEAN dp_DEPENDS_ARGS dp_USE_PACKAGE_DEPENDS \
12
	dp_USE_PACKAGE_DEPENDS_ONLY dp_PKG_ADD dp_PKG_INFO dp_WRKDIR \
13
	dp_USE_PACKAGE_DEPENDS_ONLY dp_PKG_ADD dp_PKG_INFO dp_WRKDIR \
13
	dp_PKGNAME dp_STRICT_DEPENDS dp_LOCALBASE dp_LIB_DIRS dp_SH \
14
	dp_PKGNAME dp_STRICT_DEPENDS dp_LOCALBASE dp_LIB_DIRS dp_SH \
14
	dp_SCRIPTSDIR PORTSDIR dp_MAKE dp_MAKEFLAGS dp_OVERLAYS
15
	dp_SCRIPTSDIR PORTSDIR dp_MAKE dp_MAKEFLAGS dp_OVERLAYS
15
16
16
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_DEPENDS}" ] && set -x
17
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_DEPENDS}" ] && set -x
(-)b/Mk/Scripts/do-fetch.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_DEVELOPER dp_DISABLE_SIZE dp_DISTDIR dp_DISTINFO_FILE \
11
validate_env dp_DEVELOPER dp_DISABLE_SIZE dp_DISTDIR dp_DISTINFO_FILE \
11
	dp_DIST_SUBDIR dp_ECHO_MSG dp_FETCH_AFTER_ARGS dp_FETCH_BEFORE_ARGS \
12
	dp_DIST_SUBDIR dp_ECHO_MSG dp_FETCH_AFTER_ARGS dp_FETCH_BEFORE_ARGS \
12
	dp_FETCH_CMD dp_FETCH_ENV dp_FORCE_FETCH_ALL dp_FORCE_FETCH_LIST \
13
	dp_FETCH_CMD dp_FETCH_ENV dp_FORCE_FETCH_ALL dp_FORCE_FETCH_LIST \
13
	dp_MASTER_SITE_BACKUP dp_MASTER_SITE_OVERRIDE dp_MASTER_SORT_AWK \
14
	dp_MASTER_SITE_BACKUP dp_MASTER_SITE_OVERRIDE dp_MASTER_SORT_AWK \
14
	dp_NO_CHECKSUM dp_RANDOMIZE_SITES dp_SITE_FLAVOR dp_TARGET
15
	dp_NO_CHECKSUM dp_RANDOMIZE_SITES dp_SITE_FLAVOR dp_TARGET
15
16
16
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_FETCH}" ] && set -x
17
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_FETCH}" ] && set -x
(-)b/Mk/Scripts/do-patch.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_BZCAT dp_CAT dp_DISTDIR dp_ECHO_MSG dp_EXTRA_PATCHES \
11
validate_env dp_BZCAT dp_CAT dp_DISTDIR dp_ECHO_MSG dp_EXTRA_PATCHES \
11
	dp_EXTRA_PATCH_TREE dp_GZCAT dp_OPSYS dp_PATCH dp_PATCHDIR \
12
	dp_EXTRA_PATCH_TREE dp_GZCAT dp_OPSYS dp_PATCH dp_PATCHDIR \
12
	dp_PATCHFILES dp_PATCH_ARGS dp_PATCH_DEBUG_TMP dp_PATCH_DIST_ARGS \
13
	dp_PATCHFILES dp_PATCH_ARGS dp_PATCH_DEBUG_TMP dp_PATCH_DIST_ARGS \
13
	dp_PATCH_SILENT dp_PATCH_WRKSRC dp_PKGNAME dp_PKGORIGIN \
14
	dp_PATCH_SILENT dp_PATCH_WRKSRC dp_PKGNAME dp_PKGORIGIN \
14
	dp_UNZIP_NATIVE_CMD dp_XZCAT
15
	dp_UNZIP_NATIVE_CMD dp_XZCAT
15
16
16
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_PATCH}" ] && set -x
17
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_PATCH}" ] && set -x
(-)b/Mk/Scripts/do-users-groups.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_ECHO_MSG dp_GID_FILES dp_GID_OFFSET dp_GROUPS_BLACKLIST \
11
validate_env dp_ECHO_MSG dp_GID_FILES dp_GID_OFFSET dp_GROUPS_BLACKLIST \
11
	dp_INSTALL dp_OPSYS dp_OSVERSION dp_PREFIX dp_PW dp_SCRIPTSDIR \
12
	dp_INSTALL dp_OPSYS dp_OSVERSION dp_PREFIX dp_PW dp_SCRIPTSDIR \
12
	dp_UG_DEINSTALL dp_UG_INSTALL dp_UID_FILES dp_UID_OFFSET \
13
	dp_UG_DEINSTALL dp_UG_INSTALL dp_UID_FILES dp_UID_OFFSET \
13
	dp_USERS_BLACKLIST
14
	dp_USERS_BLACKLIST
14
15
15
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_USERS_GROUPS}" ] && set -x
16
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DO_USERS_GROUPS}" ] && set -x
16
17
(-)b/Mk/Scripts/find-lib.sh (+2 lines)
Lines 1-14 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# MAINTAINER: portmgr@FreeBSD.org
2
# MAINTAINER: portmgr@FreeBSD.org
3
# $FreeBSD$
3
# $FreeBSD$
4
4
5
set -o pipefail
6
5
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x
7
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x
6
8
7
if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then
9
if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then
8
	echo "LIB_DIRS, LOCALBASE required in environment." >&2
10
	echo "LIB_DIRS, LOCALBASE required in environment." >&2
9
	exit 1
11
	exit 1
10
fi
12
fi
11
13
12
if [ -f /usr/share/misc/magic.mime -o -f /usr/share/misc/magic.mime.mgc ]; then
14
if [ -f /usr/share/misc/magic.mime -o -f /usr/share/misc/magic.mime.mgc ]; then
13
	echo >&2
15
	echo >&2
14
	echo "Either /usr/share/misc/magic.mime or /usr/share/misc/magic.mime.mgc exist and must be removed." >&2
16
	echo "Either /usr/share/misc/magic.mime or /usr/share/misc/magic.mime.mgc exist and must be removed." >&2
(-)b/Mk/Scripts/generate-symbols.sh (+2 lines)
Lines 2-21 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
# Maintainer: portmgr@FreeBSD.org
3
# Maintainer: portmgr@FreeBSD.org
4
#
4
#
5
# This script will find all ELF files in STAGEDIR and then strip and move
5
# This script will find all ELF files in STAGEDIR and then strip and move
6
# the symbols to LOCALBASE/lib/debug/<original path>.
6
# the symbols to LOCALBASE/lib/debug/<original path>.
7
# For example:
7
# For example:
8
# /var/qmail/bin/qmaild -> /usr/local/lib/debug/var/qmail/bin/qmaild.debug
8
# /var/qmail/bin/qmaild -> /usr/local/lib/debug/var/qmail/bin/qmaild.debug
9
# /usr/local/bin/ssh    -> /usr/local/lib/debug/usr/local/bin/ssh.debug
9
# /usr/local/bin/ssh    -> /usr/local/lib/debug/usr/local/bin/ssh.debug
10
LIB_DIR_PREFIX="${LOCALBASE}/lib/debug"
10
LIB_DIR_PREFIX="${LOCALBASE}/lib/debug"
11
11
12
set -o pipefail
13
12
msg() {
14
msg() {
13
        echo "====> $*"
15
        echo "====> $*"
14
}
16
}
15
17
16
msg "Finding symbols"
18
msg "Finding symbols"
17
19
18
# Find all ELF files
20
# Find all ELF files
19
ELF_FILES=$(mktemp -t elf_files)
21
ELF_FILES=$(mktemp -t elf_files)
20
find ${STAGEDIR} -type f ! -name '*.a' \
22
find ${STAGEDIR} -type f ! -name '*.a' \
21
    -exec /usr/bin/readelf -S /dev/null {} + 2>/dev/null | awk ' \
23
    -exec /usr/bin/readelf -S /dev/null {} + 2>/dev/null | awk ' \
(-)b/Mk/Scripts/install-desktop-entries.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_SED dp_ECHO_CMD dp_STAGEDIR dp_DESKTOPDIR
11
validate_env dp_SED dp_ECHO_CMD dp_STAGEDIR dp_DESKTOPDIR
11
12
12
[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_INSTALL_DESKTOP_ENTRIES}" ] && set -x
13
[ -n "${DEBUG_MK_SCRIPTS}" ] || [ -n "${DEBUG_MK_SCRIPTS_INSTALL_DESKTOP_ENTRIES}" ] && set -x
13
14
14
set -u
15
set -u
15
16
16
while [ $# -ge 6 ]; do
17
while [ $# -ge 6 ]; do
(-)b/Mk/Scripts/makesum.sh (+1 lines)
Lines 1-16 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
5
6
set -e
6
set -e
7
set -o pipefail
7
8
8
. "${dp_SCRIPTSDIR}/functions.sh"
9
. "${dp_SCRIPTSDIR}/functions.sh"
9
10
10
validate_env dp_CHECKSUM_ALGORITHMS dp_CKSUMFILES dp_DISTDIR dp_DISTINFO_FILE \
11
validate_env dp_CHECKSUM_ALGORITHMS dp_CKSUMFILES dp_DISTDIR dp_DISTINFO_FILE \
11
	dp_ECHO_MSG
12
	dp_ECHO_MSG
12
13
13
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_MAKESUM}" ] && set -x
14
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_MAKESUM}" ] && set -x
14
15
15
set -u
16
set -u
16
17
(-)b/Mk/Scripts/plist_sub_sed_sort.sh (+2 lines)
Lines 1-17 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
# $FreeBSD$
2
# $FreeBSD$
3
#
3
#
4
# MAINTAINER: portmgr@FreeBSD.org
4
# MAINTAINER: portmgr@FreeBSD.org
5
#
5
#
6
# PLIST_SUB_SED helper to sort by longest value first.
6
# PLIST_SUB_SED helper to sort by longest value first.
7
7
8
set -o pipefail
9
8
awk '{
10
awk '{
9
	while (match($0, /s![^!]*![^!]*!g;/)) {
11
	while (match($0, /s![^!]*![^!]*!g;/)) {
10
		sedp=substr($0, RSTART, RLENGTH)
12
		sedp=substr($0, RSTART, RLENGTH)
11
		$0=substr($0, RSTART+RLENGTH)
13
		$0=substr($0, RSTART+RLENGTH)
12
		split(sedp, a, "!")
14
		split(sedp, a, "!")
13
		# Convert \. to . for sorting.
15
		# Convert \. to . for sorting.
14
		gsub(/\\./, ".", a[2])
16
		gsub(/\\./, ".", a[2])
15
		print length(a[2]), sedp
17
		print length(a[2]), sedp
16
	}
18
	}
17
}' | sort -rn | awk '{$1=""; print $0}' > $1
19
}' | sort -rn | awk '{$1=""; print $0}' > $1
(-)b/Mk/Scripts/ports_env.sh (+2 lines)
Lines 1-13 Link Here
1
#! /bin/sh
1
#! /bin/sh
2
2
3
# MAINTAINER: portmgr@FreeBSD.org
3
# MAINTAINER: portmgr@FreeBSD.org
4
# $FreeBSD$
4
# $FreeBSD$
5
5
6
set -o pipefail
7
6
if [ -z "${SCRIPTSDIR}" ]; then
8
if [ -z "${SCRIPTSDIR}" ]; then
7
	echo "Must set SCRIPTSDIR" >&2
9
	echo "Must set SCRIPTSDIR" >&2
8
	exit 1
10
	exit 1
9
fi
11
fi
10
12
11
. ${SCRIPTSDIR}/functions.sh
13
. ${SCRIPTSDIR}/functions.sh
12
14
13
export_ports_env
15
export_ports_env
(-)b/Mk/Scripts/qa.sh (+2 lines)
Lines 1-14 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# MAINTAINER: portmgr@FreeBSD.org
2
# MAINTAINER: portmgr@FreeBSD.org
3
# $FreeBSD$
3
# $FreeBSD$
4
4
5
set -o pipefail
6
5
if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then
7
if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then
6
	echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2
8
	echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2
7
	exit 1
9
	exit 1
8
fi
10
fi
9
11
10
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_QA}" ] && set -x
12
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_QA}" ] && set -x
11
13
12
LF=$(printf '\nX')
14
LF=$(printf '\nX')
13
LF=${LF%X}
15
LF=${LF%X}
14
16
(-)b/Mk/Scripts/rust-compat11-canary.sh (+1 lines)
Lines 1-14 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
# MAINTAINER: rust@FreeBSD.org
2
# MAINTAINER: rust@FreeBSD.org
3
# $FreeBSD$
3
# $FreeBSD$
4
set -eu
4
set -eu
5
set -o pipefail
5
6
6
if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then
7
if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then
7
	exit 0
8
	exit 0
8
fi
9
fi
9
10
10
cat <<EOF | ${CC} -o "${WRKDIR}/compat11_canary" -xc -
11
cat <<EOF | ${CC} -o "${WRKDIR}/compat11_canary" -xc -
11
#include <sys/syscall.h>
12
#include <sys/syscall.h>
12
#include <errno.h>
13
#include <errno.h>
13
#include <unistd.h>
14
#include <unistd.h>
14
15
(-)b/Mk/Scripts/smart_makepatch.sh (+2 lines)
Lines 18-37 Link Here
18
#    will only appear in one of patch file.
18
#    will only appear in one of patch file.
19
# 2) It's possible that trailing garbage at the end of a patch in a
19
# 2) It's possible that trailing garbage at the end of a patch in a
20
#    multipatch file might corrupt the comment (or be interpreted as
20
#    multipatch file might corrupt the comment (or be interpreted as
21
#    a comment) of the following patch.  (garbage in, garbage out)
21
#    a comment) of the following patch.  (garbage in, garbage out)
22
#
22
#
23
# Reminder
23
# Reminder
24
# Don't forget to disable post-patch targets before regenerating patches
24
# Don't forget to disable post-patch targets before regenerating patches
25
# if those targets modify source files (e.g. with sed).  You may also
25
# if those targets modify source files (e.g. with sed).  You may also
26
# want to disable EXTRA_PATCHES as well if that is being used.
26
# want to disable EXTRA_PATCHES as well if that is being used.
27
27
28
set -o pipefail
29
28
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x
30
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x
29
31
30
if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then
32
if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then
31
	echo "WRKDIR, PATCHDIR, and PATCH_WRKSRC required in environment." >&2
33
	echo "WRKDIR, PATCHDIR, and PATCH_WRKSRC required in environment." >&2
32
	exit 1
34
	exit 1
33
fi
35
fi
34
36
35
WORKAREA=${WRKDIR}/.makepatch-tmp
37
WORKAREA=${WRKDIR}/.makepatch-tmp
36
PATCHMAP=${WORKAREA}/pregen.map
38
PATCHMAP=${WORKAREA}/pregen.map
37
COMMENTS=${WORKAREA}/comments
39
COMMENTS=${WORKAREA}/comments

Return to bug 250723