diff --git a/cdist/conf/type/__apt_source/files/source.list.template b/cdist/conf/type/__apt_source/files/source.list.template index a28bb45f..de9677a1 100755 --- a/cdist/conf/type/__apt_source/files/source.list.template +++ b/cdist/conf/type/__apt_source/files/source.list.template @@ -2,6 +2,8 @@ set -u entry="$uri $distribution $component" +options="$forcedarch $signed_by" +options=${options## }; options=${options%% } cat << DONE # Created by cdist ${__type##*/} @@ -9,8 +11,8 @@ cat << DONE # # $name -deb ${options} $entry +deb ${options:+[${options}] }$entry DONE if [ -f "$__object/parameter/include-src" ]; then - echo "deb-src $entry" + echo "deb-src ${signed_by:+[${signed_by}] }$entry" fi diff --git a/cdist/conf/type/__apt_source/man.rst b/cdist/conf/type/__apt_source/man.rst index d317a135..99b1bc4b 100644 --- a/cdist/conf/type/__apt_source/man.rst +++ b/cdist/conf/type/__apt_source/man.rst @@ -23,9 +23,6 @@ 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' @@ -37,6 +34,12 @@ component space delimited list of components to enable. Defaults to an empty string. +OPTIONAL MULTIPLE PARAMETERS +---------------------------- +signed-by + provide a GPG key fingerprint or keyring path for signature checks. + + BOOLEAN PARAMETERS ------------------ include-src @@ -68,6 +71,7 @@ EXAMPLES AUTHORS ------- Steven Armstrong +Daniel Fancsali COPYING diff --git a/cdist/conf/type/__apt_source/manifest b/cdist/conf/type/__apt_source/manifest index cdb526d3..1bdebff0 100755 --- a/cdist/conf/type/__apt_source/manifest +++ b/cdist/conf/type/__apt_source/manifest @@ -31,11 +31,11 @@ fi component="$(cat "$__object/parameter/component")" if [ -f "$__object/parameter/arch" ]; then - options="arch=$(cat "$__object/parameter/arch")" + forcedarch="arch=$(cat "$__object/parameter/arch")" fi if [ -f "$__object/parameter/signed-by" ]; then - options="$options signed-by=$(cat "$__object/parameter/signed-by")" + signed_by="${signed_by:${signed_by} }signed-by=$(cat "$__object/parameter/signed-by")" fi if [ "$options" ]; then diff --git a/cdist/conf/type/__apt_source/parameter/optional b/cdist/conf/type/__apt_source/parameter/optional index 0b5470a1..142d4120 100644 --- a/cdist/conf/type/__apt_source/parameter/optional +++ b/cdist/conf/type/__apt_source/parameter/optional @@ -2,4 +2,3 @@ state distribution component arch -signed-by diff --git a/cdist/conf/type/__apt_source/parameter/optional_multiple b/cdist/conf/type/__apt_source/parameter/optional_multiple new file mode 100644 index 00000000..d4f31df0 --- /dev/null +++ b/cdist/conf/type/__apt_source/parameter/optional_multiple @@ -0,0 +1 @@ +signed-by