[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#851774: [pkg-gnupg-maint] Bug#851774: Stop using apt-key add to add keys in generators/60local



On Sat 2017-02-04 19:35:58 -0500, Daniel Kahn Gillmor wrote:
> Over in #831409, i mentioned this simple pipeline to perform the actual
> transformation:
>
>      awk '/^$/{ x = 1; } /^[^=-]/{ if (x) { print $0; } ; }' | base64 -d
>
> Unfortunately, it looks to me like busybox doesn't offer a base64 applet
> at the moment, which would otherwise allow d-i to do the de-armoring
> entirely with busybox.  I could probably knock that applet together if
> people want it -- it looks like busybox already has b64 subroutines in
> it.

ah, no need for a base64 applet, since busybox has a uudecode applet.

using only busybox, the following pipeline should be fine for
de-armoring:

    awk 'BEGIN{ print "begin-base64 644 -" } /^$/{ x = 1; } /^[^=-]/{ if (x) { print $0; } ; } END{ print "====" }' | uudecode

hth,

        --dkg

Attachment: signature.asc
Description: PGP signature


Reply to: