[opensuse-packaging] Duplicate -lang packages waste space
Hi, I noticed that some -lang packages contain noarch data and hence should be produced as such, to reduce number of packages in the rpm metadata, as well as the space on DVD. For example: -rw-r--r-- 1 455 5200 597700 Sep 23 01:07 /lnk/103/i586/mc-lang-4.6.1-140.i586.rpm -rw-r--r-- 1 455 5200 597820 Sep 26 02:39 /lnk/103/ppc/mc-lang-4.6.1-141.ppc.rpm -rw-r--r-- 1 455 5200 597691 Sep 23 01:15 /lnk/103/x86_64/mc-lang-4.6.1-140.x86_64.rpm making the -lang package be built as noarch is an exercise left to the implementor. Running `lbuild-10.3 --target=noarch mc.spec` is a workaround, but of course it would be nicer if BuildArch: noarch in a subpackage in a specfile would only cause the subpackage to be noarch. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jan Engelhardt wrote:
I noticed that some -lang packages contain noarch data and hence should be produced as such, to reduce number of packages in the rpm metadata, as well as the space on DVD. For example:
-rw-r--r-- 1 455 5200 597700 Sep 23 01:07 /lnk/103/i586/mc-lang-4.6.1-140.i586.rpm -rw-r--r-- 1 455 5200 597820 Sep 26 02:39 /lnk/103/ppc/mc-lang-4.6.1-141.ppc.rpm -rw-r--r-- 1 455 5200 597691 Sep 23 01:15 /lnk/103/x86_64/mc-lang-4.6.1-140.x86_64.rpm
making the -lang package be built as noarch is an exercise left to the implementor. Running `lbuild-10.3 --target=noarch mc.spec` is a workaround, but of course it would be nicer if BuildArch: noarch in a subpackage in a specfile would only cause the subpackage to be noarch.
Just that it doesn't work, you can only specify one arch for all packages in one spec file. But I'm sure you already knew that ;) What would be needed is to have two separate spec files: one for the files without lang, and one just for the lang. Well, maybe a single spec but with a flag passed to the build. %if 0%{?_with_lang:1} %define lang 1 %define suffix -lang %endif Name: mc%{suffix} %if 0%lang BuildArch: noarch %fi ... %install ... %if 0%lang %__rm -rf "%{buildroot}"/{%{_bindir},%{_libdir},%{_datadir}} %else %__rm -rf "%{buildroot}%{_datadir}/locale" %fi %if 0%lang %files -f mc.lang %else %files %doc ... %{_bindir}/mc ... %endif Not sure that's better though. cheers - -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v The more things change, the more they stay insane. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHEfFEr3NMWliFcXcRAkrPAKCXjaEdPRCigufaNP24UAY3L7/bVACcCl93 ASBuMeXunb5bGuL1urdf+JM= =iJAr -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Sunday 14 October 2007 12:36:52 Pascal Bleser wrote:
Just that it doesn't work, you can only specify one arch for all packages in one spec file. But I'm sure you already knew that ;)
What would be needed is to have two separate spec files: one for the files without lang, and one just for the lang.
Why not fix this rpm defect instead? This limitation really doesn't make sense. Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andreas Gruenbacher wrote:
On Sunday 14 October 2007 12:36:52 Pascal Bleser wrote:
Just that it doesn't work, you can only specify one arch for all packages in one spec file. But I'm sure you already knew that ;)
What would be needed is to have two separate spec files: one for the files without lang, and one just for the lang.
Why not fix this rpm defect instead? This limitation really doesn't make sense.
You have a patch to discuss with Jeff ? :) But true, it's a limitation and there's no reason to have it. cheers - -- -o) Pascal Bleser http://linux01.gwdg.de/~pbleser/ /\\ <pascal.bleser@skynet.be> <guru@unixtech.be> _\_v The more things change, the more they stay insane. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHEfWhr3NMWliFcXcRAiM4AKCTfi4YAE9o0+QrHf0U/AICcH2FCwCgqtTf Eb78egsYN/MWJuM5SWUGnuY= =lgyj -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Sunday 14 October 2007 12:55, Pascal Bleser wrote:
Andreas Gruenbacher wrote:
Why not fix this rpm defect instead? This limitation really doesn't make sense.
You have a patch to discuss with Jeff ? :)
No, but didn't Jan say he'd volunteer to write one? ;-) Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Oct 14 2007 21:12, Andreas Gruenbacher wrote:
On Sunday 14 October 2007 12:55, Pascal Bleser wrote:
Andreas Gruenbacher wrote:
Why not fix this rpm defect instead? This limitation really doesn't make sense.
You have a patch to discuss with Jeff ? :)
No, but didn't Jan say he'd volunteer to write one? ;-)
I thought Novell was comitted to opensource? --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Sunday 14 October 2007 21:39:44 Jan Engelhardt wrote:
On Oct 14 2007 21:12, Andreas Gruenbacher wrote:
On Sunday 14 October 2007 12:55, Pascal Bleser wrote:
Andreas Gruenbacher wrote:
Why not fix this rpm defect instead? This limitation really doesn't make sense.
You have a patch to discuss with Jeff ? :)
No, but didn't Jan say he'd volunteer to write one? ;-)
I thought Novell was comitted to opensource?
Yes, and not only to this particular problem. In fact the reason why this problem hasn't been fixed yet is that there are too many other open problems which have higher priority, and so nobody got to this one, yet. We are not acting as we do out of ill will, but because of limited resources. I hope you can appreciate that. Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, Oct 15, Andreas Gruenbacher wrote:
On Sunday 14 October 2007 21:39:44 Jan Engelhardt wrote:
On Oct 14 2007 21:12, Andreas Gruenbacher wrote:
On Sunday 14 October 2007 12:55, Pascal Bleser wrote:
Andreas Gruenbacher wrote:
Why not fix this rpm defect instead? This limitation really doesn't make sense.
You have a patch to discuss with Jeff ? :)
No, but didn't Jan say he'd volunteer to write one? ;-)
I thought Novell was comitted to opensource?
Yes, and not only to this particular problem. In fact the reason why this problem hasn't been fixed yet is that there are too many other open problems which have higher priority, and so nobody got to this one, yet. We are not acting as we do out of ill will, but because of limited resources. I hope you can appreciate that.
I think this idea was already rejected upstream, since RPM has no chance to make sure that the content is really noarch. If you build a normal noarch package, all arch specific commands like "ifarch" are disabled and will be ignored. How to do that for a subpackage? Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Monday 15 October 2007 08:38, Thorsten Kukuk wrote:
I think this idea was already rejected upstream, since RPM has no chance to make sure that the content is really noarch.
Ah, okay. It's quite possible that someone brought up this argument, but the argument doesn't hold water. Creating noarch packages that contain architecture specific files is easy, and there is little that can be done about it.
If you build a normal noarch package, all arch specific commands like "ifarch" are disabled and will be ignored. How to do that for a subpackage?
It's a pointless exercise. The noarch files need to be built somehow, and if you turn of everything that might result in an architecture dependency, then this also includes all nontrivial tools for producing architecture independent files. You really need to know what you are doing when creating noarch packages. Name: not-noarch Summary: Not a noarch package Version: 1 Release: 0 License: GPL Group: Application/Text BuildArch: noarch BuildRoot: %{_builddir}/%{name}-root %description Creating false %%noarch packages is easy... %build cat > hello.c <<EOF #include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } EOF cc -o hello hello.c %files %doc hello Thanks, Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Oct 15 2007 09:41, Andreas Gruenbacher wrote:
If you build a normal noarch package, all arch specific commands like "ifarch" are disabled and will be ignored. How to do that for a subpackage?
It's a pointless exercise. The noarch files need to be built somehow, and if you turn of everything that might result in an architecture dependency, then this also includes all nontrivial tools for producing architecture independent files. You really need to know what you are doing when creating noarch packages.
Name: not-noarch Summary: Not a noarch package Version: 1 Release: 0 License: GPL Group: Application/Text BuildArch: noarch BuildRoot: %{_builddir}/%{name}-root [...]
It is actually much easier: rpmbuild --target=noarch -bb bash.spec In 10.2 this works most of the time, in 10.3 it works on less packages (configure seems to dislike --target=noarch-suse-linux, and rightfully so) To answer Thorsten's question, just let %ifarch do its usual thing. *All* that I want is to have specific packages *marked* noarch (i.e. rpm --qf="%{ARCH}" returning noarch on them). So BuildArch: on subpackages pretty much should work like the Group:, i.e. inherited from the main package and possible to override. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Andreas Gruenbacher
-
Jan Engelhardt
-
Pascal Bleser
-
Thorsten Kukuk