From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Fri, 19 Jun 2020 08:12:04 +0200 From: Michael Olbrich Message-ID: <20200619061204.GI9312@pengutronix.de> References: <20200617143125.23999-1-bst@pengutronix.de> <20200617143125.23999-3-bst@pengutronix.de> <20200618114013.a6ucuv2tcjwcamaw@pengutronix.de> <542fa403-ffe9-6ce8-6231-b52f87bac9a2@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <542fa403-ffe9-6ce8-6231-b52f87bac9a2@pengutronix.de> Subject: Re: [ptxdist] [PATCH v3 2/6] package templates: add code-signing-provider template List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Roland Hieber On Thu, Jun 18, 2020 at 01:50:18PM +0200, Bastian Krause wrote: > On 6/18/20 1:40 PM, Roland Hieber wrote: > > On Wed, Jun 17, 2020 at 04:31:21PM +0200, Bastian Krause wrote: > >> diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh > >> index 6b405763b..805d8d9d3 100644 > >> --- a/scripts/lib/ptxd_lib_template.sh > >> +++ b/scripts/lib/ptxd_lib_template.sh > >> @@ -486,3 +486,34 @@ ptxd_template_new_blspec_entry() { > >> export -f ptxd_template_new_blspec_entry > >> ptxd_template_help_list[${#ptxd_template_help_list[@]}]="blspec-entry" > >> ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create package for a bootloader spec entry" > >> + > >> +ptxd_template_new_code_signing_provider() { > >> + export class="host-" > >> + ptxd_template_read_basic && > >> + ptxd_template_read_author && > >> + ptxd_template_read_options "provider type" TYPE "SoftHSM" "HSM with OpenSC support" "other HSM" > >> + package_filename="${package_filename}-code-signing" > >> + local template_file="$(ptxd_template_file "${template}-choice-in")" > >> + local filename="${PTXDIST_PLATFORMCONFIGDIR}/platforms/${class}${package_filename}-choice.in" > >> + ptxd_template_filter "${template_file}" "${filename}" > >> + template_file="$(ptxd_template_file "${template}-pre-make")" > >> + filename="${PTXDIST_PLATFORMCONFIGDIR}/rules/pre/020-${package_filename}-hsm.make" > >> + if [ "$TYPE" = "SoftHSM" ]; then > >> + export EXTRA_DEPENDENCIES="select HOST_SOFTHSM" > >> + elif [ "$TYPE" = "HSM with OpenSC support" ]; then > >> + export EXTRA_DEPENDENCIES="select HOST_OPENSC > >> + select HOST_OPENSC_PCSC" > >> + export MODULE_PATH="\${PTXDIST_SYSROOT_HOST}/lib/pkcs11/opensc-pkcs11.so" > >> + ptxd_template_filter "${template_file}" "${filename}" > >> + elif [ "$TYPE" = "other HSM" ]; then > >> + export EXTRA_DEPENDENCIES="select FIXME" > >> + export MODULE_PATH="\${PTXDIST_SYSROOT_HOST}/fix/me" > >> + ptxd_template_filter "${template_file}" "${filename}" > > > > Hmm, the indentation is off here (tabs mixed with spaces), but that's > > the case for the whole file, so I guess that's okay :D > > I think the rule is every indentation level is 4 spaces and every 8 > spaces should be converted to 1 tab. Indeed. I think it's some emacs style indention. It's been driving me crazy for years but the scripts started that way and I never had a good reason to change it... Michael > > Tested-by: Roland Hieber > > Reviewed-by: Roland Hieber > > Thanks! > > Regards, > Bastian > > -- > Pengutronix e.K. | | > Steuerwalder Str. 21 | http://www.pengutronix.de/ | > 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de