Hi all, per my AR in this week's ubuntu-mobile meeting I've created a script that extends what Inuka's script does to automate as much of the process of pushing to the PPA as possible. The script is run as such:
Usage: ppaprepare [-d outdir] [-u user] project tag Required Arguments: project: repo name (as full URL or just a project name) tag: git tag identifying source you want to release Options: -d: outdir is the directory to place the source tree -u: user is the login id for the git repo You can provide a project name and optional username to construct the moblin.org git repo path for the project, or the project argument can just be the full URL to the repo (this is important if you're not using moblin.org). Then you supply the tag for your git repo that you want to upload to the ppa. The script takes care of the rest. The following is the output of a run for moblin-applets with comments inlined. [/platform]> ppaprepare -d /tmp ssh://[EMAIL PROTECTED]/home/repos/projects/moblin-applets.git hardy-v0.60 ### First it clones the repo, moves to your tag, and creates a source tarball minus the debian and .git folders. This was lifted more or less intact from Inuka's script. ### Initialized empty Git repository in /tmp/moblin-applets/.git/ remote: Generating pack... remote: Done counting 3790 objects. remote: Deltifying 3790 objects... remote: 100% (3790/3790) done Indexing 3790 objects... remote: Total 3790 (delta 2464), reused 1002 (delta 477) 100% (3790/3790) done Resolving 2464 deltas... 100% (2464/2464) done Note: moving to "hardy-v0.60" which isn't a local branch If you want to create a new branch from this checkout, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new_branch_name> HEAD is now at 57d6653... preincrement release for test GIT source tree is at /tmp/moblin-applets-0.60 GIT source tarball is /tmp/moblin-applets-0.60.tar.gz ### The script then pings the ppa.launchpad.net site and determines the latest version of your package. If your git repo is the same version it fails and tells you to up your version. If your version is newer it then grabs the source with dget -x and assembles it locally ### dget: retrieving http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/m/moblin-applets //moblin-applets_0.59-0ubuntu1.dsc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1717 100 1717 0 0 4378 0 --:--:-- --:--:-- --:--:-- 0 dget: retrieving http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/m/moblin-applets //moblin-applets_0.59.orig.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2913k 100 2913k 0 0 359k 0 0:00:08 0:00:08 --:--:-- 400k dget: retrieving http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/m/moblin-applets //moblin-applets_0.59-0ubuntu1.diff.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 22247 100 22247 0 0 118k 0 --:--:-- --:--:-- --:--:-- 3869k dpkg-source: extracting moblin-applets in moblin-applets-0.59 dpkg-source: unpacking moblin-applets_0.59.orig.tar.gz dpkg-source: applying ./moblin-applets_0.59-0ubuntu1.diff.gz ### I added in a couple diffs for quick access to what's changed from the ppa version to your new git version. There's one diff for the source tree minus the debian directory, and one for just the debian directory. This is helpful in ensuring that your changes are in and that you haven't made any unnecesary edits to the debian directory ### PPA source tree is at /tmp/ppa-moblin-applets/moblin-applets-0.59 PPA vs GIT source diff is /tmp/ppa-moblin-applets/moblin-applets-ppa0.59-git0.60.diff PPA vs GIT debian dir diff is /tmp/ppa-moblin-applets/moblin-applets-ppa0.59-git0.60-debian.diff ### Last, the script calls uupdate to create a new source tree that has the ppa version as the base with the git changes on top. This is the tree that you need to tar up and send to the PPA once you're sure everything looks good ### New Release will be 0.60-1. Symlinking to pristine source from moblin-applets_0.60.orig.tar.gz... -- Untarring the new sourcecode archive /tmp/moblin-applets-0.60.tar.gz Success! The diffs from version 0.59-0ubuntu1 worked fine. Remember: Your current directory is the OLD sourcearchive! Do a "cd ../moblin-applets-0.60" to see the new package ### The script stops after uupdate. You have to merge in any patches and run debuild yourself before commiting to the PPA. Also, remember that the version in debian/changelog has to conform to the ubuntu format or uupdate won't function. Basically project-version-0ubuntu1,2,3... if that -0ubuntu# isn't there, uupdate will complain and quit. ### New PPA src directory at /tmp/ppa-moblin-applets/moblin-applets-0.60 Make sure /tmp/ppa-moblin-applets/moblin-applets-0.60 looks ok before uploading When ready, cd to it and run this command: debuild -S -sa -k<gpgkey> Where the gpg key is found via "gpg --list-keys": pub 1024D/<gpgkey> 2008-01-01 uid Full Name (My PPA Key) <[EMAIL PROTECTED]> sub 2048g/58CF328B 2008-01-01 [/platform]> That's it. Rusty, let me know if you want this (or an updated version with whatever changes you think are needed) added to the wiki.
ppaprepare
Description: ppaprepare
-- Ubuntu-mobile mailing list Ubuntu-mobile@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile