switch to devel for testing

Package-Manager: portage-2.2.0_alpha188
RepoMan-Options: --force
This commit is contained in:
Mario Fetka 2013-11-22 17:02:11 +01:00
parent 5e17ec7e58
commit c7fea79442
12 changed files with 59 additions and 1231 deletions

View File

@ -1,7 +1,14 @@
# ChangeLog for mail-mta/bongo
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
22 Nov 2013; Mario Fetka <mario.fetka@gmail.com>
+files/bongo-9999-gnutls-1.patch, -bongo-0.4.0.ebuild, -bongo-0.5.2.ebuild,
-bongo-0.6.0.ebuild, -files/bongo-0.5.2-FORTIFY-1.patch,
-files/bongo-missing_link-1.patch, -files/bongo-uninitialized-1.patch,
-files/diff.patch, bongo-0.6.1.ebuild, bongo-9999.ebuild:
switch to devel for testing
25 Jul 2009; Mario Fetka <mario.fetka@gmail.com>
files/bongo-gentoo-1.patch:
correct data dir location
@ -22,4 +29,3 @@
+bongo-0.2.92.ebuild, +bongo-0.2.93.ebuild, +bongo-0.2.94.ebuild,
+bongo-0.3.0.ebuild:
initial checkin based on dostrow@gentoo.org ebuilds

View File

