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