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

Avoid installing weak dependencies #846

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Jul 8, 2022

Depends on

The following weak dependencies will end up not being installed.

apr-util-bdb
apr-util-openssl
geolite2-city
geolite2-country
libmaxminddb
perl-Digest
perl-Digest-MD5
perl-IO-Socket-IP
perl-IO-Socket-SSL
perl-libnet
perl-Mozilla-CA
perl-Net-SSLeay
perl-URI
python38-pip
python3-jmespath
rubygem-bundler
rubygem-json
rubygem-rdoc

This drops the image size roughly from 2.063GB to 1.943GB (120MB, 5.85%). Of note, the geolite2 packages are somewhat large, so part of #736


Packages sizes sorted by size:

56549434  geolite2-city
 7784945  python38-pip
 3424334  geolite2-country
 1714611  rubygem-rdoc
 1359290  rubygem-bundler
 1325271  perl-Net-SSLeay
  618705  perl-IO-Socket-SSL
  277135  perl-libnet
  216452  perl-URI
  119891  python3-jmespath
   99525  perl-IO-Socket-IP
   97777  rubygem-json
   56718  perl-Digest-MD5
   54260  libmaxminddb
   26685  perl-Digest
   20448  apr-util-openssl
   11920  apr-util-bdb
    5716  perl-Mozilla-CA

@Fryguy Fryguy requested a review from bdunne as a code owner July 8, 2022 21:25
@miq-bot miq-bot added the wip label Jul 8, 2022
@Fryguy Fryguy force-pushed the weak_deps branch 3 times, most recently from d583813 to 78024d7 Compare July 8, 2022 22:33
@Fryguy Fryguy changed the title [WIP] Avoiding installing weak dependencies Avoid installing weak dependencies Jul 11, 2022
The following weak dependencies will end up not being installed.

```
apr-util-bdb
apr-util-openssl
geolite2-city
geolite2-country
libmaxminddb
perl-Digest
perl-Digest-MD5
perl-IO-Socket-IP
perl-IO-Socket-SSL
perl-libnet
perl-Mozilla-CA
perl-Net-SSLeay
perl-URI
python38-pip
python3-jmespath
rubygem-bundler
rubygem-json
rubygem-rdoc
```

This drops the image size roughly from 2.063GB to 1.943GB (120MB, 5.85%). Of
note, the geolite2 packages are somewhat large, so part of ManageIQ#736
@miq-bot
Copy link
Member

miq-bot commented Jul 11, 2022

Checked commit Fryguy@2590c5e with ruby 2.6.9, rubocop 1.19.1, haml-lint 0.35.0, and yamllint
0 files checked, 0 offenses detected
Everything looks fine. ⭐

@@ -45,7 +45,7 @@ COPY container-assets/clean_dnf_rpm /usr/local/bin/

RUN curl -L https://releases.ansible.com/ansible-runner/ansible-runner.el8.repo > /etc/yum.repos.d/ansible-runner.repo

RUN dnf -y --disableplugin=subscription-manager --setopt=tsflags=nodocs install \
RUN dnf -y --disableplugin=subscription-manager --setopt=tsflags=nodocs --setopt=install_weak_deps=False install \
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
RUN dnf -y --disableplugin=subscription-manager --setopt=tsflags=nodocs --setopt=install_weak_deps=False install \
RUN dnf config-manager --setopt=tsflags=nodocs --setopt=install_weak_deps=False --save && \
dnf -y --disableplugin=subscription-manager install \

Then we can drop those settings from all following commands.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we want to put subscription-manager in there too

Copy link
Member Author

@Fryguy Fryguy Jul 11, 2022

Choose a reason for hiding this comment

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

I was gonna ask if you wanted to do that - do we want that for this PR or a followup ?

I was thinking of doing that as a followup and in the base image right at the beginning

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if we want to put subscription-manager in there too

Unfortunately, we still need subscription-manager for the s390x builds.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, #847

@bdunne bdunne merged commit d2fa8f5 into ManageIQ:master Jul 11, 2022
@Fryguy Fryguy deleted the weak_deps branch July 12, 2022 15:11
Fryguy added a commit to Fryguy/manageiq-appliance-build that referenced this pull request Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants