Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion base/debian-10/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ ln -sf /usr/share/zoneinfo/UTC /etc/localtime
apt update

# put back tools for customer support
apt-get install -y --no-install-recommends curl sudo libgssapi-krb5-2 busybox procps acl gcc libssl-dev libffi-dev python2-dev
apt-get install -y --no-install-recommends curl sudo libgssapi-krb5-2 busybox procps acl gcc libpython-dev libffi-dev libssl-dev
apt-get install -y --no-install-recommends python-pip python-setuptools python-requests python-yaml
pip --no-cache-dir install ansible
apt-get remove -y gcc libffi-dev libssl-dev libpython-dev
apt-get autoremove -y

cd /bin
ln -s busybox killall
Expand Down
8 changes: 4 additions & 4 deletions base/redhat-8/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ microdnf -y --nodocs install glibc-langpack-en
#We get around the gen above by forcing the language install, and then point to it.
export LANG=en_US.utf8

microdnf -y --nodocs install wget sudo shadow-utils procps
microdnf -y --nodocs install wget sudo shadow-utils procps tar
#install busybox direct from the multiarch since epel isn't availible yet for redhat8
wget -O /bin/busybox https://busybox.net/downloads/binaries/1.28.1-defconfig-multiarch/busybox-`arch`
chmod +x /bin/busybox
microdnf -y --nodocs install gcc redhat-rpm-config python2-devel libffi-devel openssl-devel tar
microdnf -y --nodocs install python2-pip python2-devel redhat-rpm-config gcc libffi-devel openssl-devel
pip2 --no-cache-dir install requests ansible
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to use pip for these? Are there no rpm packages available? Perhaps we should try pushing this upstream to Red Hat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found the requests package at microdnf install python2-requests but none for ansible as of yet. Switching to python2-requests does not make much of a difference compared to the pip installed one:

base-redhat-8               latest         38feade3e92c       About a minute ago   334MB
base-redhat-8-piprequests   latest         ac651e75a3a5       3 minutes ago        334MB

I guess the only benefit would be to remove pip entirely for any image size savings, but we may still need it for ansible. I guess if we really wanted, we would also remove pip after we've installed the relevant packages?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree not worth it for just requests.. I think best approach (longer term) would be to push this request to Red Hat, and see if they could include rpm for ansible or alternatively include the s390 binaries for cryptography, so that the pip command doesn't require gcc etc. and building it from source.

microdnf -y remove gcc libffi-devel openssl-devel
microdnf clean all
microdnf -y remove gcc libffi-devel openssl-devel redhat-rpm-config python2-devel device-mapper-libs device-mapper cryptsetup-libs systemd systemd-pam dbus dbus-common dbus-daemon dbus-tools dbus-libs go-srpm-macros iptables-libs ocaml-srpm-macros openblas-srpm-macros qt5-srpm-macros perl-srpm-macros rust-srpm-macros ghc-srpm-macros platform-python python3-rpm-generators platform-python-setuptools python3-libs platform-python-pip python3-rpm-generators python3-rpm-macros elfutils-libs efi-srpm-macros zip unzip xkeyboard-config libxkbcommon redhat-rpm-config util-linux dwz file file-libs findutils iptables-libs diffutils annobin python-rpm-macros python-srpm-macros python2-devel python2-rpm-macros kmod-libs libfdisk libffi-devel libpcap libseccomp libutempter


cd /bin
ln -s python2 python || true
Expand Down