[opensuse-packaging] noarch (sub-)package with ELF files in it
Background. Currently grub2 is split between grub2 containing user level utilities (should probably be really called grub2-tools or similar) and subpackages for each platform that contain boot-time files (kernel and modules). The actual bootloader binary for each platform is built at run time from those files. From currently running OS PoV those modules are simply opaque data. They are *never* executed on current OS and grub tools that use them to build executable image work identically on every platform. I.e. you can use grub2-mkimage to built usable grub executable (core.img) for SPARC, PPC64 or ARM while being on i386 system as long as files for these platforms are present. Built grub executable will be exactly identical independently of host OS architecture used to create it. Currently all grub2 subpackages are arch-dependent. This already means we have two absolutely identical packages - grub2-i386-pc for i386 and x86_64 (grub2 run-time on legacy BIOS is always 32 bit). As long as this was the only overlap this could be ignored. But now upstream added native support for Xen PV guests (a.k.a. pvgrub2). grub2 core.img must match guest architecture; which would mean that we'd need two *identical* subpackages for each i386 and x86_64 and possibly for other archs (ARM?) So I'm looking at making those subpackages noarch. That would reduce build time (could skip building some of them) and space (omitting identical packages). In principle from pure RPM PoV it works without problems. But our build tools get confused. The problems I hit so far. 1. rpmlint complaints about arch-independent-package-contains-binary-or-object. 2. (special case) rpmlint complaints about suse-filelist-forbidden-noarch due to /usr/lib64/efi/grub.efi - our signed EFI bootloader. Providing rpmlintrc unfortunately does not help for x86_64 case - when package is signed it is apparently being run through rpmlint as extra step *after* being built and fails because rpmlintrc is ignored. For 2 it probably makes sense to split binary in separate subpackage anyway. But for 1? So is it possible to do it? Would it be OK according to policies? Clean way to do it? You can see current work in home:arvidjaar:grub2-next:noarch/grub2 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dnia sobota, 30 listopada 2013 21:44:56 Andrey Borzenkov pisze:
Currently all grub2 subpackages are arch-dependent. This already means we have two absolutely identical packages - grub2-i386-pc for i386 and x86_64 (grub2 run-time on legacy BIOS is always 32 bit). As long as this was the only overlap this could be ignored. But now upstream added native support for Xen PV guests (a.k.a. pvgrub2). grub2 core.img must match guest architecture; which would mean that we'd need two *identical* subpackages for each i386 and x86_64 and possibly for other archs (ARM?)
So I'm looking at making those subpackages noarch. That would reduce build time (could skip building some of them) and space (omitting identical packages). In principle from pure RPM PoV it works without problems. But our build tools get confused. The problems I hit so far.
1. rpmlint complaints about arch-independent-package-contains-binary-or-object.
In cannot answer such a question but maybe rephrasing it in more general terms would help somebody to see a bigger picture. What to do if package X is/contains an utility that acts as a controller for external machines with various binary architectures and contains binary code to be executed on those machines as data, where the binaries for various architectures are packaged separately? I believe a similar question may be raised with respect to firmware blobs. Could we refrain from scrutinising binary objects installed in %{_datadir} for that purpose? Should a special RPM tag %data be devised to qualify such items? Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Andrey Borzenkov
-
Křištof Želechovski