2014-02-05 13:39:32 +01:00
|
|
|
README (English)
|
|
|
|
##################################################
|
|
|
|
Launchpad Package tools
|
|
|
|
##################################################
|
|
|
|
|
2014-07-01 11:55:11 +02:00
|
|
|
This file contains explanation how to publish
|
2014-02-05 13:39:32 +01:00
|
|
|
a package onto LaunchPad.
|
|
|
|
Some string useful for local testing creation recipe.
|
2014-07-01 11:55:11 +02:00
|
|
|
Here used technique when you have separate debian directory
|
|
|
|
and merge it with source using recipe file.
|
2014-02-05 13:39:32 +01:00
|
|
|
|
|
|
|
|
2014-07-01 11:55:11 +02:00
|
|
|
# This is standard command to work on DEB packaging:
|
2014-02-05 13:39:32 +01:00
|
|
|
#
|
|
|
|
# To install all packagers tools:
|
|
|
|
# sudo apt-get install bzr-builder bzr dpatch pbuilder debootstrap devscripts debhelper build-essential
|
|
|
|
|
|
|
|
# Init local working env
|
|
|
|
- Create account on launchpad.org
|
|
|
|
- Create Project
|
2014-07-01 11:55:11 +02:00
|
|
|
- Import branch from git mirror
|
|
|
|
- Create new recipe
|
2014-02-05 13:39:32 +01:00
|
|
|
- Upload SSH public key onto account
|
|
|
|
- Upload you GPG sign key
|
|
|
|
- Run from command line:
|
|
|
|
bzr launchpad-login yourlogin
|
|
|
|
bzr whoami "Your Name <email@email.com>"
|
2014-07-01 11:55:11 +02:00
|
|
|
- Create a file /.pbuilderrc with content (need for local testing creation recipe)
|
2014-02-05 13:39:32 +01:00
|
|
|
## Overrides /etc/pbuilderrc
|
|
|
|
|
|
|
|
# Default distribution
|
2014-07-01 11:55:11 +02:00
|
|
|
# Uncomment if you want different distribution system than you use now.
|
2014-02-05 13:39:32 +01:00
|
|
|
#DISTRIBUTION=saucy
|
|
|
|
COMPONENTS="main restricted universe multiverse"
|
|
|
|
|
|
|
|
# Repositories
|
|
|
|
MIRRORSITE=http://archive.ubuntu.com/ubuntu
|
|
|
|
OTHERMIRROR="deb ${MIRRORSITE} ${DISTRIBUTION} ${COMPONENTS} | deb ${MIRRORSITE} ${DISTRIBUTION}-backports ${COMPONENTS} | deb ${MIRRORSITE} ${DISTRIBUTION}-security ${COMPONENTS} | deb ${MIRRORSITE} ${DISTRIBUTION}-updates ${COMPONENTS} | deb http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu ${DISTRIBUTION} main"
|
2014-07-01 11:55:11 +02:00
|
|
|
# Last PPA is example how to add additional PPA to your local build system. Useful when you want use packages that don't exist in standard repository.
|
2014-02-05 13:39:32 +01:00
|
|
|
|
2014-07-01 11:55:11 +02:00
|
|
|
# For build results (in this directory you will find deb packages. Don't forget this path!)
|
2014-02-05 13:39:32 +01:00
|
|
|
BUILDRESULT=${HOME}/pbuilder/result
|
|
|
|
|
|
|
|
# Mount directories inside chroot environment
|
|
|
|
BINDMOUNTS=${BUILDRESULT}
|
|
|
|
- Make our pbuilder trust packages from our PPA
|
2014-07-01 11:55:11 +02:00
|
|
|
For example you added PPA ubuntu-sdk-team, now you need add public key for using this PPA.
|
2014-02-05 13:39:32 +01:00
|
|
|
First, we'll login to our pbuilder environment:
|
|
|
|
sudo pbuilder --login --save-after-login
|
|
|
|
Then, we'll give it the public key to our PPA, just like if we were adding it to our own keyring:
|
|
|
|
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [YOUR PUBLIC KEY HERE]
|
|
|
|
If all goes well, you can leave your pbuilder environment by typing:
|
|
|
|
exit
|
|
|
|
- Tell the pbuilder environment that it is going to act just like the Launchpad build farm
|
|
|
|
Still in our terminal:
|
|
|
|
sudo pbuilder create --debootstrapopts --variant=buildd
|
|
|
|
- Update our environment with these new packages
|
|
|
|
Still in our terminal, type:
|
|
|
|
sudo pbuilder --update --override-config
|
|
|
|
- Edit file ~/.bashrc ti add
|
|
|
|
DEBFULLNAME="<Your name>"
|
|
|
|
DEBEMAIL="<Your email address>"
|
|
|
|
|
|
|
|
# Init package tools for launchpad
|
|
|
|
- Create a Bazaar directory
|
|
|
|
mkdir bzr
|
|
|
|
- Create debian directory and upload it onto bzr branch ~dismine/valentina/debian
|
|
|
|
cd bzr
|
|
|
|
mkdir debian
|
|
|
|
cd debian
|
|
|
|
bzr init
|
2014-07-01 11:55:11 +02:00
|
|
|
cp -pr valentina/debian bzr/debian
|
2014-02-05 13:39:32 +01:00
|
|
|
bzr add debian
|
|
|
|
bzr commit -m "Init"
|
|
|
|
bzr push lp:~dismine/valentina/debian
|
|
|
|
or download it from launchpad bazaar:
|
|
|
|
cd bzr
|
2014-07-01 11:55:11 +02:00
|
|
|
bzr branch lp:~dismine/valentina/debian
|
2014-02-05 13:39:32 +01:00
|
|
|
- To update this debian directory, edit files into the bzr dir and run
|
|
|
|
bzr commit -m "Description of change"
|
|
|
|
bzr push lp:~dismine/valentina/debian
|
2014-07-01 11:55:11 +02:00
|
|
|
- Create a file valentina.recipe with content
|
2014-02-05 13:39:32 +01:00
|
|
|
cd bzr
|
2014-07-01 11:55:11 +02:00
|
|
|
vi valentina.recipe
|
2014-02-05 13:39:32 +01:00
|
|
|
# bzr-builder format 0.3 deb-version {debupstream}+{revno}+{revno:packaging}
|
2014-07-01 11:55:11 +02:00
|
|
|
lp:valentina
|
2014-02-05 13:39:32 +01:00
|
|
|
merge packaging lp:~dismine/valentina/debian
|
2014-07-01 11:55:11 +02:00
|
|
|
|
|
|
|
Next command usefull for local testing creation recipe.
|
2014-02-05 13:39:32 +01:00
|
|
|
- Run command
|
|
|
|
cd bzr
|
|
|
|
bzr dailydeb --allow-fallback-to-native valentina.recipe working-dir
|
2014-07-01 11:55:11 +02:00
|
|
|
This will create a directory "working-dir" with valentina sources and will add sources from ~dismine/valentina/debian
|
2014-02-05 13:39:32 +01:00
|
|
|
- Test package sources
|
|
|
|
sudo pbuilder build <working-dir>/<project>_<version>.dsc
|
2014-06-26 13:42:58 +02:00
|
|
|
Example: sudo pbuilder build working-dir/valentina_0.2.2.dsc
|
2014-02-05 13:39:32 +01:00
|
|
|
|