INTRODUCTION
============

git workflow and source package
-------------------------------

This package is maintained using the dgit-maint-merge(7) workflow.
The Debian delta typically contains only things to override the
upstream build system.

The source package is 1.0 native.  We would like to use 3.0 native,
but we can't do that with the non-native version number.  #737634.

The official Debian git branch is available via `dgit clone`.
There is no separate salsa repository.


Rust packaging approach
-----------------------

This package uses the dh-rust style Rust packaging, putting both
crates in the same .deb.  The prinipal source repository is the dgit
git server - use dgit clone, and when uploading simply dgit push.

Some violence has been done to allow st least some of the upstream
tests to run.


COMMON TASKS
============

Fixing an FTBFS in Debian
-------------------------

derive-deftly upstream tries to be conservative and broad in its
dependencies.

Most failures will be resolvable simply by updating to a new upstream
version.  This is usually a better idea than the band-aid approach of
(for example) relaxing dependencies.


Updating to a new upstream version
----------------------------------

 1. Obtain the Debian git tree, `dgit clone derive-deftly`
 2. Obtain the upstream git,
   `git fetch https://gitlab.torproject.org/Diziet/rust-derive-deftly`
 3. `git merge upstream` (with `git config pull.rebase false`)
 4. `debian/rust-update-control refresh`
 5. Add an appropriate entry to `debian/changelog`.
 6. `git commit` everything.
 7. Run build tests and autopkgtests, eg
    `autopkgtest . --- schroot sid`
 8. Upload, `dgit push-source`.


NMU POLICY
==========

If this package is causing you a a problem, especially if it is getting
in the way of Rust Team work (maybe it is FTBFS due to an update),
an NMU would be welcome, as set out below.

In any case, please just write to the relevant bug(s) before NMUing to
make sure we coordinate properly.  There is no need to use DELAYED.

"New upstream version" NMUs are also welcome, if they use the
procedure above.  That is often the best way to fix an FTBFS.


Preferred (and easiest!) NMU workflow
-------------------------------------

You will probably find the dgit-based workflow most convenient:

 1. Obtain the Debian git tree
        dgit clone derive-deftly

 2. Make whatever changes you like to the git tree.

    For example you may directly edit upstream Cargo.toml,
    upstream source files, and/or packaging data in debian/.

    There is no need to make patches, or run git-buildpackage.
    Ad-hoc test builds can be done with dpkg-buildpackage -uc -b.

 3. If you make changes to Rust dependencies, you may appreciate
        debian/rust-update-control refresh
    for updating some of the metadata in debian/control.
    But you may also ignore this and edit manually.

 4. Formally test your package with something like
        autopkgtest . --- schroot sid

 5. Upload with
        dgit push-source

If you do this, there is no need to send an nmudiff.
You can simply close the the FTBFS bug with your changelog entry.


Legacy Debian NMU procedure
---------------------------

Alternatively, of course, you may choose to do an NMU using the
standard legacy procedure, based on apt-get source, and dput.


Do not use the Debian Rust Team workflow for this package
---------------------------------------------------------

Please do not put this package in debcargo-conf.
Especially please do not perform an NMU based on debcargo-conf.
