[[newversion]]
=== New upstream release

If a package *foo* is properly packaged in the modern ``*3.0 (native)*'' or ``*3.0 (quilt)*'' formats, packaging a new upstream release is essentially moving the old *debian/* directory to the new source. This can be done by running ``*tar -xvzf* '/path/to/foo_oldversion'*.debian.tar.gz*'' in the new extracted source. footnote:[If a package *foo* is packaged in the old *1.0* format, this can be done by running ``*zcat* '/path/to/foo_oldversion'*.diff.gz|patch -p1*'' in the new extracted source, instead.] Of course, you need to do some obvious chores.

There are several tools to handle this situation.  After updating to the new upstream release with these tools, please make sure to describe concisely the changes in the new upstream release that fix reported bugs and close those bugs by adding ``*Closes: #*'bug_number''' in the *debian/changelog* file.

[[uupdate]]
==== uupdate + tarball

You can update to the new upstream source with the *uupdate* command from the *devscripts* package.  It requires to have the old Debian source package and the new upstream tarball.

----
 $ wget http://example.org/foo/foo-newversion.tar.gz
 $ cd foo-oldversion
 $ uupdate -v newversion ../foo-newversion.tar.gz
 ...
 $ cd ../foo-newversion
 $ while dquilt push; do dquilt refresh; done
 $ dch
----

[[uscan]]
==== uscan

You can update to the new upstream source with the *uscan* command from the *devscripts* package.  It requires to have the old Debian source package and the *debian/watch* file in it.

----
 $ cd foo-oldversion
 $ uscan
 ...
 $ while dquilt push; do dquilt refresh; done
 $ dch
----

[[gbp-orig]]
==== gbp

You can update to the new upstream source with the ``*gbp import-orig --pristine-tar*'' command from the *git-buildpackage* package.  It requires to have the old Debian source in the git repository and the new upstream tarball.

----
 $ ln -sf foo-newversion.tar.gz foo_newversion.orig.tar.gz
 $ cd foo-vcs
 $ git checkout master
 $ gbp pq import
 $ git checkout master
 $ gbp import-orig --pristine-tar  ../foo_newversion.orig.tar.gz
 ...
 $ gbp pq rebase
 $ git checkout master
 $ gbp pq export
 $ gbp pq drop
 $ git add debian/patches
 $ dch -v <newversion>
 $ git commit -a -m "Refresh patches"
----

TIP:  If upstream uses the git repository, please also use *--upstream-vcs-tag* option for the *gbp import-orig* command.

[[gbp-uscan]]
==== gbp + uscan

You can update to the new upstream source with the ``*gbp import-orig --pristine-tar --uscan*'' command from the *git-buildpackage* package.  It requires to have the old Debian source in the git repository and the *debian/watch* file in it.

----
 $ cd foo-vcs
 $ git checkout master
 $ gbp pq import
 $ git checkout master
 $ gbp import-orig --pristine-tar --uscan
 ...
 $ gbp pq rebase
 $ git checkout master
 $ gbp pq export
 $ gbp pq drop
 $ git add debian/patches
 $ dch -v <newversion>
 $ git commit -a -m "Refresh patches"
----

TIP:  If upstream uses the git repository, please also use *--upstream-vcs-tag* option for the *gbp import-orig* command.

[[lib-trans]]
=== Library transition

When you package a new library package version which affects other packages, you must file a transition bug report against the *release.debian.org* psuedo package using the *reportbug* command with the http://ben.debian.net/#_query_language[ben file] and wait for the approval for its upload from the https://wiki.debian.org/Teams/ReleaseTeam[Release Team].

Release team has the https://release.debian.org/transitions/[transition tracker].  See https://wiki.debian.org/Teams/ReleaseTeam/Transitions[Transitions].

CAUTION: Please make sure to rename binary packages as <<libnames>>.

