Commit graph

12 commits

Author SHA1 Message Date
Théo Lebrun
1a012d6b4b projects: add opensbi project
Add OpenSBI. Pretty standard C project and versioning is as we like it
to be. Did add a commit to interpret *.mk as part of the Makefile
family. Without that, CONFIG_* references aren't found.

https://github.com/riscv-software-src/opensbi
https://riscv.org/wp-content/uploads/2024/12/13.30-RISCV_OpenSBI_Deep_Dive_v5.pdf

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-10-15 11:56:58 +02:00
Théo Lebrun
bb7131fafb utils/index: avoid passing argument to test(1)
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
894920a4ff utils/index: force use of bash, we depend on it for ${@:5} syntax
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
ebb06050aa utils/index: remove /usr/local/elixir/update.py absolute path
Instead, start from $0 and move back up two times. So, something like:

    ./elixir/utils/index
    ./elixir/utils
    ./elixir
    ./elixir/update.py

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
7f9562a13f utils/index: remove git config --system --add safe.directory call
Stop writing a global file when initializing projects. This can cause
permission issues. We instead pass the option manually for each Git
process call using:

    git -c safe.directory=...

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
d5ffe69f05 utils/index: allow indexing project with remote URLs
Previously, to start an indexing from scratch:

    ./utils/index /srv/elixir-data musl https://git.musl-libc.org/git/musl

This is annoying as the script already has the remote URLs for all known
projects. Now, a call without remote will automatically add the remote
URLs matching the project name:

    ./utils/index /srv/elixir-data musl

This copies the behavior that was previously only implemented for --all.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
f17c56dc09 utils: deduplicate pack-repositories into index
utils/pack-repositories did the following on repos which have a gc.log
file existing (created when GC fails):

    git prune
    git gc --aggressive
    git prune
    git gc --aggressive

Here we:

 - Delete utils/pack-repositories; we don't want that detection to be
   done manually. Instead, we integrate the gc.log detection into
   utils/index that should be called often.

 - Create a hidden flag ($ELIXIR_GC) to allow manual trigger.

 - Replace the above sequence with a simpler `git gc --aggressive`.
   Let's trust Git.

 - Do a `git gc --auto` in the default case. This call is automatically
   done by porcelain commands but we don't run any so let's give Git an
   opportunity to cleanup from time to time (heuristic based).

 - Replace the gc.log detection from:
      find . -name gc.log
   To:
      test -e $data/$project/repo/gc.log
   It should be more reliable. With the first approach we risk projects
   that contain a file gc.log to trigger the detection on each run.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
dd4bc063b7 utils/index: add init.defaultBranch= config to git init call
Avoid the following Git warning:

hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint:   git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint:   git branch -m <name>

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
cd89e643fb utils: deduplicate utils/update-elixir-data into utils/index
Previously:

    LXR_PROJ_DIR=/srv/elixir-data ./utils/update-elixir-data

Now:

    ./utils/index /srv/elixir-data --all

The impact is slightly different: it also has the side-effect of
creating all known projects (Linux, U-Boot, etc.) if they didn't exist.
We have asked around and we are not aware of any other Elixir instance.
To keep the previous behavior, if people don't want to index all
supported projects:

    x=/srv/elixir-data
    find $x -mindepth 1 -maxdepth 1 -printf "%f\n | \
        xargs -L1 -r ./utils/index $x

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
359c76f720 utils/index: make it possible to update a specific project
Allow calling like:

    ./utils/index musl

That will do the same thing as before (fetch+index).
It works only if a previous call was made to add remotes.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
a76c95546d utils: deduplicate index-all-repositories into index
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
5420995681 utils: rename index-repository to index
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Renamed from utils/index-repository (Browse further)