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

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.


On Monday 27 December 2010 07:12 PM, Neil Williams wrote:
On Mon, 27 Dec 2010 18:27:10 +0530
Rahul Amaram<amaramrahul@users.sourceforge.net>  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.

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
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.

Reply to: