Re: Pre-seeding XFree settings for keyboard in Debian Installer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok, I have now finished the infrastructure using version maps, but before I upload I would like to describe the process, for feedback, comments etc. Basically the dir structure is this: /conffiles.d: sarge/ woody/ xfree86-kbd.preinst ispell.preinst ispell.postinst ktouch.postinst kde2.postinst links.postinst ./conffiles.d/sarge: xfree86-kbd ./conffiles.d/woody: ispell ktouch xfree86-kbd kde2 links You might notice that ispell has both preinst and postinst scripts, this is because skolelinux/woody uses postinstallation configuration, while ispell in sarge, can be preconfigured using debconf preseeding. And the process: update-locale-config is called, if a flag -p is given, then it executes the .preinst scripts in conffiles.d, otherwise it executes the .postinst scripts in the same folder. This is to ensure that we can use configuration in pre- and post- stages of installation. Each *.{pre,post}inst script has a version map that it uses to decide which version it should run. I have separated the common routines in common.pl, and use this to get the appropriate version. Here is a small part of the conffiles.d/xfree86-kbd.preinst: - require 'common.pl'; getopts("dlp", \%opts); init(); my %xvermap = ( '4.1.0-1', => { RELEASE => 'woody' }, '4.3.0-1', => { RELEASE => 'sarge' } ); my $script = "xfree86-kbd"; my $package = "xserver-xfree86"; my $release = get_release($package, %xvermap); $script = "$release/".$script; print "Running $script $lang\n"; system ($script, $lang) if -x $script; - -- Basically, I wanted it small and clean, so that it would be easy to create new ones. The xvermap array holds the versions and release names. I just put the minimum versions in which the configuration is different (4.3.0 introduced some slight differences in XkbOptions). I then execute the $release/$script file, which is the same script as it was in locale-config-skolelinux. I prefered this approach as I really like modularity and dislike huge scripts with lots of if clauses :-) If for some reason, an older/newer version has no available method for {pre,post}-configuration then the script can just be a dummy script (a link to /bin/true perhaps?). How does get_release() then works? If the package exists AND is installed then i compare the currently installed version to the version map. If it is not installed then I check -using apt availability list- againsg the latest version. If the package does not exist or something went wrong with other methods, I fallback to checking /etc/debian_version (though that should not happen often). That's about it, I will have uploaded the package later this day at http://people.debian.org/~markos/debian/ Feel free to comment. Konstantinos -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFA8BuZIU9oQVFfm3QRAghEAJwNB2rPr+5NSpZaOoP4OsH7ktacLwCdFAq9 pYF3meY2qbA0KHIFSeKHycU= =lRzG -END PGP SIGNATURE-
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Tue, Jun 29, 2004 at 10:52:12PM +0300, Konstantinos Margaritis wrote: > conffiles.d/sarge: > ispell.preinst xfree86-kbd.preinst > > conffiles.d/woody: > ispell.postinst ktouch.postinst locale.preinstopera6.postinst > xfree86-kbd.preinst kde2.postinstlinks.postinst > ltsp-xfree86-kbd.? timezone.postinst FYI, as part of the overhaul of xserver-xfree86's debconf (currently scheduled for -7, but which could slip), I'm going to be breaking up the .config script into one functon for each configurable parameter, so it should be fairly easy to slot in whatever you'd like to do. -- G. Branden Robinson| If the jury can count higher than Debian GNU/Linux | two, the case will fail. [EMAIL PROTECTED] | -- Tom Lane, on Forgent's claim of http://people.debian.org/~branden/ |a patent on JPEG signature.asc Description: Digital signature
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Τετ 30 Ιουν 2004 01:39, Petter Reinholdtsen wrote: > Well, sure, you can keep adding new options all the time, but it > will be a maintenence problem keeping it correct and up to date. True, but this applies for everything, and maintaining will be easy for older releases, only the latest will actually need active maintenance... Anyway, I attach the update-locale-config script as I've changed it so far. I am no perl expert, so if you find anything that needs tidying up, feel free to correct it. I haven't uploaded anything to the skolelinux cvs, and I think that would be a bad idea anyway, I don't want to break anything in skolelinux right now. FWIW, it seems to work now (I commented out the system() line for initial testing). > The content in that file is free text, and collecting it in popcon > showed 10-15 different values. Most of them would be hard to map > to the proper script. We gave up collecting and using the > information after seeing how different the values actually were. > > Yes, we might just as well dropp it. Could you please send me these values? Konstantinos update-locale-config Description: Perl program
Re: Pre-seeding XFree settings for keyboard in Debian Installer
[Konstantinos Margaritis] > There is no reason why it should not work, after all, I can just add > a new option for the next release. Well, sure, you can keep adding new options all the time, but it will be a maintenence problem keeping it correct and up to date. > unpredictable ways? I don't really understand what you mean. It *is* > there for a reason, if it is not actually usable, then we might just > as well, drop it! :-) The content in that file is free text, and collecting it in popcon showed 10-15 different values. Most of them would be hard to map to the proper script. We gave up collecting and using the information after seeing how different the values actually were. Yes, we might just as well dropp it.
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Τετ 30 Ιουν 2004 00:39, Petter Reinholdtsen wrote: > Not sure if it is a good idea to hardcode in the names of debian > releases like that. The package should work also after sarge is > released, and a new version is being developed. There is no reason why it should not work, after all, I can just add a new option for the next release. Right now, I keep a map with possible values in debian_version and corresponding script folders, like that: my %supported_versions = ( 'woody' => { FOLDER => 'woody' }, 'sarge' => { FOLDER => 'sarge' }, 'testing/unstable' => { FOLDER => 'sarge' } ); if in the future we have another release, we could just add one more entry. Of course if it's a matter of the folder names, sure I could change these. > > It will read the /etc/debian_version and accordingly run the > > appropriate scripts from the correct directory. > > This do not work. We tried collecting that info in > popularity-contest, and it is often changed in unpredictable ways. > We have been unable to find a sure way to detect which > version/codename of debian is installed. unpredictable ways? I don't really understand what you mean. It *is* there for a reason, if it is not actually usable, then we might just as well, drop it! :-) > > In the meantime, since the current ispell configuration is > > debconf-based, I will make one extra script for sarge > > ispell.preinst. > > Sounds good to get this written. :) Yup, too bad that aspell has no such support... I'll tell you when I have something to test... > > Also, now that I think about it, there is a new infrastructure > > for dictionaries, dictionaries-common that configures the > > appropriate ispell dictionary from a list. So perhaps I should > > just pre-seed dictionaries-common instead? > > I do not know how this work. Well, from what little I've seen, it appears that dictionaries-common is supposed to configure ispell itself. So if we pre-seed dictionaries-common... :-) Konstantinos
Re: Pre-seeding XFree settings for keyboard in Debian Installer
[Konstantinos Margaritis] > Ok, here is what i have now: > conffiles.d/: > sarge woody Not sure if it is a good idea to hardcode in the names of debian releases like that. The package should work also after sarge is released, and a new version is being developed. > It will read the /etc/debian_version and accordingly run the > appropriate scripts from the correct directory. This do not work. We tried collecting that info in popularity-contest, and it is often changed in unpredictable ways. We have been unable to find a sure way to detect which version/codename of debian is installed. I'm not sure how it is best to handle this, but suspect the scripts need to change behaviour depending on the version of packages installed, not depending on the debian codename being used. > In the meantime, since the current ispell configuration is > debconf-based, I will make one extra script for sarge > ispell.preinst. Sounds good to get this written. :) > Also, now that I think about it, there is a new infrastructure for > dictionaries, dictionaries-common that configures the appropriate > ispell dictionary from a list. So perhaps I should just pre-seed > dictionaries-common instead? I do not know how this work.
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Τρι 29 Ιουν 2004 17:34, Konstantinos Margaritis wrote: > ok, how about spliting the conffiles to two dirs, for woody/sarge, > or with a suffix in the filename (eg. kde2.woody, kde3.sarge). Ok, here is what i have now: conffiles.d/: sarge woody conffiles.d/sarge: ispell.preinst xfree86-kbd.preinst conffiles.d/woody: ispell.postinst ktouch.postinst locale.preinstopera6.postinst xfree86-kbd.preinst kde2.postinstlinks.postinst ltsp-xfree86-kbd.? timezone.postinst I have also updated the update-locale-config script to take one more parameter {preinst/postinst} so that it can be called in two separate times, one at the start (runnint the preinst scripts) and one at the end running the postinst scripts. It will read the /etc/debian_version and accordingly run the appropriate scripts from the correct directory. > > Yes, some major rewrites have been done to the ispell config. > > Perhaps ispell should be replaced by aspell, which I'm told is a > > better spell checker? In the meantime, since the current ispell configuration is debconf-based, I will make one extra script for sarge ispell.preinst. Also, now that I think about it, there is a new infrastructure for dictionaries, dictionaries-common that configures the appropriate ispell dictionary from a list. So perhaps I should just pre-seed dictionaries-common instead? Konstantinos
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Τρι 29 Ιουν 2004 14:12, Petter Reinholdtsen wrote: > [Konstantinos Margaritis] > > > * of all the conffiles.d, we only need xfree86-kbd, and probably > > kde(but updated for kde 3) > > If possible, make sure the package work in Woody as well as in > Sarge/Sid. ok, how about spliting the conffiles to two dirs, for woody/sarge, or with a suffix in the filename (eg. kde2.woody, kde3.sarge). > > * ispell needs to be updated to new versions which are (I think) > > debconf base > > Yes, some major rewrites have been done to the ispell config. > Perhaps ispell should be replaced by aspell, which I'm told is a > better spell checker? I'm all for aspell as it is better maintained upstream and has actuall support for non-latin languages (eg. greek) > Is the timezone really working as it should in d-i? Good. for me at least yes but the timezone setup is quite simple for Greece, with only one option, I don't know if it works as it should with more complex locale configs(eg. US, China, etc). > > Well, _need_ is a strange criteria to use. As long as they only > fix the config when the package is installed, I would very much > like to handle as many packages as possible. ok, but these should go after installation of the packages is finished. > You don't need to split the package in two. You can have one > package, with two base-config fragments. > > I do not think it will be possible to get all packages configurable > with debconf in a reasonable time frame, so I believe we need to > keep both ways of configuration. Ok, basically i'm creating a list of configuration to be executed before installation of packages, and another one at the end of the installation. (in reality, there will be 2 such pairs, one for woody and one for sarge). Will keep you posted. Konstantinos
Re: Pre-seeding XFree settings for keyboard in Debian Installer
[Konstantinos Margaritis] > * of all the conffiles.d, we only need xfree86-kbd, and probably > kde(but updated for kde 3) If possible, make sure the package work in Woody as well as in Sarge/Sid. > * ispell needs to be updated to new versions which are (I think) > debconf base Yes, some major rewrites have been done to the ispell config. Perhaps ispell should be replaced by aspell, which I'm told is a better spell checker? > * maybe add gnome configurations (but I have very little gnome > experience) Not needed. gnome uses the LANG and LANGUAGE environment variables (ie locales). > * we don't really need locale and timezone (as these are handled by > debian-installer) Is the timezone really working as it should in d-i? Good. > * we also don't need to configure links and ktouch (as these are > optional packages and not debconf based), ltsp-xfree86-kbd (as it's > skolelinux specific) and opera6 (not available in debian itself) Well, _need_ is a strange criteria to use. As long as they only fix the config when the package is installed, I would very much like to handle as many packages as possible. > * If we decide to update kde as well, then we have to either: > a) make kde configurable by debconf, or > b) split the package into 2 subpackages, one to be called before X > configuration (thus pre-seeding debconf values) and one after > (finishing up KDE configuration). You don't need to split the package in two. You can have one package, with two base-config fragments. I do not think it will be possible to get all packages configurable with debconf in a reasonable time frame, so I believe we need to keep both ways of configuration.
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Κυρ 27 Ιουν 2004 09:21, Christian Perrier wrote: > Quoting Petter Reinholdtsen ([EMAIL PROTECTED]): > > [Christian Perrier] > > > > > As a way to circumvent this, I propose that we pre-seed > > > xserver-xfree86 settings about keyboard, mostly > > > "xserver-xfree86/config/inputdevice/keyboard/model" and > > > "xserver-xfree86/config/inputdevice/keyboard/layout" with > > > appropriate values, depending on the chosen keyboard layout > > > during the kbd-chooser step in d-i. > > > > Konstantinos Margaritis is working on packaging the debian-edu > > tool to do this. It is currently called > > locale-config-skolelinux, but will probably be renamed before it > > is uploaded. > > > > The package is available from > > ftp://ftp.skolelinux.no/skolelinux/dists/woody/local/binary- > >i386/non-official/>. > > Ah, this is fine, then. Konstantinos can you give details about > this? Ok, I started tidying up the package, basically it doesn't really need much tidying up (Petter has done a good job :-), but here are my comments: * package has been renamed to localization-config as discussed with Petter in debconf. * of all the conffiles.d, we only need xfree86-kbd, and probably kde(but updated for kde 3) * ispell needs to be updated to new versions which are (I think) debconf base * maybe add gnome configurations (but I have very little gnome experience) * we don't really need locale and timezone (as these are handled by debian-installer) * we also don't need to configure links and ktouch (as these are optional packages and not debconf based), ltsp-xfree86-kbd (as it's skolelinux specific) and opera6 (not available in debian itself) * If we decide to update kde as well, then we have to either: a) make kde configurable by debconf, or b) split the package into 2 subpackages, one to be called before X configuration (thus pre-seeding debconf values) and one after (finishing up KDE configuration). I don't really like any of these solutions, but I would go for one I'd go for the first. As it is, KDE 3 does quite a good job of detecting the default locale after a first installation (there is only a problem with the default X dpi and fonts resolution), but I only tested this for Greek. So, perhaps we could just skip KDE configuring as well. So that leaves us with just XFree86 and (possibly) ispell preseeding. Thoughts? Konstantinos
Re: Pre-seeding XFree settings for keyboard in Debian Installer
On Κυρ 27 Ιουν 2004 09:21, Christian Perrier wrote: > Quoting Petter Reinholdtsen ([EMAIL PROTECTED]): > > [Christian Perrier] > > > > > As a way to circumvent this, I propose that we pre-seed > > > xserver-xfree86 settings about keyboard, mostly > > > "xserver-xfree86/config/inputdevice/keyboard/model" and > > > "xserver-xfree86/config/inputdevice/keyboard/layout" with > > > appropriate values, depending on the chosen keyboard layout > > > during the kbd-chooser step in d-i. > > > > Konstantinos Margaritis is working on packaging the debian-edu > > tool to do this. It is currently called > > locale-config-skolelinux, but will probably be renamed before it > > is uploaded. > > > > The package is available from > > ftp://ftp.skolelinux.no/skolelinux/dists/woody/local/binary- > >i386/non-official/>. > > Ah, this is fine, then. Konstantinos can you give details about > this? Yes, sure. Sorry for being so quiet these days, I'm relocating to another city and things are terribly busy nowadays! Well, I can only say that I need to clean it up (not that it is not clean, but perhaps add a few more options, etc) and I'll probably upload it during the coming week (since I've finished all my projects and all my teaching :-) I'll keep you posted about it, and please accept my apologies for this delay. Konstantinos
Re: Pre-seeding XFree settings for keyboard in Debian Installer
Quoting Petter Reinholdtsen ([EMAIL PROTECTED]): > [Christian Perrier] > > As a way to circumvent this, I propose that we pre-seed > > xserver-xfree86 settings about keyboard, mostly > > "xserver-xfree86/config/inputdevice/keyboard/model" and > > "xserver-xfree86/config/inputdevice/keyboard/layout" with appropriate > > values, depending on the chosen keyboard layout during the kbd-chooser > > step in d-i. > > Konstantinos Margaritis is working on packaging the debian-edu tool to > do this. It is currently called locale-config-skolelinux, but will > probably be renamed before it is uploaded. > > The package is available from > ftp://ftp.skolelinux.no/skolelinux/dists/woody/local/binary-i386/non-official/>. Ah, this is fine, then. Konstantinos can you give details about this? --
Re: Pre-seeding XFree settings for keyboard in Debian Installer
[Christian Perrier] > As a way to circumvent this, I propose that we pre-seed > xserver-xfree86 settings about keyboard, mostly > "xserver-xfree86/config/inputdevice/keyboard/model" and > "xserver-xfree86/config/inputdevice/keyboard/layout" with appropriate > values, depending on the chosen keyboard layout during the kbd-chooser > step in d-i. Konstantinos Margaritis is working on packaging the debian-edu tool to do this. It is currently called locale-config-skolelinux, but will probably be renamed before it is uploaded. The package is available from ftp://ftp.skolelinux.no/skolelinux/dists/woody/local/binary-i386/non-official/>.