Browse Source

build: fix argument scrubbing, remove obsolete gettext-tools from core

pull/57/head
Franco Fichtner 3 years ago
parent
commit
df43aa9126
27 changed files with 41 additions and 70 deletions
  1. +1
    -1
      build/base.sh
  2. +2
    -2
      build/boot.sh
  3. +2
    -2
      build/chroot.sh
  4. +1
    -1
      build/clean.sh
  5. +2
    -31
      build/common.sh
  6. +3
    -3
      build/core.sh
  7. +1
    -1
      build/distfiles.sh
  8. +1
    -1
      build/dvd.sh
  9. +2
    -2
      build/info.sh
  10. +1
    -1
      build/kernel.sh
  11. +2
    -2
      build/nano.sh
  12. +1
    -1
      build/plugins.sh
  13. +1
    -1
      build/ports.sh
  14. +1
    -1
      build/prefetch.sh
  15. +2
    -2
      build/print.sh
  16. +2
    -2
      build/rebase.sh
  17. +2
    -2
      build/release.sh
  18. +1
    -1
      build/rename.sh
  19. +2
    -2
      build/serial.sh
  20. +2
    -2
      build/sign.sh
  21. +1
    -1
      build/skim.sh
  22. +1
    -1
      build/test.sh
  23. +1
    -1
      build/update.sh
  24. +1
    -1
      build/verify.sh
  25. +2
    -2
      build/vga.sh
  26. +2
    -2
      build/vm.sh
  27. +1
    -1
      build/xtools.sh

+ 1
- 1
build/base.sh View File

@ -29,7 +29,7 @@ set -e
SELF=base
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
BASE_SET=$(find ${SETSDIR} -name "base-*-${PRODUCT_ARCH}.txz")

+ 2
- 2
build/boot.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2107 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=boot
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
if [ -z "${1}" ]; then
echo ">> No image given."

+ 2
- 2
build/chroot.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=chroot
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
echo ">>> chroot'ing into ${STAGEDIR}/${1}..."

+ 1
- 1
build/clean.sh View File

@ -29,7 +29,7 @@ set -e
SELF=clean
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
for ARG in ${@}; do
case ${ARG} in

+ 2
- 31
build/common.sh View File

