[erlang-questions] maybe a BUG in the build system of erlang?

Tuncer Ayaz <>
Tue Sep 9 17:40:56 CEST 2008


On Tue, Sep 9, 2008 at 7:27 AM, Anthony Shipman <> wrote:
> On Tue, 9 Sep 2008 05:28:42 am Tuncer Ayaz wrote:
>> > I have an RPM spec file that does the hacks to repair the various
>> > scripts. This should show you what needs to be fixed to prepare a
>> > package.
>>
>> Is it good enough as an addition to upstream?
>
> I'm not sure what you mean by upstream. I've attached a copy. It is used at my
> company for producing Erlang rpms.

What I meant was whether it would make sense to have either
your sed script included upstream or making other changes
upstream that would allow you to avoid sed substitution in the
spec file. I am of course assuming that this is a common issue
which makes sense to be adjusted in OTP upstream.

>From your spec file:
#   Correct the paths in the scripts
for dir in $RPM_BUILD_ROOT/usr/local/lib/erlang/bin
$RPM_BUILD_ROOT/usr/local/lib/erlang/erts*/bin
do
    cd $dir
    for f in erl start
    do
	if [ -x $f ]
	then
	    sed "s,$RPM_BUILD_ROOT,," <$f >$$
	    mv $$ $f
	    chmod 755 $f
	fi
    done
done



More information about the erlang-questions mailing list