Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developers:jenkins:packaging:debian [2015/09/04 00:44] – created akdevelopers:jenkins:packaging:debian [2015/12/29 01:21] (current) – Add example setups oranges
Line 1: Line 1:
 +====== Building packages on Jenkins with pbuilder ======
 +
 +pbuilder is the Debian build system for production packages. 
 +It uses a chroot environment to compile binary packages from source packages on a fresh Debian system.
 +
 +pbuilder is installed on the x86 and x86-64 Linux Jenkin slaves. To use it you must have a Debian source package mypackage.dsc and upstream's tarball, then you would for example use this command to compile for Debian Stretch amd64:
 +
 +<code>
 +DIST=stretch ARCH=amd64 sudo pbuilder build --buildresult $PWD *.dsc
 +</code>
 +
 +This will put the resulting binary packages in the current working directory.
 +If your package depends on other packages not present in the Debian archive, you must copy them to /opt/pbuilder-local-repo/repo before the build.
 +
 +You can see example source package setups for qtox/libtoxcore here https://github.com/tux3/tox-pkgs
 +
 +You can also see example source package setups for toxic, along with some helper scripts for mass setup of builds and tar commands here https://github.com/optimumtact/tox-pkgs
 +
 +The source packages are ingested into pbuilder and it spits out nicely linked binary packages for shipping to the package server, this means you can do per distro versioning and other useful crud
 +
 +====== Making Debian source packages ======
 +
 +Please refer to the Debian manual.
 +
 +https://wiki.debian.org/IntroDebianPackaging
 +
 +https://www.debian.org/doc/manuals/maint-guide/
 +
 +https://www.debian.org/doc/manuals/developers-reference/
 +
 +https://www.debian.org/doc/debian-policy/
 +
 +====== How to make a cheap ass poor man's home-rolled package ======
 +
 Use this skeleton script for your deb package. Use this skeleton script for your deb package.
  
Line 54: Line 88:
 rm -rf src || true rm -rf src || true
  
-# PACKAGE_INFO? see https://wiki.tox.chat/developers/jenkins/packaging+# PACKAGE_INFO? see https://wiki.tox.chat/developers/jenkins/packaging/about#package_info_file
 set -a set -a
 source PACKAGE_INFO source PACKAGE_INFO
Line 74: Line 108:
 Version: $PACKAGE_VERS Version: $PACKAGE_VERS
 License: GPLv3+ License: GPLv3+
-Vendor: Project Tox+Vendor: The Tox Project
 Architecture: $ARCH Architecture: $ARCH
-Maintainer: Project Tox <support@tox.chat>+Maintainer: My Name <my_email@mydomain.tld>
 Installed-Size: $INSTALLED_SIZE Installed-Size: $INSTALLED_SIZE
 Depends: < Dependencies go here, if you have any. > Depends: < Dependencies go here, if you have any. >
Line 88: Line 122:
 md5_walk_dir package/* >> package/DEBIAN/md5sums md5_walk_dir package/* >> package/DEBIAN/md5sums
 fakeroot dpkg-deb -b package && mv package.deb "$PACKAGE_NAME" fakeroot dpkg-deb -b package && mv package.deb "$PACKAGE_NAME"
-echo "miku the MVP" 
 echo "$PACKAGE_NAME ready." echo "$PACKAGE_NAME ready."
- 
-# Upload to pkg.tox.chat (may take some time before it appears on the server) 
-./pkgdeliver.sh "$PACKAGE_NAME" 
 </code> </code>
Print/export