mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
server: 'local_copy_dir' config/options to automate offline repo signing
This allows a dir to be specified in config.py that `fdroid server update` will automatically rsync the repo to. The idea is that the path would point to an SD card on a fully offline machine that serves as the secure repo signing machine.
This commit is contained in:
parent
0ee6fc8c22
commit
d73b43c5fc
3 changed files with 112 additions and 5 deletions
|
@ -70,6 +70,41 @@ if [ -z $aapt ]; then
|
|||
aapt=`ls -1 $ANDROID_HOME/build-tools/*/aapt | sort | tail -1`
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
echo_header "test config checks of local_copy_dir"
|
||||
|
||||
REPOROOT=`create_test_dir`
|
||||
cd $REPOROOT
|
||||
$fdroid init
|
||||
$fdroid update --create-metadata
|
||||
$fdroid server update --local-copy-dir=/tmp/fdroid
|
||||
|
||||
# now test the errors work
|
||||
set +e
|
||||
$fdroid server update --local-copy-dir=thisisnotanabsolutepath
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "This should have failed because thisisnotanabsolutepath is not an absolute path!"
|
||||
exit 1
|
||||
else
|
||||
echo "testing absolute path checker passed"
|
||||
fi
|
||||
$fdroid server update --local-copy-dir=/tmp/IReallyDoubtThisPathExistsasdfasdf
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "This should have failed because the path does not end with 'fdroid'!"
|
||||
exit 1
|
||||
else
|
||||
echo "testing dirname exists checker passed"
|
||||
fi
|
||||
$fdroid server update --local-copy-dir=/tmp/IReallyDoubtThisPathExistsasdfasdf/fdroid
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "This should have failed because the dirname path does not exist!"
|
||||
exit 1
|
||||
else
|
||||
echo "testing dirname exists checker passed"
|
||||
fi
|
||||
set -e
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
echo_header "setup a new repo from scratch using ANDROID_HOME"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue