Skip to content

Commit 81834a7

Browse files
committed
Merge remote-tracking branch 'freebsd/main'
2 parents 8564d30 + f54f362 commit 81834a7

8,345 files changed

Lines changed: 742127 additions & 265594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cirrus.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ compute_engine_instance:
1010
# gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images
1111
platform: freebsd
1212
image_project: freebsd-org-cloud-dev
13-
image: freebsd-14-3-release-amd64-ufs
13+
image: freebsd-15-0-release-amd64-ufs
1414
cpu: 8
1515
memory: 8G
1616
disk: 40
@@ -197,16 +197,17 @@ task:
197197
- du -m -s /usr/obj
198198

199199
precommit_task:
200+
persistent_worker:
201+
labels:
202+
jail: FreeBSD-src
200203
matrix:
201204
- name: amd64 smoke test using internal ci systems
202205
only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*'
203-
trigger_type: manual
204206
env:
205207
TARGET: amd64
206208
TARGET_ARCH: amd64
207209
- name: aarch64 smoke test using internal ci systems
208210
only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*'
209-
trigger_type: manual
210211
env:
211212
TARGET: arm64
212213
TARGET_ARCH: aarch64

.github/path-rules.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Format the similar to CODEOWNERS: Each line has a path, whitespace and a
3+
# message for contributors.
4+
#
5+
sys/contrib/device-tree :caution: No changes should be made here by pull request
6+
# Catch all
7+
contrib :warning: Contributed software usually managed by vendor branch
8+
crypto :warning: Contributed crypto software usually managed by vendor branch
9+
sys/contrib :warning: Contributed software usually managed by vendor branch
10+
sys/crypto/skein :warning: Contributed crypto software usually managed by vendor branch

.github/workflows/checklist.yml

Lines changed: 97 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ permissions:
1313
jobs:
1414
checklist:
1515
name: commit
16+
if: github.repository == 'freebsd/freebsd-src'
1617
runs-on: ubuntu-latest
1718
steps:
1819
- uses: actions/github-script@v7
@@ -36,11 +37,49 @@ jobs:
3637
pull_number: context.issue.number
3738
});
3839
40+
/* Get owners */
41+
42+
let owners = [];
43+
const { data: ownerData } = await github.rest.repos.getContent({
44+
owner: context.repo.owner,
45+
repo: context.repo.repo,
46+
path: '.github/CODEOWNERS',
47+
ref: context.payload.pull_request.base.ref // Or a specific branch
48+
});
49+
const oc = Buffer.from(ownerData.content, 'base64').toString();
50+
owners = oc.split(/\r?\n/)
51+
.map(line => line.trim())
52+
// Filter out comments and empty lines
53+
.filter(line => line && !line.startsWith('#'))
54+
.map(line => {
55+
// Split by the first block of whitespace to separate path and message
56+
const [path, ...ownerParts] = line.substring(1).split(/\s+/);
57+
return { path, owner: ownerParts.join(' ') };
58+
});
59+
60+
/* Get rules -- maybe refactor to a function for ownerPath too */
61+
let rules = [];
62+
const { data: rulesData } = await github.rest.repos.getContent({
63+
owner: context.repo.owner,
64+
repo: context.repo.repo,
65+
path: '.github/path-rules.txt',
66+
ref: context.payload.pull_request.base.ref // Or a specific branch
67+
});
68+
const rc = Buffer.from(rulesData.content, 'base64').toString();
69+
rules = rc.split(/\r?\n/)
70+
.map(line => line.trim())
71+
// Filter out comments and empty lines
72+
.filter(line => line && !line.startsWith('#'))
73+
.map(line => {
74+
// Split by the first block of whitespace to separate path and message
75+
const [path, ...messageParts] = line.split(/\s+/);
76+
return { path, message: messageParts.join(' ') };
77+
});
78+
3979
let checklist = {};
4080
let checklist_len = 0;
4181
let comment_id = -1;
4282
43-
const msg_prefix = "Thank you for taking the time to contribute to FreeBSD!\n";
4483
const addToChecklist = (msg, sha) => {
4584
if (!checklist[msg]) {
4685
checklist[msg] = [];
@@ -72,6 +111,43 @@ jobs:
72111
addToChecklist("Real email address is needed", commit.sha);
73112
}
74113
114+
/* Check for different paths that have issues and/or owners */
115+
const { data: files } = await github.rest.pulls.listFiles({
116+
owner: context.repo.owner,
117+
repo: context.repo.repo,
118+
pull_number: context.payload.pull_request.number,
119+
});
120+
121+
let infolist = {};
122+
let infolist_len = 0;
123+
const addToInfolist = (msg) => {
124+
if (!infolist[msg]) {
125+
infolist[msg] = [];
126+
infolist_len++;
127+
}
128+
}
129+
130+
/* Give advice based on what's in the commit */
131+
for (const file of files) {
132+
for (const owner of owners) {
133+
if (file.filename.startsWith(owner.path)) {
134+
addToInfolist("> [!IMPORTANT]\n> " + owner.owner + " wants to review changes to " + owner.path + "\n");
135+
}
136+
}
137+
for (const rule of rules) {
138+
// Consider regexp in the future maybe?
139+
if (file.filename.startsWith(rule.path)) {
140+
if (rule.message.startsWith(":caution: ")) {
141+
addToInfolist("> [!CAUTION]\n> " + rule.path + ": " + rule.message.substring(10) + "\n");
142+
} else if (rule.message.startsWith(":warning: ")) {
143+
addToInfolist("> [!WARNING]\n> " + rule.path + ": " + rule.message.substring(10) + "\n");
144+
} else {
145+
addToInfolist("> [!IMPORTANT]\n> " + rule.path + ": " + rule.message + "\n");
146+
}
147+
}
148+
}
149+
}
150+
75151
/* Check if we've commented before. */
76152
for (const comment of comments) {
77153
if (comment.user.login == "github-actions[bot]") {
@@ -80,17 +156,28 @@ jobs:
80156
}
81157
}
82158
83-
if (checklist_len != 0) {
84-
let msg = msg_prefix +
85-
"There " + (checklist_len > 1 ? "are a few issues that need " : "is an issue that needs ") +
86-
"to be fixed:\n";
159+
const msg_prefix = "Thank you for taking the time to contribute to FreeBSD!\n\n";
160+
if (checklist_len != 0 || infolist_len != 0) {
161+
let msg = msg_prefix;
87162
let comment_func = comment_id == -1 ? github.rest.issues.createComment : github.rest.issues.updateComment;
163+
if (checklist_len != 0) {
164+
msg +=
165+
"There " + (checklist_len > 1 ? "are a few issues that need " : "is an issue that needs ") +
166+
"to be resolved:\n";
88167
89-
/* Loop for each key in "checklist". */
90-
for (const c in checklist)
91-
msg += "- " + c + "<sup>" + checklist[c].join(", ") + "</sup>\n";
92-
msg += "\nPlease review [CONTRIBUTING.md](https://github.com/freebsd/freebsd-src/blob/main/CONTRIBUTING.md), then update and push your branch again.\n"
93-
168+
/* Loop for each key in "checklist". */
169+
for (const c in checklist)
170+
msg += "- " + c + " (" + checklist[c].join(", ") + ")\n";
171+
msg += "\n> [!NOTE]\n> Please review [CONTRIBUTING.md](https://github.com/freebsd/freebsd-src/blob/main/CONTRIBUTING.md), then update and push your branch again.\n\n"
172+
} else {
173+
let msg = "No Issues found.\n\n";
174+
}
175+
if (infolist_len != 0) {
176+
msg += "Some of files have special handling:\n"
177+
for (const i in infolist)
178+
msg += i + "\n";
179+
msg += "\n\n";
180+
}
94181
comment_func({
95182
owner: context.repo.owner,
96183
repo: context.repo.repo,

.mailmap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ Ganael LAPLANCHE <martymac@FreeBSD.org> <ganael.laplanche@martymac.org>
2222
<ivy@FreeBSD.org> <lexi@hemlock.eden.le-fay.org>
2323
Joyu Liao <joyul@juniper.net> <joyul@juniper.netnull>
2424
Joyu Liao <joyul@juniper.net> <joyul@juniper.net>
25+
<tpearson@FreeBSD.org> <tpearson@raptorengineering.com>
26+
Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> <p.mousavizadeh@protonmail.com>
27+
Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org> <info@spmzt.net>
28+
Siva Mahadevan <siva@FreeBSD.org> <me@svmhdvn.name>

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ A pull request will be considered if:
3939
* You can respond to feedback quickly. If feedback is requested and one month passes without a response we may close the pull request.
4040
* It touches fewer than about 10 files and the changes are less than about 200 lines. Changes larger than this may be OK, or you may be asked to submit multiple pull requests of a more manageable size.
4141
* Each logical change is a separate commit within the pull request. Commit messages for each change should follow the [commit log message guide](https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message).
42-
* All commits have, as the author, your name and valid email address as you would like to see them in the FreeBSD repository. Fake github.com addresses cannot be used. But see [Author Name and Email][#author-name-and-email] for details.
42+
* All commits have, as the git author, your name and valid email address as you would like to see them in the FreeBSD repository. Fake github.com addresses cannot be used. But see [Author Name and Email][#author-name-and-email] for details.
4343
* The scope of the pull request should not change during review. If the review suggests changes that expand the scope, please create an independent pull request.
4444
* Fixup commits should be squashed with the commit they are fixing. Each commit in your branch should be suitable for FreeBSD's repository.
45-
* Commits should include one or more `Signed-off-by:` lines with name and email address certifying [Developer Certificate of Origin](https://developercertificate.org/). But see [Author Name and Email][#author-name-and-email] for details.
45+
* Commit messages should include one or more `Signed-off-by:` trailer lines with name and email address certifying [Developer Certificate of Origin](https://developercertificate.org/). But see [Author Name and Email][#author-name-and-email] for details.
4646
* The commits follow FreeBSD's style guide. See [Style](#Style).
47-
* Run tools/build/checkstyle9.pl on your Git branch and eliminate all errors, or provide an explanation for exceptions.
47+
* Run tools/build/checkstyle9.pl on your Git branch and eliminate all errors, or provide an explanation for exceptions. The tool sometimes makes mistakes, and providing an explanation shows you have examined the output.
4848
* The commits do not introduce trailing white space.
4949
* If the commit fixes a bug, please add 'PR: \<bugnumber\>' to the commit message to document the Bugzilla Problem Report number.
5050
* If there's a code review related to this change, please include its URL in the commit message. However, where possible, please do not open both a differential review and a GitHub pull request.
5151
* If you have run FreeBSD's sources through a static analysis tool, please don't submit the raw results. Please also see the chunking up guidelines. Also, please make sure that kyua tests are the same before / after your change. Ideally, you'd also create a test case that shows an actual bug that's being fixed by these changes.
5252
* FreeBSD committers submitting pull requests are responsible for pushing them into the tree (possibly with approval if cross-repo commit bit policy needs it). Pull requests by FreeBSD committers will be closed after a month unless there's a very good reason not to.
53-
* Submissions using generative AI will be rejected.
54-
* Submissions from AI chatbots will result in the account being banned.
53+
* Low quality submimssions will be rejected, especially if they were generated by AI with little to no refinement.
54+
* Submissions by AI chatbots will result in the account being banned. Do not use pull requests interaction to train your LLM or similar AI model.
5555

5656
When revising your pull request after feedback, please rebase with a forced push
5757
rather than a merge commit.

COPYRIGHT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
The compilation of software known as FreeBSD is distributed under the
33
following terms:
44

5-
Copyright (c) 1992-2025 The FreeBSD Project.
5+
Copyright (c) 1992-2026 The FreeBSD Project.
66

77
Redistribution and use in source and binary forms, with or without
88
modification, are permitted provided that the following conditions

0 commit comments

Comments
 (0)