Page MenuHomeLubuntu

Packaging Tutorial
Updated 44 Days AgoPublic

Introduction

This is a tutorial which hopes to make it easy for new contributors to figure out how to fix a bug in Lubuntu. Note that this is specific to repositories that Lubuntu hosts on Phabricator, i.e. those components that differentiate Lubuntu from other Ubuntu flavors— most notably, LXQt. Everything else is handled upstream in Ubuntu. The process there will be similar.

Packaging is a vast and complex subject, especially given the many upstreams (Ubuntu, Debian, the developer themselves) and the changing processes/requirements among them. We have our own guide that proves some links to further resources.

Long story short

This is a high-level overview that is useful as a reference once you understand the process. If you are new, DO NOT just follow this but read the links below first.
Anything in CAPS is to be considered a variable and not to be taken literally.
## make a place to contain your work
mkdir WORKDIR
cd WORKDIR
## get the packaging repository from Phabricator
git clone ssh://git@phab.lubuntu.me:2222/source/PACKAGE.git
cd PACKAGE
## make sure you're on the development branch
git checkout ubuntu/CODENAME
## get the upstream source code
uscan --download-current-version
tar -x --strip-components=1 -f ../PACKAGE_*.orig.tar.xz
## make a new patch
mkdir debian/patches # just in case it doesn't exist
quilt push -a  # just in case there are patches, we apply them all
quilt new NAME.patch
# this is where you actually make the changes you want
quilt edit PATH/TO/FILE 
quilt refresh
quilt header --dep3 -e
## update the changelog
dch # -i or -a, depending (see below)
dch -r --distribution CODENAME
## test build the package
## NOTE THIS REQUIRES USE OF THE DEVELOPMENT VERSION!
sudo apt update && sudo apt build-dep PACKAGE
debuild -d --no-sign
## get rid of source
rm -rf !(debian) .pc/ # requires bash and `shopt -s extglob`
## push your changes
git add -A
arc diff
## don't forget to add @tsimonq2, @wxl as reviewers

Digging deeper

You must complete the packaging requirements if you want the above to work (don't skip this!)
The following is required reading if you want the above to make sense

Bonus points

  • Upload to a PPA to test your packages before release
  • Packages discusses where to find packages, their various states, how to get them in the archives, etc.
Last Author
wxl
Last Edited
Dec 7 2018, 5:14 PM

Event Timeline

wxl created this document.Aug 17 2018, 11:40 AM
wxl edited the content of this document. (Show Details)
wxl added a project: Development Team.
wxl edited the content of this document. (Show Details)
wxl added subscribers: wxl, tsimonq2.
wxl edited the content of this document. (Show Details)Aug 20 2018, 11:02 PM
wxl edited the content of this document. (Show Details)Aug 20 2018, 11:04 PM
wxl edited the content of this document. (Show Details)
wxl edited the content of this document. (Show Details)Aug 20 2018, 11:19 PM
wxl edited the content of this document. (Show Details)Aug 21 2018, 12:05 AM
wxl edited the content of this document. (Show Details)
wxl edited the content of this document. (Show Details)Aug 21 2018, 12:08 AM
wxl edited the content of this document. (Show Details)Aug 21 2018, 12:40 AM
wxl edited the content of this document. (Show Details)Aug 22 2018, 10:29 AM
wxl edited the content of this document. (Show Details)Aug 23 2018, 12:23 AM
wxl edited the content of this document. (Show Details)Aug 23 2018, 12:33 AM
wxl edited the content of this document. (Show Details)Aug 23 2018, 10:23 AM
wxl edited the content of this document. (Show Details)Aug 24 2018, 10:52 AM
wxl edited the content of this document. (Show Details)Aug 24 2018, 11:54 AM
wxl edited the content of this document. (Show Details)Aug 26 2018, 6:07 PM
wxl edited the content of this document. (Show Details)Aug 30 2018, 12:00 AM
wxl edited the content of this document. (Show Details)Sep 3 2018, 2:40 AM
wxl edited the content of this document. (Show Details)Sep 4 2018, 12:36 AM
wxl edited the content of this document. (Show Details)Sep 19 2018, 1:16 AM
wxl edited the content of this document. (Show Details)
wxl edited the content of this document. (Show Details)Sep 19 2018, 10:15 AM

It would be good to explain how to create teh SSH key. And how to upload. To createit here is a good tutorial:
https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair
anf for upload the user should go to their settings (click on avatar) and then click on the left "SSH Public keys" to upload the one that was generated in the above steps that's inthe file id_rsa.pub.

tsimonq2 changed the edit policy from "Development Team (Project)" to "All Users".Sep 25 2018, 9:12 AM
hmollercl edited the content of this document. (Show Details)Sep 25 2018, 9:17 AM
hmollercl edited the content of this document. (Show Details)
hmollercl published a new version of this document.
hmollercl edited the content of this document. (Show Details)Sep 26 2018, 2:21 PM
wxl edited the content of this document. (Show Details)Oct 1 2018, 1:56 AM
wxl edited the content of this document. (Show Details)Oct 1 2018, 3:20 AM
wxl edited the content of this document. (Show Details)Oct 1 2018, 11:30 PM
wxl edited the content of this document. (Show Details)Oct 2 2018, 12:19 AM
wxl edited the content of this document. (Show Details)Oct 2 2018, 12:34 AM
wxl edited the content of this document. (Show Details)Oct 3 2018, 2:11 AM
wxl edited the content of this document. (Show Details)Oct 4 2018, 2:59 PM
wxl edited the content of this document. (Show Details)Oct 4 2018, 3:15 PM
wxl edited the content of this document. (Show Details)Oct 6 2018, 5:43 PM
wxl edited the content of this document. (Show Details)
wxl edited the content of this document. (Show Details)Oct 7 2018, 1:13 AM
wxl edited the content of this document. (Show Details)Oct 7 2018, 1:18 AM
wxl edited the content of this document. (Show Details)Oct 7 2018, 10:05 PM
wxl published a new version of this document.
wxl edited the content of this document. (Show Details)Oct 8 2018, 11:17 AM
tsimonq2 edited the content of this document. (Show Details)Oct 8 2018, 2:16 PM
tsimonq2 edited the content of this document. (Show Details)
tsimonq2 edited the content of this document. (Show Details)Oct 8 2018, 2:34 PM
tsimonq2 edited the content of this document. (Show Details)Oct 8 2018, 2:55 PM
tsimonq2 published a new version of this document.
tsimonq2 edited the content of this document. (Show Details)Oct 8 2018, 2:57 PM
tsimonq2 edited the content of this document. (Show Details)

Now that packages in launchpad are moving to git from bzr, many from desktop-team suggested to use git-buildpackage instead of quilt directly. I was wondering why though?

Most developers still use Quilt in Debian, and it's much more stable from what I remember.

wxl edited the content of this document. (Show Details)Oct 10 2018, 11:13 AM
wxl edited the content of this document. (Show Details)Nov 21 2018, 6:36 PM
wxl edited the content of this document. (Show Details)Dec 7 2018, 4:35 PM
wxl edited the content of this document. (Show Details)Dec 7 2018, 5:00 PM
wxl edited the content of this document. (Show Details)Dec 7 2018, 5:06 PM
wxl published a new version of this document.
wxl edited the content of this document. (Show Details)
wxl edited the content of this document. (Show Details)Dec 7 2018, 5:14 PM