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