Merge pull request 'Handle signed-by option in __apt_source' (#335) from fancsali/cdist:apt-source-signed-by into master
Reviewed-on: ungleich-public/cdist#335
This commit is contained in:
commit
5a7542db75
4 changed files with 22 additions and 6 deletions
|
@ -2,13 +2,14 @@
|
|||
set -u
|
||||
|
||||
entry="$uri $distribution $component"
|
||||
|
||||
cat << DONE
|
||||
# Created by cdist ${__type##*/}
|
||||
# Do not change. Changes will be overwritten.
|
||||
#
|
||||
|
||||
# $name
|
||||
deb ${forcedarch} $entry
|
||||
deb ${options} $entry
|
||||
DONE
|
||||
if [ -f "$__object/parameter/include-src" ]; then
|
||||
echo "deb-src $entry"
|
||||
|
|
|
@ -23,6 +23,9 @@ OPTIONAL PARAMETERS
|
|||
arch
|
||||
set this if you need to force and specific arch (ubuntu specific)
|
||||
|
||||
signed-by
|
||||
provide a GPG key fingerprint or keyring path for signature checks
|
||||
|
||||
state
|
||||
'present' or 'absent', defaults to 'present'
|
||||
|
||||
|
@ -56,6 +59,11 @@ EXAMPLES
|
|||
--uri http://archive.canonical.com/ \
|
||||
--component partner --state present
|
||||
|
||||
__apt_source goaccess \
|
||||
--uri http://deb.goaccess.io/ \
|
||||
--component main \
|
||||
--signed-by C03B48887D5E56B046715D3297BD1A0133449C3D
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
|
|
|
@ -31,9 +31,15 @@ fi
|
|||
component="$(cat "$__object/parameter/component")"
|
||||
|
||||
if [ -f "$__object/parameter/arch" ]; then
|
||||
forcedarch="[arch=$(cat "$__object/parameter/arch")]"
|
||||
else
|
||||
forcedarch=""
|
||||
options="arch=$(cat "$__object/parameter/arch")"
|
||||
fi
|
||||
|
||||
if [ -f "$__object/parameter/signed-by" ]; then
|
||||
options="$options signed-by=$(cat "$__object/parameter/signed-by")"
|
||||
fi
|
||||
|
||||
if [ "$options" ]; then
|
||||
options="[$options]"
|
||||
fi
|
||||
|
||||
# export variables for use in template
|
||||
|
@ -41,7 +47,7 @@ export name
|
|||
export uri
|
||||
export distribution
|
||||
export component
|
||||
export forcedarch
|
||||
export options
|
||||
|
||||
# generate file from template
|
||||
mkdir "$__object/files"
|
||||
|
|
|
@ -2,3 +2,4 @@ state
|
|||
distribution
|
||||
component
|
||||
arch
|
||||
signed-by
|
||||
|
|
Loading…
Reference in a new issue