Hi,
It occurs to me that it would be nice to be able to put inline data in
some places where we currently only accept URLs. For instance, when
specifying the keys to go with additional 'local' repos.
AFAIK at present, such keys can only be specified as the content of a
file, which then needs to be available via a URL somehow, rather than
within the preseed file itself.
I think the right place to put it would probably be as an additional
"proto" handler in fetch_url's methods.
One could make up a pretend protocol (a scheme in URI parlance) of e.g. "base64" and then specify something like:
d-i apt-setup/local0/key string base64://bm90IHJlYWxseSBhIGtleQ==
or one could go with the standards, and use the 'data' scheme, and
specify something like:
d-i apt-setup/local0/key string data:base64,bm90IHJlYWxseSBhIGtleQ==
I cannot think of good reasons to support the full set of variations
available via the data scheme, so it seems like we'd end up throwing an
error if anyone tries to use any of them.
If that's the case, we might as well not bother pretending to support
the data scheme, and just make up our own. This also allows us to put
the // after the colon (as above) which means that the main code in
fetch_url need not be touched, and so the patch will be trivial and
obvioulsy safe.
Does anyone have opinions, or perhaps a better suggestion for a made-up
scheme name?
If not, I'll knock up a 'base64' method for fetch_url, and do some testing.
BTW This will also need busybox to have the base64 component turned on
for the udeb, which seems to add about 1k to the size of the udeb.
Cheers, Phil.
--
|)| Philip Hands [+44 (0)20 8530 9560] HANDS.COM Ltd.
|-|
http://www.hands.com/ http://ftp.uk.debian.org/
|(| Hugo-Klemm-Strasse 34, 21075 Hamburg, GERMANY
--=-=-Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE3/FBWs4yJ/zyBwfW0EujoAEl1cAFAmLqIXMACgkQ0EujoAEl 1cCZSg/7BbrItaKkDI3BqXDijsG6XRTudK1jttHfPJJuBPiTmHtyA/lKO8crX5xS hSvZqo6Ia3iojA2zU7U/isQA+3gRVIQeV1FpCX7X/1El5spQ5RH/RefeD38a3Py5 8+EtnuQe014LO6RtgiJ5oJ01vO6KwNqj6Ha9zfB48IgaQhXq4RQrRrnloS7LIjfe axozeWLGQ5Sp2IJ+9sE8K/Q8GUjvPYXMCtboYPkTFW3xQL8LXmat8UhrrjPSKeN9 +vxfmju9EO6XCF0HDJgrXEWdmMI2CTMEe3XD2fA50x8phTk7Ger0Pue3JjinOx+Y j9mb28vkMUuE5hmKUbpfQpLO8WnZHG/2O3sfEpLHcpUYc8oOajScVnrUJ0X4hrLV T7Lh2Scs73TG6yAfChVljatTn4MzoJcXDoACQYO6SFNEt4BMsvtdQ+Sau9SUcGJI kn46CzYG19mqh8wW2RjpncBOWCNsO+weiNQQ37RitwROTWiy9gonmXWQto6O4bVT /6crOfoLtoAXAlLB0N6JoELuy3k7KvS27zLJ8XCz3JKHNAgxd1giohpj8LPad6Gz fkujaaC/2oe48Qd5SYroz2Wyk2VSOq7Roqn3EHtUj0oIAV3Iizc3fs/DlDiJAoAH vSbCPgpg27nwpFJ