summaryrefslogtreecommitdiff
path: root/include/init.sh
AgeCommit message (Collapse)Author
10 dayssplit up include/Leah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysinit.sh: remove unnecessary directory checkLeah Rowe
literally the point of -p in mkdir is to, you know, check whether the directory already exists unclear thinking = unclear code Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysxbmk: remove xbmkdir()Leah Rowe
pointless function. literally pointless. it is literally the most pointless function ever written in the history of functions. literally pointless in every possible way. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 dayslib.sh: always sanitize xbmkver before writingLeah Rowe
this removed the need to check it in xbmk_set_version as it calls update_xbmkver, which in turn performs the same check. this increases the general reliability and safety of xbmk when recording its own version after update. Signed-off-by: Leah Rowe <leah@libreboot.org>
11 daysmore cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmore cleanupLeah Rowe
this will be the last time, i promise Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysget.sh: simplify xbgetLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmk: export locales much earlierLeah Rowe
also simplify the way it works (eval and awk) Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysmore cleanupLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysinit.sh: universally set git commit/auth dateLeah Rowe
do it as an export. to avoid pollution elsewhere, do it inside a subshell. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysinit.sh: set git committer date as wellLeah Rowe
only the author date was being set before with this change, at least on my system, i now get the same commit ID and date each time on the following test: NOTE: . is lbmk (main work directory) NOTE: here, we are copying the current clone git clone . lbmktest cd lbmktest ./mk version rm -Rf .git ./mk version git log same output each time. we have thus eliminated timestamps as a variable. this is but a part of in a series of changes that will eventually lead to libreboot being built reproducibly. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysinit.sh: portable date on git-initLeah Rowe
don't even call the date util at all, to fix the portability issues. now we don't need GNU date anymore. git itself can just take an epoch, and it will do whatever it will do. yes. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysinit.sh: don't check PATH on startupLeah Rowe
even if i unset PATH before running lbmk, it is reinitialised because of the shebang. if no PATH exists, then it's either a broken system and you have bigger problems, or you have some weird system that uses something else. our job is not to fix the world. there was no scenario in which this check would even trigger an error or fallback, so just remove it. Signed-off-by: Leah Rowe <leah@libreboot.org>
12 daysxbmk: re-introduce condensed if statementsLeah Rowe
i've been careful to makely only use it on AND operations, not onse that use OR. a lot of blocks are not condensed, unlike previously when this design was used. i removed the condensed design because it made the code allegedly easier to read, but i found it harder to read and found the code looked dirty. this change makes it clean again, but i've done it in a way where the shorthand conditional statements are easy to understand for most people. this strikes a compromise; i would go further. Signed-off-by: Leah Rowe <leah@libreboot.org>
13 daysxbmk: reintroduce setvar as newvar (init only)Leah Rowe
use the simpler logic recently introduced, generalised but it only sets variables to empty. this is safer than the previous design, and brings the same reduction in sloccount overall since i wasn't doing anything other than emptying variables anyway, when it was used before. i didn't like the long list of variables inside files, so this makes everything more readable. Signed-off-by: Leah Rowe <leah@libreboot.org>
13 daysinit.sh: much more thorough locale initialisationLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
13 daysupdate lbmk headersLeah Rowe
i made several modificatinos to several files thus for in 2026, in the main part of the build system. i've added 2026 to the ones that i modified. Signed-off-by: Leah Rowe <leah@libreboot.org>
14 daysRevert "xbmk: general code cleanup"Leah Rowe
This reverts commit 1b65e8914c4ad1e140b573fa6bc8feead14542ad. NOTE: cleanup of xbmk_git_init was retained this "cleanup" actually made the code harder to read. Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-30xbmk: general code cleanupLeah Rowe
make the code much easier to read i also cleaned up the recent git identity check Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-28fix git identity handling in xbmk_git_initZoomm Deka
Signed-off-by: Zoomm Deka <zoomm10@gmail.com>
2026-07-27only disable git check for ./mk -b corebootLeah Rowe
the previous patch was half the battle. now that annoying person who complained on irc should be happy. someone complained about having to enter git name/email when just doing e.g. ./mk inject a valid complaint, but their attitude kinda stunk. oh well. this patch should satisfy them. Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-27make the bitch on irc happyLeah Rowe
some person complained about this. see diff. Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: add a throught-provoking TODOLeah Rowe
this will be revisited by October 2026 Leah. Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: add error check on mkdir in gentoo checkLeah Rowe
yes. i should have reviewed that patch properly. the code should meet lbmk standards now. Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: fix bad printf string in gentoo checkLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: add -p on mkdir command in gentoo checkLeah Rowe
probably redundant, but can't hurt Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: double-quote variables in gentoo checkLeah Rowe
yes. silly twit. Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: fix indentation in gentoo checkLeah Rowe
the submitted messed up indentation, yeah Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21init.sh: add --includes to git config checkLeah Rowe
just to be sure this now matches util/gitconfig/gitconfig.sh in coreboot Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-07-21Merge pull request 'Add Gentoo dependencies.' (#428) from ↵Leah Rowe
lordbaraa/lbmk:add-gentoo-dependencies into master Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/428
2026-07-21init.sh: Don't check global git configLeah Rowe
Some users have it in a file e.g. inside ~/.gitconfig Those users are currently forced to set git config globally by lbmk. We only need to check that a git config is set, regardless of scope, because coreboot needs it in parts of its build system when used on lbmk. This prevents a pointless error report for users who have their git config on such a scope. Thanks go to Hendrik Jäger for reporting this to me. Yes, thank you. Further context: https://lore.kernel.org/git/20260720113402.0dc16abe@frustcomp.hnjs.home.arpa/T/#u Signed-off-by: Leah Rowe <leah@libreboot.org>
2026-05-10Add portage package useBaraa Al-Masri
2026-03-29Revert "lbmk: use mkhtemp in libreboot's build system"Leah Rowe
This reverts commit e54862fcccca0325da8ae2879c1fa965267d3df0. nope. not ready yet. will fix it later.
2026-03-29lbmk: use mkhtemp in libreboot's build systemLeah Rowe
i added a fake -t option, which doesn't actually read optarg, so that -t usage can just override the normal template. mkhtemp isn't ready for distros yet, but it's ready for lbmk. i hacked the makefile to also copy the binary to mktemp, and i set PATH in lbmk so that this binary is used insttead of the one on your system. that way, upstream projects use it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-12-24init.sh: Explicitly export UTF-8 localeLeah Rowe
C.UTF-8, instead of just C. This fixes a build issue in GRUB on my Arch Linux test bench. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-16xbmk: sort global variables alphabeticallyLeah Rowe
also separate some of the special ones. this makes the variables easier to read/find. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-16get.sh: More reliable git remote cachingLeah Rowe
Don't do one repository for all remotes. Do one *clone* per remote. This also means that users no longer download information twice, in practice, because the backup repository will only be downloaded if the main one didn't work. Theoretically, this change is makes the process less efficient, but in practise it's more reliable now. We do now use --mirror on the git clone command for caches, but we already did git pull --all before. This just ensures that we absolutely have all local code. NOTE: The new code isn't used by default. To use it, you must do: export XBMK_CACHE_MIRROR="y" Otherwise, the old behaviour will continue to be used. This is because the new code, while correct, puts more strain on upstream servers (more code being downloaded), and can result in higher amounts of disk space being used. The old behaviour wasn't broken, so we'll also support that method. TODO: perhaps also have a check in place to re-use both caches, where available, regardless of XBMK_CACHE_MIRROR? Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-05init.sh: only create cache/ hereLeah Rowe
also, the check is -e, not -d, because we might be operating on a symlink. it's a bit hacky but this should work. the previous change (now reverted) broke re-use of the main cache/ in release work directories. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-05Revert "init.sh: explicitly create cache/"Leah Rowe
This reverts commit 23f98c29581e7d2cf5639e93fd89a6e64bec5635.
2025-10-05init.sh: explicitly create cache/Leah Rowe
otherwise, an error occurs when doing ./mk release Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: don't call mkdir. use xbmkdir (new function)Leah Rowe
xbmkdir checks if a directory exists, before running mkdir, and then still uses -p i was testing xbmk on arch linux today, and noticed that it errored out when a directory already exists. i'm mitigating against buggy or differently behaving mkdir implementations this way, by wrapping around it. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: use sbase sha512sum, not host sha512sumLeah Rowe
the --status flag seems to be a GNUism as stated in the previous commit, i import sbase suckless now, so as to have a consistent implementation of sha512sum. this ensures that its output is reliable, when i'm using the output of this command within backticks. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: rename cv variables, for clarityLeah Rowe
the new names are still a bit crap, but a bit better. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: remove even more eval statementsLeah Rowe
in one or two cases, the use of eval is retained, but modified so as to be safer. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: remove the setcfg functionLeah Rowe
this allows me to remove several eval calls, and the errors relating to configs can now show exactly which function they occured in, allowing for easier debugging. once again, eval should be used sparingly if at all. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: clean up a few err callsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-04xbmk: general cleanup: unroll condensed code linesLeah Rowe
i overlooked a number of lines, during previous cleanup Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-02init.sh: reduce the use of eval statementsLeah Rowe
also remove the unused _nogit variable Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-10-01init.sh: break up xbmk_set_envLeah Rowe
what this function does will differ wildly, depending on whether it's a child instance or a parent instance of xbmk. break up this function accordingly. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-09-26init.sh: remove comment in pybinLeah Rowe
the following checks on the path mitigates the lack of error handling in the findpath command that sets pypath. this was all thought of when i initially wrote this code. it's perfectly fine. Signed-off-by: Leah Rowe <leah@libreboot.org>