<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <pre>pre-requisite: github commit privs in <a class="moz-txt-link-freetext" href="https://github.com/gluster/glusterfs-debian">https://github.com/gluster/glusterfs-debian</a></pre>
    <pre>There are four Debian/Ubuntu VMs running in the lab:</pre>
    <ul>
      <li>
        <pre> debian 7 (wheezy) rhs-vm-12.gdev.lab.eng.bos.redhat.com</pre>
      </li>
      <li>
        <pre> debian 8 (jessie) rhs-vm-13.gdev.lab.eng.bos.redhat.com</pre>
      </li>
      <li>
        <pre> debian 9 (stretch) rhs-vm-16.gdev.lab.eng.bos.redhat.com</pre>
      </li>
      <li>
        <pre> ubuntu 14.04 LTS (trusty) rhs-vm-17.gdev.lab.eng.bos.redhat.com</pre>
      </li>
    </ul>
    <pre><tt>If you're not already subscribed to <a class="moz-txt-link-abbreviated" href="mailto:packaging@gluster.org">packaging@gluster.org</a>, subscribe soon.</tt>
</pre>
    <pre class="moz-signature" cols="72"><pre>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.<font color="#009900">

% ssh -X rhs-vm-13.gdev.lab.eng.bos.redhat.com</font></pre><pre>%if $first-time</pre><pre><font color="#009900">rhs-vm-13 % mkdir -p src/github</font></pre><pre><font color="#009900">rhs-vm-13 % cd src/github</font></pre><pre><font color="#009900">rhs-vm-13 % git clone <a class="moz-txt-link-abbreviated" href="mailto:git@github.com:gluster/glusterfs-debian.git">git@github.com:gluster/glusterfs-debian.git</a></font></pre><pre><font color="#009900">rhs-vm-13 % cd glusterfs-debian</font></pre><pre><font color="#009900">rhs-vm-13 % git checkout -b jessie-glusterfs-3.6 origin/jessie-glusterfs-3.6</font></pre><pre>%else</pre><pre><font color="#009900">rhs-vm-13 % cd src/github/glusterfs-debian</font></pre><pre><font color="#009900">rhs-vm-13 % git checkout jessie-glusterfs-3.6</font></pre><pre>%endif</pre><pre><font color="#009900">rhs-vm-13 % cd debian</font></pre><pre>Edit 'changelog' file. Edit other files as necessary. Most likely is to edit 'control' to add or change Build-De!
 pends: or 
Depends:.</pre><pre><font color="#009900">rhs-vm-13 % xauth list</font></pre><pre><font color="#009900">rhs-vm-13/unix:10  MIT-MAGIC-COOKIE-1  12be95ad10bc50af9d9d655c12345678</font></pre><pre>Note: the magic cookie string will differ from the above.</pre><pre><font color="#009900">rhs-vm-13 % sudo su glusterpackager</font></pre><pre><font color="#009900">rhs-vm-13 % cd</font></pre><pre><font color="#009900">rhs-vm-13 % xauth add rhs-vm-13/unix:10 MIT-MAGIC-COOKIE-1 12be95ad10bc50af9d9d655c12345678</font></pre><pre>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.</pre><pre><font color="#009900">rhs-vm-13 % xterm &amp;</font></pre><pre>Note, xterm might complain about fonts it can't load. This can be ignored.</pre><pre>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.</pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~$ SERIES=3.6</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~$ VERSION=3.6.5</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~$ RELEASE=1</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~$ mkdir build packages glusterfs-${VERSION}-${RELEASE}</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~$ cd ~/build</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~/build$ wget <a class="moz-txt-link-freetext" href="http://download.gluster.org/pub/gluster/glusterfs/$">http://download.gluster.org/pub/gluster/glusterfs/$</a>{SERIES}/${VERSION}/glusterfs-${VERSION}.tar.gz</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~/build$ ln -s glusterfs-${VERSION}.tar.gz glusterfs_${VERSION}.orig.tar.gz</font></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~/build$ tar xzf glusterfs-${VERSION}.!
 tar.gz</fo
nt></pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~/build$ cd glusterfs-${VERSION}</font></pre><pre><font color="#009900"><a class="moz-txt-link-abbreviated" href="mailto:glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$">glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$</a> cp -a ~$yourusername/src/github/glusterfs-debian/debian .</font></pre><pre>Note: you might double check before proceeding that debian/changelog has the changes you made.</pre><pre>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:</pre><pre><font color="#009900"><a class="moz-txt-link-abbreviated" href="mailto:glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$">glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$</a> debuild -S -sa</font></pre><pre>Enter the passphrase twice when prompted.</pre><pre><font color="#009900"><a class="moz-txt-link-abbreviated" href="mailto:gluster!
 packager@r
hs-vm-13:~/build/glusterfs-3.6.5$">glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$</a> cd ..</font></pre><pre>Build gluster and create the packages in a chroot. This takes a few minutes:</pre><pre><font color="#009900">glusterpackager@rhs-vm-13:~/build$ sudo pbuilder --build glusterfs_${VERSION}-${RELEASE}.dsc
glusterpackager@rhs-vm-13:~/build$ cd ~/packages
glusterpackager@rhs-vm-13:~/packages$ cp /var/cache/pbuilder/result/glusterfs*${VERSION}-${RELEASE}*.deb .

<font color="#000000">Sign the packages with the RSA signing key passphrase. You can use cut-and-paste here. There are four packages to sign.

<font color="#009900">glusterpackager@rhs-vm-13:~/packages$ dpkg-sig -v -k 4AB22BB3 --sign builder glusterfs-*${VERSION}-${RELEASE}*.deb</font>
<font color="#009900">glusterpackager@rhs-vm-13:~/packages$ cd /var/www/repos/apt/debian/</font>
<font color="#009900">glusterpackager@rhs-vm-13:/var/www/repos/apt/debian$ rm -rf pool/* dists/* db/*</font>

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. :-(</font>

glusterpackager@rhs-vm-13:/var/www/repos/apt/debian$ for i in ~/packages/glusterfs-*${VERSION}-${RELEASE}*.deb; do reprepro includedeb jessie $i; done
glusterpackager@rhs-vm-13:/var/www/repos/apt/debian$ reprepro includedsc jessie ~/build/glusterfs_${VERSION}-${RELEASE}.dsc
glusterpackager@rhs-vm-13:/var/www/repos/apt/debian$ tar czf ~/glusterfs-${VERSION}-${RELEASE}/apt-${VERSION}.tgz pool/ dists/
glusterpackager@rhs-vm-13:/var/www/repos/apt/debian$ cd
glusterpackager@rhs-vm-13:~$ mv build packages glusterfs-${VERSION}-${RELEASE}

<font color="#000000">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.

</font></font>-- 

Kaleb
</pre></pre>
  </body>
</html>