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 > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-18-2011, 04:04 PM
Volker Poplawski
 
Default rpmbuild: definition of the %prep script

Hi all,

in which file is the %prep script defined?

www.rpm.org says its a build-in script. Does that mean its defined in
some binary? I wonder how %prep handles the setup of locale.


TIA
.....Volker
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-18-2011, 04:15 PM
"Joseph L. Casale"
 
Default rpmbuild: definition of the %prep script

>in which file is the %prep script defined?

Defined in the spec file.

>www.rpm.org says its a build-in script. Does that mean its defined in
>some binary? I wonder how %prep handles the setup of locale.

I would recommend you pull down a few srpms and unpack them
then look at their spec files, helped me significantly...
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-18-2011, 04:31 PM
Volker Poplawski
 
Default rpmbuild: definition of the %prep script

On 04/18/2011 06:15 PM, Joseph L. Casale wrote:
>> in which file is the %prep script defined?
>
> Defined in the spec file.

You're right.


Actually I'm trying to figure out where these lines originate from

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.86989
+ umask 022
+ cd /home/user/rpmbuild/BUILD
+ LANG=C
+ export LANG

The setting of LANG messes up my build, which relies on Utf8.



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-18-2011, 04:52 PM
"Joseph L. Casale"
 
Default rpmbuild: definition of the %prep script

>Actually I'm trying to figure out where these lines originate from

I see

>Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.86989
>+ umask 022
>+ cd /home/user/rpmbuild/BUILD
>+ LANG=C
>+ export LANG
>
>The setting of LANG messes up my build, which relies on Utf8.

So export this in the build environments shell, afaik if its previously
it will not redefine it.

export LANG=en_US.UTF-8
rpmbuild <...>

Try that out.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-18-2011, 04:54 PM
Ned Slider
 
Default rpmbuild: definition of the %prep script

On 18/04/11 17:31, Volker Poplawski wrote:
> On 04/18/2011 06:15 PM, Joseph L. Casale wrote:
>>> in which file is the %prep script defined?
>>
>> Defined in the spec file.
>
> You're right.
>
>
> Actually I'm trying to figure out where these lines originate from
>
> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.86989
> + umask 022
> + cd /home/user/rpmbuild/BUILD
> + LANG=C
> + export LANG
>
> The setting of LANG messes up my build, which relies on Utf8.
>
>

see:

/usr/lib/rpm/redhat/macros


# Bad hack to set $LANG to C during all RPM builds
%prep
%%prep
LANG=C
export LANG
unset DISPLAY
%{nil}

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-18-2011, 05:09 PM
Volker Poplawski
 
Default rpmbuild: definition of the %prep script

On 04/18/2011 06:52 PM, Joseph L. Casale wrote:
>> Actually I'm trying to figure out where these lines originate from
>
> I see
>
>> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.86989
>> + umask 022
>> + cd /home/user/rpmbuild/BUILD
>> + LANG=C
>> + export LANG
>>
>> The setting of LANG messes up my build, which relies on Utf8.
>
> So export this in the build environments shell, afaik if its previously
> it will not redefine it.
>
> export LANG=en_US.UTF-8
> rpmbuild<...>
>
> Try that out.

LANG=en_US.UTF-8
is already set on Centos 5.

What does help is to put export LANG=en_US.UTF-8 first line in the
%prep, %build... sections

Afaik UTF-8 is default for most linux distributions nowadays (not sure
about debian). I wonder why (and where) rpmbuild on centos sets LANG to
something different. I can tell that OpenSuse 11.x does not modify LANG
in rpmbuild as I'm porting a package from there.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-19-2011, 11:08 AM
Johnny Hughes
 
Default rpmbuild: definition of the %prep script

On 04/18/2011 12:09 PM, Volker Poplawski wrote:
> On 04/18/2011 06:52 PM, Joseph L. Casale wrote:
>>> Actually I'm trying to figure out where these lines originate from
>>
>> I see
>>
>>> Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.86989
>>> + umask 022
>>> + cd /home/user/rpmbuild/BUILD
>>> + LANG=C
>>> + export LANG
>>>
>>> The setting of LANG messes up my build, which relies on Utf8.
>>
>> So export this in the build environments shell, afaik if its previously
>> it will not redefine it.
>>
>> export LANG=en_US.UTF-8
>> rpmbuild<...>
>>
>> Try that out.
>
> LANG=en_US.UTF-8
> is already set on Centos 5.
>
> What does help is to put export LANG=en_US.UTF-8 first line in the
> %prep, %build... sections
>
> Afaik UTF-8 is default for most linux distributions nowadays (not sure
> about debian). I wonder why (and where) rpmbuild on centos sets LANG to
> something different. I can tell that OpenSuse 11.x does not modify LANG
> in rpmbuild as I'm porting a package from there.

All RPMs are built with LANG=C ... you will need to set it yourself if
you want something else.

Several packages need LANG=C to build correct, which is why utf8 is
overridden.

It is done in CentOS because it is done in RHEL.

See Ned Slider's post earlier in this thread.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:14 AM.

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