From 0eda78b65a791d1bcf6475f55eb8fbb2ed3d9cef Mon Sep 17 00:00:00 2001 From: Andrey Klimenko Date: Mon, 18 Aug 2014 16:40:25 +0900 Subject: [PATCH] added Xorg startup configuration files Change-Id: I2d5cfa1a4a04a6ff11f324bd14b85ae5fcc8dbbc --- AUTHORS | 1 + COPYING | 20 ++++++++++++++ ChangeLog | 0 Makefile.am | 27 ++++++++++++++++++ NEWS | 0 README | 0 configure.ac | 56 ++++++++++++++++++++++++++++++++++++++ packaging/x11-common.spec | 40 +++++++++++++++++++++++++++ system/display-manager-run.service | 15 ++++++++++ system/display-manager.path | 7 +++++ system/display-manager.service | 10 +++++++ 11 files changed, 176 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100644 configure.ac create mode 100644 packaging/x11-common.spec create mode 100644 system/display-manager-run.service create mode 100644 system/display-manager.path create mode 100644 system/display-manager.service diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..4b2337f --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Andrey Klimenko \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..c0ae276 --- /dev/null +++ b/COPYING @@ -0,0 +1,20 @@ +Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..3e62c5d --- /dev/null +++ b/Makefile.am @@ -0,0 +1,27 @@ +# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Red Hat not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Red Hat makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. +# + +confdir = @CONF_PREFIX@ +conf_DATA = $(top_srcdir)/system/display-manager.path \ + $(top_srcdir)/system/display-manager.service \ + $(top_srcdir)/system/display-manager-run.service + + diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..ac85e15 --- /dev/null +++ b/configure.ac @@ -0,0 +1,56 @@ +# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of Red Hat not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Red Hat makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. +# + +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.61) +AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) + +# Checks for programs. +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +AC_CONFIG_SRCDIR([Makefile.am]) +AM_CONFIG_HEADER([config.h]) +AC_CONFIG_AUX_DIR(.) + +AM_INIT_AUTOMAKE([dist-bzip2]) + +AM_MAINTAINER_MODE + +# Checks for programs. +AC_DISABLE_STATIC +AC_PROG_LIBTOOL +AC_PROG_CC + +AC_ARG_WITH(arch, AS_HELP_STRING([--with-arch=ARCH], [Architecture (default: arm)]), + [ ARCH="$withval" ], + [ ARCH="arm" ]) +AC_ARG_WITH(conf-prefix, AS_HELP_STRING([--with-conf-prefix=CONF_PREFIX], [Architecture (default: /usr/lib/systemd/system)]), + [ CONF_PREFIX="$withval" ], + [ CONF_PREFIX="/usr/lib/systemd/system" ]) + +AC_SUBST(ARCH) +AC_SUBST(CONF_PREFIX) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/packaging/x11-common.spec b/packaging/x11-common.spec new file mode 100644 index 0000000..334e4d2 --- /dev/null +++ b/packaging/x11-common.spec @@ -0,0 +1,40 @@ +Name: x11-common +Summary: Configuration-files needed by xserver for autorun +Version: 0.0.1 +Release: 1 +BuildArch: noarch +Group: Graphics & UI Framework/X Window System +License: MIT +Source: %{name}-%{version}.tar.gz + +Requires: xorg-server +Conflicts: weston-common + +%description +Description: %{summary} + + +%prep +%setup -q + +%build +%reconfigure \ + --with-arch=noarch \ + --with-conf-prefix=/ + +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +mkdir -p %{buildroot}/usr/lib/systemd/system +mv %{buildroot}/display-manager.path %{buildroot}/usr/lib/systemd/system/ +mv %{buildroot}/display-manager.service %{buildroot}/usr/lib/systemd/system/ +mv %{buildroot}/display-manager-run.service %{buildroot}/usr/lib/systemd/system/ + +%files +%defattr(-,root,root,-) +/usr/lib/systemd/system/display-manager.path +/usr/lib/systemd/system/display-manager.service +/usr/lib/systemd/system/display-manager-run.service diff --git a/system/display-manager-run.service b/system/display-manager-run.service new file mode 100644 index 0000000..49148c8 --- /dev/null +++ b/system/display-manager-run.service @@ -0,0 +1,15 @@ +[Unit] +Description=Xorg display daemon + +[Service] +User=display +ExecStart=/usr/bin/startx +StandardInput=tty +TTYPath=/dev/tty7 + +#adding the capability to configure ttys +#may be needed if the user 'display' doesn't own the tty +#CapabilityBoundingSet=CAP_SYS_TTY_CONFIG + +[Install] +WantedBy=graphical.target diff --git a/system/display-manager.path b/system/display-manager.path new file mode 100644 index 0000000..a9eefa2 --- /dev/null +++ b/system/display-manager.path @@ -0,0 +1,7 @@ +[Unit] +Description=Wait for Xorg socket +Requires=display-manager-run.service +After=display-manager-run.service + +[Path] +PathExists=/usr/bin/Xorg diff --git a/system/display-manager.service b/system/display-manager.service new file mode 100644 index 0000000..39d7162 --- /dev/null +++ b/system/display-manager.service @@ -0,0 +1,10 @@ +[Unit] +Description=Display manager setup service +Requires=display-manager-run.service +After=display-manager-run.service + +[Service] +Type=oneshot + +[Install] +WantedBy=graphical.target -- 2.7.4