forked from xenserver/xenserver-build-env
-
Notifications
You must be signed in to change notification settings - Fork 21
Support for a v9 build-env #35
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
+306
−154
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e987f73
run.py: raise the ulimit nofile value
ydirson ec70301
build.sh: handle more relevant versions first
ydirson e8cfd2f
init-container: fix "run.py --define=... --rebuild-srpm=..."
ydirson 3f7be42
Make --platform flag systematic
ydirson f8a1aed
Move yum clean all from init-container to Dockerfile
ydirson 6c35da2
run.py: drop unused --package flag
ydirson 2dd739b
run.py: drop unused --srpm and --rebuild-srpm flags
ydirson a894ec4
init-container: avoid copypasta
ydirson a1ca31d
run the build under `time` control
ydirson 4fbcf1b
Set ghcr.io registry for the container
ydirson c47e597
Move repo logic in the dockerfiles
glehmann 1b0abb5
Initial support for XCP-ng 9 build-env
ydirson 0614c18
init-container: make OS_RELEASE available for setting other vars
ydirson 0191b85
Build 9.0 for x86_64_v2
ydirson 4d1d601
run.py: allow selection of container platform
ydirson cb3c932
build.sh: add support for options
ydirson 9ce2a76
build.sh: allow selection of container platform
ydirson 1b72667
run.py: add --rpmbuild-opts to help use "rpmbuild --without xxx" etc
ydirson 524c4dd
run.py --local-build: detect spec file paths
ydirson d623a26
run.py --local-build: teach fetching source tarballs from the Almalin…
ydirson f82d2f9
run.sh: --rpmbuild-stage to override "-ba"
ydirson cf41223
run.py: new --debug flag
ydirson ec22871
README: provide an example to refresh patches
ydirson fee2790
Adjust /etc/shadow permissions to unbreak sudo un some setups
ydirson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
FROM ghcr.io/almalinux/10-base:10.0 | ||
|
||
ARG CUSTOM_BUILDER_UID="" | ||
ARG CUSTOM_BUILDER_GID="" | ||
|
||
# Add our repositories | ||
# temporary bootstrap repository | ||
COPY files/xcp-ng-8.99.repo /etc/yum.repos.d/xcp-ng.repo | ||
# Almalinux 10 devel | ||
COPY files/Alma10-devel.repo /etc/yum.repos.d/ | ||
|
||
# Install GPG key | ||
RUN curl -sSf https://xcp-ng.org/RPM-GPG-KEY-xcpng -o /etc/pki/rpm-gpg/RPM-GPG-KEY-xcpng | ||
|
||
# Update | ||
RUN dnf update -y | ||
|
||
# Common build requirements | ||
RUN dnf install -y \ | ||
gcc \ | ||
gcc-c++ \ | ||
git \ | ||
make \ | ||
rpm-build \ | ||
redhat-rpm-config \ | ||
python3-rpm \ | ||
sudo \ | ||
dnf-plugins-core \ | ||
epel-release | ||
|
||
# EPEL: needs epel-release installed first | ||
RUN dnf install -y \ | ||
epel-rpm-macros \ | ||
almalinux-git-utils | ||
|
||
# Niceties | ||
RUN dnf install -y \ | ||
bash-completion \ | ||
vim \ | ||
wget \ | ||
which | ||
|
||
# clean package cache to avoid download errors | ||
RUN yum clean all | ||
|
||
# -release*, to be commented out to boostrap the build-env until it gets built | ||
# FIXME: isn't it already pulled as almalinux-release when available? | ||
RUN dnf install -y \ | ||
xcp-ng-release \ | ||
xcp-ng-release-presets | ||
|
||
# enable repositories commonly required to build | ||
RUN dnf config-manager --enable crb | ||
|
||
# workaround sudo not working (e.g. in podman 4.9.3 in Ubuntu 24.04) | ||
RUN chmod 0400 /etc/shadow | ||
|
||
# Set up the builder user | ||
RUN bash -c ' \ | ||
OPTS=(); \ | ||
if [ -n "${CUSTOM_BUILDER_UID}" ]; then \ | ||
OPTS+=("-u" "${CUSTOM_BUILDER_UID}"); \ | ||
fi; \ | ||
if [ -n "${CUSTOM_BUILDER_GID}" ]; then \ | ||
OPTS+=("-g" "${CUSTOM_BUILDER_GID}"); \ | ||
if ! getent group "${CUSTOM_BUILDER_GID}" >/dev/null; then \ | ||
groupadd -g "${CUSTOM_BUILDER_GID}" builder; \ | ||
fi; \ | ||
fi; \ | ||
useradd "${OPTS[@]}" builder; \ | ||
' \ | ||
&& echo "builder:builder" | chpasswd \ | ||
&& echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
|
||
RUN mkdir -p /usr/local/bin | ||
COPY files/init-container.sh /usr/local/bin/init-container.sh | ||
|
||
# FIXME: check it we really need any of this | ||
# COPY files/rpmmacros /home/builder/.rpmmacros |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[alma10-devel] | ||
name=Almalinux 10 devel | ||
baseurl=https://repo.almalinux.org/almalinux/10/devel/$basearch/os/ | ||
enabled=1 | ||
gpgcheck=1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.