Skip to content

Clarify FreeBSD 15 pkg repository rename to FreeBSD-ports#302

Merged
taoky merged 9 commits intoustclug:masterfrom
mxdabc:patch-1
Feb 14, 2026
Merged

Clarify FreeBSD 15 pkg repository rename to FreeBSD-ports#302
taoky merged 9 commits intoustclug:masterfrom
mxdabc:patch-1

Conversation

@mxdabc
Copy link
Copy Markdown
Contributor

@mxdabc mxdabc commented Feb 6, 2026

Starting from FreeBSD 15, the default pkg repository name has changed from FreeBSD to FreeBSD-ports. Disabling FreeBSD: { enabled: no } no longer works, because pkg still enables FreeBSD-ports by default.

This behavior is defined in FreeBSD 15 source code:

Currently, this rename is easy to miss and causes confusion, especially when configuring third-party or regional mirrors. I suggest documenting this change clearly, or updating examples to explicitly mention that FreeBSD-ports must be disabled instead of FreeBSD on FreeBSD 15 and later.

This PR is intended as a documentation clarification only.

refer: https://blog.mxdyeah.com/post/freebsd-15-pkg-repo-freebsd-ports-trap

Starting from FreeBSD 15, the default pkg repository name has changed from `FreeBSD` to `FreeBSD-ports`.
Disabling `FreeBSD: { enabled: no }` no longer works, because pkg still enables `FreeBSD-ports` by default.

This behavior is defined in FreeBSD 15 source code:

* Default repo config: https://github.com/freebsd/freebsd-src/blob/releng/15.0/usr.sbin/pkg/FreeBSD.conf.quarterly

* Commit introducing the change: freebsd/freebsd-src@c83705a

Currently, this rename is easy to miss and causes confusion, especially when configuring third-party or regional mirrors.
I suggest documenting this change clearly, or updating examples to explicitly mention that `FreeBSD-ports` must be disabled instead of `FreeBSD` on FreeBSD 15 and later.

This PR is intended as a documentation clarification only.

refer: https://blog.mxdyeah.com/post/freebsd-15-pkg-repo-freebsd-ports-trap
Restore Markdown format.
@taoky
Copy link
Copy Markdown
Member

taoky commented Feb 6, 2026

是不是类似 Ubuntu 的帮助,直接把 FreeBSD 13/14/15 的帮助拆开来会更好?因为我看 FreeBSD 15 应该要改的地方不止 FreeBSD-ports:

image

语法可参考:https://squidfunk.github.io/mkdocs-material/reference/content-tabs/

@mxdabc
Copy link
Copy Markdown
Contributor Author

mxdabc commented Feb 7, 2026

是不是类似 Ubuntu 的帮助,直接把 FreeBSD 13/14/15 的帮助拆开来会更好?因为我看 FreeBSD 15 应该要改的地方不止 FreeBSD-ports:
image

语法可参考:https://squidfunk.github.io/mkdocs-material/reference/content-tabs/

好,我看看如何修改。FreeBSD 13 于 April 30, 2026 EOL,这里有必要列出来吗?

@taoky
Copy link
Copy Markdown
Member

taoky commented Feb 7, 2026

好,我看看如何修改。FreeBSD 13 于 April 30, 2026 EOL,这里有必要列出来吗?

随意,都可以

@mxdabc
Copy link
Copy Markdown
Contributor Author

mxdabc commented Feb 10, 2026

已经修改,请审阅。

@taoky
Copy link
Copy Markdown
Member

taoky commented Feb 10, 2026

已经修改,请审阅。

ports-kmods 和 base 的部分修改似乎没有体现。

@mxdabc
Copy link
Copy Markdown
Contributor Author

mxdabc commented Feb 12, 2026

ports-kmods 和 base 的部分修改似乎没有体现。

做了修改,请检查表述是否有误。

enabled: yes
}

ustc-ports-kmods: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起来 kmods 就是 pkgbase 的一部分?

https://wiki.freebsd.org/action/show/pkgbase

Copy link
Copy Markdown
Contributor

@ykla ykla Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起来 kmods 就是 pkgbase 的一部分?

https://wiki.freebsd.org/action/show/pkgbase

不是。kmods 是将树外常用的内核独立出来放在一个路径中,方便在安装时 bsdinstall 和安装后 fwget 调用安装。因为统一在 ports 内会出现 ABI 偶然的不兼容。

pkgbase 是 src 构建出来的,具体方法是

cd /usr/src
make -s -j$(sysctl -n hw.ncpu) TARGET_ARCH=amd64 buildworld
make -s -j$(sysctl -n hw.ncpu) TARGET_ARCH=amd64 buildkernel
make -s -j$(sysctl -n hw.ncpu) TARGET_ARCH=amd64 packages

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK,所以 kmods 是总是启用的,然后 pkgbase 是默认不打开,需要用户手工开启?

https://www.freebsd.org/releases/15.0R/announce/:

In FreeBSD 15.0, pkgbase is offered as a technology preview, ...

Copy link
Copy Markdown
Contributor

@ykla ykla Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK,所以 kmods 是总是启用的,然后 pkgbase 是默认不打开,需要用户手工开启?

https://www.freebsd.org/releases/15.0R/announce/:

In FreeBSD 15.0, pkgbase is offered as a technology preview, ...

如果用户在安装中使用了 pkgbase 这种安装方式,则会在 /usr/local/etc/pkg 下显式启用 pkgbase(主配置文件虽然是禁用的,但该自定义配置将覆盖并启用)。如果用户使用传统方式安装,则涛声依旧……

15.0 默认主配置文件在 https://github.com/freebsd/freebsd-src/blob/releng/15.0/usr.sbin/pkg/FreeBSD.conf.quarterly-release,该文件中禁用了 pkgbase,启用了 kmod 和一般的 pkg 包。

Image_1771009806777.jpg

若使用 pkgbase,则显式覆盖并启用 pkgbase,源代码在 https://github.com/freebsd/freebsd-src/blob/main/usr.sbin%2Fbsdinstall%2Fscripts%2Fpkgbase.in 第 359-362 行,15.0 也被回溯了。

Image_1771009778476.jpg

Co-authored-by: taoky <taoky99@outlook.com>
@mxdabc mxdabc requested a review from taoky February 13, 2026 19:58
@taoky taoky merged commit 9288589 into ustclug:master Feb 14, 2026
1 check passed
github-actions bot pushed a commit that referenced this pull request Feb 14, 2026
mxd: [9288589] Clarify FreeBSD 15 pkg repository rename to FreeBSD-ports (#302)

* Clarify FreeBSD 15 pkg repository rename to FreeBSD-ports

Starting from FreeBSD 15, the default pkg repository name has changed from `FreeBSD` to `FreeBSD-ports`.
Disabling `FreeBSD: { enabled: no }` no longer works, because pkg still enables `FreeBSD-ports` by default.

This behavior is defined in FreeBSD 15 source code:

* Default repo config: https://github.com/freebsd/freebsd-src/blob/releng/15.0/usr.sbin/pkg/FreeBSD.conf.quarterly

* Commit introducing the change: freebsd/freebsd-src@c83705a

Currently, this rename is easy to miss and causes confusion, especially when configuring third-party or regional mirrors.
I suggest documenting this change clearly, or updating examples to explicitly mention that `FreeBSD-ports` must be disabled instead of `FreeBSD` on FreeBSD 15 and later.

This PR is intended as a documentation clarification only.

refer: https://blog.mxdyeah.com/post/freebsd-15-pkg-repo-freebsd-ports-trap

* Restore Markdown format.

Restore Markdown format.

* Change note from 'important' to 'warning'

* Change the form of expression.

* Rewrite, change the way it is expressed

* fix Trailing spaces

* Remove extra spaces

Co-authored-by: taoky <taoky99@outlook.com>

* change "ustc" to "USTC"

---------

Co-authored-by: taoky <taoky99@outlook.com>
@mxdabc mxdabc deleted the patch-1 branch February 23, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants