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

Re: Using URL in Source/Patch?



On Wed, Sep 13, 2000 at 02:05:48PM -0700, W. Reilly Cooley, Esq. wrote:
> I know that accoring to Maximum RPM an URL specified in Sources or
> Patches does not actually get followed and just the filename itself
> I used, but has anyone actually considered implementing this feature?
> It seems like it would be very useful because you could use it to set
> up a system like the Perl CPAN system, or FreeBSD ports.  It would be
> very useful to me for building an internal build system.
> 

This question comes up every 6 months or so, and the usual answer is
some variant of
	1) rpm should do packaging, not transport.
	2) URL's rot too fast for auto-fetching to build reliably.
	3) IMHO, the issue is not source/patch transport, that's *easy*.
	What really needs to be done is to construct a spec file from
	components. For example, retrieving the next release number
	from a central site with auto-increment, or retrieving an entire
	spec file from central suite and applying a patch.

Meanwhile, if you really want to experiment, you should be able to
do something like
	Source: <your URL here>
	...
	%(cd %{_sourcedir} && wget %{SOURCEURL0})
	...
	%prep

If you want error checking, adorn the shell 1 liner with tests and echo's
to do

	%if %((cd %{_sourcedir} && wget %{SOURCEURL0} && echo 0) || echo 1)
	%error Can't download %{SOURCEURL0}
	%endif

	...
	%prep

(note: above is untested)

Have fun ...

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





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