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

RHEL8 spec update to require moby-engine or docker-ce #6972

Merged
merged 8 commits into from
Apr 12, 2023
Merged
27 changes: 14 additions & 13 deletions edgelet/contrib/enterprise-linux/aziot-edge.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ URL: https://github.com/azure/iotedge
%{?systemd_requires}
BuildRequires: systemd
Requires(pre): shadow-utils
Requires: (moby-engine or docker-ce)
Requires: aziot-identity-service = 1.4.0~dev-1%{?dist}
Source0: aziot-edge-%{version}.tar.gz

Expand Down Expand Up @@ -62,19 +63,6 @@ make \
rm -rf $RPM_BUILD_ROOT

%pre
# Check for container runtime
if ! /usr/bin/getent group docker >/dev/null; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
echo " ERROR: No container runtime detected."
echo ""
echo " Please install a container runtime and run this install again."
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

exit 1
fi

# Create iotedge group
arsing marked this conversation as resolved.
Show resolved Hide resolved
if ! /usr/bin/getent group iotedge >/dev/null; then
%{_sbindir}/groupadd -r %{iotedge_group}
Expand Down Expand Up @@ -118,6 +106,19 @@ fi
exit 0

%post
# Check for container runtime
if ! /usr/bin/getent group docker >/dev/null; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo ""
echo " ERROR: No container runtime detected."
echo ""
echo " Please install a container runtime and run this install again."
echo ""
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"

exit 1
fi

if [ ! -f '/etc/aziot/config.toml' ]; then
echo "==============================================================================="
echo ""
Expand Down