@ -29,7 +29,6 @@
set -e
OPTS="a:B:b:C:c:d:E:e:F:f:G:g:K:k:L:l:m:n:o:P:p:R:S:s:T:t:U:u:v:V:"
SCRUB_ARGS=":"
while getopts ${OPTS} OPT; do
case ${OPT} in
@ -37,123 +36,96 @@ while getopts ${OPTS} OPT; do
export PRODUCT_TARGET=${OPTARG%%:*}
export PRODUCT_ARCH=${OPTARG##*:}
export PRODUCT_HOST=$(uname -p)
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
B)
export PORTSBRANCH=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
b)
export SRCBRANCH=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
C)
export COREDIR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
c)
export PRODUCT_SPEED=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
d)
export PRODUCT_DEVICE=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
E)
export COREBRANCH=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
e)
export PLUGINSBRANCH=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
F)
export PRODUCT_KERNEL=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
f)
export PRODUCT_FLAVOUR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
G)
export PORTSREFBRANCH=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
g)
export TOOLSBRANCH=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
K)
if [ -n "${OPTARG}" ]; then
export PRODUCT_PUBKEY=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
k)
if [ -n "${OPTARG}" ]; then
export PRODUCT_PRIVKEY=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
L)
if [ -n "${OPTARG}" ]; then
export PRODUCT_SIGNCMD=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
l)
if [ -n "${OPTARG}" ]; then
export PRODUCT_SIGNCHK=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
m)
export PRODUCT_MIRROR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
n)
export PRODUCT_NAME=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
o)
if [ -n "${OPTARG}" ]; then
export STAGEDIRPREFIX=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
P)
export PORTSDIR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
p)
export PLUGINSDIR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
R)
export PORTSREFDIR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
S)
export SRCDIR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
s)
export PRODUCT_SETTINGS=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
T)
export TOOLSDIR=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
t)
export PRODUCT_TYPE=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
U)
case "${OPTARG}" in
''|-devel)
export PRODUCT_SUFFIX=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
*)
echo "SUFFIX wants empty string or '-devel'" >&2
@ -165,15 +137,12 @@ while getopts ${OPTS} OPT; do
if [ "${OPTARG}" = "yes" ]; then
export PRODUCT_UEFI=${OPTARG}
fi
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
v)
export PRODUCT_VERSION=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
V)
export PRODUCT_ADDITIONS=${OPTARG}
SCRUB_ARGS=${SCRUB_ARGS};shift;shift
;;
*)
echo "${0}: Unknown argument '${OPT}'" >&2
@ -182,6 +151,8 @@ while getopts ${OPTS} OPT; do
esac
done
shift $((${OPTIND} - 1))
if [ -z "${PRODUCT_NAME}" -o \
-z "${PRODUCT_TYPE}" -o \
-z "${PRODUCT_ARCH}" -o \

+ 3
- 3
build/core.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2014-2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=core
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
check_packages ${SELF} ${@}
@ -40,7 +40,7 @@ setup_chroot ${STAGEDIR}
extract_packages ${STAGEDIR}
remove_packages ${STAGEDIR} ${@}
# register persistent packages to avoid bouncing
install_packages ${STAGEDIR} pkg git gettext-tools
install_packages ${STAGEDIR} pkg git
lock_packages ${STAGEDIR}
for BRANCH in master ${COREBRANCH}; do

+ 1
- 1
build/distfiles.sh View File

@ -29,7 +29,7 @@ set -e
SELF=distfiles
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
PORTS_LIST=$(
cat ${CONFIGDIR}/skim.conf ${CONFIGDIR}/ports.conf | \

+ 1
- 1
build/dvd.sh View File

@ -29,7 +29,7 @@ set -e
SELF=dvd
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
check_images ${SELF} ${@}

+ 2
- 2
build/info.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=info
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
TAGNAME=
if [ -n "${1}" ]; then

+ 1
- 1
build/kernel.sh View File

@ -29,7 +29,7 @@ set -e
SELF=kernel
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
KERNEL_SET=$(find ${SETSDIR} -name "kernel-*-${PRODUCT_ARCH}.txz")

+ 2
- 2
build/nano.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2015-2017 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2004-2009 Scott Ullrich <sullrich@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
@ -30,7 +30,7 @@ set -e
SELF=nano
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
check_images ${SELF} ${@}

+ 1
- 1
build/plugins.sh View File

@ -29,7 +29,7 @@ set -e
SELF=plugins
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
PLUGINS_LIST=$(
cat ${CONFIGDIR}/plugins.conf | while read PLUGIN_ORIGIN PLUGIN_IGNORE; do

+ 1
- 1
build/ports.sh View File

@ -29,7 +29,7 @@ set -e
SELF=ports
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
PORTS_LIST=$(
cat ${CONFIGDIR}/ports.conf | while read PORT_ORIGIN PORT_IGNORE; do

+ 1
- 1
build/prefetch.sh View File

@ -29,7 +29,7 @@ set -e
SELF=prefetch
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
# XXX does not adapt to FreeBSD version used
ABI="FreeBSD:11:${PRODUCT_ARCH}/${PRODUCT_SETTINGS}"

+ 2
- 2
build/print.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=print
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
for ARG in ${@}; do
echo ${ARG}=\"$(printenv ${ARG})\"

+ 2
- 2
build/rebase.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2015 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2015-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=rebase
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
BASE_OBSOLETE=$(find ${SETSDIR} -name "base-*-${PRODUCT_ARCH}.obsolete")
BASE_SET=$(find ${SETSDIR} -name "base-*-${PRODUCT_ARCH}.txz")

+ 2
- 2
build/release.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2015-2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2015-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=release
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
RELEASE_SET="${SETSDIR}/release-${PRODUCT_VERSION}-${PRODUCT_FLAVOUR}-${PRODUCT_ARCH}.tar"

+ 1
- 1
build/rename.sh View File

@ -29,7 +29,7 @@ set -e
SELF=rename
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
for ARG in ${@}; do
case ${ARG} in

+ 2
- 2
build/serial.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2014-2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-2017 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2010-2011 Scott Ullrich <sullrich@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
@ -30,7 +30,7 @@ set -e
SELF=serial
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
check_images ${SELF} ${@}

+ 2
- 2
build/sign.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=sign
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
BASE_SET=$(find ${SETSDIR} -name "base-*-${PRODUCT_ARCH}.txz")
if [ -f "${BASE_SET}" ]; then

+ 1
- 1
build/skim.sh View File

@ -29,7 +29,7 @@ set -e
SELF=skim
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
setup_stage ${STAGEDIR}

+ 1
- 1
build/test.sh View File

@ -29,7 +29,7 @@ set -e
SELF=test
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
git_branch ${COREDIR} ${COREBRANCH} COREBRANCH
git_branch ${PLUGINSDIR} ${PLUGINSBRANCH} PLUGINSBRANCH

+ 1
- 1
build/update.sh View File

@ -29,7 +29,7 @@ set -e
SELF=update
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
for ARG in ${@}; do
case ${ARG} in

+ 1
- 1
build/verify.sh View File

@ -29,7 +29,7 @@ set -e
SELF=verify
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
setup_stage ${STAGEDIR}
setup_base ${STAGEDIR}

+ 2
- 2
build/vga.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2014-2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2014-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=vga
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
check_images ${SELF} ${@}

+ 2
- 2
build/vm.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2017 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -29,7 +29,7 @@ set -e
SELF=vm
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
check_images ${SELF} ${@}

+ 1
- 1
build/xtools.sh View File

@ -29,7 +29,7 @@ set -e
SELF=xtools
. ./common.sh && $(${SCRUB_ARGS})
. ./common.sh
if [ ${PRODUCT_HOST} = ${PRODUCT_ARCH} ]; then
echo ">>> No need to build xtools on native build"

Loading…
Cancel
Save