Hi Niels,

I upgraded to Ubuntu 24.04 and now have debhelper 13.14.1ubuntu1.
Once executed the debuild nothing was generated.
When executed the dh_installsystemduser manually also nothing was generated.
>From it's sources I found that it looks for some dependency and I added to
the /debian/control:

    Depends: ${misc:Depends}

Now this helped and two install/uninstall scripts were generated
/debian/sshtunnel.postinst.debhelper
/debian/sshtunnel.postrm.debhelper

I manually included the scripts to /debian/postinst and /debian/postrm and
built the deb.
It was installed successfully but didn't start the service.
I started manually. During uninstall it has not been stopped. There is no
prerm script that will do that.

So the issues are:
1. The debhelper did not execute the dh_installsystemduser. I guess I must
add it manually to /debian/rules
2. The generated scripts do not start the service after installation.
3. Missing prerm script to stop the service.
4. Surprising need for for ${misc:Depends}

So far I will anyway continue to use the manual scripts because I wish to
support old distros.
Anyway I wanted to have good and proper "official" scripts to install the
user service.

You can play with my simple package here:
http://github.com/yurt-page/sshtunnel

It can be a good sample and test ground.

Best regards and thank you for your work,
Sergey


On Sat, Mar 16, 2024 at 7:50 PM Niels Thykier <ni...@thykier.net> wrote:

> Control: tags -1 moreinfo
>
> Niels Thykier:
> > Sergey Ponomarev:
> >> debhelper package version: 13.11.6ubuntu1
> >> Ubuntu 23.10 Mantic
> >>
> >> Is there any plan for support of user services?
> >> The user service is complicated by itself because it differs by commands
> >> from system services.
> >> That's why I also asked to make a review of mine scripts to have at
> least
> >> one right example of this.
> >>
> >>
> >> [...]
> >
> > User services are handled by `dh_installsystemduser` (not
> > `dh_installsystemd`) and that command used `/usr/lib` since the
> > beginning as far as I can tell. That command was added in 10.9.1 and
> > should be in the default sequence.
> >
> > Best regards,
> > Niels
> >
> >
>
> Hi Sergey,
>
> I hope the above solved your issues.  If so, I will close this bug as
> resolved. :)
>
> Best regards,
> Niels
>
>

Reply via email to