| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
this will be the last time, i promise
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
also simplify the way it works (eval and awk)
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
do it as an export. to avoid pollution elsewhere,
do it inside a subshell.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|
|
make the code much easier to read
i also cleaned up the recent git identity check
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Zoomm Deka <zoomm10@gmail.com>
|
|
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>
|
|
some person complained about this. see diff.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
this will be revisited by October 2026 Leah.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
yes. i should have reviewed that patch properly.
the code should meet lbmk standards now.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
probably redundant, but can't hurt
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
yes. silly twit.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
the submitted messed up indentation, yeah
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
just to be sure
this now matches util/gitconfig/gitconfig.sh in coreboot
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
lordbaraa/lbmk:add-gentoo-dependencies into master
Reviewed-on: https://codeberg.org/libreboot/lbmk/pulls/428
|
|
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>
|
|
|
|
This reverts commit e54862fcccca0325da8ae2879c1fa965267d3df0.
nope. not ready yet. will fix it later.
|
|
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>
|
|
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>
|
|
also separate some of the special ones.
this makes the variables easier to read/find.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|
|
This reverts commit 23f98c29581e7d2cf5639e93fd89a6e64bec5635.
|
|
otherwise, an error occurs when doing ./mk release
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|
|
the new names are still a bit crap, but a bit better.
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
i overlooked a number of lines, during previous cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
also remove the unused _nogit variable
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
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>
|
|
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>
|