summaryrefslogtreecommitdiff
path: root/.gitcheck
AgeCommit message (Collapse)Author
2023-08-27.gitcheck: re-write entirely. force global config.Leah Rowe
the way the old script worked was extremely hacky it's cleaner just to make the user configure git i haven't used anything from the old .gitcheck script, which is now deleted. i completely re-wrote this, in a much simpler way. this is less maintenance now, when things change in the upstream projects. coreboot makes heavy use of git within its build system Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-26much, much stricter, more verbose error handlingLeah Rowe
lbmk is much more likely to crash now, in error conditions, which is a boon for further auditing. also: in "fetch", remove the downloaded program if fail() was called. this would also be done for gnulib, when downloading grub, but done in such a way that gnulib goes first. where calls to err write "ERROR" in the string, they no longer say "ERROR" because the "err" function itself now does that automatically. also: listmodes/listoptions (in "lbmk") now reports an error if no scripts and/or directories are found. also: where a warning is given, but not an error, i've gone through in some places and redirected the output to stderr, not stdout as part of error checks: running anything as root, except for the "./build dependencies *" commands, is no longer permitted and lbmk will throw an error mrc downloads: debugfs output no longer redirected to /dev/null, and stderr no longer redirected to stdout. everything is verbose. certain non-error states are also more verbose. for example, patch_rom in blobs/inject will now state when injection succeeds certain actual errors(bugs) were fixed: for example, build/release/roms now correctly prepares the blobs hash files for a given target, containing only the files and checksums in the list. Previously, a printf message was included. Now, with this new code: blobutil/inject rightly verifies hashes. doing all of this in one giant patch is cleaner than 100 patches changing each file. even this is yet part of a much larger audit going on in the Libreboot project. Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24.gitcheck: continue if no .git (don't break)Leah Rowe
the user may have re-downloaded a coreboot tree, in a release. this is supported. therefore, some may have .git, and some will not Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24.gitcheck: must stricter error handlingLeah Rowe
we also run it in releases, so to compensate: it now checks for .git/, but only in project directories, not the main lbmk directory of the git repository or a release. this is because in a release, it's possible that the user may still delete coreboot/ directories and re-download coreboot trees this is not intended, but we must not assume that users use libreboot the way it's intended! "much stricter" because there was previously none, intentionally, due to the above fact. the checking of .git/ should mitigate this (the script will exit with zero status if it isn't there) Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24.gitcheck: only redirect stdout to /dev/nullLeah Rowe
do not redirect stderr this will help us for debugging purposes Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18use env in shell scriptsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: exit 1 if unsupported argument givenLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: use subshells where appropriateLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: re-add redirection to /dev/nullLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck clean: clean coreboot directories tooLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: reduce indentation level for loopLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: move logic out of main()Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: *actually* check coreboot directoriesLeah Rowe
2023-05-18.gitcheck: improved coding styleLeah Rowe
main() on top top-down order of logic Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: check argv when running gitcheck-cleanLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-05-18.gitcheck: actually *run* gitcheck-cleanLeah Rowe
Run() is called, but without argument. This patch fixes that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2022-12-27Do not rely on bashisms and behaviour undefined by the POSIX specification.Ferass 'Vitali64' EL HAFIDI
By making lbmk fully POSIX-compliant, it will be easier to port lbmk to other systems implementing POSIX such as Alpine Linux and FreeBSD. Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
2022-11-20make gitcheck verify coreboot subdirshmalebx9
2022-11-15bonerfixLeah Rowe
2022-03-16added workaround for git credentialsshmalebx9
this is cherry-picked from osbmk. the cherry-pick was performed by i, leah rowe. this is adapted from shmalebx's patch there, in osboot specifically, these patches from osbmk are being imported: 327a39ef058d5385bf8c1a1b09bac8db6a51b016 5139ad4be4df1835ce154f39161eef4f7c31ee1a