[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: My personal recommendation on how to create Debian packages from upstream Git



Hi,

> Perhaps, to ease the burden of those of us maintaining many packages,
> we could instead have this more complex rule:
>
> > The default debian branch is the first available of these, in order:
> > 1. debian/latest
> > 2. debian/unstable
> > 3. debian/experimental

If no other information was available the above "algorithm" would make
sense, but please don't forget that git *always* has the _default
branch_ information available.

People contributing to a package in Debian should always target the
default branch in the packaging git repository.

I didn't write the DEP-14, but to my understanding it has been
recommending 'debian/latest' since 2020 because reusing the default
git name 'main' as 'debian/main' would cause confusion, and out of
other options such as 'master' and 'trunk' the authors of DEP-14
landed on 'latest' as something that is descriptive enough yet not
conflicting with other concepts.

DEP-14 also states that as a secondary option 'debian/unstable' is
allowed. However as Xiyue writes, that causes extra work for managing
transitions if uploads to experimental are done and
'debian/experimental' introduced.

Most of the time the uploads to experimental are one-off quality
assurance things, and the decision to do so is done at release time or
close to release time. I don't think it would make sense for people to
upload to experimental from a branch called 'debian/unstable', nor do
I think it would be time well spent to go and flip the default branch
setting from 'debian/unstable' to 'debian/experimental' in the git
repo and ask all contributors to rebase their MRs on
'debian/experimental' a few days before preparing such an upload.

Sometimes the uploads to experimental are used because there is a
freeze, like now. Again it is much simpler to continue to do commits
to 'debian/latest' and keep it as the git default branch than to do
the work of switching branch names. When the git commits and
contributions are made people won't necessarily even know if the
freeze will be over by the time that package uploads, so managing
branch name changes might be unnecessary. To me it seems clearly
better to just target 'debian/latest' with all new dev work and make
the unstable vs experimental upload purely a decision at upload time.

Some large packages might also use uploads to experimental for testing
new features. In that case the 'debian/latest' branch should still
remain the default branch, and the feature development be done on a
feature branch (with whatever name).

In some cases the package may need to be maintained in unstable with
only bugfixes without blocking other development in version control.
In those cases it still makes sense to keep 'debian/latest' as the
development head and target all improvements there, but branch off
'debian/unstable' as a maintenance branch.

Anyway, whatever you choose, please make sure that the branch you use
as the development head branch is on Salsa marked as the default git
branch to clearly communicate to contributors what branch they should
target submissions on.


Reply to: