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@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 g...@github.com:gluster/glusterfs-debian.git

rhs-vm-16 % cd glusterfs-debian

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

%else

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

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

%endif

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
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-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@rhs-vm-16:~$ SERIES=3.6

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

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

glusterpackager@rhs-vm-16:~$ mkdir build packages
glusterfs-${VERSION}-${RELEASE}

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

glusterpackager@rhs-vm-16:~/build$ wget
http://download.gluster.org/pub/gluster/glusterfs/${SERIES}/${VERSION}/glusterfs-${VERSION}.tar.gz

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

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

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

glusterpackager@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@rhs-vm-16:~/build/glusterfs-3.6.5$ debuild -S -sa

Enter the passphrase twice when prompted.

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

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

glusterpackager@rhs-vm-16:~/build$ sudo pbuilder --build
glusterfs_${VERSION}-${RELEASE}.dsc glusterpackager@rhs-vm-16:~/build$
cd ~/packages glusterpackager@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@rhs-vm-16:~/packages$ dpkg-sig -v -k 4AB22BB3 --sign
builder glusterfs-*${VERSION}-${RELEASE}*.deb
glusterpackager@rhs-vm-16:~/packages$ cd /var/www/repos/apt/debian/
glusterpackager@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@rhs-vm-16:/var/www/repos/apt/debian$ for i in
~/packages/glusterfs-*${VERSION}-${RELEASE}*.deb; do reprepro includedeb
stretch $i; done glusterpackager@rhs-vm-16:/var/www/repos/apt/debian$
reprepro includedsc stretch ~/build/glusterfs_${VERSION}-${RELEASE}.dsc
glusterpackager@rhs-vm-16:/var/www/repos/apt/debian$ tar czf
~/glusterfs-${VERSION}-${RELEASE}/apt-${VERSION}.tgz pool/ dists/
glusterpackager@rhs-vm-16:/var/www/repos/apt/debian$ cd
glusterpackager@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



_______________________________________________
packaging mailing list
packaging@gluster.org
http://www.gluster.org/mailman/listinfo/packaging

Reply via email to