Line 0
Link Here
|
|
|
1 |
--- |
2 |
fix custom sessions (see bug #216984, work done by Gilles, I'm just committing) |
3 |
|
4 |
diff -ru gdm-2.29.92.orig/work/gdm-2.29.92/data/Xsession.in gdm-2.29.92/work/gdm-2.29.92/data/Xsession.in |
5 |
--- gdm-2.29.92.orig/work/gdm-2.29.92/data/Xsession.in 2010-03-30 02:15:18.000000000 +0200 |
Line 0
Link Here
|
|
|
1 |
From b9f261de75356be6e4ee94c0cc53f2edbd8fe4d2 Mon Sep 17 00:00:00 2001 |
2 |
From: Dan Nicholson <dbn.lists@gmail.com> |
3 |
Date: Tue, 14 Oct 2008 07:06:21 -0700 |
4 |
Subject: [PATCH] Fork gdm-binary, except when -nodaemon is used |
5 |
|
6 |
gdm-binary now forks and the parent terminates, except when the |
7 |
-nodaemon or --nodaemon options are used. This provides compatibility |
8 |
with xdm. Fixes bug #550170. |
9 |
|
10 |
Updated for gdm-2.29.92 by Michael Weber gentoo at xmw dot de 20100330 |
11 |
|
12 |
diff -ru gdm-2.29.92.orig/work/gdm-2.29.92/daemon/main.c gdm-2.29.92/work/gdm-2.29.92/daemon/main.c |
13 |
--- gdm-2.29.92.orig/work/gdm-2.29.92/daemon/main.c 2010-03-30 02:02:05.000000000 +0200 |
Line 0
Link Here
|
|
|
1 |
--- gdm-2.30.0/daemon/simple-slave-main.c 2010-03-29 23:42:03.000000000 +0200 |
Line 0
Link Here
|
0 |
- |
1 |
# Copyright 1999-2010 Gentoo Foundation |
|
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: $ |
4 |
|
5 |
EAPI="2" |
6 |
|
7 |
inherit eutils pam gnome2 autotools |
8 |
|
9 |
DESCRIPTION="GNOME Display Manager" |
10 |
HOMEPAGE="http://www.gnome.org/projects/gdm/" |
11 |
|
12 |
LICENSE="GPL-2" |
13 |
SLOT="0" |
14 |
KEYWORDS="~amd64 ~x86" |
15 |
|
16 |
IUSE_LIBC="elibc_glibc" |
17 |
IUSE="accessibility +consolekit debug ipv6 gnome-keyring profile selinux tcpd test xinerama +xklavier $IUSE_LIBC" |
18 |
|
19 |
# Name of the tarball with gentoo specific files |
20 |
GDM_EXTRA="${PN}-2.20.9-gentoo-files-r1" |
21 |
|
22 |
SRC_URI="${SRC_URI} |
23 |
mirror://gentoo/${PN}-2.26-gentoo-patches.tar.bz2 |
24 |
mirror://gentoo/${GDM_EXTRA}.tar.bz2" |
25 |
|
26 |
RDEPEND="app-text/iso-codes |
27 |
>=dev-libs/dbus-glib-0.74 |
28 |
>=dev-libs/glib-2.22.0 |
29 |
>=gnome-base/libglade-2 |
30 |
>=gnome-base/gconf-2.6.1 |
31 |
>=gnome-base/gnome-panel-2 |
32 |
>=media-libs/fontconfig-2.5.0 |
33 |
>=media-libs/libcanberra-0.4[gtk] |
34 |
>=sys-apps/devicekit-power-008 |
35 |
virtual/pam |
36 |
x11-apps/sessreg |
37 |
>=x11-libs/gtk+-2.12.0 |
38 |
x11-libs/libX11 |
39 |
x11-libs/libXau |
40 |
x11-libs/libXdmcp |
41 |
x11-libs/libXi |
42 |
>=x11-libs/pango-1.3 |
43 |
consolekit? ( |
44 |
sys-auth/consolekit |
45 |
>=sys-apps/hal-0.5.12_rc1-r1[consolekit] ) |
46 |
accessibility? ( x11-libs/libXevie ) |
47 |
gnome-keyring? ( >=gnome-base/gnome-keyring-2.22[pam] ) |
48 |
selinux? ( sys-libs/libselinux ) |
49 |
tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) |
50 |
xinerama? ( x11-libs/libXinerama ) |
51 |
xklavier? ( >=x11-libs/libxklavier-4 ) |
52 |
|
53 |
!gnome-extra/fast-user-switch-applet" |
54 |
DEPEND="${RDEPEND} |
55 |
test? ( >=dev-libs/check-0.9.4 ) |
56 |
xinerama? ( x11-proto/xineramaproto ) |
57 |
sys-devel/gettext |
58 |
x11-proto/inputproto |
59 |
>=dev-util/intltool-0.40 |
60 |
>=dev-util/pkgconfig-0.19 |
61 |
>=app-text/scrollkeeper-0.1.4 |
62 |
>=app-text/gnome-doc-utils-0.3.2" |
63 |
PDEPEND=">=sys-auth/pambase-20090430[consolekit=,gnome-keyring=]" |
64 |
|
65 |
DOCS="AUTHORS ChangeLog NEWS README TODO" |
66 |
|
67 |
pkg_setup() { |
68 |
G2CONF="${G2CONF} |
69 |
--disable-schemas-install |
70 |
--localstatedir=/var |
71 |
--enable-console-helper |
72 |
--enable-authentication-scheme=pam |
73 |
--with-pam-prefix=/etc |
74 |
SOUND_PROGRAM=/usr/bin/gdmplay |
75 |
$(use_with accessibility xevie) |
76 |
$(use_enable debug) |
77 |
$(use_enable ipv6) |
78 |
$(use_with consolekit console-kit) |
79 |
$(use_enable profile profiling) |
80 |
$(use_with selinux) |
81 |
$(use_with tcpd tcp-wrappers) |
82 |
--with-xdmcp |
83 |
$(use_with xinerama) |
84 |
$(use_enable xklavier libxklavier)" |
85 |
|
86 |
enewgroup gdm |
87 |
enewuser gdm -1 -1 /var/lib/gdm gdm |
88 |
} |
89 |
|
90 |
src_prepare() { |
91 |
gnome2_src_prepare |
92 |
|
93 |
# remove unneeded linker directive for selinux (#41022) |
94 |
epatch "${WORKDIR}/${PN}-2.26.1-selinux-remove-attr.patch" |
95 |
|
96 |
# Make it daemonize so that the boot process can continue (#236701) |
97 |
epatch "${FILESDIR}/${PN}-2.29.92-fix-daemonize-regression.patch" |
98 |
|
99 |
## Fix VT grab problem causing GDM to grab VT2 instead of 7 (#261339) |
100 |
## would destroy user switch funcionality see c19 on #261339 |
101 |
#epatch "${WORKDIR}/${PN}-2.26.1-broken-VT-detection.patch" |
102 |
|
103 |
# Make custom session work, bug #. |
104 |
epatch "${FILESDIR}/${PN}-2.29.92-custom-session.patch" |
105 |
|
106 |
# ssh-agent handling must be done at xinitrc.d |
107 |
epatch "${WORKDIR}/${PN}-2.26.1-xinitrc-ssh-agent.patch" |
108 |
|
109 |
# Fix libxklavier automagic support |
110 |
epatch "${WORKDIR}/${PN}-2.26.1-automagic-libxklavier-support.patch" |
111 |
|
112 |
# Fix 2 QA issues |
113 |
epatch "${FILESDIR}/${PN}-2.30.0-include.patch" |
114 |
|
115 |
intltoolize --force --copy --automake || die "intltoolize failed" |
116 |
eautoreconf |
117 |
} |
118 |
|
119 |
src_install() { |
120 |
gnome2_src_install |
121 |
|
122 |
local gentoodir="${WORKDIR}/${GDM_EXTRA}" |
123 |
|
124 |
# gdm-binary should be gdm to work with our init (#5598) |
125 |
rm -f "${D}/usr/sbin/gdm" |
126 |
dosym /usr/sbin/gdm-binary /usr/sbin/gdm |
127 |
|
128 |
# our x11's scripts point to /usr/bin/gdm |
129 |
dosym /usr/sbin/gdm-binary /usr/bin/gdm |
130 |
|
131 |
# log, etc. |
132 |
keepdir /var/log/gdm |
133 |
keepdir /var/gdm |
134 |
|
135 |
fowners root:gdm /var/gdm |
136 |
fperms 1770 /var/gdm |
137 |
|
138 |
# add a custom xsession .desktop by default (#44537) |
139 |
exeinto /etc/X11/dm/Sessions |
140 |
doexe "${gentoodir}/custom.desktop" || die "doexe 1 failed" |
141 |
|
142 |
# add xinitrc.d scripts |
143 |
exeinto /etc/X11/xinit/xinitrc.d |
144 |
doexe "${FILESDIR}/49-keychain" || die "doexe 2 failed" |
145 |
doexe "${FILESDIR}/50-ssh-agent" || die "doexe 3 failed" |
146 |
|
147 |
# install XDG_DATA_DIRS gdm changes |
148 |
echo 'XDG_DATA_DIRS="/usr/share/gdm"' > 99xdg-gdm |
149 |
doenvd 99xdg-gdm || die "doenvd failed" |
150 |
|
151 |
# add a custom sound playing script (#248253) |
152 |
dobin "${gentoodir}/gdmplay" |
153 |
|
154 |
# avoid file collision, bug #213118 |
155 |
rm -f "${D}/usr/share/xsessions/gnome.desktop" |
156 |
|
157 |
# We replace the pam stuff by our own |
158 |
rm -rf "${D}/etc/pam.d" |
159 |
|
160 |
use gnome-keyring && sed -i "s:#Keyring=::g" "${gentoodir}"/pam.d/* |
161 |
|
162 |
dopamd "${gentoodir}"/pam.d/* |
163 |
dopamsecurity console.apps "${gentoodir}/security/console.apps/gdmsetup" |
164 |
} |
165 |
|
166 |
pkg_postinst() { |
167 |
gnome2_pkg_postinst |
168 |
|
169 |
ewarn |
170 |
ewarn "This is an EXPERIMENTAL release, please bear with its bugs and" |
171 |
ewarn "visit us on #gentoo-desktop if you have problems." |
172 |
ewarn |
173 |
|
174 |
elog "To make GDM start at boot, edit /etc/conf.d/xdm" |
175 |
elog "and then execute 'rc-update add xdm default'." |
176 |
elog "If you already have GDM running, you will need to restart it." |
177 |
|
178 |
if use gnome-keyring; then |
179 |
elog "For autologin to unlock your keyring, you need to set an empty" |
180 |
elog "password on your keyring. Use app-crypt/seahorse for that." |
181 |
fi |
182 |
|
183 |
if [ -f "/etc/X11/gdm/gdm.conf" ]; then |
184 |
elog "You had /etc/X11/gdm/gdm.conf which is the old configuration" |
185 |
elog "file. It has been moved to /etc/X11/gdm/gdm-pre-gnome-2.16" |
186 |
mv /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm-pre-gnome-2.16 |
187 |
fi |
188 |
} |
189 |
|
190 |
pkg_postrm() { |
191 |
gnome2_pkg_postrm |
192 |
|
193 |
if [[ "$(rc-config list default | grep xdm)" != "" ]] ; then |
194 |
elog "To remove GDM from startup please execute" |
195 |
elog "'rc-update del xdm default'" |
196 |
fi |
197 |
} |