need "cheat" to package installed files into RPMS
devzero2000
pinto.elia at gmail.com
Mon Feb 15 09:55:46 UTC 2010
On Mon, Feb 15, 2010 at 8:52 AM, Paul Johnson <pauljohn32 at gmail.com> wrote:
> I have been building RPMs for a long time and I've always lectured new
> users about the need to build from source.
>
> Now I'm in a position where I need to completely ignore that advice.
>
> I have a directory of installed files like so:
>
> /usr/share/A
> /usr/share/B
> /usr/share/C
>
> and I'd like to build a a separate RPM for each subdirectory.
>
> I don't plan to share these RPMs to the outside world. I plan to share
> them among compute nodes in a cluster.
>
> I believe there are some other RPM *cheaters* lurking out there and
> I'd appreciate their advice. :)
>
> II do not know what could ever be the problem, but perhaps i have not
undestood it well. In the first place, but perhaps not exactly related, on
the following link there is the beginning of a discussion on HPC and rpm,
unfortunately without a clear answer (
http://rpm5.org/community/rpm-users/0469.html). Perhaps it could be of
interest anyway, who know.
For what you have asked i think that to make an rpm for each shared
directory seems simple.
1 - Create a tarball of any shared directory
cd /usr/share
tar -zcvf share-A-1.0.tar.gz A
2 - in% prep
..................
% prep
#
#
% setup -q-c
.................
3 - in install
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__mkdir_p} -m 755 \
$RPM_BUILD_ROOT/usr/share
%{__cp} -ap A $RPM_BUILD_ROOT/usr/share
4 - on the shared dir run a script like this - with the gnu findutils --
# / bin / bash
[! -d "$ 1"] & & (echo "ERROR: $ 0 directory"> & 2; exit 1;)
find "$ 1"-type f-printf '%% attr (% m,% u,% g)% p \ n'
find "$ 1"-type l-print
find "$ 1"-mindepth 0-type d-printf '%%% dir% attr (% m,% u,% g)% p \ n'
with the result and populates with the result the %files section.
There are also projects such dir2rpm http://gitorious.org/dir2rpm which
could also be useful in your case. btw, untested.
hth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20100215/a0255cd5/attachment.htm>
More information about the Rpm-list
mailing list