FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > RPM Package Manager

 
 
LinkBack Thread Tools
 
Old 04-04-2008, 10:36 PM
Brian Reichert
 
Default 'Requires' directive in spec file ignored?

I've never seen this one before:

I'm developing an RPM, with a %post scriptlet that invokes some
classic UNIX commands (grep, sed, etc.).

I can build my RPM, but I found that the commands in my %post
scriptlet weren't showing up as automatically-found dependancies
for my RPM. (rpm -q --requires -p foo-1-1.i386.rpm)

So, I went ahead and expressly added them as requirements:

Requires: /sbin/chkconfig
Requires: /bin/cp
Requires: /bin/grep
Requires: /sbin/service
Requires: /sbin/ldconfig

My RPM builds just fine, but these expressly-stated requirements
_still_ aren't being reported by the RPM.

So, I chased which RPMs provide those resources:

Requires: chkconfig coreutils grep initscripts glibc

And _still_ the requirements aren't being reported by the RPM.

This is under CentOS 5.1. I reviewed my build of the RPM under
RHEL4 update 5, and it had the same symptoms. The other umpteen
dozens of RPMs built over the years seem to honor the 'Requires'
directives.

Has anyone seen this symptom before? I have no idea how to diagnose
this, other than instrumenting python code...

FWIW, I haven't redefined any macros, or anything...

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-04-2008, 11:02 PM
"Jeff Johnson"
 
Default 'Requires' directive in spec file ignored?

On Fri, Apr 4, 2008 at 6:36 PM, Brian Reichert <reichert@numachi.com> wrote:

I've never seen this one before:



I'm developing an RPM, with a %post scriptlet that invokes some

classic UNIX commands (grep, sed, etc.).



I can build my RPM, but I found that the commands in my %post

scriptlet weren't showing up as automatically-found dependancies

for my RPM. *(rpm -q --requires -p foo-1-1.i386.rpm)



So, I went ahead and expressly added them as requirements:



*Requires: /sbin/chkconfig

*Requires: /bin/cp

*Requires: /bin/grep

*Requires: /sbin/service

*Requires: /sbin/ldconfig

Smells like a goofy spec file syntax problem, like unclosed macro, or Requiresddly placed.
Post a link to your spec file, perhaps I can spot the problem.

73 de Jeff*
_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 03:00 PM
Brian Reichert
 
Default 'Requires' directive in spec file ignored?

On Fri, Apr 04, 2008 at 07:02:53PM -0400, Jeff Johnson wrote:
> On Fri, Apr 4, 2008 at 6:36 PM, Brian Reichert <reichert@numachi.com> wrote:
> > So, I went ahead and expressly added them as requirements:
> >
> > Requires: /sbin/chkconfig
> > Requires: /bin/cp
> > Requires: /bin/grep
> > Requires: /sbin/service
> > Requires: /sbin/ldconfig
> >
>
> Smells like a goofy spec file syntax problem, like unclosed macro, or
> Requires:
> oddly placed.
>
> Post a link to your spec file, perhaps I can spot the problem.

Hey, if you're willing to look:

http://www.numachi.com/~reichert/misc/mDNSResponder.spec

Thanks for any feedback...

>
> 73 de Jeff

> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list


--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 05:00 PM
"Jeff Johnson"
 
Default 'Requires' directive in spec file ignored?

The spec file you posted has this:
Summary: mDNSResponder
Name: mDNSResponder
Version: %{version}
Release: %{release}The "Version: %{version}" causes a macro recursion becauseafter Version: is parsed, one ends up defining version to itself.
Basically same as doing
** *%define version %{version}which can never be evaluated.
After commenting out all the elements in, I see dependencies:
$ rpm -qp mDNSResponder-1.2-3.*.rpm --requires
/bin/sh/bin/sh/bin/sh/sbin/ldconfig/sbin/ldconfigexecutable(chkconfig)executable(chkconfig) executable(cp)executable(cp)
executable(grep)executable(sed)executable(service) executable(service)
73 de Jeff
_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 05:40 PM
Rex Dieter
 
Default 'Requires' directive in spec file ignored?

Brian Reichert wrote:

> Hey, if you're willing to look:
> http://www.numachi.com/~reichert/misc/mDNSResponder.spec

neat. Here's a mDNSResponder.spec that I worked on for fedora/redhat
awhile back:
http://kdeforge.unl.edu/apt/kde-redhat/SOURCES/mDNSResponder/

(never got enough round-tuits to finish submitting it)

-- Rex

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 06:25 PM
Brian Reichert
 
Default 'Requires' directive in spec file ignored?

On Mon, Apr 07, 2008 at 01:00:11PM -0400, Jeff Johnson wrote:
> Basically same as doing
> %define version %{version}
> which can never be evaluated.

I supply the macro in an external file, so I don't see that complaint.

> After commenting out all the elements in, I see dependencies:

And I don't:

rpm -q --requires -p mDNSResponder-107.6-2.i386.rpm
/bin/sh
/bin/sh
/bin/sh
/bin/sh
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.3)
libdns_sd.so
libpthread.so.0
libpthread.so.0(GLIBC_2.0)
libpthread.so.0(GLIBC_2.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

> $ rpm -qp mDNSResponder-1.2-3.*.rpm --requires

So - what platform are you building your RPM in?

> /bin/sh
> /bin/sh
> /bin/sh
> /sbin/ldconfig
> /sbin/ldconfig
> executable(chkconfig)
> executable(chkconfig)
> executable(cp)
> executable(cp)
> executable(grep)
> executable(sed)
> executable(service)
> executable(service)
>
> 73 de Jeff

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 06:34 PM
Brian Reichert
 
Default 'Requires' directive in spec file ignored?

On Mon, Apr 07, 2008 at 12:40:32PM -0500, Rex Dieter wrote:
> Brian Reichert wrote:
>
> > Hey, if you're willing to look:
> > http://www.numachi.com/~reichert/misc/mDNSResponder.spec
>
> neat. Here's a mDNSResponder.spec that I worked on for fedora/redhat
> awhile back:
> http://kdeforge.unl.edu/apt/kde-redhat/SOURCES/mDNSResponder/
>
> (never got enough round-tuits to finish submitting it)

Cool to compare. What's that '%ghost' directive?

I tried to emply the scriptlet notation you do:

Requires(preun): chkconfig, /sbin/service
Requires(post): chkconfig
Requires(postun): /sbin/service

but the symptoms don't change...

> -- Rex

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 06:43 PM
Brian Reichert
 
Default 'Requires' directive in spec file ignored?

On Mon, Apr 07, 2008 at 01:00:11PM -0400, Jeff Johnson wrote:
> The spec file you posted has this:
>
> Summary: mDNSResponder
> Name: mDNSResponder
> Version: %{version}
> Release: %{release}
>
> The "Version: %{version}" causes a macro recursion because
> after Version: is parsed, one ends up defining version to itself.
>
> Basically same as doing
> %define version %{version}
> which can never be evaluated.

I elected to hard-code the version info, to test your hypothesis, but the
oucome was the same. :/

> 73 de Jeff

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 08:05 PM
Tim Mooney
 
Default 'Requires' directive in spec file ignored?

In regard to: Re: 'Requires' directive in spec file ignored?, Brian...:


On Mon, Apr 07, 2008 at 01:00:11PM -0400, Jeff Johnson wrote:

Basically same as doing
%define version %{version}
which can never be evaluated.


I supply the macro in an external file, so I don't see that complaint.


After commenting out all the elements in, I see dependencies:


And I don't:

rpm -q --requires -p mDNSResponder-107.6-2.i386.rpm
/bin/sh
/bin/sh
/bin/sh
/bin/sh
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.2)
libc.so.6(GLIBC_2.3)
libdns_sd.so
libpthread.so.0
libpthread.so.0(GLIBC_2.0)
libpthread.so.0(GLIBC_2.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1


Assuming rpm is using executabledeps.sh to actually generate the
dependencies in the executable() namespace, then the first version of
"bash" in your PATH must support the --rpm-requires hack. Does your
version of bash support that?

Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J6, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-07-2008, 10:36 PM
Brian Reichert
 
Default 'Requires' directive in spec file ignored?

On Mon, Apr 07, 2008 at 03:05:48PM -0500, Tim Mooney wrote:
> Assuming rpm is using executabledeps.sh to actually generate the
> dependencies in the executable() namespace, then the first version of
> "bash" in your PATH must support the --rpm-requires hack. Does your
> version of bash support that?

Looks like it:

% /bin/bash --rpm-requires
executable(/etc/bashrc)

>
> Tim
> --
> Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
> Information Technology Services (701) 231-1076 (Voice)
> Room 242-J6, IACC Building (701) 231-8541 (Fax)
> North Dakota State University, Fargo, ND 58105-5164
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 

Thread Tools




All times are GMT. The time now is 01:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org