[gluster-packaging] packaging for Debian and Ubuntu (Debian 9 stretch)

Kaleb S. KEITHLEY kkeithle at redhat.com
Mon Aug 31 15:27:51 UTC 2015

pre-requisite: github commit privs in https://github.com/gluster/glusterfs-debian

There are four Debian/Ubuntu VMs running in the lab:     


    debian 7 (wheezy) rhs-vm-12.gdev.lab.eng.bos.redhat.com


     debian 8 (jessie) rhs-vm-13.gdev.lab.eng.bos.redhat.com


     debian 9 (stretch) rhs-vm-16.gdev.lab.eng.bos.redhat.com


     ubuntu 14.04 LTS (trusty) rhs-vm-17.gdev.lab.eng.bos.redhat.com

If you're not already subscribed to packaging at gluster.org, you should.

Sign on as root (usual lab machine password, if you don't know it, ask someone, including me. ;-)). Create your own user account. Add yourself to group wheel to give yourself passwordless sudo. Unfortunately these are internal Red Hat machines so only Red Hat employees will be able to build.

This recipe will go through building 3.6.5 for Debian 9. It is almost exactly the same as the previous recipe for Debian 8.

% ssh -X rhs-vm-16.gdev.lab.eng.bos.redhat.com

%if $first-time

rhs-vm-16 % mkdir -p src/github

rhs-vm-16 % cd src/github

rhs-vm-16 % git clone git at github.com:gluster/glusterfs-debian.git

rhs-vm-16 % cd glusterfs-debian

rhs-vm-16 % git checkout -b stretch-glusterfs-3.6


rhs-vm-16 % cd src/github/glusterfs-debian

rhs-vm-16 % git checkout stretch-glusterfs-3.6


rhs-vm-16 % cd debian

Edit 'changelog' file. Edit other files as necessary. Most likely is to edit 'control' to add or change Build-Depends: or Depends:.

rhs-vm-16 % xauth list

rhs-vm-16/unix:10 MIT-MAGIC-COOKIE-1 12be95ad10bc50af9d9d655c12345678

Note: the magic cookie string will differ from the above.

rhs-vm-16 % sudo su glusterpackager

rhs-vm-16 % cd

rhs-vm-16 % xauth add rhs-vm-16/unix:10 MIT-MAGIC-COOKIE-1

You can test that X is tunneled by running, e.g., xclock. If you don't see the clock on your screen check that your Xserver allows TCP connections.

rhs-vm-16 % xterm &

Note, xterm might complain about fonts it can't load. This can be ignored.

Switch to the xterm. See the ~glusterpackager/HOWTO. This is nearly a script. You can mostly cut-and-paste from the HOWTO into the xterm. There are a few steps in!
  the HOWTO
 that we don't do any more. See below.

glusterpackager at rhs-vm-16:~$ SERIES=3.6

glusterpackager at rhs-vm-16:~$ VERSION=3.6.5

glusterpackager at rhs-vm-16:~$ RELEASE=1

glusterpackager at rhs-vm-16:~$ mkdir build packages

glusterpackager at rhs-vm-16:~$ cd ~/build

glusterpackager at rhs-vm-16:~/build$ wget

glusterpackager at rhs-vm-16:~/build$ ln -s glusterfs-${VERSION}.tar.gz

glusterpackager at rhs-vm-16:~/build$ tar xzf glusterfs-${VERSION}.tar.gz

glusterpackager at rhs-vm-16:~/build$ cd glusterfs-${VERSION}

glusterpackager at rhs-vm-16:~/build/glusterfs-3.6.5$ cp -a
~$yourusername/src/github/glusterfs-debian/debian .

Note: you might double check before proceeding that debian/changelog has the changes you made.

Now build the .dsc file. You will need the RSA signing key passphrase from ~glusterpackager/README. Do not share the passphrase with anyone. You can cut-and-paste here:

glusterpackager at rhs-vm-16:~/build/glusterfs-3.6.5$ debuild -S -sa

Enter the passphrase twice when prompted.

glusterpackager at rhs-vm-16:~/build/glusterfs-3.6.5$ cd ..

Build gluster and create the packages in a chroot. This takes a few minutes:

glusterpackager at rhs-vm-16:~/build$ sudo pbuilder --build
glusterfs_${VERSION}-${RELEASE}.dsc glusterpackager at rhs-vm-16:~/build$
cd ~/packages glusterpackager at rhs-vm-16:~/packages$ cp
/var/cache/pbuilder/result/glusterfs*${VERSION}-${RELEASE}*.deb . Sign
the packages with the RSA signing key passphrase. You can use
cut-and-paste here. There are four packages to sign.
glusterpackager at rhs-vm-16:~/packages$ dpkg-sig -v -k 4AB22BB3 --sign
builder glusterfs-*${VERSION}-${RELEASE}*.deb
glusterpackager at rhs-vm-16:~/packages$ cd /var/www/repos/apt/debian/
glusterpackager at rhs-vm-16:/var/www/repos/apt/debian$ rm -rf pool/*
dists/* db/* Create and sign the repos with the RSA signing key
passphrase. On wheezy you can use cut-and-paste. On jessie and stretch
there will be a pop-up window where cut-and-paste doesn't work. :-(
glusterpackager at rhs-vm-16:/var/www/repos/apt/debian$ for i in
~/packages/glusterfs-*${VERSION}-${RELEASE}*.deb; do reprepro includedeb
stretch $i; done glusterpackager at rhs-vm-16:/var/www/repos/apt/debian$
reprepro includedsc stretch ~/build/glusterfs_${VERSION}-${RELEASE}.dsc
glusterpackager at rhs-vm-16:/var/www/repos/apt/debian$ tar czf
~/glusterfs-${VERSION}-${RELEASE}/apt-${VERSION}.tgz pool/ dists/
glusterpackager at rhs-vm-16:/var/www/repos/apt/debian$ cd
glusterpackager at rhs-vm-16:~$ mv build packages
glusterfs-${VERSION}-${RELEASE} That's it. Almost done. scp
~glusterpackager/glusterfs-3.6.5-1/apt-3.6.5.tgz to
download.gluster.org:/tmp, then sign in to download.gluster.org and
untar it in
/var/www/html/pub/gluster/glusterfs/3.6/3.6.5/Debian/jessie/apt copy the
pub.key and README.txt files from the previous version and you're done.
Remember to commit and push your changes to the changelog file If you
have any questions, don't hesitate to ask.-- Kaleb

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/packaging/attachments/20150831/73db9ba7/attachment.html>

More information about the packaging mailing list