[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building a custom package containing a small patch



Hi,

since I'm rather unexperienced with Debian packaging, I thought
it might be instructive to build a custom package with a small patch
(which is not of great use but easy to verify by its result). While my
customly built package seems to work, I'd like to know if there's
something I missed or I could improve and so on. Also I'd like to share
my experience, because it was fun figuring things out. :D So here's what
I've done (I hope it's not too mundane for all the readers of this list):

First, I've downloaded a diff [1] from KDE which corrects Okular's behaviour
when showing a landscape document in the "Opposite Pages" mode (see
bug report [2]) to a local folder. (BTW: I use Debian Wheezy.)

Then I downloaded the Okular's sources and applied the patch using:
$ apt-get sources okular
$ cd okular-4.8.4
$ patch -p1 ../changeset_r7d18d176bc60855dec4f38262fa32d9aa31146c4.diff
(changeset_r... is the diff downloaded from KDE)

Then I used
$ dch -l~test
to change the version of the package. I thought it's a good idea to
choose a smaller version number, so I could easier get back to the
original versions using aptitude or apt.

When I wanted to compile the patched package, I was told that I should use
$ dpkg-source --commit
which, from what I figured out, "tells" quilt about the changes applied
to the source. (I suspect that I could use quilt directly to apply the
patch?)

Then I used
$ fakeroot debian/rules binary
although I have the feeling, that this is not useful. (I read that it's
used to find out if a package can be built [3]. But it seemed to build
the complete package. So why not directly doing the next step?)

Eventually, using
$ dpkg-buildpackage -us -uc
I've built my custom packages, which I installed using dpkg.

So, I'm quite happy to see that things worked and I've not broken my
system so far ;D (which would have surprised me, since okular is not
really essential and I am up-/downgrading between almost the same
version of the package, so what could happen?).

Anyway, I'd like to thank the QT/KDE maintainers for their work. It's
hard to estimate for me how much effort it takes to write scripts and
tools to package the different parts of KDE so that even I can
compile them, but be assured that I highly appreciate your work!

Regards,
Stan


[1] https://projects.kde.org/projects/kde/kdegraphics/okular/repository/revisions/7d18d176bc60855dec4f38262fa32d9aa31146c4/diff/ui/pageview.cpp

[2] https://bugs.kde.org/show_bug.cgi?id=305194

[3] http://wiki.debian.org/SimpleBackportCreation


Reply to: