This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:debian_packaging [2018/06/25 10:57] – [Build the binary packages] neyron | wiki: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 .. | ||
- | $ 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 | ||
+ | # 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: | $ rsync -avz --delete build-area tarballs $OAR_FTP: | ||
</ | </ | ||
Line 96: | Line 100: | ||
<code bash> | <code bash> | ||
- | $ export | + | $ export OAR_VERSION=$(head -n1 oar/ |
- | $ export OAR_CHROOT=$(head -n1 oar/ | + | $ export OAR_CHROOT=$(head -n1 oar/ |
+ | $ export OAR_SHORT_VERSION=$(echo $OAR_VERSION | sed -re ' | ||
# 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 |
+ | # First update the build chroots | ||
oar-ftp$ sudo sbuild-update source: | oar-ftp$ sudo sbuild-update source: | ||
+ | # Other arch? arm64 and ppc64el: | ||
+ | oar-ftp$ sudo sbuild-update source: | ||
+ | oar-ftp$ sudo sbuild-update source: | ||
+ | # Then build: | ||
oar-ftp$ cd $OAR_DIR/ | oar-ftp$ cd $OAR_DIR/ | ||
+ | # 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/ | ||
+ | # 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 | + | # Other arch ? arm64 and ppc64el binary packages: |
+ | oar-ftp$ | ||
+ | oar-ftp$ sbuild -A -d $OAR_CHROOT --arch ppc64el | ||
oar-ftp$ logout | oar-ftp$ logout | ||
</ | </ | ||
Line 110: | Line 126: | ||
<code bash> | <code bash> | ||
$ rsync -avz $OAR_FTP: | $ rsync -avz $OAR_FTP: | ||
+ | # require in some cases, as on oar-ftp | ||
+ | $ rm build-area/ | ||
+ | $ ln -s ../ | ||
</ | </ | ||
Line 118: | Line 137: | ||
<code bash> | <code bash> | ||
- | # if multi-arch: mergechanges -f oar_${OAR_VERSION}_*.changes; | ||
# 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 | ||
</ | </ | ||
Line 144: | Line 165: | ||
<code bash> | <code bash> | ||
$ cd ../ | $ cd ../ | ||
+ | # Or if multi-arch: | ||
+ | $ cd ../ | ||
</ | </ | ||
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 | + | ===== Build for backports |
- | Beforehand | + | Beforehand, configure '' |
- | Checkout the bpo branch | + | Checkout the bpo branch |
+ | * for stretch: | ||
+ | * for jessie: debian/ | ||
+ | * for wheezy: debian/ | ||
+ | |||
+ | In the following, we take as example a build for jessie backports. | ||
<code bash> | <code bash> | ||
$ git checkout debian/ | $ git checkout debian/ | ||
+ | </ | ||
+ | |||
+ | Merge the commit tag for the packaging of the debian/2.5 branch: | ||
+ | <code bash> | ||
$ git merge debian/ | $ git merge debian/ | ||
</ | </ | ||
Fix the conflicts: | Fix the conflicts: | ||
- | * fix any issues due to differences between sid and the older backport | + | * fix any issues due to differences between sid and the older backports |
* 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 '' | * or use the '' | ||
Line 168: | Line 200: | ||
</ | </ | ||
- | 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 | + | # adapt the version |
$ debcommit -a | $ debcommit -a | ||
</ | </ | ||
Line 180: | Line 212: | ||
</ | </ | ||
- | ... | + | Then follow again [[wiki: |
- | + | ||
- | And then for sbuild | + | |
- | <code bash> | + | |
- | $ export OAR_VERSION=2.5.5-1~bpo8+1 | + | |
- | </ | + | |
- | and | + | |
- | <code bash> | + | |
- | oar-ftp$ CHROOT=jessie-backports | + | |
- | </ | + | |
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 | + | $ git push $REMOTE && git push $REMOTE --tags |
- | | + | |
</ | </ | ||
- | 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 |
- | + | ||
- | ===== Build for wheezy | + | |
- | Same as for jessie backports, except: | ||
- | * use the debian/ | ||
- | * 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 ====== |