[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpmorg-list
Subject:    RE: Getting rid of implicit Requires:
From:       "Murali Krishnan" <murali.krishnan () sylantro ! com>
Date:       2007-09-19 3:06:52
Message-ID: 61FC323F1F4F9C4F8F19FC9E33CE7CE4527035 () sylidcmail ! sylantro ! com
[Download RAW message or body]

Use the following line in SPEC File.

 

 

AutoReqProv : no

 

--

With Kind Regards

S. Murali Krishnan

Senior Software Engineer

Sylantro Software.

Bangalore - India.

________________________________

From: rpm-list-bounces@redhat.com [mailto:rpm-list-bounces@redhat.com]
On Behalf Of Jeff Johnson
Sent: Tuesday, September 18, 2007 7:04 PM
To: RPM Package Manager
Subject: Re: Getting rid of implicit Requires:

 

rpm has always had problems with variant #! syntax.

 

In this case, the interpreter dependency is written as

    Requires: /usr/bin/env

rather than as a run-time probe 

    Requires: executable(python)

which will be satisfied if "python" is an executable

found on PATH, just like /usr/bin/env behavior.

 

(Note: executable(...) is added in rpm-4.4.3 or later).

 

Since run-time probes in rpm are controversial, it will likely be

a few more years before the functionality is reliably 

deployed.

 

Your best bet in the interim is patching all the scripts to have

    #!/usr/bin/python

 

Annoying, but patching will lead to more reliable packaging.

 

73 de Jeff

 

On 9/18/07, Tarjei Knapstad <tarjei.knapstad@gmail.com> wrote:

Hi all,

I'm packaging some python scripts into an RPM. The first line of each
script has:

#!/usr/bin/env python

It seems like rpmbuild is adding this as an implicit requirement. My
problem is that if I build this on a box with python 2.3, the package
ends up requiring /usr/bin/python2.3. How can I get rid of this
implicitly added package requirement?

Regards,
--
Tarjei Knapstad

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


 


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"
 downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City" downloadurl="http://www.5iamas-microsoft-com:office:smarttags"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place" downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"Arial Narrow";
	panose-1:2 11 5 6 2 2 2 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Use the following line in SPEC \
File.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>AutoReqProv : no<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>--</span></font><font color=navy><span
style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>With Kind Regards<o:p></o:p></span></font></p>

<p class=MsoNormal><strong><b><font size=3 color="#003871" face="Arial Narrow"><span
style='font-size:12.0pt;font-family:"Arial Narrow";color:#003871'>S. Murali
Krishnan</span></font></b></strong><font color=navy><span \
style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#003871" face="Arial Narrow"><span
style='font-size:10.0pt;font-family:"Arial Narrow";color:#003871'>Senior
Software Engineer</span></font><font color=navy><span \
style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color="#003871" face="Arial Narrow"><span
style='font-size:10.0pt;font-family:"Arial Narrow";color:#003871'>Sylantro
Software.</span></font><font color=navy><span \
style='color:navy'><o:p></o:p></span></font></p>

<p class=MsoNormal><st1:City w:st="on"><font size=2 color="#003871"
 face="Arial Narrow"><span style='font-size:10.0pt;font-family:"Arial Narrow";
 color:#003871'>Bangalore</span></font></st1:City><font size=2 color="#003871"
face="Arial Narrow"><span style='font-size:10.0pt;font-family:"Arial Narrow";
color:#003871'> - <st1:country-region w:st="on"><st1:place \
w:st="on">India</st1:place></st1:country-region><em><i><font face="Arial \
Narrow"><span style='font-family:"Arial \
Narrow"'>.</span></font></i></em></span></font><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='margin-left:.5in;text-align:center'><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal style='margin-left:.5in'><b><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
rpm-list-bounces@redhat.com [mailto:rpm-list-bounces@redhat.com] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Jeff Johnson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, September 18, 2007
7:04 PM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">RPM
 Package Manager</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: Getting rid of
implicit Requires:</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>rpm has always had problems with variant #! \
syntax.<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>In this case, the interpreter dependency is written \
as<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;&nbsp; &nbsp;Requires: \
/usr/bin/env<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>rather than as a run-time probe \
<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;&nbsp; &nbsp;Requires: \
executable(python)<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>which will be satisfied if &quot;python&quot; is an
executable<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>found on PATH, just like /usr/bin/env \
behavior.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>(Note: executable(...) is added in rpm-4.4.3 or
later).<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Since run-time probes in rpm are controversial, it
will likely be<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>a few more years before the functionality is reliably \
<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>deployed.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Your best bet in the interim is patching all the
scripts to have<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;&nbsp; \
&nbsp;#!/usr/bin/python<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Annoying, but patching will lead to more reliable
packaging.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>73 de Jeff<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-left:.5in'><span class=gmailquote><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>On 9/18/07, <b><span
style='font-weight:bold'>Tarjei Knapstad</span></b> &lt;<a
href="mailto:tarjei.knapstad@gmail.com">tarjei.knapstad@gmail.com</a>&gt;
wrote:</span></font></span><o:p></o:p></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hi all,<br>
<br>
I'm packaging some python scripts into an RPM. The first line of each<br>
script has:<br>
<br>
#!/usr/bin/env python<br>
<br>
It seems like rpmbuild is adding this as an implicit requirement. My<br>
problem is that if I build this on a box with python 2.3, the package<br>
ends up requiring /usr/bin/python2.3. How can I get rid of this<br>
implicitly added package requirement?<br>
<br>
Regards,<br>
--<br>
Tarjei Knapstad<br>
<br>
_______________________________________________<br>
Rpm-list mailing list<br>
<a href="mailto:Rpm-list@redhat.com">Rpm-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman">https://www.redhat.com/mailman</a>/listinfo/rpm-list<o:p></o:p></span></font></p>


</div>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
&nbsp;<o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic