-
-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
borg 1.4 freebsd acl code does not compile on freebsd 13 #8269
Comments
I am not familiar with freebsd and ACLs on freebsd, so it would be good if a freebsd user / developer could help with this. |
Workaround for freebsd 13 borg users: use borg 1.2.x for now. |
The code comment also says to look at acl_is_trivial_np() - which has been around since 2009 so should be in FreeBSD 13. This is what FreeBSD 14.0's acl_extended_file_np and acl_extended_link_np are implemented like, and for the mainline (FreeBSD 15-CURRENT) you can select "main" in the upper right hand box. It basically looks if it's NFS4 or else just uses this acl_is_trivial_np(). https://cgit.freebsd.org/src/tree/lib/libc/posix1e/acl_extended_file_np.c?h=releng/14.0 |
- Mark broken on FreeBSD 13 due to borgbackup/borg#8269 which upstream maintainer intends to fix for borgbackup 1.4.1 (milestone). Reported by "Support SimpleRezo" in direct e-mail message. - Add UPDATING entry. The broken MOVED entry has been removed by sunpoet@ already, Reported by: Juraj Lutter <otis@>, freebsd@rail.eu.org PR: 280424 - Move py-pkgconfig to BUILD_DEPENDS to fix build failures in poudriere or on bare metal if py-pkgconfig isn't installed. Reported by: Juraj Lutter <otis@>, Hyogeol Lee <hyogeollee@gmail.com> (patch) PR: 280413
I've fixed the FreeBSD port to support FreeBSD 13.3 by importing said file, so people using FreeBSD's latest packages should be good as of the upcoming 1.4.0_1, or can build from source today. |
import acl_extended_file_np.c from src/lib/libc/posix1e, taken from FreeBSD src branch as of 559a218c9b25, 2023-11-01T16:43:37Z and tell Cython to include it on FreeBSD before 1400033, i. e., before FreeBSD's libc had it. This fixes borgbackup/borg#8269 and makes it unnecessary to look into PR: 280453
@mandree If you use freebsd and know about that stuff, can you fix the freebsd platform code in borg in a PR? |
@ThomasWaldmann feasible, but please help me help you because I am rather unfamiliar with Cython still, and we need to decide and do something in your repo that I can solve trivially by different means in the FreeBSD ports framework, which defines a Makefile variable "OSVERSION" by default, and I depend on that to decide whether to inject the libc source code file and patch setup.py to list it on that. We need to import the missing function only on older FreeBSD versions, and to find out if we are on an "older" version, we have a few options, please help me choose the right one in your context: Either we
Further sources
|
@mandree Hmm, maybe it would be easier to just use api calls that are also present on freebsd13? I wasn't even aware that I am using something that new when I implemented these changes... |
Of course... if you want to change your source code, But the FreeBSD port itself is already fixed and builds binary packages, too, so people can just run "pkg install py311-borgbackup" on supported FreeBSD 13 releases, too, and will get Borg Backup 1.4.0. Or "pkg install py311-borgbackup12" to get the prior version, 1.2.8. So I am not sure if you want to solve an issue again that I've fixed downstream in our FreeBSD packaging. |
Note: This needs a PR from some freebsd user/developer to fix the borg acl code so it is freebsd 13 compatible. The fix should be to use only api calls that exist on fbsd < 13 AND to test these fixes (with the borg test suite and also practically). |
Is borg 1.4.x “backward compatible”? That is, will borg 1.2.x work as source with a borg 1.4.0 installation that's used as a target for backups? The package manager on my Linux box will be stuck on the latest stable (1.4.x). |
@mikae1 yes, that should work. Just make sure to use borg >= 1.2.5 (see the upgrade / CVE notes at the top of the changelog), using borg clients <= 1.2.4 together with clients >= 1.2.5 (including 1.4.x) can be problematic due to bugs in <= 1.2.4. |
Great, thanks for the swift reply! While I have you on the line… Will borg 1.4.x work as source with a 1.2.5 destination too? |
Yes, that should also work. |
The code does not compile on freebsd 13 due to using
acl_extended_link_np
to determine whether a file has ACLs beyond what the normal user/group/mode bits can express.See
src/borg/platform/freebsd.pyx
.So it seems the currently the minimum requirement for borg 1.4 on freebsd is freebsd >= 14.
The text was updated successfully, but these errors were encountered: