The problem with maintainer scripts doing it is as below:

1. User runs apt-get update && apt-get upgrade to upgrade to squeeze (this is likely to remove calendarserver)
2. User reboots the system. (this deletes the files)
3. Now user installs the calendarserver. But the files are already deleted.

So in the above scenario there is no way we can avoid the data loss. Anyway, for all the other scenarios (direct upgrading OR removing the package first and then installing without rebooting), the below logic should work:

1. We assume that the user has not changed the DataRoot directory. Even if he has, there should not be any problem implementing the below steps. 2. In postinst script, for each [calendaruserproxy.sqlite, resourceinfo.sqlite, tasks] - We first check if it exists in /var/run/caldavd. If it does not exist, nothing is done. - We then check if it does not exist in /var/lib/caldavd. If it does exist, then we display a notice to the user that the file is not being moved.
        - We now move the file/directory.
3. Apart from this we can also include this in Debian.NEWS.

Kindly confirm if this solution is acceptable.


On Friday 28 January 2011 12:54 AM, Julien Cristau wrote:
On Thu, Jan 27, 2011 at 22:39:26 +0530, Rahul Amaram wrote:

1. Roll out a security update for calendarserver 1.2 (lenny) which
changes the DataRoot to /var/lib/caldavd and moves the files (if
they are existing) from /var/run/caldavd to /var/lib/caldavd.
No.  That's not a security issue.

2. In calendarserver 2.4 (squeeze), change the DataRoot to /var/lib/caldavd.

The maintainer scripts need to move the files on upgrade.

Cheers,
Julien



--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to