Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
e3e57ff
bootstraping alidist by default if not other repo specified
pbuncic May 15, 2026
227dd44
Removing podman warning message
pbuncic May 15, 2026
4ada7bb
Rearanging and improving docs, removing obsolete info
pbuncic May 15, 2026
acd493a
feat: per-default append_arch + fix two test failures
pbuncic May 16, 2026
5eefade
fix: extract source archives after download in checkout_sources()
pbuncic May 16, 2026
b8bf115
workarea: auto-apply patches declared in patches: after source prepar…
pbuncic May 20, 2026
13b5132
workarea: add --batch to patch invocation to prevent interactive reve…
pbuncic May 20, 2026
a16ab96
Fixing patch level
pbuncic May 22, 2026
ff36edf
Fix for patch file extraction
pbuncic May 22, 2026
f287bfe
workarea: re-extract sources when patches are pending but not yet app…
pbuncic May 23, 2026
19b6075
workarea: fix _archive_prefix_depth off-by-one for single-file archives
pbuncic May 23, 2026
514d33e
workarea: support %(name)s and %(version)s substitution in source URLs
pbuncic May 23, 2026
d9c9e35
bits: add version-pin syntax to requires lists
pbuncic May 23, 2026
fd2933e
bits: add %(name)s alias to resolve_spec_data all_vars
pbuncic May 23, 2026
ae739ca
Apply %(name),%(version) expansion for patches as well
pbuncic May 23, 2026
c44462c
bits: replace raw crashes with clean error messages
pbuncic May 23, 2026
9379f5b
Show "==> Patching PKG@VERSION" progress; intercept download OSError
pbuncic May 23, 2026
31236dd
Fix stale extraction sentinel causing wrong --strip-components on retry
pbuncic May 23, 2026
5096784
Fixing recipes
pbuncic May 23, 2026
a96dd24
Fixing recipes
pbuncic May 23, 2026
c1c64fa
Fixing workarea
pbuncic May 23, 2026
35f7a42
Fixing workarea
pbuncic May 23, 2026
a6bec5a
Preventing accidental delete
pbuncic May 26, 2026
a44e278
PKG_CONFIG_PATH is added generically here so that the build-time envi…
pbuncic May 30, 2026
f4678f9
builders: overlap source downloads with compilation
pbuncic May 30, 2026
db8dfa5
sandbox: don't use or probe podman for local Linux builds
pbuncic May 30, 2026
d1b7b17
workarea: re-extract patched sources when the patch set changes
May 31, 2026
d4026a8
tests: fix ApplyPatchesTest to mock subprocess.run (matches _apply_pa…
May 31, 2026
1da5b00
workarea: also re-extract when a previous patch run left a dirty tree
May 31, 2026
41e91e3
/tmp/b1
pbuncic May 31, 2026
bb2fe2e
feat(build): bound build parallelism and load under --builders
May 31, 2026
bf3522e
feat(build): optional --build-nice priority ladder for concurrent bui…
May 31, 2026
7a06908
docs: document --build-nice and builder-aware $JOBS division
May 31, 2026
55c6f71
feat(recipes): defaults-profile variables in recipe bodies (soft expa…
May 31, 2026
3fca159
feat(manifest): record patches and resolved variables (schema v3)
May 31, 2026
26245c8
fix(build): propagate real recipe exit code instead of masking to 1
pbuncic Jun 1, 2026
a3470eb
feat(build): show error excerpt in build-failure message
pbuncic Jun 1, 2026
9052060
docs(cookbook): document recipe error-handling pitfalls
pbuncic Jun 1, 2026
d1562e1
docs: document the three version-pinning mechanisms with examples
pbuncic Jun 1, 2026
8f1e1b1
fix(scheduler): never hang at end of build when a task raises SystemExit
pbuncic Jun 1, 2026
67bc572
feat(build-nice): default-on ladder + straggler-renice watchdog
pbuncic Jun 1, 2026
f18f2e5
feat(build-nice): boost straggler docker build containers too
pbuncic Jun 1, 2026
2b6df02
feat(build-nice): boost docker stragglers by renicing the compile ins…
pbuncic Jun 1, 2026
972d476
feat(build-nice): disable docker renicing gracefully when `ps` is mis…
pbuncic Jun 1, 2026
ec755bc
fix(repo_provider): use Optional[str] for Python 3.8/3.9 compatibility
pbuncic Jun 1, 2026
6c9a2cc
fix(args): --build-nice/--no-build-nice without BooleanOptionalAction…
pbuncic Jun 1, 2026
bcd1ab3
fix(download): never block forever on a download sentinel (test-suite…
pbuncic Jun 1, 2026
bbd7063
fix(workarea): fail cleanly on a corrupt/wrong-format source archive
pbuncic Jun 1, 2026
edaa1e6
feat(build): surface cmake find-failure detail in error excerpt
pbuncic Jun 1, 2026
f8e9dfd
fix(manifest,log): concurrency-safe manifest save; log formatter %-crash
pbuncic Jun 1, 2026
8f166a0
fix(utilities): make ':defaults=' require matcher work with the defau…
pbuncic Jun 1, 2026
31178ba
bits: support (?VAR) variable-conditional requires
pbuncic Jun 1, 2026
15c224c
bits: only extract the source archives downloaded for this spec
pbuncic Jun 1, 2026
9811ca2
bits: make measurement-driven --builders scheduling opt-in (--auto-re…
pbuncic Jun 2, 2026
ad845c2
bits: make --build-nice opt-in (default off)
pbuncic Jun 2, 2026
63b0d79
Revert 'make --build-nice opt-in (default off)'
pbuncic Jun 2, 2026
671fca6
bits: write a concise failure summary for --builders runs
pbuncic Jun 2, 2026
228933a
bits: end-of-run pointer to summary, full log, and per-package logs
pbuncic Jun 2, 2026
a6ffdfd
bits: opt-out for automatic patch application (recipe / CLI / defaults)
pbuncic Jun 3, 2026
8561139
defaults: support 'name = value' string overrides (was silently dropped)
pbuncic Jun 3, 2026
6c4fc3d
patches/requires: conditional matchers — version<op>, && / ||
pbuncic Jun 3, 2026
a412aa4
defaults: deep-merge overrides across a::b::c chain
pbuncic Jun 3, 2026
8d5a7ce
architecture: configurable layout template + content-based matching
pbuncic Jun 3, 2026
6fd5b6c
append_arch: append verbatim, no assumed separator
pbuncic Jun 3, 2026
cbafdf0
build: rebuild devel package when its revision dir is missing
pbuncic Jun 3, 2026
6319d82
build: show install root in failure summary; monitor resources by def…
pbuncic Jun 4, 2026
3d2a034
tests: make resource-monitoring tests independent of psutil
pbuncic Jun 4, 2026
ffff335
build: show the main package install root in the success summary
pbuncic Jun 4, 2026
b6c778a
build: add --flavour for build-wide conditional variables
pbuncic Jun 4, 2026
4ca9dae
stats: add `bits stats` resource report subcommand
pbuncic Jun 4, 2026
2eaff98
bits: route status/verify/publish to bitsBuild
pbuncic Jun 4, 2026
aa717dc
stats: add memory-per-thread column
pbuncic Jun 4, 2026
b86e30a
build: templated CVMFS layout (cvmfs_dir/install_dir/module_dir)
pbuncic Jun 4, 2026
2a61490
build: handle force_revision in storeHashes to ensure tarball compati…
akritkbehera Jun 4, 2026
bfe614b
doctor: add macOS Xcode CLT + XQuartz environment checks
pbuncic Jun 4, 2026
4c47ce7
sandbox: allow standard /dev character devices in macOS SBPL profile
pbuncic Jun 4, 2026
15a4d51
sandbox: allow canonical /private temp paths in macOS SBPL profile
pbuncic Jun 4, 2026
20ade5a
sandbox: global sandbox_network default (--sandbox-network / bits.rc)…
pbuncic Jun 4, 2026
674d233
sandbox: drive global sandbox_network default from defaults, not bits.rc
pbuncic Jun 4, 2026
24c929e
workarea: surface git's stderr when a reference-repo fetch fails
pbuncic Jun 4, 2026
7fa928f
args: make 'release' the implicit base of the defaults chain
pbuncic Jun 4, 2026
d68c04d
memory: CPU oversubscribe factor for the per-builder -j share
pbuncic Jun 5, 2026
d79882a
defaults: group build-host policy under a 'system:' entry
pbuncic Jun 5, 2026
afafb1d
memory: fix macOS available-RAM underreport that throttled -j
pbuncic Jun 5, 2026
31e2e3f
requires: support version-gating on the depending package's own version
pbuncic Jun 6, 2026
ec41f75
build env: reconstruct DYLD_LIBRARY_PATH from dependencies on macOS
pbuncic Jun 6, 2026
2b0b8fa
build env: emit DYLD on macOS, LD on Linux (not both)
pbuncic Jun 6, 2026
2f4c67f
defaults: support architecture-gated overrides ('pkg:matcher')
pbuncic Jun 6, 2026
e7da4a2
utilities: treat '-', '.', '_' as equivalent version separators
pbuncic Jun 6, 2026
fe26369
Add --brew flag for Homebrew-sourced system packages on macOS
pbuncic Jun 6, 2026
38cb4e1
Add 'bits brew': generate a Homebrew Brewfile from recipes
pbuncic Jun 6, 2026
4c99fac
brew: a Brewfile is macOS-only; emit nothing for non-osx targets
pbuncic Jun 6, 2026
5e03912
bits wrapper: forward the brew subcommand to bitsBuild
pbuncic Jun 6, 2026
8917cb9
getPackageList: carry pkgdir into prefer_system replacement specs
pbuncic Jun 6, 2026
566db87
brew: default Brewfile to <configDir>/macos/Brewfile; doctor prefers it
pbuncic Jun 7, 2026
1310c20
defaults: conditional variables: entries + predefined arch vars
pbuncic Jun 8, 2026
d290325
build: drop the CPU oversubscription info line
pbuncic Jun 9, 2026
d9b4243
build: scope stale-sentinel cleanup to SOURCES + TARS store (faster s…
pbuncic Jun 9, 2026
00836ec
build: replace stale-sentinel os.walk with depth-bounded globs
pbuncic Jun 9, 2026
62a2fef
build: exclude recipe comments/blank lines from the build hash
pbuncic Jun 9, 2026
fcaa603
tests: mock the depth-bounded stale-sentinel globs in test_coverDoBuild
pbuncic Jun 9, 2026
8ff4cd6
merge
pbuncic Jun 9, 2026
4800c14
q: fast CVMFS module listing via the serving catalog
pbuncic Jun 10, 2026
ec8637b
arch: surface the defaults-qualified architecture for 'bits enter'
pbuncic Jun 10, 2026
3256395
docs: cover variables/flavours, Homebrew layer, fast q, qualified-arc…
pbuncic Jun 10, 2026
9b3911c
docs: note flavour/variable names must be identifiers (no hyphens)
pbuncic Jun 10, 2026
b7018ec
chore: drop two noisy startup info() lines
pbuncic Jun 10, 2026
103484f
fix(bits): detect architectures from MODULES/, not sw/ contents
pbuncic Jun 10, 2026
d7344f2
fix(bits): auto-select most recently modified architecture
pbuncic Jun 10, 2026
b7717a4
refactor(config): simplify bits.rc + decouple ALICE branding into ali…
pbuncic Jun 10, 2026
065ace8
feat(builders): record + print a CPU-utilisation tuning hint
pbuncic Jun 10, 2026
7de6be5
perf(bits q): list modulefiles directly, skip MODULES rebuild + modul…
pbuncic Jun 10, 2026
fcb25b7
perf(bits): make collectModules incremental for load/enter/avail
pbuncic Jun 10, 2026
a16c9b5
perf(bits): fast existence check for load/enter/printenv/setenv
pbuncic Jun 10, 2026
cd6abb6
diag(bits): optional BITS_TIMING phase timing for load/enter
pbuncic Jun 10, 2026
22ac207
perf(bits): fast-skip collectModules when nothing changed
pbuncic Jun 10, 2026
b77976b
perf+feat(bits): MODULES-first arch detect; -q silences module-load o…
pbuncic Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 0 additions & 117 deletions ANALYTICS.md

This file was deleted.

7 changes: 0 additions & 7 deletions DESIGN.md

This file was deleted.

11 changes: 0 additions & 11 deletions PACKAGING.md

This file was deleted.

130 changes: 76 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Bits is a build orchestration tool for complex software stacks. It fetches sources, resolves dependencies, and builds packages in a reproducible, parallel environment.

> Full documentation is available in [REFERENCE.md](REFERENCE.md). This guide covers only the essentials.
> Full documentation is available in [docs/USERGUIDE.md](docs/USERGUIDE.md), [docs/COOKBOOK.md](docs/COOKBOOK.md), and [docs/REFERENCE.md](docs/REFERENCE.md). This guide covers only the essentials.

---

Expand All @@ -24,29 +24,46 @@ On RHEL/CentOS: `yum install environment-modules`

---

## Quick Start (Building ROOT)
## Quick Start

```bash
# 1. Clone a recipe repository
git clone https://github.com/bitsorg/alice.bits.git
cd alice.bits

# 2. Check system requirements for ROOT
bits doctor ROOT
### ALICE (default community — no configuration needed)

# 3. Build ROOT and all its dependencies
```bash
# In any empty directory: bits auto-bootstraps the ALICE recipe repo
bits build ROOT

# 4. Enter the built environment
# Enter the built environment and run
bits enter ROOT/latest

# 5. Run the software
root -b

# 6. Exit the environment
exit
```

### Another community (e.g. LHCb) — one-time setup

```bash
# Write community and work-directory to bits.rc once
bits init --organisation LHCB --work-dir /path/to/sw

# Then build as normal — bits auto-bootstraps the LHCb recipe repo
bits build DaVinci
bits enter DaVinci/latest
```

### Inside a cloned recipe repository

```bash
# bits detects defaults-release.sh and uses "." as the recipe directory
git clone https://github.com/bitsorg/lhcb.bits
cd lhcb.bits
bits build DaVinci
```

### Check system requirements before building

```bash
bits doctor ROOT
```

---

## Basic Commands
Expand All @@ -63,41 +80,51 @@ exit
| `bits doctor --runner` | Validate the full build-runner environment (compiler, git, Docker, podman, CVMFS, disk, store). |
| `bits verify --from-manifest FILE` | Confirm a live deployment matches the build manifest (SHA-256 and provider commits). |

[Full command reference](REFERENCE.md#16-command-line-reference)
[Full command reference](docs/REFERENCE.md#16-command-line-reference)

---

## Configuration

Create a `bits.rc` file (INI format) to set defaults:
Use `bits init` to write persistent settings to `bits.rc` (created in the current directory):

```bash
bits init --organisation LHCB \
--work-dir /path/to/sw \
--remote-store https://mybucket/builds
```

Or write `bits.rc` by hand (INI format, `[bits]` section):

```ini
[bits]
organisation = ALICE
remote_store = https://s3.cern.ch/swift/v1/alibuild-repo
prerequisites_url = https://alice-doc.github.io/alice-analysis-tutorial/building/
cvmfs_repos = /cvmfs/alice.cern.ch,/cvmfs/sft.cern.ch

[ALICE]
sw_dir = /path/to/sw # output directory
repo_dir = /path/to/recipes # recipe repository root
search_path = common,extra # additional recipe dirs (appended .bits)
organisation = LHCB
work_dir = /path/to/sw
remote_store = https://s3.cern.ch/swift/v1/alibuild-repo
prerequisites_url = https://lhcb-software.web.cern.ch/
cvmfs_repos = /cvmfs/lhcbdev.cern.ch,/cvmfs/sft.cern.ch
```

Bits looks for `bits.rc` in: `--config FILE` → `./bits.rc` → `./.bitsrc` → `~/.bitsrc`.
`organisation` is written **uppercase** (`ALICE`, `LHCB`, …). Bits lowercases it
internally when resolving the community recipe repository from bits-providers
(e.g. `LHCB` → `lhcb.bits.sh` → `https://github.com/bitsorg/lhcb.bits`).

Bits looks for `bits.rc` in: `--rc-file FILE` → `./bits.rc` → `./.bitsrc` → `~/.bitsrc`.

Useful `[bits]` keys:

| Key | Description |
|-----|-------------|
| `remote_store` | Default binary store URL (same syntax as `--remote-store`). |
| `write_store` | Default upload store URL. |
| `prerequisites_url` | URL shown when `bits doctor` cannot find the C++ compiler or git. |
| `cvmfs_repos` | Comma-separated CVMFS mount paths checked by `bits doctor --runner`. |
| `provider_policy` | `name:prepend\|append` pairs controlling `BITS_PATH` insertion order. |
| `store_integrity` | `true` to enable SHA-256 verification of every recalled tarball. |
| Key | CLI flag | Description |
|-----|----------|-------------|
| `organisation` | `--organisation` | Community name (uppercase). Used to auto-bootstrap the recipe repo. |
| `work_dir` | `-w` / `--work-dir` | Output directory for built packages (default: `sw`). |
| `remote_store` | `--remote-store` | Binary store URL for pre-built tarball retrieval. |
| `write_store` | `--write-store` | Binary store URL for uploading newly built tarballs. |
| `prerequisites_url` | — | URL shown when `bits doctor` cannot find the C++ compiler or git. |
| `cvmfs_repos` | — | Comma-separated CVMFS mount paths checked by `bits doctor --runner`. |
| `provider_policy` | — | `name:prepend\|append` pairs controlling `BITS_PATH` insertion order. |
| `store_integrity` | `--store-integrity` | `true` to enable SHA-256 verification of every recalled tarball. |

[Configuration details](REFERENCE.md#4-configuration)
[Configuration details](docs/USERGUIDE.md#4-configuration)

---

Expand All @@ -118,7 +145,7 @@ make -j${JOBS:-1}
make install
```

[Complete recipe reference](REFERENCE.md#17-recipe-format-reference)
[Complete recipe reference](docs/REFERENCE.md#17-recipe-format-reference)

---

Expand All @@ -134,7 +161,7 @@ bits cleanup --min-free 100 # free space until at least 100 GiB available
bits cleanup -n # dry-run: show what would be removed
```

[Cleaning options](REFERENCE.md#7-cleaning-up)
[Cleaning options](docs/USERGUIDE.md#7-cleaning-up)

---

Expand All @@ -151,9 +178,9 @@ bits build --docker --architecture slc9_aarch64 MyAnalysis
bits build --remote-store s3://mybucket/builds ROOT
```

The `--cvmfs-prefix` flag (which embeds the final CVMFS deployment path at compile time so no relocation is needed at publish time) and `bits publish --no-relocate` are used by the **bits-console-triggered CI pipeline** on the build runners — they are not normally typed by end users. See [WORKFLOWS.md Phase 5](WORKFLOWS.md#phase-5--ci-build-and-cvmfs-publication-via-bits-console) for the user-facing workflow and [REFERENCE.md §22](REFERENCE.md#22-docker-support) for the flag reference.
The `--cvmfs-prefix` flag (which embeds the final CVMFS deployment path at compile time so no relocation is needed at publish time) and `bits publish --no-relocate` are used by the **bits-console-triggered CI pipeline** on the build runners — they are not normally typed by end users. See [WORKFLOWS.md Phase 5](docs/WORKFLOWS.md#phase-5--ci-build-and-cvmfs-publication-via-bits-console) for the user-facing workflow and [docs/REFERENCE.md §22](docs/REFERENCE.md#22-docker-support) for the flag reference.

[Docker support](REFERENCE.md#22-docker-support) | [Cross-compilation via QEMU](REFERENCE.md#22b-cross-compilation-via-qemu) | [Remote stores](REFERENCE.md#21-remote-binary-store-backends)
[Docker support](docs/REFERENCE.md#22-docker-support) | [Cross-compilation via QEMU](docs/REFERENCE.md#222-cross-compilation-via-qemu) | [Remote stores](docs/REFERENCE.md#21-remote-binary-store-backends)

---

Expand All @@ -171,7 +198,7 @@ bits verify --from-manifest alice-o2-20260411.json \
--cvmfs-root /cvmfs/alice.cern.ch
```

[bits doctor reference](REFERENCE.md#bits-doctor) | [bits verify reference](REFERENCE.md#bits-verify) | [Deployment verification §22c](REFERENCE.md#22c-bits-verify--deployment-verification)
[bits doctor reference](docs/REFERENCE.md#bits-doctor) | [bits verify reference](docs/REFERENCE.md#23-bits-verify--deployment-verification)

---

Expand All @@ -190,32 +217,27 @@ tox -e darwin # reduced suite on macOS
pytest # fast unit tests only
```

[Developer guide](REFERENCE.md#part-ii--developer-guide)
[Developer guide](docs/REFERENCE.md#part-i--developer-guide)

---

## The bits Workflow: From Local Dev to CVMFS

bits uses a single toolchain from your laptop to experiment-wide CVMFS. Clone a package source next to your recipe checkout and bits detects it automatically, building your local version while resolving all other dependencies from the shared recipe repo. Once tested locally, the change follows an unbroken path: commit → recipe MR → CI build → `bits publish` → CVMFS. Group admins publish full experiment stacks; individual users can publish single packages to a separate namespace — both paths use the same commands and the same recipes.

See **[WORKFLOWS.md](WORKFLOWS.md)** for the full phase-by-phase walkthrough and workflow diagram.
See **[WORKFLOWS.md](docs/WORKFLOWS.md)** for the full phase-by-phase walkthrough and workflow diagram.

---

## Next Steps

- [Development-to-deployment workflow & diagram](WORKFLOWS.md)
- [Environment management (`bits enter`, `load`, `unload`)](REFERENCE.md#6-managing-environments)
- [Dependency graph visualisation](REFERENCE.md#bits-deps)
- [Runner environment validation (`bits doctor --runner`)](REFERENCE.md#bits-doctor)
- [Deployment verification (`bits verify`)](REFERENCE.md#22c-bits-verify--deployment-verification)
- [Repository provider feature (dynamic recipe repos)](REFERENCE.md#13-repository-provider-feature)
- [Defaults profiles](REFERENCE.md#18-defaults-profiles)
- [Cross-compilation via QEMU](REFERENCE.md#22b-cross-compilation-via-qemu)
- [Design principles & limitations](REFERENCE.md#24-design-principles--limitations)
- [CVMFS publishing pipeline & bits-console](REFERENCE.md#26-cvmfs-publishing-pipeline)
- **[User Guide](docs/USERGUIDE.md)** — installation, configuration, building, environments, cleaning up
- **[Cookbook](docs/COOKBOOK.md)** — practical recipes for common tasks
- **[Reference Manual](docs/REFERENCE.md)** — command-line flags, recipe format, environment variables, Docker, stores, CVMFS pipeline, developer guide
- **[Workflows](docs/WORKFLOWS.md)** — development-to-deployment walkthrough and diagram
- **[Roadmap](docs/ROADMAP.md)** — planned features and priorities

---

**Note**: Bits is under active development. For the most up-to-date information, see the full [REFERENCE.md](REFERENCE.md).
**Note**: Bits is under active development. For the most up-to-date information, see the full [docs/REFERENCE.md](docs/REFERENCE.md).
```
Loading
Loading