Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803545 - x11-misc/autorandr: should support OpenRC/non-systemd systems
Summary: x11-misc/autorandr: should support OpenRC/non-systemd systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Florian Schmaus
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-23 17:11 UTC by Robin Johnson
Modified: 2023-08-20 20:20 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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2021-07-23 17:11:32 UTC
Please add support for non-systemd systems: the udev hooks should call some indirection script, that can then call the systemctl || another task.
Comment 1 Alexander Weber 2022-10-19 09:06:57 UTC
On my system I added the next udev rule into /etc/udev/rules.d/


ACTION=="change", SUBSYSTEM=="drm", RUN+="/usr/bin/autorandr --batch --change --default default"

Using this rule autorandr does work as expected without launcher

Please add systemd IUSE to the ebuild and if not set, install the line my rule as into /lib/udev/rules.d/40-monitor-hotplug.rules and skip installing  /lib/systemd/system/autorandr.service
Comment 2 Larry the Git Cow gentoo-dev 2022-10-19 09:16:02 UTC
The bug has been closed via the following commit(s):

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

commit 10640cfc65f7f7b0041f02a9f49ffedd52f9d4ca
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2022-10-19 09:15:26 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2022-10-19 09:15:50 +0000

    x11-misc/autorandr: add systemd use flag
    
    Closes: https://bugs.gentoo.org/803545
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 x11-misc/autorandr/autorandr-1.12.1-r1.ebuild | 65 +++++++++++++++++++++++++++
 x11-misc/autorandr/autorandr-9999.ebuild      |  4 +-
 2 files changed, 67 insertions(+), 2 deletions(-)
Comment 3 Alexander Weber 2022-10-20 06:59:24 UTC
Still not fixed. The x11-misc/autorandr-1.12.1-r1 does not install the /lib/systemd/system/autorandr.service animore, but the /lib/udev/rules.d/40-monitor-hotplug.rules still call RUN+="/bin/systemctl start --no-block autorandr.service"

Please patch the rules file with RUN+="/usr/bin/autorandr --batch --change --default default"
Comment 4 Florian Schmaus gentoo-dev 2022-10-20 07:28:24 UTC
Indeed, looks like upstream's Makefile part where it states

> echo 'ACTION=="change", SUBSYSTEM=="drm", RUN+="$(if $(findstring systemd, $(TARGETS)),/bin/systemctl start --no-block autorandr.service,${PREFIX}/bin/autorandr --batch --change --default default)"' > ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules

does not work as expected.
Comment 5 Larry the Git Cow gentoo-dev 2022-10-20 10:52:41 UTC
The bug has been closed via the following commit(s):

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

commit 850afc904a3c133d9bf360723973f916658416d2
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2022-10-20 09:01:48 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2022-10-20 10:52:37 +0000

    x11-misc/autorandr: fix non-systemd udev rule, add missing pkg_postrm
    
    Also use PEP517 build mode.
    
    Closes: https://bugs.gentoo.org/803545
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 ...1.12.1-r1.ebuild => autorandr-1.12.1-r2.ebuild} | 12 ++++++++++
 x11-misc/autorandr/autorandr-9999.ebuild           |  7 ++++++
 ...x-install_udev-target-by-s-TARGETS-MAKECM.patch | 28 ++++++++++++++++++++++
 3 files changed, 47 insertions(+)
Comment 6 Alexander Weber 2023-08-04 06:57:35 UTC
The Issue is back again in x11-misc/autorandr-1.14 :-(

$ cat /lib/udev/rules.d/40-monitor-hotplug.rules
ACTION=="change", SUBSYSTEM=="drm", RUN+="/bin/systemctl start --no-block autorandr.service"