<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Debian on Chris J Arges</title><link>https://chrisarges.net/tags/debian/</link><description>Recent content in Debian on Chris J Arges</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 10 Sep 2013 09:30:00 -0700</lastBuildDate><atom:link href="https://chrisarges.net/tags/debian/index.xml" rel="self" type="application/rss+xml"/><item><title>use default gpg key for debuild</title><link>https://chrisarges.net/posts/2013-09-10-use-default-gpg-key-for-debuild/</link><pubDate>Tue, 10 Sep 2013 09:30:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-10-use-default-gpg-key-for-debuild/</guid><description>&lt;p&gt;When using &lt;code&gt;debuild -S&lt;/code&gt; to build a package on new machines, I need to go&#10;through the process of ensuring that my gpg is set up properly. If set up&#10;incorrectly, I get the following message with &lt;code&gt;debuild -S&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;gpg: skipped &lt;span style="color:#e6db74"&gt;&amp;#34;User &amp;lt;user@host.com&amp;gt;&amp;#34;&lt;/span&gt;: secret key not available&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To fix this, I go through the following steps:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Ensure I have proper gpg keys set up. You can check if yours is installed&#10;properly using: &lt;code&gt;gpg --list-keys&lt;/code&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Add &lt;code&gt;DEBEMAIL&lt;/code&gt; and &lt;code&gt;DEBFULLNAME&lt;/code&gt; to &lt;code&gt;~/.bashrc&lt;/code&gt;. Ensure&#10;&lt;code&gt;DEBEMAIL&lt;/code&gt; matches the email in the matching gpg key, and ensure&#10;DEBFULLNAME matches the name in same key. Put these into your &lt;code&gt; ~/.bashrc&lt;/code&gt;&#10;file or wherever they will be sourced into your environment.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Make sure your key is the default key: Edit &lt;code&gt;~/.gnupg/gpg.conf&lt;/code&gt; such&#10;that default-key is set to the proper key. This should match the 8 character&#10;fingerprint that you verified in (1).&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Make sure the same key is the default for debuilder: Edit&#10;/etc/devscripts.conf with the folllowing: &lt;code&gt;DEBSIGN_KEYID=XXXXXX&lt;/code&gt; where&#10;&lt;code&gt;XXXXXX&lt;/code&gt; is your key.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Now next time you use &lt;code&gt;debuild -S&lt;/code&gt; it should use the proper gpg key,&#10;name and email address!&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;</description></item><item><title>building a proper debian source package with dkms</title><link>https://chrisarges.net/posts/2013-09-05-building-proper-debian-source-package/</link><pubDate>Thu, 05 Sep 2013 07:10:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-09-05-building-proper-debian-source-package/</guid><description>&lt;p&gt;How can one use DKMS to build a proper debian source package? The &lt;code&gt;mkdsc&lt;/code&gt;&#10;command will actually generate one automatically, but there are a few more&#10;steps to simplify it, and bring it up to date.&lt;/p&gt;&#10;&lt;p&gt;First follow the steps &lt;a href="https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging"&gt;here&lt;/a&gt; for setting up a DKMS package. Make sure you&#10;can build it using dkms. Then do the following:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#First pull in some dependencies as necessary&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install devscripts debhelper&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Create the debian source package&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dkms mkdsc -m hello -v 0.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Create a directory to work in, and let’s copy those files into it&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir ~/dsc &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; cd ~/dsc&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cp /var/lib/dkms/hello/0.1/dsc/* .&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Extract the .dsc to be able to edit the directory&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dpkg-source -x hello-dkms_0.1.dsc &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd hello-dkms-0.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we run debuild -uc -us, we see a few lintian errors and warnings:&lt;/p&gt;</description></item><item><title>building a binary debian kernel module package with dkms</title><link>https://chrisarges.net/posts/2013-07-23-building-binary-debian-kernel-module/</link><pubDate>Tue, 23 Jul 2013 14:40:00 -0700</pubDate><guid>https://chrisarges.net/posts/2013-07-23-building-binary-debian-kernel-module/</guid><description>&lt;p&gt;DKMS packaging works great for building out of tree kernel modules. However,&#10;what do you do when you need to install to a machine without a compiler? You&#10;can accompish this by using DKMS&amp;rsquo;s &lt;code&gt;mkdriverdisk&lt;/code&gt; functionality.&lt;/p&gt;&#10;&lt;p&gt;First follow the steps &lt;a href="https://wiki.ubuntu.com/Kernel/Dev/DKMSPackaging"&gt;here&lt;/a&gt; for setting up a proper DKMS package.&lt;/p&gt;&#10;&lt;p&gt;After you&amp;rsquo;ve built the module successfully, you can use the following bash&#10;script to extract the .deb installer from the driverdisk. This way you can copy&#10;the deb file to the target machine and install. You must ensure that &lt;code&gt;$(uname -rm)&lt;/code&gt;&#10;on the target machine matches the build machine.&lt;/p&gt;</description></item></channel></rss>