Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Development (http://www.linux-archive.org/fedora-development/)
-   -   Macros in %files (http://www.linux-archive.org/fedora-development/193072-macros-files.html)

Orion Poplawski 11-13-2008 09:47 PM

Macros in %files
 
I'm reworking my plplot.spec and seeing the following build failure:

Processing files: plplot-5.9.0-2.svn8985.fc11
+ exit 0
error: File must begin with "/": %{python_sitearch}/_plplotcmodule.so

spec has:

%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}


at the top, and then:

%files
%defattr(-,root,root,-)
%{_docdir}/plplot-%{version}/
%{_bindir}/plm2gif
%{_bindir}/plpr
%{_bindir}/pltek
%{_bindir}/pstex2eps
%{python_sitearch}/_plplotcmodule.so

This has always worked before.

Problems started showing up after I started using %bcond_without
directives. Any weirdness to watch out for there?


This is all in plplot/devel cvs. scratch build:

http://koji.fedoraproject.org/koji/taskinfo?taskID=932396

--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Dan Nicholson" 11-13-2008 11:38 PM

Macros in %files
 
On Thu, Nov 13, 2008 at 2:47 PM, Orion Poplawski <orion@cora.nwra.com> wrote:
> I'm reworking my plplot.spec and seeing the following build failure:
>
> Processing files: plplot-5.9.0-2.svn8985.fc11
> + exit 0
> error: File must begin with "/": %{python_sitearch}/_plplotcmodule.so
>
> spec has:
>
> %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from
> distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
>
> at the top, and then:
>
> %files
> %defattr(-,root,root,-)
> %{_docdir}/plplot-%{version}/
> %{_bindir}/plm2gif
> %{_bindir}/plpr
> %{_bindir}/pltek
> %{_bindir}/pstex2eps
> %{python_sitearch}/_plplotcmodule.so
>
> This has always worked before.
>
> Problems started showing up after I started using %bcond_without directives.

You can try adding %trace to the top of the spec file and see if
everything is expanding the way you'd expect.

--
Dan

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Rex Dieter 11-14-2008 04:05 AM

Macros in %files
 
Dan Nicholson wrote:

> On Thu, Nov 13, 2008 at 2:47 PM, Orion Poplawski <orion@cora.nwra.com>
> wrote:
>> I'm reworking my plplot.spec and seeing the following build failure:
>>
>> Processing files: plplot-5.9.0-2.svn8985.fc11
>> + exit 0
>> error: File must begin with "/": %{python_sitearch}/_plplotcmodule.so
>>
>> spec has:
>>
>> %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from
>> distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Take out the space between : %define

-- Rex

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Orion Poplawski" 11-14-2008 04:17 AM

Macros in %files
 
On Thu, November 13, 2008 10:05 pm, Rex Dieter wrote:
> Dan Nicholson wrote:
>
>> On Thu, Nov 13, 2008 at 2:47 PM, Orion Poplawski <orion@cora.nwra.com>
>> wrote:
>>> I'm reworking my plplot.spec and seeing the following build failure:
>>>
>>> Processing files: plplot-5.9.0-2.svn8985.fc11
>>> + exit 0
>>> error: File must begin with "/": %{python_sitearch}/_plplotcmodule.so
>>>
>>> spec has:
>>>
>>> %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from
>>> distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
>
> Take out the space between : %define

No help.

--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Orion Poplawski" 11-14-2008 04:19 AM

Macros in %files
 
On Thu, November 13, 2008 5:38 pm, Dan Nicholson wrote:
> You can try adding %trace to the top of the spec file and see if
> everything is expanding the way you'd expect.

Log here:

http://koji.fedoraproject.org/koji/getfile?taskID=933170&name=build.log

if anyone can make sense of it....

--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Mamoru Tasaka 11-14-2008 04:36 AM

Macros in %files
 
Orion Poplawski wrote, at 11/14/2008 07:47 AM +9:00:

I'm reworking my plplot.spec and seeing the following build failure:

Processing files: plplot-5.9.0-2.svn8985.fc11
+ exit 0
error: File must begin with "/": %{python_sitearch}/_plplotcmodule.so

spec has:

%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}


at the top, and then:


Changing to %{!?python_sitearch: %global python_....}
works?

Regards,
Mamoru

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

"Orion Poplawski" 11-14-2008 04:50 AM

Macros in %files
 
On Thu, November 13, 2008 10:36 pm, Mamoru Tasaka wrote:
>
> Changing to %{!?python_sitearch: %global python_....}
> works?

That's the ticket. Some rpm change I guess I didn't quite pick up on...

Thank you!

--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Michael Schwendt 11-14-2008 09:40 AM

Macros in %files
 
On Thu, 13 Nov 2008 22:50:04 -0700 (MST), Orion Poplawski wrote:

>
> On Thu, November 13, 2008 10:36 pm, Mamoru Tasaka wrote:
> >
> > Changing to %{!?python_sitearch: %global python_....}
> > works?
>
> That's the ticket. Some rpm change I guess I didn't quite pick up on...

Alternatively, simply override it without any nested macros:

%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")

--
Nested macro usage like %{!?foo: %define foo ...} is error-prone anyway.
It quickly leads to confusing scenarios in spec files where you check for
%!?foo in several places, but that would fail if the redefinition were
global implicitly.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Orion Poplawski 11-14-2008 02:55 PM

Macros in %files
 
Michael Schwendt wrote:

On Thu, 13 Nov 2008 22:50:04 -0700 (MST), Orion Poplawski wrote:


On Thu, November 13, 2008 10:36 pm, Mamoru Tasaka wrote:

Changing to %{!?python_sitearch: %global python_....}
works?

That's the ticket. Some rpm change I guess I didn't quite pick up on...


Alternatively, simply override it without any nested macros:

%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")



Well, it's take directly from:

http://fedoraproject.org/wiki/Packaging/Python#System_Architecture

If that doesn't work any more, it seems many spec templates may need to
get changed.


I also count 1089 occurrences of this construct in current fedora spec
files.


--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@cora.nwra.com
Boulder, CO 80301 http://www.cora.nwra.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list

Michael Schwendt 11-14-2008 03:39 PM

Macros in %files
 
On Fri, 14 Nov 2008 08:55:57 -0700, Orion Poplawski wrote:

> Michael Schwendt wrote:
> > On Thu, 13 Nov 2008 22:50:04 -0700 (MST), Orion Poplawski wrote:
> >
> >> On Thu, November 13, 2008 10:36 pm, Mamoru Tasaka wrote:
> >>> Changing to %{!?python_sitearch: %global python_....}
> >>> works?
> >> That's the ticket. Some rpm change I guess I didn't quite pick up on...
> >
> > Alternatively, simply override it without any nested macros:
> >
> > %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
> >
>
> Well, it's take directly from:
>
> http://fedoraproject.org/wiki/Packaging/Python#System_Architecture
>
> If that doesn't work any more, it seems many spec templates may need to
> get changed.

True.

> I also count 1089 occurrences of this construct in current fedora spec
> files.

:)

I've searched a bit:
https://fedoraproject.org/wiki/Packaging/Minutes20070424

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list


All times are GMT. The time now is 04:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.