Gentoo Archives: gentoo-commits

From: "Bernard Cafarelli (voyageur)" <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/neatx: ChangeLog neatx-0.3.1_p59-r4.ebuild neatx-0.3.1_p59-r3.ebuild
Date: Thu, 23 Aug 2012 12:31:11
Message-Id: 20120823123041.07E8120460@flycatcher.gentoo.org
1 voyageur 12/08/23 12:30:40
2
3 Modified: ChangeLog
4 Added: neatx-0.3.1_p59-r4.ebuild
5 Removed: neatx-0.3.1_p59-r3.ebuild
6 Log:
7 Fix missing parts for libexecdir migration, thanks Damien Granger in bug #432274
8
9 (Portage version: 2.2.0_alpha122/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.19 net-misc/neatx/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/neatx/ChangeLog?rev=1.19&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/neatx/ChangeLog?rev=1.19&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/neatx/ChangeLog?r1=1.18&r2=1.19
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-misc/neatx/ChangeLog,v
21 retrieving revision 1.18
22 retrieving revision 1.19
23 diff -u -r1.18 -r1.19
24 --- ChangeLog 21 Aug 2012 13:34:00 -0000 1.18
25 +++ ChangeLog 23 Aug 2012 12:30:40 -0000 1.19
26 @@ -1,6 +1,14 @@
27 # ChangeLog for net-misc/neatx
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/ChangeLog,v 1.18 2012/08/21 13:34:00 voyageur Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/ChangeLog,v 1.19 2012/08/23 12:30:40 voyageur Exp $
31 +
32 +*neatx-0.3.1_p59-r4 (23 Aug 2012)
33 +
34 + 23 Aug 2012; Bernard Cafarelli <voyageur@g.o>
35 + -neatx-0.3.1_p59-r3.ebuild, +neatx-0.3.1_p59-r4.ebuild,
36 + files/neatx-0.3.1_p59-use_libexecdir.patch:
37 + Fix missing parts for libexecdir migration, thanks Damien Granger in bug
38 + #432274
39
40 *neatx-0.3.1_p59-r3 (21 Aug 2012)
41
42
43
44
45 1.1 net-misc/neatx/neatx-0.3.1_p59-r4.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r4.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r4.ebuild?rev=1.1&content-type=text/plain
49
50 Index: neatx-0.3.1_p59-r4.ebuild
51 ===================================================================
52 # Copyright 1999-2012 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/net-misc/neatx/neatx-0.3.1_p59-r4.ebuild,v 1.1 2012/08/23 12:30:40 voyageur Exp $
55
56 EAPI=4
57
58 PYTHON_DEPEND="2"
59 inherit eutils autotools python user
60
61 DESCRIPTION="Google implementation of NX server"
62 HOMEPAGE="http://code.google.com/p/neatx/"
63 SRC_URI="mirror://gentoo/${P}.tar.bz2"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~amd64 ~ppc ~x86"
68 IUSE=""
69
70 DEPEND="dev-python/docutils"
71 RDEPEND="dev-python/pexpect
72 dev-python/simplejson
73 >=dev-python/pygtk-2.14
74 >=dev-python/pygobject-2.14:2
75 app-portage/portage-utils
76 media-fonts/font-misc-misc
77 media-fonts/font-cursor-misc
78 || ( net-analyzer/gnu-netcat
79 net-analyzer/netcat
80 net-analyzer/netcat6 )
81 net-misc/nx"
82
83 S=${WORKDIR}/${PN}
84
85 pkg_setup () {
86 # configure script looks for latest python2 only,
87 # no multiple versions support
88 python_set_active_version 2
89 python_pkg_setup
90
91 if [ -z "${NX_HOME_DIR}" ];
92 then
93 export NX_HOME_DIR=/var/lib/neatx/home
94 fi
95 enewuser nx -1 -1 ${NX_HOME_DIR}
96 }
97
98 src_prepare() {
99 epatch "${FILESDIR}"/${P}-use_libexecdir.patch
100
101 sed -i -e "s/rst2html]/rst2html.py]/" configure.ac \
102 || die "configure.ac sed failed"
103 sed -e "s#/lib/neatx#/neatx#" \
104 -e "/^docdir/s#\$(PACKAGE)#${PF}#" \
105 -i Makefile.am \
106 || die "Makefile.am sed failed"
107 sed -e "/DATA_DIR =/s#/lib/neatx#/neatx#" \
108 -i lib/constants.py || die "constants.py sed failed"
109
110 eautoreconf
111
112 echo "#!/bin/sh" > autotools/py-compile
113 }
114
115 src_compile() {
116 default_src_compile
117 # Scripts are automatically generated, fix them here
118 python_convert_shebangs 2 src/nx*
119 }
120
121 src_install() {
122 emake install DESTDIR="${D}"
123 fperms 777 /var/lib/neatx/sessions
124 dodir ${NX_HOME_DIR}/.ssh
125 fowners nx:nx ${NX_HOME_DIR}
126 fowners nx:nx ${NX_HOME_DIR}/.ssh
127
128 insinto /etc
129 newins doc/neatx.conf.example neatx.conf
130
131 # nc or netcat6 or netcat?
132 if has_version net-analyzer/gnu-netcat; then
133 nc_path="/usr/bin/netcat"
134 elif has_version net-analyzer/netcat6; then
135 nc_path="/usr/bin/nc6"
136 else
137 nc_path="/usr/bin/nc"
138 fi
139 cat >> "${D}"/etc/neatx.conf << EOF
140
141 netcat-path = ${nc_path}
142 use-xsession = false
143 start-gnome-command = /etc/X11/Sessions/Gnome
144 EOF
145
146 insinto /usr/share/neatx
147 insopts -m 600 -o nx
148 newins extras/authorized_keys.nomachine authorized_keys.nomachine
149
150 insinto ${NX_HOME_DIR}/.ssh
151 insopts -m 600 -o nx
152 newins extras/authorized_keys.nomachine authorized_keys
153
154 # protect ssh key from getting clobbered by future upgrade (bug #339366)
155 echo "CONFIG_PROTECT=\"${NX_HOME_DIR}\"" > "${T}/60${PN}"
156 doenvd "${T}/60${PN}"
157 }
158
159 pkg_preinst () {
160 # preserve custom ssh key if present (bug #339366)
161 # CONFIG_PROTECT entry created above will only work for future emerges,
162 # not the current one (until bug #276345 gets fixed)
163 if [ -e "${ROOT}/${NX_HOME_DIR}/.ssh/authorized_keys" ] ; then
164 einfo "Preserving existing ssh key: ${NX_HOME_DIR}/.ssh/authorized_keys"
165 insinto ${NX_HOME_DIR}/.ssh
166 insopts -m 600 -o nx
167 newins "${ROOT}/${NX_HOME_DIR}/.ssh/authorized_keys" authorized_keys
168 fi
169 }
170
171 pkg_postinst () {
172 python_mod_optimize neatx
173
174 # Other NX servers ebuilds may have already created the nx account
175 # However they use different login shell/home directory paths
176 if [[ ${ROOT} == "/" ]]; then
177 usermod -s /usr/libexec/neatx/nxserver-login nx || die "Unable to set login shell of nx user!!"
178 usermod -d ${NX_HOME_DIR} nx || die "Unable to set home directory of nx user!!"
179 else
180 elog "If you had another NX server installed before, please make sure"
181 elog "the nx user account is correctly set to:"
182 elog " * login shell: /usr/libexec/neatx/nxserver-login"
183 elog " * home directory: ${NX_HOME_DIR}"
184 fi
185
186 if has_version net-misc/openssh[-pam]; then
187 elog ""
188 elog "net-misc/openssh was not built with PAM support"
189 elog "You will need to unlock the nx account by setting a password for it"
190 fi
191
192 elog "If you want to use the default su authentication (rather than ssh)"
193 elog "you must ensure that the nx user is a member of the wheel group."
194 elog "You can add it via \"usermod -a -G wheel nx\""
195 }
196
197 pkg_postrm() {
198 python_mod_cleanup neatx
199 }