using perl in preinst script
Hi, I am the maintainer for calendarserver. I have a query reg. preinst script. I need to perform some action during preinst before the upgrade of calendarserver happens from 1.x to 2.x. For this, I wrote the necessary code in python in preinst script. But this was rejected into being accepted into squeeze as writing python code or calling the python interpreter in preinst is not permitted. As the upgrade code has to parse .plist files, writing shell script would be a very difficult task. So I would like to know what are my other options? Could I write it in perl? Also is there any estimate date on the release of squeeze? Looking forward to a response. Thanks and Regards, Rahul. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/a7a5496e2a2b09800fc6f6bc3a152...@localhost
Re: using perl in preinst script
Hi, Thanks a lot for the prompt responses. I am a new maintainer (sponsored) and so not aware of some issues. I really appreciate all the help given in the list. Continuing with my previous mail, this is what the preinst script does: - Read the current caldavd.plist configuration file if it exists - If NSS directory service is configured in caldavd.plist, perform some action on caldavd data directories for those NSS users and groups And this has to be done before the upgraded calendarserver runs for the first time. Hence running it in postinst is not an option. As I can see, my only option seems to be using perl-base. But that still leaves me with a difficulty because to use the Plist parser module I will have to include many other modules. Not sure how to handle this. This is something I'll have to figure out. Anyway, keeping that apart, is there any chance that the upgraded calendarserver could be pushed into squeeze if I make those changes now? The reason being I am extremely occupied with other tasks and if this package cannot be pushed into squeeze I'd rather work on it after a while. Thanks, Rahul. On Mon, 27 Dec 2010 12:45:26 +, Neil Williams wrote: > On Mon, 27 Dec 2010 13:19:57 +0100 > Tollef Fog Heen wrote: > >> ]] Rahul Amaram >> >> >> | I am the maintainer for calendarserver. I have a query reg. preinst >> | script. I need to perform some action during preinst before the >> | upgrade of calendarserver happens from 1.x to 2.x. For this, I >> | wrote the necessary code in python in preinst script. But this was >> | rejected into being accepted into squeeze as writing python code or >> | calling the python interpreter in preinst is not permitted. >> >> As long as you have the necessary Pre-Depends, that should be fine, >> I'd imagine. (You have to discuss adding the pre-depends on >> debian-devel, but as long as you have a good reason to, I don't see a >> problem with that.) > > See #608099 for rejection of the python preinst - as python is not > essential, a Pre-Depends on python isn't workable. Good reason or no, > there is a problem with a python preinst. Perl is a suitable > alternative. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/8449e9fb844716f6cbbdd39b27f57...@localhost
Re: using perl in preinst script
Hi Neil, Thanks for the response. I didn't intend to work on this update as per my leisure. I greatly admire the Debian release team for the effort they put in, in trying to make Debian a great experience to the end users. As I've already told you, I am new and therefore didn't know of the deep-freeze of Squeeze. Or else I would have definitely worked on it earlier itself. Anyway, coming back to the solution. This is what I plan to do. Kindly provide any necessary feedback. 1. Stop the server in preinst and if necessary copy the current configuration file to a temporary location. 2. In postinst, write python code to check if NSS directory service is being used (by parsing the configuration file) and if so take the appropriate action. Once this is done, delete the temporary copy of configuration file. Also I believe for this, python needn't be added to Pre-Depends but only to Depends. Pushing this script would make upgrade of calendarserver data directories seamless to end users who use NSS directory backend. This is the reason why I am so keen on pushing in this change so that the upgrade will cause the least inconvenience to end users. If the above solution is acceptable, then I will work on it right away. If not, then I'll consider removing python from the preinst script altogether as rewriting it in perl/shell is a really huge task for me. Cheers, Rahul. On Monday 27 December 2010 07:12 PM, Neil Williams wrote: On Mon, 27 Dec 2010 18:27:10 +0530 Rahul Amaram wrote: - Read the current caldavd.plist configuration file if it exists - If NSS directory service is configured in caldavd.plist, ... then stop processing in the preinst at this point and set the config to not use NSS until configured. perform some action on caldavd data directories for those NSS users and groups ... so do this in postinst then restart with the updated config. And this has to be done before the upgraded calendarserver runs for the first time. Stop the server in the preinst (if not already stopped in the prerm of the old version) and don't start it until the postinst has finished doing the changes. Don't expect the server to be running between running the preinst and the postinst. Servers should be stopped before unpacking and restarted afterwards, in the postinst and after any config changes have been implemented. Hence running it in postinst is not an option. Actually, it probably is the only option. If necessary, consider changing the server so that it can run without needing this change. More commonly, ensure it is stopped in preinst and not started until after the postinst has finished. Anyway, keeping that apart, is there any chance that the upgraded calendarserver could be pushed into squeeze if I make those changes now? No. Squeeze is already in deep freeze. Only RC bug fixes are going to be accepted. It is too late to get non-RC bug fixes into Squeeze and the version in testing is not RC buggy (the version in unstable is potentially RC buggy). You'll just have to fix it in unstable and backport later. The reason being I am extremely occupied with other tasks It's too late - Debian releases take long enough as it is without waiting for everyone to have free time for their pet fixes to get in. and if this package cannot be pushed into squeeze I'd rather work on it after a while. You'll need to work on the package in unstable sooner rather than later. The version is unstable is buggy. Sooner or later you'll end up with a bug report that the preinst failed because python is not guaranteed to be configured when the preinst starts and that bug report would probably be RC. If you can't work on that now, pull the python preinst change out of the version in unstable and leave NSS configuration to the admin. Put something into README.Debian or News. Whatever you decide, the version in unstable does need to be fixed. You cannot expect a python preinst to actually work. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d18bfa0.2040...@users.sourceforge.net
Re: using perl in preinst script
Thanks Philips. I've subscribed to the debian-devel-announce list. Is it also necessary that I subscribe to debian-announce i.e. will posts to debian-announce be automatically marked to debian-devel-annouce? On Monday 27 December 2010 10:11 PM, Philipp Kern wrote: On 2010-12-27, Rahul Amaram wrote: Thanks for the response. I didn't intend to work on this update as per my leisure. I greatly admire the Debian release team for the effort they put in, in trying to make Debian a great experience to the end users. As I've already told you, I am new and therefore didn't know of the deep-freeze of Squeeze. Or else I would have definitely worked on it earlier itself. I'd advise you to read the mailing list debian-devel-announce, which is mandatory to read for all Debian Developers and should thus also be read by contributors. That's also the place where such status changes /:x updates are published. Kind regards Philipp Kern -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d18c94d.8090...@users.sourceforge.net
Re: using perl in preinst script
The package depends on python anyways. My only query is as I am using python in postinst script, is it sufficient to mention it as part of Depends or should it still be mentioned in Pre-Depends? Apart from that, as per the response given by Neil and also my sponsorer, I think the below logic should do fine for the upgrade script. Thanks, Rahul. On Monday 27 December 2010 10:16 PM, Aron Xu wrote: On Tue, Dec 28, 2010 at 00:32, Rahul Amaram wrote: Hi Neil, Thanks for the response. I didn't intend to work on this update as per my leisure. I greatly admire the Debian release team for the effort they put in, in trying to make Debian a great experience to the end users. As I've already told you, I am new and therefore didn't know of the deep-freeze of Squeeze. Or else I would have definitely worked on it earlier itself. Anyway, coming back to the solution. This is what I plan to do. Kindly provide any necessary feedback. 1. Stop the server in preinst and if necessary copy the current configuration file to a temporary location. 2. In postinst, write python code to check if NSS directory service is being used (by parsing the configuration file) and if so take the appropriate action. Once this is done, delete the temporary copy of configuration file. Also I believe for this, python needn't be added to Pre-Depends but only to Depends. I still think adding python to Depends only because a maintainer script needs it is costing too much, if the application itself doesn't need python at all. -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d18ca41.2010...@users.sourceforge.net
Bug#675018: ITP: python-pycalendar -- iCalendar/vCard Library
Package: wnpp Severity: wishlist X-Debbugs-CC: debian-devel@lists.debian.org --- Please fill out the fields below. --- Package name: python-pycalendar Version: 0.2~svn188 Upstream Author: Cyrus Daboo URL: http://svn.mulberrymail.com/repos/PyCalendar/ License: Apache 2.0 Description: iCalendar/vCard Library This package is needed for Darwin Calendarserver 3.2.0 (currently in process of packaging). -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4fc48f48.6080...@users.sourceforge.net
Bug#801856: ITP: twextpy -- Python module consisting of extensions to the Twisted Framework
Package: wnpp Severity: wishlist X-Debbugs-CC: debian-devel@lists.debian.org --- Please fill out the fields below. --- Package name: twextpy Version: 0.1.b2.dev15059 Upstream Author: URL: http://trac.calendarserver.org/wiki/twext License: Apache-2.0 Description: This is a Python module consisting of extensions to the Twisted Framework and is mainly used by calendarserver. -- http://rahul.amaram.name
Bug#801857: ITP: twextpy -- Python module consisting of extensions to the Twisted Framework
Package: wnpp Severity: wishlist X-Debbugs-CC: debian-devel@lists.debian.org --- Please fill out the fields below. --- Package name: twextpy Version: 0.1.b2.dev15059 Upstream Author: Apple Inc. URL: http://trac.calendarserver.org/wiki/twext License: Apache-2.0 Description: This is a Python module consisting of extensions to the Twisted Framework and is mainly used by calendarserver
Bug#801859: ITP: pg8000 -- Pure-Python PostgreSQL Driver
Package: wnpp Severity: wishlist X-Debbugs-CC: debian-devel@lists.debian.org --- Please fill out the fields below. --- Package name: pg8000 Version: 1.10.2 Upstream Author: Mathieu Fenniak URL: https://github.com/mfenniak/pg8000 License: BSD Description: pg8000 is a Pure-Python interface to the PostgreSQL database engine. It is one of many PostgreSQL interfaces for the Python programming language. pg8000 is somewhat distinctive in that it is written entirely in Python and does not rely on any external libraries (such as a compiled python module, or PostgreSQL's libpq library). pg8000 supports the standard Python DB-API version 2.0