Building a Ubuntu Package for DNSCrypt-proxy

3 Comments

What is DNS Crypt ? You may read the preview release here . But its official release is for Mac OSX package only. They release the source at github and i try to find any PPA package for it but i get this from pinowudi blog (http://pinowudi.blogspot.com/2011/12/referring-to-x4s-issue-for-linux.html) . So i want to give a try to build the package.

I try to build the package at my PPA with the help from Mahyuddin Susanto . After finish building the package, i do the testing at my workstation:

$sudo apt-add-repository ppa:fenris/ppa

$ sudo apt-get install dnscrypt-proxy
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
dnscrypt-proxy
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 168 kB of archives.
After this operation, 479 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/fenris/ppa/ubuntu/ oneiric/main dnscrypt-proxy all 0.1-1ubuntu2 [168 kB]
Fetched 168 kB in 4s (34.7 kB/s)
Selecting previously deselected package dnscrypt-proxy.
(Reading database … 232962 files and directories currently installed.)
Unpacking dnscrypt-proxy (from …/dnscrypt-proxy_0.1-1ubuntu2_all.deb) …
Processing triggers for man-db …
Setting up dnscrypt-proxy (0.1-1ubuntu2) …

Checking if is working after installed,

$ dnscrypt-proxy –help
dnscrypt-proxy 0.11
Copyright (C) 2011 OpenDNS, Inc.

Options:

-a    –local-address=…
-d    –daemonize
-e    –edns-payload-size=…
-h    –help
-k    –provider-key=…
-l    –logfile=…
-n    –max-active-requests=…
-p    –pidfile=…
-r    –resolver-address=…
-t    –tcp-port=…
-u    –user=…
-N    –provider-name=…
-P    –local-port=…
-V    –version

Please consult the dnscrypt-proxy(8) man page for details

Then i run it with sudo privileges,

$sudo dnscrypt-proxy –daemonize

After running the proxy as daemon, i change my dns by editing my /etc/resolv.conf

# Generated by NetworkManager
nameserver 127.0.0.1

So finally i test browsing internet to the OpenDNS Welcome page , so here is the screenshot

So everyone are welcome to test from my ppa:fenris/ppa and can comment my building packaging for my improvement in building other packaging in the future …

3 Comments (+add yours?)

  1. chenxiaolong
    Jan 30, 2012 @ 18:11:38

    Nice packaging :) I did notice a few thing though:

    * You have a build dependency on cdbs. You aren’t using the cdbs build scripts, but rather the dh build scripts (the “dh $@” in the debian/rules file). Packaging that uses cdbs would have a bunch of “include /usr/share/cdbs/…” lines in the debian/rules file.

    * Your debian/control file says that dnscrypt-proxy’s architecture is “all”; I think you meant to put “any.” If you set the architecture to “all,” it means that the SAME package (resulting .deb file) can be installed and run on any architecture (x86, x86_64, arm, etc) without modifications. If you set the architecture to “any,” it means that the package can be compiled for any architecture, but the generated .deb files will be different for each.

    The “all” architecture is usually only useful for non-compiled stuff, like game data, scripts, icons, etc.

    * Your description lines in the debian/control file are not formatted correctly. The extended description lines should be preceded with only 1 space. Also, the lines should not exceed 80 characters (usually, the width of the terminal).

    I’m not sure if you know, but there is a tool called “lintian” that checks that your package complies with the Debian packaging policies. I found the problems above by running lintian with your .changes file (after the .deb’s are created). Here was the output from lintian: http://pastie.org/3283620 And after the fixes: http://pastie.org/3283643

    So what about those last 2 errors? “helper-templates-in-copyright” means that the original template was used in the debian/copyright file. “description-synopsis-starts-with-article” means that the short description starts with “a,” “an,” or “the.” Both of these aren’t really problems, so to have lintian “accept” them, you’ll need to create a debian/dnscrypt-proxy.lintian-overrides file. The name of the file comes from the second column in the lintian output. The contents of the file is the lintian output WITHOUT the “E: ” or “W: “. http://pastie.org/3283686

    Now, if you run lintian again, you will see that your packaging is now perfect :) Here is the debian/ directory with all of lintian errors fixed: ompldr.org/vY2pkNQ/dnscrypt-proxy_0.1-1ubuntu2.debian.tar.gz

    I hope this helped :-)

  2. richiulr
    Mar 07, 2012 @ 11:21:29

    Thanks for providing the package in your ppa.
    One thing that’s missing for it being really usefull is automatic start when booting. But that’s also missing in the original package form opendns.

    Could you add this to your package?
    For hints on hos, see:
    http://www.linuxquestions.org/questions/debian-26/dnscrypt-930439/
    http://ricardocamargo.tumblr.com/post/17766624158/encrypt-dns-traffic-in-linux-with-dnscrypt-via

    I hope it will make it into the official repo…

  3. fenris
    Mar 11, 2012 @ 06:43:08

    richiulr,
    thanks for the feedback and comment, i have updated in my latest package. Do please test and give me feedback

    Accepted:
    OK: dnscrypt-proxy_0.1.orig.tar.gz
    OK: dnscrypt-proxy_0.1-1ubuntu5.debian.tar.gz
    OK: dnscrypt-proxy_0.1-1ubuntu5.dsc
    -> Component: main Section: misc

    dnscrypt-proxy (0.1-1ubuntu5) precise; urgency=high

    * Add upstart script to start automatically

Leave a Reply

You must be logged in to post a comment.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
This blog is protected by Dave\\\\\\\'s Spam Karma 2: 64688 Spams eaten and counting...