Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Fri, Mar 27, 2009 at 01:53:19PM +0100, Santiago Vila wrote: On Mon, 16 Mar 2009, Raphael Hertzog wrote: On Wed, 27 Aug 2008, Raphael Hertzog wrote: It's not required for lenny. The code making use of this is only in dpkg 1.15 which will only be uploaded in lenny+1. Lenny is now released. Can we go forward and have this implemented in base-files ? Yes, it's now in my todo list for the next upload. However, I'd like to address a lenny (and etch) issue first (See Bug #519719). You seem to have done this now, so can I take the liberty of poking about this again? :-) dpkg 1.15.1 (currently unreleased) drops its /etc/dpkg/origins/ files. Thanks, -- Colin Watson [cjwat...@ubuntu.com] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Fri, 24 Apr 2009, Colin Watson wrote: On Fri, Mar 27, 2009 at 01:53:19PM +0100, Santiago Vila wrote: On Mon, 16 Mar 2009, Raphael Hertzog wrote: On Wed, 27 Aug 2008, Raphael Hertzog wrote: It's not required for lenny. The code making use of this is only in dpkg 1.15 which will only be uploaded in lenny+1. Lenny is now released. Can we go forward and have this implemented in base-files ? Yes, it's now in my todo list for the next upload. However, I'd like to address a lenny (and etch) issue first (See Bug #519719). You seem to have done this now, so can I take the liberty of poking about this again? :-) dpkg 1.15.1 (currently unreleased) drops its /etc/dpkg/origins/ files. Working on this now. I'd like to use Replaces with = and the last release which had the origins file, can you confirm that it is 1.15.0 in experimental? (If yes, I promise to make an upload in short). -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Thu, 5 Feb 2009, Colin Watson wrote: With my Ubuntu hat on (as a frequent uploader of both base-files and dpkg there): [...] * I very definitely prefer the default vendor change to be an explicit change in base-files' source, rather than being implicit based on the system on which base-files was built. That's much clearer and is an insignificant cost for us. Thanks. I'm going to do it that way to keep it simple. After all, it will be trivial to fork in either case, which is the idea here. I have no particular opinion on any particular way of creating that symlink, although I would find it a little bit surprising if a user sidegraded from Debian to Ubuntu or vice-versa and found that their entire system changed *except* for /etc/dpkg/origins/default. Could you elaborate on that? For example, if we had implemented this a year ago, what would be, in your opinion, the desirable behaviour regardind such symlink when upgrading from Ubuntu 8.10 to lenny, or when upgrading from lenny to Ubuntu 9.04? Perhaps we should store the information about what the default is in a file, not in a symlink, so that dpkg asks about this on upgrades? Otherwise, I don't see a good way to avoid the surprise you describe if we use a symlink for storing such info. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
I said: I'd like to use Replaces with = and the last release which had the origins file, can you confirm that it is 1.15.0 in experimental? I see 1.15.0 in experimental, so I'll use that. Uploading now. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Mon, 16 Mar 2009, Raphael Hertzog wrote: Hello Santiago, On Wed, 27 Aug 2008, Raphael Hertzog wrote: On Wed, 27 Aug 2008, Santiago Vila wrote: Sorry for not answering this before. Is this something that you would like to see implemented in lenny? It's not required for lenny. The code making use of this is only in dpkg 1.15 which will only be uploaded in lenny+1. Lenny is now released. Can we go forward and have this implemented in base-files ? Yes, it's now in my todo list for the next upload. However, I'd like to address a lenny (and etch) issue first (See Bug #519719). -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
Hello Santiago, On Wed, 27 Aug 2008, Raphael Hertzog wrote: On Wed, 27 Aug 2008, Santiago Vila wrote: Sorry for not answering this before. Is this something that you would like to see implemented in lenny? It's not required for lenny. The code making use of this is only in dpkg 1.15 which will only be uploaded in lenny+1. Lenny is now released. Can we go forward and have this implemented in base-files ? You should replace dpkg ( 1.15.1) as we already released dpkg 1.15.0 to experimental and it still contains /etc/dpkg/origins. Cheers, -- Raphaël Hertzog Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny : http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Wed, Aug 27, 2008 at 08:31:47PM +0200, Raphael Hertzog wrote: On Wed, 27 Aug 2008, Santiago Vila wrote: On Wed, 27 Aug 2008, Raphael Hertzog wrote: However the symlink should point to ubuntu if base-files is built on Ubuntu and to debian if built on Debian. [...] Hmm, first it is suggested that this is done in base-files because it is easier to fork, but then a procedure is described in which no fork is even necessary, except for a bootstrap. Forking is always needed to add the new file in origins. With my Ubuntu hat on (as a frequent uploader of both base-files and dpkg there): * Modulo a few tweaks, I think Raphaël's origins work is fantastic and will adopt it like a shot as soon as it's convenient to do so (i.e. it's in Debian and we're at a suitable point in our release cycle for a new major version of dpkg). * While there's still some work to do, there is considerable promise for this to allow us to use an entirely unpatched dpkg (perhaps throwing away a few relatively unimportant things in our diff that haven't mattered so long as we had to carry a big diff anyway). As such, I agree that it would be convenient for this to be in base-files rather than in dpkg. * I very definitely prefer the default vendor change to be an explicit change in base-files' source, rather than being implicit based on the system on which base-files was built. That's much clearer and is an insignificant cost for us. I have no particular opinion on any particular way of creating that symlink, although I would find it a little bit surprising if a user sidegraded from Debian to Ubuntu or vice-versa and found that their entire system changed *except* for /etc/dpkg/origins/default. Thanks, -- Colin Watson [cjwat...@ubuntu.com] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
Sorry for not answering this before. Is this something that you would like to see implemented in lenny? On Sat, 21 Jun 2008, Raphael Hertzog wrote: Package: base-files Version: 4.0.4 Severity: wishlist Please include /etc/dpkg/origins/debian and a symlink /etc/dpkg/origins/default - debian in the base-files package. The idea is that this symlink should let us detect the vendor of the currently installed system. This facility will be used in dpkg to offer customized build of Debian packages depending on the current system. That way a single source could be shared betwen Debian and the derivatives distributions that collaborate with the Debian maintainer (even when some differences are needed). See http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=322153b6e8cbe50724f85678f46be5193a751a12 and http://bugs.debian.org/457371 for this precise use case. We could keep those files in dpkg but we think it's best if they are part of base-files since base-files is a package that any derivative has to modify anyway and is also less complex than dpkg. When you do that, please add a Replaces: dpkg ( 1.15). I understand the idea behind this, but I'm not fully convinced that it has to be part of base-files. Clearly, dpkg is a complex package, but if the only modification a derivative distribution wants to make is the origins thing, forking is easy enough. However, I can understand that convenience is a good thing, and that forking base-files is a lot easier than forking dpkg (if only because of the build time). You should aim to make it easy to drop a supplementary file in that directory and update the symlink. So make sure the build system automatically includes all files from the directory where you'll put the files in the source tarball. You mean something like this in debian/rules, right? mkdir -p debian/tmp/etc/dpkg/origins cp -a origins/* debian/tmp/etc/dpkg/origins (That would copy whatever is in origins directory). I don't understand the part about making easy to update the symlink. I can think of two ways of doing that. The bad one, to be put in debian/rules: ln -s debian debian/tmp/etc/dpkg/origins/default That would be bad because it would be a hardcoded thing, and /etc is supposed to be under the control of the system admin. While it would be discouraged that a user change the symlink, I can imagine a user who wants to upgrade from a derived distribution to a later pure-debian distribution, or viceversa, if they do not differ too much. A better way to handle the symlink would be to make it in the postinst, exactly once, the very first time base-files is installed by debootstrap, i.e. inside the block starting with this line: if [ $1 = configure ] [ $2 = ]; then which is already full of things to be done only once at the initial install. I think this would be easy enough to fork, and it would also allow the user to change it. To summarize, the required changes would be: * A new origins directory in the source code. * The debian file inside such directory. * Two lines in debian/rules to copy the files into debian/tmp * A line in the postinst to set the default symlink. Would you be happy with this? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Wed, 27 Aug 2008, Santiago Vila wrote: Sorry for not answering this before. Is this something that you would like to see implemented in lenny? It's not required for lenny. The code making use of this is only in dpkg 1.15 which will only be uploaded in lenny+1. However, I can understand that convenience is a good thing, and that forking base-files is a lot easier than forking dpkg (if only because of the build time). Indeed. And it's best to reduce the number of packages any derivative has to fork. You mean something like this in debian/rules, right? mkdir -p debian/tmp/etc/dpkg/origins cp -a origins/* debian/tmp/etc/dpkg/origins (That would copy whatever is in origins directory). Right. I don't understand the part about making easy to update the symlink. I can think of two ways of doing that. The bad one, to be put in debian/rules: ln -s debian debian/tmp/etc/dpkg/origins/default Bad indeed. A better way to handle the symlink would be to make it in the postinst, exactly once, the very first time base-files is installed by debootstrap, i.e. inside the block starting with this line: if [ $1 = configure ] [ $2 = ]; then Well, it should create the symlink if it doesn't exist... because that would cope with upgrade as well. However the symlink should point to ubuntu if base-files is built on Ubuntu and to debian if built on Debian. For this I suggest that base-files uses $(DEB_VENDOR) to find out the current distribution. Since $(DEB_VENDOR) is a variable that is only set by dpkg-buildpackage from version 1.15 or later, you would provide a default value in debian/rules with: DEB_VENDOR ?= Debian Then you can replace #VENDOR# in the postinst: dh_installdeb vendor=$$(echo $(DEB_VENDOR) | tr A-Z a-z); sed -i -e s/#VENDOR#/$$vendor/g debian/base-files/DEBIAN/postinst The postinst would contain this: if [ ! -e /etc/dpkg/origins/default ]; then if [ -e /etc/dpkg/origins/#VENDOR# ]; then ln -sf #VENDOR# /etc/dpkg/origins/default fi fi Any derivative distribution would then put the files in the origins dir, and bootstrap base-files by building with DEB_VENDOR set to the name of their distribution (or they could manually create /etc/dpkg/origins/default provided that they are already using dpkg = 1.15). * A new origins directory in the source code. * The debian file inside such directory. * Two lines in debian/rules to copy the files into debian/tmp * A line in the postinst to set the default symlink. Would you be happy with this? Yes, but see above for a small improvement to avoid the need to change the postinst for the derivative distribution. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Wed, 27 Aug 2008, Raphael Hertzog wrote: However the symlink should point to ubuntu if base-files is built on Ubuntu and to debian if built on Debian. [...] Hmm, first it is suggested that this is done in base-files because it is easier to fork, but then a procedure is described in which no fork is even necessary, except for a bootstrap. What about just setting VENDOR in debian/rules and create postinst using sed? Ubuntu would just need to modify a single line in debian/rules (which would not be a big problem since base-files is already forked) and no special bootstrap would be needed. I'd like to keep it as simple as possible. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
On Wed, 27 Aug 2008, Santiago Vila wrote: On Wed, 27 Aug 2008, Raphael Hertzog wrote: However the symlink should point to ubuntu if base-files is built on Ubuntu and to debian if built on Debian. [...] Hmm, first it is suggested that this is done in base-files because it is easier to fork, but then a procedure is described in which no fork is even necessary, except for a bootstrap. Forking is always needed to add the new file in origins. What about just setting VENDOR in debian/rules and create postinst using sed? Ubuntu would just need to modify a single line in debian/rules (which would not be a big problem since base-files is already forked) and no special bootstrap would be needed. I'd like to keep it as simple as possible. Fine for me. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#487437: Please include /etc/dpkg/origins/{debian,default}
Package: base-files Version: 4.0.4 Severity: wishlist Please include /etc/dpkg/origins/debian and a symlink /etc/dpkg/origins/default - debian in the base-files package. The idea is that this symlink should let us detect the vendor of the currently installed system. This facility will be used in dpkg to offer customized build of Debian packages depending on the current system. That way a single source could be shared betwen Debian and the derivatives distributions that collaborate with the Debian maintainer (even when some differences are needed). See http://git.debian.org/?p=dpkg/dpkg.git;a=commitdiff;h=322153b6e8cbe50724f85678f46be5193a751a12 and http://bugs.debian.org/457371 for this precise use case. We could keep those files in dpkg but we think it's best if they are part of base-files since base-files is a package that any derivative has to modify anyway and is also less complex than dpkg. When you do that, please add a Replaces: dpkg ( 1.15). You should aim to make it easy to drop a supplementary file in that directory and update the symlink. So make sure the build system automatically includes all files from the directory where you'll put the files in the source tarball. Feel free to comment on any point... this idea has been floating around in the dpkg team since quite some time but it's always possible that we missed some important point and we haven't had any recent discussion. I'll forward this bug report to the debian-dpkg list so that people can comment if needed. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]