From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 765601382C5 for ; Fri, 26 Feb 2021 19:25:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0204E086E; Fri, 26 Feb 2021 19:25:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A143E086E for ; Fri, 26 Feb 2021 19:25:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 29B663410CC for ; Fri, 26 Feb 2021 19:25:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 69D90C3 for ; Fri, 26 Feb 2021 19:24:39 +0000 (UTC) From: "Piotr Karbowski" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Piotr Karbowski" Message-ID: <1614367434.da4634e4944e2aace9f850a298cd64e351b6dcfb.slashbeast@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: gui-libs/display-manager-init/files/, gui-libs/display-manager-init/ X-VCS-Repository: repo/gentoo X-VCS-Files: gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild gui-libs/display-manager-init/files/startDM-r1 X-VCS-Directories: gui-libs/display-manager-init/files/ gui-libs/display-manager-init/ X-VCS-Committer: slashbeast X-VCS-Committer-Name: Piotr Karbowski X-VCS-Revision: da4634e4944e2aace9f850a298cd64e351b6dcfb X-VCS-Branch: master Date: Fri, 26 Feb 2021 19:24:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2ad9ff72-3777-41bc-aa11-bb3e6942a287 X-Archives-Hash: 3d65bd609e093e56aba813e6073370dd commit: da4634e4944e2aace9f850a298cd64e351b6dcfb Author: Aisha Tammy aisha cc> AuthorDate: Fri Feb 26 19:10:28 2021 +0000 Commit: Piotr Karbowski gentoo org> CommitDate: Fri Feb 26 19:23:54 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da4634e4 gui-libs/display-manager-init: fix quotes Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Aisha Tammy aisha.cc> Signed-off-by: Piotr Karbowski gentoo.org> .../display-manager-init-1.0-r3.ebuild | 54 ++++++++++++++++++++++ gui-libs/display-manager-init/files/startDM-r1 | 29 ++++++++++++ 2 files changed, 83 insertions(+) diff --git a/gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild b/gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild new file mode 100644 index 00000000000..1a18f3f2feb --- /dev/null +++ b/gui-libs/display-manager-init/display-manager-init-1.0-r3.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DESCRIPTION="RC init files for starting display and login managers" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:X11" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux" + +S="${WORKDIR}" + +RDEPEND=" + sys-apps/gentoo-functions + !<=sys-apps/sysvinit-2.98 + !<=x11-apps/xinit-1.4.1 + !<=x11-base/xorg-server-1.20.10 + !=x11-base/xorg-server-1.20.10-r2 +" + +src_install() { + newinitd "${FILESDIR}"/display-manager-setup.initd display-manager-setup + newinitd "${FILESDIR}"/display-manager.initd-r1 display-manager + newinitd "${FILESDIR}"/xdm.initd xdm + newconfd "${FILESDIR}"/display-manager.confd display-manager + newbin "${FILESDIR}"/startDM-r1 startDM + # backwards compatibility + dosym "${ESYSROOT}"/usr/bin/startDM /etc/X11/startDM.sh +} + +pkg_preinst() { + if [[ ${REPLACING_VERSIONS} == "" && -f "${EROOT}"/etc/conf.d/xdm && ! -f "${EROOT}"/etc/conf.d/display-manager ]]; then + cp -a "${EROOT}"/etc/conf.d/{xdm,display-manager} || die + fi + local rlevel using_xdm + using_xdm=no + for rlevel in boot default sysinit; do + if [[ -e "${EROOT}"/etc/runlevels/${rlevel}/xdm ]]; then + using_xdm=yes + fi + done + if [[ "${using_xdm}" = "yes" ]]; then + ewarn "The 'xdm' service has been replaced by new 'display-manager'" + ewarn "service, please switch now:" + ewarn + ewarn " # rc-update del xdm default" + ewarn " # rc-update add display-manager default" + ewarn + ewarn "Remember to run etc-update or dispatch-conf to update the" + ewarn "config protected service files." + fi +} diff --git a/gui-libs/display-manager-init/files/startDM-r1 b/gui-libs/display-manager-init/files/startDM-r1 new file mode 100644 index 00000000000..b23344bbdcc --- /dev/null +++ b/gui-libs/display-manager-init/files/startDM-r1 @@ -0,0 +1,29 @@ +#!/bin/sh +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 + +# We need to source /etc/profile.env for stuff like $LANG to work +# bug #10190. +. /etc/profile.env + +# need eerror +. /lib/gentoo/functions.sh + +# Bail out early if on a non-OpenRC system: +if [ ! -d /run/openrc ]; then + eerror "$0 should only be used on OpenRC systems" +fi + +. /lib/rc/sh/functions.sh + +export RC_SVCNAME=display-manager +EXEC="$(get_options service)" +NAME="$(get_options name)" +PIDFILE="$(get_options pidfile)" +START_STOP_ARGS="$(get_options start_stop_args)" + +start-stop-daemon --start --exec "${EXEC}" \ +${NAME:+--name} ${NAME} ${PIDFILE:+--pidfile} ${PIDFILE} ${START_STOP_ARGS} || \ +eerror "ERROR: could not start the Display Manager" + +# vim:ts=4