Skip to content

Require correct libc version on built packages and update license#56

Open
rustybee42 wants to merge 6 commits intomainfrom
rb/package-build-libc-requirement
Open

Require correct libc version on built packages and update license#56
rustybee42 wants to merge 6 commits intomainfrom
rb/package-build-libc-requirement

Conversation

@rustybee42
Copy link
Collaborator

@rustybee42 rustybee42 commented Feb 27, 2026

Also Update Rust and dependencies.

Closes #7

@rustybee42 rustybee42 self-assigned this Feb 27, 2026
@rustybee42 rustybee42 requested a review from a team as a code owner February 27, 2026 12:20
@rustybee42 rustybee42 force-pushed the rb/package-build-libc-requirement branch from 6b25e86 to 87a2f61 Compare March 3, 2026 11:30
@rustybee42
Copy link
Collaborator Author

rustybee42 commented Mar 3, 2026

Check if the new include field can be used to dynamically inject the settings into Cargo.toml instead of patching the file. Will get stabilized with Rust 1.94 very soon.

Edit: Done

Done by patching the Cargo.toml file temporarily (cargo deb does not
provide a command line option to set that). Since we usually don't want
to make automatic changes to the source code, we store the original file
and restore it after the script completes (even on error).
Before the build would just silently ignore GLIBC_VERSION and build
normally (without zigbuild).
@rustybee42 rustybee42 force-pushed the rb/package-build-libc-requirement branch from 87a2f61 to d19bb0a Compare March 6, 2026 08:01
@rustybee42
Copy link
Collaborator Author

TODO: Check if the new include field can be used to dynamically inject the settings into Cargo.toml instead of patching the file. Will get stabilized with Rust 1.94 very soon.

No, that doesn't really work or is at least not less complicated. Not doing that for now.

Makefile Outdated
# Patch deb specs
sed -i 's/depends = "libbeegfs-license/depends = "libc6 (>= $(GLIBC_VERSION)), libbeegfs-license/' mgmtd/Cargo.toml
# Patch rpm specs
sed -i 's/libbeegfs-license = ">=/libc6 = ">= $(GLIBC_VERSION)"\nlibbeegfs-license = ">=/' mgmtd/Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

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

todo: please double check, but I'm fairly certain on RPM-based distributions the package is glibc and libc6 is only for Debian/Ubuntu:

$ dnf repoquery --requires --resolve beegfs-meta
Last metadata expiration check: 0:00:58 ago on Fri 06 Mar 2026 03:14:29 PM CST.
bash-0:5.2.26-6.el10.aarch64
glibc-0:2.39-58.el10_1.7.aarch64
libblkid-0:2.40.2-15.el10_1.aarch64
libgcc-0:14.3.1-2.1.el10.aarch64
libnl3-0:3.11.0-1.el10.aarch64
libstdc++-0:14.3.1-2.1.el10.aarch64
libuuid-0:2.40.2-15.el10_1.aarch64

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are probably right. I looked this up and found some libc6 rpms which tricked me into thinking that libc6 would be correct.

regex = "1"
ring = "0"
rusqlite = { version = "0", features = ["bundled", "vtab", "array"] }
rusqlite = { version = "0", features = ["bundled", "vtab", "array", "fallible_uint"] }
Copy link
Member

Choose a reason for hiding this comment

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

question: what prompted you to enable fallible_uint?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using u64 as sqlite parameters is now disabled by default as the conversion to i64 which is internally used by sqlite can fail. This reenables it.

Makefile Outdated
@@ -123,12 +142,10 @@ package:
Copy link
Member

Choose a reason for hiding this comment

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

todo: this comment is now stale.

Comment on lines +200 to +201

#[allow(clippy::result_large_err)]
Copy link
Member

Choose a reason for hiding this comment

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

suggestion(non-blocking): if we're silencing a linter warning it'd be worth adding a comment explaining why we made that choice instead of addressing it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is actually a problem with the tonic 0.13 protobuf generator. I'll rather check if I can upgrade to 0.14, which should fix it.

Copy link
Member

@iamjoemccormick iamjoemccormick Mar 6, 2026

Choose a reason for hiding this comment

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

todo: as part of migrating from the EULA wording to "BeeGFS License Agreement" we should also update:

  • The license file at mgmtd/LICENSE.md. Ideally we remove it so we don't have the license in multiple places. If we need it at that path (e.g., to simplify package building), we could make it a symlink to this top level file.
  • The copyright file at mgmtd/assets/copyright.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done by pointing the package build to ../LICENSE.md instead. Don't know why it wasn't done like that before.

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.

Set the correct package requirements and suggestions from the Makefile

2 participants