-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run a separate test script to create a repo with a signed package
- Loading branch information
Showing
3 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
export LC_ALL=C.UTF-8 | ||
export LANG=C.UTF-8 | ||
|
||
# install simpleaptrepo | ||
pip3 install -e . | ||
|
||
# do some cleanup | ||
if [ -d "/repos/" ]; then | ||
rm -Rf /repos/ | ||
fi | ||
|
||
# create a repo directory | ||
mkdir /repos | ||
|
||
# now we really create a repo here and add a package | ||
# the gpg key is build into the docker image for testing purposes | ||
simpleapt create-repo myrepo /repos --gpgkey B7C72A100F81017B | ||
simpleapt add-component myrepo test | ||
simpleapt list-repos | ||
cp /usr/local/src/vdt/simpleaptrepo/tests/testdata/*.deb /repos/myrepo/test | ||
simpleapt update-repo myrepo test | ||
simpleapt update-repo myrepo test --skip-signed | ||
|
||
# add the created repo as a local source | ||
echo "deb file:/repos/myrepo/test /" > /etc/apt/sources.list.d/local.list | ||
|
||
# add the GPG key as a valid key: | ||
cat /repos/myrepo/test/keyfile | apt-key add - | ||
|
||
# update the apt repository and install the signed package | ||
apt-get update | ||
apt-get install --yes testpackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters