Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-16 Thread Seyeong Kim
Yes. Im considering all but leave them last chance.

ok  I’ll have discussion with team based on this thread

Thanks :)

On 16 May 2018, 8:01 PM +0900, Niels Thykier , wrote:
>
>
> As I understand it, if we do that we might as well remove the #TMPFILES#
> marker in the shell script (as it would be simpler and probably faster
> than implementing the same code in shell). But then we are back to the
> place that Michael recom


Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-16 Thread Niels Thykier
Seyeong Kim:
> Hello
> 
> I noticed that tmpfiles are built based on systemd source directory not local 
> machine /
> 
> e.g debian/systemd/usr/lib/tmpfiles.d/x11.conf
> 
> so 00rsyslog.conf file ( from rsyslog pkg, in /usr/lib/tmpfiles.d/ ) is not 
> there
> 
> I checked this with dh_installinit —no-start
> 
> I understand override feature(actually i misunderstood it )
> 
> no way to do this based on installed tmpfiles?( or not recommended ? )
> 

As I understand it, if we do that we might as well remove the #TMPFILES#
marker in the shell script (as it would be simpler and probably faster
than implementing the same code in shell).  But then we are back to the
place that Michael recommended us to avoid.

Have you considered the options that Michael recommended for Ubuntu?
E.g. correcting the vars.conf in the systemd package.  If so, what is
holding you back from applying that change?

Thanks,
~Niels



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-16 Thread Seyeong Kim
Hello

I noticed that tmpfiles are built based on systemd source directory not local 
machine /

e.g debian/systemd/usr/lib/tmpfiles.d/x11.conf

so 00rsyslog.conf file ( from rsyslog pkg, in /usr/lib/tmpfiles.d/ ) is not 
there

I checked this with dh_installinit —no-start

I understand override feature(actually i misunderstood it )

no way to do this based on installed tmpfiles?( or not recommended ? )

## dh_installinit

        if (!$dh{NOSCRIPTS}) {
                # Include postinst-init-tmpfiles if the package ships any files
                # in /usr/lib/tmpfiles.d or /etc/tmpfiles.d
                my @tmpfiles;
                find({
                        wanted => sub {
                                my $name = $File::Find::name;
                                return unless -f $name;
                                print "Seyeong1 : ".$name."\n";
                                $name =~ s/^\Q$tmp\E//g;
                                print "Seyeong2 : ".$name."\n";
                                if ($name =~ m,^/usr/lib/tmpfiles\.d/, ||
                                        $name =~ m,^/etc/tmpfiles\.d/,) {
                                        print "Seyeong3 : ".$name."\n";
                                        push @tmpfiles, $name;
                                }
                        },
                        no_chdir => 1,
                }, $tmp);
                if (@tmpfiles > 0) {
                        autoscript($package,"postinst", 
"postinst-init-tmpfiles",
                                "s,#TMPFILES#," . join(" ", sort 
@tmpfiles).",g");
                }
        }


generated postinst.debhelper
echo part is what i added

# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = 
"abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
        # In case this system is running systemd, we need to ensure that all
        # necessary tmpfiles (if any) are created before starting.
        if [ -d /run/systemd/system ] ; then
                echo /usr/lib/tmpfiles.d/debian.conf 
/usr/lib/tmpfiles.d/home.conf /usr/lib/tmpfiles.d/journal-nocow.conf 
/usr/lib/tmpfiles.d/legacy.conf /usr/lib/tmpfiles.d/systemd-nologin.conf 
/usr/lib/tmpfiles.d/systemd.conf /usr/lib/tmpfiles.d/tmp.conf 
/usr/lib/tmpfiles.d/var.conf /usr/lib/tmpfiles.d/x11.conf
                systemd-tmpfiles --create /usr/lib/tmpfiles.d/debian.conf 
/usr/lib/tmpfiles.d/home.conf /usr/lib/tmpfiles.d/journal-nocow.conf 
/usr/lib/tmpfiles.d/legacy.conf /usr/lib/tmpfiles.d/systemd-nologin.conf 
/usr/lib/tmpfiles.d/systemd.conf /usr/lib/tmpfiles.d/tmp.conf 
/usr/lib/tmpfiles.d/var.conf /usr/lib/tmpfiles.d/x11.conf >/dev/null || true
        fi
fi
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile 
/etc/bash_completion.d/systemctl-bash-completion.sh 204-1~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile 
/etc/bash_completion.d/systemd-bash-completion.sh 204-1~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper mv_conffile /etc/systemd/systemd-logind.conf 
/etc/systemd/logind.conf 204-1~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper mv_conffile /etc/systemd/systemd-journald.conf 
/etc/systemd/journald.conf 204-1~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile 
/etc/dbus-1/system.d/org.freedesktop.machine1.conf 228-5~ -- "$@"
# End automatically added section
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile /etc/X11/xinit/xinitrc.d/50-systemd-user.sh 
228-3~ -- "$@"
# End automatically added section





On 12 May 2018, 2:41 AM +0900, Niels Thykier , wrote:
> Seyeong Kim:
> > Hello
> >
> > I tested them but symptom is still there
> >
> > so I put “print “#TMPFILES#” on autoscripts/postinst-init-tmpfiles like 
> > below
> >
> > ###
> > if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
> > # In case this system is running systemd, we need to ensure that all
> > # necessary tmpfiles (if any) are created before starting.
> > if [ -d /run/systemd/system ] ; then
> >                 print "#TMPFILES#"
> > systemd-tmpfiles --create #TMPFILES# >/dev/null || true
> > fi
> > fi
> > ###
> >
> > and built systemd with this deb helper
> >
> > When installing systemd after build, i got below string ( installed 
> > 00rsyslog.conf in /usr/lib/tmpfiles.d/ and copied to /etc/tmpfiles.d/ )
> >
> > ###
> > Error: no such file "debian.conf home.conf journal-nocow.conf legacy.conf 
> > systemd-nologin.conf systemd.conf tmp.conf var.conf x11.conf"
> >
> > ###
> >
>
> Can you show me the full postinst generated with your patched version?
> AFAICT, neither dh_installinit nor dh_installsystem 

Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-11 Thread Niels Thykier
Seyeong Kim:
> Hello
> 
> I tested them but symptom is still there
> 
> so I put “print “#TMPFILES#” on autoscripts/postinst-init-tmpfiles like below
> 
> ###
> if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
> # In case this system is running systemd, we need to ensure that all
> # necessary tmpfiles (if any) are created before starting.
> if [ -d /run/systemd/system ] ; then
>                 print "#TMPFILES#"
> systemd-tmpfiles --create #TMPFILES# >/dev/null || true
> fi
> fi
> ###
> 
> and built systemd with this deb helper
> 
> When installing systemd after build, i got below string ( installed 
> 00rsyslog.conf in /usr/lib/tmpfiles.d/ and copied to /etc/tmpfiles.d/ )
> 
> ###
> Error: no such file "debian.conf home.conf journal-nocow.conf legacy.conf 
> systemd-nologin.conf systemd.conf tmp.conf var.conf x11.conf"
> 
> ###
> 

Can you show me the full postinst generated with your patched version?
AFAICT, neither dh_installinit nor dh_installsystem should pass those
file names as a single argument.  When I tested locally, the shell
snippet seemed to correctly pass each file as separate arguments.

> I wanted to see TMPFILES list and there is no 00rsyslog.conf so.. 
> 00rsyslog.conf can't override var.conf
> 

The override support that the patch adds is that
/etc/tmpfiles.d/foo.conf can now override /usr/lib/tmpfiles.d/foo.conf
(previously, it could not).

There was nothing to support "foo.conf" overriding "bar.conf" (or
"00rsyslog.conf" overriding "var.conf").

> maybe this need to be analyzed more?
> 
> Thanks
> 
> 
> [...]

For your concrete issue, you will have to use one of Michael's
recommendations listed in:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894510#37, OR

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894510#42

Sorry, but that is the best I can offer you without diverting for the
recommendations from the systemd maintainers.

~Niels



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-11 Thread Seyeong Kim
Hello

I tested them but symptom is still there

so I put “print “#TMPFILES#” on autoscripts/postinst-init-tmpfiles like below

###
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
# In case this system is running systemd, we need to ensure that all
# necessary tmpfiles (if any) are created before starting.
if [ -d /run/systemd/system ] ; then
                print "#TMPFILES#"
systemd-tmpfiles --create #TMPFILES# >/dev/null || true
fi
fi
###

and built systemd with this deb helper

When installing systemd after build, i got below string ( installed 
00rsyslog.conf in /usr/lib/tmpfiles.d/ and copied to /etc/tmpfiles.d/ )

###
Error: no such file "debian.conf home.conf journal-nocow.conf legacy.conf 
systemd-nologin.conf systemd.conf tmp.conf var.conf x11.conf"

###

I wanted to see TMPFILES list and there is no 00rsyslog.conf so.. 
00rsyslog.conf can't override var.conf

maybe this need to be analyzed more?

Thanks


On 11 May 2018, 4:30 PM +0900, Seyeong Kim , wrote:
> exactly what i wanted.
>
> Thanks all!!
>
> On 11 May 2018, 4:24 PM +0900, Niels Thykier , wrote:
> > Seyeong Kim:
> > > Thanks a lot
> > >
> > > Can i get git repo url you mentioned?
> > >
> > > [...]
> > >
> >
> > Certainly. The repo is at:
> >
> > https://salsa.debian.org/debian/debhelper/
> >
> > The commit is at:
> >
> > https://salsa.debian.org/debian/debhelper/commit/d24b1734a7a8b1069426fbb8ce80328959560ea9
> >
> > In case you want to cherry-pick it.
> >
> >
> > Thanks,
> > ~Niels


Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-11 Thread Niels Thykier
Seyeong Kim:
> Thanks a lot
> 
> Can i get git repo url you mentioned?
> 
> [...]
> 

Certainly.  The repo is at:

https://salsa.debian.org/debian/debhelper/

The commit is at:

https://salsa.debian.org/debian/debhelper/commit/d24b1734a7a8b1069426fbb8ce80328959560ea9

In case you want to cherry-pick it.


Thanks,
~Niels



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-11 Thread Seyeong Kim
exactly what i wanted.

Thanks all!!

On 11 May 2018, 4:24 PM +0900, Niels Thykier , wrote:
> Seyeong Kim:
> > Thanks a lot
> >
> > Can i get git repo url you mentioned?
> >
> > [...]
> >
>
> Certainly. The repo is at:
>
> https://salsa.debian.org/debian/debhelper/
>
> The commit is at:
>
> https://salsa.debian.org/debian/debhelper/commit/d24b1734a7a8b1069426fbb8ce80328959560ea9
>
> In case you want to cherry-pick it.
>
>
> Thanks,
> ~Niels


Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-11 Thread Seyeong Kim
Thanks a lot

Can i get git repo url you mentioned?

On 11 May 2018, 4:09 PM +0900, Niels Thykier , wrote:
> Michael Biebl:
> > Am 04.05.2018 um 13:47 schrieb Michael Biebl:
> > > Dropping #TMPFILES# means, systemd-tmpfiles will act on all tmpfiles.
> > > This would be a bit like if upgrading rsyslog would restart all system
> > > services (including rsyslog). That doesn't feel right.
> > > So I don't think dropping #TMPFILES# is the right approach.
> >
> > [...]
> >
> > One valid use cases this touches though is, that overriding tmpfiles in
> > /etc/tmpfiles.d should be supported. I.e. if there is a
> > /usr/lib/tmpfiles.d/dbus.conf and an admin wants to tweak that by
> > shipping a /etc/tmpfiles.d/dbus.conf, I don't think the package should
> > override that.
> > Afaics, this could easily be fixed by only using the name of the .conf
> > file, not the full path, so dh_installsystemd/dh_installinit would have
> > to generate
> > systemd-tmpfiles --create dbus.conf
> > instead of
> > systemd-tmpfiles --create /usr/lib/tmpfiles.d/dbus.conf
> >
> > Felipe et al, what do you think?
> >
> > (CC pkg-systemd-maintainers to have more eyes on this)
> >
> > Michael
> >
>
> Hi,
>
> After a short chat with Felipe yesterday, I have updated the debhelper
> tooling (in git master) to generate "systemd-tmpfiles --create
> dbus.conf" instead of "systemd-tmpfiles --create
> /usr/lib/tmpfiles.d/dbus.conf". This solves one half of the issue
> (namely that package provided tmpfiles configs could not be overridden
> at all).
>
> On the other part of the issue, I will follow Michael's recommendation
> of keeping #TMPFILES# in the postinst. As I understand it, this
> effectively makes that part "wontfix".
>
> Thanks,
> ~Niels


Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-11 Thread Niels Thykier
Michael Biebl:
> Am 04.05.2018 um 13:47 schrieb Michael Biebl:
>> Dropping #TMPFILES# means, systemd-tmpfiles will act on all tmpfiles.
>> This would be a bit like if upgrading rsyslog would restart all system
>> services (including rsyslog). That doesn't feel right.
>> So I don't think dropping #TMPFILES# is the right approach.
> 
> [...]
> 
> One valid use cases this touches though is, that overriding tmpfiles in
> /etc/tmpfiles.d should be supported. I.e. if there is a
> /usr/lib/tmpfiles.d/dbus.conf and an admin wants to tweak that by
> shipping a /etc/tmpfiles.d/dbus.conf, I don't think the package should
> override that.
> Afaics, this could easily be fixed by only using the name of the .conf
> file, not the full path, so dh_installsystemd/dh_installinit would have
> to generate
> systemd-tmpfiles --create dbus.conf
> instead of
> systemd-tmpfiles --create /usr/lib/tmpfiles.d/dbus.conf
> 
> Felipe et al, what do you think?
> 
> (CC pkg-systemd-maintainers to have more eyes on this)
> 
> Michael
> 

Hi,

After a short chat with Felipe yesterday, I have updated the debhelper
tooling (in git master) to generate "systemd-tmpfiles --create
dbus.conf" instead of "systemd-tmpfiles --create
/usr/lib/tmpfiles.d/dbus.conf".  This solves one half of the issue
(namely that package provided tmpfiles configs could not be overridden
at all).

On the other part of the issue, I will follow Michael's recommendation
of keeping #TMPFILES# in the postinst.  As I understand it, this
effectively makes that part "wontfix".

Thanks,
~Niels



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-04 Thread Michael Biebl
Am 04.05.2018 um 13:47 schrieb Michael Biebl:
> Dropping #TMPFILES# means, systemd-tmpfiles will act on all tmpfiles.
> This would be a bit like if upgrading rsyslog would restart all system
> services (including rsyslog). That doesn't feel right.
> So I don't think dropping #TMPFILES# is the right approach.

To iterate on that:
We ship quite a few tmpfile configs and during a (dist-)upgrade
systemd-tmpfiles will be called multiple times. It seems wasteful, if
systemd-tmpfile would act on all files over and over again.

More importantly though, not all resources, as required in the tmpfile
might be available when such a systemd-tmpfiles call is made. There is a
time window between the package being unpacked and the tmpfile existing
on disk and the package postinst being run, which e.g. needs to setup a
user that is referenced in the tmpfile.

Admittedly, this is less of an issue for tmpfiles then for service files.

One valid use cases this touches though is, that overriding tmpfiles in
/etc/tmpfiles.d should be supported. I.e. if there is a
/usr/lib/tmpfiles.d/dbus.conf and an admin wants to tweak that by
shipping a /etc/tmpfiles.d/dbus.conf, I don't think the package should
override that.
Afaics, this could easily be fixed by only using the name of the .conf
file, not the full path, so dh_installsystemd/dh_installinit would have
to generate
systemd-tmpfiles --create dbus.conf
instead of
systemd-tmpfiles --create /usr/lib/tmpfiles.d/dbus.conf

Felipe et al, what do you think?

(CC pkg-systemd-maintainers to have more eyes on this)

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-04 Thread Michael Biebl
Am 04.05.2018 um 13:47 schrieb Michael Biebl:
> If I understand you correctly, your issue is the following:
> The systemd package ships /usr/lib/tmpfiles.d/var.conf containing
> d /var/log 0755 - - -
> The rsyslog package ships /usr/lib/tmpfiles.d/00rsyslog.conf containing
> z /var/log 0775 root syslog -

..

> Dunno what the best solution is for your specific case.
> Maybe diverting /usr/lib/tmpfiles.d/var.conf in the rsyslog package?

Or you patch /usr/lib/tmpfiles.d/var.conf from the systemd package to
already include the "correct" definition for /var/log.

That said, I dunno, if rsyslog is the only supported syslog daemon in
Ubuntu and if other syslog daemons in Ubuntu have other, conflicting
requirements in that regard.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-04 Thread Michael Biebl
On Sat, 31 Mar 2018 08:58:21 -0700 Seyeong Kim
 wrote:
> Package: debhelper
> Version: 9.20160115ubuntu3
> Severity: normal
> Tags: d-i
> 
> In autoscripts/postinst-init-tmpfiles, There is TMPFILE containing conf in 
> systemd pkg only.
> Then if there is 00rsyslog.conf from rsyslog pkg. and installing or upgrading 
> systemd
> 
> /var/log's permission is 755(which is default) not 775(which is in 
> 00rsyslog.conf)
> overriding doesn't work when upgrading.
> 
> Please refer to below LP
> ubuntu lp bug : https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1748147
> 
> removing TMPFILE from autoscripts/postinst-init-tmpfiles solves this issue.
> e.g. change like below
> systemd-tmpfiles --create #TMPFILES# >/dev/null || true
> to
> systemd-tmpfiles --create >/dev/null || true

Dropping #TMPFILES# means, systemd-tmpfiles will act on all tmpfiles.
This would be a bit like if upgrading rsyslog would restart all system
services (including rsyslog). That doesn't feel right.
So I don't think dropping #TMPFILES# is the right approach.

If I understand you correctly, your issue is the following:
The systemd package ships /usr/lib/tmpfiles.d/var.conf containing
d /var/log 0755 - - -
The rsyslog package ships /usr/lib/tmpfiles.d/00rsyslog.conf containing
z /var/log 0775 root syslog -

So you have conflicting definitions for /var/log and you rely on the
systemd-tmpfiles to always process all .conf files and you rely on the
sort-order to ensure that the definition in var.conf is skipped?

systemd.postinst has a call
systemd-tmpfiles --create ... /usr/lib/tmpfiles.d/var.conf

That means if the postinst of systemd is processed after rsyslog or only
the systemd package is upgraded, your /var/log/ permissions are reset to
the systemd defaults?

TBH, that all sounds like a very brittle setup, to rely on the
sort-ordering and systemd-tmpfiles always acting on all files.
Overriding existing tmpfiles configs this way seems hacky, not sure if
upstream intended it to be used like this.

I note that this is an Ubuntu specific problem, the Debian rsyslog
package does not ship such a config.

Dunno what the best solution is for your specific case.
Maybe diverting /usr/lib/tmpfiles.d/var.conf in the rsyslog package?

You could also ask upstream, maybe they have an idea how to solve this
in a more robust way.
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#894510: [debhelper-devel] Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-05-04 Thread Seyeong Kim
Could somebody check this issue if you have time?

I would really appreciate it.

Thanks

On 11 Apr 2018, 2:17 PM +0900, Seyeong Kim , wrote:
> Right. Missed it.
>
> Thanks!
>
> > 2018. 4. 11. 오후 2:13, Niels Thykier  작성:
> >
> > Seyeong Kim:
> > > Please take a look this if you have time.
> > >
> > > Thanks
> > >
> > > [...]
> > Hi Seyeong,
> >
> > Please remember to Cc Felipe and Michael on this bug if you want them to
> > see the follow ups. :)
> >
> > Thanks,
> > ~Niels
>


Bug#894510: [debhelper-devel] Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-04-10 Thread Seyeong Kim
Right. Missed it.

Thanks!

> 2018. 4. 11. 오후 2:13, Niels Thykier  작성:
> 
> Seyeong Kim:
>> Please take a look this if you have time.
>> 
>> Thanks
>> 
>> [...]
> Hi Seyeong,
> 
> Please remember to Cc Felipe and Michael on this bug if you want them to
> see the follow ups. :)
> 
> Thanks,
> ~Niels



Bug#894510: [debhelper-devel] Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-04-10 Thread Niels Thykier
Seyeong Kim:
> Please take a look this if you have time.
> 
> Thanks
> 
> [...]
Hi Seyeong,

Please remember to Cc Felipe and Michael on this bug if you want them to
see the follow ups. :)

Thanks,
~Niels



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-04-10 Thread Seyeong Kim
Please take a look this if you have time.

Thanks

On Wed, 04 Apr 2018 17:47:00 + Niels Thykier  wrote:
> Hi,
> 
> @Michael/@Felipe: Could you have a look at this bug ?
> 
> On Sat, 31 Mar 2018 08:58:21 -0700 Seyeong Kim
>  wrote:
> > Package: debhelper
> > Version: 9.20160115ubuntu3
> > Severity: normal
> > Tags: d-i
> > 
> > In autoscripts/postinst-init-tmpfiles, There is TMPFILE containing conf in 
> > systemd pkg only.
> > Then if there is 00rsyslog.conf from rsyslog pkg. and installing or 
> > upgrading systemd
> > 
> > /var/log's permission is 755(which is default) not 775(which is in 
> > 00rsyslog.conf)
> > overriding doesn't work when upgrading.
> > 
> > Please refer to below LP
> > ubuntu lp bug : 
> > https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1748147
> > 
> > removing TMPFILE from autoscripts/postinst-init-tmpfiles solves this issue.
> > e.g. change like below
> > systemd-tmpfiles --create #TMPFILES# >/dev/null || true
> > to
> > systemd-tmpfiles --create >/dev/null || true
> > 
> > and removing related code from dh_installinit maybe needed
> > e.g. below kind of part
> > if (compat(10) && !$dh{NOSCRIPTS}) {
> > # Include postinst-init-tmpfiles if the package ships any 
> > files
> > # in /usr/lib/tmpfiles.d or /etc/tmpfiles.d
> > my @tmpfiles;
> > find({
> > wanted => sub {
> > my $name = $File::Find::name;
> > return unless -f $name;
> > $name =~ s/^\Q$tmp\E//g;
> > if ($name =~ m,^/usr/lib/tmpfiles\.d/, ||
> > $name =~ m,^/etc/tmpfiles\.d/,) {
> > push @tmpfiles, $name;
> > }
> > },
> > no_chdir => 1,
> > }, $tmp);
> > if (@tmpfiles > 0) {
> > autoscript($package,"postinst", 
> > "postinst-init-tmpfiles",
> > "s,#TMPFILES#," . join(" ", sort 
> > @tmpfiles).",g");
> > }
> > }
> > 
> > Is there any reason that TMPFILE list is there? 
> > 
> > [...]
> 
> Thanks,
> ~Niels
> 
> 



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-04-04 Thread Niels Thykier
Hi,

@Michael/@Felipe: Could you have a look at this bug ?

On Sat, 31 Mar 2018 08:58:21 -0700 Seyeong Kim
 wrote:
> Package: debhelper
> Version: 9.20160115ubuntu3
> Severity: normal
> Tags: d-i
> 
> In autoscripts/postinst-init-tmpfiles, There is TMPFILE containing conf in 
> systemd pkg only.
> Then if there is 00rsyslog.conf from rsyslog pkg. and installing or upgrading 
> systemd
> 
> /var/log's permission is 755(which is default) not 775(which is in 
> 00rsyslog.conf)
> overriding doesn't work when upgrading.
> 
> Please refer to below LP
> ubuntu lp bug : https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1748147
> 
> removing TMPFILE from autoscripts/postinst-init-tmpfiles solves this issue.
> e.g. change like below
> systemd-tmpfiles --create #TMPFILES# >/dev/null || true
> to
> systemd-tmpfiles --create >/dev/null || true
> 
> and removing related code from dh_installinit maybe needed
> e.g. below kind of part
> if (compat(10) && !$dh{NOSCRIPTS}) {
> # Include postinst-init-tmpfiles if the package ships any 
> files
> # in /usr/lib/tmpfiles.d or /etc/tmpfiles.d
> my @tmpfiles;
> find({
> wanted => sub {
> my $name = $File::Find::name;
> return unless -f $name;
> $name =~ s/^\Q$tmp\E//g;
> if ($name =~ m,^/usr/lib/tmpfiles\.d/, ||
> $name =~ m,^/etc/tmpfiles\.d/,) {
> push @tmpfiles, $name;
> }
> },
> no_chdir => 1,
> }, $tmp);
> if (@tmpfiles > 0) {
> autoscript($package,"postinst", 
> "postinst-init-tmpfiles",
> "s,#TMPFILES#," . join(" ", sort 
> @tmpfiles).",g");
> }
> }
> 
> Is there any reason that TMPFILE list is there? 
> 
> [...]

Thanks,
~Niels



Bug#894510: debhelper: Because it is listing tmpfiles in systemd's only, conf overriding is not working

2018-03-31 Thread Seyeong Kim
Package: debhelper
Version: 9.20160115ubuntu3
Severity: normal
Tags: d-i

In autoscripts/postinst-init-tmpfiles, There is TMPFILE containing conf in 
systemd pkg only.
Then if there is 00rsyslog.conf from rsyslog pkg. and installing or upgrading 
systemd

/var/log's permission is 755(which is default) not 775(which is in 
00rsyslog.conf)
overriding doesn't work when upgrading.

Please refer to below LP
ubuntu lp bug : https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1748147

removing TMPFILE from autoscripts/postinst-init-tmpfiles solves this issue.
e.g. change like below
systemd-tmpfiles --create #TMPFILES# >/dev/null || true
to
systemd-tmpfiles --create >/dev/null || true

and removing related code from dh_installinit maybe needed
e.g. below kind of part
if (compat(10) && !$dh{NOSCRIPTS}) {
# Include postinst-init-tmpfiles if the package ships any files
# in /usr/lib/tmpfiles.d or /etc/tmpfiles.d
my @tmpfiles;
find({
wanted => sub {
my $name = $File::Find::name;
return unless -f $name;
$name =~ s/^\Q$tmp\E//g;
if ($name =~ m,^/usr/lib/tmpfiles\.d/, ||
$name =~ m,^/etc/tmpfiles\.d/,) {
push @tmpfiles, $name;
}
},
no_chdir => 1,
}, $tmp);
if (@tmpfiles > 0) {
autoscript($package,"postinst", 
"postinst-init-tmpfiles",
"s,#TMPFILES#," . join(" ", sort 
@tmpfiles).",g");
}
}

Is there any reason that TMPFILE list is there? 


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-87-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=ko_KR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev20150820.1
ii  binutils 2.26.1-1ubuntu1~16.04.6
ii  dh-strip-nondeterminism  0.015-1
ii  dpkg 1.18.4ubuntu1.2
ii  dpkg-dev 1.18.4ubuntu1.4
ii  file 1:5.25-2ubuntu1
ii  libdpkg-perl 1.18.4ubuntu1.4
ii  man-db   2.7.5-1
ii  perl 5.22.1-9ubuntu0.2
ii  po-debconf   1.0.19

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  

-- no debconf information