@ -1,24 +1,15 @@
AUX 70bongo 30 RMD160 f88bfbb75ec6605b5df06aed861a13b01c094466 SHA1 f1d44d8fab4e7495ec38e85047f7e800cdfc1965 SHA256 d0ee5aef8f668f6341f2a7fa61b758c62ab5f4e81ef252e9fa4858ed09eea12e
AUX bongo-0.5.2-FORTIFY-1.patch 1660 RMD160 ee7c9d7b5a5ee617cf99cc6e20d4afc371f9697b SHA1 bd71608e91409bd75608d02c42b8600d8ee96bc6 SHA256 082bd297183567705ef7dadb3b0b6c9fa1f8ac88ff3c1e92dbfea20b24db2dea
AUX bongo-0.6.0-missing_link-1.patch 554 RMD160 76ff65b68e8318586be50bea6839e542ea7fe5e6 SHA1 82d22f6066cf58b1b84b8cd4a7b1df0a4a45cb2b SHA256 c8127ae191fd717364f17ed2c2b0684725b5ca209ea06a3c972494674940af9c
AUX bongo-0.6.0-uninitialized-1.patch 873 RMD160 e712e43cfff94ba2c7f316b7c1b046ccb209b8d6 SHA1 ef9af7879178992cfb138ddf8567de5e3f251fc9 SHA256 c7aa6dcb5396a0daedf8bd3f2862ed9ca57a425e476d732469400f936895c47c
AUX bongo-FORTIFY-1.patch 781 RMD160 c0b8cb173aa181f8d04eef6eaf9b2d56704a8d57 SHA1 74f19dc40a0a1a4a5f6d62eb99b042f551afee41 SHA256 6c0ef168e8396322c6ea5fd45d729b87e7d3e7b23a725c39ee33ff912aba8e5d
AUX bongo-gentoo-1.patch 809 RMD160 8e30e3aeec3bee2fe1fac1d37f920f18a28ac9eb SHA1 c0429f22057c50b27164a051a1874119fe93b9ea SHA256 b03d946b1dbd3912f6b80c2a8a2ba63301000639a3806116fcb7d4b1f0d5fa37
AUX bongo-missing_link-1.patch 536 RMD160 9070f9cc62a2f11490b27db6fa029b42cf5ff38b SHA1 1f3dcff8c1479fcbaf2ebb56da0bfa9e7772c4f3 SHA256 8adddf778f4be64b4f1873ab671cee6065a2b125269e3c101e323a0717d02434
AUX bongo-return_value-1.patch 1061 RMD160 c9445a78f5a45b183a26f8873765384054802f2e SHA1 b6355acad0c45779e01fca68c424c334b940226a SHA256 188e34125343b10eab4dee9113437daf98b4142948ea1c05fd6d810853d17baf
AUX bongo-uninitialized-1.patch 898 RMD160 cdcb340d5f3f47cf1ab76efc1492bccc64030c39 SHA1 53d656689f82968470c642cea92e538c74bead02 SHA256 e091a5eefe1ea3f1292253a0509d51f0b7d3b75eb40cd62f0f2f625a50585e2c
AUX bongo.conf.d 319 RMD160 52a3753da81e87716d80091fe09ac2a6027123b2 SHA1 c40625f749819ae138372e917562734cdc47afba SHA256 6e1386658d9751f892d1dbb7f43f3606b40200f702d5c26d1592ab327f6205e8
AUX bongo.init 795 RMD160 17822d677d9861994229d7154bddec29221cc11c SHA1 e017a66f80afd34956d3679b92c287f5ee1aa418 SHA256 61b4bd024eda1bda2cbb095d7b7e43df4c3007715a9b331e9638d8e9a11bd234
AUX diff.patch 21904 RMD160 ebee032b78eb464398a853f3be85e020399d8bb6 SHA1 03efe5360028e016f4907a7aa318e57b8604bda8 SHA256 542a06b45f2c63560f62accf8859bc5e740898fab69357e60a56876f9a17c619
AUX mailer.conf 301 RMD160 5fd76d7292dd4df1157c76c612167b741daed16a SHA1 4f5cabe3cefa47847cfb65d834ac11af477bedf8 SHA256 36f457545e77902a195e111fbec2bff272f21d53113d9be34d826630616dc0da
DIST bongo-0.4.0.tar.bz2 2816258 RMD160 ede8c4fb31b8c35c31a441d168f4ec7b4a553021 SHA1 7bfc4fc145ad9395605afe7fa99fecf63e2260e9 SHA256 031ed931324e9d4757fc237768a0ebc8d30729808256b729c7029a290c1ff493
DIST bongo-0.5.2.tar.bz2 3832896 RMD160 cbff75893e5ed5e314a7a97176e10b8b8c78d3ee SHA1 403d00d25c128b2f27317c4fce273b0e111ac0ac SHA256 af806a7cd460e4f82543fcebdc6e4115174f37933489e2a9cc52cac91e526981
DIST bongo-0.6.0.tar.bz2 2137340 RMD160 8b2608d3c55a5f5e014b394853ee3d0f9ab8a144 SHA1 28432b6f7862910d60d788cea65999128880cb47 SHA256 0056368fc2587d7359b0ce6db792edc4265741e2ef8cd3677ca94235bd282802
DIST bongo-0.6.1.tar.bz2 2138050 RMD160 ace50053abacca518153614f056e74d077057b01 SHA1 43c317faa5a49be852f33fa0bf58a285e2c21cc4 SHA256 61f0d739fb95ec32a902c31fcb9b9baeab08f8524b1c921bea6ff70eafbe645a
EBUILD bongo-0.4.0.ebuild 2570 RMD160 3702df4ea32aa1e44cdc52021f88398050abdff2 SHA1 37950ace979eb79942d836bdded84c33be4d1826 SHA256 de01a8c4c7c19f8145c9cede31b414d6572ae7eaf2a20a6a15c3b888de3b8dce
EBUILD bongo-0.5.2.ebuild 2481 RMD160 745219f83c9c86eabd7af123d91ffc6ac26ecf0f SHA1 839e0da2ffb67e03e7af17481db322de76ddafaf SHA256 0f55dcfed99b24bac53c46ac033c4af051c7cf295603017a319bffe07da0aebb
EBUILD bongo-0.6.0.ebuild 2425 RMD160 d520b01f9d06fe80f102f3d7c6b50bea7377d723 SHA1 24f4a0eed69bf5daa88cde0c44329892f5e6a831 SHA256 52b672d47b821d927c24c2f7507cdc877170396660c05d190c774298df5ecb81
EBUILD bongo-0.6.1.ebuild 2436 RMD160 786dc7387bf992d686174e40649504180ab8070e SHA1 dfc8031e8da9096a77173eac72d36c4b0f8c0d50 SHA256 445f9391120a061fe944bffcb9e1c857bde050a62500c0d8248fc29dd19d28b7
EBUILD bongo-9999.ebuild 2421 RMD160 2fe481b2a9f8a30abe9d2ae99882786e3670c3d7 SHA1 e6cc64e1a63f3f86fbd8919fdfac740ecd3b9e72 SHA256 5f73ee515833c405a4ae85a2a96f396edf91efa8d29336c9c84168c613492ec4
MISC ChangeLog 958 RMD160 307b0c4864cd642dfa1b7cc0b96681f551c60d94 SHA1 f062991e06a90ba40a9a6648a7cb5455987b6fb6 SHA256 c48dee27cff3bfdcc17bb3a4258dc446cd8b12cdec2efb86e75f9381a3577b10
MISC metadata.xml 224 RMD160 a75b1683331a8874b18170c82f559bce6877f626 SHA1 da1ebf5ff592428b014945c5ccd1316778f39092 SHA256 de22a32e0eb75abae4c9d09b297c10d3597e4162861d73140fa6db97aa61f02f
AUX 70bongo 30 SHA256 d0ee5aef8f668f6341f2a7fa61b758c62ab5f4e81ef252e9fa4858ed09eea12e SHA512 38c1e9f7268c248461239b1d96a418763906281a735dc242b4fefbcecb1811f9960fa8162563054a50fef86b971d604098970282b165dc635b4615664be7c80c WHIRLPOOL 805d03497ce2e10408522f9bd71473b221c325ceec924977f80ff8bf5f120869d5c738254c6888bec385034c9ee1fe626a4ac7336e14df224e7af17da7c492c3
AUX bongo-0.6.0-missing_link-1.patch 554 SHA256 c8127ae191fd717364f17ed2c2b0684725b5ca209ea06a3c972494674940af9c SHA512 1abc4ab199bae793c861d516471c9fdcb9bbd0479fbe9644882d4cc57f3752b636fcd60344c79e1c8c33c973f0b14ca2ff64cb5159756189607ae16b9ca2cc1d WHIRLPOOL 21f8fd76f499fd63bd6f42dec9b9980a113b999e0d7b46482606e5404f1f40e6a70b0ea94d8dba76fad602ff1e34e428c41528b75872569a70a40357e77a8b00
AUX bongo-0.6.0-uninitialized-1.patch 873 SHA256 c7aa6dcb5396a0daedf8bd3f2862ed9ca57a425e476d732469400f936895c47c SHA512 0f9fff3e933c9bf665b45d413d6001c9077eadc197f2132defc053fefb419b1f60d0ec358a654b25c22d08b03c449172db1e7ea6698d92e7acc36c288d31ed72 WHIRLPOOL 309b39f6662a19c8e05b1c181f1d9fe546d85e4f6b0b232d475f4cf65990ee32fbf7d0c64275a26b78a4229f686f2d8c930e7cfb9f36087598ddae4c93519052
AUX bongo-9999-gnutls-1.patch 1415 SHA256 fbeb95dc9dcb02a6030c904ec8e98311d8c0bdaeca543afa73603f44a3fc9186 SHA512 488be5976c9911a8f3b1d6d35a8c79ee3729404e5bddd94c68c7d850697be22392b16743e29a59d20d8fcb42656b13f4ac8a9831b318d12e12523410883cf71c WHIRLPOOL 22e74be7daa419aed2f50572cbe3a9cedc49b3f8fc0af6d155d8aa8fde1d155640eb5d69d301ab121b8ada378da4f4bcfca1bfb993027dbbf537464f51a4b274
AUX bongo-FORTIFY-1.patch 781 SHA256 6c0ef168e8396322c6ea5fd45d729b87e7d3e7b23a725c39ee33ff912aba8e5d SHA512 a2cd133ae5033ecfb4edded02a6ea3e6d4c2c190dd6f6000636a72ba03100c0951a0f7fe9059f0c335471c91c400b7f24da7f11c198648bd14da22809f0b6bf5 WHIRLPOOL 62ddad77a9c710152e3a61221fd7bba819a2a4d26648917b647181a0a9907464e934496b2e00ce6300205c7d8f404f3d7af518f6915bb4b499c49564ebdb672b
AUX bongo-gentoo-1.patch 809 SHA256 b03d946b1dbd3912f6b80c2a8a2ba63301000639a3806116fcb7d4b1f0d5fa37 SHA512 939a0abc64e741d86e805a9011721bac05425a4446216bdfb89841d15da17501699f99254ff11a1db34280baf44449653b834349798a2e4d0ecd489b795830e6 WHIRLPOOL f6efda3c8c3ca9b263a150a3b2e574d6fc5f261f350eed296252d28b8021cc48fcd11b99c36a4dfa66bb9111c909d4b9ff0b3fbb42e71131830ffbedacf07323
AUX bongo-return_value-1.patch 1061 SHA256 188e34125343b10eab4dee9113437daf98b4142948ea1c05fd6d810853d17baf SHA512 ce92f5dbc27e78c9dac992222b111072d160ca6652e03a435acaeedb1ab2cb2484e11f32ef160b326521734a61fd4e0406ff3e7be26ea4e174973cc44359d7ec WHIRLPOOL e1d03683fc56dee63ae8ad9bf3e2dc3fc5aee08bc9340659f34e5ca139711a1267924bf3e67023677e3614ff5195fe0597ee7eee57972ed568552fe3eeea7023
AUX bongo.conf.d 319 SHA256 6e1386658d9751f892d1dbb7f43f3606b40200f702d5c26d1592ab327f6205e8 SHA512 2fb3dc879d7a6c96c28eba3c4e2163f79d74b09ad8ad565d8f078d66a6bef0826ca00623d4ec9117b2ebcd363c5f184393c6cf1c051bf5f9db9d6426290693b2 WHIRLPOOL bcbf9385819045def1b2ccfee35865dfa2a906b3815740518f72c23c22a8ad161c728e6e711336a7521a3c2ad9ce73825bea3e2d9a3f6cb2d610042d9f2682c1
AUX bongo.init 795 SHA256 61b4bd024eda1bda2cbb095d7b7e43df4c3007715a9b331e9638d8e9a11bd234 SHA512 fa8129ad5969187ca36d7edaa56d83aceb480fd5241fdae22b041242d6c98ead46fd79e15efc9ec102e88dcddba19f650dbd9ef8619ab4cb4b0b4a629a0760d9 WHIRLPOOL 18c8654a40dad69c14e32a11e3213899ebf7a4da2aa482832f8d17e1e3f63ee0186fcb6836801516a85d67eba42035eac7e3ac9f9842b9c5822f4fb2d34d8ee5
AUX mailer.conf 301 SHA256 36f457545e77902a195e111fbec2bff272f21d53113d9be34d826630616dc0da SHA512 ee02584838312730277150605206c6963035e958f7c2c3327d882cbadc343a21fd2fa2ddd9af43021cc6573f27080f2dd574c9aca6b294efa3d720966751cf47 WHIRLPOOL 63e6c72afbd719bce1297f26d17ab533ea2b03effe87c2e54a3bb4723e3141cd6c0bd52d37bc6be536f6a5c55d88e68eb848e107821b0ded31042bff2430f75c
DIST bongo-0.6.1.tar.bz2 2138050 SHA256 61f0d739fb95ec32a902c31fcb9b9baeab08f8524b1c921bea6ff70eafbe645a SHA512 d865a6f5fec1704fcbf1eeb85e0039c921d21eaea09f1d39497d431651659bcb6b0b3df4d2862bc7465853161111c295251804e88caf4d47e86d1dc554dc035c WHIRLPOOL 75d1efedcb0488f32998f5b25dfee005097b81d4956e5f1d47dc517e58fc331dcea01ab588ea12e242801b2dedbf32e7a2073a2c061e081314a8c9962d10c4ec
EBUILD bongo-0.6.1.ebuild 2391 SHA256 38418d25a201bdc0633becc137792f53875cb84d0bb2c7b1526356423cfcb29a SHA512 bd9c8dc187e5191378b83ec155690c6e6d597e0bd12d937f559796ad8b8a8a1ee61bea022a8079717cfb47dc6aec9d53f3157a82f0b911324a00df3ce1480f5b WHIRLPOOL 28969fb7d7d95da93ceb5752c60bdcbbb17030f0384ec8f4dfc4e831f443264de57942e8c8d61b20077500a4e8ae7819bd4e60f67ee725f04cfdddef49f34dc0
EBUILD bongo-9999.ebuild 2249 SHA256 31b84c13f81757bfaa3b4a307529b36dc599c84fd71d95676692a47bf83d557a SHA512 e7efb530706f0c2fb2eb7e7a59b61d40b043b94b8721610421207fa1d6fe9a80fdb9503c38a3d217443d696295cb63809ae15a8d250d48e3756d0f26db5fe96e WHIRLPOOL f0eed28785c1fbe7801bf7889d7caf20ba8aecd3d45228015bf66b5c13409187dbdd42c1b1f56f99c1d88aa7c3fd439f8f3076053a0ee9e03b831909deeec9ca
MISC ChangeLog 1309 SHA256 6dd7ccee83ddf609c196e9cb97451efa45e116885ff44a91707ec6bd7cd1aca2 SHA512 d4c3b0429331870e84419f56a2db2a2f902b0c914151ffe1fba6f99dbcf381226ab1aa17362502e1fdfd83541c3ffecc79e47f21673f3e73512c563d3ef6a378 WHIRLPOOL 1737a42624e9becb0dc1e5813b9a1a4b05429bece3c031174f1b3367bcfd91c143cfff4b70da0fd2cecd5fc6caacb1c6328a0d28b3ef27b7eb2f112d069e4323
MISC metadata.xml 224 SHA256 de22a32e0eb75abae4c9d09b297c10d3597e4162861d73140fa6db97aa61f02f SHA512 6e637fe86cddaf3b25414ef3abf6acd5022cff502efac29b0330b4de1296f61df464c749129233985befbb0191c6fe6abbeb08ecb9cb666283d15d887e14c86e WHIRLPOOL 936cb09b8e8b35ef705d9bc1e888eb8d8d00453166b708536bc2bcf1890130ef91c981f7d7f76520203a7d2f91a85d8db0e3b7c8d0e1b3c4236f246468a327ee

View File

@ -1,107 +0,0 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils mailer multilib flag-o-matic
DESCRIPTION="A calendar and webmail application, which includes its own MTA"
SRC_URI="http://download.gna.org/bongo/release/${P}.tar.bz2"
HOMEPAGE="http://bongo-project.org/"
LICENSE="LGPL-2"
SLOT="0"
IUSE="libgcrypt"
KEYWORDS="-alpha ~amd64 ~arm ~hppa -ia64 -mips ~ppc -ppc64 ~s390 ~sh ~x86"
RDEPEND="net-nds/openldap
net-libs/gnutls
dev-cpp/clucene
net-misc/curl
>=dev-db/sqlite-3
libgcrypt? ( dev-libs/libgcrypt )"
DEPEND="${RDEPEND}"
pkg_setup() {
enewgroup bongo
enewuser bongo -1 -1 -1 bongo
filter-ldflags -Wl,--as-needed --as-needed
}
src_compile() {
use libgcrypt && myconf="${myconf} --with-libgcrypt-prefix=/usr"
./configure \
--prefix=/usr \
--with-user=bongo \
--localstatedir=/var/lib \
--sysconfdir=/etc \
--libdir=/usr/$(get_libdir) \
--with-clucene=/usr \
--with-sqlite3=/usr \
--with-libcurl=/usr \
${myconf} || die
emake || die "emake failed"
}
src_install() {
make DESTDIR=${D} install || die "make failed"
dodir /etc/init.d
exeinto /etc/init.d
newexe ${FILESDIR}/bongo.init bongo
dodir /etc/conf.d
insinto /etc/conf.d
newins ${FILESDIR}/bongo.conf.d bongo
dodir /etc/env.d
insinto /etc/env.d
newins ${FILESDIR}/70bongo 70bongo
dodir /var/lib/bongo
keepdir /var/lib/bongo
fowners bongo:bongo /var/lib/bongo
fperms 770 /var/lib/bongo
dodir /var/run/bongo
keepdir /var/run/bongo
fowners bongo:bongo /var/run/bongo
fperms 770 /var/run/bongo
if use mailwrapper ; then
dosym /usr/sbin/bongo-sendmail /usr/bin/sendmail.bongo-sendmail
dosym /usr/sbin/bongo-sendmail /usr/bin/mailq.bongo-sendmail
dosym /usr/sbin/bongo-sendmail /usr/bin/newaliases.bongo-sendmail
mailer_install_conf
else
dosym /usr/sbin/bongo-sendmail /usr/sbin/sendmail
dosym /usr/sbin/bongo-sendmail /usr/lib/sendmail
dosym /usr/sbin/bongo-sendmail /usr/bin/sendmail
dosym /usr/sbin/bongo-sendmail /usr/sbin/mailq
dosym /usr/sbin/bongo-sendmail /usr/sbin/newaliases
fi
}
pkg_postinst() {
elog "Bongo must be setup."
elog "Please run:"
elog " emerge /usr/sbin/bongo-setup"
elog ""
elog "For more information on bongo-setup run /usr/sbin/bongo-setup --help"
elog ""
elog "After bongo is set up run /etc/init.d/bongo start to start the service"
elog ""
elog "The default login settings are as follows:"
elog "username: admin"
elog "password: bongo"
}
pkg_config() {
einfo "Setting up Bongo..."
/usr/sbin/bongo-setup
}

View File

@ -1,112 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit eutils multilib flag-o-matic autotools
DESCRIPTION="A calendar and webmail application, which includes its own MTA"
SRC_URI="http://download.gna.org/bongo/release/${P}.tar.bz2"
HOMEPAGE="http://bongo-project.org/"
LICENSE="LGPL-2"
SLOT="0"
IUSE="libgcrypt"
KEYWORDS="-alpha ~amd64 ~arm ~hppa -ia64 -mips ~ppc -ppc64 ~s390 ~sh ~x86"
# regular ebuild
PROVIDE="virtual/mta virtual/mda"
DEPEND="net-nds/openldap
net-libs/gnutls
dev-cpp/clucene
net-misc/curl
>=dev-db/sqlite-3
>=dev-libs/libical-0.40
dev-python/lxml
libgcrypt? ( dev-libs/libgcrypt )"
RDEPEND="${DEPEND}
>=net-mail/mailbase-0.00
!virtual/mta
!net-mail/mailwrapper"
pkg_setup() {
enewgroup bongo
enewuser bongo -1 -1 -1 bongo
# filter-ldflags -Wl,--as-needed --as-needed
}
src_prepare() {
rm -rf import/libical import/sqlite3
epatch ${FILESDIR}/bongo-0.5.2-FORTIFY-1.patch
eautoreconf
}
src_compile() {
use libgcrypt && myconf="${myconf} --with-libgcrypt-prefix=/usr"
econf --with-user=bongo \
--with-clucene=/usr \
--with-sqlite3 \
--with-libcurl \
${myconf} || die
emake || die "emake failed"
}
src_install() {
make DESTDIR=${D} install || die "make failed"
dodir /etc/init.d
exeinto /etc/init.d
newexe ${FILESDIR}/bongo.init bongo
dodir /etc/conf.d
insinto /etc/conf.d
newins ${FILESDIR}/bongo.conf.d bongo
dodir /etc/env.d
insinto /etc/env.d
newins ${FILESDIR}/70bongo 70bongo
dodir /var/lib/bongo
keepdir /var/lib/bongo
fowners bongo:bongo /var/lib/bongo
fperms 770 /var/lib/bongo
dodir /var/run/bongo
keepdir /var/run/bongo
fowners bongo:bongo /var/run/bongo
fperms 770 /var/run/bongo
dosym /usr/sbin/bongo-sendmail /usr/sbin/sendmail
dosym /usr/sbin/bongo-sendmail /usr/lib/sendmail
dosym /usr/sbin/bongo-sendmail /usr/bin/sendmail
dosym /usr/sbin/bongo-sendmail /usr/sbin/mailq
dosym /usr/sbin/bongo-sendmail /usr/sbin/newaliases
}
pkg_postinst() {
elog "Bongo must be setup."
elog "Please run:"
elog " emerge /usr/sbin/bongo-setup"
elog ""
elog "For more information on bongo-setup run /usr/sbin/bongo-setup --help"
elog ""
elog "After bongo is set up run /etc/init.d/bongo start to start the service"
elog ""
elog "The default login settings are as follows:"
elog "username: admin"
elog "password: bongo"
}
pkg_config() {
einfo "Setting up Bongo..."
/usr/sbin/bongo-setup
}

View File

@ -1,107 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
#ESVN_REPO_URI="http://svn.gna.org/svn/${PN}/trunk"
inherit eutils multilib flag-o-matic cmake-utils
DESCRIPTION="A calendar and webmail application, which includes its own MTA"
SRC_URI="http://download.gna.org/bongo/release/${P}.tar.bz2"
HOMEPAGE="http://bongo-project.org/"
LICENSE="LGPL-2"
SLOT="0"
IUSE=""
KEYWORDS=""
RESTRICT="stip"
# regular ebuild
PROVIDE="virtual/mta virtual/mda"
DEPEND="virtual/libc
>=dev-db/sqlite-3
dev-db/unixODBC
>=dev-lang/python-2.3
>=dev-libs/glib-2.10
>=dev-libs/gmime-2.0
dev-libs/libgcrypt
>=dev-libs/libical-0.40
dev-libs/log4c
net-libs/gnutls
dev-python/lxml
net-misc/curl
net-nds/openldap"
RDEPEND="${DEPEND}
>=net-mail/mailbase-0.00
!virtual/mta
!net-mail/mailwrapper"
mycmakeargs="-DBONGO_USER=bongo
-DCMAKE_BUILD_TYPE=Release
-DDEBUG=Off"
pkg_setup() {
enewgroup bongo
enewuser bongo -1 -1 -1 bongo
# filter-ldflags -Wl,--as-needed --as-needed
}
src_prepare() {
epatch ${FILESDIR}/bongo-FORTIFY-1.patch
epatch ${FILESDIR}/bongo-0.6.0-missing_link-1.patch
epatch ${FILESDIR}/bongo-0.6.0-uninitialized-1.patch
epatch ${FILESDIR}/bongo-return_value-1.patch
epatch ${FILESDIR}/bongo-gentoo-1.patch
}
src_install() {
cmake-utils_src_install
newinitd ${FILESDIR}/bongo.init bongo
newconfd ${FILESDIR}/bongo.conf.d bongo
newenvd ${FILESDIR}/70bongo 70bongo
dodir /var/lib/bongo
keepdir /var/lib/bongo
fowners bongo:bongo /var/lib/bongo
fperms 770 /var/lib/bongo
dodir /var/run/bongo
keepdir /var/run/bongo
fowners bongo:bongo /var/run/bongo
fperms 770 /var/run/bongo
dosym /usr/sbin/bongo-sendmail /usr/sbin/sendmail
dosym /usr/sbin/bongo-sendmail /usr/lib/sendmail
dosym /usr/sbin/bongo-sendmail /usr/bin/sendmail
dosym /usr/sbin/bongo-sendmail /usr/sbin/mailq
dosym /usr/sbin/bongo-sendmail /usr/sbin/newaliases
}
pkg_postinst() {
elog "Bongo must be setup."
elog "Please run:"
elog " emerge /usr/sbin/bongo-config install"
elog ""
elog "For more information on bongo-config run /usr/sbin/bongo-config --help"
elog ""
elog "After bongo is set up run /etc/init.d/bongo start to start the service"
elog ""
elog "The default login settings are as follows:"
elog "username: admin"
elog "password: bongo"
}
pkg_config() {
einfo "Setting up Bongo..."
/usr/sbin/bongo-config install
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2009 Gentoo Foundation
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@ -19,12 +19,9 @@ SLOT="0"
IUSE=""
KEYWORDS="~x86 ~amd64"
KEYWORDS="~amd64 ~arm ~x86"
RESTRICT="stip"
# regular ebuild
PROVIDE="virtual/mta virtual/mda"
DEPEND="virtual/libc
>=dev-db/sqlite-3
dev-db/unixODBC
@ -41,8 +38,8 @@ DEPEND="virtual/libc
RDEPEND="${DEPEND}
>=net-mail/mailbase-0.00
!virtual/mta
!net-mail/mailwrapper"
!net-mail/mailwrapper
virtual/logger"
mycmakeargs="-DBONGO_USER=bongo
-DCMAKE_BUILD_TYPE=Release

View File

@ -1,4 +1,4 @@
# Copyright 1999-2009 Gentoo Foundation
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@ -19,12 +19,9 @@ SLOT="0"
IUSE=""
KEYWORDS=""
KEYWORDS="~amd64 ~arm ~x86"
RESTRICT="stip"
# regular ebuild
PROVIDE="virtual/mta virtual/mda"
DEPEND="virtual/libc
>=dev-db/sqlite-3
dev-db/unixODBC
@ -41,8 +38,8 @@ DEPEND="virtual/libc
RDEPEND="${DEPEND}
>=net-mail/mailbase-0.00
!virtual/mta
!net-mail/mailwrapper"
!net-mail/mailwrapper
virtual/logger"
mycmakeargs="-DBONGO_USER=bongo
-DCMAKE_BUILD_TYPE=Debug
@ -55,10 +52,7 @@ pkg_setup() {
}
src_prepare() {
epatch ${FILESDIR}/bongo-FORTIFY-1.patch
epatch ${FILESDIR}/bongo-missing_link-1.patch
epatch ${FILESDIR}/bongo-uninitialized-1.patch
epatch ${FILESDIR}/bongo-return_value-1.patch
epatch ${FILESDIR}/bongo-9999-gnutls-1.patch
epatch ${FILESDIR}/bongo-gentoo-1.patch
}

View File

@ -1,43 +0,0 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2009-07-23
Initial Package Version: 0.5.2
Origin: me
Upstream Status: unknown
Description: correct O_CREATE
diff -Naur bongo-0.5.2.orig/src/agents/store/command.c bongo-0.5.2/src/agents/store/command.c
--- bongo-0.5.2.orig/src/agents/store/command.c 2009-07-23 16:43:41.485329662 +0000
+++ bongo-0.5.2/src/agents/store/command.c 2009-07-23 17:18:36.470702487 +0000
@@ -2864,7 +2864,7 @@
// put content in place
FindPathToDocument(client, collection->guid, newdocument.guid, path, sizeof(path));
- link(tmppath, path);
+ if( link(tmppath, path)) {}
unlink(tmppath);
// save new object
diff -Naur bongo-0.5.2.orig/src/agents/store/store.c bongo-0.5.2/src/agents/store/store.c
--- bongo-0.5.2.orig/src/agents/store/store.c 2009-07-23 16:43:41.480700081 +0000
+++ bongo-0.5.2/src/agents/store/store.c 2009-07-23 17:20:41.960822704 +0000
@@ -573,7 +573,7 @@
return;
}
RemoveCurrentDirectory();
- fchdir(cwd);
+ if (fchdir(cwd)) {}
}
BongoJsonResult
diff -Naur bongo-0.5.2.orig/src/libs/nmap/bongoagent.c bongo-0.5.2/src/libs/nmap/bongoagent.c
--- bongo-0.5.2.orig/src/libs/nmap/bongoagent.c 2009-07-23 16:43:41.575606246 +0000
+++ bongo-0.5.2/src/libs/nmap/bongoagent.c 2009-07-23 16:52:23.604934672 +0000
@@ -55,7 +55,7 @@
const int buff_size = 50;
snprintf(path, XPL_MAX_PATH, "%s/guru-meditation-%d", XPL_DEFAULT_WORK_DIR, (int)time(NULL));
- boomfile = open(path, O_CREAT | O_WRONLY);
+ boomfile = open(path, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
if (boomfile != -1) {
void * const buffer[buff_size];
int buff_used;

View File

@ -0,0 +1,27 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2013-11-22
Initial Package Version: SVN revision 1357
Origin: me
Upstream Status: unknown
Description: Update gnu tls code to new gnutls
diff -uNr bongo-9999.orig/src/libs/connio/connio.c bongo-9999/src/libs/connio/connio.c
--- bongo-9999.orig/src/libs/connio/connio.c 2013-11-22 14:18:34.690789354 +0100
+++ bongo-9999/src/libs/connio/connio.c 2013-11-22 14:19:04.493416770 +0100
@@ -77,14 +77,14 @@
/* store in the credetials loaded earler */
ccode = gnutls_credentials_set(conn->ssl.context, GNUTLS_CRD_CERTIFICATE, context->cert_cred);
} else {
- const int cert_type_priority[4] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
+ /* const int cert_type_priority[4] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; */
/* defaults are ok here */
gnutls_set_default_priority (conn->ssl.context);
/* store the priority for x509 or openpgp out there
* i doubt that openpgp will be used but perhaps there is a server that supports it */
- gnutls_certificate_type_set_priority (conn->ssl.context, cert_type_priority);
+ gnutls_set_default_priority (conn->ssl.context);
gnutls_certificate_allocate_credentials (&conn->ssl.credentials);
gnutls_certificate_set_x509_trust_file (conn->ssl.credentials, XPL_DEFAULT_CERT_PATH, GNUTLS_X509_FMT_PEM);

View File

@ -1,18 +0,0 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2009-07-24
Initial Package Version: svn rev 1129
Origin: me
Upstream Status: unknown
Description: add missing link
diff -Naur bongo-9999.orig/src/libs/cal/CMakeLists.txt bongo-9999/src/libs/cal/CMakeLists.txt
--- bongo-9999.orig/src/libs/cal/CMakeLists.txt 2009-07-24 19:09:04.282134900 +0000
+++ bongo-9999/src/libs/cal/CMakeLists.txt 2009-07-24 19:09:25.767662534 +0000
@@ -23,6 +23,7 @@
bongoxpl
bongoutil
bongomemmgr
+ bongojson
${LIBICAL_LIBRARIES}
)

View File

@ -1,21 +0,0 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2009-07-24
Initial Package Version: svn rev 1129
Origin: me
Upstream Status: unknown
Description: correct some uninitalized vars
diff -Naur bongo-9999.orig/src/agents/antispam/spamd.c bongo-9999/src/agents/antispam/spamd.c
--- bongo-9999.orig/src/agents/antispam/spamd.c 2009-07-24 19:20:10.580512815 +0000
+++ bongo-9999/src/agents/antispam/spamd.c 2009-07-24 19:27:01.580367405 +0000
@@ -346,8 +346,8 @@
for (i=0; i < ASpam.spamd.hostlist->len; i++) {
char *hostitem = g_array_index(ASpam.spamd.hostlist, char*, i);
char *lHost = MemStrdup(hostitem);
- char *host;
- int port, weight;
+ char *host = host;
+ int port = 0 , weight = 0;
ParseHost(lHost, &host, &port, &weight);
ConnAddressPoolAddHost(&ASpam.spamd.hosts, host, port, weight);
MemFree(lHost);

View File

@ -1,779 +0,0 @@
Index: include/connio.h
===================================================================
--- include/connio.h (revision 1131)
+++ include/connio.h (working copy)
@@ -80,8 +80,11 @@
#define SSL_DISABLE_EMPTY_FRAGMENTS (1 << 4)
#define SSL_DONT_INSERT_EMPTY_FRAGMENTS (1 << 5)
-void CHOP_NEWLINE(unsigned char *s);
-void SET_POINTER_TO_VALUE(unsigned char *p, unsigned char *s); // FIXME: Unused?
+void CHOP_NEWLINE(char *s);
+#if 0
+//TODO: do we need this?
+void SET_POINTER_TO_VALUE(unsigned char *p, unsigned char *s);
+#endif
#if defined (UNIX) || defined(S390RH) || defined(SOLARIS)
@@ -138,12 +141,12 @@
struct {
long type;
- const unsigned char *file;
+ const char *file;
} certificate;
struct {
long type;
- const unsigned char *file;
+ const char *file;
} key;
} ConnSSLConfiguration;
@@ -227,9 +230,9 @@
#include <connio-trace.h>
-void ConnTcpWrite(Connection *c, char *b, size_t l, int *r);
-void ConnTcpRead(Connection *c, char *b, size_t l, int *r);
-void ConnTcpFlush(Connection *c, const char *b, const char *e, int *r);
+int ConnTcpWrite(Connection *c, char *b, size_t l, size_t *r);
+int ConnTcpRead(Connection *c, char *b, size_t l, size_t *r);
+int ConnTcpFlush(Connection *c, const char *b, const char *e, size_t *r);
void ConnTcpClose(Connection *c);
void ConnAddressPoolStartup(AddressPool *pool, unsigned long errorThreshold, unsigned long errorTimeThreshold);
@@ -304,10 +307,13 @@
int XplGetInterfaceList(void);
int XplDestroyInterfaceList(void);
+#if 0
+//TODO: Do we need these? They aren't used anywhere but connmgr */
int XplIPRead(void *sktCtx, unsigned char *Buf, int Len, int socketTimeout);
int XplIPReadSSL(void *sktCtx, unsigned char *Buf, int Len, int socketTimeout);
int XplIPWrite(void *sktCtx, unsigned char *Buf, int Len);
int XplIPWriteSSL(void *sktCtx, unsigned char *Buf, int Len);
+#endif
int XplIPConnectWithTimeout(IPSOCKET soc, struct sockaddr *addr, long addrSize, long timeout);
#endif /* _BONGO_CONNIO_H */
Index: src/libs/connio/connio.c
===================================================================
--- src/libs/connio/connio.c (revision 1131)
+++ src/libs/connio/connio.c (working copy)
@@ -114,7 +114,7 @@
gnutls_dh_params_init(&dh_params);
genparams = fopen(XPL_DEFAULT_DHPARAMS_PATH, "r");
if (genparams) {
- char tmpdata[2048];
+ unsigned char tmpdata[2048];
gnutls_datum dh_parameters;
dh_parameters.size = fread(tmpdata, 1, sizeof(tmpdata)-1, genparams);
@@ -137,7 +137,7 @@
gnutls_rsa_params_init(&rsa_params);
genparams = fopen(XPL_DEFAULT_RSAPARAMS_PATH, "r");
if (genparams) {
- char tmpdata[2048];
+ unsigned char tmpdata[2048];
gnutls_datum rsa_parameters;
rsa_parameters.size = fread(tmpdata, 1, sizeof(tmpdata)-1, genparams);
@@ -285,8 +285,8 @@
}
if (ccode != -1) {
- ccode = sizeof(conn->socketAddress);
- IPgetsockname(conn->socket, (struct sockaddr *)&(conn->socketAddress), &ccode);
+ socklen_t len = sizeof(conn->socketAddress);
+ IPgetsockname(conn->socket, (struct sockaddr *)&(conn->socketAddress), &len);
} else {
IPclose(conn->socket);
conn->socket = -1;
@@ -335,6 +335,8 @@
{
int ccode;
+ UNUSED_PARAMETER(destination);
+
conn->socket = IPsocket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (conn->socket != -1) {
if (!saddr) {
@@ -583,7 +585,7 @@
int ConnAccept(Connection *Server, Connection **Client)
{
- int length;
+ socklen_t length;
Connection *c = ConnAlloc(TRUE);
if (c) {
@@ -609,7 +611,7 @@
int
ConnSend(Connection *Conn, char *Buffer, unsigned int Length)
{
- int count;
+ size_t count;
ConnTcpWrite(Conn, Buffer, Length, &count);
@@ -619,7 +621,7 @@
int
ConnReceive(Connection *Conn, char *Buffer, unsigned int Length)
{
- int count;
+ size_t count;
ConnTcpRead(Conn, Buffer, Length, &count);
@@ -639,13 +641,23 @@
int
ConnRead(Connection *Conn, char *Dest, int Length)
{
- int read;
+ size_t read;
+ size_t uLength;
+ int err;
+
Connection *c = Conn;
+ if (Length <= 0) {
+ return 0;
+ }
+
+ /* since i know Length is greater than 0 i should be able to safely cast here */
+ uLength = Length;
+
read = c->receive.write - c->receive.read;
do {
if (read > 0) {
- if (read <= Length) {
+ if (read <= uLength) {
memcpy(Dest, c->receive.read, read);
c->receive.read = c->receive.write = c->receive.buffer;
@@ -655,14 +667,14 @@
return(read);
}
- memcpy(Dest, c->receive.read, Length);
+ memcpy(Dest, c->receive.read, uLength);
- c->receive.read += Length;
+ c->receive.read += uLength;
- return(Length);
+ return(uLength);
}
- ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &read);
+ err = ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &read);
if (read > 0) {
c->receive.read = c->receive.buffer;
c->receive.write = c->receive.buffer + read;
@@ -689,6 +701,7 @@
{
size_t buffered;
size_t remaining = Count;
+ int err;
char *d = Dest;
Connection *c = Conn;
@@ -721,7 +734,7 @@
}
if (remaining < CONN_TCP_MTU) {
- ConnTcpRead(c, c->receive.write, c->receive.remaining, &buffered);
+ err = ConnTcpRead(c, c->receive.write, c->receive.remaining, &buffered);
if (buffered > 0) {
c->receive.write += buffered;
@@ -732,7 +745,7 @@
}
} else {
do {
- ConnTcpRead(c, d, remaining, &buffered);
+ err = ConnTcpRead(c, d, remaining, &buffered);
if (buffered > 0) {
d += buffered;
remaining -= buffered;
@@ -756,7 +769,8 @@
int
ConnReadLine(Connection *Conn, char *Line, int Length)
{
- int count;
+ size_t count;
+ int err;
char *cur;
char *limit;
char *dest;
@@ -844,7 +858,7 @@
}
}
- ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
+ err = ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
if (count > 0) {
cur = c->receive.read = c->receive.buffer;
limit = c->receive.write = cur + count;
@@ -860,11 +874,11 @@
return(dest - Line);
}
-
int
ConnReadAnswer(Connection *Conn, char *Line, int Length)
{
- int count;
+ size_t count;
+ int err;
char *cur;
char *limit;
char *dest;
@@ -974,7 +988,7 @@
}
}
- ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
+ err = ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
if (count > 0) {
cur = c->receive.read = c->receive.buffer;
limit = c->receive.write = cur + count;
@@ -1068,10 +1082,11 @@
while (found_end_of_line == FALSE) {
if (c->receive.read == c->receive.write) {
// we need to fetch more data since the buffers are empty - this blocks
- int count;
+ size_t count;
+ int err;
- ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
- if (count <= 0) {
+ err = ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
+ if ((err < 0) || (count == 0)) {
c->send.remaining = CONN_TCP_MTU;
c->send.read = c->send.write;
return(CONN_ERROR_NETWORK);
@@ -1128,6 +1143,7 @@
{
size_t buffered;
size_t remaining;
+ int err;
Connection *c = Conn;
remaining = Count;
@@ -1164,7 +1180,7 @@
}
}
- ConnTcpRead(c, c->receive.write, c->receive.remaining, &buffered);
+ err = ConnTcpRead(c, c->receive.write, c->receive.remaining, &buffered);
if (buffered > 0) {
c->receive.write += buffered;
c->receive.remaining -= buffered;
@@ -1184,6 +1200,7 @@
{
int written = 0;
size_t count;
+ int err;
char *cur;
char *limit;
BOOL finished = FALSE;
@@ -1274,7 +1291,7 @@
Src->receive.write[0] = '\0';
}
- ConnTcpRead(Src, Src->receive.write, Src->receive.remaining, &count);
+ err = ConnTcpRead(Src, Src->receive.write, Src->receive.remaining, &count);
if (count > 0) {
Src->receive.read = Src->receive.buffer;
Src->receive.write += count;
@@ -1293,15 +1310,17 @@
int
ConnReadToConn(Connection *Src, Connection *Dest, int Count)
{
- unsigned int sent;
+ size_t sent;
size_t buffered;
size_t remaining;
+ int err;
+
Connection *s = Src;
Connection *d = Dest;
if ((remaining = Count) > 0) {
- ConnTcpFlush(d, d->send.read, d->send.write, &sent);
- if (sent >= 0) {
+ err = ConnTcpFlush(d, d->send.read, d->send.write, &sent);
+ if (err == 0) {
d->send.read = d->send.write = d->send.buffer;
d->send.remaining = CONN_TCP_MTU;
@@ -1317,7 +1336,7 @@
buffered = s->receive.write - s->receive.read;
if (buffered > 0) {
if (remaining <= buffered) {
- ConnTcpWrite(d, s->receive.read, remaining, &sent);
+ err = ConnTcpWrite(d, s->receive.read, remaining, &sent);
if (sent == remaining) {
s->receive.read += sent;
if (s->receive.read == s->receive.write) {
@@ -1334,7 +1353,7 @@
}
if ((remaining > s->receive.remaining) && (s->receive.remaining < CONN_TCP_THRESHOLD)) {
- ConnTcpWrite(d, s->receive.read, buffered, &sent);
+ err = ConnTcpWrite(d, s->receive.read, buffered, &sent);
if (sent == buffered) {
remaining -= sent;
@@ -1348,7 +1367,7 @@
}
}
- ConnTcpRead(s, s->receive.write, s->receive.remaining, &buffered);
+ err = ConnTcpRead(s, s->receive.write, s->receive.remaining, &buffered);
if (buffered > 0) {
s->receive.write += buffered;
s->receive.remaining -= buffered;
@@ -1367,13 +1386,14 @@
ConnReadToConnUntilEOS(Connection *Src, Connection *Dest)
{
int written = 0;
- int count;
+ size_t count;
+ int err;
char *cur;
char *limit;
BOOL finished = FALSE;
- ConnTcpFlush(Dest, Dest->send.read, Dest->send.write, &count);
- if (count >= 0) {
+ err = ConnTcpFlush(Dest, Dest->send.read, Dest->send.write, &count);
+ if (err == 0) {
Dest->send.read = Dest->send.write = Dest->send.buffer;
Dest->send.remaining = CONN_TCP_MTU;
@@ -1410,10 +1430,13 @@
*cur++ = ' ';
continue;
}
-
+
if (Src->receive.read < cur) {
- ConnTcpFlush(Dest, Src->receive.read, cur, &count);
- if ((cur - Src->receive.read) == count) {
+ int distance;
+
+ err = ConnTcpFlush(Dest, Src->receive.read, cur, &count);
+ distance = cur - Src->receive.read;
+ if ((distance > 0) && ((size_t)distance == count)) {
written += count;
if (!finished) {
@@ -1444,7 +1467,7 @@
}
}
- ConnTcpRead(Src, Src->receive.write, Src->receive.remaining, &count);
+ err = ConnTcpRead(Src, Src->receive.write, Src->receive.remaining, &count);
if (count > 0) {
Src->receive.read = Src->receive.buffer;
Src->receive.write += count;
@@ -1464,7 +1487,8 @@
ConnWrite(Connection *Conn, const char *Buffer, int Length)
{
const char *b;
- int i;
+ size_t i;
+ int err;
size_t r;
Connection *c = Conn;
@@ -1488,7 +1512,7 @@
c->send.write += c->send.remaining;
- ConnTcpFlush(c, c->send.read, c->send.write, &i);
+ err = ConnTcpFlush(c, c->send.read, c->send.write, &i);
if (i > 0) {
c->send.read = c->send.write = c->send.buffer;
c->send.remaining = CONN_TCP_MTU;
@@ -1503,7 +1527,7 @@
}
do {
- ConnTcpFlush(c, b, b + r, &i);
+ err = ConnTcpFlush(c, b, b + r, &i);
if (i > 0) {
b += r;
r -= r;
@@ -1523,7 +1547,8 @@
int
ConnWriteFromFile(Connection *Conn, FILE *Source, int Count)
{
- int i;
+ size_t i;
+ int err;
size_t n;
size_t r;
Connection *c = Conn;
@@ -1547,7 +1572,7 @@
return(-1);
}
- ConnTcpFlush(c, c->send.read, c->send.write, &i);
+ err = ConnTcpFlush(c, c->send.read, c->send.write, &i);
if (i > 0) {
c->send.read = c->send.write = c->send.buffer;
c->send.remaining = CONN_TCP_MTU;
@@ -1565,7 +1590,8 @@
int
ConnWriteFile(Connection *Conn, FILE *Source)
{
- int i;
+ size_t i;
+ int err;
size_t n;
size_t r;
Connection *c = Conn;
@@ -1586,7 +1612,7 @@
n += c->send.write - c->send.read;
- ConnTcpFlush(c, c->send.read, c->send.write, &i);
+ err = ConnTcpFlush(c, c->send.read, c->send.write, &i);
if (i > 0) {
c->send.read = c->send.write = c->send.buffer;
c->send.remaining = r = CONN_TCP_MTU;
@@ -1605,6 +1631,8 @@
ConnWriteVF(Connection *c, const char *format, va_list ap)
{
int i;
+ size_t unused;
+ int err;
do {
if (CONN_BUFSIZE < c->send.remaining) {
@@ -1641,8 +1669,8 @@
va_end(ap2);
}
- ConnTcpFlush(c, c->send.read, c->send.write, &i);
- if (i > 0) {
+ err = ConnTcpFlush(c, c->send.read, c->send.write, &unused);
+ if (unused > 0) {
c->send.read = c->send.write = c->send.buffer;
c->send.remaining = CONN_TCP_MTU;
@@ -1670,12 +1698,13 @@
int
ConnFlush(Connection *Conn)
{
- int count;
+ size_t count;
+ int err;
Connection *c = Conn;
- ConnTcpFlush(c, c->send.read, c->send.write, &count);
+ err = ConnTcpFlush(c, c->send.read, c->send.write, &count);
- if (count >= 0) {
+ if (err == 0) {
c->send.read += count;
if (c->send.read == c->send.write) {
c->send.read = c->send.write = c->send.buffer;
Index: src/libs/connio/unix-ip.c
===================================================================
--- src/libs/connio/unix-ip.c (revision 1131)
+++ src/libs/connio/unix-ip.c (working copy)
@@ -366,6 +366,8 @@
}
#endif
+#if 0
+/*TODO: do we need this? This isn't used anywhere but connmgr */
int
XplIPRead(void *socket, unsigned char *Buf, int Len, int readTimeout)
{
@@ -405,8 +407,10 @@
return(-1);
}
+#endif
-
+#if 0
+/*TODO: do we need this? it isn't used anywhere but connmgr */
int
XplIPWrite(void * socket, unsigned char *Buf, int Len)
{
@@ -424,6 +428,7 @@
return(-1);
}
+#endif
__inline static BOOL
MakeSocketNonBlocking(int soc)
Index: src/libs/connio/sockets.c
===================================================================
--- src/libs/connio/sockets.c (revision 1131)
+++ src/libs/connio/sockets.c (working copy)
@@ -7,9 +7,9 @@
#include "config.h"
void
-CHOP_NEWLINE(unsigned char *s)
+CHOP_NEWLINE(char *s)
{
- unsigned char *p;
+ char *p;
p = strchr(s, 0x0A);
if (p) {
*p = '\0';
@@ -20,6 +20,8 @@
}
}
+#if 0
+//do we need this?
void
SET_POINTER_TO_VALUE(unsigned char *p, unsigned char *s)
{
@@ -35,16 +37,19 @@
p++;
}
}
+#endif
-void
-ConnTcpFlush(Connection *c, const char *b, const char *e, int *r)
+int
+ConnTcpFlush(Connection *c, const char *b, const char *e, size_t *r)
{
+ int Result=0;
+
if (b < e) {
char *curPTR = (char *)b;
while (curPTR < e) {
- ConnTcpWrite(c, curPTR, e - curPTR, r);
+ Result = ConnTcpWrite(c, curPTR, e - curPTR, r);
if (*r > 0) {
- curPTR = curPTR + (int)*r;
+ curPTR = curPTR + *r;
continue;
}
break;
@@ -52,11 +57,14 @@
if (curPTR == e) {
*r = e - b;
} else {
- *r = -1;
+ *r = 0;
+ Result = -1;
}
} else {
*r = 0;
}
+
+ return Result;
}
void
@@ -88,104 +96,85 @@
}
}
-//#if defined(S390RH) || defined(SOLARIS)
-
-// TODO: is this correct for Solaris?
-
-void
-ConnTcpRead(Connection *c, char *b, size_t l, int *r)
+int
+ConnTcpRead(Connection *c, char *b, size_t l, size_t *r)
{
+ int Result=0;
+
struct pollfd pfd;
do {
pfd.fd = (int)c->socket;
pfd.events = POLLIN;
- *r = poll(&pfd, 1, c->receive.timeOut * 1000);
- if (*r > 0) {
+ Result = poll(&pfd, 1, c->receive.timeOut * 1000);
+ if (Result > 0) {
if ((pfd.revents & (POLLIN | POLLPRI))) {
do {
if (!c->ssl.enable) {
- *r = IPrecv((c)->socket, b, l, 0);
+ Result = IPrecv((c)->socket, b, l, 0);
} else {
- *r = gnutls_record_recv(c->ssl.context, (void *)b, l);
- if (*r < 0) {
- CONN_TRACE_ERROR(c, "RECV", *r);
- break;
- }
+ Result = gnutls_record_recv(c->ssl.context, (void *)b, l);
}
- if (*r >= 0) {
- CONN_TRACE_DATA(c, CONN_TRACE_EVENT_READ, b, *r);
+ if (Result >= 0) {
+ CONN_TRACE_DATA(c, CONN_TRACE_EVENT_READ, b, Result);
+ /* we actually worked. reset Result to 0 indicating that */
+ /* Result is > 0 so i should be able to safely cast it here */
+ *r = (size_t)Result;
+ Result = 0;
break;
} else if (errno == EINTR) {
continue;
}
- CONN_TRACE_ERROR(c, "RECV", *r);
+ /* we failed with something other than eintr... we'll reset Result below */
+ CONN_TRACE_ERROR(c, "RECV", Result);
break;
} while (TRUE);
break;
} else if ((pfd.revents & (POLLERR | POLLHUP | POLLNVAL))) {
- CONN_TRACE_ERROR(c, "POLL EVENT", *r);
- *r = -2;
+ CONN_TRACE_ERROR(c, "POLL EVENT", Result);
+ *r = 0;
+ Result = -2;
break;
}
}
if (errno == EINTR) {
continue;
}
- CONN_TRACE_ERROR(c, "POLL", *r);
- *r = -3;
+ CONN_TRACE_ERROR(c, "POLL", Result);
+ Result = -3;
+ *r = 0;
break;
} while (TRUE);
+
+ return Result;
}
-void
-ConnTcpWrite(Connection *c, char *b, size_t l, int *r)
+int
+ConnTcpWrite(Connection *c, char *b, size_t l, size_t *r)
{
+ int Result=0;
+
do {
if (!c->ssl.enable) {
- *r = IPsend(c->socket, b, l, MSG_NOSIGNAL);
+ Result = IPsend(c->socket, b, l, MSG_NOSIGNAL);
} else {
- *r = gnutls_record_send(c->ssl.context, (void *)b, l);
+ Result = gnutls_record_send(c->ssl.context, (void *)b, l);
}
- if (*r >= 0) {
- CONN_TRACE_DATA(c, CONN_TRACE_EVENT_WRITE, b, *r);
+ if (Result >= 0) {
+ CONN_TRACE_DATA(c, CONN_TRACE_EVENT_WRITE, b, Result);
+ /* we actually worked. reset Result to 0 indicating that */
+ /* Result is > 0 so i should be able to safely cast here */
+ *r = Result;
+ Result = 0;
break;
} else if (errno == EINTR) {
continue;
}
- CONN_TRACE_ERROR(c, "POLL", *r);
- *r = -1;
+ CONN_TRACE_ERROR(c, "POLL", Result);
+ Result = -1;
+ *r = 0;
break;
} while (TRUE);
-}
-//#else
-#if 0
-
-void
-ConnTcpRead(Connection *c, char *b, size_t l, int *r)
-{
- fd_set rfds;
- struct timeval timeout;
- FD_ZERO(&rfds);
- FD_SET(c->socket, &rfds);
- timeout.tv_usec = 0;
- timeout.tv_sec = c->receive.timeOut;
- *r = select(FD_SETSIZE, &rfds, NULL, NULL, &timeout);
- if (*r > 0) {
- *r = recv(c->socket, b, l, 0);
- CONN_TRACE_DATA_AND_ERROR(c, CONN_TRACE_EVENT_READ, b, *r, "RECV");
- } else {
- CONN_TRACE_ERROR(c, "SELECT", *r);
- *r = -1;
- }
+ return Result;
}
-void
-ConnTcpWrite(Connection *c, char *b, size_t l, int *r)
-{
- *r = IPsend(c->socket, b, l, 0);
- CONN_TRACE_DATA_AND_ERROR(c, CONN_TRACE_EVENT_WRITE, b, *r, "SEND");
-}
-
-
-#endif
Index: src/libs/connio/CMakeLists.txt
===================================================================
--- src/libs/connio/CMakeLists.txt (revision 1131)
+++ src/libs/connio/CMakeLists.txt (working copy)
@@ -1,10 +1,10 @@
-#StrictCompile()
+StrictCompile()
add_library(bongoconnio SHARED
+ sockets.c
connio.c
trace.c
addrpool.c
- sockets.c
unix-ip.c
)
Index: src/libs/nmap/nmap.c
===================================================================
--- src/libs/nmap/nmap.c (revision 1131)
+++ src/libs/nmap/nmap.c (working copy)
@@ -112,7 +112,8 @@
__inline static unsigned char *
FindEndOfLine(Connection *conn)
{
- int count;
+ size_t count;
+ int err;
char *newLine;
Connection *c = conn;
@@ -126,7 +127,7 @@
if (count < CONN_TCP_MTU) {
if (count == 0) {
- ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
+ err = ConnTcpRead(c, c->receive.buffer, CONN_TCP_MTU, &count);
if (count > 0) {
c->receive.read = c->receive.buffer;
c->receive.write = c->receive.buffer + count;
@@ -143,7 +144,7 @@
c->receive.read = c->receive.buffer;
c->receive.write = c->receive.buffer + count;
c->receive.remaining = CONN_TCP_MTU - count;
- ConnTcpRead(c, c->receive.write, c->receive.remaining, &count);
+ err = ConnTcpRead(c, c->receive.write, c->receive.remaining, &count);
if (count > 0) {
c->receive.write += count;
c->receive.remaining -= count;