Dgit brings Git to the Debian archive
Installation
The dgit push
command triggers two processes: First, the command signs the newly built source package with the maintainer's GPG key and uploads it to the Debian archive. This is exactly what the Debsign (package: devscripts
) and Dput (package: dput-ng
) tools do separately. The upload is an anonymous FTP upload to the ftp.upload.debian.org
server.
Second, the command tags your current code snippets with the debian/<packageversion>
[6] standard format and synchronizes the dgit repository on the Debian Alioth server with your own working directory. The Git history of the packages processed with dgit will not end up in the Debian archive. Instead, anyone interested in examining individual changes can browse the logged commits online later [7].
If a user clones a package that has been processed with dgit previously or updates an existing local repository using dgit fetch
, dgit restores the Git history stored on the dgit server. To keep the source package and Git repository in sync at all times, there is now a special dgit field for the control files (.dsc
) in the Debian archive, which contains the hash of the corresponding Git commits [8].
If you run dgit push
without upload privileges, the connection to the Debian archive and the dgit server breaks down. In this case, dgit converts the current commits to patches. Users can then send these packages to the developers or provide them on a bug-tracking system. You will face no restrictions to cloning.
Progress
Of course, dgit is primarily useful to Debian developers, offering an approach to manipulating packages on the fly or recurrently – even outside of the developer groups – in Git. Dgit also offers a development interface for occasional work on packages that are not maintained or do not have a fixed maintainer. The good thing is that the software does not discard the commit history but stores it in a central place, making it visible online. After all, some users will have a good reason to track the progress that a package is making.
Dgit is very well suited to package sponsoring, which is where experienced Debian developers check the work by newcomers before uploading. Dgit is also useful for admins who maintain local versions of official Debian packages with special customizations for certain systems. Until now, developers have had to repeatedly copy the local patch into a new source directory whenever the archive was updated, in order to build updated binary packages. With dgit, the maintainer simply merges the new versions of the source package into the working directory and integrates the changes, thus keeping the local modifications. Finally, dgit also benefits downstream developers – for example, maintainers of Debian derivatives. The integration options grow if you provide Git repositories from the Debian archive instead of an FTP mirror.
Conclusions
Compared with legacy procedures for handling Debian source packages and the Debian archive, dgit offers many benefits and modernizes access to the Debian archive.
It remains to be seen whether dgit will find widespread acceptance among Debian developers and whether a significant number of packages will start appearing on the dgit server. Dgit may be open for integration into existing Git workflows of the Debian developer groups; however, the overhead necessary to support this integration might exceed the value it adds.
Nonetheless, dgit is a useful and potentially future-oriented feature for the package archive, and this makes me optimistic that it will – in the long-term – attract the interest of Debian developers. Dgit's strengths are apparent even without a focus on collaborative aspects. The Git access that is available through dgit gives you the option for tapping into an archive for read-only access. Ubuntu is now using dgit as a tool for supporting read-only access [9].
Other sophisticated options, such as the ability to exchange changes made to edited packages, puts dgit, with its separate workflow, on a par with alternative tools like git-buildpackage
and git-dpm
[10].
Infos
- Linus Torvalds' talk on Git: https://www.youtube.com/watch?v=4XpnKHJAok8
- Debian package: https://tracker.debian.org/pkg/dgit
- Dgit manpage: https://www.mankier.com/7/dgit
- Sbuild series of articles: http://www.danielstender.com/blog/tag/sbuild.html
- Sbuild: https://wiki.debian.org/sbuild
- Used standards: http://dep.debian.net/deps/dep14
- Browser on the dgit server: https://browse.dgit.debian.org
- Dgit control field: https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Dgit
- Background information on dgit: http://manpages.debian.org/cgi-bin/man.cgi?query=dgit&sektion=7&manpath=Debian+unstable+sid
- Changing the Python group to
git-dpm
: https://lists.debian.org/debian-devel-announce/2015/10/msg00000.html
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.