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

Re: RFS: tenshi (updated)

On Fri, Nov 26, 2010 at 20:37, Ansgar Burchardt <ansgar@43-1.org> wrote:
> Ignace Mouzannar <mouzannar@gmail.com> writes:
>> On Sun, Nov 21, 2010 at 16:26, Ansgar Burchardt <ansgar@43-1.org> wrote:
>>> Ignace Mouzannar <mouzannar@gmail.com> writes:
>>>> |   * debian/postinst:
>>>> |     - Changed tenshi user home directory from /var/run/tenshi to
>>>> |       /var/lib/tenshi as files in /var/run are cleared at boot time.
>>>> |       This made the package FTBS. Thank you Lucas Nussbaum for spotting this
>>>> |       issue.
>>>> [1] http://people.debian.org/~lucas/logs/2010/11/17/tenshi.log
>>> You use a different home directory when the user is created by the
>>> postinst script, but what happens when the user already exists
>>> (e.g. when upgrading the package from 0.11-1)?
>> I went to fast on the correction there. I have added a test that
>> changes the home directory of an existent tenshi user.
> Upgrading from 0.11-1 fails:
>  Updating tenshi user's home directory ...
>  usermod: user tenshi is currently logged in

Oops, my daemon must have not been running when I tested my package.
Sorry about that.

The error was due to the -R flag that was passed to dh_installinit in
the past release: it prevented the upgrade process from stopping the
daemon before the new installation started.

I have corrected this behavior by adding a preinst script that stop
the daemon. But I'm not sure this is the best way to go. Is it?

Here are the relevant parts of the new changelog:
| tenshi (0.11-2) unstable; urgency=low
|   * debian/control:
|    (...)
|     - Set debhelper dependency back to (>= 7) as dh_overrides are not used by
|       debian/rules anymore.
|   * debian/rules:
|     - Removed the dh_installinit override, in order to stop the tenshi script
|       before upgrading the package. This will be applicable during the next
|       upgrade.
|   * debian/preinst:
|     - Added this pre-installation script in order to stop the tenshi daemon
|       before starting the upgrade to the current release. This had to be
|       done as the -R flag was passed to dh_installinit in previous release.

I have upload the new version on m.d.n [1].

Thank you Ansgar for taking the time to help me out.

 Ignace M

[1] - URL: http://mentors.debian.net/debian/pool/main/t/tenshi
- Source repository: deb-src http://mentors.debian.net/debian unstable
main contrib non-free
- dget http://mentors.debian.net/debian/pool/main/t/tenshi/tenshi_0.11-2.dsc

Reply to: