tarball URL conventions and sptools
[email protected] (Paul Jarc) Fri, 07 Nov 2003 15:04:09 -0500
| Newsgroups | gmane.comp.djb.package |
|---|---|
| Organization | What did you have in mind? A short, blunt, human pyramid? |
| Message-ID | <[email protected]> |
I'm working on a new command for sptools, sp-download, that handles downloads of package tarballs. Given a package name, it fetches and parses <URL:http://cr.yp.to/slashpackage/list.html> to find that package's URL. But the exact URL for the tarball cannot quite be determined from just the URL on that page; different package authors have different conventions for their web site layouts. It probably isn't feasible to get all authors to use the same URL convention, so instead I suggest adding more information to slashpackage/list.html. For example: <li><a href="http://cr.yp.to/daemontools.html">admin/daemontools</a><!-- tardir: daemontools/ --> <li><a href="http://multivac.cwru.edu/sptools/">admin/sptools</a>:manage /package installations<!-- tardir: releases/ --> sp-download could parse out the URL with sed, drop everything after the last "/", append the specified tardir, and append "daemontools-0.76.tar.gz", "sptools-2003.10.31.tar.bz2", etc., to construct the full tarball URL. The above format is just an example. Comments probably aren't the best way to hold structured data in a markup language. And Dan, if you're planning to make any other changes to the format of slashpackage/list.html, please do it soon and/or let me know so sp-download will continue to work. Once tarball directories become knowable, you'll be able to say "sp-install /package/admin/daemontools-0.76", and it'll all Just Work: if the given package directory doesn't already exist, the tarball will be unpacked; if the tarball isn't already stored locally, it will be downloaded first. Then the package will be installed. It would also be useful to be able to say "sp-install /package/admin/daemontools", and have sp-* inspect the daemontools website to determine the latest version and install that. I'm not sure how that information should be represented. paul