-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into no-bitflags
- Loading branch information
Showing
125 changed files
with
5,915 additions
and
3,578 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Boulder | ||
|
||
This directory contains the Serpent OS package building tool `boulder`. | ||
|
||
## Building boulder | ||
|
||
To build boulder, use the `boulder` target: | ||
|
||
cargo build -p boulder | ||
|
||
This will produce a debug build by default, which is available as `./target/debug/boulder` | ||
|
||
The [onboarding/ repository](https://github.com/serpent-os/onboarding/) is in the process of being updated to default to building the Rust based boulder. | ||
|
||
## Configuring user namespaces | ||
|
||
Boulder supports building as your own user, using a feature called "user namespaces". | ||
|
||
If your username is `bob` with `UID = 1000` and `GID = 1000` then you will need to add the following files with the following contents: | ||
|
||
$ echo 'bob:100000:65536' |sudo tee /etc/subuid | ||
$ echo 'bob:100000:65536' |sudo tee /etc/subgid | ||
|
||
NB: The above assumes you haven't already configured user namespaces. | ||
|
||
You can check your username, UID and GID with `grep ${USER} /etc/passwd`, where your username is the first field, the UID is the third field and the GID is the fourth field: | ||
|
||
$ grep ${USER} /etc/passwd | ||
bob:x:1000:1000:bob:/home/bob:/bin/bash |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
actions: | ||
# Fetch dependencies | ||
- cargo_fetch: | ||
command: | | ||
cargo fetch -v --locked | ||
dependencies: | ||
- rust | ||
|
||
# Build the rust project | ||
- cargo_build: | ||
command: | | ||
cargo build -v -j "%(jobs)" --frozen --release --target %(target_triple) \ | ||
--config profile.release.debug=\"full\" \ | ||
--config profile.release.split-debuginfo=\"off\" \ | ||
--config profile.release.strip=\"none\" | ||
dependencies: | ||
- rust | ||
|
||
# Install the built binary | ||
- cargo_install: | ||
command: | | ||
cargo_install(){ | ||
if [ $# -eq 1 ]; then | ||
%install_bin target/%(target_triple)/release/"$1" | ||
else | ||
%install_bin target/%(target_triple)/release/%(name) | ||
fi | ||
} | ||
cargo_install | ||
dependencies: | ||
- rust | ||
|
||
# Run tests | ||
- cargo_test: | ||
command: | | ||
cargo test -v -j "%(jobs)" --frozen --release --target %(target_triple) --workspace | ||
dependencies: | ||
- rust |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.