Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions runbuild
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ fi

make -j"$CORES" package/openwisp-config/compile || make -j1 V=s package/openwisp-config/compile || exit 1

# Ensure usign tool is available (required for package index generation)
# Even when generating unsigned indexes, OpenWRT's Makefile needs usign for SHA-512 padding workaround
if [ ! -f staging_dir/host/bin/usign ]; then
echo "usign not found, building tools..."
make -j"$CORES" tools/install || make -j1 V=s tools/install
fi

# Generate package index with checksums (unsigned - no usign needed)
make package/index SIGNED_PACKAGES= V=s

# Filter Packages file to include only openwisp packages and save as checksum file
mkdir -p "$BUILD_DIR/openwrt/bin/packages/$COMPILE_TARGET/openwisp"
awk '
/^Package: openwisp-/ {flag=1}
flag {print}
/^$/ {flag=0}
' "$BUILD_DIR/openwrt/bin/packages/$COMPILE_TARGET/Packages" \
>"$BUILD_DIR/openwrt/bin/packages/$COMPILE_TARGET/openwisp/Packages.sha256.checksum"

mv "$BUILD_DIR"/openwrt/bin/packages/"$COMPILE_TARGET"/openwisp "$VERSIONED_DIR"

rm "$LATEST_LINK" || true
Expand Down
Loading