Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678990 - sys-apps/smartmontools-7.0: update systemd unit to Type=Notify
Summary: sys-apps/smartmontools-7.0: update systemd unit to Type=Notify
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-27 20:16 UTC by Chris Mayo
Modified: 2021-01-03 19:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2019-02-27 20:16:49 UTC
smartd.service now supports Type=Notify
https://www.smartmontools.org/browser/tags/RELEASE_7_0/smartmontools/NEWS#L46

With this systemd doesn't report started until all devices are found.

Is set in the upstream unit:
https://www.smartmontools.org/browser/tags/RELEASE_7_0/smartmontools/smartd.service.in
Comment 1 Larry the Git Cow gentoo-dev 2019-04-01 16:04:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=679dec1eb076d77ca4ecd51b5b9846f3208bfb8d

commit 679dec1eb076d77ca4ecd51b5b9846f3208bfb8d
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2019-04-01 16:04:01 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2019-04-01 16:04:41 +0000

    sys-apps/smartmontools: Revbump to install shipped systemd unit file
    
    instead of our own one.
    
    Bug: https://bugs.gentoo.org/678990
    Package-Manager: Portage-2.3.62, Repoman-2.3.12
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 sys-apps/smartmontools/smartmontools-7.0-r1.ebuild | 150 +++++++++++++++++++++
 sys-apps/smartmontools/smartmontools-9999.ebuild   |   3 +-
 2 files changed, 151 insertions(+), 2 deletions(-)
Comment 2 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-01 16:05:42 UTC
Please test =sys-apps/smartmontools-7.0-r1 and report back if that fixes this bug.
Comment 3 Chris Mayo 2019-04-02 19:05:00 UTC
Thanks. That adds Type=notify.

The complication with the shipped file is that it does break the Gentoo Unit file guidelines (5)

https://wiki.gentoo.org/wiki/Project:Systemd/Ebuild_policy#Unit_file_guidelines

by loading configuration from a file, although not conf.d:

EnvironmentFile=-/etc/default/smartmontools
ExecStart=/usr/sbin/smartd -n $smartd_opts

The file /etc/default/smartmontools is not installed by the ebuild.
Comment 4 Ewoud Kohl van Wijngaarden 2020-12-27 23:07:30 UTC
Current smartmontools stable version is 7.1 and has Type=notify. It does generate a warning that StandardOutput=syslog is obsolete:

[    7.577972] systemd[1]: /lib/systemd/system/smartd.service:10: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
Comment 5 Lars Wendler (Polynomial-C) gentoo-dev 2021-01-02 20:27:17 UTC
Still an issue with sys-apps/smartmontools-7.2?
Comment 6 Ewoud Kohl van Wijngaarden 2021-01-02 21:05:47 UTC
I didn't actually install 7.2, but it was resolved upstream in https://www.smartmontools.org/changeset/5077 and according to the changelog that's part of 7.2.
Comment 7 Chris Mayo 2021-01-03 19:16:58 UTC
1) syslog warning is indeed resolved in sys-apps/smartmontools-7.2.

2) Type=notify was already resolved.

3) EnvironmentFile=-/etc/default/smartmontools

Still present. There is a build configuration option to remove it now:

./configure --with-systemdenvfile=no

But it only causes an attempt to open a file that doesn't exist, and no error. Not a major problem.