mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
Merge pull request #4795 from ssbarnea/master
packaging: validate installed rpms
This commit is contained in:
9
Makefile
9
Makefile
@ -572,10 +572,13 @@ vendor-in-container:
|
|||||||
package: ## Build rpm packages
|
package: ## Build rpm packages
|
||||||
## TODO(ssbarnea): make version number predictable, it should not change
|
## TODO(ssbarnea): make version number predictable, it should not change
|
||||||
## on each execution, producing duplicates.
|
## 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
|
./contrib/build_rpm.sh
|
||||||
|
|
||||||
|
# Remember that rpms install exec to /usr/bin/podman while a `make install`
|
||||||
|
# installs them to /usr/local/bin/podman which is likely before. Always use
|
||||||
|
# a full path to test installed podman or you risk to call another executable.
|
||||||
package-install: package ## Install rpm packages
|
package-install: package ## Install rpm packages
|
||||||
sudo ${PKG_MANAGER} -y remove podman podman-remote
|
|
||||||
sudo ${PKG_MANAGER} -y clean all
|
|
||||||
sudo ${PKG_MANAGER} -y install ${HOME}/rpmbuild/RPMS/*/*.rpm
|
sudo ${PKG_MANAGER} -y install ${HOME}/rpmbuild/RPMS/*/*.rpm
|
||||||
|
/usr/bin/podman version
|
||||||
|
/usr/bin/podman info # will catch a broken conmon
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
# returned path can vary: /usr/bin/dnf /bin/dnf ...
|
# 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"
|
echo "Package manager binary: $pkg_manager"
|
||||||
|
|
||||||
|
|
||||||
@ -14,25 +14,32 @@ enabled=1
|
|||||||
gpgcheck=0" > /etc/yum.repos.d/container_virt.repo
|
gpgcheck=0" > /etc/yum.repos.d/container_virt.repo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a PKGS=(device-mapper-devel \
|
declare -a PKGS=(\
|
||||||
|
createrepo \
|
||||||
|
device-mapper-devel \
|
||||||
git \
|
git \
|
||||||
glib2-devel \
|
glib2-devel \
|
||||||
glibc-static \
|
glibc-static \
|
||||||
|
go-compilers-golang-compiler \
|
||||||
golang \
|
golang \
|
||||||
gpgme-devel \
|
gpgme-devel \
|
||||||
libassuan-devel \
|
libassuan-devel \
|
||||||
libseccomp-devel \
|
libseccomp-devel \
|
||||||
libselinux-devel \
|
libselinux-devel \
|
||||||
make \
|
make \
|
||||||
|
redhat-rpm-config \
|
||||||
rpm-build \
|
rpm-build \
|
||||||
go-compilers-golang-compiler \
|
rpmdevtools \
|
||||||
systemd-devel \
|
systemd-devel \
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $pkg_manager == *dnf ]]; then
|
if [[ $pkg_manager == *dnf ]]; then
|
||||||
# We need to enable PowerTools if we want to get
|
# We need to enable PowerTools if we want to get
|
||||||
# install all the pkgs we define in PKGS
|
# install all the pkgs we define in PKGS
|
||||||
sudo dnf config-manager --set-enabled PowerTools
|
# PowerTools exists on centos-8 but not on fedora-30 and rhel-8
|
||||||
|
if (dnf -v -C repolist all|grep "Repo-id : PowerTools" >/dev/null); then
|
||||||
|
sudo dnf config-manager --set-enabled PowerTools
|
||||||
|
fi
|
||||||
|
|
||||||
PKGS+=(python3-devel \
|
PKGS+=(python3-devel \
|
||||||
python3-varlink \
|
python3-varlink \
|
||||||
@ -53,6 +60,9 @@ export extra_arg="--without doc --without debug"
|
|||||||
echo ${PKGS[*]}
|
echo ${PKGS[*]}
|
||||||
sudo $pkg_manager install -y ${PKGS[*]}
|
sudo $pkg_manager install -y ${PKGS[*]}
|
||||||
|
|
||||||
|
# clean up src.rpm as it's been built
|
||||||
|
sudo rm -f podman-*.src.rpm
|
||||||
|
|
||||||
make -f .copr/Makefile
|
make -f .copr/Makefile
|
||||||
# workaround for https://github.com/containers/libpod/issues/4627
|
# workaround for https://github.com/containers/libpod/issues/4627
|
||||||
if [ -d ~/rpmbuild/BUILD ]; then
|
if [ -d ~/rpmbuild/BUILD ]; then
|
||||||
@ -60,6 +70,3 @@ if [ -d ~/rpmbuild/BUILD ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
rpmbuild --rebuild ${extra_arg:-} podman-*.src.rpm
|
rpmbuild --rebuild ${extra_arg:-} podman-*.src.rpm
|
||||||
|
|
||||||
# clean up src.rpm as it's been built
|
|
||||||
sudo rm -f podman-*.src.rpm
|
|
||||||
|
Reference in New Issue
Block a user