AURtools Tutorial
From ArchWiki
Contents |
[edit] Idea on AURtools
The AURtools are tools to help the Trusted Users to work with the AUR. They are available in the
[community]
repository. If you are not involved in the AUR, you most probably don't need these tools and this tutorial.
[edit] About the AURtools
They are written by MISSING and updated by MISSING. The never version numbering reflects the version of the AUR that that tupkg was released as part of. They were based on tupkg and in addition to it (they are backwards compatible) they contain a config file to help manage things.
[edit] Usage
[edit] Configuration
The only real change to tupkg is that it now is able to use a config
file,
~/.tupkg
instead of just taking command line options (though it
still takes them). Any command line options will OVERRIDE settings in
the config file. The config file should take the following format:
---BEGIN CONFIG FILE SNIP--- [tupkg] username = YOURUSERNAME password = YOURAURPASSWORD host = THEHOST port = THEPORT ---END CONFIG FILE SNIP---
Please note that the password tupkg uses is of AUR and NOT CVS.
Since the password needs to be plain-text, I suggest setting permissions on this file 600. The host and port options are OPTIONAL, and will default to aur.archlinux.org and 1034, respectively, so these two options don't technically even need to appear in the file.
Important: If you want to upload packages to the x86_64-version of [community] you have to set the port to 1035!
Username and password are NOT quoted. If tupkg notices that this file exists, it will use options from it, saving you some typing on the command line.
[edit] communitypkg
The second, and perhaps more exciting, new tool, is called communitypkg. Essentially, communitypkg is devtools for the [community] repo, and wraps the work of a cvs check in, cvs tagging, and binary package uploading, all into one tool. In case there's confusion, I've included some sample sessions using communitypkg below :
[edit] Sample new package session
export CVSROOT=":pserver:<userid>@cvs.archlinux.org:/home/cvs-community" cvs login cvs co community
- change to a dir in the CVS tree we just checked out
cd community/system
- copy over a build dir from wherever
mv ~/stuff/aurtools
- ADD the DIRECTORY (non recursive) to the cvs repo
cvs add aurtools cd aurtools
- ADD any build files to the cvs repo
cvs add PKGBUILD
- The package MUST be built OR copied over in order to use communitypkg
makepkg
- MAKE SURE EVERYTHING WENT WELL BEFORE YOU COMMIT
- then run
communitypkg
The communitypkg command, executed in the build dir, will:
- Upload the binary file using tupkg
- Do a cvs commit, with a message of "upgpkg: $pkgname-$pkgver"
- Do a cvs tag of it all to CURRENT
The package should now be uploaded and inserted, that's it!
Though communitypkg doesn't look like it simplifies anything in adding a package, it helps a bunch when upgrading...
[edit] Sample upgrade session
- Change to the dir in the CVS repo (you should've checked it out)
cd community/system/aurtools
- Now do any PKGBUILD editing you may need to do then
makepkg
as usual. The package must be either built in or copied to that dir
- Then
communitypkg
and it does its thing
Voila! Your package is updated.