Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 820278 - sys-fs/zfs: openrc service files are incorrect if sys-apps/openrc isn't yet installed on the system
Summary: sys-fs/zfs: openrc service files are incorrect if sys-apps/openrc isn't yet ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL: https://github.com/openzfs/zfs/issues...
Whiteboard:
Keywords: PullRequest, UPSTREAM
Depends on:
Blocks:
 
Reported: 2021-10-26 00:02 UTC by Peter Levine
Modified: 2021-12-26 22:35 UTC (History)
3 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 Peter Levine 2021-10-26 00:02:35 UTC
I transitioned from systemd/btrfs to openrc/zfs recently and for a week I've been trying to debug why no pools, except for rpool, were being imported at boot.  I eventually noticed that the zfs-import service was finishing without error but not otherwise doing anything.  It turns out that the service files' shebangs were '#!/bin/sh'.  The service files defined depend(), start(), and status(), but were not being run.  The problem appears to be here: https://github.com/openzfs/zfs/blob/90b77a0364a44ec568aa984558dea9901867653d/config/zfs-build.m4#L570. If /sbin/openrc-run exists (i.e., sys-apps/openrc is currently installed) the shebang is '#!/sbin/openrc-run', otherwise it's '#!/bin/sh'.  This implies an automagic build-time dependency on sys-apps/openrc instead of unconditionally installing the init files with '#!/sbin/openrc-run' (afaik, the correct behavior).
Comment 1 Georgy Yakovlev archtester gentoo-dev 2021-10-28 15:48:28 UTC
some prior manifestation of this hardcoded assumption:

https://github.com/openzfs/zfs/issues/8204

your PR seems to be ok though.
Comment 2 Peter Levine 2021-10-30 06:34:25 UTC
PR accepted upstream with commit https://github.com/openzfs/zfs/commit/6ef28c526ba7199a3740407d764b6505618ca8ba.  If not backporting, feel free to close.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2021-11-01 00:11:47 UTC
since linux 5.15 is out there will be zfs release soon.
I'll keep an eye on it, if it does not get it - I'll include and maybe include in older versions as well.
Comment 4 Larry the Git Cow gentoo-dev 2021-12-16 02:51:30 UTC
The bug has been closed via the following commit(s):

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

commit 52257c6d64aa3817575311016151e29ca46be0b9
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-12-16 02:29:05 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-12-16 02:51:03 +0000

    sys-fs/zfs: add 2.1.2
    
    Bug: https://bugs.gentoo.org/815817
    Closes: https://bugs.gentoo.org/820278
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/Manifest                        |   2 +
 sys-fs/zfs/files/2.1.2-openrc-vendor.patch |  42 ++++
 sys-fs/zfs/files/2.1.2-scrub-timers.patch  | 147 ++++++++++++++
 sys-fs/zfs/zfs-2.1.2.ebuild                | 303 +++++++++++++++++++++++++++++
 4 files changed, 494 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2021-12-26 22:35:37 UTC
The bug has been referenced in the following commit(s):

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

commit 75a131e7d043e3e3ff0e15aa2038ebdf47997dc3
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-12-26 22:30:57 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-12-26 22:35:03 +0000

    sys-fs/zfs: drop 2.0.6-r1
    
    Bug: https://bugs.gentoo.org/820278
    Closes: https://bugs.gentoo.org/815817
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-fs/zfs/Manifest                       |   2 -
 sys-fs/zfs/files/2.0.4-scrub-timers.patch |  97 ----------
 sys-fs/zfs/zfs-2.0.6-r1.ebuild            | 302 ------------------------------
 3 files changed, 401 deletions(-)