Package: installation-guide Version: 20161031 Tags: patch stretch
Hi, The long run goal is to make preseed being able to identify that it is reading a preseed file. The wanted way to go is adding header magic. In https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848726 is a bugreport against preseed. This one against installation-guide Groeten Geert Stappers ----- Forwarded message from Geert Stappers ----- Date: Mon, 3 Apr 2017 15:40:13 +0200 From: Geert Stappers <stapp...@stappers.nl> To: Pali Rohár <pali.ro...@gmail.com>, 848...@bugs.debian.org Subject: Re: shebang preseed / header magic On Sun, Jan 15, 2017 at 11:09:02AM +0100, Pali Rohár wrote: ] ] Goal is having a "header" which make it possible ] ] to check that actual a preseed file is being downloaded. ] ] ] ] Step 1: ] ] Document all "stretch" preseed files begining with '#_preseed_V1' ] ] ] ] Step 2: ] ] In "stretch+1", a.k.a. "buster", implement code that checks '#_preseed_V1' ] ] and informs netbooting user when not found. ] ] > > Hi! Any progress on this particular problem? Find attached a patch against the installation guide. > I fully agree that pressed file should be identifiable by either some > magic line or header. Yes. The challenge now is to get beyond "we didn't need in the past" ... Index: build/build.sh =================================================================== --- build/build.sh (revision 70653) +++ build/build.sh (working copy) @@ -59,7 +59,8 @@ if [ -f $PRESEED ] && [ -f preseed.pl ] ; then for arch in $architectures; do eval arch_destination=$destination - ./preseed.pl -r $manual_release $PRESEED >$arch_destination/example-preseed.txt + echo '#_preseed_V1' >$arch_destination/example-preseed.txt + ./preseed.pl -r $manual_release $PRESEED >>$arch_destination/example-preseed.txt done fi Index: en/appendix/preseed.xml =================================================================== --- en/appendix/preseed.xml (revision 70653) +++ en/appendix/preseed.xml (working copy) @@ -633,6 +633,18 @@ </para><para> +The file should start with <literal>#_preseed_V1</literal> +<!-- + The "should" is for the Stretch release, + so later releases use the comment + as a magic string to identify a preseed file + + see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848726 +--> + + +</para><para> + There are a few rules to keep in mind when writing a preconfiguration file. </para> @@ -667,6 +679,10 @@ Some questions take a code as value instead of the English text that is shown during installation. </para></listitem> +<listitem><para> + Start with <literal>#_preseed_V1</literal> + <!-- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848726 --> +</para></listitem> </itemizedlist> <para> @@ -682,7 +698,8 @@ database and the installer's cdebconf database to a single file: <informalexample><screen> -$ debconf-get-selections --installer > <replaceable>file</replaceable> +$ echo "#_preseed_V1" > <replaceable>file</replaceable> +$ debconf-get-selections --installer >> <replaceable>file</replaceable> $ debconf-get-selections >> <replaceable>file</replaceable> </screen></informalexample> ----- End forwarded message -----
Index: build/build.sh =================================================================== --- build/build.sh (revision 70653) +++ build/build.sh (working copy) @@ -59,7 +59,8 @@ if [ -f $PRESEED ] && [ -f preseed.pl ] ; then for arch in $architectures; do eval arch_destination=$destination - ./preseed.pl -r $manual_release $PRESEED >$arch_destination/example-preseed.txt + echo '#_preseed_V1' >$arch_destination/example-preseed.txt + ./preseed.pl -r $manual_release $PRESEED >>$arch_destination/example-preseed.txt done fi Index: en/appendix/preseed.xml =================================================================== --- en/appendix/preseed.xml (revision 70653) +++ en/appendix/preseed.xml (working copy) @@ -633,6 +633,18 @@ </para><para> +The file should start with <literal>#_preseed_V1</literal> +<!-- + The "should" is for the Stretch release, + so later releases use the comment + as a magic string to identify a preseed file + + see also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848726 +--> + + +</para><para> + There are a few rules to keep in mind when writing a preconfiguration file. </para> @@ -667,6 +679,10 @@ Some questions take a code as value instead of the English text that is shown during installation. </para></listitem> +<listitem><para> + Start with <literal>#_preseed_V1</literal> + <!-- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848726 --> +</para></listitem> </itemizedlist> <para> @@ -682,7 +698,8 @@ database and the installer's cdebconf database to a single file: <informalexample><screen> -$ debconf-get-selections --installer > <replaceable>file</replaceable> +$ echo "#_preseed_V1" > <replaceable>file</replaceable> +$ debconf-get-selections --installer >> <replaceable>file</replaceable> $ debconf-get-selections >> <replaceable>file</replaceable> </screen></informalexample>
signature.asc
Description: Digital signature