summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-04-09 19:12:39 +0200
committerDavid Seifert <soap@gentoo.org>2019-04-09 19:12:39 +0200
commitf7acc146761f5447aa4655a8a485cc74d1ec6fa4 (patch)
treea8a8b2de44ff135c5dc2a779f40f7100c229d702 /net-libs/cvm
parentxfce-extra/xfce4-screensaver: Remove dep on xscreensaver (diff)
downloadgentoo-f7acc146761f5447aa4655a8a485cc74d1ec6fa4.tar.gz
gentoo-f7acc146761f5447aa4655a8a485cc74d1ec6fa4.tar.bz2
gentoo-f7acc146761f5447aa4655a8a485cc74d1ec6fa4.zip
net-libs/cvm: Fix tests and ebuild
Closes: https://bugs.gentoo.org/624384 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'net-libs/cvm')
-rw-r--r--net-libs/cvm/cvm-0.96-r1.ebuild67
-rw-r--r--net-libs/cvm/files/cvm-0.96-fix-test-padding.patch25
2 files changed, 65 insertions, 27 deletions
diff --git a/net-libs/cvm/cvm-0.96-r1.ebuild b/net-libs/cvm/cvm-0.96-r1.ebuild
index c31bc931cc8e..e3493f50322c 100644
--- a/net-libs/cvm/cvm-0.96-r1.ebuild
+++ b/net-libs/cvm/cvm-0.96-r1.ebuild
@@ -7,23 +7,31 @@ inherit toolchain-funcs
DESCRIPTION="Credential Validation Modules by Bruce Guenter"
HOMEPAGE="http://untroubled.org/cvm/"
-SRC_URI="${HOMEPAGE}archive/${P}.tar.gz"
+SRC_URI="http://untroubled.org/cvm/archive/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="mysql postgres test vpopmail"
+RESTRICT="!test? ( test )"
-RDEPEND="dev-db/cdb"
+RDEPEND="
+ dev-db/cdb:=
+ >=dev-libs/bglibs-1.041:="
DEPEND="${RDEPEND}
- >=dev-libs/bglibs-1.041
- mysql? ( dev-db/mysql-connector-c:0= )
- postgres? ( dev-db/postgresql[server] )
- vpopmail? ( net-mail/vpopmail )
- test? ( app-editors/vim dev-db/cdb )"
-# some of the testcases use ex/vi/xxd and cdbmake
-
-MAKEOPTS="${MAKEOPTS} -j1" #310843
+ mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql[server] )
+ vpopmail? ( net-mail/vpopmail )
+ test? (
+ app-editors/vim
+ dev-db/sqlite
+ )"
+# some of the testcases use
+# - ex/vi/xxd
+# - cdbmake
+# - sqlite
+
+PATCHES=( "${FILESDIR}"/${PN}-0.96-fix-test-padding.patch )
src_prepare() {
default
@@ -48,45 +56,54 @@ src_prepare() {
}
src_configure() {
- echo "/usr/include/bglibs" > conf-bgincs
- echo "/usr/$(get_libdir)/bglibs" > conf-bglibs
- echo "/usr/include" > conf-include
- echo "/usr/$(get_libdir)" > conf-lib
- echo "/usr/bin" > conf-bin
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS} -lcrypt" > conf-ld
+ echo "/usr/include/bglibs" > conf-bgincs || die
+ echo "/usr/$(get_libdir)/bglibs" > conf-bglibs || die
+ echo "/usr/include" > conf-include || die
+ echo "/usr/$(get_libdir)" > conf-lib || die
+ echo "/usr/bin" > conf-bin || die
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die
+ echo "$(tc-getCC) ${LDFLAGS} -lcrypt" > conf-ld || die
}
src_compile() {
- emake
+ emake -j1
if use mysql; then
einfo "Building MySQL support"
- emake mysql
+ emake -j1 mysql
fi
if use postgres; then
einfo "Building Postgresql support"
- emake pgsql
+ emake -j1 pgsql
fi
if use vpopmail; then
einfo "Building vpopmail support"
- emake cvm-vchkpw
+ emake -j1 cvm-vchkpw
fi
}
+src_test() {
+ # bug 624384
+ # the test suite tests stuff that isn't potentially enabled
+ emake -j1 sqlite
+ sh tests.sh || die "Testing Failed"
+}
+
src_install() {
# Upstreams installer is incredibly broken
dolib.a .libs/*.a
dolib.so .libs/*.so.*
- for i in a so ; do
+
+ local i
+ for i in a so; do
dosym libcvm-v2client.${i} /usr/$(get_libdir)/libcvm-client.${i}
done
for i in {bench,test}client chain checkpassword pwfile qmail unix \
vmailmgr{,-local,-udp} v1{benchclient,checkpassword,testclient} \
- ; do
+ ; do
dobin .libs/cvm-${i}
done
use mysql && dobin .libs/cvm-mysql{,-local,-udp}
@@ -104,7 +121,3 @@ src_install() {
docinto html
dodoc *.html
}
-
-src_test() {
- sh tests.sh || die "Testing Failed"
-}
diff --git a/net-libs/cvm/files/cvm-0.96-fix-test-padding.patch b/net-libs/cvm/files/cvm-0.96-fix-test-padding.patch
new file mode 100644
index 000000000000..0db28d59553c
--- /dev/null
+++ b/net-libs/cvm/files/cvm-0.96-fix-test-padding.patch
@@ -0,0 +1,25 @@
+The Debian packaging of cvm is maintained using dgit. For the sake
+of an efficient workflow, Debian modifications to the upstream
+source are squashed into a single diff, rather than a series of
+quilt patches. To obtain a patch queue for package version
+0.97-0.1:
+
+ # apt-get install dgit
+ % dgit clone cvm
+ % cd foo
+ % git log --oneline 0.97-0.1..debian/0.97 -- . ':!debian'
+--- a/tests.sh
++++ b/tests.sh
+@@ -674,9 +674,9 @@ system directory: @TMPDIR@/home
+ domain: test.tld
+ mailbox path: @TMPDIR@/home/virt
+
+-0000000: 020a 0108 0100 2430 2470 6173 7300 2e2f ......\$0\$pass../
+-0000010: 7669 7274 0000 002d 002d 002d 002d 0031 virt...-.-.-.-.1
+-0000020: 3031 3637 3331 3335 3800 2d00 016731358.-.
++00000000: 020a 0108 0100 2430 2470 6173 7300 2e2f ......\$0\$pass../
++00000010: 7669 7274 0000 002d 002d 002d 002d 0031 virt...-.-.-.-.1
++00000020: 3031 3637 3331 3335 3800 2d00 016731358.-.
+ END_OF_TEST_RESULTS
+
+