[Nix-dev] Auto package updating script

Tobias Hunger tobias.hunger at gmx.de
Wed Feb 9 23:51:43 CET 2011


Hello!

I have been looking into how to update packages when new versions of some 
piece of software becomes available upstream. I wanted to use the debian uscan 
tool since it is already pretty mature and well maintained:-)

Attached you will find a script that does the following:

It expects a status file (simple name-value pairs, "name" and "version" is all 
that is required) as well as a watch file (debian/uscan syntax) and uses this 
information to check for updates. If a new version is available upstream, then
it will download a copy and generate the new hash for the file.

It will then process all *.tmpl files that it finds in the directory it is 
working on. All occurences of %{VERSION}%, %{NAME}%, %{OLD_VERSION}%, %{URL}% 
and %{HASH}% will be replaced within those template files.

The script will make sure to not overwrite existing files that were modified 
since it last ran.

In addition there is a --generate switch to help setting up a new package. If 
if finds an existing directory then it will move all the existing files to 
.tmpl-files. If the directory does not yet exist, then it will copy all files 
found in a template directory (default one needs to be set in the script for 
now). Afterwards it will generate status and watch files (which need to be 
edited, just like the templates). The idea is to help a bit getting started...

So what do you guys think?

Best Regards,
Tobias 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Pkgsetup-script-with-example.patch
Type: text/x-patch
Size: 15184 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110209/5eed557c/attachment.bin 


More information about the nix-dev mailing list