Commit graph

65 commits

Author SHA1 Message Date
Théo Lebrun
8fb444d0cd projects: add iproute2 project
Add iproute2 project. Pretty standard C project and versioning is as we
like it to be. Almost nothing to be done.

https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/
https://en.wikipedia.org/wiki/Iproute2
https://wiki.linuxfoundation.org/networking/iproute2

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-10-15 11:58:07 +02:00
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
Franciszek Stachura
0dcf9d4197 query: Move CLI to utils/query.py
Call with python3 -m utils.query
2025-03-07 16:16:34 +01:00
Franciszek Stachura
6a071ff590 utils/speedtest: Make compatible with code changes 2025-03-07 16:16:34 +01: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
Théo Lebrun
9b0f4b7c31 utils/index-repository: refactor by creating project_index() function
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
c6ae14e5cd utils/index-repository: refactor by creating project_fetch() function
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
2250ef321b utils/index-repository: refactor by creating project_add_remote() function
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
d8ce24d244 utils/index-repository: refactor by creating project_init() function
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
a58e8b55bd utils/*: delete common.sh and inline $ELIXIR_THREADS fallback
$ELIXIR_THREADS fallback to nproc is straight forward code, much more
than the incantation to find the path to the Elixir install path.
Remove the incantation and replace by simple code:

    if test -z "$ELIXIR_THREADS"; then
        ELIXIR_THREADS="$(nproc)"
    fi

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
9d90b07201 utils/index-repository: support calling on existing repository
Make utils/index-repository idempotent, meaning we can call it multiple
times on the same repo and same remotes without issues.

Also allow adding new remotes to an existing repo.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
a34a6c692a utils/index-repository: add alias for git -C ...
Simplify the script. We never `cd` into the directory, we instead use
`git -C`. Avoid repeating it by creating a $git variable.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
a4b8cb4c02 utils/update-elixir-data: fetch in parallel
This is pretty useful as update-elixir-data gets called often to check
for new updates. Most often, there are none, so checking all remotes at
the same time is useful. This only applies to the kernel, that is the
only project using multiple (three) remotes.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
50ef3cd46d utils/index-repository: fetch in parallel
Previous sequence:
 - git clone ...               # first fetch
 - git remote add remote0 ...
 - git fetch remote0           # second fetch
 - git remote add remote1 ...
 - git fetch remote1           # third fetch

Now:
 - git init
 - git remote add remote0 ...
 - git remote add remote1 ...
 - git remote add remote2 ...
 - git fetch --all -j4         # all fetches at the same time

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2025-01-31 19:27:17 +01:00
Théo Lebrun
55921f1957 utils/index-repository: support multiple remote URLs
Linux is the only currently supported project for which we want three
remote URLs; see index-all-repositories for the list.

We could optimise the fetching by doing a single fetch call to all
remotes at the same time using --jobs (or fetch.parallel config).

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2024-10-02 10:48:03 +02:00
Théo Lebrun
06d503e3d9 utils/index-repository: if $ELIXIR_THREADS is not passed, use nproc
Follow behavior of utils/index-all-repositories.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2024-10-01 16:31:07 +02:00
Théo Lebrun
905e6ef657 utils/index-repository: pass $ELIXIR_THREADS to update.py
Follow behavior of utils/index-all-repositories.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2024-10-01 16:27:10 +02:00
Franciszek Stachura
ffe8d79c40 Simplify and refactor Dockerfile
* Remove repository indexing from Dockerfile
* Copy Elixir code from the context instead of cloning it from Github
* Move Dockerfile from docker/debian/Dockerfile to docker/Dockerfile
* Add docs for the new Dockerfile
* Add an utility script that allows easier repository configuration
* Add .dockerignore
* Use relative paths in Docker section in README
2024-08-05 14:54:03 +02:00
Franciszek Stachura
76b7a8a659 Remove query.default_query and all related references
* Pass process env vars to script.sh ran from Query
2024-02-07 10:31:58 +01:00
Michael Opdenacker
bc4be252df utils/index-all-repositories: add freebsd
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2024-01-11 09:56:08 +01:00
Michael Opdenacker
527ccae62f utils/index-all-repositories: add Xen project
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2024-01-10 13:46:23 +01:00
Michael Opdenacker
c156433520 utils: set ELIXIR_THREADS to number of CPUs
This way, you have a correct behaviour even without setting
ELIXIR_THREADS

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-05-05 15:17:27 +02:00
Michael Opdenacker
02ae89c917 utils: figure out Elixir install directory
No more need for ELIXIR_INSTALL variable

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-05-05 15:11:51 +02:00
Artem Chernyshev
ddfc4e8d23 replace iterating over hardcoded project names
Self explanatory. Replacing it with env variable
2023-04-07 12:21:11 +02:00
Michael Opdenacker
c3b8106f85 utils/index-all-repositories: index projects sequentially
Instead of all projects in parallel.
Each indexing task runs parallel jobs anyway.
This makes errors easier to spot and the whole process easier to stop.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-03-23 15:14:41 +01:00
Michael Opdenacker
b5b0d720fb utils/index-all-repositories: update project repositories
- Replace git:// by https://, more secure, more common
- Update URLs when necessary

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-03-23 15:05:08 +01:00
Michael Opdenacker
2fca2acfff utils/index-all-repositories: remove call to "filename"
No longer available on Ubuntu 22.04, and not necessary
anyway.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-03-23 12:01:16 +01:00
Ziyue Pan
a627571baf Style: fix redundant parentheses and typos 2023-03-23 09:54:14 +01:00
Michael Opdenacker
00f52df9dc dpdk: also index the "stable" release repository
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2022-07-29 12:47:42 +02:00
Soenke Huster
f0842f8688
Add BlueZ 2021-10-16 22:51:14 +02:00
Michael Opdenacker
fc517b659d Rename op-tee project
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2020-11-04 09:00:46 +01:00
Michael Walle
450b1d3a02 Add optee support
Fetch tags that look like a version number, i.e. "[0-9].".

Signed-off-by: Michael Walle <michael@walle.cc>
2020-11-03 14:58:25 +01:00
Michael Opdenacker
8eea9a20c4 utlis/index-all-repository: improve verbosity
- Allowing to know when we switch to the second indexing pass

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2020-06-19 11:40:41 +02:00
Maxime Chretien
d3a6027e55 utils/index-all-repositories: Add missing parameters
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-19 09:31:59 +02:00
Maxime Chretien
e2d68e3f4b Add Grub support
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-11 17:29:03 +02:00
Maxime Chretien
2e4d967cdb index-all-repositories : Fetch all tags
This is needed for old linux versions

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-08 08:46:18 +02:00
Michael Opdenacker
100ef94665
Merge pull request #152 from MaximeChretien/db-creation-speed
Update.py : Improve threading
2020-06-05 10:30:51 +02:00
Maxime Chretien
f6838a3889 README & scripts : Update for threads argument of update.py
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-03 10:07:09 +02:00
Maxime Chretien
5626c39546 Add support for old Linux versions
This add support for linux 0.01 to 2.6.12-rc1

Some versions are missing like 0.02 to 0.10 (not included) but it looks like
they have been deleted over time.

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-02 13:46:14 +02:00
Chris White
5e7cab18ca Added/updated copyright notices; whitespace fixes
No functional changes
2020-05-23 15:14:21 -04:00