mirror of
https://github.com/lingble/talos.git
synced 2025-11-27 11:23:46 +00:00
chore: use buildkit for builds (#295)
This commit is contained in:
52
hack/scripts/cleanup.sh
Normal file
52
hack/scripts/cleanup.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
function remove_symlinks() {
|
||||
set +e
|
||||
for l in $(find ${PREFIX} -type l); do
|
||||
readlink $l | grep -q /toolchain
|
||||
if [ $? == 0 ]; then
|
||||
echo "Unlinking $l"
|
||||
unlink $l
|
||||
fi
|
||||
done
|
||||
set -e
|
||||
}
|
||||
|
||||
PREFIX="${1}"
|
||||
|
||||
remove_symlinks
|
||||
find ${PREFIX} -type f -name \*.a -print0 | xargs -0 rm -rf
|
||||
find ${PREFIX}/lib ${PREFIX}/usr/lib -type f \( -name \*.so* -a ! -name \*dbg \) -exec strip --strip-unneeded {} ';'
|
||||
find ${PREFIX}/{bin,sbin} ${PREFIX}/usr/{bin,sbin,libexec} -type f -exec strip --strip-all {} ';'
|
||||
|
||||
rm -rf \
|
||||
${PREFIX}/bin/getconf \
|
||||
${PREFIX}/bin/ldd \
|
||||
${PREFIX}/bin/mtrace \
|
||||
${PREFIX}/bin/gencat \
|
||||
${PREFIX}/bin/locale \
|
||||
${PREFIX}/bin/xtrace \
|
||||
${PREFIX}/bin/zic \
|
||||
${PREFIX}/bin/sln \
|
||||
${PREFIX}/bin/tzselect \
|
||||
${PREFIX}/bin/iconv \
|
||||
${PREFIX}/bin/sotruss \
|
||||
${PREFIX}/bin/ldconfig \
|
||||
${PREFIX}/bin/pldd \
|
||||
${PREFIX}/bin/iconvconfig \
|
||||
${PREFIX}/bin/localedef \
|
||||
${PREFIX}/bin/makedb \
|
||||
${PREFIX}/bin/pcprofiledump \
|
||||
${PREFIX}/bin/nscd \
|
||||
${PREFIX}/bin/sprof \
|
||||
${PREFIX}/bin/zdump \
|
||||
${PREFIX}/bin/getent \
|
||||
${PREFIX}/bin/scmp_sys_resolver \
|
||||
${PREFIX}/bin/catchsegv \
|
||||
${PREFIX}/lib/gconv/ \
|
||||
${PREFIX}/include/* \
|
||||
${PREFIX}/share/* \
|
||||
${PREFIX}/usr/include/* \
|
||||
${PREFIX}/usr/share/* \
|
||||
${PREFIX}/usr/libexec/getconf \
|
||||
${PREFIX}/var/db
|
||||
18
hack/scripts/push.sh
Executable file
18
hack/scripts/push.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
DEFAULT_REPO="autonomy"
|
||||
|
||||
REPO="${1}"
|
||||
TAG="${2}"
|
||||
|
||||
|
||||
images=( trustd proxyd blockd osd talos )
|
||||
for i in ${images[@]}; do
|
||||
if [ "${REPO}" != "${DEFAULT_REPO}" ]; then
|
||||
docker tag ${DEFAULT_REPO}/${i}:${TAG} ${REPO}/${i}:${TAG}
|
||||
fi
|
||||
docker push ${REPO}/${i}:${TAG}
|
||||
done
|
||||
|
||||
17
hack/scripts/symlink.sh
Normal file
17
hack/scripts/symlink.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
PREFIX="${1}"
|
||||
|
||||
mkdir -p ${PREFIX}/usr/share
|
||||
mkdir -p ${PREFIX}/usr/local/share
|
||||
|
||||
paths=( /etc/pki /usr/share/ca-certificates /usr/local/share/ca-certificates /etc/ca-certificates )
|
||||
for d in "${paths[@]}"; do
|
||||
ln -sv /etc/ssl/certs ${PREFIX}$d
|
||||
done
|
||||
|
||||
# Required by kube-proxy.
|
||||
mkdir ${PREFIX}/lib/modules
|
||||
|
||||
mkdir -p ${PREFIX}/usr/libexec
|
||||
ln -sv ../../var/libexec/kubernetes ${PREFIX}/usr/libexec/kubernetes
|
||||
Reference in New Issue
Block a user