[gluster-packaging] packaging for Debian and Ubuntu

Kaleb S. KEITHLEY kkeithle at redhat.com
Mon Aug 31 14:34:31 UTC 2015


On 08/31/2015 10:17 AM, Kaleb S. KEITHLEY wrote:
> 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, subscribe
> soon.
> 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 8. Building for Debian 9 is exactly the same but note
> the places where jessie changes to stretch. Building for Debian 7 is
> similar; the main difference is the signing key used and you don't
> need the ssh -X, just ssh. Building for Ubuntu is similar, up to the
> debuild, after which the .source_changes file is sent to Launchpad. I
> will send a similar building recipe for the other builds shortly.% ssh
> -X rhs-vm-13.gdev.lab.eng.bos.redhat.com
> %if $first-time
> rhs-vm-13 % mkdir -p src/github
> rhs-vm-13 % cd src/github
> rhs-vm-13 % git clone git at github.com:gluster/glusterfs-debian.git
> rhs-vm-13 % cd glusterfs-debian
> rhs-vm-13 % git checkout -b jessie-glusterfs-3.6
> origin/jessie-glusterfs-3.6
> %else
> rhs-vm-13 % cd src/github/glusterfs-debian
> rhs-vm-13 % git checkout jessie-glusterfs-3.6
> %endif
> rhs-vm-13 % cd debian
> Edit 'changelog' file. Edit other files as necessary. Most likely is
> to edit 'control' to add or change Build-De! pends: or Depends:.
> rhs-vm-13 % xauth list
> rhs-vm-13/unix:10 MIT-MAGIC-COOKIE-1 12be95ad10bc50af9d9d655c12345678
> Note: the magic cookie string will differ from the above.
> rhs-vm-13 % sudo su glusterpackager
> rhs-vm-13 % cd
> rhs-vm-13 % xauth add rhs-vm-13/unix:10 MIT-MAGIC-COOKIE-1
> 12be95ad10bc50af9d9d655c12345678
> 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-13 % 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-13:~$ SERIES=3.6
> glusterpackager at rhs-vm-13:~$ VERSION=3.6.5
> glusterpackager at rhs-vm-13:~$ RELEASE=1
> glusterpackager at rhs-vm-13:~$ mkdir build packages
> glusterfs-${VERSION}-${RELEASE}
> glusterpackager at rhs-vm-13:~$ cd ~/build
> glusterpackager at rhs-vm-13:~/build$ wget
> http://download.gluster.org/pub/gluster/glusterfs/${SERIES}/${VERSION}/glusterfs-${VERSION}.tar.gz
> glusterpackager at rhs-vm-13:~/build$ ln -s glusterfs-${VERSION}.tar.gz
> glusterfs_${VERSION}.orig.tar.gz
> glusterpackager at rhs-vm-13:~/build$ tar xzf glusterfs-${VERSION}.! tar.gz
> glusterpackager at rhs-vm-13:~/build$ cd glusterfs-${VERSION}
> glusterpackager at rhs-vm-13:~/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-13:~/build/glusterfs-3.6.5$ debuild -S -sa
> Enter the passphrase twice when prompted.
> glusterpackager at rhs-vm-13:~/build/glusterfs-3.6.5$ cd ..
> Build gluster and create the packages in a chroot. This takes a few
> minutes:
> glusterpackager at rhs-vm-13:~/build$ sudo pbuilder --build
> glusterfs_${VERSION}-${RELEASE}.dsc glusterpackager at rhs-vm-13:~/build$
> cd ~/packages glusterpackager at rhs-vm-13:~/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-13:~/packages$ dpkg-sig -v -k 4AB22BB3 --sign
> builder glusterfs-*${VERSION}-${RELEASE}*.deb
> glusterpackager at rhs-vm-13:~/packages$ cd /var/www/repos/apt/debian/
> glusterpackager at rhs-vm-13:/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-13:/var/www/repos/apt/debian$ for i in
> ~/packages/glusterfs-*${VERSION}-${RELEASE}*.deb; do reprepro
> includedeb jessie $i; done
> glusterpackager at rhs-vm-13:/var/www/repos/apt/debian$ reprepro
> includedsc jessie ~/build/glusterfs_${VERSION}-${RELEASE}.dsc
> glusterpackager at rhs-vm-13:/var/www/repos/apt/debian$ tar czf
> ~/glusterfs-${VERSION}-${RELEASE}/apt-${VERSION}.tgz pool/ dists/
> glusterpackager at rhs-vm-13:/var/www/repos/apt/debian$ cd
> glusterpackager at rhs-vm-13:~$ 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. If you have any questions, don't hesitate to ask.

Rememberto commit and push your edits to the changelog file.-- Kaleb

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


More information about the packaging mailing list