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

Remove MUSL and enable threadless libgit2 support #853

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Jul 29, 2022

Use of MUSL was a temporary solution to mitigate cross-platform
issues while building openssl and libssh2. Since Unmanaged transport has
been deprecated, openssl and libssh2 dependencies are no longer required
and by extension MUSL.

Enables libgit2 threadless support and provides a regression assurance
for fluxcd/image-automation-controller#339.

Relates to fluxcd/golang-with-libgit2#37
Fixes issues downloading musl at CI.

@pjbgf pjbgf added the area/git Git related issues and pull requests label Jul 29, 2022
@pjbgf pjbgf force-pushed the remove-musl branch 8 times, most recently from 6138c3d to d995ae1 Compare July 31, 2022 17:31
@pjbgf pjbgf changed the title Remove MUSL dependencies Remove MUSL and enable threadless libgit2 support Jul 31, 2022
export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libgit2) -static" && \
GOARCH=$TARGETARCH go build \
RUN export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig" && \
export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libgit2) -static -fuse-ld=lld" && \
Copy link
Member Author

Choose a reason for hiding this comment

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

lld is being used to bypass issues cross-compiling for armv7.

Use of MUSL was a temporary solution to mitigate cross-platform
issues while building openssl and libssh2. Since Unmanaged transport has
been deprecated, openssl and libssh2 dependencies are no longer required
and by extension MUSL.

Enables libgit2 threadless support and provides a regression assurance
for fluxcd/image-automation-controller#339.

Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
@pjbgf pjbgf marked this pull request as ready for review July 31, 2022 18:07
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @pjbgf 🥇

@stefanprodan stefanprodan merged commit 574bb4c into fluxcd:main Aug 1, 2022
@pjbgf pjbgf deleted the remove-musl branch August 2, 2022 13:14
@pjbgf pjbgf added this to the GA milestone Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/git Git related issues and pull requests
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants