Living on Ubuntu – Instance #2 – Creating a new package

Those are notes from a few weeks ago when I created a sample package for Ubuntu.

This article is written both as a guide and a timeline. There is no explicit tutorial here, so get your feet wet by yourself, and make sure to follow the references.

Edit: enumeration became a mess here. Sorry for that.

  1. Introduction; Packaging new software for Ubuntu; Debian Packaging Tutorial
  2. Get a couple of packages for packaging (duh):
sudo aptitude install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file packaging-dev
  1. Make sure you have a PGP key.
  2. Send your PGP key to Ubuntu servers.

gpg --send-keys --keyserver <KEY ID>
  1. Make sure you have a SSH key.

  2. Create a clean build environment:

pbuilder-dist <release> create

At the time of this post, I used ‘trusty’ as the release name.

  1. Make sure you have a Launchpad account.
  • Update your Launchpad information and upload both your SSH and your GPG key into there.

  • Identify yourself with bzr.

  • bzr whoami "Bob Dobbs <>"
    bzr launchpad-login subgenius
    1. Start a new package, and choose its type to create a new template.
    bzr dh-make hello 2.7 hello-2.7.tar.gz
    1. Explore and edit the files of your new template. In particular, see the debian directory.

    12. bzr add and commit your changes. This is a DVCS such as git, so this should feel familiar.

    1. Building the package:
    bzr builddeb -- -us -uc

    The previous flags tell the system not to use GPG. -nc might also be useful: it tells the system not to start from scratch.

    1. To view the contents of a package:
    lesspipe *.deb
    1. To install / remove your new built package:
    sudo dpkg -i *.deb # attention to the architecture of your package!
    sudo dpkg -r <name-of-your-packagee>

    An alternative is to invoke sudo debi.

    1. Check for errors.
    lintian *.dsc *.deb
    1. Next (optional; just to test the package in the chroot you have set up before, with pbuilder)
    bzr buildddeb -S
    cd ../build-area
    pbuilder-dist trusty build *ubuntu*.dsc
    1. Upload your package to Launchpad:
    dput ppa:<your-launchpad-username>/<your-ppa-name> *.changes

    If you wanted to create a pull request instead:

    bzr push lp:~<launchpad-username>/+junk/hello-package

    And that’s it! Then just share your PPA with your friends and clients.

    I hope this guide could serve to you as a quick reference of creating a new Ubuntu (or even Debian) package.

    Living on Ubuntu – Instance #2 – Creating a new package

    Compiling/Installing pacman on Ubuntu

    No, this is not the classic game. Here are logs. Just logs.

    $ git clone git://
    $ cd pacman/
    $ ./
    $ ./configure LIBS="-lpthread -larchive" # attention here! ./configure without this parameter didn't work on my machine. The error was: DSO missing from command line; something like that.
    $ make
    $ sudo checkinstall # attention here! You could simply (and näively) do a
    sudo make install, however, this wouldn’t create a .deb package. Since we have good tools, we should use them! Now, you can remove pacman anytime you want with dpkg -r pacman. No need for make uninstall.

    Why this post? Because of this forum thread.

    Compiling/Installing pacman on Ubuntu

    Living on Ubuntu – Instance #1

    As stated in my last post, I’m now using Ubuntu as my main linux distro. This is temporary and might even hurt a little, however I’m willing to keep going with this goal for a while. In this post I’m going to document some cleanups and tips/tricks/whatever that I find interesting and, sometimes, important too.

    Disclaimer: I am a heavily biased Arch Linux user. Anything related to it in this post is probably not a coincidence. This disclaimer won’t be repeated through other posts of this series. So, you have been warned. This is important to understand some of the motivations behind the changes I’ll list here.

    Now, just one thing: one of the reasons I’m using Ubuntu right now is so I won’t spend much time customizing it. So, I am deliberately cutting this list in more than a half. There are other things that I would usually do but I simply won’t.

    -1. Enable the root account – by default, the root account is disabled on Ubuntu. This is great so newbies won’t harm the system; however, powerusers don’t like that, this is simply annoying for them. You might do that as follows:

    sudo passwd root

    Then just enter a password for it. Now you might become a superuser by invoking su.

    1. Install aptitude. And never, I mean ever ever touch apt-get. apt-get is evil and will break your system sooner or later. Top used aptitude commands are probably aptitude install, aptitude upgrade, aptitude remove and aptitude search. The -y flag is useful sometimes, too. So,
    sudo apt-get install aptitude -y

    Then forget apt-get!

    1. Install unity-tweak-tool then change some annoying Unity defaults. What is annoying depends on each user taste.
    2. I like to create a Ramdisk. How? Here. This also works for Ubuntu.
    3. Install the classicmenu-indicator package.
    4. I like using a clipboard manager. clipit is a good choice and is well integrated with the Unity panel.
    5. Add/activate workspaces. 4 of them is (usually) okay. Use Ctrl + Alt + directional keys to cycle through them.
    6. Super + D shows the desktop. (Super is usually the key with the windows logo).
    7. Ctrl + Alt + L locks the screen.
    8. Install the nautilus-open-terminal package.
    9. Improve your .bashrc. How? See here. You’ll also find my .bashrc there (search for thiagowfx).

    Continuation post.

    Living on Ubuntu – Instance #1

    All over again, shall we?

    I’ve just switched from Arch to Ubuntu. OMG, what the hell [with me]? To make matters interesting, I’m using Unity (not other (non-)fancy DE/WM) in an underlying btrfs filesystem.

    First point: this change is temporary; it will probably last just for a couple of months. In the best scenario possible, this post would begin with a “I’ve just installed Ubuntu”. However, there is the “I wiped my Arch installation” thing, just because the size of the SSD of my ultrabook: only 32 GB.

    I’ve done something similar in the past: however, in the last time, I’ve installed Gentoo – to try it – in my HDD. It was cool and I learned several concepts of how a source based distro works, but I haven’t used Gentoo during much time, precisely because I’ve installed it to my HDD.

    Screenshot from 2014-09-07 12:05:42

    You see the difference?

    First notable thing: it seems like I’m always having problems with Arch. Tell me: otherwise, why would I delete it from time to time? Well, let’s clarify these things. The problem is exactly the opposite: I don’t have [any] problems with Arch (not today). And this is precisely the problem!. It feels so perfect that I feel I’m missing the point of other distros.

    Now, you already know I’m an advocate of Arch, but I should tell you the following: [a priori] I don’t claim it to be perfect for purposes other than a personal Desktop. In other words, I’m not [a priori] an advocate of Arch for servers, or for kids, or for your fancy friends, or for use in corporal environments, or anything else you might come with. Arch is perfect for a personal desktop because you are the person who knows everything about it, and you feel (and you have) 100% control of your system, and you (later on) claim to be an expert on this Linux thing. And all of this just because of an amazing community and good philosophy principles and practices (and a little of work from your part). Right?

    OK, so let’s forget Arch for a while – you should notice I refer to it as “Arch Linux” just a few times –> it is not the Linux thing that is great here, but the Arch thing itself, instead! <– –. Now, let’s go back to Ubuntu and some motivations behind this change.

    The thing is: I would try Fedora or openSUSE at first. And I actually installed Fedora. However, I wiped it just a few hours later; it kept freezing. This wasn’t the only reason for this wiping, however: I find fedora is really annnoying in some points…

    Well, so I’ve ended up on Ubuntu. Linux Mint would be an option, however I felt I should get out of my comfort zone, so Ubuntu would be better in that sense.

    Now, to the Ubuntu thing

    I like and I dislike Canonical at the same time. However, I like it more than I dislike it. So, I find Ubuntu a pretty decent piece of software (system) for the Desktop, it is nice. While nowadays I’m not a super fan of it (hm, I’m not even a common/normal fan…), I don’t hate it.

    There are a couple of reasons why an advanced user is not usually (however, please notice this is not the rule; there are exceptions!) passionated about Ubuntu – or other linux distros for novices. I won’t talk about these reasons in this post – maybe in another one. However, there are some goals that I want to address/complete until I get back to Arch:

    Crazy goals

    • [ ] play with the btrfs filesystem
    • [ ] play with Launchpad and PPAs (bzr, etc). In particular, create some .deb packages for Ubuntu.
    • [ ] play with a virtualized Arch Linux – because there is a community out there I want to keep up with, right? Examples include but are not limited to: ssh to a VPS, gnome-boxes, VirtualBox, docker/containers.
    • [ ] apt-get, apt-file and aptitude (moderably advanced) insights
    • [ ] get to know vim! (Why god, why? Emacs is so nice for now…) [wq!]
    • [ ] insights about the Unity shell. Customization, etc. Yeah, I’m using Unity. No cinnamon, no i3wm.
    • [ ] more Ubuntu specific things I’ll discover in this process…

    During the next days I’ll probably talk about my experience with these goals. See ya.

    All over again, shall we?

    [mini][Opinião] Ubuntu 14.04 lançado

    Como um post meu típico é relativamente grande, vou passar a utilizar a tag [mini] para denotar posts mais concisos. Como esse.

    O Ubuntu 14.04 acabou de ser lançado. Olhando rapidamente as release notes 1, dá para notar que tem muita coisa (e bastante atualizada) boa nessa versão LTS. Também não faz muito tempo (menos de 1 mês) que a versão 3.12 do Gnome foi lançada 2, o que não é nenhuma surpresa, já que as releases dos dois projetos são mais ou menos sincronizadas.

    Desde que a interface Unity foi introduzida, depois de muito mimimi (alguns com razão, outros nem tanto) por parte da comunidade e do papo que “Ubuntu is not a democracy3, depois que o Steam passou a ser suportado no Ubuntu, depois que o bug #1 foi fechado 4 e o skype passou a ser suportado no Ubuntu e, finalmente, depois que pude acompanhar um pouco sobre como a comunidade do Ubuntu funciona, e ter conhecido um pouco mais o Jono Bacon (community manager), tenho que dizer que a Canonical está fazendo um ótimo trabalho.

    Apesar de não adotá-lo como a minha distro principal atualmente, é bastante bonito ver um projeto open source vastamente utilizado por vários usuários no mundo todo, inclusive vários conhecidos, prosperar. Esse é o poder da comunidade 5.

    Aproveito e deixo esse 6 link para quem acabou de instalar essa versão.

    [mini][Opinião] Ubuntu 14.04 lançado

    Era uma vez…kernel panic, uma história de amor [Parte 1]

    Eu comecei a escrever esse post faz uns 3 meses, no dia dos namorados desse ano (isso explica o título sugestivo do post). Mas tinha desistido porque eu não ia conseguir expressar, na época, todas as ideias que eu queria. E nem vou hoje, se querem saber. [Saber] expressar todas as ideias é uma arte difícil! Mas decidi editar o post e acrescentar mais algumas coisas nele para publicá-lo, anyway.
    Fonte: Wikimedia Commons

    Continue reading “Era uma vez…kernel panic, uma história de amor [Parte 1]”

    Era uma vez…kernel panic, uma história de amor [Parte 1]