-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rpm: assure we build and use a rpm repository #4796
Closed
Closed
Changes from all commits
Commits
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 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 |
---|---|---|
|
@@ -568,8 +568,17 @@ vendor-in-container: | |
package: ## Build rpm packages | ||
## TODO(ssbarnea): make version number predictable, it should not change | ||
## on each execution, producing duplicates. | ||
rm -f ~/rpmbuild/RPMS/x86_64/* ~/rpmbuild/RPMS/noarch/* | ||
rm -rf build/* *.src.rpm ~/rpmbuild/RPMS/*/* | ||
./contrib/build_rpm.sh | ||
|
||
package-install: package ## Install rpm packages | ||
sudo ${PKG_MANAGER} -y install --allowerasing ${HOME}/rpmbuild/RPMS/*/*.rpm | ||
package-install: package ## Install rpm packages via a local podman.repo | ||
# We use the repository approach with max priority and without disabling | ||
# system packages in order to detect if our packages are | ||
# creating any conflicts. | ||
ls -la ${PWD}/build/buildset | ||
sudo cp -f ${PWD}/build/podman.repo /etc/yum.repos.d/podman.repo | ||
# --best needed to avoid accident where old rpms ones are picked instead | ||
sudo ${PKG_MANAGER} -y install --best --allowerasing --nogpgcheck podman podman-remote | ||
podman version | ||
# info may require sudo and will also verify conman compatibility | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/conman/conmon |
||
sudo podman info --log-level debug |
This file contains 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
set -euxo pipefail | ||
|
||
# returned path can vary: /usr/bin/dnf /bin/dnf ... | ||
pkg_manager=`command -v dnf yum | head -n1` | ||
pkg_manager=$(command -v dnf yum | head -n1) | ||
echo "Package manager binary: $pkg_manager" | ||
|
||
|
||
|
@@ -14,18 +14,22 @@ enabled=1 | |
gpgcheck=0" > /etc/yum.repos.d/container_virt.repo | ||
fi | ||
|
||
declare -a PKGS=(device-mapper-devel \ | ||
declare -a PKGS=(\ | ||
createrepo \ | ||
device-mapper-devel \ | ||
git \ | ||
glib2-devel \ | ||
glibc-static \ | ||
go-compilers-golang-compiler \ | ||
golang \ | ||
gpgme-devel \ | ||
libassuan-devel \ | ||
libseccomp-devel \ | ||
libselinux-devel \ | ||
make \ | ||
redhat-rpm-config \ | ||
rpm-build \ | ||
go-compilers-golang-compiler \ | ||
rpmdevtools \ | ||
systemd-devel \ | ||
) | ||
|
||
|
@@ -47,7 +51,7 @@ else | |
fi | ||
|
||
echo ${PKGS[*]} | ||
sudo $pkg_manager install -y ${PKGS[*]} | ||
sudo $pkg_manager install --disablerepo podman -y ${PKGS[*]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe a comment to explain why we need the |
||
|
||
make -f .copr/Makefile | ||
# workaround for https://github.com/containers/libpod/issues/4627 | ||
|
@@ -56,3 +60,21 @@ if [ -d ~/rpmbuild/BUILD ]; then | |
fi | ||
|
||
rpmbuild --rebuild ${extra_arg:-} podman-*.src.rpm | ||
|
||
# build repository | ||
mkdir -p build/buildset | ||
pushd build/buildset | ||
cp -l ~/rpmbuild/RPMS/*/*.rpm . | ||
createrepo . | ||
|
||
cat <<EOF >../podman.repo | ||
[podman] | ||
priority=1 | ||
name=Podman Override | ||
baseurl=file://${PWD} | ||
enabled=1 | ||
gpgcheck=0 | ||
metadata_expire=1s | ||
cost=0 | ||
EOF | ||
popd |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: these comments will also display on stdout when the
package-install
recipe is executing. Not a huge problem but does add a bit to output clutter. Would the comment be just as useful for maintainers if placed above the target?