Bug#859438: preseed header magic
On Sat, Apr 22, 2017 at 09:35:18PM +0200, Holger Wansing wrote:
> Holger Wansing <linux@wansing-online.de> wrote:
> > Geert Stappers <stappers@debian.org> wrote:
> > >
> > > 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
> >
> > The patch for the manual was committed in the meantime, but now the new
> > header is not included in the example-preseed.txt file, see
> > http://d-i.alioth.debian.org/manual/example-preseed.txt
> >
> > This is, because the script, which generates the example-preseed.txt file,
> > only parses parts of the preseed.xml which are between <informalexample>
> > tags that have the attribute 'role="example"' set.
> > (This documented at the beginning of the ../en/appendix/preseed.xml.)
> > And there is nothing like that ATM in the manual.
True.
I tried with
--- 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
> >
> > The attached patch adds the needed paragraph in B.4 chapter at the very
> > beginning (the already existing content regarding the new header is in B.3).
>
> Any objections against me committing the attached patch, to fix the
> example-preseed.txt file?
No objection. It is better then I patch against the create script.
But wait ...
> Index: en/appendix/preseed.xml
> ===================================================================
> --- en/appendix/preseed.xml (Revision 70688)
> +++ en/appendix/preseed.xml (Arbeitskopie)
> @@ -762,6 +762,16 @@
>
> </para><para>
>
> +For the &d-i; to be able to automatically detect preseed files, such files
> +need to start with the <quote>#_preseed_V1</quote> header:
> +
> +<informalexample role="example"><screen>
> +# Header for installer preseed files, for automatical detection of these files:
> +#_preseed_V1
> +</screen></informalexample>
> +
> +</para><para>
> +
> Details on how the different Debian Installer components actually work can be
> found in <xref linkend="module-details"/>.
>
It should
+<informalexample role="example"><screen>
+#_preseed_V1
+# Header for installer preseed files for automatical detection of preseedfile
+</screen></informalexample>
Because it gets
#_preseed_V1
at the very first line (the line with usual !#/bin/something )
@Holger: thanks for the retransmit
Groeten
Geert Stappers
--
Leven en laten leven
Reply to: