Verified Commit e9ad2aa6 authored by Karel Koci's avatar Karel Koci 🤘 Committed by Karel Koci

Generate medkit only when all packages are build

This means that we are dropping minimal medkits and that way we now have
only single medkit so also '-full' is dropped.
parent 9119fe33
......@@ -145,31 +145,29 @@ if [ -f "$HOME"/mime.key ]; then
done
fi
# Generate medkit(s)
medkit_build() {
local MED_TAR="omnia-medkit-$(date -d "$COMMIT_DATE" +%Y%m%d%H%M)-$1.tar.gz"
[ "$1" = "minimal" ] && MED_ARGS="--minimal" || MED_ARGS=""
fakeroot ./scripts/updater-medkit.sh $MED_ARGS bin-nand/mvebu-musl "$MED_PATH/$MED_TAR"
pushd "$MED_PATH"
ln -s "$MED_TAR" omnia-medkit-latest-$1.tar.gz
if [ -f "$HOME"/mime.key ]; then
staging_dir/host/bin/usign -S -m "$MED_TAR" -s "$HOME"/mime.key
ln -s "$MED_TAR".sig omnia-medkit-latest-$1.tar.gz.sig
fi
md5sum "$MED_TAR" > "$MED_TAR".md5
ln -s "$MED_TAR".md5 omnia-medkit-laster-$1.tar.gz.md5
sha256sum "$MED_TAR" > "$MED_TAR".sha256
ln -s "$MED_TAR".sha256 omnia-medkit-laster-$1.tar.gz.sha256
popd
}
if [ "$TARGET_BOARD" = "omnia" ]; then
rm -f $PUB_BIN_DIR/*.ext4 $PUB_BIN_DIR/*sums
make package/curl/host/install package/libevent2/host/install package/lua/host/install
make package/opkg-trans/host/install
MED_PATH="bin-nand/mvebu-musl/medkit"
mkdir -p "$MED_PATH"
[ -n "$BUILD_ALL" ] && medkit_build full
medkit_build minimal
if [ -n "$BUILD_ALL" ]; then
# Compile host tools
make package/curl/host/install package/libevent2/host/install package/lua/host/install
make package/opkg-trans/host/install
# Generate medkit
MED_PATH="bin-nand/mvebu-musl/medkit"
MED_TAR="omnia-medkit-$(date -d "$COMMIT_DATE" +%Y%m%d%H%M).tar.gz"
mkdir -p "$MED_PATH"
fakeroot ./scripts/updater-medkit.sh $MED_ARGS bin-nand/mvebu-musl "$MED_PATH/$MED_TAR"
pushd "$MED_PATH"
ln -s "$MED_TAR" omnia-medkit-latest.tar.gz
if [ -f "$HOME"/mime.key ]; then
staging_dir/host/bin/usign -S -m "$MED_TAR" -s "$HOME"/mime.key
ln -s "$MED_TAR".sig omnia-medkit-latest.tar.gz.sig
fi
md5sum "$MED_TAR" > "$MED_TAR".md5
ln -s "$MED_TAR".md5 omnia-medkit-laster.tar.gz.md5
sha256sum "$MED_TAR" > "$MED_TAR".sha256
ln -s "$MED_TAR".sha256 omnia-medkit-laster.tar.gz.sha256
popd
fi
fi
if [ "$TARGET_BOARD" = omnia ]; then
......
#!/bin/sh
set -e
MINIMAL=false
while [ $# -gt 0 ]; do
case "$1" in
-h|--help)
......@@ -12,9 +11,6 @@ while [ $# -gt 0 ]; do
echo " Note that this script is expected to be run in openwrt sdk root"
exit 0
;;
--minimal)
MINIMAL=true
;;
*)
if [ -z "$OPENWRT_BIN" ]; then
OPENWRT_BIN="$1"
......@@ -84,7 +80,7 @@ cat $OPENWRT_BIN/lists/base.lua | \
sed "s#https://api.turris.cz/openwrt-repo/omnia.*/packages#file://$OPENWRT_BIN/packages#;/^-- The fallback repository/,/^}$/d" > "$UPDATER_BASECONF"
# Dump our entry file
UPDATER_CONF="$BUILD_DIR/entry.lua"
$MINIMAL || echo "l10n = {'cs', 'de'} -- table with selected localizations
echo "l10n = {'cs', 'de'} -- table with selected localizations
Export 'l10n'
-- This is helper function for including localization packages.
function for_l10n(fragment)
......@@ -92,8 +88,9 @@ function for_l10n(fragment)
Install(fragment .. lang, {ignore = {'missing'}})
end
end
Export 'for_l10n'" > "$UPDATER_CONF"
echo "Script 'base' 'file://$UPDATER_BASECONF'" >> "$UPDATER_CONF"
Export 'for_l10n'
Script 'base' 'file://$UPDATER_BASECONF'" > "$UPDATER_CONF"
for USRL in cacerts luci-controls lxc nas netutils shell-utils webcam; do
echo "Script '$USRL' 'file://$OPENWRT_BIN/lists/$USRL.lua'" >> "$UPDATER_CONF"
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment