-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
132 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"description": "fix SELinux labels to allow use in multiple containers and/or the host filesystem.", | ||
"type": "fixed", | ||
"issues": [961] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ARG CROSS_IMAGE | ||
FROM $CROSS_IMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
set -euo pipefail | ||
|
||
# shellcheck disable=SC1091 | ||
. freebsd-common.sh | ||
|
||
export PACKAGESITE=/opt/freebsd-packagesite/packagesite.yaml | ||
export PKG_SOURCE="https://pkg.freebsd.org/FreeBSD:${BSD_MAJOR}:${BSD_ARCH}/quarterly" | ||
export TARGET="${ARCH}-unknown-freebsd${BSD_MAJOR}" | ||
|
||
setup_packagesite() { | ||
apt-get update && apt-get install --assume-yes --no-install-recommends \ | ||
curl \ | ||
jq \ | ||
xz-utils | ||
|
||
mkdir /opt/freebsd-packagesite | ||
curl --retry 3 -sSfL "${PKG_SOURCE}/packagesite.txz" -O | ||
tar -C /opt/freebsd-packagesite -xJf packagesite.txz | ||
|
||
rm packagesite.txz | ||
} | ||
|
||
install_freebsd_package() { | ||
local name | ||
local path | ||
local pkg | ||
local td | ||
local destdir="/usr/local/${TARGET}" | ||
|
||
td="$(mktemp -d)" | ||
pushd "${td}" | ||
|
||
for name in "${@}"; do | ||
path=$(jq -c '. | select ( .name == "'"${name}"'" ) | .repopath' "${PACKAGESITE}") | ||
if [[ -z "${path}" ]]; then | ||
echo "Unable to find package ${name}" >&2 | ||
exit 1 | ||
fi | ||
path=${path//'"'/} | ||
pkg=$(basename "${path}") | ||
|
||
mkdir "${td}"/package | ||
curl --retry 3 -sSfL "${PKG_SOURCE}/${path}" -O | ||
tar -C "${td}/package" -xJf "${pkg}" | ||
cp -r "${td}/package/usr/local"/* "${destdir}"/ | ||
|
||
rm "${td:?}/${pkg}" | ||
rm -rf "${td:?}/package" | ||
done | ||
|
||
# clean up | ||
popd | ||
rm -rf "${td:?}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters