Skip to content

Replace liberasurecode with a source build for Swift - #104

Open
fmount wants to merge 4 commits into
openstack-k8s-operators:mainfrom
fmount:swift
Open

Replace liberasurecode with a source build for Swift#104
fmount wants to merge 4 commits into
openstack-k8s-operators:mainfrom
fmount:swift

Conversation

@fmount

@fmount fmount commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Replace the liberasurecode / liberasurecode-devel RPMs with a source build of liberasurecode in the build stage of all four swift service Containerfiles.

@openshift-ci

openshift-ci Bot commented Aug 19, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fmount for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fmount
fmount requested a review from yazug August 19, 2026 07:55
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 10d243fa-b804-4e49-88c8-7ebc21c4de9d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fmount
fmount requested a review from amoralej August 19, 2026 07:55
@fmount

fmount commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@amoralej @yazug @tosky I'm creating this PR as a placeholder for you to take a look for further discussion before moving forward. This would avoid the separately package liberasurecode for swift (which is the only service in openstack using it).

@fmount
fmount force-pushed the swift branch 3 times, most recently from 9444731 to 9a95420 Compare August 19, 2026 13:23

@amoralej amoralej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've tested this and I think it works, liberasurecode is properly built and installed and that allows to also build pyeclib from code.

I'm not sure if there is any policy or best practice we should follow when installing c code from source from reldel, so I will wait for @yazug to coment on.

I'd say we may want to pin liberasurecode as the version of pyeclib in u-c may have specific dependencies on liberasurecode.

Comment thread containers/swift/sources.txt Outdated
Comment thread containers/swift/sources.txt Outdated
@yazug

yazug commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

is there a way we can decouple churning the upper-constraints every time, because that will contribute to merge conflict if there is more than one MR for this project.

@fmount

fmount commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

is there a way we can decouple churning the upper-constraints every time, because that will contribute to merge conflict if there is more than one MR for this project.

We might need to follow up on this. While we have patches in place to not update lock files for all the other projects, we need to discuss if we need parameters to skip upper-constraints. At the moment we're heavily following master, so I assume multiple PRs on the same set of files will get the latest bits, but in the long term if we start landing the automatic bump proposed by the bot, we shouldn't get too many conflicts. I'd say this is a good topic to follow up.

fmount and others added 4 commits August 20, 2026 00:20
Replace the liberasurecode / liberasurecode-devel RPMs with a source
build of liberasurecode (pinned to v1.1.1 via sources.txt) in the build
stage of all four swift service Containerfiles. The compiled shared
library is copied into the runtime stage, so pyeclib links against a
source-built liberasurecode rather than the distro package.

- sources.txt: add liberasurecode repo pinned to v1.1.1
- builddeps.txt: drop liberasurecode-devel, add autotools (make,
  autoconf, automake, libtool)
- bindeps.txt: drop the liberasurecode runtime RPM
- rpms.in.yaml: same package swaps (regenerate rpms.lock.yaml)
- Containerfiles: autogen/configure/make/make install into a staging
  DESTDIR, copy runtime .so into the final image. Build with
  CFLAGS="-Wno-error" since v1.1.1 trips -Werror=address-of-packed-member
  on newer GCC (--disable-werror is a no-op upstream).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
Extract the inline liberasurecode source-build block from all four swift
Containerfiles into common/build-liberasurecode.sh, invoked via COPY+RUN.
Single source of truth for the build logic; the four images still build
it independently. Matches the existing common/ sharing pattern (e.g.
common/swift-sudoers).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
pyeclib 1.8.0's C extension calls liberasurecode_get_version() and
liberasurecode_backend_available(), which only exist on liberasurecode
master (internally version 1.8.0). The newest git tag, v1.1.1 (2016),
predates these APIs, so source builds (PIP_NO_BINARY=:all:) failed with
implicit-declaration compile errors. Wheel builds were unaffected since
the PyPI manylinux wheel vendors its own modern liberasurecode.

Pin liberasurecode to master and, in build-liberasurecode.sh, restrict
the build to the src subdir: master's test binaries fail to link against
internal (non-exported) symbols on newer toolchains, and doc only builds
Doxygen HTML we don't ship. The library, headers and .pc file all install
from the top-level Makefile, so nothing needed is lost.

Verified both the wheel and :all: build paths produce working EC
(liberasurecode_rs_vand encode/decode).

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@amoralej

Copy link
Copy Markdown
Contributor

is there a way we can decouple churning the upper-constraints every time, because that will contribute to merge conflict if there is more than one MR for this project.

We might need to follow up on this. While we have patches in place to not update lock files for all the other projects, we need to discuss if we need parameters to skip upper-constraints. At the moment we're heavily following master, so I assume multiple PRs on the same set of files will get the latest bits, but in the long term if we start landing the automatic bump proposed by the bot, we shouldn't get too many conflicts. I'd say this is a good topic to follow up.

Why we'd want to skip upper-constraints update? . Note that the periodic update-sources job will propose in the same PR updating sources and upper-constraints which I think it's the best way for s2i to keep updated. Now, where we are in very active development it's right that this can lead to conflicts easily (that's why we haven't been merging the daily automatic updates) but once containerfiles are more stable I expect the workflow to work.

If a project wants to skip u-c updates for any reason, they can pin it to a specific commit hash in the sources.txt (replacing the branch name by the hash itself). It should be avoided as it will lead to out-of-date dependencies. More sofisticated methods of maintaining it (i.e. patching specific deps in upstream u-c ) are not supported by build.sh although may be implemented in future.

@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yazug

yazug commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

no objections to this approach /lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants