summaryrefslogtreecommitdiffstats
path: root/debian/README.source.md
blob: 98234c8cf6be4be0d54efccbb090185e55a82ba4 (plain)
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
The packaging is kept in https://salsa.debian.org/samba-team/samba.

The version in unstable is on the `master` branch, with the corresponding
upstream version in the `upstream_4.20` branch (with `pristine-tar` information
in the `pristine-tar` branch).

It should be possible to build the package by just running `gbp buildpackage`.

Building
========

The first time:

    sudo apt install git-buildpackage pristine-tar cowbuilder dh-python
    DIST=sid ARCH=amd64 git-pbuilder create
    git clone https://salsa.debian.org/samba-team/samba.git

Each time:

    cd samba
    git checkout master
    gbp pull --track-missing
    gbp buildpackage --git-pbuilder --git-dist=sid --git-arch=amd64

Alternatively, source-only:

    cd samba
    git checkout master
    dpkg-buildpackage -S -d
    # build the resulting ../samba_*.dsc with other means

Merging minor upstream releases
===============================

Importing a new upstream version can be done like this:

    # set target version
    upstream_version=4.20.0
    # go to git repo
    cd $GIT_DIR
    # Import upstream
    git remote add upstream https://git.samba.org/samba.git
    git fetch upstream
    # go to the Debian branch
    git checkout master
    # sync all required branches
    gbp pull --track-missing
    # Import latest version
    gbp import-orig --uscan \
      -u "${upstream_version}+dfsg" \
      --upstream-vcs-tag "samba-${upstream_version}" \
      --merge-mode merge
    # all done :)


Please note that there are some files that are not dfsg-free and they need to
be filtered. The settings in the `gpb.conf` configuration file should take
care of that.

Merging major upstream releases
===============================

With a new major version, more work is needed.

After `gbp pull`:

    major_version="$(echo $upstream_version | sed 's/.[^.]\+$//')"
    # Edit gbp.conf's upstream-branch
    editor debian/gbp.conf
    # Edit debian/watch's major version
    editor debian/watch
    # Edit this file's major version
    editor debian/README.source.md
    # Commit
    git commit -m"Update d/gbp.conf, d/watch and d/README.source for ${major_version}" debian/gbp.conf debian/watch debian/README.source.md
    # Create the new upstream branch
    git branch "upstream_${major_version}" samba-${upstream_version}
    # Import latest version
    gbp import-orig --uscan \
      -u "${upstream_version}+dfsg" \
      --upstream-vcs-tag "samba-${upstream_version}" \
      --merge-mode=replace

Then several steps are needed:

- Check patches:

        QUILT_PATCHES=debian/patches quilt push -a
        # then update or drop patches as needed

- Bump talloc, tdb, and tevent Build-Depends in debian/control, from lib/*/wscript

        grep ^VERSION lib/{talloc,tdb,tevent}/wscript
        editor debian/control

- Check if other Build-Depends need to be bumped

        git diff origin/master.."samba-${upstream_version}" \
        buildtools/wafsamba/samba_third_party.py