Skip to content

Instantly share code, notes, and snippets.

@mklooss
Last active December 16, 2016 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mklooss/c9a177654b611aa0e342 to your computer and use it in GitHub Desktop.
Save mklooss/c9a177654b611aa0e342 to your computer and use it in GitHub Desktop.
OE 2.2 Repository (apt/trivial)
#!/bin/bash
# Remove Old Files
rm -rf Packages.gz Packages.xz Release.gpg Packages Release
DIR=`pwd`
LABEL=`basename $DIR`
# Search for Debian Packages and signed this Packages
PKSLIST=""
for line in $(find . -iname '*.deb'); do
FILE=`basename $line`
SIGNED_FILE="../signed/${LABEL}/${FILE}"
if [ ! -f "$SIGNED_FILE" ]; then
mkdir -p `dirname $SIGNED_FILE`
touch $SIGNED_FILE
PKSLIST=" $line"
fi
done
if [ ! -z "$PKSLIST" ]; then
dpkg-sig --cache-passphrase -s builder $PKSLIST
fi
# Create Trivial repository files
dpkg-scanpackages -t deb ./ | tee Packages
sed -i 's#.//##' Packages
cat Packages | gzip -9c > Packages.gz
xz -k -- Packages
echo "Label: $LABEL" > Release
apt-ftparchive release . >> Release
gpg --default-key "Mathis Klooss" -abs -o Release.gpg Release
Creates an Trivial Repository for OE 2.2 Based on Data from http://git.opendreambox.org/
while creating the repository there will be a new folder "../signed".
I need this folder, so i do not double sign a package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment