Gentoo Archives: gentoo-commits

From: "Jonathan Callen (abcd)" <abcd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/schroot: ChangeLog schroot-1.4.1.ebuild
Date: Sat, 27 Feb 2010 02:06:51
Message-Id: E1NlC4u-0004P6-B6@stork.gentoo.org
1 abcd 10/02/27 02:06:48
2
3 Modified: ChangeLog
4 Added: schroot-1.4.1.ebuild
5 Log:
6 New upstream version; automatically move local scripts to new locations, and add (temporary) symlinks from the old
7 (Portage version: -svn/cvs/Linux i686)
8
9 Revision Changes Path
10 1.15 dev-util/schroot/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/ChangeLog?rev=1.15&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/ChangeLog?rev=1.15&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/ChangeLog?r1=1.14&r2=1.15
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v
19 retrieving revision 1.14
20 retrieving revision 1.15
21 diff -u -r1.14 -r1.15
22 --- ChangeLog 13 Feb 2010 22:29:07 -0000 1.14
23 +++ ChangeLog 27 Feb 2010 02:06:47 -0000 1.15
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-util/schroot
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.14 2010/02/13 22:29:07 abcd Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/ChangeLog,v 1.15 2010/02/27 02:06:47 abcd Exp $
29 +
30 +*schroot-1.4.1 (27 Feb 2010)
31 +
32 + 27 Feb 2010; Jonathan Callen <abcd@g.o> +schroot-1.4.1.ebuild:
33 + New upstream version; automatically move local scripts to new locations,
34 + and add (temporary) symlinks from the old
35
36 13 Feb 2010; Jonathan Callen <abcd@g.o> schroot-1.4.0.ebuild:
37 Remove RESTRICT=mirror, was only meant for local testing
38
39
40
41 1.1 dev-util/schroot/schroot-1.4.1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/schroot-1.4.1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/schroot-1.4.1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: schroot-1.4.1.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-util/schroot/schroot-1.4.1.ebuild,v 1.1 2010/02/27 02:06:47 abcd Exp $
51
52 EAPI="2"
53 WANT_AUTOMAKE="1.11"
54
55 inherit autotools base pam
56
57 DESCRIPTION="Utility to execute commands in a chroot environment"
58 HOMEPAGE="http://packages.debian.org/source/sid/schroot"
59 SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.orig.tar.gz"
60
61 LICENSE="GPL-3"
62 SLOT="0"
63 KEYWORDS="~amd64 ~x86"
64 IUSE="+dchroot debug doc lvm nls pam test"
65
66 COMMON_DEPEND="
67 >=dev-libs/boost-1.39.0
68 dev-libs/lockdev
69 >=sys-apps/util-linux-2.16
70 lvm? ( sys-fs/lvm2 )
71 pam? ( sys-libs/pam )
72 "
73
74 DEPEND="${COMMON_DEPEND}
75 doc? (
76 app-doc/doxygen
77 media-gfx/graphviz
78 )
79 nls? ( sys-devel/gettext )
80 test? ( >=dev-util/cppunit-1.10.0 )
81 "
82 RDEPEND="${COMMON_DEPEND}
83 sys-apps/debianutils
84 dchroot? ( !sys-apps/dchroot )
85 nls? ( virtual/libintl )
86 "
87
88 PATCHES=(
89 "${FILESDIR}/${PN}-1.4.0-tests.patch"
90 )
91
92 src_prepare() {
93 base_src_prepare
94
95 # Don't depend on cppunit unless we are testing
96 use test || sed -i '/AM_PATH_CPPUNIT/d' configure.ac
97
98 echo -e "Package: ${PN}\nVersion: ${PV}" > VERSION
99
100 eautoreconf
101 }
102
103 src_configure() {
104 root_tests=no
105 use test && (( EUID == 0 )) && root_tests=yes
106 econf \
107 $(use_enable doc doxygen) \
108 $(use_enable dchroot) \
109 $(use_enable dchroot dchroot-dsa) \
110 $(use_enable debug) \
111 $(use_enable lvm lvm-snapshot) \
112 $(use_enable nls) \
113 $(use_enable pam) \
114 --enable-block-device \
115 --enable-loopback \
116 --enable-uuid \
117 --enable-root-tests=$root_tests \
118 --enable-shared \
119 --disable-static \
120 --localstatedir=/var \
121 --with-bash-completion-dir=/usr/share/bash-completion
122 }
123
124 src_test() {
125 if [[ $root_tests == yes && $EUID -ne 0 ]]; then
126 ewarn "Disabling tests because you are no longer root"
127 return 0
128 fi
129 default
130 }
131
132 src_install() {
133 emake DESTDIR="${D}" install || die "emake install failed"
134
135 newinitd "${FILESDIR}"/schroot.initd schroot || die "installation of init.d script failed"
136 newconfd "${FILESDIR}"/schroot.confd schroot || die "installation of conf.d file failed"
137
138 dodoc AUTHORS ChangeLog NEWS README THANKS TODO || die "installation of docs failed"
139 if use doc; then
140 docinto html/sbuild
141 dohtml doc/sbuild/html/* || die "installation of html docs failed"
142 docinto html/schroot
143 dohtml doc/schroot/html/* || die "installation of html docs failed"
144 fi
145
146 if use pam; then
147 rm -f "${D}"/etc/pam.d/schroot
148 pamd_mimic_system schroot auth account session
149 fi
150
151 # Remove *.la files
152 find "${D}" -name "*.la" -exec rm {} + || die "removal of *.la files failed"
153 }
154
155 pkg_preinst() {
156 export had_older_1_4_1=false
157 has_version "<dev-util/schroot-1.4.1" && had_older_1_4_1=true
158 if ${had_older_1_4_1}; then
159 einfo "Moving config files to new location..."
160 mkdir "${ROOT}etc/schroot/default"
161 mv_conffile etc/schroot/script-defaults etc/schroot/default/config
162 mv_conffile etc/schroot/mount-defaults etc/schroot/default/fstab
163 mv_conffile etc/schroot/copyfiles-defaults etc/schroot/default/copyfiles
164 mv_conffile etc/schroot/nssdatabases-defaults etc/schroot/default/nssdatabases
165 fi
166 }
167
168 mv_conffile() {
169 local OLDFILE=${ROOT}$1
170 local NEWFILE=${ROOT}$2
171
172 # if the old file doesn't exist, or is a symlink, stop
173 [[ -f ${OLDFILE} ]] || return 0
174 [[ -L ${OLDFILE} ]] && return 0
175
176 # if the new file already exists, then we have a problem...
177 if [[ -e ${NEWFILE} ]]; then
178 # but if they are the same, then don't worry about it
179 if cmp -s "${OLDFILE}" "${NEWFILE}"; then
180 rm -f "${OLDFILE}"
181 else
182 ewarn "${NEWFILE} already exists, not moving ${OLDFILE}"
183 fi
184 else
185 mv "${OLDFILE}" "${NEWFILE}"
186 fi
187
188 local x y
189 # now move all the unmerged config files as well
190 for x in "${OLDFILE%/*}"/._cfg????_"${OLDFILE##*/}"; do
191 [[ -f ${x} ]] || continue
192 # /etc/schroot/._cfg0000_script-defaults -> /etc/schroot/default/._cfg0000_config
193 y=${x##*/}
194 y=${NEWFILE%*/}${y%${OLDFILE##*/}}${NEWFILE##*/}
195 mv "${x}" "${y}"
196 done
197 }
198
199 pkg_postinst() {
200 local x
201 if ${had_older_1_4_1}; then
202 for x in script:config mount:fstab copyfiles nssdatabases; do
203 if [[ ! -e ${ROOT}etc/schroot/${x%:*}-defaults && -f ${ROOT}etc/schroot/default/${x#*:} ]]; then
204 einfo "Creating compatibility symlink for ${x%:*}-defaults"
205 ln -sf "default/${x#*:}" "${ROOT}etc/schroot/${x%:*}-defaults"
206 fi
207 done
208
209 ewarn "Your config files have been moved to the new location in"
210 ewarn "/etc/schroot/default. Compatibility symlinks have been installed in"
211 ewarn "/etc/schroot, and may be removed if no running chroot refers to them."
212 fi
213 }