[elbe-devel] [elbe-users] removing file in finetuning will upset archive validation
ew.foe at nassur.net
ew.foe at nassur.net
Tue Mar 24 16:11:44 CET 2020
Dear developers,
thank you for pointing out a number of options! I'm amazed!
My sort of summary:
1. change the "error" to "warning" (Thorben Hohn)
Well, I'm one of those who stated in the past: "the build should
fail fatally on the slightest error". So I cannot /really/ argue
for this one. I'm glad the build does fail sooner now.
2. add some syntactic sygar to the <archive> tag (Olivier Dion)
3. fetch the script from outside the build (Olivier Dion)
: 'curl/wget/scp' your script, execute it then delete it.
The network location and thus the script is not available either,
when rebuilding the whole thing in the future and elsewhere.
4. create the entire script in a <raw_cmd> tag (Olivier Dion)
5. create the entire script in a <file> tag (Thorben Hohn)
While this works, some funny replacements need to be done:
& -> &
< -> <
But removing the resulting script after calling it, does work.
Working without changes. Solving the "reproducible" bit.
6. using debathena style config-package-dev (John Ogness)
While not stictly a cure for the original question ... this does
solve the reproducible bit as well, since a corresponding source
package is provided and included into the source-DVD, I suppose.
I spend the morning trying this out. And it actually works as
advertised. Thank you for pushing me gently over the edge after
almost 20 years to actually create my first .deb package :-)
However, while writing the original post it dawned on me:
> One can argue that this should not be available, because rebuilding
> the image will be impossible later, if the script is not available.
So, at the moment I'm inclined to say "removing that file is actually
not such a brilliant idea". It should be part of the build
environment, such that the folks who receive my "bundle" are in a
position to recreate it.
And while I'm at it, maybe using the archive is not such a good idea
either. Allthough I package the content of the archive together with
the buildenv,source-DVD, image, licenses and a few more files.
On the other hand: the archive is the fastest way for me to move a few
files into the build; create an image, and extract part of that image
as a ramdisk-image for booting over bootp/tftp. So this means
7. do not remove the script
bring it in via the archive, but then leave it there. Still the
fastest option for me.
Thanks for your responses,
hope this is useful for others,
Erich.
--- example for file tag ---------------------------------------
<finetuning>
<file dst="/root/f.somescript.sh">
#!/bin/bash
# 2020-03-24 FOE/ew
set -euo pipefail
set -vx
cd /root
touch f.some-other-file
echo "& | <" >> f.some-other-file
echo '& | <' >> f.some-other-file
file=f.log
ls -l | tee ${file}
</file>
<command>chmod 0750 /root/f.somescript.sh</command>
<command>/root/f.somescript.sh</command>
<rm>/root/f.somescript.sh</rm>
</finetuning>
----------------------------------------------------------------
More information about the elbe-devel
mailing list