File: README.source

package info (click to toggle)
apparmor 4.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 30,096 kB
  • sloc: ansic: 24,943; python: 24,914; cpp: 9,074; sh: 8,166; yacc: 2,061; makefile: 1,923; lex: 1,215; pascal: 1,147; perl: 1,033; ruby: 365; lisp: 282; exp: 250; java: 212; xml: 159
file content (126 lines) | stat: -rw-r--r-- 4,204 bytes parent folder | download
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
-*- mode: markdown -*-

Patch handling
==============

This package uses `gbp pq` for maintaining patches with a git-like
workflow in a `patch-queue/<branch>` local branch and then exporting
them as quilt series. For working on patches run:

    gbp pq import --force

Then you are in the patch-queue branch and can git log, commit, cherry-pick
upstream commits, rebase, etc. there. After you are done, run:

    gbp pq export

… which puts you back into your packaging branch and updates
`debian/patches/` (including series). You need to git add etc.
new patches, possibly other packaging changes, and then git commit
as usual.

This package uses gbp pq's "topic" branches for organizing patches in
the following order:

 - Upstream cherry-picks and patches already submitted upstream go
   into the "empty" topic (i.e. directly into `debian/patches/`).

 - Patches applied on Debian and presumably all derivatives, that are
   not applicable upstream, go into `Gbp-Pq:  Topic debian` (i.e.
   `debian/patches/debian/`).

 - Patches that Debian wants but Ubuntu doesn't go into the
   `debian-only` topic.

 - Patches applied on `$derivative` go into `Gbp-Pq: Topic $derivative`
   (i.e. `debian/patches/$derivative/`).

Importing a new upstream release from Ubuntu into Debian
========================================================

XXX: update now that Ubuntu uses the shared Vcs-Git
(https://salsa.debian.org/apparmor-team/apparmor)

1. Download the upstream release tarball + signature, verify.
2. Get a local branch of Ubuntu packaging repo:
   http://bazaar.launchpad.net/~apparmor-dev/apparmor/apparmor-ubuntu-citrain/
3. Merge from that branch into our own Vcs-Bzr (see e.g. bzr revision
   1544 "Merge from ubuntu-citrain up to revision 1578" in Vcs-Bzr).
4. Handle merge conflits.
5. Commit.
6. Compare the tree with the content of the upstream tarball.
7. Update debian/changelog (see e.g. rev 1545..1547 in Vcs-Bzr).
8. Commit.
9. Build, test.
10. Upload and push to Vcs-Bzr.

Importing a new upstream release from the tarball
=================================================

1. Prepare the environment, e.g.:

        NEW_UPSTREAM_VERSION=2.11
        NEW_UPSTREAM_TAG=v2.11

2. Import the new upstream release:

   1. Download the tarball: `uscan`

   2. Set `UPSTREAM_TARBALL=/path/to/tarball`

   3. Manually download the detached upstream signature from
      https://gitlab.com/apparmor/apparmor/-/releases
      into the parent directory and rename it to
      `apparmor_${NEW_UPSTREAM_VERSION}.orig.tar.bz2.asc`.

   4. Set `UPSTREAM_SIGNATURE=/path/to/signature`

   5. Verify the tarball:

          sqopv verify "$UPSTREAM_SIGNATURE" debian/upstream/signing-key.asc < "$UPSTREAM_TARBALL"

   6. Import the upstream tarball and Git history:

        git fetch -v --tags origin && \
        git fetch -v --tags upstream-repo && \
        git tag -v "$NEW_UPSTREAM_TAG" && \
        gbp import-orig \
           --upstream-version="$NEW_UPSTREAM_VERSION" \
           --upstream-vcs-tag="$NEW_UPSTREAM_TAG" \
           "$UPSTREAM_TARBALL"

3. Drop obsolete patches. Sometimes it's as simple as:

        grep --color=never -E '^upstream-.*\.patch' debian/patches/series \
           | xargs -n 1 quilt delete \
           && git rm debian/patches/upstream-*.patch \
           && git commit debian/patches \
                         -m "Drop backported patches that are now obsolete."

4. Apply all quilt patches, update/refresh/delete them as needed.
   Commit.

5. Update debian/changelog:

        gbp dch --new-version "${NEW_UPSTREAM_VERSION}-1" \
                --auto --snapshot debian/ \
           && git commit debian/changelog \
                         -m "$(echo "Update debian/changelog.\n\nGbp-Dch: Ignore\n")"

6. Build, test, run QA checks (Lintian, autopkgtest, etc.).
   Fix problems, rinse and repeat.

7. Mark changelog entry as released and tag:

        gbp dch --release \
           && git commit debian/changelog \
                 -m "$(echo "Release ${NEW_UPSTREAM_VERSION}-1.\n\nGbp-Dch: Ignore\n")" \
           && gbp buildpackage --git-tag-only --git-sign-tags

8. Build once last time

9. Upload

10. Push to Vcs-Git:

        gbp push salsa