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

Re: Bug#706160: general: it should be easier for ordinary developers to work with Debian packages



Hi Ben,

On 25-04-13 18:22, Ben Longbons wrote:
> Package: general
> Severity: wishlist
[...long introduction snipped]
> How Simple Tasks are approached:
>   quick:
>     Debian:
>       - checkinstall is buggy, quirky, and has no upgrade path.
>       - I still haven't figured out how to do this easily. Based on the
>         'hello' package, which is the simplest possible package,

That's a misconception. The "hello" package shows how to build a Debian
package *without using any helper programs*. Almost nobody ever does
that anymore; I'm not sure why that package still exists. If you want an
example for how to really do things in practice, you should look at
hello-debhelper. Its debian/rules and debian/rules-dh files are much
simpler.

> this
>         requires writing a hundred lines of voodoo. A random sampling of
>         existing package I've looked at agrees with this as a lower bound.
>     Gentoo:
>       - vim foo-1.ebuild; ebuild foo-1.ebuild manifest; emerge foo
>       - That may look like oversimplification, but the contents of
>         foo-1.ebuild really are very simple.

By that rationale, building a Debian package simply requires "mkdir
debian; vim debian/rules; vim debian/control; dch --create; touch
debian/copyright; dpkg-buildpackage". The contents of debian/rules and
debian/control is really simple, dch helps you when creating a
changelog, and an *empty* debian/copyright file is syntactically valid
(though not semantically, of course).

>   distribute:
>     Debian:
>       - Still haven't figured out the right way.
>       - I did find the 'dget' command that does some things. How was I
>         supposed to know about this obscure command for a common use case?

dget isn't something we expect people not involved in the development of
Debian to use, so it's not documented in user-level documentation.

For distributing source packages, you put them in a directory and call
dpkg-scansources; users can then use "apt-get source" on that repository.

Of course, for Debian you don't ship sources, you ship binaries. For
that, there is dpkg-scanpackages. If you need to do a lot more than just
one or two packages, there are other tools, such as reprepro, which
allow you to just put files in a directory somewhere, and it's magically
moved to the right place, with the right index files updated.

If you're not interested in all that, you don't need to ship the .dsc or
.deb files; if as an upstream you just want to ship debian packaging
files, all you need to do is ship the debian/ directory. This Just
Works(TM).

>       - You probably have to ship the whole huge .orig.tar.gz file, even
>         though it's available on the internet under a different name, or
>         even if it's really a git snapshot.

If you want to provide a Debian source package, then yes, that's what
you need to do. However, you don't need to provide a full Debian source
package if all you want to do is to allow people to easily build a .deb
file.

[...too bored to come up with a reply to these...]
>   upgrade:
>     Debian:
>       - Hope it's in experimental.
>       - Hope its experimental package is not broken.
>       - Hope adding an experimental package won't break dependencies in the
>         rest of your system.

- Run "apt-get -d source package", fetch the new upstream source, run
"uupdate" with the right arguments (read the manpage for the details).
Unless it's something very complex, that will almost certainly work.

If, OTOH, it *is* something very complex, then this...

>     Gentoo:
>       - cp foo-1.ebuild foo-2.ebuild; ebuild foo-2.ebuild manifest

... won't work either.

>       - Typically, the source URL will automatically change based on the
>         version number. If this is not the case, it is very obvious to fix.

That's not an issue for Debian, as we ship upstream tarballs ourself,
rather than relying on upstream for that. It has some downsides (as you
correctly point out above), but also some upsides. This is one of them
(there are more)

> In conclusion:
>   The current Debian way is complicated. The Gentoo way is simple.

For you.

To this Debian developer who's never done any Gentoo work, the Gentoo
way is complicated and the Debian way is simple.

Put otherwise, going to one distribution and saying "you guys are doing
it all wrong, look at how $OTHER distribution is doing it, you should do
it their way!!1!" isn't very convincing.

-- 
Copyshops should do vouchers. So that next time some bureaucracy
requires you to mail a form in triplicate, you can mail it just once,
add a voucher, and save on postage.


Reply to: