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
|
set -u
|
||||||
|
|
||||||
entry="$uri $distribution $component"
|
entry="$uri $distribution $component"
|
||||||
|
|
||||||
cat << DONE
|
cat << DONE
|
||||||
# Created by cdist ${__type##*/}
|
# Created by cdist ${__type##*/}
|
||||||
# Do not change. Changes will be overwritten.
|
# Do not change. Changes will be overwritten.
|
||||||
#
|
#
|
||||||
|
|
||||||
# $name
|
# $name
|
||||||
deb ${forcedarch} $entry
|
deb ${options} $entry
|
||||||
DONE
|
DONE
|
||||||
if [ -f "$__object/parameter/include-src" ]; then
|
if [ -f "$__object/parameter/include-src" ]; then
|
||||||
echo "deb-src $entry"
|
echo "deb-src $entry"
|
||||||
|
|
|
@ -23,6 +23,9 @@ OPTIONAL PARAMETERS
|
||||||
arch
|
arch
|
||||||
set this if you need to force and specific arch (ubuntu specific)
|
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
|
state
|
||||||
'present' or 'absent', defaults to 'present'
|
'present' or 'absent', defaults to 'present'
|
||||||
|
|
||||||
|
@ -56,6 +59,11 @@ EXAMPLES
|
||||||
--uri http://archive.canonical.com/ \
|
--uri http://archive.canonical.com/ \
|
||||||
--component partner --state present
|
--component partner --state present
|
||||||
|
|
||||||
|
__apt_source goaccess \
|
||||||
|
--uri http://deb.goaccess.io/ \
|
||||||
|
--component main \
|
||||||
|
--signed-by C03B48887D5E56B046715D3297BD1A0133449C3D
|
||||||
|
|
||||||
|
|
||||||
AUTHORS
|
AUTHORS
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -31,9 +31,15 @@ fi
|
||||||
component="$(cat "$__object/parameter/component")"
|
component="$(cat "$__object/parameter/component")"
|
||||||
|
|
||||||
if [ -f "$__object/parameter/arch" ]; then
|
if [ -f "$__object/parameter/arch" ]; then
|
||||||
forcedarch="[arch=$(cat "$__object/parameter/arch")]"
|
options="arch=$(cat "$__object/parameter/arch")"
|
||||||
else
|
fi
|
||||||
forcedarch=""
|
|
||||||
|
if [ -f "$__object/parameter/signed-by" ]; then
|
||||||
|
options="$options signed-by=$(cat "$__object/parameter/signed-by")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$options" ]; then
|
||||||
|
options="[$options]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# export variables for use in template
|
# export variables for use in template
|
||||||
|
@ -41,7 +47,7 @@ export name
|
||||||
export uri
|
export uri
|
||||||
export distribution
|
export distribution
|
||||||
export component
|
export component
|
||||||
export forcedarch
|
export options
|
||||||
|
|
||||||
# generate file from template
|
# generate file from template
|
||||||
mkdir "$__object/files"
|
mkdir "$__object/files"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
state
|
state
|
||||||
distribution
|
distribution
|
||||||
component
|
component
|
||||||
arch
|
arch
|
||||||
|
signed-by
|
||||||
|
|
Loading…
Reference in a new issue