Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 527648 - sys-apps/smartmontools - adapt systemd unit for gentoo
Summary: sys-apps/smartmontools - adapt systemd unit for gentoo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-10-31 18:27 UTC by Łukasz Stelmach
Modified: 2017-10-31 21:53 UTC (History)
3 users (show)

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


Attachments
Adapt smartd.service for Gentoo (6.1) (smartmontools-6.1-systemd-unit.patch,4.45 KB, patch)
2014-10-31 18:28 UTC, Łukasz Stelmach
Details | Diff
Adapt smartd.service for Gentoo (6.1) (smartmontools-6.1-systemd-unit.patch,1.09 KB, patch)
2014-10-31 18:31 UTC, Łukasz Stelmach
Details | Diff
Adapt smartd.service for Gentoo (6.3) (smartmontools-6.3-systemd-unit.patch,488 bytes, patch)
2014-10-31 18:32 UTC, Łukasz Stelmach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Łukasz Stelmach 2014-10-31 18:27:54 UTC
smartd.service needs a bit adaptation to fit well in gentoo. By default the EnvironmentFile points to /etc/sysconfig/smartmontools while Gentoo uses /etc/conf.d/smartd. The stock sysv init script and the service file assume the file provides smartd_opts (lower-case) in the Gentoo file it is rather SMARTD_OPTS.

The attached patches do this for 6.1 and 6.3. In 6.3 there is a parameter for the configure script `--with-systemdenvfile' to choose the environment file appropriately.

Reproducible: Always
Comment 1 Łukasz Stelmach 2014-10-31 18:28:46 UTC
Created attachment 387898 [details, diff]
Adapt smartd.service for Gentoo (6.1)
Comment 2 Łukasz Stelmach 2014-10-31 18:31:12 UTC
Created attachment 387900 [details, diff]
Adapt smartd.service for Gentoo (6.1)
Comment 3 Łukasz Stelmach 2014-10-31 18:32:24 UTC
Created attachment 387902 [details, diff]
Adapt smartd.service for Gentoo (6.3)
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2017-10-31 21:12:11 UTC
Well, /etc/conf.d is not the system's configuration path like Debian's /etc/default or Red Hat's /etc/sysconfig. The path is used by OpenRC and systemd folk in Gentoo don't want that any systemd unit make use of these files.

Also keep in mind that in systemd's world you will simply overwrite the default service. So I will update the provided systemd unit for smartd to get rid of EnvironmentFile and $smartd_opts. Users who want to pass options should follow systemd and overwrite the unit for their needs.
Comment 5 Larry the Git Cow gentoo-dev 2017-10-31 21:53:04 UTC
The bug has been closed via the following commit(s):

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

commit ad8950f967e37dcff1fb1ab9fcd2e0b4001b0a69
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2017-10-31 21:51:15 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2017-10-31 21:52:56 +0000

    sys-apps/smartmontools: Rev bump to address several problems
    
    - EAPI updated to EAPI 6.
    
    - Depend on sys-freebsd/freebsd-lib[usb] on FreeBSD. (bug #552054)
    
    - Update smartd systemd service to reflect that we don't provide a general
      config file for the service. Users are supposed to overwrite the
      provided service if they want to pass additional
      parameters. (bug #527648)
    
    - We no longer install executable files in /usr/share/{PN}. (bug #622072)
    
    - "minimal" USE flag was replaced by "daemon" USE flag to better indicate
      what the USE flag does.
    
    - "caps" USE flag now requires "daemon" USE flag.
    
    - It is now possible to use the "update_drivedb" USE flag
      alone (i.e. without the "minimal", now "daemon" USE flag). (bug #635700)
    
    - The drive database logic was rewritten: Per default we try to install
      the drive database shipped with the package. If there's already a drive
      database installed we will not replace the database anymore in
      assumption that the user has updated the database in the meantime and
      want to preserve the changes.
      A warning will be displayed in this case with an instruction how to
      update or restore the default drive database shipped with the package.
      The new logic now also works when using binary packages. (bug #575292)
    
    - RDEPENDs on net-misc/curl, net-misc/wget, www-client/lynx and
      dev-vcs/subversion (just one of them is required!) were added when using
      "update_drivedb" USE flag.
    
    Closes: https://bugs.gentoo.org/552054
    Closes: https://bugs.gentoo.org/527648
    Closes: https://bugs.gentoo.org/622072
    Closes: https://bugs.gentoo.org/635700
    Closes: https://bugs.gentoo.org/575292
    Package-Manager: Portage-2.3.13, Repoman-2.3.4

 sys-apps/smartmontools/files/smartd.systemd        |  11 ++
 sys-apps/smartmontools/metadata.xml                |   2 +
 sys-apps/smartmontools/smartmontools-6.5-r1.ebuild | 148 +++++++++++++++++++++
 3 files changed, 161 insertions(+)