[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: RPM spec file: using __cp with wildcards
- From: "Chester R. Hosey" <Chester Hosey gianteagle com>
- To: "Red Hat Enterprise Linux 4 (Nahant) Discussion List" <nahant-list redhat com>
- Subject: Re: RPM spec file: using __cp with wildcards
- Date: Tue, 19 Jul 2005 14:19:40 -0400
On Tue, 2005-07-19 at 19:58 +0200, Jos Vos wrote:
> Hi,
>
> On Tue, Jul 19, 2005 at 01:29:17PM -0400, Chester R. Hosey wrote:
>
> > I wish it were that simple. One such line (which I should have included
> > initially) reads:
> >
> > %{__cp} -a instantclient10_1/sdk/include/*.h \
> > %{buildroot}%{_includedir}/oracle/%{version}/client/
> >
> > There are no quotations or attempts to escape the arguments. The problem
> > is that rpmbuild escapes the arguments before executing the command; it
> > executes as follows:
> >
> > + /bin/cp -a 'instantclient10_1/sdk/include/*.h' /var/tmp/oracle-
> > instantclient-10.2.0.1-3-root/usr/include/oracle/10.2.0.1/client/
>
> OK, the output is misleading, but the instantclient10_1/sdk/include/*.h
> files *really* do not exist (unquoted, wildcards expanded).
>
> As an example, create a shell script /tmp/t1 as follows:
>
> #!/bin/sh
> mkdir /tmp/t
> cp /etc/pas* /tmp/t/
> cp /etc/gas* /tmp/t/
>
> The files /etc/pas* exist, /etc/gas* does not match any files.
> Now run this with "sh -x /tmp/t1" and look at the output:
>
> + mkdir /tmp/t
> + cp /etc/passwd /etc/passwd- /etc/passwd.OLD /tmp/t/
> + cp '/etc/gas*' /tmp/t/
> cp: cannot stat `/etc/gas*': No such file or directory
>
> So, this is just the way the shell verbose output looks like... ;-)
>
> > I find it hard to imagine that the authors of rpmbuild did not envision
> > the possibility that one might wish to use wildcards in included
> > scripts.
>
> As you see, this is not the problem, luckily ;-). Everything is
> working fine, but the wildcard just doesn't match any files in
> your case.
I'm a tool. I verified output up until that point, but instead of
checking the path verbatim I used tab completion and didn't notice a
minor change in the path name.
Thanks for your help, and sorry for being a bonehead.
Chet
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]