Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:debian_packaging [2018/06/25 10:58] – [Build the binary packages] neyronwiki:debian_packaging [2021/06/29 10:24] (current) – [Sync the files back from the oar-ftp machine] snoir
Line 87: Line 87:
 <code bash> <code bash>
 $ cd .. $ cd ..
-$ export OAR_DIR=$PWD OAR_FTP=oar-ftp.lig+# Set environment variables: OAR_DIR should be a relative path to your home. OAR_FTP can include a username if not the same on oar-ftp. 
 +$ export OAR_DIR=${PWD#$HOME/OAR_FTP=oar-ftp.lig 
 +# First create the remote OAR_DIR directory (e.g. ~/scm/OAR) if it does not already exist 
 +$ ssh $OAR_FTP mkdir -p $OAR_DIR 
 +# Send files
 $ rsync -avz --delete build-area tarballs $OAR_FTP:$OAR_DIR $ rsync -avz --delete build-area tarballs $OAR_FTP:$OAR_DIR
 </code> </code>
Line 96: Line 100:
  
 <code bash> <code bash>
-$ export OAR_VERSION=$(head -n1 oar/debian/changelog |sed -e 's/^.\+(\(.\+\)).\+$/\1/') && echo $OAR_VERSION +$ export OAR_VERSION=$(head -n1 oar/debian/changelog |sed -e 's/^.\+(\(.\+\)).\+$/\1/') && echo "export OAR_VERSION=$OAR_VERSION" 
-$ export OAR_CHROOT=$(head -n1 oar/debian/changelog |sed -e 's/^.\+)\s\+\([^\;]\+\);.\+$/\1/') && echo $OAR_CHROOT+$ export OAR_CHROOT=$(head -n1 oar/debian/changelog |sed -e 's/^.\+)\s\+\([^\;]\+\);.\+$/\1/') && echo "export OAR_CHROOT=$OAR_CHROOT
 +$ export OAR_SHORT_VERSION=$(echo $OAR_VERSION | sed -re 's/(.*)\-(.+)/\1/g') && echo "export OAR_SHORT_VERSION=$OAR_SHORT_VERSION"
 # oar-ftp sshd accepts env variables OAR_* # oar-ftp sshd accepts env variables OAR_*
-$ ssh $OAR_FTP -o SendEnv=OAR_VERSION -o SendEnv=OAR_DIR -o SendEnv=OAR_CHROOT+$ ssh $OAR_FTP -o SendEnv=OAR_VERSION -o SendEnv=OAR_DIR -o SendEnv=OAR_CHROOT -o SendEnv=OAR_SHORT_VERSION 
 +# First update the build chroots
 oar-ftp$ sudo sbuild-update source:$OAR_CHROOT && sudo sbuild-update --upgrade source:$OAR_CHROOT oar-ftp$ sudo sbuild-update source:$OAR_CHROOT && sudo sbuild-update --upgrade source:$OAR_CHROOT
 +# Other arch? arm64 and ppc64el:
 +oar-ftp$ sudo sbuild-update source:$OAR_CHROOT --arch arm64 && sudo sbuild-update --upgrade source:$OAR_CHROOT --arch arm64
 +oar-ftp$ sudo sbuild-update source:$OAR_CHROOT --arch ppc64el && sudo sbuild-update --upgrade source:$OAR_CHROOT --arch ppc64el
 +# Then build:
 oar-ftp$ cd $OAR_DIR/build-area oar-ftp$ cd $OAR_DIR/build-area
 +# In some cases (if user on local machine is not the same as the oar-ftp VM), link need to be fixed
 +oar-ftp$ rm oar_$OAR_SHORT_VERSION.orig.tar.gz
 +oar-ftp$ ln -s $OAR_DIR/tarballs/oar_$OAR_SHORT_VERSION.orig.tar.gz oar_$OAR_SHORT_VERSION.orig.tar.gz
 +# amd64 and sources packages:
 oar-ftp$ sbuild -As -d $OAR_CHROOT --arch amd64 --debbuildopts "-uc -us" oar_$OAR_VERSION.dsc oar-ftp$ sbuild -As -d $OAR_CHROOT --arch amd64 --debbuildopts "-uc -us" oar_$OAR_VERSION.dsc
-if multi-arch: sbuild -d $OAR_CHROOT --arch $OTHER_ARCH --debbuildopts "-uc -us" oar_$OAR_VERSION.dsc+Other arch ? arm64 and ppc64el binary packages: 
 +oar-ftp$ sbuild -A -d $OAR_CHROOT --arch arm64 --debbuildopts "-uc -us" oar_$OAR_VERSION.dsc 
 +oar-ftp$ sbuild -A -d $OAR_CHROOT --arch ppc64el --debbuildopts "-uc -us" oar_$OAR_VERSION.dsc
 oar-ftp$ logout oar-ftp$ logout
 </code> </code>
Line 110: Line 126:
 <code bash> <code bash>
 $ rsync -avz $OAR_FTP:$OAR_DIR/{build-area,tarballs} . $ rsync -avz $OAR_FTP:$OAR_DIR/{build-area,tarballs} .
 +# require in some cases, as on oar-ftp
 +$ rm build-area/oar_${OAR_SHORT_VERSION}.orig.tar.gz
 +$ ln -s ../tarballs/oar_${OAR_SHORT_VERSION}.orig.tar.gz build-area/oar_${OAR_SHORT_VERSION}.orig.tar.gz
 </code> </code>
  
Line 118: Line 137:
  
 <code bash> <code bash>
-# if multi-arch: mergechanges -f oar_${OAR_VERSION}_*.changes; then replace amd64 by multi, below. 
 # update lintian # update lintian
 $ sudo apt-get update && sudo apt-get install -t sid lintian $ sudo apt-get update && sudo apt-get install -t sid lintian
Line 124: Line 142:
 $ lintian --pedantic -I -i oar_${OAR_VERSION}_amd64.changes $ lintian --pedantic -I -i oar_${OAR_VERSION}_amd64.changes
 $ debsign oar_${OAR_VERSION}_amd64.changes $ debsign oar_${OAR_VERSION}_amd64.changes
 +# or for multi-arch:
 +$ mergechanges -f oar_${OAR_VERSION}_*.changes
 +$ debsign oar_${OAR_VERSION}_multi.changes
 </code> </code>
  
Line 144: Line 165:
 <code bash> <code bash>
 $ cd ../build-area && dput oar_${OAR_VERSION}_amd64.changes $ cd ../build-area && dput oar_${OAR_VERSION}_amd64.changes
 +# Or if multi-arch:
 +$ cd ../build-area && dput oar_${OAR_VERSION}_multi.changes
 </code> </code>
  
 Packages will go to the sid_alpha distribution if in the UNRELEASED state, or to sid_beta distribution if in the unstable state (see dch) Packages will go to the sid_alpha distribution if in the UNRELEASED state, or to sid_beta distribution if in the unstable state (see dch)
  
-===== Build for jessie backports =====+===== Build for backports distributions =====
  
-Beforehand we configure ''dpkg-mergechangelogs'' to ease the debian changelog file merge. See the manual of ''dpkg-mergechangelogs'' which explains the setup.+Beforehandconfigure ''dpkg-mergechangelogs'' to ease the debian changelog file merge. See the manual of ''dpkg-mergechangelogs'' which explains the setup.
  
-Checkout the bpo branch and merge the commit tag of the debian/2.5 branch:+Checkout the bpo branch for the target distribution: 
 +  * for stretch: debian/2.5_bpo9 → deb version suffix~bpo9+N 
 +  * for jessie: debian/2.5_bpo8 → deb version suffix: ~bpo8+N 
 +  * for wheezy: debian/2.5_bpo70 → deb version suffix: ~bpo70+N 
 + 
 +In the following, we take as example a build for jessie backports.
 <code bash> <code bash>
 $ git checkout debian/2.5_bpo8 $ git checkout debian/2.5_bpo8
 +</code>
 +
 +Merge the commit tag for the packaging of the debian/2.5 branch:
 +<code bash>
 $ git merge debian/2.5.5-1 $ git merge debian/2.5.5-1
 </code> </code>
  
 Fix the conflicts: Fix the conflicts:
-  * fix any issues due to differences between sid and the older backport distribution +  * fix any issues due to differences between sid and the older backports distribution 
   * move the changelog: put everything chronologically ! (no remove, just re-order)   * move the changelog: put everything chronologically ! (no remove, just re-order)
   * or use the ''mergechanges'' tool   * or use the ''mergechanges'' tool
Line 168: Line 200:
 </code> </code>
  
-Add the new changelog entry for the new backport, and commit+Add the new changelog entry for the new backports, and commit
 <code bash> <code bash>
 $ dch --bpo $ dch --bpo
-# adapt the version is not good -> ~bpo8-N for jessie backports+# adapt the version if not good -> ~bpo8-N for jessie backports (see above)
 $ debcommit -a $ debcommit -a
 </code> </code>
Line 180: Line 212:
 </code> </code>
  
-... +Then follow again [[wiki:debian_packaging#sync_the_files_with_the_oar-ftp_machine|the build procedure on oar-ftp]] (make sure ''OAR_VERSION'' is suffixed by bpoXand ''OAR_CHROOT'' targets the correct backport distribution)
- +
-And then for sbuild on oar-ftp, change adapt the variables: +
-<code bash> +
-$ export OAR_VERSION=2.5.5-1~bpo8+1 +
-</code> +
-and +
-<code bash> +
-oar-ftp$ CHROOT=jessie-backports +
-</code>+
  
 If OK, we only need to push the bpo branch + tags If OK, we only need to push the bpo branch + tags
  
 <code bash> <code bash>
-$ git push $REMOTE debian/2.5_bpo8 && +$ git push $REMOTE && git push $REMOTE --tags
-  git push $REMOTE --tags+
 </code> </code>
  
-And finally dput just as with sid, the backported version should now show up in the jessie_backports_beta distribution of oar-ftp. +And finally dput just as with sid, the backported version should now show up in the jessie_backports_beta distribution of oar-ftp (respstretch-backports_beta for bpo9 packages and wheezy-backports_beta for bpo70 packages).
- +
-===== Build for wheezy (backports=====+
  
-Same as for jessie backports, except: 
-  * use the debian/2.5_bpo70 branch 
-  * version should be suffiex with ~bpo70+N instead of ~bpo8+N 
-  * use the wheezy-backports chroot. 
-  * the target distribution is wheezy_backports_beta 
  
 ====== Push the packages to Debian official repositories ====== ====== Push the packages to Debian official repositories ======
wiki/debian_packaging.1529917083.txt.gz · Last modified: 2018/06/25 10:58 by neyron
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki