Re: [Rpm-maint] RPM macros and tag size limit

2008-01-10 Thread Panu Matilainen

On Sat, 22 Dec 2007, Giulio Eulisse wrote:


Ciao,
I mean the lenght of the string. We have a (automatically generated)
Requires line that looks like this:

Requires: external+zlib+1.2.3-cms external+expat+2.0.0-cms
external+openssl+0.9.7d-cms external+bz2lib+1.0.2-cms
external+db4+4.4.20-cms external+gdbm+1.8.3-wt external+libjpg+6b-ge
external+mysql+5.0.45-wt external+oracle+10.2.0.3-ge
external+cmake+2.4.6-ge external+python+2.4.2-wt
external+boost-build+2.0-m12-ge external+castor+2.1.1-4-ge
external+dcap+1.2.35-ge external+gsl+1.8-ge external+libungif+4.1.4-ge
external+p5-uri+1.35-ge external+pcre+4.4-ge external+qt+3.3.6-ge
external+xrootd+20071001-a-ge external+libpng+1.2.10-ge
external+gccxml+0.7.0_20070615-ge external+libtiff+3.8.2-ge
external+clhep+1.9.3.2-ge cms+cms-env+1.0-ge
external+cppunit+1.10.2-ge external+gmake+3.81-ge
cms+oracle-env+1.8-ge external+p5-template-toolkit+2.15-ge
external+p5-xml-parser+2.34-ge external+systemtools+18-ge
external+uuid+1.38-ge external+p5-libwww-perl+1.41-ge
external+boost+1.34.1-ge lcg+root+5.14.00g-ge external+p5-dbi+1.50-ge
lcg+SCRAMV1+V1_0_3-p3-ge cms+seal-tool-conf+CMS_151-ge
external+sqlite+3.4.0-ge external+xerces-c+2.7.0-ge
external+p5-dbd-oracle+1.17-ge external+frontier_client+2.7.4-ge
cms+seal+SEAL_1_9_3-ge


Eek :) Not really what you asked, by why not split that into one require 
per line? Me thinks that'd be somewhat easier on the eyes...
Since it's autogenerated, might be easiest to stuff the (huge) requires 
list into a separate file and %include from the spec.



and rpm chockes with:

sh: line 0: echo: write error: Broken pipe
error: line 11: Unknown tag: l-conf/CMS_151-ge
external/sqlite/3.4.0-ge  external/xerces-c/2.7.0-ge
external/p5-dbd-oracle/1.17-ge  external/frontier_client/2.7.4-ge
cms/seal/SEAL_1_9_3-ge
error: query of specfile
/Users/ktf/work/leopardBuilds/tmp/tmpspec-coral-tool-conf failed,
can't parse

when we try to do:

rpm -q --specfile spec -i

Notice that the error seems to appear when the line lenght is greater
than 1024 chars and appears for both "Requires" and %defines and as
far as I can tell it used to work on 4.4.2.1.


Hmm, the only somewhat related change between 4.4.2.1 and 4.4.2.2 that I 
can think of was plugging a couple of potential buffer overflows in macro 
handling. The maximum length of macro names has "always" been 1024 
characters, or to be precise, that was the longest name key used for 
finding macros in expansion. 4.4.2.2 dynamically allocates the space.
But I can't think of anything that would've changed the spec parse 
limits...


Of course we can bump the limits up short term, longer term goal is to 
get rid of any static buffers, but ... I simply can't imagine why anybody 
would want to use > 1024 macro name (and of course 640K is enough for 
everybody ;)


- Panu -

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] Logging rpm installation logs to file

2008-01-10 Thread viren . sharma
Thanks Panu,

It worked fine.

Can I get this scriptlet execution output in some buffer so that I can 
print this information in a formatted way?
I am doing something like:
   

I will be able to print this in my already open log file if I get this 
scriptlet execution oultput in some buffer.

- - - 
Thanks
Virendra Sharma




Panu Matilainen <[EMAIL PROTECTED]> 
01/08/2008 01:13 PM

To
[EMAIL PROTECTED]
cc
rpm-maint@lists.rpm.org
Subject
Re: [Rpm-maint] Logging rpm installation logs to file






On Mon, 7 Jan 2008, [EMAIL PROTECTED] wrote:

> Hi Panu,
>
> With the change you suggested the error is resolved but 
rpmtsSetScriptFd()
> is still not logging the data to file.
>
> LogFile.txt is created but it is empty :-(

Mm.. yeah, indeed by default you get /dev/null dupped to your log :)
Add rpmIncreaseVerbosity() call somewhere before executing the 
transaction, that should activate the logging.

 - Panu -

ForwardSourceID:NTE7CE 
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [PATCH] implement %triggerprein

2008-01-10 Thread Panu Matilainen

On Tue, 8 Jan 2008, Pixel wrote:


implement %triggerprein scriptlets

it comes mostly from http://rpm5.org/cvs/chngview?cn=6090,
adding part of 
http://rpm5.org/cvs/filediff?f=rpm/lib/psm.c&v1=2.192.2.19&v2=2.192.2.20

the patch is against 4.4.2.2 but is easily adapted to rpm.org HEAD
(where RPMTAG_TRIGGERPREIN is already defined)


As you might have noticed... applied on head, I guess it's safe 
enough to go to 4.4.x too - will add when I get around to process the 
"suitable for 4.4.x" queue next time.


- Panu -
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] How to change a file name that rpmbuild creates?

2008-01-10 Thread Panu Matilainen

On Thu, 10 Jan 2008, Pixel wrote:


Panu Matilainen <[EMAIL PROTECTED]> writes:


c) Filter out the perl(Local::...) dependencies. Automatic perl
   dependency extraction is far from perfect and can add bogus
   dependencies to packages, some examples of this can be found
   here: http://fedoraproject.org/wiki/Packaging/Perl


for information, on mandriva, one can put something like this:

%define _requires_exceptions perl(Foo::Bar)\\|perl(Acme::Buffy)

in the .spec file


Nod, generic dependency filtering is one of the more requested items for 
rpm :)


I'm planning to include something like that sooner or later, but it needs 
to work with the internal dependency generator too, not just external 
dep-extractor scripts.


- Panu -
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] How to change a file name that rpmbuild creates?

2008-01-10 Thread Pixel
Panu Matilainen <[EMAIL PROTECTED]> writes:

> c) Filter out the perl(Local::...) dependencies. Automatic perl
>dependency extraction is far from perfect and can add bogus
>dependencies to packages, some examples of this can be found
>here: http://fedoraproject.org/wiki/Packaging/Perl

for information, on mandriva, one can put something like this:

%define _requires_exceptions perl(Foo::Bar)\\|perl(Acme::Buffy)

in the .spec file

(cf 
http://wiki.mandriva.com/en/Development/Howto/RPM_Advanced#Automatic_Requires)
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] How to change a file name that rpmbuild creates?

2008-01-10 Thread Panu Matilainen

On Thu, 27 Dec 2007, Jim Lynch wrote:


I use the gnu tools to maintain my projects for consistancy and have a .spec
file for each of the various applications.  It all seemed to work fine,
until I decided to move my perl modules to a common place and call them
Local.  That caused me to end up with a bunch of dependencies like
"perl(Local::xxx)".   So I was able to dummy up a spec file to install those
modules that would satisfy the requirements, but I also ended up with files
with parens in them.  I don't like to have to deal with special characters
in file names for obvious reasons.  Is there a way to specify an output file
name in a spec file?

I know I can always rename it, but I'd like to keep everything as standard
as possible.

Maybe I could alias the dependency?  I've noticed that some perl modules
are distributed as rpms without the strange characters.


Several options here, none of which require () in filenames :) What works 
best for you depends on your needs...


a) Package your local perl modules in rpm, this would give you properly
   tracked dependencies automatically.
b) If a) is not feasible for whatever reason, you can make a dummy package
   with no files in it that provides the  perl(Local::...) dependencies.
   Just add "Provides: perl(Local::xxx)" in the spec, no need to create
   such files.
c) Filter out the perl(Local::...) dependencies. Automatic perl
   dependency extraction is far from perfect and can add bogus
   dependencies to packages, some examples of this can be found
   here: http://fedoraproject.org/wiki/Packaging/Perl
d) Disable automatic dependencies completely and add requires + provides
   manually as needed.


I didn't specify the "requirement" for those modules, apparently rpmbuild
dug them out from somewhere.


Yes, rpmbuild by default extracts all sorts of dependency information 
automatically. It's a good thing normally, but can get in the way if 
everything isn't installed via rpm.



Anyway if someone could please point me in the right direction to get this
resolved, I'd appreciated it.


Hope the above helps,

- Panu -
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint