[opensuse-packaging] %fdupes

2007-05-16 Thread Stephan Kulow
Hi!

We did some analysis on how much space is wasted by packages storing the same 
file twice (or more). While few packages waste megabytes (only 88 waste more 
than 1000Mib), 657 waste more than 20K - which sums up to 703MiB in total.

Impressed? Consider using fdupes in your package.

It's pretty simple: BuildRequire fdupes and then use %fdupes $RPM_BUILD_ROOT 
in your install section. This will check for duplicated files and make them 
hardlink. Just be careful that these duplicated files do not end up in 
different subpackages - I haven't tried what rpm does in that case.

But you can also use %fdupes -s, which will create symlinks, which are easier 
to grasp for rpm :)

So you can also combine this like this
# create symlinks for my man pages
%fdupes -s $RPM_BUILD_ROOT%_mandir
# create hardline for the rest
%fdupes $RPM_BUILD_ROOT

I also added an rpmlint check that will give an error for the package if it's 
wasting more than 20KB (which is basically a random number).

Greetings, Stephan

-- 
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] suse_update_desktop_file

2007-05-16 Thread Dirk Mueller
On Tuesday, 15. May 2007, Stephan Kulow wrote:

 You only read the second paragraph, didn't you?

Why do you write emails where one has to read the stuff between the first and 
the last word?


Dirk
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Marcus Rueckert
On 2007-05-16 11:21:00 +0200, Ludwig Nussel wrote:
 suse $ perl -V:installvendorarch -V:installvendorlib
 installvendorarch='/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi';
 installvendorlib='/usr/lib/perl5/vendor_perl/5.8.8';
 
 debian $ perl -V:installvendorarch -V:installvendorlib  
 installvendorarch='/usr/lib/perl5';
 installvendorlib='/usr/share/perl5';
 
 Couldn't we have a lot more noarch packages by defining those
 variables the Debian way? That would also allow to install perl
 modules from newer/older distros as the exact version number is not
 encoded in the path.

same goes for python and ruby btw. but those patches are not upstream
for any of the 3 languages. another problem would be that you cant have
noarch and arch packages from the same spec.

darix

-- 
   openSUSE - SUSE Linux is my linux
   openSUSE is good for you
   www.opensuse.org
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Richard Guenther
On Wed, 16 May 2007, Marcus Rueckert wrote:

 On 2007-05-16 11:21:00 +0200, Ludwig Nussel wrote:
  suse $ perl -V:installvendorarch -V:installvendorlib
  installvendorarch='/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi';
  installvendorlib='/usr/lib/perl5/vendor_perl/5.8.8';
  
  debian $ perl -V:installvendorarch -V:installvendorlib  
  installvendorarch='/usr/lib/perl5';
  installvendorlib='/usr/share/perl5';
  
  Couldn't we have a lot more noarch packages by defining those
  variables the Debian way? That would also allow to install perl
  modules from newer/older distros as the exact version number is not
  encoded in the path.
 
 same goes for python and ruby btw. but those patches are not upstream
 for any of the 3 languages. another problem would be that you cant have
 noarch and arch packages from the same spec.

One more reason to fix this.

Richard.

-- 
Richard Guenther [EMAIL PROTECTED]
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Michal Marek
Marcus Rueckert wrote:
 On 2007-05-16 11:21:00 +0200, Ludwig Nussel wrote:
 suse $ perl -V:installvendorarch -V:installvendorlib
 installvendorarch='/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi';
 installvendorlib='/usr/lib/perl5/vendor_perl/5.8.8';

 debian $ perl -V:installvendorarch -V:installvendorlib  
 installvendorarch='/usr/lib/perl5';
 installvendorlib='/usr/share/perl5';

 Couldn't we have a lot more noarch packages by defining those
 variables the Debian way? That would also allow to install perl
 modules from newer/older distros as the exact version number is not
 encoded in the path.
 
 same goes for python

Actually unlike python, the perl directory layout doesn't prevent you
from creating noarch packages, because it's /usr/lib/perl5 everywhere
and the arch-dependent files go to /usr/lib/perl5/$arch-$os-blah-blah.
Just there aren't many (read: zero) noarch perl packages in the
distribution :-)

Michal
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Michael Schroeder
On Wed, May 16, 2007 at 11:21:00AM +0200, Ludwig Nussel wrote:
 suse $ perl -V:installvendorarch -V:installvendorlib
 installvendorarch='/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi';
 installvendorlib='/usr/lib/perl5/vendor_perl/5.8.8';
 
 debian $ perl -V:installvendorarch -V:installvendorlib  
 installvendorarch='/usr/lib/perl5';
 installvendorlib='/usr/share/perl5';
 
 Couldn't we have a lot more noarch packages by defining those
 variables the Debian way?

No, the debian way is just broken. There must be a 'vendor' somewhere
in the vendor variables...

Besides, $installvendorlib is where the noarch stuff should live.

Cheers, 
  Michael.

-- 
Michael Schroeder   [EMAIL PROTECTED]
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Ludwig Nussel
Michael Schroeder wrote:
 On Wed, May 16, 2007 at 11:21:00AM +0200, Ludwig Nussel wrote:
  suse $ perl -V:installvendorarch -V:installvendorlib
  installvendorarch='/usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi';
  installvendorlib='/usr/lib/perl5/vendor_perl/5.8.8';
  
  debian $ perl -V:installvendorarch -V:installvendorlib  
  installvendorarch='/usr/lib/perl5';
  installvendorlib='/usr/share/perl5';
  
  Couldn't we have a lot more noarch packages by defining those
  variables the Debian way?
 
 No, the debian way is just broken. There must be a 'vendor' somewhere
 in the vendor variables...

Ok, so there is no objection against removing the exact version
number from the path at least?

 Besides, $installvendorlib is where the noarch stuff should live.

The .packlist file gets installed into $installvendorarch though. See for
example perl-URI. Since that file is touched by
%perl_process_packlist anyways, couldn't it be moved to a noarch dir
or removed?

cu
Ludwig

-- 
 (o_   Ludwig Nussel
 //\   SUSE Labs
 V_/_  http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Michael Schroeder
On Wed, May 16, 2007 at 11:59:40AM +0200, Ludwig Nussel wrote:
 Ok, so there is no objection against removing the exact version
 number from the path at least?

Nope, we can't do this because perl may change in an incompatible
way (it did so in the past).

  Besides, $installvendorlib is where the noarch stuff should live.
 
 The .packlist file gets installed into $installvendorarch though. See for
 example perl-URI. Since that file is touched by
 %perl_process_packlist anyways, couldn't it be moved to a noarch dir
 or removed?

Either that or we add a noarch flag that tells it to put
the packlist into vendorlib.

M.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Richard Guenther
On Wed, 16 May 2007, Marcus Rueckert wrote:

 On 2007-05-16 11:40:13 +0200, Michal Marek wrote:
  Actually unlike python, the perl directory layout doesn't prevent you
  from creating noarch packages, because it's /usr/lib/perl5 everywhere
  and the arch-dependent files go to /usr/lib/perl5/$arch-$os-blah-blah.
  Just there aren't many (read: zero) noarch perl packages in the
  distribution :-)
 
 there are zero python noarch aswell. and zero ruby noarch.
 e.g. ruby could do the same as perl. always install into /usr/lib. the
 arch dependent part is encapsulated in a subdir.
 
 vendordir: /usr/lib64/ruby/vendor_ruby
 vendorlibdir:  /usr/lib64/ruby/vendor_ruby/1.8
 vendorarchdir: /usr/lib64/ruby/vendor_ruby/1.8/x86_64-linux

Architecture independent files must go in /usr/share

Richard.

-- 
Richard Guenther [EMAIL PROTECTED]
Novell / SUSE Labs
SUSE LINUX Products GmbH - Nuernberg - AG Nuernberg - HRB 16746 - GF: Markus Rex
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] perl directories

2007-05-16 Thread Richard Guenther
On Wed, 16 May 2007, Marcus Rueckert wrote:

 On 2007-05-16 13:35:58 +0200, Richard Guenther wrote:
  On Wed, 16 May 2007, Marcus Rueckert wrote:
  
   On 2007-05-16 11:40:13 +0200, Michal Marek wrote:
Actually unlike python, the perl directory layout doesn't prevent you
from creating noarch packages, because it's /usr/lib/perl5 everywhere
and the arch-dependent files go to /usr/lib/perl5/$arch-$os-blah-blah.
Just there aren't many (read: zero) noarch perl packages in the
distribution :-)
   
   there are zero python noarch aswell. and zero ruby noarch.
   e.g. ruby could do the same as perl. always install into /usr/lib. the
   arch dependent part is encapsulated in a subdir.
   
   vendordir: /usr/lib64/ruby/vendor_ruby
   vendorlibdir:  /usr/lib64/ruby/vendor_ruby/1.8
   vendorarchdir: /usr/lib64/ruby/vendor_ruby/1.8/x86_64-linux
  
  Architecture independent files must go in /usr/share
 
 thats the theory. now lets see the practice.

If you change something there's no need to not follow the theory.

Richard.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]