| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
If a path is not supplied to project_sources_patch_recursive() or
git_project_patch_recursive() then it will attempt to apply the set of
patches located at $PROJECTS/$project/$PATCHES (the top-level patches
directory) twice. Checking to see if $path is of non-zero length
avoids this issue.
|
| |
|
|
|
|
|
|
| |
If cd fails, nothing else should be done. This is to prevent a
potentially destructive action from being performed on the Libreboot
repository (if the script is executed from the same directory).
|
|
|
|
|
| |
Having a specific function for checking whether a patch would apply
isn't that useful if git_am and git_apply call it internally anyway.
|
|
|
|
|
|
| |
git_diff_check() was added for future use since it's complementary to
git_diff_staged_check(). It could be used to check for a dirty
worktree, for example.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recursive call in git_project_patch_recursive() is now performed
last so that if a patching attempt fails, the calling functions won't
attempt to apply more patches. The consequence of this change is that
patches are applied in (nearly) opposite order from before.
git_project_prepare_patch() is now called after
git_project_prepare_blobs() so that if patching fails and the user
chooses to perform additional project actions anyway, such as
building, the project is already deblobbed and not a risk to their
freedom. I had mistakenly reordered these function calls in a prior
commit.
|
|
|
|
|
| |
LC_ALL is already set to "C.UTF-8" and exported if libfaketime path is
given in libreboot.conf
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previous patches made certain tests unnecessary due to the setting of
$BRANCH_PREFIX in $branch. By adding the branch prefix right before
it's actually needed we can retain the usefulness of those
conditional tests.
|
|
|
|
|
|
|
|
|
| |
The subshell, changing directory, and checking out was unecessary
considering all of these are done within the functions called by
git_patch()
git_am() was added in order to mirror the same wrapper style as used
by git_apply() and git_commit()
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies git_project_patch_recursive() and provides a unified
method for patching, regardless of the patch format (mailbox or
diff).
Logic is included for dealing with patching failures due to
git_apply_check() not being enough to catch certain edge cases, such
as 'git apply --check' returning 0 but a subsequent 'git apply'
failing.
|
|
|
|
|
|
|
|
|
|
| |
Since changes from an applied diff need to be added to the index and
committed (vs. mailbox files with the git_patch function) new
functions were necessary to account for this difference.
This also fixes a bug where diffs were applied but not committed,
at minimum dirtying the work tree and potentially causing problems for
any later patches.
|
|
|
|
|
|
| |
The previous function, diff_patch_file, was more error-prone and
fragile and did not take into consideration patching of more than one
file at a time(!).
|
|
|
|
|
|
|
|
|
| |
Patching before removing blobs is cleaner since patches are applied
against a freshly created and checked out branch at the specified
revision. Applying patches first also seems to reduce the likelihood
of failed patching attempts due to a nebulous error about files not
matching the git index (but doesn't eliminate it). More debugging
required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the only way patching would work is if for every target
there existed a corresponding directory under $project/$PATCHES, e.g:
"./libreboot update coreboot x200 8MiB corebootfb grub"
would require the "grub" directory and its parents:
"projects/coreboot/patches/x200/8MiB/corebootfb/grub"
Now you only need target-specific patch directories if you need them;
I believe this was the intended behavior.
Superfluous quotes were removed for readability.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a bug where only $project was used as the branch name due to
some faulty logic which checked for the existence of a revision file
before setting the variables "prepare_branch" and "prepare_path".
The bug in this case was that prepare_branch would be set to the value
of $branch in only the first iteration of the for loop since in almost
all cases there is only one revision file that exists for a given
project, regardless of the arguments provided. Explained another way,
in order for the proper branch name to be used a revision file would
have had to exist in every target directory.
This was an issue because only one branch was ever operated on (named
$project), meaning if actions were performed on many targets then only
the last to run would be represented in the project's
repository--making tracking down some bugs a bit harder.
With this fixed we now create a branch for every possible project
or tool configuration and leaves us with a log for each.
|
|
|
|
|
|
|
| |
This is a slight mitigation against branch name collisions. More
robust handling should be added in the future but this is simple
enough and provides some clear indication which branches have been
created by the build system.
|
|
|
|
|
| |
A patch failing to apply shouldn't leave the repository in such a
state where manual intervention is necessary to reset it.
|
|
|
|
|
|
|
|
|
| |
This is likely one of the very last changes necessary to make the
Libreboot build system more cohesive in appearance.
Hopefully from this point forward it won't be as readily apparent as
to who wrote which parts of the build system (i.e. won't look like a
patchwork quilt any longer).
|
|
|
|
|
|
|
|
|
|
|
|
| |
As an example, do this:
[[ -n $revision ]]
instead of this:
! [[ -z $revision ]]
Makes the code easier to read.
|
|
|
|
|
|
|
|
|
|
| |
There's no benefit to using the POSIX-style '[' test builtin
considering its '-a' and '-o' operators are unused in the Libreboot
build system. Plus, '[[' is safer with respect to any containing file
redirections (for example).
Prior, both '[' and '[[' were used throughout the codebase--a
disparity in usage which this change aims to eliminate.
|
|
|
|
|
|
| |
* libs/git
ditto
|
|
|
|
|
|
|
| |
Replace brace expansions with extended globs in a couple of places where
brace expansions were erroneously used in place of actual pattern
matching. This avoids potential errors concerning nonexisting files
when patching sources.
|
|
|
|
|
| |
Will help facilitate sane code when handling: archive formats,
checksum file extensions, signature formats.
|
|
|
|
|
| |
This is mainly useful for being able to run these scripts on BSDs.
And for users who use a Bash not installed to /bin.
|
|
|
|
|
| |
This reverts part of pull request #217 which called the 'env'
binary for each printf invocation.
|
|
|
|
|
|
|
|
|
| |
All printf calls should now be properly formatted; prior, the
format specifier string was erroneously used for both the format
specifiers and the string to be printed. 'env' is now used to
locate the printf binary so as to avoid potentially using a shell
builtin. Lastly, all calls to 'echo' within the new build system
have been replaced with printf for consistency/portability purposes.
|
|
|
|
|
|
|
|
| |
Filenames listed in DOTTARFILES are now NUL terminated so that
any with strange characters, such as a newline, do not negatively
affect archive creation. DOTRNDSEED file which stores the random seed
to be used by GCC during compilation is now included in the list of
files to be archived. Cleaned up functions related to archive creation.
|
|
|
|
|
|
|
|
|
| |
Modified the function git_project_patch_recursive (in libs/git) to
enable patching with diff files, which uses the new function
diff_patch_file located in libs/common. A generic action script for
bucts is in projects/bucts/. Install/revision/target files are in
projects/bucts/configs/. bucts' merge into the new build system should
be nearly, if not already, complete.
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
This is the initial import of the Paper build system into Libreboot.
It was written as a flexible and painless replacement for the Libreboot
build system, allowing to support many different configurations.
It currently only supports the following CrOS devices:
* Chromebook 13 CB5-311 (nyan big)
* Chromebook 14 (nyan blaze)
* Chromebook 11 (HiSense) (veyron jerry)
* Chromebit CS10 (veyron mickey)
* Chromebook Flip C100PA (veyron minnie)
* Chromebook C201PA (veyron speedy)
The build system also supports building various tools and provides
various scripts to ease the installation on CrOS devices.
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|