diff options
author | Pacho Ramos <pacho@gentoo.org> | 2016-08-25 18:33:03 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2016-08-25 18:33:03 +0200 |
commit | b98a03cb4931341204f1e3a339ebb61364b47661 (patch) | |
tree | 97862300565a9cc284712267bcef75136a67b8d1 /net-im | |
parent | dev-libs/klibc: Fix build on Raspberry PI (#446700 by Adam Martak) (diff) | |
download | gentoo-b98a03cb4931341204f1e3a339ebb61364b47661.tar.gz gentoo-b98a03cb4931341204f1e3a339ebb61364b47661.tar.bz2 gentoo-b98a03cb4931341204f1e3a339ebb61364b47661.zip |
net-im/mu-conference: Fix connection with long secrets (#505600 by Dmitry A. Bakshaev)
Package-Manager: portage-2.3.0
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/mu-conference/files/mu-conference-0.8.81-sha1_64bit.patch | 31 | ||||
-rw-r--r-- | net-im/mu-conference/mu-conference-0.8.81-r2.ebuild | 95 |
2 files changed, 126 insertions, 0 deletions
diff --git a/net-im/mu-conference/files/mu-conference-0.8.81-sha1_64bit.patch b/net-im/mu-conference/files/mu-conference-0.8.81-sha1_64bit.patch new file mode 100644 index 000000000000..2764daa10544 --- /dev/null +++ b/net-im/mu-conference/files/mu-conference-0.8.81-sha1_64bit.patch @@ -0,0 +1,31 @@ +--- mu-conference-0.8.81/include/lib.h ++++ mu-conference-0.8.81/include/lib.h +@@ -114,13 +114,6 @@ + /* SHA calculations */ + /* */ + /* --------------------------------------------------------- */ +-#if (SIZEOF_INT == 4) +-typedef unsigned int uint32; +-#elif (SIZEOF_SHORT == 4) +-typedef unsigned short uint32; +-#else +-typedef unsigned int uint32; +-#endif /* HAVEUINT32 */ + + char *shahash(char *str); /* NOT THREAD SAFE */ + void shahash_r(const char* str, char hashbuf[40]); /* USE ME */ +@@ -301,10 +294,10 @@ + + + typedef struct { +- uint32_t H[5]; +- uint32_t W[80]; ++ guint32 H[5]; ++ guint32 W[80]; + int lenW; +- uint32_t sizeHi,sizeLo; ++ guint32 sizeHi,sizeLo; + } j_SHA_CTX; + + + diff --git a/net-im/mu-conference/mu-conference-0.8.81-r2.ebuild b/net-im/mu-conference/mu-conference-0.8.81-r2.ebuild new file mode 100644 index 000000000000..133a888a275a --- /dev/null +++ b/net-im/mu-conference/mu-conference-0.8.81-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Multi-User Chat for jabberd" +HOMEPAGE="https://gna.org/projects/mu-conference/" +SRC_URI="http://download.gna.org/mu-conference/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +SLOT="0" +IUSE="mysql" + +RDEPEND=" + dev-libs/expat + >=dev-libs/glib-2:2 + net-dns/libidn + net-im/jabberd2 + mysql? ( virtual/mysql ) +" +DEPEND="${RDEPEND} + virtual/pkgconfig +" + +PATCHES=( + # http://gna.org/bugs/?16238 + "${FILESDIR}"/${P}-sha1_64bit.patch +) + +src_prepare() { + # Fix missing header in src/conference_user.c in order to + # make emerge happy and avoid QA notice. + sed -i -e "/conference.h/ i #define _XOPEN_SOURCE" src/conference_user.c || die + + if use mysql; then + sed -i -e '/^CFLAGS/ a CFLAGS:=$(CFLAGS) -DHAVE_MYSQL' \ + -e '/^LIBS/ a LIBS:=$(LIBS) `mysql_config --libs`' src/Makefile || die + fi + sed -i -e 's/^CC:=/CC?=/' -e 's/$(MCFLAGS)/$(MCFLAGS) $(LDFLAGS)/'\ + -e 's/LDFLAGS:=-L./LDFLAGS:=$(LDFLAGS) -L./'\ + -e 's/$(LDFLAGS) $(LIBS)/$(LIBS)/' src/Makefile || die + sed -i -e 's/-O2//' src/{,jabberd,jcomp}/Makefile || die + sed -i -e 's/CC=/CC?=/' src/{jabberd,jcomp}/Makefile || die + sed -i -e 's/ar/$(AR)/' -e 's/ranlib/$(RANLIB)/' src/jabberd/Makefile || die + sed -i -e 's/gcc -g/$(CC) -g/' src/jcomp/Makefile || die + tc-export CC AR RANLIB + + default +} + +src_install() { + dobin src/mu-conference + fowners jabber:jabber /usr/bin/mu-conference + fperms 750 /usr/bin/mu-conference + + newinitd "${FILESDIR}/${PN}"-0.7.init mu-conference + + dodoc ChangeLog FAQ mu-conference.sql README README.sql + docinto scripts + dodoc scripts/* + + local i + for i in log spool; do + dodir /var/${i}/jabber/mu-conference + keepdir /var/${i}/jabber/mu-conference + fowners jabber:jabber /var/${i}/jabber/mu-conference + fperms 770 /var/${i}/jabber/mu-conference + done + + insinto /etc/jabber + newins muc-default.xml mu-conference.xml + doins style.css + + sed -i \ + -e 's,./spool/chat.localhost,/var/spool/jabber/mu-conference,g' \ + -e 's,./syslogs,/var/log/jabber,g' \ + -e 's,./logs,/var/log/jabber/mu-conference,g' \ + -e 's,./mu-conference.pid,/var/run/jabber/mu-conference.pid,g' \ + -e "s,../style.css,/etc/jabber/style.css,g" \ + -e "s,7009,5347,g" \ + "${D}"/etc/jabber/mu-conference.xml || die "sed failed" +} + +pkg_postinst() { + echo + elog "For jabberd-2 connection:" + elog "1. Make sure that the ip and port in /etc/jabber/mu-conference.xml" + elog " match the address of your jabberd router." + elog "2. Set a common secret in mu-conference.xml and router.xml" + echo +} |