Bug 23894

Summary: Minimal install comes with too many packages
Product: Mageia Reporter: Manuel Hiebel <manuel.mageia>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED OLD QA Contact:
Severity: normal    
Priority: Normal CC: bruno, isobuild, mageia, marja11, ngompa13, smelror, thierry.vignaud, tmb
Version: CauldronKeywords: 7beta1
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: drakxtools, gnupg2, pinentry, dnf CVE:
Status comment:
Attachments: installer logs

Description Manuel Hiebel 2018-11-25 01:11:19 CET
Description of problem:

Using last version of classical install, there is a lot of useless packaged installed

looks mate-polkit is seleted which install X and co.
Comment 1 Manuel Hiebel 2018-11-25 01:37:44 CET
Created attachment 10500 [details]
installer logs

for GTK, looks mate-polkit

* chosen mate-polkit-1.20.0-2.mga7.x86_64 for polkit-agent
* selecting mate-polkit-1.20.0-2.mga7.x86_64
* requiring accountsservice,libappindicator3.so.1()(64bit),libgdk-3.so.0()(64bit),libgdk_pixbuf-2.0.so.0()(64bit),libgtk-3.so.0()(64bit) for mate-polkit-1.20.0-2.mga7.x86_64

for QT, pinentry

* requested pinentry-gui recommended by pinentry-1.1.0-3.mga7.x86_64
* chosen pinentry-qt5-1.1.0-3.mga7.x86_64 for pinentry-gui
* selecting pinentry-qt5-1.1.0-3.mga7.x86_64
* requiring libQt5Core.so.5()(64bit),libQt5Core.so.5(Qt_5)(64bit),libQt5Core.so.5(Qt_5.11)(64bit),libQt5Gui.so.5()(64bit),libQt5Gui.so.5(Qt_5)(64bit),libQt5Widgets.so.5()(64bit),libQt5Widgets.so.5(Qt_5)(64bit) for pinentry-qt5-1.1.0-3.mga7.x86_64
* chosen lib64qt5gui5-5.11.2-2.mga7.x86_64 for libQt5Gui.so.5()(64bit)

for gstreamer, python3-dnf

* requested python3-dbus, rpm-plugin-systemd-inhibit, bash-completion, python3-unbound recommended by python3-dnf-4.0.4-1.mga7.noarch
* selecting python3-dbus-1.2.8-1.mga7.x86_64
* requiring python3dist(pygobject) for python3-dbus-1.2.8-1.mga7.x86_64
* chosen python3-gobject3-3.30.2-1.mga7.x86_64 for python3dist(pygobject)
* requiring gobject-introspection,libgirepository-1.0.so.1()(64bit),python3-cairo[>= 1.10.0-15],typelib(Gdk),typelib(GdkPixbuf),typelib(GdkX11),typelib(Gtk),typelib(Pango),typelib(cairo) for python3-gobject3-3.30.2-1.mga7.x86_64
* packageCallbackChoices: default choice ('lib64gtk-gir4.0') from lib64gtk-gir4.0,lib64gtk-gir3.0,lib64gtk-gir2.0 for typelib(GdkX11)
* replacing typelib(GdkX11) with lib64gtk-gir4.0
* requiring gtk+4.0,gtk+4.0[== 3.94.0-3.mga7],libgraphene-1.0.so.0()(64bit),libgstbase-1.0.so.0()(64bit),libgstplayer-1.0.so.0()(64bit),libgstreamer-1.0.so.0()(64bit),libgstvideo-1.0.so.0()(64bit) for lib64gtk+4_0-3.94.0-3.mga7.x86_64

Or we can exclude the recommend packages ?
Manuel Hiebel 2018-11-25 01:39:15 CET

Summary: X installed with minimal install => Minimal install comes with to much packages

Comment 2 Stig-Ørjan Smelror 2018-11-25 22:01:38 CET
Hi.

Yes, you can run

urpmi --no-recommends

to skip the recommended packages and get a cleaner install.

Cheers,
Stig

CC: (none) => smelror

Comment 3 David Walser 2018-11-25 23:05:00 CET
mate-polkit is the default polkit agent as it should be, but perhaps a minimal install should select polkit-agent-none, which would avoid the additional dependencies.

Summary: Minimal install comes with to much packages => Minimal install comes with too many packages

Comment 4 Marja Van Waes 2018-11-26 08:52:57 CET

Assigning to the mageia tools maintainers, CC'ing the iso builders.

Assignee: bugsquad => mageiatools
CC: (none) => isobuild, marja11
Source RPM: (none) => drakx-installer-stage2

Marja Van Waes 2018-11-26 09:01:51 CET

Keywords: (none) => 7beta1

Comment 5 Thierry Vignaud 2018-11-26 11:09:04 CET
Those are packaging issues, not installer issues.
I always have to clean dep loops before each release b/c people blow minimal install

CC: (none) => thierry.vignaud

Comment 6 Thierry Vignaud 2018-11-26 11:11:09 CET
s/loops/chains/
Comment 7 Thierry Vignaud 2018-11-26 18:02:37 CET
I've pushed my first work for reducing back minimal install
Comment 8 Thierry Vignaud 2018-11-26 18:04:22 CET
I've axed the deps in drakxtools, gnupg2, pinentry & dnf.

As a side work, I've also reworked perl-base so that full perl isn't pulled by basesystem: perl, meta-task & perl-Time-HiRes

Source RPM: drakx-installer-stage2 => drakxtools, gnupg2, pinentry, dnf

Comment 9 Thierry Vignaud 2018-11-27 06:36:15 CET
Note that if samba would use python3 like in FC (need enabling python3 in talloc, tevent, ldb), that would prevent pulling python2 in basesystem:
draktools-backend -> smb-client -> libsamba -> python2

CC: (none) => mageia

Comment 10 Thierry Vignaud 2018-11-27 06:43:11 CET
I emphasize this as python pulls sqlite -> icu (including icu-data)
Comment 11 Thierry Vignaud 2018-11-27 12:49:05 CET
I fixed shorewall env so that it doesn't pull full perl.
However dnf is still pulling full perl through;

dnf -> deltarpm -> Net::Domain (b:c of /usr/bin/drpmsync)

In my custom install, commenting out dnf* from rpmsrate reduces the disk usage by 140Mb (from 1068 to 928Mb)
That's huge for core pkgs.

Suggestions::
- split drpmsync from deltarpm,
- filter out server deps (but server mode would be broken in minimal install -- but who cares?)

@Neal: see also that I axed dnf deps so that it stops pulling gstreamer & co in minimal install

CC: (none) => ngompa13

Comment 12 Neal Gompa 2018-11-27 19:17:53 CET
> @Neal: see also that I axed dnf deps so that it stops pulling gstreamer & co in minimal install

Yeah, I've not liked that python3-dbus does that. It's fine to comment it out for now, but when we switch over to using DNF as our primary package manager, we should restore this as a rich dep, as Fedora does.

> dnf -> deltarpm -> Net::Domain (b:c of /usr/bin/drpmsync)

Let's subpackage this out. We actually only need /usr/bin/*deltarpm commands for DNF.

I'm open to reducing the dep chain where we can for the DNF package manager stack. I already did go through some effort recently when I rebased to DNF 3.x and 4.x to simplify and reduce the dep chain, and it's certainly something I want to keep exploring as we keep going.
Comment 13 Neal Gompa 2018-11-27 19:19:14 CET
(In reply to Neal Gompa from comment #12)
> > @Neal: see also that I axed dnf deps so that it stops pulling gstreamer & co in minimal install
> 
> Yeah, I've not liked that python3-dbus does that. It's fine to comment it
> out for now, but when we switch over to using DNF as our primary package
> manager, we should restore this as a rich dep, as Fedora does.
> 

To clarify, this is used to check with NetworkManager if your connection is metered or not, and makes it so things like dnf-makecache and dnf-automatic services don't do anything on metered connections.
Comment 14 Stig-Ørjan Smelror 2018-11-27 21:47:58 CET
I just did a minimal install with Mageia-Cauldron-netinstall-nonfree-x86_64.iso, chose to install the _really_ minimal version which states that it comes without urpm.

After logging in, I still find urpm installed. Either this string needs to be changed or some deps that pulls urpm needs to be updated.

Why do I need genhdlist2 installed on a minimal system?

Is "sash" _really_ needed? I see that it states it can be used to update shared libs and that's how far my knowledge goes.

When I uninstall lib64x86_1, it also removes
- drakx-kbd-mouse-x11
- monitor-edid
- radeon-firmware-20180710

Then I can uninstall drakx-kbd-mouse-x11-text as well.

Neither of which are necessary.
Comment 15 Manuel Hiebel 2018-11-27 21:51:38 CET
(In reply to Stig-Ørjan Smelror from comment #14)
> I just did a minimal install with
> Mageia-Cauldron-netinstall-nonfree-x86_64.iso, chose to install the _really_
> minimal version which states that it comes without urpm.
> 
> After logging in, I still find urpm installed. Either this string needs to
> be changed or some deps that pulls urpm needs to be updated.
> 
> Why do I need genhdlist2 installed on a minimal system?
> 
> Is "sash" _really_ needed? I see that it states it can be used to update
> shared libs and that's how far my knowledge goes.
> 
> When I uninstall lib64x86_1, it also removes
> - drakx-kbd-mouse-x11
> - monitor-edid
> - radeon-firmware-20180710
> 
> Then I can uninstall drakx-kbd-mouse-x11-text as well.
> 
> Neither of which are necessary.

Please create a new bug and attach the report.bug.xz, here the minimal install is with urpm and doc (ie as default)
Comment 16 Stig-Ørjan Smelror 2018-11-27 22:04:57 CET
(In reply to Manuel Hiebel from comment #15)
> 
> Please create a new bug and attach the report.bug.xz, here the minimal
> install is with urpm and doc (ie as default)

https://bugs.mageia.org/show_bug.cgi?id=23911
Comment 17 Thomas Backlund 2018-11-27 22:17:09 CET
(In reply to Stig-Ørjan Smelror from comment #14)
> I just did a minimal install with
> Mageia-Cauldron-netinstall-nonfree-x86_64.iso, chose to install the _really_
> minimal version which states that it comes without urpm.
> 
> After logging in, I still find urpm installed. Either this string needs to
> be changed or some deps that pulls urpm needs to be updated.
> 

Then it's a bug. "without urpmi" should not have installed it.

> Why do I need genhdlist2 installed on a minimal system?
> 

yes in case of "minimal with urpmi", it allows urpmi to generate missing hdlists on the fly, otherwise no.


> - drakx-kbd-mouse-x11
> - monitor-edid
> - radeon-firmware-20180710
> 
> Then I can uninstall drakx-kbd-mouse-x11-text as well.
> 
> Neither of which are necessary.

Theese are part of minimal install since it's meant to help witch gpu/display and kbd/mouse stuff without having to hunt for missing packages.

The naming could maybe be "better", but meh...

CC: (none) => tmb

Comment 18 Thierry Vignaud 2018-11-28 02:14:35 CET
(In reply to Stig-Ørjan Smelror from comment #14)
> I just did a minimal install with
> Mageia-Cauldron-netinstall-nonfree-x86_64.iso, chose to install the _really_
> minimal version which states that it comes without urpm.
> 
> After logging in, I still find urpm installed. Either this string needs to
> be changed or some deps that pulls urpm needs to be updated.
> 
> Why do I need genhdlist2 installed on a minimal system?

Because urpmi needs to call it in some cases
 
> Is "sash" _really_ needed? I see that it states it can be used to update
> shared libs and that's how far my knowledge goes.

It's pulled by the basesystem-minimal package
We carry it since 2002 but I don't remember why

> When I uninstall lib64x86_1, it also removes
> - drakx-kbd-mouse-x11
> - monitor-edid
> - radeon-firmware-20180710
> 
> Then I can uninstall drakx-kbd-mouse-x11-text as well.
> 
> Neither of which are necessary.

radeon-firmware was fixed as part of bug#23911
Comment 19 Thierry Vignaud 2018-11-28 02:16:57 CET
s/since 2002/since at least 2002/
Comment 20 Thierry Vignaud 2018-11-28 02:18:20 CET
After bug#23911, minimal install has been nearly halved
Comment 21 Thierry Vignaud 2018-11-28 02:27:35 CET
dnf/deltarpm has been processed.
It would be nice to fix samba now for python2 (Comment #9).

Also lib64python3.6-stdlib pulls python3-pip&setuptools by default, that's overkill IMHO
What's worse, we don't do it for python2...
Comment 22 Stig-Ørjan Smelror 2018-11-28 12:03:43 CET
May I suggest adding openssh-clients to minimal install.

It enables users to transfer files and connect to other computers in case of emergency and I find those tools essential.

It doesn't come with any network tools as of now.

Cheers,
Stig
Comment 23 Neal Gompa 2018-11-28 13:43:46 CET
(In reply to Thierry Vignaud from comment #21)
> dnf/deltarpm has been processed.
> It would be nice to fix samba now for python2 (Comment #9).
> 
> Also lib64python3.6-stdlib pulls python3-pip&setuptools by default, that's
> overkill IMHO
> What's worse, we don't do it for python2...

pip and setuptools aren't recommends? At least starting with Python 3.4 (I think?), Python bundles them because the `python3 -m venv` standard library module[1] expects it. So at least this is why pip and setuptools are pulled in by default.

[1]: https://docs.python.org/3/tutorial/venv.html
Comment 24 Thierry Vignaud 2018-11-28 14:06:50 CET
(In reply to Stig-Ørjan Smelror from comment #22)
> May I suggest adding openssh-clients to minimal install.

This is about reducing min install, not blowing it.
ssh client is NOT needed for min install.
if _you_ want it by default, do  like me, with an auto_inst.cfg.pl file containing the pkgs _you_ need.

Mine contains eg:
   'bash-completion', # better debugging
   'curl',            # network debugging
   'ntfs-3g',         # playing with 'bug'
   'openssh-clients', # for lftp fish://
   'openssh-server',  # for remote debugging
   'spice-vdagent',   # for mouse integration
   'strace',          # debugging
   'sudo',            # remote dbg 
   'vim-enhanced',    # better debugging
(...)

but there's no point in adding such pkgs to basesystem{,-minimal}
Comment 25 Stig-Ørjan Smelror 2018-11-28 20:20:56 CET
Another idea if we want to save a few installed bytes is to look at the core packages and see if they include documentation. If they do, separate or eliminate them.
Comment 26 Neal Gompa 2018-11-29 02:26:48 CET
(In reply to Stig-Ørjan Smelror from comment #25)
> Another idea if we want to save a few installed bytes is to look at the core
> packages and see if they include documentation. If they do, separate or
> eliminate them.

Why? We have transaction flags for automatically filtering those out if we need to per install.
Comment 27 Stig-Ørjan Smelror 2018-11-29 10:57:36 CET
(In reply to Neal Gompa from comment #26)
> (In reply to Stig-Ørjan Smelror from comment #25)
> > Another idea if we want to save a few installed bytes is to look at the core
> > packages and see if they include documentation. If they do, separate or
> > eliminate them.
> 
> Why? We have transaction flags for automatically filtering those out if we
> need to per install.

I'm no expert, so just throwing out ideas. They may sound stupid, but that's just my level of knowledge.

How do we filter out these if we need to?

Cheers,
Stig
Comment 28 Thierry Vignaud 2018-11-29 11:05:12 CET
Just:
1) Choose "Custom Desktop" when choosing a desktop
2) Click on "Unselect All" when you got the list of categories with checkboxes
(in "Package Group Selection")
3) On next screen, just unselect "With basic documentation (recommended!)"
Comment 29 Bruno Cornec 2018-11-29 20:26:06 CET
I think that what Stig-Ørjan means is if there are large documentation files in core packages to split them in a different sub-package (with a recommends tag) to save space on the minimal install, not number of packages here. I'm unsure whether we have such huge docs embedded in core packages however.

Another way to test this, is to use a choot that canserve as a base for a Docker container, such what I'm doing for my tests with https://github.com/bcornec/mageia-docker/blob/master/mageia-docker
I'm not yet ready to advertize that largely, but if you find it useful, feel free to reuse !

CC: (none) => bruno

Comment 30 Manuel Hiebel 2021-03-16 18:45:40 CET
Old

Resolution: (none) => OLD
Status: NEW => RESOLVED