1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
This module uses gbp and upstream git repository.
As of version 2.055, =pristine-tar= branch is no longer updated.
The branches are:
- master :: Debian work
- upstream :: Debian's view of upstream (required to avoid breaking history)
- github :: upstream work
To update this package, first import the changes from upstream:
#+begin_src shell :dir .. :exports code :results verbatim
git fetch --all
#+end_src
Find the latest version:
#+NAME: version
#+begin_src shell :dir .. :exports code :results verbatim
VERSION=$(git describe --tags $(git rev-list '--tags=v*' --max-count=1) | sed 's/^v//')
echo -n $VERSION
#+end_src
#+RESULTS: version
: 2.055
Update Debian's upstream branch:
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
git checkout upstream
git merge v$VERSION
#+end_src
#+RESULTS:
: Votre branche est en avance sur 'origin/upstream' de 3014 commits.
: (utilisez "git push" pour publier vos commits locaux)
: Merge made by the 'ort' strategy.
: .gitignore | 3 ---
: Changes | 5 +++++
: dist.ini | 6 +++++-
: 3 files changed, 10 insertions(+), 4 deletions(-)
Update debian work branch:
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
git checkout master
git merge upstream
#+end_src
Update the debian/copyright file:
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
cme update dpkg-copyright
#+end_src
Then review the changes and commit the result.
See also https://github.com/dod38fr/config-model/wiki/Updating-debian-copyright-file-with-cme
Check patches (and cleanup if necessary):
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
quilt push -a && quilt pop -a
#+end_src
Generate a temporary changelog:
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
gbp dch --new-version=$VERSION-1 --snapshot --auto debian/
#+end_src
Commit =debian/changelog= (otherwise, =gbp buildpackage= tries to build the
old version):
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
git commit -m"new upstream version" debian/changelog
#+end_src
#+RESULTS:
: [master 2b4f2ea9] new upstream version
: 1 file changed, 10 insertions(+)
You can build the package with the following command:
#+begin_src shell :dir ".." :results verbatim :exports code
gbp buildpackage --git-ignore-new
#+end_src
Note: only committed changes are used by gbp buildpackage
Update the changelog:
#+begin_src shell :dir ".." :results verbatim :exports code
gbp dch -Ra --commit
#+end_src
Once everything is fine, build a source package and tag:
#+begin_src shell :dir ".." :results verbatim :exports code
gbp buildpackage -S --git-tag
#+end_src
Push on salsa:
#+begin_src shell :dir ".." :results verbatim :exports code
gbp push
#+end_src
For more details, see [[https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.import.upstream-git.html#gbp.import.upstream.git.notarball][gbp import with git documentation]].
|