Skip to content

Commit 759cd12

Browse files
authored
Merge pull request #42 from strombetta/feature/packages
Feature/packages
2 parents 3a25557 + ae76591 commit 759cd12

21 files changed

Lines changed: 504 additions & 216 deletions

.github/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Default owners
2+
* @strombetta
3+
4+
# CI / release workflows
5+
/.github/workflows/ @strombetta
6+
7+
# Build system and scripts
8+
/Makefile @strombetta
9+
/Makefile.check @strombetta
10+
/Makefile.help @strombetta
11+
/make/ @strombetta
12+
/scripts/ @strombetta
13+
/config/ @strombetta

CODE_OF_CONDUCT.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as contributors and maintainers pledge to make participation in this project
6+
a harassment-free experience for everyone, regardless of age, body size,
7+
visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment include:
15+
16+
- Demonstrating empathy and kindness toward other people
17+
- Being respectful of differing opinions, viewpoints, and experiences
18+
- Giving and gracefully accepting constructive feedback
19+
- Accepting responsibility and apologizing to those affected by our mistakes
20+
- Focusing on what is best for the community
21+
22+
Examples of unacceptable behavior include:
23+
24+
- Sexualized language or imagery, and sexual attention or advances
25+
- Trolling, insulting or derogatory comments, and personal or political attacks
26+
- Public or private harassment
27+
- Publishing others' private information without explicit permission
28+
- Other conduct which could reasonably be considered inappropriate
29+
30+
## Enforcement Responsibilities
31+
32+
Project maintainers are responsible for clarifying and enforcing standards of
33+
acceptable behavior and will take appropriate and fair corrective action in
34+
response to any behavior they deem inappropriate, threatening, offensive, or
35+
harmful.
36+
37+
## Scope
38+
39+
This Code of Conduct applies within all project spaces and also applies when an
40+
individual is officially representing the project in public spaces.
41+
42+
## Reporting
43+
44+
Report incidents to the maintainers by contacting the repository owner via the
45+
email listed on their GitHub profile. If you are unable to use email, open a
46+
private GitHub discussion (if enabled) or request a private contact channel
47+
through a maintainer.
48+
49+
We will acknowledge receipt within 5 business days and will keep you informed
50+
about the process when possible.
51+
52+
## Enforcement Guidelines
53+
54+
Maintainers will follow these Community Impact Guidelines in determining the
55+
consequences for any action they deem in violation of this Code of Conduct:
56+
57+
1. **Correction**: A private, written warning with clarification.
58+
2. **Warning**: A formal warning with consequences for continued behavior.
59+
3. **Temporary Ban**: A temporary ban from participation.
60+
4. **Permanent Ban**: Permanent removal from the community.
61+
62+
## Attribution
63+
64+
This Code of Conduct is adapted from the Contributor Covenant, version 2.1.
65+
For details, see:
66+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

MAINTAINERS.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Maintainers
2+
3+
This document lists the active maintainers for the BugleOS Cross Toolchain
4+
repository and their areas of responsibility.
5+
6+
## Active Maintainers
7+
8+
- Sebastiano Trombetta (@strombetta) — Lead Maintainer
9+
- Toolchain build system (Makefiles, scripts)
10+
- Release process and artifacts
11+
- CI/CD workflows
12+
13+
## Contact
14+
15+
For questions or support, see SUPPORT.md.
16+
For security issues, follow SECURITY.md.
17+
18+
## Changes to This File
19+
20+
Updates to this file should be made via pull request and require approval from
21+
an existing maintainer.

Makefile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
# SOFTWARE.
2121

2222
include config/paths.mk
23-
include config/versions.mk
24-
include make/common.mk
23+
include make/helpers.mk
2524

2625
ROOT_DIR := $(abspath $(ROOT_DIR))
2726

@@ -81,10 +80,10 @@ clean-binutils: clean-gcc ## Remove binutils build directories
8180
$(call do_clean,binutils)
8281
$(call do_safe_remove,$(BINUTILS1_BUILD_DIR))
8382
$(call do_safe_remove,$(BINUTILS2_BUILD_DIR))
84-
$(call do_safe_remove,$(BINUTILS_SRC_DIR))
85-
$(call do_safe_remove,$(BINUTILS_STAMP))
86-
$(call do_safe_remove,$(BINUTILS_ARCHIVE))
87-
$(call do_safe_remove,$(DOWNLOADS_DIR)/binutils-$(BINUTILS_VERSION).tar.xz.sig)
83+
$(call do_safe_remove_glob,$(SOURCES_DIR),binutils-*)
84+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),.binutils-*-verified)
85+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),binutils-*.tar.xz)
86+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),binutils-*.tar.xz.sig)
8887
$(call do_safe_remove,$(DOWNLOADS_DIR)/gnu-keyring.gpg)
8988
$(call do_safe_remove_glob,$(LOGS_DIR),binutils-stage1-*.log)
9089
$(call do_safe_remove_glob,$(LOGS_DIR),binutils-stage2-*.log)
@@ -118,10 +117,10 @@ clean-binutils-stage2:
118117
clean-gcc: clean-musl ## Remove GCC build directory
119118
$(call do_clean,gcc)
120119
$(call do_safe_remove,$(GCC_BUILD_DIR))
121-
$(call do_safe_remove,$(GCC_SRC_DIR))
122-
$(call do_safe_remove,$(GCC_STAMP))
123-
$(call do_safe_remove,$(GCC_ARCHIVE))
124-
$(call do_safe_remove,$(DOWNLOADS_DIR)/gcc-$(GCC_VERSION).tar.xz.sig)
120+
$(call do_safe_remove_glob,$(SOURCES_DIR),gcc-*)
121+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),.gcc-*-verified)
122+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),gcc-*.tar.xz)
123+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),gcc-*.tar.xz.sig)
125124
$(call do_safe_remove,$(DOWNLOADS_DIR)/gnu-keyring.gpg)
126125
$(call do_safe_remove_glob,$(LOGS_DIR),gcc-stage1-*.log)
127126
$(call do_safe_remove_glob,$(LOGS_DIR),gcc-stage2-*.log)
@@ -151,10 +150,10 @@ clean-gcc-stage2:
151150
clean-musl: clean-binutils-stage2 clean-gcc-stage2 ## Remove musl build directory
152151
$(call do_clean,musl)
153152
$(call do_safe_remove,$(MUSL_BUILD_DIR))
154-
$(call do_safe_remove,$(MUSL_SRC_DIR))
155-
$(call do_safe_remove,$(MUSL_STAMP))
156-
$(call do_safe_remove,$(MUSL_ARCHIVE))
157-
$(call do_safe_remove,$(DOWNLOADS_DIR)/musl-$(MUSL_VERSION).tar.gz.asc)
153+
$(call do_safe_remove_glob,$(SOURCES_DIR),musl-*)
154+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),.musl-*-verified)
155+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),musl-*.tar.gz)
156+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),musl-*.tar.gz.asc)
158157
$(call do_safe_remove,$(DOWNLOADS_DIR)/musl.pub)
159158
$(call do_safe_remove_glob,$(LOGS_DIR),musl-*.log)
160159
$(foreach lib,$(MUSL_LIBS),$(call do_safe_remove_glob,$(SYSROOT)/lib,$(lib).*))
@@ -187,10 +186,10 @@ clean-musl: clean-binutils-stage2 clean-gcc-stage2 ## Remove musl build director
187186
clean-kheaders: clean-gcc ## Remove Linux UAPI headers build directory
188187
$(call do_clean,linux-headers)
189188
$(call do_safe_remove,$(LINUX_HEADERS_BUILD_DIR))
190-
$(call do_safe_remove,$(LINUX_SRC_DIR))
191-
$(call do_safe_remove,$(LINUX_STAMP))
192-
$(call do_safe_remove,$(LINUX_ARCHIVE))
193-
$(call do_safe_remove,$(DOWNLOADS_DIR)/linux-$(LINUX_VERSION).tar.sign)
189+
$(call do_safe_remove_glob,$(SOURCES_DIR),linux-*)
190+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),.linux-*-verified)
191+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),linux-*.tar.xz)
192+
$(call do_safe_remove_glob,$(DOWNLOADS_DIR),linux-*.tar.sign)
194193
$(call do_safe_remove_glob,$(LOGS_DIR),linux-headers-*.log)
195194
$(call do_safe_remove,$(SYSROOT)/usr/include/linux)
196195
$(call do_safe_remove,$(SYSROOT)/usr/include/asm)

Makefile.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# SOFTWARE.
2121

2222
include config/paths.mk
23-
include make/common.mk
23+
include make/helpers.mk
2424

2525
ROOT_DIR := $(abspath $(ROOT_DIR))
2626

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BugleOS Cross Toolchain builds deterministic cross-compilers and system headers
77
## Repository layout
88

99
- `Makefile`: entry point orchestrating staged builds per architecture.
10-
- `config/`: central version and path definitions, plus per-architecture target triples.
10+
- `config/`: path definitions and per-architecture target triples.
1111
- `make/`: stage-specific makefiles for binutils, GCC, and musl.
1212
- `scripts/`: helper utilities for fetching sources, verifying checksums, loading the environment, and emitting metadata files.
1313
- `patches/`: placeholder for local patches to upstream sources.
@@ -41,7 +41,7 @@ To list optional variables for a specific target, pass the target name via `TARG
4141
make help TARGET=toolchain
4242
```
4343

44-
To install Linux UAPI headers into the sysroot, set `WITH_LINUX_HEADERS=1` and update `LINUX_VERSION`/`LINUX_SHA256` in `config/versions.mk`:
44+
To install Linux UAPI headers into the sysroot, set `WITH_LINUX_HEADERS=1` and update `LINUX_VERSION`/`LINUX_SHA256` in `make/linux-headers.mk`:
4545

4646
```
4747
make WITH_LINUX_HEADERS=1 TARGET=x86_64-bugleos-linux-musl toolchain

SECURITY.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Security Policy
2+
3+
This document describes how to report security issues for BugleOS Cross Toolchain.
4+
5+
## Supported Versions
6+
7+
We currently support the latest released version and the `main` branch.
8+
9+
| Version | Supported |
10+
| --- | --- |
11+
| latest | :white_check_mark: |
12+
| older releases | :x: |
13+
14+
## Reporting a Vulnerability
15+
16+
Please report security issues **privately**.
17+
18+
Preferred method:
19+
1. Open a private GitHub Security Advisory:
20+
https://github.com/strombetta/bugleos-make-toolchain/security/advisories
21+
22+
If you cannot use GitHub Security Advisories, contact the maintainer privately
23+
via the email listed in the maintainer's GitHub profile or commit metadata.
24+
25+
### What to Include
26+
27+
Please include:
28+
- A clear description of the vulnerability and impact
29+
- Steps to reproduce (proof-of-concept if possible)
30+
- Affected versions/commits
31+
- Any suggested fixes or mitigations
32+
33+
## Response Timeline
34+
35+
We aim to:
36+
- Acknowledge receipt within **2 business days**
37+
- Provide a status update within **7 days**
38+
- Coordinate a fix and disclosure schedule as appropriate
39+
40+
Timelines may vary based on complexity and upstream coordination needs.
41+
42+
## Scope
43+
44+
In scope:
45+
- Build scripts, CI workflows, release artifacts, and integrity checks
46+
- Supply-chain or signing/verification issues
47+
- Toolchain configuration that could compromise build outputs
48+
49+
Out of scope:
50+
- Vulnerabilities in upstream projects (binutils/GCC/musl/Linux)
51+
unless introduced or amplified by this repository
52+
53+
## Coordinated Disclosure
54+
55+
Please do not open public issues or disclose details until a fix or mitigation
56+
is available. We will coordinate disclosure with you.
57+
58+
## Security Updates
59+
60+
Security fixes will be released as new versions. Release notes will reference
61+
the advisory and provide upgrade guidance.

SUPPORT.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Support
2+
3+
This document describes how to get help with BugleOS Cross Toolchain.
4+
5+
## What We Support
6+
7+
We can help with:
8+
- Build failures in this repository
9+
- Reproducibility issues and validation checks
10+
- Documentation clarity and usage questions
11+
- Feature requests related to the build system
12+
13+
## What We Do Not Support
14+
15+
- Bugs in upstream projects (binutils, GCC, musl, Linux) unless caused by
16+
configuration or patches in this repository
17+
- General operating system setup outside the documented prerequisites
18+
19+
## How to Get Help
20+
21+
1. **Check the docs first**
22+
- README.md and CONTRIBUTING.md
23+
2. **Collect diagnostics**
24+
- Host OS and tool versions
25+
- Target triplet
26+
- Logs from `logs/`
27+
3. **Choose the right channel**
28+
- Questions: GitHub Discussions (if enabled)
29+
- Bugs/feature requests: GitHub Issues with clear reproduction steps
30+
31+
## Security Issues
32+
33+
Please do not file public issues for security vulnerabilities.
34+
Follow SECURITY.md for private reporting.

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0

VERSIONING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Versioning Policy
2+
3+
BugleOS Cross Toolchain follows Semantic Versioning 2.0.0.
4+
5+
## Version Format
6+
7+
`MAJOR.MINOR.PATCH` stored in the `VERSION` file.
8+
9+
- **MAJOR**: incompatible changes (build outputs, flags, toolchain layout)
10+
- **MINOR**: backward-compatible feature additions
11+
- **PATCH**: backward-compatible bug fixes and reproducibility fixes
12+
13+
## Tags
14+
15+
Release tags follow:
16+
17+
`vMAJOR.MINOR.PATCH`
18+
or
19+
`vMAJOR.MINOR.PATCH-PRERELEASE`
20+
21+
Examples:
22+
- `v1.2.3`
23+
- `v1.2.3-rc.1`
24+
25+
## Release Process
26+
27+
1. Update `VERSION` with the next `MAJOR.MINOR.PATCH`.
28+
2. Create an annotated tag using the `Tag from VERSION` workflow.
29+
3. CI builds artifacts, verifies checksums, and publishes the release.
30+
31+
## Pre-releases
32+
33+
Pre-releases are allowed (e.g., `-rc.1`, `-beta.1`) and are published as
34+
pre-release tags in GitHub.
35+
36+
## Hotfixes
37+
38+
Hotfixes increment **PATCH** and follow the same release process.

0 commit comments

Comments
 (0)