The packaging is kept in https://anonscm.debian.org/git/pkg-samba/samba.git
(web interface: https://anonscm.debian.org/cgit/pkg-samba/samba.git).

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

It should be possible to build the package by just running 'git-buildpackage'.


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

Importing a new upstream version can be done like this:

# set target version
upstream_version=4.7.0
major_version="$(echo $upstream_version | sed 's/.[[:digit:]]\+$//')"
# go to git repo
cd $GIT_DIR
# Import upstream
git remote add upstream https://git.samba.org/samba.git
git fetch upstream
# ensure required branches exists
git checkout "upstream_${major_version}"
git checkout pristine-tar
# go to the Debian branch
git checkout master
# sync all required branches
gbp pull
# 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 should take care of that.

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

With a new major version, more work is needed.

After "gbp pull":
# Edit gbp.conf upstream-branch
editor debian/gbp.conf
# Edit debian/watch major version
editor debian/watch
# Commit
git commit -m"Update d/gbp.conf and d/watch for ${major_version}" debian/gbp.conf debian/watch
# 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
# all done :)
