<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Martin Pitt &#187; script</title>
	<atom:link href="http://www.piware.de/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piware.de</link>
	<description>addicted to Ubuntu development</description>
	<lastBuildDate>Tue, 07 Feb 2012 19:53:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>New Apport feature: custom bug duplicate identification</title>
		<link>http://www.piware.de/2011/03/new-apport-feature-custom-bug-duplicate-identification/</link>
		<comments>http://www.piware.de/2011/03/new-apport-feature-custom-bug-duplicate-identification/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 15:23:54 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[Apport]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=447</guid>
		<description><![CDATA[Apport has provided built-in support for automatically identifying and marking duplicate bug reports for normal signal as well as Python crashes. However, we have more kinds of bug reports submitted through Apport which could benefit from automatic duplication: X.org GPU freezes, package installation failures, kernel oopses, or gcc internal compiler errors, i. e. pretty much [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://launchpad.net/apport">Apport</a> has provided built-in support for automatically identifying and marking duplicate bug reports for normal signal as well as Python crashes. However, we have more kinds of bug reports submitted through Apport which could benefit from automatic duplication: X.org GPU freezes, package installation failures, kernel oopses, or gcc internal compiler errors, i. e. pretty much everything that gets reported automatically these days.</p>
<p>The latest Apport 1.20 (which also just hit current Ubuntu Natty) now allows <a href="http://bazaar.launchpad.net/~apport-hackers/apport/trunk/view/head:/doc/package-hooks.txt">package hooks</a> to set a special field <code>DuplicateSignature</code>, which abstracts the concept for other kinds of bug reports where Apport doesn&#8217;t do automatic duplication. This field should both uniquely identify the problem class (e. g. &#8220;XorgGPUFreeze&#8221;) as well as the particular problem, i. e. variables which tell this instance apart from different problems. Aside from these requirements, the value can be any free-form string, Apport only treats it as an opaque value. It doesn&#8217;t even need to be ASCII only or only be one line, but for better human inspection I recommend this.</p>
<p>So your report could do something like</p>
<pre>
   report['DuplicateSignature'] = 'XorgGPUFreeze: instruction %s regs:%s:%s:%s' % (
                     current_instruction, regs[0], regs[1], regs[2])
</pre>
<p>or</p>
<pre>
    report['DuplicateSignature'] = 'PackageFailure: ' + log.splitlines()[-1]
</pre>
<p>This is integrated into Apport&#8217;s already existing <a href="http://bazaar.launchpad.net/~apport-hackers/apport/trunk/view/head:/apport/crashdb.py">CrashDatabase</a> class, which maintains a signature →master bug mapping in a SQLite database. So far these contained the crash signatures (built from executable name, signal number, and the topmost 5 stack trace names). As usual, if an incoming report defines a duplicate signature (from the crash stack trace or from <code>DuplicateSignature</code>), the first one will become the master bug, and all subsequent reports will automatically get closed as a duplicate in Launchpad.</p>
<p>Thanks to Bryce Harrington, who already came up with using this in the latest <a href="https://launchpad.net/ubuntu/+source/xserver-xorg-video-intel/2:2.14.0-4ubuntu4">Intel X.org graphics driver</a> for GPU hangs!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/03/new-apport-feature-custom-bug-duplicate-identification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New tool to check support status of dependencies</title>
		<link>http://www.piware.de/2011/01/new-tool-to-check-support-status-of-dependencies/</link>
		<comments>http://www.piware.de/2011/01/new-tool-to-check-support-status-of-dependencies/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 01:33:12 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mir]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=431</guid>
		<description><![CDATA[A common source of unnoticed depwaits or uninstallability are main packages which introduce new build or binary dependencies from universe. These either require fixing, or filing a main inclusion report. To help with this, I added a new check-mir script into ubuntu-dev-tools version 0.110, which walks through all build and binary dependencies, checks if they [...]]]></description>
			<content:encoded><![CDATA[<p>A common source of unnoticed depwaits or uninstallability are main packages which introduce new build or binary dependencies from universe. These either require fixing, or filing a <a href="https://wiki.ubuntu.com/MainInclusionProcess">main inclusion report</a>.</p>
<p>To help with this, I added a new <code>check-mir</code> script into <a href="http://packages.ubuntu.com/natty/ubuntu-dev-tools">ubuntu-dev-tools</a> version 0.110, which walks through all build and binary dependencies, checks if they are in main/restricted, also considers alternative dependencies, and create a report with a few hints.</p>
<p>For a main package where everything is alright, it looks like this:</p>
<pre>
$ check-mir
Checking support status of build dependencies...

Checking support status of binary dependencies...
All dependencies are supported in main or restricted.
</pre>
<p>Example output for a totally synthetic situation with universe dependencies, non-preferred alternatives in main, and other special cases:</p>
<pre>
Checking support status of build dependencies...
 * pmount binary and source package is in universe
  ... alternative libexif-dev is already in main; consider preferring it
 * weechat binary and source package is in universe
 * sendmail-bin is in universe, but its source sendmail is already in main; file an ubuntu-archive bug for promoting the current preferred alternative

Checking support status of binary dependencies...
 * wesnot does not exist (pure virtual?)
 * wesnoth binary and source package is in universe

Please check https://wiki.ubuntu.com/MainInclusionProcess if this source package needs to get into in main/restricted, or reconsider if the package really needs above dependencies.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/01/new-tool-to-check-support-status-of-dependencies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>lpshell &#8211; convenient launchpadlib script</title>
		<link>http://www.piware.de/2010/01/lpshell-convenient-launchpadlib-script/</link>
		<comments>http://www.piware.de/2010/01/lpshell-convenient-launchpadlib-script/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:48:01 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=270</guid>
		<description><![CDATA[These days I often use launchpadlib in my projects for scripting access/modifications in Launchpad. While launchpadlib has quite a good API documentation, this only covers the method calls, not the attributes or collections. So it often takes some poking and trying until you figure out how to access/change things. I found myself typing the same [...]]]></description>
			<content:encoded><![CDATA[<p>These days I often use <a href="https://launchpad.net/launchpadlib">launchpadlib</a> in my projects for scripting access/modifications in Launchpad. While launchpadlib has quite a good <a href="https://launchpad.net/+apidoc/">API documentation</a>, this only covers the method calls, not the attributes or collections. So it often takes some poking and trying until you figure out how to access/change things.</p>
<p>I found myself typing the same things over and over, so I finally wrote a little script called <code>lpshell</code>:</p>
<blockquote><pre>
#!/usr/bin/python -i
import code, os, sys
from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT, EDGE_SERVICE_ROOT
lp = Launchpad.login_with('test', STAGING_SERVICE_ROOT)
</pre>
</blockquote>
<p>This logs into Launchpad and gives you an interactive Python shell with an &#8220;lp&#8221; object:</p>
<blockquote><pre>
$ lpshell
>>> lp.bugs[439482].duplicate_of
<bug at https://api.staging.launchpad.net/beta/bugs/432598>
</pre>
</blockquote>
<p><strong>Update:</strong> I committed this to ubuntu-dev-tools now, renamed to <code>lp-shell</code> for consistency with the other <code>lp-*</code> commands.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2010/01/lpshell-convenient-launchpadlib-script/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Automated release tarball upload to Launchpad</title>
		<link>http://www.piware.de/2009/09/automated-release-tarball-upload-to-launchpad/</link>
		<comments>http://www.piware.de/2009/09/automated-release-tarball-upload-to-launchpad/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 14:50:57 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tarball]]></category>

		<guid isPermaLink="false">http://martinpitt.wordpress.com/?p=99</guid>
		<description><![CDATA[I often do upstream releases of my upstream projects that I do on Launchpad, mostly for Apport and jockey. But doing this has been quite tedious until now: You have to go to the project page, pick the series (usually &#8220;trunk&#8221;), create a new release, create a new milestone along the way, then go to [...]]]></description>
			<content:encoded><![CDATA[<p>I often do upstream releases of my upstream projects that I do on Launchpad, mostly for <a href="https://launchpad.net/apport">Apport</a> and <a href="https://launchpad.net/jockey">jockey</a>. But doing this has been quite tedious until now: You have to go to the project page, pick the series (usually &#8220;trunk&#8221;), create a new release, create a new milestone along the way, then go to &#8220;add download file&#8221;, and upload your .tar.gz and .tar.gz.asc.</p>
<p>Because this is rather inconvenient, I don&#8217;t do as many upstream releases as I should. But thanks to our tireless launchpadlib developers it is now possible to automate all that, so I wrote a new script <a href="http://bazaar.launchpad.net/%7Eubuntu-dev/ubuntu-dev-tools/trunk/annotate/head%3A/lp-project-upload">lp-project-upload</a> which does all that in a simple command:</p>
<pre>
  $ lp-project-upload apport 1.8.2 apport-1.8.2.tar.gz
  Release 1.8.2 could not be found for project. Create it? (Y/n) y
 </pre>
<p>The script is based on Brad Crittenden&#8217;s <a href="http://blog.launchpad.net/api/recipe-for-uploading-files-via-the-api">recipe for uploading project files</a>, and I added the creation of milestones and releases.</p>
<p>The script is contained in current Karmic&#8217;s <code>ubuntu-dev-tools</code> package now. Enjoy, and of course feel free to extend it for changelogs, release notes, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2009/09/automated-release-tarball-upload-to-launchpad/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Easier testing for Apport bug patterns</title>
		<link>http://www.piware.de/2009/05/easier-testing-for-apport-bug-patterns/</link>
		<comments>http://www.piware.de/2009/05/easier-testing-for-apport-bug-patterns/#comments</comments>
		<pubDate>Thu, 28 May 2009 07:55:08 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[Apport]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://martinpitt.wordpress.com/?p=77</guid>
		<description><![CDATA[This morning I added a test script to the Apport bug patterns. This finally allows you to reliably test a new bug pattern before you actually commit/push it. You can invoke it with either a .crash file, or a Launchpad bug number: $ ./test-local 122988 Matched bug pattern: https://launchpad.net/bugs/122637 $ ./test-local /var/crash/_bin_bash.1000.crash No match]]></description>
			<content:encoded><![CDATA[<p>This morning I added a <a href="http://people.canonical.com/~pitti/bugpatterns/test-local">test script</a> to the <a href="http://people.canonical.com/~pitti/bugpatterns/README">Apport bug patterns</a>.</p>
<p>This finally allows you to reliably test a new bug pattern before you actually<br />
commit/push it. You can invoke it with either a .crash file, or a Launchpad bug<br />
number:</p>
<p> <code><br />
 $ ./test-local 122988<br />
 Matched bug pattern: https://launchpad.net/bugs/122637<br />
 $ ./test-local /var/crash/_bin_bash.1000.crash<br />
 No match<br />
 </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2009/05/easier-testing-for-apport-bug-patterns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Presentations of shell commands</title>
		<link>http://www.piware.de/2009/04/presentations-of-shell-commands/</link>
		<comments>http://www.piware.de/2009/04/presentations-of-shell-commands/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 02:28:56 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://martinpitt.wordpress.com/?p=59</guid>
		<description><![CDATA[Today I was sitting in the plane from Dresden to San Francisco, and worked on my DKMS demo for the Linux Foundation summit. DKMS is a command line tool for managing device driver packages. I wondered how to present this. The commands and features I wanted to show are quite complex, and typing all of [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was sitting in the plane from Dresden to San Francisco, and worked on my <a href="http://linux.dell.com/dkms/">DKMS</a> demo for the Linux Foundation summit. DKMS is a command line tool for managing device driver packages.</p>
<p>I wondered how to present this. The commands and features I wanted to show are quite complex, and typing all of them during the presentation is too cumbersome. Besides, I&#8217;m just a lousy typer when someone else is watching. On the other hand, pasting them into classical slides is too static; I find it much easier to understand something that reveals itself step by step.</p>
<p>So what I needed is to prepare the chain of commands in advance, and then send them through an interactive &#8220;step by step&#8221; interpreter. A quick apt-cache search did not reveal any readymade solution, thus I hacked together a small script <a href="http://piware.de/tools/shellpresent">&#8220;shellpresent&#8221;</a> which does exactly that:</p>
<ul>
<li>a line with a command gets echoed, then it waits for a keypress, then runs the command and waits for another keypress (so that you can explain the output)</li>
<li>a comment line starting with # is printed in green, and doesn&#8217;t wait for a keypress</li>
<li>a blank line clears the screen</li>
<li> commands are prepended by a red &#8220;$&#8221; sign to indicate a command prompt</li>
</ul>
<p>It now does exactly what I want. Perhaps it is useful for someone else out there as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2009/04/presentations-of-shell-commands/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

