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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
This module uses gbp and upstream git repository.
As of version 0.254.1, =pristine-tar= branch is no longer updated.
The instructions of this file assume that the branches are:
- master :: Debian work
- upstream :: upstream branch from github
To work on this package, please run:
#+begin_src shell
git clone https://salsa.debian.org/perl-team/modules/packages/libconfig-model-systemd-perl.git
git remote add github https://github.com/dod38fr/config-model-systemd.git
#+end_src
To update this package, first import the changes from upstream:
#+begin_src shell :dir .. :exports code :results verbatim
git fetch --all
#+end_src
#+RESULTS:
: Fetching origin
: Fetching upstream-repo
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
: 0.257.2
Update upstream branch:
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
git checkout upstream
git merge v$VERSION
#+end_src
#+RESULTS:
#+begin_example
Your branch is up to date with 'origin/upstream'.
Updating b999804..2c21141
Fast-forward
Changes | 6 ++++++
dist.ini | 4 ++++
lib/Config/Model/Backend/Systemd.pm | 17 +++++++++--------
lib/Config/Model/Backend/Systemd/Unit.pm | 8 ++++----
t/model_tests.d/systemd-test-conf.pl | 11 ++++++-----
.../systemd-user-examples/duplicity/duplicity.service | 2 ++
.../systemd-user-examples/duplicity/duplicity.timer | 5 +++++
t/model_tests.d/systemd-user-test-conf.pl | 9 +++++++++
t/systemd-service.t | 2 --
9 files changed, 45 insertions(+), 19 deletions(-)
create mode 100644 t/model_tests.d/systemd-user-examples/duplicity/duplicity.service
create mode 100644 t/model_tests.d/systemd-user-examples/duplicity/duplicity.timer
#+end_example
Update debian branch:
#+begin_src shell :dir .. :exports code :results verbatim :var VERSION=version
git checkout master
git merge upstream
#+end_src
#+RESULTS:
#+begin_example
Your branch is up to date with 'origin/master'.
Merge made by the 'ort' strategy.
Changes | 6 ++++++
dist.ini | 4 ++++
lib/Config/Model/Backend/Systemd.pm | 17 +++++++++--------
lib/Config/Model/Backend/Systemd/Unit.pm | 8 ++++----
t/model_tests.d/systemd-test-conf.pl | 11 ++++++-----
.../systemd-user-examples/duplicity/duplicity.service | 2 ++
.../systemd-user-examples/duplicity/duplicity.timer | 5 +++++
t/model_tests.d/systemd-user-test-conf.pl | 9 +++++++++
t/systemd-service.t | 2 --
9 files changed, 45 insertions(+), 19 deletions(-)
create mode 100644 t/model_tests.d/systemd-user-examples/duplicity/duplicity.service
create mode 100644 t/model_tests.d/systemd-user-examples/duplicity/duplicity.timer
#+end_example
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
#+RESULTS:
: Applying patch debian/patches/rm-git-from-dzil
: patching file dist.ini
:
: Now at patch debian/patches/rm-git-from-dzil
: Removing patch debian/patches/rm-git-from-dzil
: Restoring dist.ini
:
: No patches applied
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
#+RESULTS:
: gbp:info: Found tag for topmost changelog version '930269c56a2120b3bb925105a0c1f6410656aca4'
: gbp:info: Continuing from commit '930269c56a2120b3bb925105a0c1f6410656aca4'
: gbp:info: Only looking for changes on 'debian/'
: gbp:info: No changes detected from 930269c56a2120b3bb925105a0c1f6410656aca4 to HEAD.
: gbp:info: Changelog 0.257.2-1~1.gbpfdc4cf (snapshot #1) prepared up to fdc4cfe
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 3e78590] new upstream version
: 1 file changed, 8 insertions(+)
You can build the package with the following command:
# this requires emacs ob-tmux
#+begin_src tmux :session build :results verbatim :exports code :var dir=repo_dir
cd $dir
gbp buildpackage --git-ignore-new
#+end_src
Note: only committed changes are used by =gbp buildpackage=
Update the changelog:
#+begin_src tmux :session build :results verbatim :exports code :var dir=repo_dir
cd $dir
gbp dch -Ra --commit
#+end_src
Once everything is fine, build a source package and tag:
#+begin_src tmux :session build :results verbatim :exports code :var dir=repo_dir
cd $dir
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]].
# this is a workaround for a bug in ob-tmux. No need to execute this
#+NAME: repo_dir
#+BEGIN_SRC shell :results verbatim :exports no
cd ..
echo -n $PWD
#+END_SRC
|