Your message dated Sun, 23 Apr 2017 20:43:08 +0200
with message-id <[email protected]>
and subject line Re: Bug#859438: preseed header magic
has caused the Debian Bug report #859438,
regarding preseed header magic
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
859438: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859438
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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 <[email protected]>
To: Pali Rohár <[email protected]>, [email protected]
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
--- End Message ---
--- Begin Message ---
Hi,
Geert Stappers <[email protected]> wrote:
>
> Hi,
>
> On Sat, Apr 22, 2017 at 10:30:31PM +0200, Holger Wansing wrote:
> > Geert Stappers wrote:
> > > Holger Wansing <[email protected]> wrote:
> > > > 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.
> } } No objection. It is better then my patch against the create script.
> >
> > Ahh, I see.
> >
> > Geert: to be honest, I overlooked your changing in build.sh.
> > And now, double-checking that, it works. The header is there in
> > https://d-i.debian.org/manual/example-preseed.txt
> >
> > So I have to correct myself a bit:
> > The example-pressed.txt file would be ok so far, strictly spoken.
> >
> > So, the only argument to still change something now, would be:
> > The whole content of example-preseed.txt is generated from text examples
> > within the chapter B.4 of the installation-guide.
> > To be consistent with this, it would require to apply my proposed patch.
>
> Indeed
>
> > It would also give possibility to explain, what this header line is for.
>
> But below the top line. So the file starts with the actual header.
>
>
> > But: Applying my patch would make above's changing in build.sh useless, so
> > this would have to be reverted, right?
>
>
> Find attached a patch that does _both_ things.
When testing this patch I found, that my proposal for adding the header
to the example-preseed.txt cannot add the header in the _very_first_line_,
since the first line is then always
#### Contents of the preconfiguration file (for stretch)
So, if we need to have the header in the very first line, then Geert's
way of adding the header to example-preseed.txt is the better one.
Say: we can leave it as it's now.
Thus closing this bug.
--
============================================================
Created with Sylpheed 3.5.0 under
D E B I A N L I N U X 8 . 0 " J E S S I E " .
Registered Linux User #311290 - https://linuxcounter.net/
============================================================
--- End Message ---