Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7180a61
Add repository-provider feature and update documentation
pbuncic Apr 7, 2026
a1dbdfa
Adding optional possibility to limit memory usage per core for big pa…
pbuncic Apr 7, 2026
c0f3875
Adding checksum handling for tar files and git repositories
pbuncic Apr 8, 2026
ae09635
Updatind docs
pbuncic Apr 8, 2026
6bdc7b0
Support for package families
pbuncic Apr 8, 2026
e8ac843
Adding support for shared packages
pbuncic Apr 9, 2026
ff8c275
README in .md format
pbuncic Apr 9, 2026
4bae161
adding qualify_arch option to defaults, allows to append defaults nam…
pbuncic Apr 9, 2026
a327ccf
Merge branch 'main' into repo_provider
pbuncic Apr 9, 2026
f2bd471
Adding back README.rst
pbuncic Apr 9, 2026
70e226e
Merge branch 'repo_provider' of github.com:bitsorg/bits into repo_pro…
pbuncic Apr 9, 2026
c62ee7c
Fixing yaml in rst file
pbuncic Apr 9, 2026
e973956
Trying to fix rst syntax
pbuncic Apr 9, 2026
93975f6
Allow . in package name, check for updates of recipe repositories
pbuncic Apr 9, 2026
b2dd208
Adding default repository for repository provider recipes
pbuncic Apr 9, 2026
5db5f0a
Fixing readme-check
pbuncic Apr 9, 2026
eea9aa6
Restoring README.rst to avoid test failures
pbuncic Apr 9, 2026
f011cdb
Add possibility to require repository provider packages in defaults
pbuncic Apr 9, 2026
1d4b02a
Preventing cyclic dependencies for repository provider packages
pbuncic Apr 9, 2026
154e564
Updating documentation
pbuncic Apr 10, 2026
f7bd1f5
Revise acknowledgement and update configuration paths
pbuncic Apr 10, 2026
b144ca0
Adding force_revision feature
pbuncic Apr 10, 2026
c388c39
Merge branch 'repo_provider' of github.com:bitsorg/bits into repo_pro…
pbuncic Apr 10, 2026
dbe0a3e
Trying to fix failing test
pbuncic Apr 10, 2026
d679f7f
Bug fixes
pbuncic Apr 10, 2026
1fbf08f
Support for caching non-github sources
pbuncic Apr 10, 2026
b638770
Fix failing test
pbuncic Apr 10, 2026
96c576d
Renaming PyPI project to build-bits
pbuncic Apr 10, 2026
acb1e69
Adding optional asynchronous source prefetching and tar/upload
pbuncic Apr 10, 2026
fb63fab
Revisiting bits init, allow to generate/modify bits.rc from command line
pbuncic Apr 10, 2026
4fd0f23
Code cleanup
pbuncic Apr 10, 2026
81c20f1
Fix failing test
pbuncic Apr 10, 2026
473c253
Sanitized bash scripts and fixed tests
pbuncic Apr 10, 2026
21189b8
Adding optional backend store integrity check
pbuncic Apr 11, 2026
ee94212
Creating build manifest to allow reproducible builds
pbuncic Apr 11, 2026
e02b857
Fix failing test
pbuncic Apr 11, 2026
a767d61
Bug fix, adding CVMFS publisher
pbuncic Apr 13, 2026
362321d
Bug fix
pbuncic Apr 13, 2026
3a0368d
Bug fix
pbuncic Apr 13, 2026
b3518c5
Bug fix
pbuncic Apr 13, 2026
f5da619
Bug fix for --makeflow
pbuncic Apr 13, 2026
08f534e
Bug fix
pbuncic Apr 13, 2026
bf5b62a
Removing excessive debug output
pbuncic Apr 13, 2026
7b4a4da
Fixing failing test
pbuncic Apr 13, 2026
0fe65e3
Another --makeflow bug
pbuncic Apr 13, 2026
2e49c34
Limit makeflow jobs to 4
pbuncic Apr 13, 2026
daa1460
Another --makeflow bug
pbuncic Apr 13, 2026
d0e6a33
Another --makeflow bug
pbuncic Apr 13, 2026
6e6f677
Integration with bits-console
pbuncic Apr 18, 2026
9101759
Fixing docs
pbuncic Apr 18, 2026
73d6d08
Fixing failing test
pbuncic Apr 18, 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
180 changes: 180 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# Bits - Quick Start Guide

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.

---

## Installation

```bash
git clone https://github.com/bitsorg/bits.git
cd bits
export PATH=$PWD:$PATH # add bits to your PATH
python -m venv .venv
source .venv/bin/activate
pip install -e . # install Python dependencies
```

**Requirements**: Python 3.8+, git, and [Environment Modules](https://modules.sourceforge.net/) (`modulecmd`).
On macOS: `brew install modules`
On Debian/Ubuntu: `apt-get install environment-modules`
On RHEL/CentOS: `yum install environment-modules`

---

## Quick Start (Building ROOT)

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

# 2. Check that your system is ready
bits doctor ROOT

# 3. Build ROOT and all its dependencies
bits build ROOT

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

# 5. Run the software
root -b

# 6. Exit the environment
exit
```

---

## Basic Commands

| Command | Description |
|---------|-------------|
| `bits build <pkg>` | Build a package and its dependencies. |
| `bits enter <pkg>/latest` | Spawn a subshell with the package environment loaded. |
| `bits load <pkg>` | Print commands to load a module (must be `eval`'d). |
| `bits q [regex]` | List available modules. |
| `bits clean` | Remove stale build artifacts from a temporary build area. |
| `bits cleanup` | Evict old or infrequently used packages from a persistent workDir. |
| `bits doctor <pkg>` | Verify system requirements. |

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

---

## Configuration

Create a `bits.rc` file (INI format) to set defaults:

```ini
[bits]
organisation = ALICE

[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)
```

Bits looks for `bits.rc` in: `--config FILE` → `./bits.rc` → `./.bitsrc` → `~/.bitsrc`.
[Configuration details](REFERENCE.md#4-configuration)

---

## Writing a Recipe

Create a file `<package>.sh` inside a `*.bits` directory with:

```yaml
package: mylib
version: "1.0"
source: https://github.com/example/mylib.git
tag: v1.0
requires:
- zlib
---
./configure --prefix="$INSTALLROOT"
make -j${JOBS:-1}
make install
```

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

---

## Cleaning Up

```bash
bits clean # remove temporary build directories
bits clean --aggressive-cleanup # also remove source mirrors and tarballs

# Persistent workDir cache management (evict old / low-disk-space packages)
bits cleanup --max-age 14 # evict packages not used in the last 14 days
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)

---

## Docker & Remote Builds

```bash
# Build inside a Docker container for a specific Linux version
bits build --docker --architecture ubuntu2004_x86-64 ROOT

# Use a remote binary store (S3, HTTP, rsync) to share pre-built artifacts
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.

[Docker support](REFERENCE.md#22-docker-support) | [Remote stores](REFERENCE.md#21-remote-binary-store-backends)

---

## Development & Testing (Contributing)

```bash
git clone https://github.com/bitsorg/bits.git
cd bits
python -m venv .venv
source .venv/bin/activate
pip install -e .[test]

# Run tests
tox # full suite on Linux
tox -e darwin # reduced suite on macOS
pytest # fast unit tests only
```

[Developer guide](REFERENCE.md#part-ii--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.

---

## 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)
- [Repository provider feature (dynamic recipe repos)](REFERENCE.md#13-repository-provider-feature)
- [Defaults profiles](REFERENCE.md#18-defaults-profiles)
- [Design principles & limitations](REFERENCE.md#24-design-principles--limitations)
- [CVMFS publishing pipeline & bits-console](REFERENCE.md#26-cvmfs-publishing-pipeline)

---

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