<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><font face="Courier New, Courier,
        monospace">On 08/31/2015 10:17 AM, Kaleb S. KEITHLEY wrote:<br>
      </font></div>
    <blockquote cite="mid:55E46217.40908@redhat.com" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <pre><font face="Courier New, Courier, monospace">pre-requisite: github commit privs in <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://github.com/gluster/glusterfs-debian">https://github.com/gluster/glusterfs-debian</a></font></pre>
      <pre><font face="Courier New, Courier, monospace">There are four Debian/Ubuntu VMs running in the lab:</font></pre>
      <ul>
        <li>
          <pre><font face="Courier New, Courier, monospace"> debian 7 (wheezy) rhs-vm-12.gdev.lab.eng.bos.redhat.com</font></pre>
        </li>
        <li>
          <pre><font face="Courier New, Courier, monospace"> debian 8 (jessie) rhs-vm-13.gdev.lab.eng.bos.redhat.com</font></pre>
        </li>
        <li>
          <pre><font face="Courier New, Courier, monospace"> debian 9 (stretch) rhs-vm-16.gdev.lab.eng.bos.redhat.com</font></pre>
        </li>
        <li>
          <pre><font face="Courier New, Courier, monospace"> ubuntu 14.04 LTS (trusty) rhs-vm-17.gdev.lab.eng.bos.redhat.com</font></pre>
        </li>
      </ul>
      <pre><font face="Courier New, Courier, monospace">If you're not already subscribed to <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:packaging@gluster.org">packaging@gluster.org</a>, subscribe soon.
</font></pre>
      <pre class="moz-signature" cols="72"><pre><font face="Courier New, Courier, monospace">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></font></pre><pre><font face="Courier New, Courier, monospace">%if $first-time</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % mkdir -p src/github</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % cd src/github</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % git clone <a moz-do-not-send="true" 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 face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % cd glusterfs-debian</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % git checkout -b jessie-glusterfs-3.6 origin/jessie-glusterfs-3.6</font></pre><pre><font face="Courier New, Courier, monospace">%else</font></pre><pre><font face="Courier New, Cou!
 rier, mono
space" color="#009900">rhs-vm-13 % cd src/github/glusterfs-debian</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % git checkout jessie-glusterfs-3.6</font></pre><pre><font face="Courier New, Courier, monospace">%endif</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % cd debian</font></pre><pre><font face="Courier New, Courier, monospace">Edit 'changelog' file. Edit other files as necessary. Most likely is to edit 'control' to add or change Build-De!
 pends: or 
Depends:.</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % xauth list</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13/unix:10  MIT-MAGIC-COOKIE-1  12be95ad10bc50af9d9d655c12345678</font></pre><pre><font face="Courier New, Courier, monospace">Note: the magic cookie string will differ from the above.</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % sudo su glusterpackager</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % cd</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">rhs-vm-13 % xauth add rhs-vm-13/unix:10 MIT-MAGIC-COOKIE-1 12be95ad10bc50af9d9d655c12345678</font></pre><pre><font face="Courier New, Courier, monospace">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.</font></pre><pre><fon!
 t face="Co
urier New, Courier, monospace" color="#009900">rhs-vm-13 % xterm &amp;</font></pre><pre><font face="Courier New, Courier, monospace">Note, xterm might complain about fonts it can't load. This can be ignored.</font></pre><pre><font face="Courier New, Courier, monospace">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.</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~$ SERIES=3.6</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~$ VERSION=3.6.5</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~$ RELEASE=1</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~$ mkdir build packages glusterfs-${VERSION}-${RELEASE}</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~$ cd ~/build</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~/build$ wget <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://download.gluster.org/pub/gluster/glusterfs/$">http://download.gluster.org/pub/gluster/glusterfs/$</a>{SERIES}/${VERSION}/glusterf!
 s-${VERSIO
N}.tar.gz</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~/build$ ln -s glusterfs-${VERSION}.tar.gz glusterfs_${VERSION}.orig.tar.gz</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">glusterpackager@rhs-vm-13:~/build$ tar xzf glusterfs-${VERSION}.!
 tar.gz</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900"><font color="#009900">glusterpackager@rhs-vm-13:~/build$ cd glusterfs-${VERSION}</font></font></pre><pre><font face="Courier New, Courier, monospace" color="#009900"><font color="#009900"><a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:glusterpackager@rhs-vm-13:%7E/build/glusterfs-3.6.5$">glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$</a> cp -a ~$yourusername/src/github/glusterfs-debian/debian .</font></font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">Note: you might double check before proceeding that debian/changelog has the changes you made.</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">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:</font></pre><pre><font face="Courier New, Courier!
 , monospac
e" color="#009900"><font color="#009900"><a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:glusterpackager@rhs-vm-13:%7E/build/glusterfs-3.6.5$">glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$</a> debuild -S -sa</font></font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">Enter the passphrase twice when prompted.</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900"><font color="#009900"><a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:gluster%21%0A%20packager@r%0Ahs-vm-13:%7E/build/glusterfs-3.6.5$">glusterpackager@rhs-vm-13:~/build/glusterfs-3.6.5$</a> cd ..</font></font></pre><pre><font face="Courier New, Courier, monospace" color="#009900">Build gluster and create the packages in a chroot. This takes a few minutes:</font></pre><pre><font face="Courier New, Courier, monospace" color="#009900"><font color="#009900">glusterpackager@rhs-vm-13:~/build$ sudo pbuilder --build gluster!
 fs_${VERSI
ON}-${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></font>
</pre></pre>
    </blockquote>
    <font face="Courier New, Courier, monospace"></font>
    <pre class="moz-signature" cols="72"><tt>
</tt><font color="#ff0000"><tt>Remember</tt><tt> to commit and push your edits to the changelog file.</tt></font><tt>
</tt><tt>
</tt><font face="Courier New, Courier, monospace">
-- 

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