|
|
Subscribe / Log in / New account

Seeking consensus on dh

By Jake Edge
June 5, 2019

Debian takes an almost completely "hands off" approach to the decisions that Debian developers (DDs) can make in regard to the packaging and maintenance of their packages. That leads to maximal freedom for DDs, but impacts the project in other ways, some of which may be less than entirely desirable. New Debian project leader (DPL) Sam Hartman started a conversation about potential changes to the Debian packaging requirements back in mid-May. In something of a departure from the Debian tradition of nearly endless discussion without reaching a conclusion (and, possibly, punting the decision to the technical committee or a vote in a general resolution), Hartman has instead tried to guide the discussion toward reaching some kind of rough consensus.

The question revolves around an adjunct to the debhelper tool that is used to build many Debian packages. The additional tool is a "command sequencer" for debhelper commands; it is called dh. Debhelper has commands that get invoked from the rules file that is used to build a .deb from the source code and other files that are part of a Debian package. By default, dh steps through a sequence of debhelper commands that should suffice to build many types of packages; if some of the steps need overrides or changes, that can be handled as well. In effect, dh encapsulates the standard way to build a Debian package using debhelper.

But not all packages use dh, so Hartman asked whether the distribution wanted to require, or at least recommend, the use of dh. In that posting to debian-devel, he noted that some have said that a package not using dh has a "package smell", which is an indication that the maintainers should consider fixing it. His question might ultimately boil down to "whether maintainers should be expected to apply well-written patches to convert a package to using dh".

Hartman noted that there will likely always be exceptions for some packages where using dh does not make sense. He also summarized some of the reasons for and against the idea. Using "dh makes packaging simpler", he said, but it is more than just that. It also makes it easier for other maintainers to understand and help out with package maintenance. That can make a real difference when there are tree-wide efforts, like hardening or reproducible builds, but it also would tend to draw DDs together as a team. The main argument against a change toward pushing dh is that it would introduce bugs in package building simply due to conversion mistakes. Beyond that:

One maintainer claimed that even if someone else wrote the patch it wasn't worth their effort to validate for a package where the existing build system was already working.

Holger Levsen thought that the Debian Policy Manual should be changed to have dh as a "should" requirement, except in two specific areas: those packages that already use the Common Debian Build System (CDBS) and those packages that debhelper is dependent upon. Eventually, the "should" could become a "must". The Haskell ecosystem uses features of CDBS (which is seemingly not documented anywhere) that are not available in debhelper, so it may not be a good candidate for moving to dh, at least at this point. There has been some work to add a dh_haskell command to debhelper, Sean Whitton said, but it has stalled. Marc Dequènes pointed out that CDBS may be on its way toward retirement at this point, which should be kept in mind. Others agreed with Levsen's ideas, though some would like to see debhelper eventually take over for CDBS, which fits well if CDBS is on its way out.

But Marco d'Itri wondered why he would convert his debhelper-using packages to dh: "I use debhelper in all of my packages but I have never switched to dh: why should I bother? 'Everybody is doing this' is not much of an argument." Simon McVittie had a lengthy response that described some of the extras that dh provides. Essentially, it will help those who modify the packages ("perhaps your future self") by allowing them to ignore various semi-tedious details that have to be worked out without it. In addition, those details can change over time, which will not necessarily be reflected in packages that only use debhelper.

There was also discussion of whether it was a appropriate to use the non-maintainer upload (NMU) process to change a package to using dh. In general, it was not seen as a reasonable way to switch a package to dh. As Scott Kitterman put it: "A likely bug inducing drive-by NMU is not helpful." He thinks that new packages should, in general, be built using dh, but is less convinced that existing packages will truly benefit—and the likely result will be lots of tricky bugs:

There are probably packages left that would be trivial to convert, but I expect that most of those have been taken care of already. For complex packages, this can be really hard to get right. In the experiences I've had, converting packages that I maintain and have a great deal of familiarity with is still fraught with error.

For really complex packages, they are going to be hard for someone not familiar with the package to modify regardless of dh/debhelper. My guess is that if we try and push this direction the effort will mostly be spent where there is the least potential for gain and the most risk of regressions.

For improvement of existing packages, I think there are better things to expend resources on.

Whitton largely agreed with Kitterman about the distinction between new and existing packages. Ian Jackson also thought it made sense, though he did have an anecdotal data point about his efforts to convert the Xen package, which worked out well, overall. For policy, though, he didn't think converting should be mandated:

I also think it would be very valuable for policy to recommend things like this as the usual case, without mandating them. If for any reason the maintainer doesn't want to use dh, then they can leave a wontfix bug open (or something) to document the reasons.

As the conversation started winding down a bit, Hartman said that he planned to try to summarize where consensus was found and not found in the discussion. That resulted in his consensus call post on May 25. He used the consensus process in RFC 7282 as a model, though, of course, it "has no force here"; it does, however, have some useful thoughts, he said:

[...] the authors have spent a lot of time thinking about how to understand what an opinionated group of technologists mean when writing to a mailing list. In judging consensus, it's much more about whether issues have been considered and whether the community believes the issues have been adequately resolved than numbers of people on any side of a given issue.

He asked that people make comments by June 16 and to clearly distinguish where they thought his summary was not accurate versus comments meant to help establish a different consensus. His summary laid out some of the issues that recurred in the earlier thread: that dh makes cross-archive changes easier, that converting to dh could be seen as churn that made other people's efforts harder, especially if it wasn't tested well, and that Debian has "valued respecting the maintainer's preference above most other factors". Pushing for more uniformity is perhaps a step away from that last item.

He also summarized the areas where he thought rough consensus had been reached. One is that, except in certain circumstances, using dh is the right thing for a maintainer to do. Those certain circumstances were outlined (e.g. the Haskell ecosystem), though he called them "exceptional circumstances", which Jackson thought sent a slightly wrong message. Jackson suggested "unusual circumstances" since that does not necessarily imply rarity, saying that the consensus he heard was "that dh should be used unless there is 'some reasonable reason' not to". Hartman liked the "some reasonable reason" wording and plans to try to work that in.

There was also clear consensus on not using the NMU process to convert packages. The area where consensus is more murky is around whether not using dh should be considered a bug that can be filed against a package. It is clearly not a release-critical (RC) bug, he said, nor would it be a bug if one of the exceptions (or "some reasonable reason") applies. Hartman's best guess is that there may be consensus that not using dh would be considered a normal bug, but that mass-filing bugs is not the way forward either.

While there has been a fair amount of discussion in response, it mostly veered away from either of the two types of responses that Hartman was seeking. That probably indicates that his summary is generally accurate and that participants in the debian-devel mailing list are sanguine about the consensus reached. Kitterman disputed the idea that not using dh was a bug of any sort, but thought that it could be turned into one by changing Debian policy. There is still more than a week to run on the consensus call, but if things stand as they are, Hartman plans to "talk to various people who are impacted about next steps", which presumably includes the policy editors.

To an outside observer, but one who has looked in on Debian discussions a few times over the years, the process has gone much more smoothly than it often does. Jackson called it "an awesome way to conduct this discussion/decisionmaking/whatever". Perhaps this particular set of topics is not as controversial and heat inducing as some, but patiently working through the issues and trying to find common ground where it exists does seem like an improvement. It will be interesting to see where it all goes from here.



to post comments

Seeking consensus on dh

Posted Jun 5, 2019 22:18 UTC (Wed) by Beolach (guest, #77384) [Link]

Joey Hess, the original author of dh, blogged about this.
PS: It's perhaps worth re-reading the original debhelper email and see how much my original problems with debstd would also apply to dh if its use were mandatory!

Seeking consensus on dh

Posted Jun 6, 2019 2:19 UTC (Thu) by filbranden (guest, #87848) [Link] (30 responses)

For someone coming from the RPM world, the first time I had to deal with this non-sense I was horrified.

What, 4 different build systems for a package? (debhelper, dh, CDBS and perhaps I'm wrong but I recall there might have been another?) Not to mention that most of this is built on top of a makefile (rules), a LOT of Perl, some control files using RFC822(!?!)-like headers and pedantic requirements for the changelog.

For some reason, after looking at building DEBs, RPM spec files looked a lot less ugly than they used to.

Oh, and when I actually needed to build a couple hundred of DEBs, I ended up building a tarball and turning that into a DEB, that was the only sane approach really. (https://docs.bazel.build/versions/master/be/pkg.html#pkg_deb)

Seeking consensus on dh

Posted Jun 6, 2019 2:34 UTC (Thu) by mirabilos (subscriber, #84359) [Link] (10 responses)

Ugh, no thanks, RPM files are underspecified crap,
incompatible between distros, and the syntax is horrifying.
Also, commented-out macros are still parsed… no, thanks!

Seeking consensus on dh

Posted Jun 6, 2019 7:51 UTC (Thu) by jond (subscriber, #37669) [Link] (4 responses)

Most people's complaints about RPM are at the layer below what OP is complaining about: the horrid binary format, strange uncompressed key/value store in the metadata, and all that stuff; OP is talking about the complexity of the source level, and having dh, debhelper, cdbs, etc. *is* a problem. There are some things that are nicer about the RPM source workflow (not everything, but some things)

Seeking consensus on dh

Posted Jun 6, 2019 9:17 UTC (Thu) by epa (subscriber, #39769) [Link] (3 responses)

So could one hack up a tool to build a dpkg from an rpm spec file?

Seeking consensus on dh

Posted Jun 6, 2019 10:06 UTC (Thu) by smurf (subscriber, #17840) [Link] (1 responses)

Sure you could, but given the impedance mismatch (RPM specs include some things Debian's don't, and vice versa; embedded scripts contain Redhat/RPM-isms, etc.) it'd make more sense to build a debian/ subdirectory from it.

The other way would be to process the RPM spec with, well, RPM, and the re-package the resulting RPM binary package to a .deb archive. This is reasonably simple to do, and flexible enough when you allow the user to edit the intermediate result.

I leave the question of whether getting RPM to run on Debian systems would be easier than writing a spec converter to whoever tries both and compares the effort involved. ;-)

Seeking consensus on dh

Posted Jun 6, 2019 13:10 UTC (Thu) by epa (subscriber, #39769) [Link]

RPM has been packaged as part of Debian since time immemorial, but as we know that's not really the point.

Seeking consensus on dh

Posted Jun 7, 2019 10:54 UTC (Fri) by Conan_Kudo (subscriber, #103240) [Link]

No need to hack up one, it already exists: https://github.com/ascherer/debbuild

I use it for building Debian packages all the time. It doesn't fully support everything a spec file has, but it's got a good chunk of it already.

Seeking consensus on dh

Posted Jun 14, 2019 11:27 UTC (Fri) by Wol (subscriber, #4433) [Link] (4 responses)

> Ugh, no thanks, RPM files are underspecified crap,
incompatible between distros,

It's not RPM's fault that different distros have different *POLICIES* - not helped by the fact that SUSE (the second major user of rpm) actually PRE-dates Red Hat and rpm.

So it IS possible to retro-fit rpm to a completely different set of packages, because that's what SUSE did all those years ago :-) Dunno how easy that would be with deb, I'm unaware of any example where that's been done.

Cheers,
Wol

Seeking consensus on dh

Posted Jun 14, 2019 15:23 UTC (Fri) by smurf (subscriber, #17840) [Link] (3 responses)

It's not a question of policy, it's a question of a file format that is somewhat unspecified, contains redundant fields, and is unnecessarily complex.

Contrast that with .deb which contains specific files in a specific format that's simple enough to be created and processed by generic archive packers (ar and tar) and shell scripts. (It actually was, in Debian's first iteration.)

Seeking consensus on dh

Posted Jun 14, 2019 15:37 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

>It's not a question of policy

Certainly a question of policy too given that does differ occasionally between even Debian and its derivatives causing incompatibility

> it's a question of a file format that is somewhat unspecified, contains redundant fields, and is unnecessarily complex.

I am not sure what any of this really means. Specific examples would help. Pick current ones instead of things solved ages ago please.

Seeking consensus on dh

Posted Jun 14, 2019 15:42 UTC (Fri) by pizza (subscriber, #46) [Link] (1 responses)

So, are you claiming that extracting debs or rpms using the equivalent of a rock lashed to a stick is something that is remotely relevant in the past 15 years of bootable USB sticks or the additional 10 years of bootable rescue CDs?

Or are you claiming that someone would ever be insane enough to _create_ a deb or rpm package using that same flint axe? Talk about not valuing one's own time...

Seeking consensus on dh

Posted Jun 23, 2019 20:06 UTC (Sun) by mirabilos (subscriber, #84359) [Link]

FWIW, I use the official .deb of a program as part of the “sources” in
another, resource-constrained, operating environment; it contains the
PDF compiled from Teχ sources (while that other OE does not have Teχ
available, but a PDF viewer, so the full documentation is usable)

Seeking consensus on dh

Posted Jun 6, 2019 3:59 UTC (Thu) by luto (guest, #39314) [Link]

I feel the same way. The few times I’ve fiddled with Debian packages, I’ve wondered why there is more than one way I do it. I think there is way too much flexibility.

(I’m not saying RPM is great. But there is more or less one way to write a spec file and there is exactly one way to build it.)

Seeking consensus on dh

Posted Jun 6, 2019 4:37 UTC (Thu) by anguslees (subscriber, #7131) [Link] (5 responses)

There is a single way to package everything, and that is the `./debian/rules` (makefile) script. It is provided various standard arguments and environment variables, and expected to (eventually) produce .deb and other output files.

Naturally writing similar debian/rules boilerplate for similar upstream packages is undesirable, so various "helper" tools have been developed over the last few decades. It's easy to see why the "best" tool for a python module might not be the best tool for a kernel module, or a font.

To me (coming from the Debian world), it's horrifying that rpm mandates a centralised set of rpm functionality across such diverse needs ;) Imagine what we'd be stuck with if the the original dpkg standards had mandated whatever the most popular helper was 20+ years ago, without experience or a process for change!

Seeking consensus on dh

Posted Jun 6, 2019 9:26 UTC (Thu) by epa (subscriber, #39769) [Link] (2 responses)

This sounds like the same argument about autoconf/automake versus various other build systems. The standard way to build is with a Makefile; but of course you don't want to write that all by hand every time, so we need this helper script to generate it... Before you know where you are you're in a world of m4 macros, self-configuring shell scripts that generate other shell scripts, and generally a tower of abstraction that makes some things easy but other things very hard.

You could choose to simplify all that by having a build tool like scons or meson which works from a single configuration language and has richer built-in functionality than plain old make. And if there are certain projects where the tool doesn't work well, it might be a better investment of time to adapt it for them, rather than pay the cost of having lots of different build systems.

You are right, the best tool to generate debian/rules for a Python script might not be the best tool to generate it for a kernel module. But there is an implicit assumption: that you need to generate the debian/rules file at all. Perhaps a better build system would start with a less verbose configuration file that doesn't need to be generated, but can be handwritten without too much boilerplate.

Seeking consensus on dh

Posted Jun 6, 2019 9:56 UTC (Thu) by smurf (subscriber, #17840) [Link]

Well, "dh" basically allows you to write a less-verbose configuration file -- debian/rules now consists of five lines of fixed boilerplate. You might want to set what dh calls the build system (Python packages don't have Makefiles), but that's it, at least to start with.

Yes, building Haskell needs a "dh_haskell" helper. I'm reasonably positive somebody will write one, now that CDBS is on its way to being deprecated.

Seeking consensus on dh

Posted Jun 6, 2019 15:33 UTC (Thu) by rweikusat2 (subscriber, #117920) [Link]

Isn't applicable here at all. The 'standard' way to build a .deb-file from a debianized soucre tree is to use the debian/rules Makefile to build a target called 'binary' (unchanged since at least 1999). 'dh' is a set of tools implementing a sequence of steps for building a debian/rules target. For the most simple case, the rules will just contain

%:
dh $@

ie, whatever target is supposed to be built, build it by invoking the dh program with the target name as argument. 'dh binary' ends up executing 50 dh subcommands in a certain sequence, all of which can be overriden individually by putting Makefile targets named 'override_dh_<something>' with dh_<something> being a dh subcommand into debian/rules which will be activated instead of the default commands if they exist.

This is a pretty flexible and nevertheless easy-to-use approach: The most complicated Debian package I've created so far overrides just eight of these 50 subcommands and usually, the overrides just do something in addition to the default operation.

Seeking consensus on dh

Posted Jun 10, 2019 8:42 UTC (Mon) by LtWorf (subscriber, #124958) [Link] (1 responses)

RPM has a lot of duplication. All those postinst scripts that dh_whatever generate are not automatically generated.

Seeking consensus on dh

Posted Jun 10, 2019 11:31 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link]

> RPM has a lot of duplication. All those postinst scripts that dh_whatever generate are not automatically generated.

It depends on how you write spec files. The recommended practice in distributions that use RPM like Fedora have been to move away from scripts to macros and file based triggers that avoid said duplication. Scriptlets should be reserved for a one off use cases.

Seeking consensus on dh

Posted Jun 6, 2019 6:11 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

It's funny that your rpm generator function gets a spec file as a parameter, whereas your deb generator function gets description, homepage, and such rather than a control file.

Seeking consensus on dh

Posted Jun 6, 2019 8:19 UTC (Thu) by dskoll (subscriber, #1630) [Link] (9 responses)

Building Debian packages is indeed an exercise in thrashing around until it works. Debhelper and dh are sprawling messes; I have yet to find "big picture" documentation that puts everything in context so you can understand what's actually going on.

Seeking consensus on dh

Posted Jun 6, 2019 9:10 UTC (Thu) by smurf (subscriber, #17840) [Link] (2 responses)

Debian's policy manual describes how the source looks like and what the resulting package is expected to contain. The steps from A to B are well-documented; if you don't know how to do step X you run "dh_X -v". What more do you need?

This is easy stuff.

Seeking consensus on dh

Posted Jun 6, 2019 11:27 UTC (Thu) by dskoll (subscriber, #1630) [Link]

Just what I said: overview documentation rather than (or in addition to) dense reference documentation.

Seeking consensus on dh

Posted Jun 6, 2019 22:09 UTC (Thu) by samuelkarp (subscriber, #131165) [Link]

When trying to package something for Debian the first time, I found this difficult as well. I'm fortunate to work with a DD who was able to guide me, but the policy manual was not very helpful to me. The policy manual seems to focus on details of the resulting package (as is important for policy), but not how to create a package for the first time.

Seeking consensus on dh

Posted Jun 6, 2019 15:41 UTC (Thu) by rweikusat2 (subscriber, #117920) [Link] (3 responses)

I've been actively maintaining as much as 91 Debian packages in the past, being a mix of customized 'standard' Debian packages, completely original developments and specifically packaged open source packages in the past (presently only 28) and it's nothing like this.

Seeking consensus on dh

Posted Jun 6, 2019 16:55 UTC (Thu) by antiphase (subscriber, #111993) [Link] (2 responses)

It's possible you're not the target audience for the missing documentation then.

Seeking consensus on dh

Posted Jun 6, 2019 17:22 UTC (Thu) by rweikusat2 (subscriber, #117920) [Link] (1 responses)

When I started doing this (IIRC, some time in 2011), I didn't have anything but the available documentation to learn about it (I'm not a Debian developer, I'm doing this for the software of my employer).

Seeking consensus on dh

Posted Jun 6, 2019 17:34 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link]

One has to recognize that different people find different approaches more effective for them. Typically you want to provide both the overview type documentation as well as the reference type documentation. Others might even learn by doing watching some videos online or doing workshops in person.

Seeking consensus on dh

Posted Jun 7, 2019 2:05 UTC (Fri) by murukesh (subscriber, #97031) [Link]

Have you read the New Maintainers' Guide? https://www.debian.org/doc/manuals/maint-guide/

Seeking consensus on dh

Posted Jun 7, 2019 17:22 UTC (Fri) by k8to (guest, #15413) [Link]

I have to agree. There's no clear entry point in the developer guide to put the pieces together, and a lot is left out.

I know enough about .deb files and practice that I've written tooling and scripts to do mass investigations of how customers have broken their systems etc, or how my former employer's release team had broken our customers etc. I've created shim packages to avoid installing things that the package graph required. But I still have no idea how to go about creating a sane debian developer style package, despite trying.

I'm sure it's possible to succeed from the published docs, but I'd bet most developers start out by cribbing from another package.

Seeking consensus on dh

Posted Jun 6, 2019 9:04 UTC (Thu) by smurf (subscriber, #17840) [Link]

Well, to be nitpicky about it, from a high-level point of view there's exactly one build system: you call "debian/rules" with one of a few documented arguments.

The fact that this is processed by /usr/bin/make is just convenience, even though that's actually mandated by Debian's policy these days. The various build helpers / "build systems" also are, or started as, simply convenience; you're free to use debhelper/dh to generate a plaintext Makefile instead, though I'd wonder why you'd want to do that.

Frankly, I don't understand your problem with mass-building DEBs. Debian packaging is little more than "check that your Makefile obeys $DESTDIR (which you also need for RPM), run "dh_make -n" (or manually create three boilerplate files and one somewhat-less-complicated-than-an-rpmspec file), run 'debuild'. Done.". Yes, you need a heap of details to make them distributable (dependencies, documentation package, debug package, post-install script, …), but you need the same details in an RPM specfile.

Alternately, in the context of your build system (and the low-level point of view you actually need for it), things are even easier. You'd create the destination tree in debian/PACKAGENAME, write a few lines to a reasonably documented file in the DEBIAN/ subdirectory thereof, create the md5sums file ("dh_md5sums -v" tells you how to do that, if you don't want to depend on debhelper behing installed), and run "dpkg-deb -b debian/PACKAGENAME". Or, if you want to run on a non-Debian system, you can assemble the .deb yourself, it's not difficult (quite in contrast to RPM).

Any reasonably competent Debian developer could have told you this in ten minutes.

Seeking consensus on dh

Posted Jun 6, 2019 12:11 UTC (Thu) by jezuch (subscriber, #52988) [Link]

I'm not a DD so I don't really know this stuff, but from what I remember dh is basically just codification of the current practices regarding debhelper. When I was looking into packaging (a long time ago) it all looked like a "magic sequence" with no clear explanation why this step, why that step and why in this order. Dh compresses all that into a single command that does the Right Thing. Huge improvement over the festival of mindless copy and paste.

And this should be given as the reason to use it to the doubters IMO.

Seeking consensus on dh

Posted Jun 6, 2019 19:32 UTC (Thu) by martin.langhoff (subscriber, #61417) [Link] (16 responses)

I've worked with packaging in Debian and RH style. Since the advent of fedpkg (and other bits of consolidation of the rpmdev stack), the rpm side has gotten a couple orders of magnitude easier, and more consistent.

Because of that, a small number of maintainers can work through a large number of packages, and keep them mostly consistent. Maintainers can drop in on any package that's needing TLC and pretty much fix / update without breaking stuff. On Fedora, this happens all the time -- there's super-maintainers with rights over all packages.

It's like any project with strong consistent code style.

Debian packaging... well, it harkens back to the Perl era. TIMTOWDI. Some teams maintain a set of packages, and use consistent tools and style, achieving quality and leverage. Ubuntu folks had made some strides in their packages. But outside those oasis, it's a maze of hermits in caves, each maintaining their unique little toolchain. Super-maintainers like in Fedora would be impossible, and just wreak havoc.

True DDs love this balkanized world, and I love that they love it because I doubt anyone else does.

Seeking consensus on dh

Posted Jun 6, 2019 20:13 UTC (Thu) by rweikusat2 (subscriber, #117920) [Link] (15 responses)

I've been maintainig forks of the following Debian packages as part of a product which is now in "support only" mode: apache2, bind9, htmldoc, lilo, logrotate, ntpdate, openssl and postgres. Some of these are decidedly non-trivial (I'm still maintaining a libpcap fork for both Debian and Ubuntu). Hence, your statement that the Debian tooling would prevent people from working with packages they didn't create ("Super-maintainers like in Fedora would be impossible, and just wreak havoc. ") is obviously wrong.

Seeking consensus on dh

Posted Jun 6, 2019 20:56 UTC (Thu) by rahulsundaram (subscriber, #21946) [Link] (13 responses)

> Hence, your statement that the Debian tooling would prevent people from working with packages they didn't create ("Super-maintainers like in Fedora would be impossible, and just wreak havoc. ") is obviously wrong.

No, his point goes beyond that. In Fedora is very common and typical to have non package maintainers commit across thousands of packages when there is an improvement in packaging that has been proposed and agree by Fedora packaging committee (and or Fedora Engineering steering committee if it is a more higher level change). Maintainers have the responsibilities in Fedora but not a tight or exclusive hold over the packages. In Debian, there is a strong association between packages and packagers and it is a different culture. Your forks of a bunch of packages that you maintain in-house has no impact on that cultural difference.

Seeking consensus on dh

Posted Jun 6, 2019 21:07 UTC (Thu) by rweikusat2 (subscriber, #117920) [Link] (12 responses)

> No, his point goes beyond that.

I wasn't addressing more than what I wrote about, namely, the supposed "impossibility" to work with packages one didn't create due to all of these different "styles": It's perfectly possible and - in fact - even common-place that "a small number of maintainers work with a large number of packages" in Debian, there's even a procedure for that called NMU (non-maintainer upload), usually employed for fixes which are considered urgent, IOW, security issues, these being done by a dedicated team of people.

Seeking consensus on dh

Posted Jun 7, 2019 0:58 UTC (Fri) by martin.langhoff (subscriber, #61417) [Link] (8 responses)

It's possible but the cognitive load is 10x due to diverse styles and tools.

It's a cultural thing.

When a codebase is managed by entrenched developers who refuse a common style, this is what you get.

Seeking consensus on dh

Posted Jun 7, 2019 14:49 UTC (Fri) by rweikusat2 (subscriber, #117920) [Link] (7 responses)

This "cognitive load" negligent to non-existant. Either a package is trivial. Then, understanding it will be trivial as well. Or it's not. In that case, there'll be a lot of package-specific things which will necessarily differ, with the package building tools being a very small portion of that.

Seeking consensus on dh

Posted Jun 7, 2019 15:21 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

> In that case, there'll be a lot of package-specific things which will necessarily differ, with the package building tools being a very small portion of that.

With my over a decade of experience maintaining dozens and dozens of packages for an upstream distribution, consistency of package building tools matter a lot to people maintaining the distribution day in and day out. I wouldn't call that a small portion at all especially when you are bringing in new contributors.

Seeking consensus on dh

Posted Jun 7, 2019 15:34 UTC (Fri) by smurf (subscriber, #17840) [Link] (5 responses)

I disagree: there's more to packaging a distribution than touching a single package.

Suppose you want to fix a somewhat-trivial problem with your packaging like, for instance, replacing "/var/run" with "/run". Or, say, change the default flags of the compiler for more hardening. Or … well, whatever.

With "dh" this is a no-brainer. You update its defaults, rebuild the whole archive, and file bugs where that fails.
With trivial rpm specfile, this is also a no-brainer. More likely than not, there's a field for what you're trying to do, or a default value in RPM. Update it, rebuild the package, file a bug when that fails.

With anything nonstandard, you can't do that – your understanding does not translate well to a "sed" command, trivial package or not.
Even if the cognitive load was a mere ten seconds per package, you'd spend a whole week on something as big as Debian.

Packaging is not the only area where "diversity" ends up blocking progress. Source archives and packaging their debian/ subdirectories are another good example. Why do I still need to upload some Upstream tar archive plus a separately-packaged debian/ subdirectory with a debian/patches atrocity, when a git location plus commit ID would take up a whole load less bandwidthß

Seeking consensus on dh

Posted Jun 7, 2019 17:33 UTC (Fri) by rweikusat2 (subscriber, #117920) [Link] (3 responses)

You may disagree with something but that's certainly not related to what I was writing about (namely, working with Debian packages doesn't become significantly more difficult because there's no enforced, standard auxiliary toolset for building one).

Seeking consensus on dh

Posted Jun 7, 2019 18:29 UTC (Fri) by smurf (subscriber, #17840) [Link] (2 responses)

Working with one or ten Debian package? no. Working with one or ten thousand? definitely.

It's fairly easy to automatically determine which build steps are "special" in a package if that package uses dh. Anything else? not so much.

Seeking consensus on dh

Posted Jun 7, 2019 21:05 UTC (Fri) by rweikusat2 (subscriber, #117920) [Link] (1 responses)

Assuming that building a package takes 10s (unrealistic), someone doing nothing but "building packages" 24x7 would need more than a day to build "10,000 packages". A project of this size would necessarily need to be handled by a fairly large group of people. Also, there aren't "10,000" different toolchains for package building, the number is probably less than 10.

OTOH, feel free to believe whatever you want. I have a forked package I need to work on ...

Seeking consensus on dh

Posted Jun 7, 2019 21:40 UTC (Fri) by pizza (subscriber, #46) [Link]

> Assuming that building a package takes 10s (unrealistic), someone doing nothing but "building packages" 24x7 would need more than a day to build "10,000 packages".

Um, that's what automated build farms are for...?

Seeking consensus on dh

Posted Jun 10, 2019 19:52 UTC (Mon) by derobert (subscriber, #89569) [Link]

You're looking for dgit, which although it doesn't save the bandwidth (since the original + delta upload is still done), does save you from having to worry about it. Also, conceivably, if enough of Debian switches to it, getting rid of source packages (replacing them with git repositories) becomes possible.

There was also discussion about this recently on debian-devel, as Ian Jackson is trying to make sure it works with all git workflows, with the eventual goal of everyone using it.

Seeking consensus on dh

Posted Jun 7, 2019 3:58 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link] (2 responses)

> there's even a procedure for that called NMU (non-maintainer upload), usually employed for fixes which are considered urgent, IOW, security issues, these being done by a dedicated team of people.

Yep, you said it yourself. NMU is limited to urgent things and a small number of people. Fedora proven packagers are more in number and routinely make non urgent changes. Small targeted fixes are welcome and encouraged.

https://docs.fedoraproject.org/en-US/fesco/Provenpackager...

https://fedoraproject.org/wiki/Who_is_allowed_to_modify_w...

It is a huge difference in scope and general culture

Seeking consensus on dh

Posted Jun 7, 2019 14:52 UTC (Fri) by rweikusat2 (subscriber, #117920) [Link] (1 responses)

The original statement was about something being impossible. It's demonstrably not.

Seeking consensus on dh

Posted Jun 7, 2019 15:17 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

> The original statement was about something being impossible. It's demonstrably not.

Fair but it's also demonstrably not as easy or common as in Fedora

Seeking consensus on dh

Posted Jun 7, 2019 3:34 UTC (Fri) by martin.langhoff (subscriber, #61417) [Link]

To be clear here, it's not impossible, it's 10x harder, and a lot more brittle. And just not culturally acceptable in debian.

In Debian, an NMU is something people complain about. And with some reason -- the maintainer who did the NMU has a good chance of breaking stuff, because each package is unique in its packaging.

In Fedora, super maintainers work on hundreds or thousands of packages over a couple days regularly, and generally nothing breaks. NMUs are the rule, not the exception. Packages are cattle for them.

Seeking consensus on dh

Posted Jun 7, 2019 16:06 UTC (Fri) by Freeaqingme (subscriber, #103259) [Link] (1 responses)

I don't understand the reason for the focus on tools. Why not focus on the format instead?

I surmise that dh embeds data differently in a .deb file. Then why not focus on standardizing what data needs to be present inside of the package? We don't focus on what mail client is used on mailing lists, rather we focus on what format to adhere to. Seems a similar situation?

Whenever I need to make a debian package quickly, I just pick FPM ( https://github.com/jordansissel/fpm ). This works just fine, albeit ordinarily only used internally. If Debian wants to make any improvements to usability of packaging software, imho they should at least take a look at it to see how user friendly such software can be.

Seeking consensus on dh

Posted Jun 7, 2019 17:06 UTC (Fri) by smurf (subscriber, #17840) [Link]

Wrong. The format (both what the source tree should contain and the contents of the resulting .deb files) are standardized. There's exactly one tool in Debian that builds a .deb file, and everybody ends up calling that. Eventually.

Packaging is more than "one easy tool". You need to build the package so that it stores its files in a directory tree other than the root, manage dependencies to other packages, register Python/Perl/Ruby/Go/Node/* libraries, separate libraries / documentation / debug info, install post-installation handlers and init scripts / systemd units, check for a avoidable packaging errors (forgot to de-boilerplate the copyright notice, anybody?), and a bunch of other things.

"dh" encapsulates a lot of overrideable/amendable knowledge on how to, given all that information, call a lot of other tools in order to do all of the above in the right order and eventually end up with that .deb file. More to the point, it encapsulates that knowledge so that if somebody creates/adds a better tool we can simply change/add that in dh, instead of having to touch 10000 debian/rules files.

Tools like FPM may be nice for one-shot personal use, or to build a third-party package for some distribution. But for distro-wide package creation? not realistic. There's a lot more to packaging than can be expressed in FPM command line options.


Copyright © 2019, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds