I recently wanted to setup a repository for some custom OpenWrt packages for Respeaker. It seems that it is not so well documented, or at least, I did not found it and I have been helped on OpenWrt forum.
Also, it is better to sign packages so...here we go !
Prepare the repository
- Compile and install
- Generate key thanks to:
usign -G -p openWrtUsign.pub -s openWrtUsign.key.
- Put the following script in the IPK directory.
- Make it executable:
chmod +x repoUpdate.sh
- Execute it:
- Copy the whole directory and
openWrtUsign.pubto a webserver.
- Done !
Add key and install packages on the target
# Add the public key wget http://youserver.ext/path/to/openWrtUsign.pub opkg-key add openWrtUsign.pub opkg update # Install package opkg install newPackage
Manifest generation script
#!/bin/bash SCRIPT="../../../../scripts/ipkg-make-index.sh" KEY="../openWrtUsign.key" # Generates package manifest $SCRIPT . 2>/dev/null > Packages.manifest grep -vE '^(Maintainer|LicenseFiles|Source|Require)' Packages.manifest > Packages gzip -9nc Packages > Packages.gz usign -S -m Packages -s $KEY