clearlinux / mixer-tools

Software update mixer and related tools
Apache License 2.0
27 stars 37 forks source link

mixer creates overcrowded chroot #760

Closed gregor160300 closed 1 year ago

gregor160300 commented 4 years ago

When using local RPMs created by autospec we end up with much more in our bundle than what is in the RPMs even though the bundle doesn't define any dependencies.

When using this autospec to create the RPMs and then putting these RPMs into the local-rpms folder, doing an rpm-add, creating and adding a local bundle containing only the line transmission (to include the RPMs). We get a chroot that is way larger than only the files in our package (see the attached file export list). Also, note that I am using a local empty os-core here in order to build 3rd-party packages.

transmission-bundle.txt tranmission-files.txt

EDIT: It seems this is somewhat of a desired behaviour as mixer downloads all the packages that provide the libs used by the local RPMs. (And because these might also have dependencies you end up with a very large chroot). I do think however there should be an option to skip downloading these dependencies as 3rd-party packages either include the requirements in their bundle or they assume the requirements are already installed on a desktop users installation.

For now, it seems the only way to get a simple 3rd-party package is to first build the RPMs with autospec and then extract them with rpm2cpio and use content(pathtoextractedfiles) in the bundle.

reaganlo commented 4 years ago

I'm not sure I understand why are you using autospec. As you noted, you can specify the contents directly in a bundle definition file by using the content (). You don't have to create rpms using autospec.

gregor160300 commented 4 years ago

Creating rpms with autospec has the advantages of being sure you trust the code (you can check it before you compile it, precompiled rpms don't offer this), however more importantly it means the code will get built with the optimizations that the clear linux compiler chain offers.