[devel] forced noarch

Alexey Tourbin at на altlinux.ru
Ср Дек 23 20:11:00 UTC 2009


On Wed, Dec 23, 2009 at 02:12:53PM +0300, Dmitry V. Levin wrote:
> > Here is the full list of packages which should be made noarch.
> cpuburn-1.4-alt5.i586.rpm should be made noarch?  Do you really think so?

[at на people at]$ rpmquery --qf '[%{FILENAMES}\t%{FILEMD5S}\n]' -p /ALT/Sisyphus/files/i586/RPMS/cpuburn-1.4-alt5.i586.rpm 
/usr/bin/burnBX 3963165dea4eceac2ad550c2ebe9e93e
/usr/bin/burnK6 b72d685d7beed398bccd0a56f7c36d1a
/usr/bin/burnK7 6be9eabb21b8482f3e3261e2af0de188
/usr/bin/burnMMX        0050bf8ac72ba7f3187a2830f05cc340
/usr/bin/burnP5 d10fbf78fb2396c02e2a1022641796e1
/usr/bin/burnP6 13e1dd053a0c5e77f08d8cc0af2fe898
/usr/share/doc/cpuburn-1.4      
/usr/share/doc/cpuburn-1.4/Design       94eb3d0c7095d10b7c670545e211b767
/usr/share/doc/cpuburn-1.4/README       92aa364c1942f0396bb7c99a91b2bf88
[at на people at]$ rpmquery --qf '[%{FILENAMES}\t%{FILEMD5S}\n]' -p /ALT/Sisyphus/files/x86_64/RPMS/cpuburn-1.4-alt5.x86_64.rpm 
/usr/bin/burnBX 3963165dea4eceac2ad550c2ebe9e93e
/usr/bin/burnK6 b72d685d7beed398bccd0a56f7c36d1a
/usr/bin/burnK7 6be9eabb21b8482f3e3261e2af0de188
/usr/bin/burnMMX        0050bf8ac72ba7f3187a2830f05cc340
/usr/bin/burnP5 d10fbf78fb2396c02e2a1022641796e1
/usr/bin/burnP6 13e1dd053a0c5e77f08d8cc0af2fe898
/usr/share/doc/cpuburn-1.4      
/usr/share/doc/cpuburn-1.4/Design       94eb3d0c7095d10b7c670545e211b767
/usr/share/doc/cpuburn-1.4/README       92aa364c1942f0396bb7c99a91b2bf88
[at на people at]$ 

[at на people at]$ rpmfile /ALT/Sisyphus/files/x86_64/RPMS/cpuburn-1.4-alt5.x86_64.rpm
/usr/bin/burnBX 100755  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
/usr/bin/burnK6 100755  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
/usr/bin/burnK7 100755  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
/usr/bin/burnMMX        100755  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
/usr/bin/burnP5 100755  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
/usr/bin/burnP6 100755  ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped
/usr/share/doc/cpuburn-1.4      40755   directory
/usr/share/doc/cpuburn-1.4/Design       100644  ASCII English text
/usr/share/doc/cpuburn-1.4/README       100644  ASCII English text
[at на people at]$ 

cpuburn.spec:
%define cpulist P6 BX K6 K7 MMX P5
for n in %cpulist; do
        gcc -m32 -Wa,--noexecstack -nostdlib -o burn$n burn$n.S
done

Hmm, so you build the same *.S files, and basically you should have the
same binaries on all architectures.  (But there is also ExclusiveArch
there...)

> $ zgrep -c ^E force-noarch.gz
> 892

That's around 600 source packages.

[at на people at]$ zgrep ^E force-noarch.gz |cut -f2 |(cd /ALT/Sisyphus/files/i586/RPMS/; xargs rpmquery --qf '%{SOURCERPM}\n' -p) |sort -u |wc -l
error: open of qemu-kvm-vde-0.11.1-alt5.i586.rpm failed: No such file or directory
error: open of sysstat-isag-9.0.4-alt1.i586.rpm failed: No such file or directory
601
[at на people at]$ 

> Isn't it too hard indeed?  Maybe we could patch rpmbuild to make such
> packages noarch automatically?

rpmbuild itself cannot decide whether certain packages should be noarch.
Consider my previous example with perl-Net-IP-1.25-alt3.noarch.rpm (yeah,
it's been fixed).  It contains /usr/lib/perl5/vendor_perl/Net/IP.pm.
This is plain text file, but since it is under /usr/lib, we cannot
automatically decide whether it's good for noarch (e.g. it might have
platform-specific paths hardcoded into it).  So, to decide whether IP.pm
is good enough for noarch, we should build the package on both
architectures and ensure that IP.pm is exactly the same.
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : отсутствует
Тип     : application/pgp-signature
Размер  : 198 байтов
Описание: отсутствует
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20091223/7a7077db/attachment.bin>


Подробная информация о списке рассылки Devel