File: README.source.org

package info (click to toggle)
sqlite3-pcre2 0.1.1~git20220105-e3e02a4a-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 140 kB
  • sloc: sh: 193; ansic: 134; sql: 103; makefile: 38
file content (80 lines) | stat: -rw-r--r-- 2,728 bytes parent folder | download | duplicates (2)
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
# Copyright: 2026, Dominique Dumont <dod@debian.org>
# SPDX-License: BSD-3-clause

This module uses gbp and upstream git repository.

This assumes that upstream remote is named =github= (=upstream= remote
is not used to avoid confusion with =upstream= branch)

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. Since upstream does not provide version tags
but provides a version number in [[file:../Makefile][Makefile]], let's extract the version
number from there, and add some info from git to avoid future issues
if the author's version is not changed:
#+NAME: version
#+begin_src shell :dir .. :exports code :results verbatim
  VERSION=$(grep -e '^VERSION' Makefile | cut -d = -f 2)
  DATE=$(git show --format=%as master | perl -pe 's/-//g' -)
  SHA=$(git show --format=%h master)
  echo -n $VERSION~git$DATE-$SHA
#+end_src

Update debian/latest branch
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
  git checkout debian/sid
  git merge github/master
#+end_src

If needed, 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

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

Test the first build:
#+begin_src shell :eval no
  gbp buildpackage --git-upstream-tree=master --git-ignore-new --git-no-purge
#+end_src

Note: only committed changes are used by gbp buildpackage

Update the changelog to push on unstable:
#+begin_src shell :dir ".." :results verbatim :exports code :eval no
  gbp dch -Ra --commit --distribution=unstable
#+end_src

Once everything is fine, build a source package and tag:

#+begin_src shell :dir ".." :results verbatim :exports code
  gbp buildpackage --git-upstream-tree=master -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]].

 -- Dominique Dumont <dod@debian.org>