Skip to content
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

cargo/rust, off-line and reproduceable builds #1537

Open
ac000 opened this issue Jan 10, 2025 · 3 comments
Open

cargo/rust, off-line and reproduceable builds #1537

ac000 opened this issue Jan 10, 2025 · 3 comments

Comments

@ac000
Copy link
Member

ac000 commented Jan 10, 2025

          > * Re-do the last commit to keep BSD make working

This looks good to me, thank you.

Another issue is related to cargo build procedure. FreeBSD uses poudriere(8) package builder to build ports, and network connectivity is unavailable after the fetch phase (phases are: fetch -> patch -> configure -> build -> install, all have pre- and post- targets). I do believe we may follow a similar to unit-java module procedure for the case. I'm glad to hear your thoughts on that.

Thank you in advance.

Originally posted by @osokin in #1527 (comment)

@ac000
Copy link
Member Author

ac000 commented Jan 10, 2025

From @remicollet

and network connectivity is unavailable after the fetch

Same issue with RPM build (which are done offline, especially required for reproducible builds)
A solution is to vendor cargo dependencies (not yet done for unit, but already used in some other packages)

@ac000
Copy link
Member Author

ac000 commented Jan 10, 2025

From @osokin

From @remicollet

and network connectivity is unavailable after the fetch

Same issue with RPM build (which are done offline, especially required for reproducible builds) A solution is to vendor cargo dependencies (not yet done for unit, but already used in some other packages)

Yeah, so I've created a separate port specifically for the Unit's OTel, devel/unit-otel.

@remicollet
Copy link
Contributor

remicollet commented Jan 13, 2025

For your information RPM offline build with OTEL enabled is done using vendored cargo directory

Solution

1/ build sources tarball with dependencies

See https://git.remirepo.net/cgit/rpms/unit.git/tree/makedeps.sh

2/ add configuration to use vendored libraries

See https://git.remirepo.net/cgit/rpms/unit.git/tree/unit.spec#n94

P.S. BTW, this is a workaround, proper way is to follow the Fedora Rust Packaging Guidelines, but this requires that all libraries are available in the repository.

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

No branches or pull requests

2 participants