[ccan] Upload code module

Rusty Russell rusty at rustcorp.com.au
Wed Jun 25 16:35:39 EST 2008


On Wednesday 25 June 2008 15:02:23 dinesh g wrote:
> Hi Rusty,
>
> You can now upload any .tar/.tar.gz/tar.bz2 in the site. Any uploaded code
> first will store at temprepo directory and after running ccanlint on
> uploaded code, if it gets score 2/2 it will move the code to testrepo
> directory. Otherwise it will be in temprepo directory. Any concerns with
> this?

That seems correct.  There are really several cases I can see, ideally.  I'm 
assuming that we extract a package name (maybe the basename of the .tar 
file?)

1) Is uploader logged into an account?
   No: put in a temporary directory, send mail to admins to check it out
   manually.  This directory is not available on the web server.

2) Did it pass ccanlint?
   No: Check it into junkcode/<packagename>-<author> (replacing old if
   exists).  This "junkcode" section *is* available on the web server.

3) Does ccan name clash with existing directory name?
   No: Check it into repo/<packagename>
   Yes: is it the same author as the old one?
	Yes: replace the existing directory in the respository.
	No: use <packagename>-<author>?  And warn uploader somehow.

> What are other types of file should be allowed to upload? and should
> ccanlint run on these file types also?

Perhaps a .zip file as well?

> If any user upload a file, where to store it? Currently i storing extracted
> files in to testrepo directly like in ccan repo now.

I'd like it directly checked into the repository.  That avoids the problem 
that Adam was talking about with the client having to understand all the 
different types.

> And i am not able to delete files in http://ccan.ozlabs.org/dinesh/. I used
> --delete option in rsync but it says permission denied.

OK, I think that's fixed.  Please complain if it's not...

Cheers,
Rusty.



More information about the ccan mailing list