Re: Newbie multiple packages question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Thursday 23 June 2005 22:04, Jim Hardwick a écrit :
> Hi all,
>
> I have a problem that's beyond my limited RPM knowledge and need some
> advice.

> I've thought about not using the prefixes at all in 'make install'. But
> there are config files with identical names that must be installed on each
> node.

Bad way, IMHO.

>
> I might be going about this the wrong way... if so, I'd really appreciate
> suggestions. I *can* change the way 'make install' works.
>
> Thanks in advance,
> Jim

It is likelly impossible or any definitivelly not the good thing to do. But as 
solution:

%install

make install
# $INSTALL_ROOT/node1/etc/...
# $INSTALL_ROOT/node1/bin/...
# $INSTALL_ROOT/node1/opt/...
# $INSTALL_ROOT/node2/etc/...

find $INSTALL_ROOT/node1 | sed 's/^.*node1//' > node1.list
cp -ar $INSTALL_ROOT/node1 $INSTALL_ROOT/
rm -fr $INSTALL_ROOT/node1
find $INSTALL_ROOT/node2 | sed 's/^.*node2//' > node2.list
cp -ar $INSTALL_ROOT/node1 $INSTALL_ROOT/
rm -fr $INSTALL_ROOT/node1

%files node1 -f node1.list

%files node2 -f node2.list

Well here the idea, now adjust to have a faster to maintain code.
untested, especially sed code.

the find, cp, mv would probably goes into a loop:

for node in node1 node2; do
find $INSTALL_ROOT/${node} | sed "s/^.*${node}//" > ${node}.list
done

Good luck.

Attachment: pgpk4owLFrdVk.pgp
Description: PGP signature


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux