summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-23Fix version computing when LIVE_BUILD is setRaphaël Hertzog
It used to rely on the $LIVE_BUILD/VERSION file which is now gone. Instead we now rely on the debian/changelog file just like we do in the Makefile.
2020-04-23Drop the epoch in /usr/share/live/build/VERSIONRaphaël Hertzog
2020-04-23Use descriptive parameter names for Usage()Raphaël Hertzog
2020-04-23usage: take exit code as paramLyndon Brown
thus it can correctly indicate success/fail status instead of always indicating failure. when a user asks for usage with -u|--usage then we should exit in success mode rather than failure as when usage in printed in response to incorrect usage. Gbp-Dch: Short
2020-04-23frontend: properly handle option processingLyndon Brown
this means that the usage goes from: lb {-h|--help|-u|--usage|-v|--version} lb COMMAND [OPTIONS] to: lb {-h|--help|-u|--usage|-v|--version} lb [FRONTEND_OPTIONS] COMMAND [COMMAND_OPTIONS] though it is probably not worth is to update the description in the manpages...? hmm... so for instance this matters for color control with --color|--no-color (you already had full control via environment vars). previously you could do `lb COMMAND --no-color` to turn off colour, only to find that output at the frontend level was still coloured (the option is processed at the command context level, not the frontend), so you might try to instead use `lb --no-color COMMAND`, only to find that this was not supported. Well now it is, and used at the frontend level will fully control colour output (after the command is processed anyway). the full set of common options are thus available (except --force) at the frontend level, and thus for instance all Echo_*() helpers used in the frontend will work correctly after args are processed. furthermore usage like `lb --color --help` will actually work. (not that color is used there, but this previously would have failed with the frontend treating the `--color` argument as the command; that's the point!) Gbp-Dch: Short
2020-04-23frontend: change "no such script" to "unknown command"Lyndon Brown
as far as the user is concerned, 'foo' in `lb foo` is a command; they do not know or need to know that the commands also correspond to actual scripts. Gbp-Dch: Short
2020-04-23frontend: reorder checksLyndon Brown
perform the check that the script exists before sorting out the environment to give it, or checking root privileges. Gbp-Dch: Short
2020-04-23rename LB_BOOTSTRAP_QEMU_ARCHITECTURES to LB_BOOTSTRAP_QEMU_ARCHITECTURELyndon Brown
2020-04-23Keep LB_ARCHITECTURES environment variable for backwards compatibilityRaphaël Hertzog
Custom hook scripts may use the variable. And conditional package lists can also rely on this variable.
2020-04-23rename LB_ARCHITECTURES to LB_ARCHITECTURELyndon Brown
this was previously not done in 8b109ffb96282a6dd1aa5d61aa935bcba69c56f1 to keep the renaming simple, but leaving the variable plural is a cause for confusion. since this property is stored in the INI style config/build config file rather than a shell script based one, at the property there is already singular, there was no need for a backwards compatibility hack. Gbp-Dch: Short
2020-04-23fix usageLyndon Brown
Gbp-Dch: Ignore
2020-04-23move script param capture to before arg processingLyndon Brown
makes them consistent with other similar script-specific param handling; saves the arg processing from dealing with it. Gbp-Dch: Short
2020-04-23config: move control of apt colourLyndon Brown
being done in Prepare_config() meant that it would get saved into the config stored on disk which is not what was intended. being saved on disk is not a big problem, since the injection of the dynamically determined option is always done on top of the value read from the saved config anyway, so you'd always end up with two copies of the option given to apt, the first being from the saved config, the second being the more correct dynamically determined one, overriding the first. so there is no functional change here, just better achieving what was intended. Gbp-Dch: Ignore
2020-04-23config: fix mistake in mirror url tidyingLyndon Brown
Gbp-Dch: Ignore
2020-04-23chroot: make var localLyndon Brown
Gbp-Dch: Short
2020-04-23firmware: robustify and simplify archive area checkingLyndon Brown
2020-04-23config: obsolete old --tasksel optionLyndon Brown
note that the bit of code removed from source_debian relies upon a variable LB_TASKS which itself is an old leftover artefact from before v4.0. Gbp-Dch: Short
2020-04-23manpage: fix typo and simplify --net-tarball option descriptionLyndon Brown
2020-04-23config: obsolete --net-root-pathRaphaël Hertzog
2020-04-23config: obsolete --net-root-* options (except one)Lyndon Brown
--net-root-path probably needs to go too, but it is being used for something i don't fully understand currently. Gbp-Dch: Short
2020-04-23config: obsolete unused --net-cow-* optionsLyndon Brown
2020-04-23config: obsolete unused --isohybrid-options optionLyndon Brown
2020-04-23config: apt-get should probably be an allowed and documented --apt valueLyndon Brown
since everywhere where 'apt' is a permitted value, 'apt-get' is also, it just wasn't listed in the option's documentation and thus was also not listed in the new validation check. Gbp-Dch: Short
2020-04-23config: fix broken backwards compatibility hackLyndon Brown
80aa5ab61100b6b11ae47984bab9a2eb988074f5 implemented a hack to handle replacement of LB_LINUX_FLAVOURS with LB_LINUX_FLAVOURS_WITH_ARCH in config files, but implemented it in the wrong place. adding a conditional conversion within the config file meant that the old value would only be read from **new** config files that are created obviously without it, including re-saved configs if `lb config` were re-run with additional options (not recommended). any existing value in an existing config file would actually be ignored. the right place to read the old value was in the Set_defaults() function (since renamed). a second issue also existed with the hack, it failed to excape the `$` and thus printed the existing value of $LB_LINUX_FLAVOURS into the conditional check being constructed in the config file, instead of printing the name of the variable. the check embedded into the config file thus became this on an amd64 machine: ``` if [ -n "amd64" ] then LB_LINUX_FLAVOURS_WITH_ARCH="amd64" fi ``` which is clearly not what was intended. Gbp-Dch: Short
2020-04-23config: stop writing 'default: <foo>' lines to config filesLyndon Brown
while helpful for users to know the defaults, the values printed as the supposed defaults for most are actually the same values as being configured, or in some cases a piece of text "autodetected or empty", and thus the information is completely wrong and actually unhelpful since it misinforms the user. fixing this to give the real defaults is very much non-trivial. as a workaround users wanting to know the default for an option can always: a. use `lb config` wit no options (or auto) in a clean directory and thus get a config with all defaults. b. look at the live-build code. if they just want to reset an option, they can also just comment it out. Gbp-Dch: Short Closes: #904614
2020-04-23installer: rework validation check for installer typeLyndon Brown
(and move the wget options setting down where it should be while at it) the value of LB_DEBIAN_INSTALLER is now properly checked in the main validation routine, so we can just directly exit here as a simple safety check should validation be bypassed. Gbp-Dch: Short
2020-04-23config: add missing deprecation warningLyndon Brown
Gbp-Dch: Ignore
2020-04-23config: minor reorganisationLyndon Brown
Gbp-Dch: Ignore
2020-04-23config: strip unhelpful commentsLyndon Brown
Gbp-Dch: Ignore
2020-04-23config: expand validation coverageLyndon Brown
to cover checking available value choices Gbp-Dch: Short
2020-04-23config: reorganise validation checksLyndon Brown
splitting into two parts will make things much tidier Gbp-Dch: Short
2020-04-23tidy up grub bootloader compatibility checkingLyndon Brown
- add a validation check where an error will be printed - replace the check done in the grub scripts with one that simple exits if executed bypassing the validation check Gbp-Dch: Short
2020-04-23config: tidy validationLyndon Brown
2020-04-23config: merge defaults.sh and configuration.sh, part 2Lyndon Brown
...and second we then change the filename Gbp-Dch: Short
2020-04-23config: merge defaults.sh and configuration.sh, part 1Lyndon Brown
the stuff in defaults.sh is only partially to do with setting default config values, it also does other prep work like centralised comma separated value to space separated conversion, and validation. this is split into two parts to keep the diff simple, first we move the two small functions from configuration.sh into default.sh... Gbp-Dch: Short
2020-04-23config: better handle error conditionLyndon Brown
Gbp-Dch: Ignore
2020-04-23config: reorganise the option case blockLyndon Brown
move away from the somewhat config file grouping based organisation to an alphabetised list, after grouping into script-specific; general; build-specific and other. the config file based organisation was a bad choice, making it hard to find the right place to insert options for instance. Gbp-Dch: Short
2020-04-23config: organise getopt longoption setLyndon Brown
alphabetised per line lists, broken up into multiple lines where exceeding 80 chars. Gbp-Dch: Short
2020-04-23config: remove spurious secondary validation checkLyndon Brown
it is already done just before writing the config to disk; this check is happening just after doing so and is thus pointless. Gbp-Dch: Short
2020-04-23config: add --validate optionLyndon Brown
running `lb config --validate` causes the script to stop after running the validation check on the config compiled at that point, prior to writing the config to disk. this gives users the ability to check the validity of a config without modifying or rewriting the saved config. note that if users provide new config options alongside --validate, these are taken into account in the check performed. the 'check complete' message will not be seen if an error is reported by the check function, while it will be seen if only warnings are given, but it would require a redesign of the validation check function to make any improvement in that area, and it's perhaps not worth it. Gbp-Dch: Short
2020-04-23config: rename Set_config_defaults() to Prepare_config()Lyndon Brown
it mostly applies defaults where a value does not exist, but does more in some cases. the new name better reflects its usage and functionality. Gbp-Dch: Short
2020-04-23config: rename Check_config_defaults() to Validate_config()Lyndon Brown
this is used after applying user settings on top of the defaults, so is not specific to checking defaults; it's a validation checker. Gbp-Dch: Short
2020-04-23config: move defaults set in wrong functionLyndon Brown
Gbp-Dch: Ignore
2020-04-23--binary-images can support only a single typeLyndon Brown
whilst some parts of the codebase were set up to work with multiple types specified, others did not work with it and would not necessarily be easy to adjust. this thus makes some tweaks to adjust things accordingly. - option renamed to singular form (maintaining backwards compatibility) - a validation check has been added - unnecessary glob style type references fixed - checks with In_list changed to a direct singular comparison - typo of type "netboot" written as just "net" fixed (though unreachable so of no consequence; really the code could be removed but it's trivial) Gbp-Dch: Short
2020-04-23manpages: fix typoLyndon Brown
Closes: #926238
2020-04-23manpages: fix typoLyndon Brown
bad escape, '-\' should have been '\-' resulted in test showing "--mirror-tstrap" instead of "--mirror-bootstrap" Gbp-Dch: Ignore
2020-04-23manpages: remove unhelpful and largely obsolete fixme noticesLyndon Brown
2020-04-23fix incorrect handling of -c|--conffileLyndon Brown
this option actually only has an impact when used for `lb config`; it thus was incorrectly accepted and captured by Arguments() and the documentation was wrong. going back through git history, this has been incorrect since the v0.99 days. also, reorganised the list alphabetically (no-color was inserted in the wrong place). Gbp-Dch: Short
2020-04-23manpages: fixup synopsisLyndon Brown
live-build page: list of individual commands outdated (color options not added); incorrect (conffile is `lb config` specific as to be addressed otherwise separately); is unnecessary here; and the synopsis suggests usage without a command (e.g. `lb --help` is wrong when it is not). lb: consistensy fix in formatting. all: placeholders should be in capitals for consistency; "OPTIONS" is better the "live-build options" as a placeholder. config: unlike the others where "live-build options" is replaced with "OPTIONS", it makes more sense to specifically list the info (help; usage; version} options, since below the full list of other options including other generic options are given. Gbp-Dch: Short
2020-04-23manpages: fix mistakeLyndon Brown
Gbp-Dch: Ignore