Tales from the Gryphon

A day in the life of a Debian hacker

  • Edit this page
  • RecentChanges
  • History
  • Preferences
  • Comments
Tales from the Gryphon

Relevant Links

  • New key
  • GPG key
  • PGP key
  • Policy

Categories(89)

  • Books(29)
    • Action(3)
    • Classics(1)
    • Espionage(9)
    • Fantasy(10)
    • Fiction(1)
    • Sci-Fi(5)
  • Debian(8)
    • Official(2)
  • Software(26)
    • Arch(1)
    • Git(4)
    • Packaging(7)
    • Debian(9)
    • IkiWiki(2)
    • Security(3)
  • Movies(6)
  • SysAdmin(1)
  • Spam(10)
  • Travel(2)
  • Miscellaneous(6)

Archives

← 2010
Months
Jan Feb Mar Apr May Jun
Jul Aug Sep Oct Nov Dec
February
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28            

Indices

  • 2004
    • 05
    • 06
    • 07
    • 10
    • 11
  • 2005
    • 03
    • 05
    • 06
  • 2006
    • 01
    • 08
    • 12
  • 2007
    • 01
    • 08
    • 11
    • 12
  • 2008
    • 01
    • 04
    • 05
    • 06
  • 2009
    • 02
    • 03
    • 04
    • 05

My Books:
Widget_logo


Valid XHTML 1.1 Valid CSS! Linux Counter #69681 RSS Valid Ikiwiki hacker emblem

Manoj's hackergotchi
Wednesday 25 February
2009
A day in the life of a Debian hacker
[
  • software :: 
  • git :: 
  • packaging :: 
]

License: GPL

I have been meaning to write this up for a long time now, since I Packaging activity diagram vaguely made a promise to do so last Debconf. I have also been wondering about the inefficiencies in my work-flow, but I kept postponing my analysis since there were still large gaps in my packaging automation since I moved off Arch as my SCM of choice. However, recently I have taken a sabbatical from Debian, so I’ve had time to complete bits and pieces of my package building framework, enough so that I could no longer justify putting off the analysis. I tried writing it up, but the result confused even me; so I instead recorded every shell command during a recent series of packaging tasks, and converted that into a nice, detailed, activity diagram that you see over here. This is as efficient a work-flow as I have been able to come up with.

I use the usual suspects, uscan, git, pristine-tar, git_load_dirs, dch, dpkg, lintian, dupload, and three scripts that I wrote myself to help with automation. I build using a SELinux vitual machine in enforcing mode, but I have not included the steps taken to setup or tear down the virtual machine in the work-flow. I have not used pbuilder, since I did not like some of the choices (pbuilder-uml used to underlay the host machine fs on the virtual machine, and then create a chroot in the virtual machine, which was too convoluted for me) and I like watching SELinux AVC warnings to see if the build system does something funky. The result has been a work-flow that is virtual machine flavor agnostic. I also do not use topgit, since I dislike on principle serializing the features in my feature branches, but that is the topic of a whole new blog entry.

The three scripts I have written are:

stage_release
Copies my current git directory, its submodules (for ./debian), and the submodules of the submodules (./debian/common), and stages it into a file system mounted in my virtual machine (my vitual machine does not have access to the non-staging area on the host). It also gets rid of git specific directories from the exported sources. It knows about the layout and location of my working area, so I can call stage_release <pkg name> from anywhere in the file system.
remote_build
This script lives in the virtual machine, and is used to be run via ssh. It mounts the host staging directory, copies files to the build user home directory, ensures that the build dependencies are satisfied, and runs dpkg-buildpackage — twice. Then it copies the results back out to the staging results directory on the host machine, for further testing.
tag_release
This script, which also knows the work directory location and layout, parses the debian/changelog, derives a tag based on the changelog entry, tags the ./debian directory, and the top level package master branch, and pushes the sources and the tags to the public repository ionce I have uploaded the package to the archives. I generally delay the tagging and upload, so as to be able to use –amend while I quietly fix typos locally.

Along with a git commit hook script, that parses the commit log and adds pending tags to bugs closed in the commit, the figure above represents my complete work-flow – down to the details of every cd command I executed. I think there are too many steps still.

Feedback and commentary would be appreciated, as well as any suggestions to improve efficiency.

Manoj

Comments

RSS Atom
comment 1
What software did you use to draw the diagram?
Comment by edward [myopenid.com] — in the wee hours of Tuesday night, March 25th, 2009
comment 2
I use the bouml package to create the diagrams. I tend to use that for most of my UML2 diagrams.
Comment by srivasta [openid.golden-gryphon.com] — Tuesday afternoon, March 31st, 2009

Add a comment

Webmaster <webmaster@golden-gryphon.com>
Last commit: late Friday evening, April 24th, 2009

License: GPL

Last edited late Friday evening, April 24th, 2009