LWN.net Logo

Partially distributed distributions

Partially distributed distributions

Posted Feb 8, 2008 22:03 UTC (Fri) by magnus (subscriber, #34778)
In reply to: Partially distributed distributions by JLCdjinn
Parent article: LCA: Disintermediating distributions

I wish there was a "get source" command in the package manager, that would download the source
for a package configured exactly the same way as the installed package was configured. The
package would be flagged as "customized" in the package database. You could then experiment
with different patches, code changes etc and when you're done either revert back to the
original package or keep your custom changes. It could also support automatically generating
patches to send to the distributor or upstream (in case you managed to fix a bug), creating
custom binary packages etc. 

I think something like that would help a lot to reduce the barrier between users and
developers. Does any distribution already have such a system? 


(Log in to post comments)

Partially distributed distributions

Posted Feb 9, 2008 1:59 UTC (Sat) by tzafrir (subscriber, #11501) [Link]

'apt-get source' has been here for a while.

Debian also has now 'debcheckout', but this is more for the package maintainer's version
control system.

You can certainly build your own package and install it. apt considers also locally-installed
packages.

Partially distributed distributions

Posted Feb 9, 2008 14:49 UTC (Sat) by alextingle (guest, #20593) [Link]

$ apt-get source PACKAGE
$ sudo apt-get build-dep PACKAGE
Then, once you've made your change / applied the patch / whatever...
$ dpkg-buildpackage -rfakeroot -b
...and hey-presto, your very own fixed package.

Partially distributed distributions

Posted Feb 10, 2008 15:55 UTC (Sun) by Lennie (subscriber, #49641) [Link]

Also you can use apt-pinning to get a newer version for Debian (Ubuntu ?) testing or even
experimental.

If you add the other 'version' of the distribution (like Debian testing) to your
/etc/apt/sources.list and specify which package you want to upgrade in /etc/apt/preferences
(that's the pinning-part).

It will automatically upgrade any dependencies as well.

This way you can test a newer version and even go back to the distrbution original version
from for example Debian-stable very easily.

If you created a patch for a package (if you did the apt-get source, dpkg-source -x;
dpkg-buildpackage), don't forget to change the version-number in the debian/control file, tag
your initial or organisation at the end of the existing version number with a 1 or 2, etc. so
you can upgrade the package later.

And other way to upgrade a package is to add only the source lines to your
/etc/apt/sources.list and do a apt-get source, dpkg-source, dpkg-buildpackage. You might need
to change the debian/control-file to specify a different version number as dependency or
install that first.

On upgrade (apt-get -u dist-upgrade) or even update of your distribution it will automatically
upgrade your packages, etc. if needed.

Partially distributed distributions

Posted Feb 10, 2008 16:03 UTC (Sun) by Lennie (subscriber, #49641) [Link]

And I forgot to mention the apt-get build-dep command.

Which will install the build-dependencies of the package.

apt-get build-dep: better than sliced bread?

Posted Feb 22, 2008 7:24 UTC (Fri) by goaty (guest, #17783) [Link]

Have you ever tried apt-get build-dep on a fresh install that doesn't have any build tools
installed? It will pull in the entire build system: gcc, header files, everything, with one
command! With a fast disk and a fast network it is insanely pleasurable.

Kids growing up in the Age of APT may never realise that building stuff used to be *hard*.
It's lucky there are other operating systems around for them to use and understand what pain
means.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds