Commit Graph

34 Commits

Author SHA1 Message Date
Roland Clobus a5bd0ed8ce Architecture checking is not required any more
The qemu-static binary on the host runs the foreign binaries
2024-04-29 16:27:41 +00:00
Lyndon Brown 43b4f9cdf6 adjust action arg consumption order
did not properly consider all usage cases properly in deciding placement.

this captured `--usage` in `$PROGRAM --usage` as the action for instance.

Gbp-Dch: Ignore
2020-05-03 01:31:47 +01:00
Lyndon Brown b20979334c caching: output error on invalid action param
for bootstrap, the check is moved to the case statement for greater
robustness, and for consistency with other scripts.

Gbp-Dch: Ignore
2020-05-02 14:04:12 +01:00
Lyndon Brown 647dcb7aed bootstrap_cache: fix failure condition
during testing i encountered an unexpected error resulting from the
following condition:
 - bootstrap was cached
 - cache of bootstrap packages was empty (from playing with `lb clean`)
 - installer was not none|live

everything works fine up until the main installer script, which comes to
an abrupt halt with an error due to the missing cached bootstrap packages
that it wants to copy.

this situation is easy to unintentionally create, as i managed to do.

here we catch the failure condition, correcting for it.

this is done by checking for the missing cached packages when restoring
the bootstrap from the cache, and skipping this if the packages were
missing, thus forcing the bootstrap to be rebuilt. the packages should
then be found within the cache, allowing the installer stage to complete
successfully.

of course the bootstrap stage will only cache the packages if caching is
enabled, but if caching is disabled and installer enabled, the config
validation will catch that, reporting that problem.

Gbp-Dch: Short
2020-04-30 06:20:52 +01:00
Lyndon Brown 6def2c27be fix usage
Gbp-Dch: Ignore
2020-04-23 15:53:30 +02:00
Lyndon Brown 430c48640c move script param capture to before arg processing
makes them consistent with other similar script-specific param handling;
saves the arg processing from dealing with it.

Gbp-Dch: Short
2020-04-23 15:53:12 +02:00
Lyndon Brown 1716958a8d bootstrap_cache: validate action param 2020-04-01 18:03:20 +00:00
Lyndon Brown dadeec9d39 stagefiles: fix doc mistake
missed in final revision of fe9195b59c

Gbp-Dch: Ignore
2020-03-17 22:09:51 +00:00
Lyndon Brown fe9195b59c stagefiles: further robustify with auto filenames
as suggested by Raphaël

rather than have fixed stagefile filename strings at all in the scripts,
use `$(basename $0)` to use the name of the script (which is the same for
almost all cases anyway, and the stage files are supposed to be almost
exclusively unique per-script). we can thus simplify things by determining
the filename for most use cases within the functions themselves.

this does change the file used by a couple of scripts, affecting backwards
compatibility of executing live-build upon an existing partially or fully
completed build:
 - binary_grub-pc used "binary_grub"
 - chroot_includes used "includes.chroot"

care had to be taken for the following cases:
 - there are some cases like bootstrap_cache, source_debian and
   bootstrap_debootstrap which are dealing with more than one file, and/or
   otherwise a filename that is not specific to the script itself exactly,
   or should not be based upon its name.
 - some cases like chroot_cache, bootstrap_cache and
   chroot_install-packages need to append something to the end of the name
   depending upon which pass/action mode the script is being executed with.
 - furthermore in the bootstrap_cache case one of the filenames is used
   within the bootstrap_debootstrap and thus needs very careful handling
   to be certain that a change in filename of bootstrap_cache does not
   break bootstrap_debootstrap.

Gbp-Dch: Short
2020-03-17 18:57:02 +00:00
Lyndon Brown 04d9ee0211 stagefiles: simplify & robustify
- avoid all need to pass ".build/" path in stage file names into the
   functions
 - add a helper to remove a stage file (required to complete the above
   properly)
 - avoid duplicating filenames within scripts which makes them prone to
   mistakes (some instances of which I've actually encountered and had
   to fix)

Gbp-Dch: Short
2020-03-17 18:57:02 +00:00
Lyndon Brown a46985b08a fix comment typo
Gbp-Dch: Ignore
2020-03-13 16:19:59 +00:00
jnqnfe b27927724a locks: tidy lock acquisition
Combine the check+create done in each script. (The original functions
are still callable as before, but a new combined `Aquire_lockfile`
function can be called instead, as now used).

Note, a further simplification could be done in removing the passing of
the lock filename in as a parameter since every use of the functions is
with ".lock". The lock functions already have a fallback to ".build/lock"
though. Checking the history, the fallback used to be for a system wide
lock, which was then replaced with this config-tree specific one. As long
as that is not used implicitly by 3rd-party hooks then surely we are free
to change the fallback to ".lock" and further remove passing in a name as
a param...?

history:
db5d2b0dcd
0aa8289a37

Gbp-Dch: Short
Closes: #952918
2020-03-13 15:37:38 +00:00
Lyndon Brown 7a4a9f94b8 amend copyright & licensing blocks
Current versions of the project files are built upon versions published
and licensed by Daniel Baumann, but are modified copies of those files and
thus need to be marked as such per licensing requirements (afaik he did
not pass along ownership / licensing rights to anyone when he left the
project). We should also be careful to not be misrepresenting such
modified copies as being attributed to Daniel.

Adding a new copyright line referring to "The Debian Live team" should
suffice for this.

The authorship block in man pages has also similarly been updated.

Notes:
 - tweaked a copy of daniel copyright lines stating 2014 instead of 2015.
   both of these cases were in files that i had personally introduced in
   some of my past merged commits that moved some code around. i don't know
   why they stated 2014.
 - binary_onie was introduced in 2018, so that has a 2018 date instead of
   2016 unlike the rest.
 - 'efi-image' is a 3rd-party (Canonical Ltd) work that we bundle, but it
   has been modified by 674794a8f4 and
   36a3ba7634 so I similarly added a
   debian live copyright line.
 - 'grub-cpmodules' is similar. it was only changed by the indentation fix
   of 36a3ba7634 but modification is
   modification, and this does help cover any possible future changes that
   might be made.
2020-03-11 13:51:19 +00:00
Lyndon Brown d6096622f9 help/usage: remove pointless vars
build scripts never call Help() and so the empty HELP strings are pointless.
(when called with --help they call Man()).

Closes: #952859
Gbp-Dch: Short
2020-03-10 12:45:23 +00:00
jnqnfe b49abcc1a8 tidy script init (1/4) - arg and config processing
Partial fix for #952919

Gbp-Dch: Short
2020-03-10 12:39:37 +00:00
jnqnfe ed2d70bde1 simplify STAGE checks - use In_List
Closes: #952917
2020-03-10 00:02:43 +00:00
jnqnfe a67e01638f help/usage: fix overly complex script description handling
Closes: #952887
2020-03-05 20:48:49 +00:00
jnqnfe 769cf6e7b7 bootstrap: only output message where actually applicable
Gbp-Dch: Ignore
Closes: #952848
2020-03-05 11:10:45 +00:00
Daniel Baumann 242aef5d83 Updating year in copyright notices to 2015. 2015-01-04 20:05:44 +01:00
Daniel Baumann bc50443cf0 Moving partial python rewrite to separate branch, let's do it in the jessie+1 cycle rather than go with the current mixed code. 2014-08-28 00:59:28 +02:00
Daniel Baumann 5603355e1d Handling bootstrap cache inside the bootstrap stubs itself. 2013-11-04 14:02:40 +01:00
Daniel Baumann b77349b8ce Moving caching out of bootstrap_{c,}debootstrap to own helper for future unification with chroot caches helper. 2013-07-01 16:27:12 +02:00
Daniel Baumann 06dac65ee3 Removing bootstrap_cache, not needed anymore. 2013-05-06 14:50:07 +02:00
Daniel Baumann 59ce459f40 Removing all references to my old email address. 2013-05-06 14:50:06 +02:00
Daniel Baumann 04cec317cc Removing incomplete support for root-command. 2013-05-06 14:50:06 +02:00
Daniel Baumann 62d94a4454 Updating year in all copyright notices. 2013-05-06 14:50:03 +02:00
Daniel Baumann d1047e809a Adding debian version 4.0~a1-1. 2013-05-06 14:48:46 +02:00
Daniel Baumann a203b86fdd Updating year in all copyright notices. 2013-01-01 00:13:01 +01:00
Daniel Baumann a0a5bbfd1c Dropping lb prefix from live-build scripts, not needed anymore.
Previously, we needed to keep the lb_* prefix as the scripts
could also be executed standalone. Since the lb wrapper is
mandatory since squeeze, we can drop this now.
2012-08-27 16:05:49 +02:00
Daniel Baumann 9f865fce29 Prefixing helper scripts to make 'out of source' usage usable (Closes: #572455). 2011-03-09 19:17:22 +01:00
Daniel Baumann 83bc63f725 Updating internal variables from lh to lb scheme, should be the last piece to finish the live-helper to live-build rename. 2011-03-09 19:17:21 +01:00
Daniel Baumann 4d22ca948a Updating copyright headers for live-build. 2011-03-09 19:17:18 +01:00
Daniel Baumann c210b8ae44 Moving /usr/share/live-helper to /usr/share/live/build. 2011-03-09 19:17:17 +01:00
Daniel Baumann 74c3ad26d5 Rearranging helpers scripts in source tree. 2011-03-09 19:17:15 +01:00