Hugin PPA

From PanoTools.org Wiki
(Difference between revisions)
Jump to: navigation, search
(initial Ubuntu Hugin PPA instructions (libpano only, not sure if complete))
 
(Preparing the Stage)
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
 
A Personal Package Archive ([https://help.launchpad.net/Packaging/PPA PPA]) is free infrastructure made available by the Ubuntu project for people like you and me to share their packages.  In a nutshell: one user can upload source packages and the Launchpad infrastructure builds and test them before distributing them to every user that wants to subscribe to that PPA.
 
A Personal Package Archive ([https://help.launchpad.net/Packaging/PPA PPA]) is free infrastructure made available by the Ubuntu project for people like you and me to share their packages.  In a nutshell: one user can upload source packages and the Launchpad infrastructure builds and test them before distributing them to every user that wants to subscribe to that PPA.
  
On Launchpad individual users and teams can have a PPA.  The Hugin PPA is a team effort by people who want to bring binaries of Hugin and related tool to Ubuntu users.
+
On Launchpad individual users and teams can have a PPA.  The [https://launchpad.net/~hugin Hugin PPA] is a team effort by people who want to bring binaries of Hugin and related tool to Ubuntu users.
  
 
The following instructions document how you can contribute to the Hugin PPA.
 
The following instructions document how you can contribute to the Hugin PPA.
Line 19: Line 19:
 
sudo mv debian-experimental.list /etc/apt/sources.list.d/
 
sudo mv debian-experimental.list /etc/apt/sources.list.d/
 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B
 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B
 +
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663
 +
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AED4B06F473041FA
 
sudo apt-get update
 
sudo apt-get update
 
sudo apt-get install devscripts
 
sudo apt-get install devscripts
Line 63: Line 65:
 
</pre>
 
</pre>
  
 +
== Build and Publish Hugin ==
 +
 +
* start in an empty folder
 +
* determine the version number that you want to build/publish, e.g. 2010.4.0+dfsg~beta1-1
 +
* if you don't have a version number, you can simply skip the =VERSION_NUMBER in the instructions below:
 +
<pre>
 +
sudo apt-get build-dep hugin=2010.4.0+dfsg~beta1-1
 +
apt-get source hugin=2010.4.0+dfsg~beta1-1
 +
cd hugin-2010.4.0+dfsg~beta1-1/
 +
pico debian/control
 +
</pre>
 +
* in debian/control edit the Maintainer and Uploader lines.  Replace the email addresses there with an entry '''Hugin PPA Packagers <hugin-ptx@googlegroups.com>'''
 +
* if there are new dependencies, they will have to go into debian/control too.  However, to avoid duplicating efforts, new dependencies are better communicated to the Debian maintainers who then update the control file upstream.
 +
* Update the debian changelog with the following command.  The given version number is very important.  Start with the Debian version number (2010.4.0+dfsg~beta1-1 in this case).  Append the Ubuntu series of your system, e.g. natty, maverick, lucid, karmic; and a sequence number (usually just 1).  Make sure you are running an Ubuntu series that is supported by Launchpad.  The "new upstream release" text is the changelog entry.
 +
<pre>
 +
dch --newversion 2010.4.0+dfsg~beta1-1natty1 new upstream release
 +
</pre>
 +
* Build and test the package.  You can skip this step if you are sure that the package is OK (e.g. you did not change much compared to the Debian sources) and/or if your machine is "tainted" by other things preventing proper builds (of course it would make sense to build in a chroot, but this I'll document another day).
 +
<pre>
 +
dpkg-buildpackage -rfakeroot -b  -uc -us
 +
</pre>
 +
* Build the source package, sign and upload it.  Especially at the beginning, it is a good idea if you open a PPA in your own Launchpad account and publish / test there the result of your work, until you are confident to upload to the PPA serving Hugin users.  To upload to the real PPA, replace my PPA in the instructions below with '''ppa:hugin/hugin-builds'''
 +
<pre>
 +
dpkg-buildpackage -rfakeroot -uc -us -sa -S
 +
cd ..
 +
debsign -k$GPGKEY *.changes
 +
dput ppa:yuv/yuv-stuff *.changes
 +
</pre>
 +
 +
== Pitfalls to Avoid ==
 +
 +
Publishing software is a serious responsibility.  An archive could be intentionally tainted (viruses and other malware) or, more likely, simply corrupt during transport.  To prevent troubles it is paramount to use and verify cryptographic signatures.  You use your OpenPGP key to sign your code and Launchpad trust the code because you signed it.  You should also verify that the source you are using has been properly signed and is not tainted.
 +
 +
Source packages in the Debian archives are signed.  If you get a warning when downloading the source pacakge with apt-get, delete it and try again.  If the waring you see is a message like
 +
<pre>
 +
gpgv: Signature made Sat 02 Oct 2010 11:52:30 AM EDT using DSA key ID 8B8D7663
 +
gpgv: Can't check signature: public key not found
 +
</pre>
 +
you need to get the proper key to verify the signature.  Copy the key ID (in this case 8B8D7663) and install it with
 +
<pre>
 +
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663
 +
</pre>
 +
 +
== Nightlies ==
 +
 +
The nightlies in the Hugin PPA are built by a script written by Philipp Seidel.  The script runs automatically every 24 hours.  Please do not touch the nightlies PPA unless you know what you are doing.
 +
 +
== Anatomy of a Debian Source Package ==
 +
 +
There is plenty of official documentation about Debian packages.  In a nutshell, what we are doing is add a '''debian''' folder inside the unpacked original source tarball.  In that folder are Debian specific patches, a Debian changelog, and a Debian control file.  The control file gives the information necessary to build the package in machine-readable form.
 +
 +
The debian folders are maintained at
 +
* http://git.debian.org/git/pkg-phototools/libpano.git (Libpano13)
 +
* http://git.debian.org/git/pkg-phototools/hugin.git (Hugin)
  
  
 
[[Category:Software:Hugin]]
 
[[Category:Software:Hugin]]
 
[[Category:Software:Platform:Linux]]
 
[[Category:Software:Platform:Linux]]

Latest revision as of 01:40, 18 May 2011

A Personal Package Archive (PPA) is free infrastructure made available by the Ubuntu project for people like you and me to share their packages. In a nutshell: one user can upload source packages and the Launchpad infrastructure builds and test them before distributing them to every user that wants to subscribe to that PPA.

On Launchpad individual users and teams can have a PPA. The Hugin PPA is a team effort by people who want to bring binaries of Hugin and related tool to Ubuntu users.

The following instructions document how you can contribute to the Hugin PPA.

Prerequisite:

  • an Ubuntu system (any variant and any currently supported series).
  • successfully built and installed Hugin on your system according to these instructions
  • a Launchpad account including signature of the Ubuntu Code of Conduct

Contents

[edit] Preparing the Stage

You will need to go through these instructions only once.

Start a command line and enter the following commands:

sudo echo 'deb-src ftp://ftp.at.debian.org/debian ../project/experimental main' > debian-experimental.list
sudo mv debian-experimental.list /etc/apt/sources.list.d/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 55BE302B
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AED4B06F473041FA
sudo apt-get update
sudo apt-get install devscripts

Edit the file ~/.bashrc and add the following lines at the end, replacing *KEY* with the eight digit ID of your key registered in Launchpad (e.g. 637572E4) and *YOUR_NAME* with your name:

export GPGKEY=*KEY*
export DEBEMAIL="hugin-ptx@googlegroups.com"
export DEBFULLNAME="*YOUR_NAME*"
export LANG=C
export LANG="en_CA.UTF-8"
export LC_ALL="en_CA.UTF-8"

[edit] Build and Publish Libpano13

  • start in an empty folder
  • determine the version number that you want to build/publish, e.g. 2.9.17+dfsg-3
  • if you don't have a version number, you can simply skip the =VERSION_NUMBER in the instructions below:
sudo apt-get build-dep libpano13=2.9.17+dfsg-3
apt-get source libpano13=2.9.17+dfsg-3
cd libpano13-2.9.17+dfsg/
pico debian/control
  • in debian/control edit the Maintainer and Uploader lines. Replace the email addresses there with an entry Hugin PPA Packagers <hugin-ptx@googlegroups.com>
  • if there are new dependencies, they will have to go into debian/control too. However, to avoid duplicating efforts, new dependencies are better communicated to the Debian maintainers who then update the control file upstream.
  • Update the debian changelog with the following command. The given version number is very important. Start with the Debian version number (2.9.17+dfsg-3 in this case). Append the Ubuntu series of your system, e.g. natty, maverick, lucid, karmic; and a sequence number (usually just 1). Make sure you are running an Ubuntu series that is supported by Launchpad. The "new upstream release" text is the changelog entry.
dch --newversion 2.9.17+dfsg-3natty1 new upstream release
  • Build and test the package. You can skip this step if you are sure that the package is OK (e.g. you did not change much compared to the Debian sources) and/or if your machine is "tainted" by other things preventing proper builds (of course it would make sense to build in a chroot, but this I'll document another day).
 
dpkg-buildpackage -rfakeroot -b  -uc -us
  • Build the source package, sign and upload it. Especially at the beginning, it is a good idea if you open a PPA in your own Launchpad account and publish / test there the result of your work, until you are confident to upload to the PPA serving Hugin users. To upload to the real PPA, replace my PPA in the instructions below with ppa:hugin/hugin-builds
dpkg-buildpackage -rfakeroot -uc -us -sa -S
cd ..
debsign -k$GPGKEY *.changes
dput ppa:yuv/yuv-stuff *.changes

[edit] Build and Publish Hugin

  • start in an empty folder
  • determine the version number that you want to build/publish, e.g. 2010.4.0+dfsg~beta1-1
  • if you don't have a version number, you can simply skip the =VERSION_NUMBER in the instructions below:
sudo apt-get build-dep hugin=2010.4.0+dfsg~beta1-1
apt-get source hugin=2010.4.0+dfsg~beta1-1
cd hugin-2010.4.0+dfsg~beta1-1/
pico debian/control
  • in debian/control edit the Maintainer and Uploader lines. Replace the email addresses there with an entry Hugin PPA Packagers <hugin-ptx@googlegroups.com>
  • if there are new dependencies, they will have to go into debian/control too. However, to avoid duplicating efforts, new dependencies are better communicated to the Debian maintainers who then update the control file upstream.
  • Update the debian changelog with the following command. The given version number is very important. Start with the Debian version number (2010.4.0+dfsg~beta1-1 in this case). Append the Ubuntu series of your system, e.g. natty, maverick, lucid, karmic; and a sequence number (usually just 1). Make sure you are running an Ubuntu series that is supported by Launchpad. The "new upstream release" text is the changelog entry.
dch --newversion 2010.4.0+dfsg~beta1-1natty1 new upstream release
  • Build and test the package. You can skip this step if you are sure that the package is OK (e.g. you did not change much compared to the Debian sources) and/or if your machine is "tainted" by other things preventing proper builds (of course it would make sense to build in a chroot, but this I'll document another day).
 
dpkg-buildpackage -rfakeroot -b  -uc -us
  • Build the source package, sign and upload it. Especially at the beginning, it is a good idea if you open a PPA in your own Launchpad account and publish / test there the result of your work, until you are confident to upload to the PPA serving Hugin users. To upload to the real PPA, replace my PPA in the instructions below with ppa:hugin/hugin-builds
dpkg-buildpackage -rfakeroot -uc -us -sa -S
cd ..
debsign -k$GPGKEY *.changes
dput ppa:yuv/yuv-stuff *.changes

[edit] Pitfalls to Avoid

Publishing software is a serious responsibility. An archive could be intentionally tainted (viruses and other malware) or, more likely, simply corrupt during transport. To prevent troubles it is paramount to use and verify cryptographic signatures. You use your OpenPGP key to sign your code and Launchpad trust the code because you signed it. You should also verify that the source you are using has been properly signed and is not tainted.

Source packages in the Debian archives are signed. If you get a warning when downloading the source pacakge with apt-get, delete it and try again. If the waring you see is a message like

gpgv: Signature made Sat 02 Oct 2010 11:52:30 AM EDT using DSA key ID 8B8D7663
gpgv: Can't check signature: public key not found

you need to get the proper key to verify the signature. Copy the key ID (in this case 8B8D7663) and install it with

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B8D7663

[edit] Nightlies

The nightlies in the Hugin PPA are built by a script written by Philipp Seidel. The script runs automatically every 24 hours. Please do not touch the nightlies PPA unless you know what you are doing.

[edit] Anatomy of a Debian Source Package

There is plenty of official documentation about Debian packages. In a nutshell, what we are doing is add a debian folder inside the unpacked original source tarball. In that folder are Debian specific patches, a Debian changelog, and a Debian control file. The control file gives the information necessary to build the package in machine-readable form.

The debian folders are maintained at

Personal tools
Namespaces

Variants
Actions
Navigation
tools
Tools