forked from calculate/calculate-overlay
git-svn-id: http://svn.calculate.ru/overlay@2454 c91db197-33c1-4113-bf15-f8a5c547ca64
parent
beb86448d9
commit
f43ab7c1e5
@ -0,0 +1,26 @@
|
||||
AUX 2.0.0-missing-declaration.patch 411 RMD160 f314900dd00fd23c9043cb5a60982448c39d2fa9 SHA1 687066247c9ad74c4e9ec869a9f4f0d9e80bae6d SHA256 1c32a57f4f187d55b28b240820875fcd3e731f6d91cd9429d14c318222f07e7b
|
||||
AUX ejabberd 355 RMD160 bf400cf3a84169a79797db9228ad102d93c9147b SHA1 83bae90f0e211f6e59c96dd6ce419a4c0bcdd3d9 SHA256 1f2254ce2835a986eb75adaf5602d1cb74ced989c2360331822a2c5e11c9837b
|
||||
AUX ejabberd-2.0.2-r1.confd 841 RMD160 5e01a2b13e88f9f799386304f66d25ff1146a9cf SHA1 420fba1888c8a5fcaef47f59b9518a4a9ce36b6f SHA256 12719cadf9d20b8d36bc299c41f6e1a15ccd545048859e9e878706308d691dde
|
||||
AUX ejabberd-2.0.2-r2.initd 1280 RMD160 92f337b40cf33132917f400cdf6d533e093a35f5 SHA1 21d7f2c897945314ea2ef9eb4aa00e369e79a26c SHA256 29e768d925362ef221d484b2e257ae6b2d8b8d6dbf30f6ca2d9069fd27a214bc
|
||||
AUX ejabberd-2.0.2-r3.initd 1432 RMD160 531cc4634e9e953fa901a59b301ee9f09beab29e SHA1 89f9535545d25eb89572a6d630f01c58366b499a SHA256 b6c312b148b5b833ebd69f1429f302bb51f0852074530600aadbbe49733115f1
|
||||
AUX ejabberd-2.0.2.confd 840 RMD160 5227a3fbb0d0c8bffd8a5537003f965f1fb73582 SHA1 d3a51fa0923a571d30f3f0840834c651726ad206 SHA256 d6b0c44a450c4191e450b8e3ab281dc2e3bc668a97ddd1652d2e6c555675a2c6
|
||||
AUX ejabberd-2.0.2.initd 1134 RMD160 b5d3a5a50069be713511ebd37f9eab07dab33371 SHA1 0cd2c3bd44c1923014c1cdd84edfb56ddb11bdc2 SHA256 8b2c50bc80b5b0700195c79a4eaa6f68549fd63310b584c2e86d951c116e14de
|
||||
AUX ejabberd-2.0.5-r1.initd 1438 RMD160 cef00b2ed6a0bf8eb791485853824fd42f2441e4 SHA1 da3fcc19ef60ecfaf27d948e27b5756f5bb1f83e SHA256 24a18be96ed3c22b1ac0ac3f9f89995a5aea0efcd4e825b9d668d98d1a96951b
|
||||
AUX ejabberd-2.0.5.confd 841 RMD160 5e01a2b13e88f9f799386304f66d25ff1146a9cf SHA1 420fba1888c8a5fcaef47f59b9518a4a9ce36b6f SHA256 12719cadf9d20b8d36bc299c41f6e1a15ccd545048859e9e878706308d691dde
|
||||
AUX ejabberd-2.0.5.initd 1432 RMD160 531cc4634e9e953fa901a59b301ee9f09beab29e SHA1 89f9535545d25eb89572a6d630f01c58366b499a SHA256 b6c312b148b5b833ebd69f1429f302bb51f0852074530600aadbbe49733115f1
|
||||
AUX ejabberd-wrapper-2.0.2.template 1273 RMD160 7ec1a86be5df671cb2ce54705de482ca1a172974 SHA1 ec412773c7913d8cfa59e6dcd330242268e60959 SHA256 96dcdca694fbe26b1098007d9e33361812a0ed532894e417155c0ac973bcdf6f
|
||||
AUX ejabberd-wrapper-2.0.5.template 1273 RMD160 7ec1a86be5df671cb2ce54705de482ca1a172974 SHA1 ec412773c7913d8cfa59e6dcd330242268e60959 SHA256 96dcdca694fbe26b1098007d9e33361812a0ed532894e417155c0ac973bcdf6f
|
||||
AUX ejabberdctl 199 RMD160 1f4be5dcd018f0936baaeb41e2fd1c4a6a59bc62 SHA1 347200e8dd5790282cedb6a70c71fd4a6db9a0f5 SHA256 b88de8e8e5e8730ac7fe04b49ae3cf131c49a4e1ba451b35f1305d1c24a2dda0
|
||||
AUX inetrc 36 RMD160 4b79020864689ede547969610fde18fe490f5810 SHA1 1e0bae0f7251e2ae3b62ba9d3e5cc86bb5dd271e SHA256 0f383befc4c46134d88ce14d3bd06c404ef6575391f4ac0b5e8c28ba383b28fc
|
||||
AUX mod_logxml.patch 8508 RMD160 e263ebed1a07d44381de6063dc4e99543aa1d016 SHA1 947ecb6d39efb9e2384642622055d453ea357831 SHA256 feca3ed4963d8fcfd970d9a86e78b2e52b573dd0488e0a7d1d054dde3df3df7d
|
||||
AUX mod_shared_roster_ldap.patch 15881 RMD160 cafc8975c30e0893bd16336a86e29b3eaffcb07a SHA1 b50d5123653994ec6174ada696be4cb3cdbb82b1 SHA256 83b36953ed9bee717c95c1edacc22231dfa607dbb9bee995ea90ed242a3add8e
|
||||
AUX self-cert-v2.sh 1017 RMD160 3beb0f05e8cc3041abd2f689d31d410bc7d5088d SHA1 1f07299b2e49541dcbf5c2b81b26280bbf0b6aeb SHA256 34b2c9cb36c424ffd1117bd20b67d0f4a05168b0bc6237e287c2dcabd0e27972
|
||||
AUX self-cert.sh 491 RMD160 89bb577975eef172fa3c6e07b08d323162d1278b SHA1 61a4c8b79141ec1bc846e8ede6fa19a07210c619 SHA256 6a0c53a8573411c18ed6f5dd79ce4807b72fb10bc5eb3a3a7f4641c57e4ddceb
|
||||
AUX ssl.cnf 1042 RMD160 47d2542942fb21f4be1e827d47eb4e0468e73910 SHA1 7347bae5a195ad158881fe5313f55ee41e85cb81 SHA256 ed066f7720fd9f4c2d57ffb2ebcbc4b2810d2b7ca22b67ec8c1dc1227baaa635
|
||||
DIST ejabberd-2.0.2.tar.gz 1040817 RMD160 b24c1c2d6ce8c56fd26f28a98b89d99890dbad72 SHA1 7c82082b941277fe18aac25ca9b2016f25dc8472 SHA256 23136f2d215e82836d84322011914e1c9a846ab056b80cd26ff3e70b300b345a
|
||||
DIST ejabberd-2.0.5.tar.gz 1796737 RMD160 5ec0210b3995004c708180a66a096e0b9be5f1ba SHA1 e5b8c4b742fdcc439da9458f94f530604abdfdd5 SHA256 37ef90e2afa2b73a620bf71a096df48d5fde8f1cd669fac83d8c143a1295198c
|
||||
EBUILD calculate-ejabberd-2.0.2-r1.ebuild 5066 RMD160 f20ff9f3888f2d27f911b2c5dd4916092a2532fc SHA1 f42447b2eaf54e422ed1f1cd97d382ddfa6aa399 SHA256 16f2ee205b92eaa767668f632a25d18b85142e912431ff28a14bd058041a899c
|
||||
EBUILD calculate-ejabberd-2.0.2-r3.ebuild 5073 RMD160 b37dd12707fc6ce6a0b16c2354bdc07d3d65dd33 SHA1 4a5f6ead539536ac940043dfe5311259f9138274 SHA256 d599d46d89bb48f21a48bac1ce97c8712e09321ee48b0783e317c59d4e3b0d84
|
||||
EBUILD calculate-ejabberd-2.0.2.ebuild 4955 RMD160 392007636ef070def316e5d62c5d02c05ef21b51 SHA1 6382ac2f5b11cf10ac1e5a18928726ca140aa2c8 SHA256 6f6e10f69f66bf2859fc54f794f015809af35079245bbde1000b944ccd369e2c
|
||||
EBUILD calculate-ejabberd-2.0.5-r1.ebuild 4411 RMD160 29b67f0778edfe66d906d3310d7829e311b8c2bd SHA1 e3093c44b4884da519504ad7a0336ad0e27f4066 SHA256 a9476b23cf28433a6c48b47516a921821224c4127b7866067bada24ce0027f4e
|
||||
EBUILD calculate-ejabberd-2.0.5.ebuild 4410 RMD160 1224bb0f222897daf78c79c64cf7d50e781369a0 SHA1 08727616270f415f9fc85587e0d72e96d9ab81d8 SHA256 60ee16e7d84c1055ea77f9a7b43429d92c54f16bfb92c7807bdd6ac68fc9d8d5
|
@ -0,0 +1,164 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.2.ebuild,v 1.2 2008/09/10 14:05:35 mr_bones_ Exp $
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
JABBER_ETC="/etc/jabber"
|
||||
JABBER_RUN="/var/run/jabber"
|
||||
JABBER_SPOOL="/var/spool/jabber"
|
||||
JABBER_LOG="/var/log/jabber"
|
||||
|
||||
JABBER_NAME="ejabberd"
|
||||
MY_PV=${PV}
|
||||
MY_PR=${PR}
|
||||
MY_P=${JABBER_NAME}-${MY_PV}
|
||||
MY_PF=${JABBER_NAME}-${MY_PV}-${MY_PR}
|
||||
|
||||
DESCRIPTION="The Erlang Jabber Daemon"
|
||||
HOMEPAGE="http://www.ejabberd.im/"
|
||||
SRC_URI="http://www.process-one.net/downloads/ejabberd/${PV}/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc pam ssl web zlib"
|
||||
|
||||
DEPEND=">=net-im/jabber-base-0.01
|
||||
>=dev-libs/expat-1.95
|
||||
>=dev-lang/erlang-11.2.5
|
||||
odbc? ( dev-db/unixODBC )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
ssl? ( >=dev-libs/openssl-0.9.8e )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
PROVIDE="virtual/jabber-server"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Bug #171427
|
||||
epatch "${FILESDIR}/2.0.0-missing-declaration.patch"
|
||||
# mod_shared_roster_ldap.patch
|
||||
epatch "${FILESDIR}/mod_shared_roster_ldap.patch"
|
||||
# mod_logxml.patch
|
||||
epatch "${FILESDIR}/mod_logxml.patch"
|
||||
|
||||
# get rid of the prefix
|
||||
sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
# we want ejabberdctl in /usr/sbin not /sbin !!!
|
||||
sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf --prefix=/ \
|
||||
$(use_enable mod_irc) \
|
||||
$(use_enable ldap eldap) \
|
||||
$(use_enable mod_muc) \
|
||||
$(use_enable mod_pubsub) \
|
||||
$(use_enable ssl tls) \
|
||||
$(use_enable web) \
|
||||
$(use_enable odbc) \
|
||||
$(use_enable zlib ejabberd_zlib) \
|
||||
$(use_enable pam) \
|
||||
|| die "econf failed"
|
||||
|
||||
if useq debug; then
|
||||
emake ejabberd_debug=true || die "compiling ejabberd core failed"
|
||||
else
|
||||
emake || die "compiling ejabberd core failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make \
|
||||
DESTDIR="${D}" \
|
||||
EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \
|
||||
ETCDIR="${D}${JABBER_ETC}" \
|
||||
LOGDIR="${D}${JABBER_LOG}" \
|
||||
install || die "install failed"
|
||||
|
||||
# remove the default ejabberdctl as we use our own
|
||||
rm "${D}/sbin/ejabberdctl"
|
||||
|
||||
insinto ${JABBER_ETC}
|
||||
|
||||
chown -R jabber:jabber "${D}${JABBER_ETC}"
|
||||
chown -R jabber:jabber "${D}${JABBER_LOG}"
|
||||
chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}"
|
||||
|
||||
if useq ssl ; then
|
||||
doins "${FILESDIR}/ssl.cnf"
|
||||
newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
|
||||
fi
|
||||
|
||||
# Pam helper module permissions
|
||||
# http://www.process-one.net/docs/ejabberd/guide_en.html
|
||||
if useq pam; then
|
||||
chown root:jabber "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
chmod 4750 "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
fi
|
||||
|
||||
cd "${WORKDIR}/${MY_P}-beta1/doc"
|
||||
dodoc "release_notes_${MY_PV}.txt"
|
||||
dohtml *.{html,png}
|
||||
|
||||
# set up /usr/sbin/ejabberd wrapper
|
||||
cat "${FILESDIR}/ejabberd-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberd"
|
||||
exeinto /usr/sbin
|
||||
doexe "${T}/ejabberd"
|
||||
|
||||
# set up /usr/sbin/ejabberdctl wrapper
|
||||
cat "${FILESDIR}/ejabberdctl-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberdctl"
|
||||
doexe "${T}/ejabberdctl"
|
||||
|
||||
dodir /var/lib/ejabberd
|
||||
newinitd "${FILESDIR}/${MY_P}.initd" ${JABBER_NAME}
|
||||
newconfd "${FILESDIR}/${MY_PF}.confd" ${JABBER_NAME}
|
||||
|
||||
# fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert
|
||||
# that would be generated by /etc/jabber/self-cert.sh
|
||||
sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
|
||||
# if mod_irc is not enabled, comment out the mod_irc in the default
|
||||
# ejabberd.cfg
|
||||
if ! use mod_irc; then
|
||||
sed -i -e "s/{mod_irc,/%{mod_irc,/" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "For configuration instructions, please see"
|
||||
elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
|
||||
elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
|
||||
if useq ssl ; then
|
||||
if [ ! -e /etc/jabber/ssl.pem ]; then
|
||||
elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh"
|
||||
elog "Ejabberd may refuse to start without an SSL certificate"
|
||||
fi
|
||||
fi
|
||||
if ! useq web ; then
|
||||
elog "The web USE flag is off, this has disabled the web admin interface."
|
||||
fi
|
||||
elog "===================================================================="
|
||||
elog 'Quick Start Guide:'
|
||||
elog '1) Add output of `hostname -s` to /etc/jabber/ejabberd.cfg line 89'
|
||||
elog ' {hosts, ["localhost", "thehost"]}.'
|
||||
elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 324'
|
||||
elog ' {acl, admin, {user, "theadmin", "thehost"}}.'
|
||||
elog '3) Start the server'
|
||||
elog ' # /etc/init.d/ejabberd start'
|
||||
elog '4) Register the admin user'
|
||||
elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
|
||||
elog '5) Log in with your favourite jabber client or using the web admin'
|
||||
}
|
@ -0,0 +1,166 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.2.ebuild,v 1.2 2008/09/10 14:05:35 mr_bones_ Exp $
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
JABBER_ETC="/etc/jabber"
|
||||
JABBER_RUN="/var/run/jabber"
|
||||
JABBER_SPOOL="/var/spool/jabber"
|
||||
JABBER_LOG="/var/log/jabber"
|
||||
|
||||
JABBER_NAME="ejabberd"
|
||||
MY_PV=${PV}
|
||||
MY_PR=${PR}
|
||||
MY_P=${JABBER_NAME}-${MY_PV}
|
||||
MY_PF=${JABBER_NAME}-${MY_PV}-${MY_PR}
|
||||
|
||||
DESCRIPTION="The Erlang Jabber Daemon"
|
||||
HOMEPAGE="http://www.ejabberd.im/"
|
||||
SRC_URI="http://www.process-one.net/downloads/ejabberd/${PV}/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc pam ssl web zlib"
|
||||
|
||||
DEPEND=">=net-im/jabber-base-0.01
|
||||
>=dev-libs/expat-1.95
|
||||
>=dev-lang/erlang-11.2.5
|
||||
odbc? ( dev-db/unixODBC )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
ssl? ( >=dev-libs/openssl-0.9.8e )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
PROVIDE="virtual/jabber-server"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Bug #171427
|
||||
epatch "${FILESDIR}/2.0.0-missing-declaration.patch"
|
||||
# mod_shared_roster_ldap.patch
|
||||
epatch "${FILESDIR}/mod_shared_roster_ldap.patch"
|
||||
# mod_logxml.patch
|
||||
epatch "${FILESDIR}/mod_logxml.patch"
|
||||
|
||||
# get rid of the prefix
|
||||
sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
# we want ejabberdctl in /usr/sbin not /sbin !!!
|
||||
sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf --prefix=/ \
|
||||
$(use_enable mod_irc) \
|
||||
$(use_enable ldap eldap) \
|
||||
$(use_enable mod_muc) \
|
||||
$(use_enable mod_pubsub) \
|
||||
$(use_enable ssl tls) \
|
||||
$(use_enable web) \
|
||||
$(use_enable odbc) \
|
||||
$(use_enable zlib ejabberd_zlib) \
|
||||
$(use_enable pam) \
|
||||
|| die "econf failed"
|
||||
|
||||
if useq debug; then
|
||||
emake ejabberd_debug=true || die "compiling ejabberd core failed"
|
||||
else
|
||||
emake || die "compiling ejabberd core failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make \
|
||||
DESTDIR="${D}" \
|
||||
EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \
|
||||
ETCDIR="${D}${JABBER_ETC}" \
|
||||
LOGDIR="${D}${JABBER_LOG}" \
|
||||
install || die "install failed"
|
||||
|
||||
# remove the default ejabberdctl as we use our own
|
||||
rm "${D}/sbin/ejabberdctl"
|
||||
|
||||
insinto ${JABBER_ETC}
|
||||
|
||||
chown -R jabber:jabber "${D}${JABBER_ETC}"
|
||||
chown -R jabber:jabber "${D}${JABBER_LOG}"
|
||||
chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}"
|
||||
|
||||
if useq ssl ; then
|
||||
doins "${FILESDIR}/ssl.cnf"
|
||||
newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
|
||||
fi
|
||||
|
||||
# Pam helper module permissions
|
||||
# http://www.process-one.net/docs/ejabberd/guide_en.html
|
||||
if useq pam; then
|
||||
chown root:jabber "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
chmod 4750 "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
fi
|
||||
|
||||
cd "${WORKDIR}/${MY_P}-beta1/doc"
|
||||
dodoc "release_notes_${MY_PV}.txt"
|
||||
dohtml *.{html,png}
|
||||
|
||||
# set up /usr/sbin/ejabberd wrapper
|
||||
cat "${FILESDIR}/ejabberd-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberd"
|
||||
exeinto /usr/sbin
|
||||
doexe "${T}/ejabberd"
|
||||
|
||||
# set up /usr/sbin/ejabberdctl wrapper
|
||||
cat "${FILESDIR}/ejabberdctl-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberdctl"
|
||||
doexe "${T}/ejabberdctl"
|
||||
|
||||
dodir /var/lib/ejabberd
|
||||
|
||||
|
||||
newinitd "${FILESDIR}/${MY_P}-r3.initd" ${JABBER_NAME}
|
||||
newconfd "${FILESDIR}/${MY_P}-r1.confd" ${JABBER_NAME}
|
||||
|
||||
# fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert
|
||||
# that would be generated by /etc/jabber/self-cert.sh
|
||||
sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
|
||||
# if mod_irc is not enabled, comment out the mod_irc in the default
|
||||
# ejabberd.cfg
|
||||
if ! use mod_irc; then
|
||||
sed -i -e "s/{mod_irc,/%{mod_irc,/" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "For configuration instructions, please see"
|
||||
elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
|
||||
elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
|
||||
if useq ssl ; then
|
||||
if [ ! -e /etc/jabber/ssl.pem ]; then
|
||||
elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh"
|
||||
elog "Ejabberd may refuse to start without an SSL certificate"
|
||||
fi
|
||||
fi
|
||||
if ! useq web ; then
|
||||
elog "The web USE flag is off, this has disabled the web admin interface."
|
||||
fi
|
||||
elog "===================================================================="
|
||||
elog 'Quick Start Guide:'
|
||||
elog '1) Add output of `hostname -s` to /etc/jabber/ejabberd.cfg line 89'
|
||||
elog ' {hosts, ["localhost", "thehost"]}.'
|
||||
elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 324'
|
||||
elog ' {acl, admin, {user, "theadmin", "thehost"}}.'
|
||||
elog '3) Start the server'
|
||||
elog ' # /etc/init.d/ejabberd start'
|
||||
elog '4) Register the admin user'
|
||||
elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
|
||||
elog '5) Log in with your favourite jabber client or using the web admin'
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.2.ebuild,v 1.2 2008/09/10 14:05:35 mr_bones_ Exp $
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
JABBER_ETC="/etc/jabber"
|
||||
JABBER_RUN="/var/run/jabber"
|
||||
JABBER_SPOOL="/var/spool/jabber"
|
||||
JABBER_LOG="/var/log/jabber"
|
||||
|
||||
JABBER_NAME="ejabberd"
|
||||
MY_PV=${PV}
|
||||
MY_P=${JABBER_NAME}-${MY_PV}
|
||||
|
||||
DESCRIPTION="The Erlang Jabber Daemon"
|
||||
HOMEPAGE="http://www.ejabberd.im/"
|
||||
SRC_URI="http://www.process-one.net/downloads/ejabberd/${PV}/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc pam ssl web zlib"
|
||||
|
||||
DEPEND=">=net-im/jabber-base-0.01
|
||||
>=dev-libs/expat-1.95
|
||||
>=dev-lang/erlang-11.2.5
|
||||
odbc? ( dev-db/unixODBC )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
ssl? ( >=dev-libs/openssl-0.9.8e )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
PROVIDE="virtual/jabber-server"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Bug #171427
|
||||
epatch "${FILESDIR}/2.0.0-missing-declaration.patch"
|
||||
# mod_shared_roster_ldap.patch
|
||||
epatch "${FILESDIR}/mod_shared_roster_ldap.patch"
|
||||
|
||||
# get rid of the prefix
|
||||
sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
# we want ejabberdctl in /usr/sbin not /sbin !!!
|
||||
sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf --prefix=/ \
|
||||
$(use_enable mod_irc) \
|
||||
$(use_enable ldap eldap) \
|
||||
$(use_enable mod_muc) \
|
||||
$(use_enable mod_pubsub) \
|
||||
$(use_enable ssl tls) \
|
||||
$(use_enable web) \
|
||||
$(use_enable odbc) \
|
||||
$(use_enable zlib ejabberd_zlib) \
|
||||
$(use_enable pam) \
|
||||
|| die "econf failed"
|
||||
|
||||
if useq debug; then
|
||||
emake ejabberd_debug=true || die "compiling ejabberd core failed"
|
||||
else
|
||||
emake || die "compiling ejabberd core failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make \
|
||||
DESTDIR="${D}" \
|
||||
EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \
|
||||
ETCDIR="${D}${JABBER_ETC}" \
|
||||
LOGDIR="${D}${JABBER_LOG}" \
|
||||
install || die "install failed"
|
||||
|
||||
# remove the default ejabberdctl as we use our own
|
||||
rm "${D}/sbin/ejabberdctl"
|
||||
|
||||
insinto ${JABBER_ETC}
|
||||
|
||||
chown -R jabber:jabber "${D}${JABBER_ETC}"
|
||||
chown -R jabber:jabber "${D}${JABBER_LOG}"
|
||||
chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}"
|
||||
|
||||
if useq ssl ; then
|
||||
doins "${FILESDIR}/ssl.cnf"
|
||||
newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
|
||||
fi
|
||||
|
||||
# Pam helper module permissions
|
||||
# http://www.process-one.net/docs/ejabberd/guide_en.html
|
||||
if useq pam; then
|
||||
chown root:jabber "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
chmod 4750 "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
fi
|
||||
|
||||
cd "${WORKDIR}/${MY_P}-beta1/doc"
|
||||
dodoc "release_notes_${MY_PV}.txt"
|
||||
dohtml *.{html,png}
|
||||
|
||||
# set up /usr/sbin/ejabberd wrapper
|
||||
cat "${FILESDIR}/ejabberd-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberd"
|
||||
exeinto /usr/sbin
|
||||
doexe "${T}/ejabberd"
|
||||
|
||||
# set up /usr/sbin/ejabberdctl wrapper
|
||||
cat "${FILESDIR}/ejabberdctl-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberdctl"
|
||||
doexe "${T}/ejabberdctl"
|
||||
|
||||
dodir /var/lib/ejabberd
|
||||
newinitd "${FILESDIR}/${MY_P}.initd" ${JABBER_NAME}
|
||||
newconfd "${FILESDIR}/${MY_P}.confd" ${JABBER_NAME}
|
||||
|
||||
# fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert
|
||||
# that would be generated by /etc/jabber/self-cert.sh
|
||||
sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
|
||||
# if mod_irc is not enabled, comment out the mod_irc in the default
|
||||
# ejabberd.cfg
|
||||
if ! use mod_irc; then
|
||||
sed -i -e "s/{mod_irc,/%{mod_irc,/" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "For configuration instructions, please see"
|
||||
elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
|
||||
elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
|
||||
if useq ssl ; then
|
||||
if [ ! -e /etc/jabber/ssl.pem ]; then
|
||||
elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh"
|
||||
elog "Ejabberd may refuse to start without an SSL certificate"
|
||||
fi
|
||||
fi
|
||||
if ! useq web ; then
|
||||
elog "The web USE flag is off, this has disabled the web admin interface."
|
||||
fi
|
||||
elog "===================================================================="
|
||||
elog 'Quick Start Guide:'
|
||||
elog '1) Add output of `hostname -s` to /etc/jabber/ejabberd.cfg line 89'
|
||||
elog ' {hosts, ["localhost", "thehost"]}.'
|
||||
elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 324'
|
||||
elog ' {acl, admin, {user, "theadmin", "thehost"}}.'
|
||||
elog '3) Start the server'
|
||||
elog ' # /etc/init.d/ejabberd start'
|
||||
elog '4) Register the admin user'
|
||||
elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
|
||||
elog '5) Log in with your favourite jabber client or using the web admin'
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.5.ebuild,v 1.1 2009/04/09 05:40:39 pva Exp $
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
JABBER_ETC="/etc/jabber"
|
||||
JABBER_RUN="/var/run/jabber"
|
||||
JABBER_SPOOL="/var/spool/jabber"
|
||||
JABBER_LOG="/var/log/jabber"
|
||||
|
||||
JABBER_NAME="ejabberd"
|
||||
MY_PV=${PV}
|
||||
MY_PR=${PR}
|
||||
MY_P=${JABBER_NAME}-${MY_PV}
|
||||
MY_PF=${JABBER_NAME}-${MY_PV}-${MY_PR}
|
||||
|
||||
DESCRIPTION="The Erlang Jabber Daemon"
|
||||
HOMEPAGE="http://www.ejabberd.im/"
|
||||
SRC_URI="http://www.process-one.net/downloads/ejabberd/${PV}/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc pam ssl web zlib"
|
||||
|
||||
DEPEND=">=net-im/jabber-base-0.01
|
||||
>=dev-libs/expat-1.95
|
||||
>=dev-lang/erlang-11.2.5
|
||||
odbc? ( dev-db/unixODBC )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
ssl? ( >=dev-libs/openssl-0.9.8e )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PROVIDE="virtual/jabber-server"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# mod_shared_roster_ldap.patch
|
||||
epatch "${FILESDIR}/mod_shared_roster_ldap.patch"
|
||||
# mod_logxml.patch
|
||||
epatch "${FILESDIR}/mod_logxml.patch"
|
||||
|
||||
# get rid of the prefix
|
||||
sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
# we want ejabberdctl in /usr/sbin not /sbin !!!
|
||||
sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf --prefix=/ \
|
||||
$(use_enable mod_irc) \
|
||||
$(use_enable ldap eldap) \
|
||||
$(use_enable mod_muc) \
|
||||
$(use_enable mod_pubsub) \
|
||||
$(use_enable ssl tls) \
|
||||
$(use_enable web) \
|
||||
$(use_enable odbc) \
|
||||
$(use_enable zlib ejabberd_zlib) \
|
||||
$(use_enable pam) \
|
||||
|| die "econf failed"
|
||||
|
||||
if useq debug; then
|
||||
emake ejabberd_debug=true || die "compiling ejabberd core failed"
|
||||
else
|
||||
emake || die "compiling ejabberd core failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make \
|
||||
DESTDIR="${D}" \
|
||||
EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \
|
||||
ETCDIR="${D}${JABBER_ETC}" \
|
||||
LOGDIR="${D}${JABBER_LOG}" \
|
||||
install || die "install failed"
|
||||
|
||||
# remove the default ejabberdctl as we use our own
|
||||
rm "${D}/sbin/ejabberdctl"
|
||||
|
||||
insinto ${JABBER_ETC}
|
||||
|
||||
chown -R jabber:jabber "${D}${JABBER_ETC}"
|
||||
chown -R jabber:jabber "${D}${JABBER_LOG}"
|
||||
chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}"
|
||||
|
||||
if useq ssl ; then
|
||||
doins "${FILESDIR}/ssl.cnf"
|
||||
newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
|
||||
fi
|
||||
|
||||
# Pam helper module permissions
|
||||
# http://www.process-one.net/docs/ejabberd/guide_en.html
|
||||
if useq pam; then
|
||||
chown root:jabber "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
chmod 4750 "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
fi
|
||||
|
||||
cd "${WORKDIR}/${MY_P}/doc"
|
||||
dodoc "release_notes_${MY_PV}.txt"
|
||||
dohtml *.{html,png}
|
||||
|
||||
# set up /usr/sbin/ejabberd wrapper
|
||||
cat "${FILESDIR}/ejabberd-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberd"
|
||||
exeinto /usr/sbin
|
||||
doexe "${T}/ejabberd"
|
||||
|
||||
# set up /usr/sbin/ejabberdctl wrapper
|
||||
cat "${FILESDIR}/ejabberdctl-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberdctl"
|
||||
doexe "${T}/ejabberdctl"
|
||||
|
||||
dodir /var/lib/ejabberd
|
||||
|
||||
newinitd "${FILESDIR}/${MY_PF}.initd" ${JABBER_NAME}
|
||||
newconfd "${FILESDIR}/${MY_P}.confd" ${JABBER_NAME}
|
||||
|
||||
# fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert
|
||||
# that would be generated by /etc/jabber/self-cert.sh
|
||||
sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
|
||||
# if mod_irc is not enabled, comment out the mod_irc in the default
|
||||
# ejabberd.cfg
|
||||
if ! use mod_irc; then
|
||||
sed -i -e "s/{mod_irc,/%{mod_irc,/" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "For configuration instructions, please see"
|
||||
elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
|
||||
elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
|
||||
if useq ssl ; then
|
||||
if [ ! -e /etc/jabber/ssl.pem ]; then
|
||||
elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh"
|
||||
elog "Ejabberd may refuse to start without an SSL certificate"
|
||||
fi
|
||||
fi
|
||||
if ! useq web ; then
|
||||
elog "The web USE flag is off, this has disabled the web admin interface."
|
||||
fi
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.0.5.ebuild,v 1.1 2009/04/09 05:40:39 pva Exp $
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
JABBER_ETC="/etc/jabber"
|
||||
JABBER_RUN="/var/run/jabber"
|
||||
JABBER_SPOOL="/var/spool/jabber"
|
||||
JABBER_LOG="/var/log/jabber"
|
||||
|
||||
JABBER_NAME="ejabberd"
|
||||
MY_PV=${PV}
|
||||
MY_PR=${PR}
|
||||
MY_P=${JABBER_NAME}-${MY_PV}
|
||||
MY_PF=${JABBER_NAME}-${MY_PV}-${MY_PR}
|
||||
|
||||
DESCRIPTION="The Erlang Jabber Daemon"
|
||||
HOMEPAGE="http://www.ejabberd.im/"
|
||||
SRC_URI="http://www.process-one.net/downloads/ejabberd/${PV}/${MY_P}.tar.gz"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="debug mod_irc mod_muc mod_pubsub ldap odbc pam ssl web zlib"
|
||||
|
||||
DEPEND=">=net-im/jabber-base-0.01
|
||||
>=dev-libs/expat-1.95
|
||||
>=dev-lang/erlang-11.2.5
|
||||
odbc? ( dev-db/unixODBC )
|
||||
ldap? ( =net-nds/openldap-2* )
|
||||
ssl? ( >=dev-libs/openssl-0.9.8e )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PROVIDE="virtual/jabber-server"
|
||||
|
||||
S=${WORKDIR}/${MY_P}/src
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# mod_shared_roster_ldap.patch
|
||||
epatch "${FILESDIR}/mod_shared_roster_ldap.patch"
|
||||
# mod_logxml.patch
|
||||
epatch "${FILESDIR}/mod_logxml.patch"
|
||||
|
||||
# get rid of the prefix
|
||||
sed -i -e "s/\\@prefix\\@//" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
# we want ejabberdctl in /usr/sbin not /sbin !!!
|
||||
sed -i -e "s/\\/sbin/\\/usr\\/sbin/" "${S}/Makefile.in" \
|
||||
|| die "cannot sed Makefile.in"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf --prefix=/ \
|
||||
$(use_enable mod_irc) \
|
||||
$(use_enable ldap eldap) \
|
||||
$(use_enable mod_muc) \
|
||||
$(use_enable mod_pubsub) \
|
||||
$(use_enable ssl tls) \
|
||||
$(use_enable web) \
|
||||
$(use_enable odbc) \
|
||||
$(use_enable zlib ejabberd_zlib) \
|
||||
$(use_enable pam) \
|
||||
|| die "econf failed"
|
||||
|
||||
if useq debug; then
|
||||
emake ejabberd_debug=true || die "compiling ejabberd core failed"
|
||||
else
|
||||
emake || die "compiling ejabberd core failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make \
|
||||
DESTDIR="${D}" \
|
||||
EJABBERDDIR="${D}/usr/$(get_libdir)/erlang/lib/${P}" \
|
||||
ETCDIR="${D}${JABBER_ETC}" \
|
||||
LOGDIR="${D}${JABBER_LOG}" \
|
||||
install || die "install failed"
|
||||
|
||||
# remove the default ejabberdctl as we use our own
|
||||
rm "${D}/sbin/ejabberdctl"
|
||||
|
||||
insinto ${JABBER_ETC}
|
||||
|
||||
chown -R jabber:jabber "${D}${JABBER_ETC}"
|
||||
chown -R jabber:jabber "${D}${JABBER_LOG}"
|
||||
chown -R jabber:jabber "${D}/usr/$(get_libdir)/erlang/lib/${P}"
|
||||
|
||||
if useq ssl ; then
|
||||
doins "${FILESDIR}/ssl.cnf"
|
||||
newins "${FILESDIR}/self-cert-v2.sh" self-cert.sh
|
||||
fi
|
||||
|
||||
# Pam helper module permissions
|
||||
# http://www.process-one.net/docs/ejabberd/guide_en.html
|
||||
if useq pam; then
|
||||
chown root:jabber "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
chmod 4750 "${D}"/usr/lib/erlang/lib/${P}/priv/bin/epam
|
||||
fi
|
||||
|
||||
cd "${WORKDIR}/${MY_P}/doc"
|
||||
dodoc "release_notes_${MY_PV}.txt"
|
||||
dohtml *.{html,png}
|
||||
|
||||
# set up /usr/sbin/ejabberd wrapper
|
||||
cat "${FILESDIR}/ejabberd-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberd"
|
||||
exeinto /usr/sbin
|
||||
doexe "${T}/ejabberd"
|
||||
|
||||
# set up /usr/sbin/ejabberdctl wrapper
|
||||
cat "${FILESDIR}/ejabberdctl-wrapper-${MY_PV}.template" \
|
||||
| sed -e "s/\@libdir\@/$(get_libdir)/g" -e "s/\@version\@/${PV}/g" \
|
||||
> "${T}/ejabberdctl"
|
||||
doexe "${T}/ejabberdctl"
|
||||
|
||||
dodir /var/lib/ejabberd
|
||||
|
||||
newinitd "${FILESDIR}/${MY_P}.initd" ${JABBER_NAME}
|
||||
newconfd "${FILESDIR}/${MY_P}.confd" ${JABBER_NAME}
|
||||
|
||||
# fix up the ssl cert paths in /etc/jabber/ejabberd.cfg to use the cert
|
||||
# that would be generated by /etc/jabber/self-cert.sh
|
||||
sed -i -e "s/\/path\/to\/ssl.pem/\/etc\/jabber\/ssl.pem/g" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
|
||||
# if mod_irc is not enabled, comment out the mod_irc in the default
|
||||
# ejabberd.cfg
|
||||
if ! use mod_irc; then
|
||||
sed -i -e "s/{mod_irc,/%{mod_irc,/" \
|
||||
"${D}${JABBER_ETC}/ejabberd.cfg" || die "Cannot sed ejabberd.cfg"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "For configuration instructions, please see"
|
||||
elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
|
||||
elog "http://www.process-one.net/en/projects/ejabberd/docs/guide_en.html"
|
||||
if useq ssl ; then
|
||||
if [ ! -e /etc/jabber/ssl.pem ]; then
|
||||
elog "Please edit ${JABBER_ETC}/ssl.cnf and run ${JABBER_ETC}/self-cert.sh"
|
||||
elog "Ejabberd may refuse to start without an SSL certificate"
|
||||
fi
|
||||
fi
|
||||
if ! useq web ; then
|
||||
elog "The web USE flag is off, this has disabled the web admin interface."
|
||||
fi
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
diff -uNr ejabberd-1.1.4.ORIG/src/expat_erl.c ejabberd-1.1.4/src/expat_erl.c
|
||||
--- ejabberd-1.1.4.ORIG/src/expat_erl.c 2007-09-14 12:07:56.000000000 +0100
|
||||
+++ ejabberd-1.1.4/src/expat_erl.c 2007-09-14 12:08:56.000000000 +0100
|
||||
@@ -14,6 +14,8 @@
|
||||
* Workaround for EI encode_string bug
|
||||
*/
|
||||
|
||||
+int x_fix_buff(ei_x_buff* x, int szneeded);
|
||||
+
|
||||
#define put8(s,n) do { \
|
||||
(s)[0] = (char)((n) & 0xff); \
|
||||
(s) += 1; \
|
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
erl -pa /var/lib/ejabberd/ebin \
|
||||
-sname ejabberd \
|
||||
-s ejabberd \
|
||||
-ejabberd config \"/etc/ejabberd/ejabberd.cfg\" \
|
||||
log_path \"/var/log/ejabberd/ejabberd.log\" \
|
||||
-kernel inetrc \"/etc/ejabberd/inetrc\" \
|
||||
-sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} \
|
||||
-mnesia dir \"/var/spool/ejabberd\" \
|
||||
$@
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.confd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
# Name of your ejabberd node. Used by ejabberdctl to determine which
|
||||
# node to communicate with.
|
||||
#EJABBERD_NODE="ejabberd@`hostname -s`"
|
||||
|
||||
# Max number of open network connections. Default is 1024. Increasing
|
||||
# this will slightly increase memory usage.
|
||||
#ERL_MAX_PORTS=1024
|
||||
|
||||
# Return memory to the system after using it, instead of keeping it
|
||||
# allocated for future use. Decreases the memory required by ejabberd,
|
||||
# but makes it run slower. Default is unset, set to any value to
|
||||
# activate.
|
||||
#ERL_FULLSWEEP_AFTER=0
|
||||
|
||||
# set to 1, "true" or "yes" if you have a symmetric-multi-processor
|
||||
# default is non smp
|
||||
#HAVE_SMP=0
|
||||
|
||||
|
@ -0,0 +1,57 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.initd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
opts="${opts} reload"
|
||||
|
||||
depend() {
|
||||
use dns
|
||||
need net
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
|
||||
eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
ebegin "Starting ejabberd"
|
||||
# the process name of beam is different depending whether smp is used.
|
||||
# set it explicitly so start-stop-daemon works
|
||||
case "$HAVE_SMP" in
|
||||
"1"|"true"|"yes")
|
||||
BEAMNAME="beam.smp"
|
||||
SMPOPT="enable"
|
||||
;;
|
||||
*)
|
||||
BEAMNAME="beam"
|
||||
SMPOPT="disable"
|
||||
;;
|
||||
esac
|
||||
cd /var/lib/ejabberd
|
||||
start-stop-daemon --start --quiet --chuid jabber:jabber \
|
||||
--name $BEAMNAME \
|
||||
--exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ejabberd"
|
||||
/usr/sbin/ejabberdctl stop
|
||||
sleep 1
|
||||
kill `ps ax | grep "epmd -daemon" | grep -v "grep" | awk '{print $1;}'`
|
||||
kill `ps ax | grep "ejabber" | grep "beam" | awk '{print $1}'`
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ejabberd"
|
||||
/usr/sbin/ejabberdctl reopen-log
|
||||
eend $?
|
||||
}
|
||||
|
@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.initd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
opts="${opts} reload"
|
||||
|
||||
depend() {
|
||||
use dns
|
||||
need net
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
|
||||
eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
ebegin "Starting ejabberd"
|
||||
# the process name of beam is different depending whether smp is used.
|
||||
# set it explicitly so start-stop-daemon works
|
||||
case "$HAVE_SMP" in
|
||||
"1"|"true"|"yes")
|
||||
BEAMNAME="beam.smp"
|
||||
SMPOPT="enable"
|
||||
;;
|
||||
*)
|
||||
BEAMNAME="beam"
|
||||
SMPOPT="disable"
|
||||
;;
|
||||
esac
|
||||
cd /var/lib/ejabberd
|
||||
start-stop-daemon --start --quiet --chuid jabber:jabber \
|
||||
--name $BEAMNAME \
|
||||
--exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ejabberd"
|
||||
/usr/sbin/ejabberdctl stop
|
||||
RES=$?
|
||||
sleep 1
|
||||
if ps ax | grep "epmd -daemon" | grep -v "grep" >/dev/null;
|
||||
then
|
||||
kill `ps ax | grep "epmd -daemon" | grep -v "grep" | awk '{print $1;}'`
|
||||
fi
|
||||
if ps ax | grep "ejabber" | grep "beam" >/dev/null;
|
||||
then
|
||||
kill `ps ax | grep "ejabber" | grep "beam" | awk '{print $1}'`
|
||||
fi
|
||||
eend $RES
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ejabberd"
|
||||
/usr/sbin/ejabberdctl reopen-log
|
||||
eend $?
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.confd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
# Name of your ejabberd node. Used by ejabberdctl to determine which
|
||||
# node to communicate with.
|
||||
EJABBERD_NODE="ejabberd@`hostname -s`"
|
||||
|
||||
# Max number of open network connections. Default is 1024. Increasing
|
||||
# this will slightly increase memory usage.
|
||||
#ERL_MAX_PORTS=1024
|
||||
|
||||
# Return memory to the system after using it, instead of keeping it
|
||||
# allocated for future use. Decreases the memory required by ejabberd,
|
||||
# but makes it run slower. Default is unset, set to any value to
|
||||
# activate.
|
||||
#ERL_FULLSWEEP_AFTER=0
|
||||
|
||||
# set to 1, "true" or "yes" if you have a symmetric-multi-processor
|
||||
# default is non smp
|
||||
#HAVE_SMP=0
|
||||
|
||||
|
@ -0,0 +1,54 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.initd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
opts="${opts} reload"
|
||||
|
||||
depend() {
|
||||
use dns
|
||||
need net
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
|
||||
eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
ebegin "Starting ejabberd"
|
||||
# the process name of beam is different depending whether smp is used.
|
||||
# set it explicitly so start-stop-daemon works
|
||||
case "$HAVE_SMP" in
|
||||
"1"|"true"|"yes")
|
||||
BEAMNAME="beam.smp"
|
||||
SMPOPT="enable"
|
||||
;;
|
||||
*)
|
||||
BEAMNAME="beam"
|
||||
SMPOPT="disable"
|
||||
;;
|
||||
esac
|
||||
cd /var/lib/ejabberd
|
||||
start-stop-daemon --start --quiet --chuid jabber:jabber \
|
||||
--name $BEAMNAME \
|
||||
--exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ejabberd"
|
||||
/usr/sbin/ejabberdctl stop
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ejabberd"
|
||||
/usr/sbin/ejabberdctl reopen-log
|
||||
eend $?
|
||||
}
|
||||
|
@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.initd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
opts="${opts} reload"
|
||||
|
||||
depend() {
|
||||
use dns slapd
|
||||
need net
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
|
||||
eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
ebegin "Starting ejabberd"
|
||||
# the process name of beam is different depending whether smp is used.
|
||||
# set it explicitly so start-stop-daemon works
|
||||
case "$HAVE_SMP" in
|
||||
"1"|"true"|"yes")
|
||||
BEAMNAME="beam.smp"
|
||||
SMPOPT="enable"
|
||||
;;
|
||||
*)
|
||||
BEAMNAME="beam"
|
||||
SMPOPT="disable"
|
||||
;;
|
||||
esac
|
||||
cd /var/lib/ejabberd
|
||||
start-stop-daemon --start --quiet --chuid jabber:jabber \
|
||||
--name $BEAMNAME \
|
||||
--exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ejabberd"
|
||||
/usr/sbin/ejabberdctl stop
|
||||
RES=$?
|
||||
sleep 1
|
||||
if ps ax | grep "epmd -daemon" | grep -v "grep" >/dev/null;
|
||||
then
|
||||
kill `ps ax | grep "epmd -daemon" | grep -v "grep" | awk '{print $1;}'`
|
||||
fi
|
||||
if ps ax | grep "ejabber" | grep "beam" >/dev/null;
|
||||
then
|
||||
kill `ps ax | grep "ejabber" | grep "beam" | awk '{print $1}'`
|
||||
fi
|
||||
eend $RES
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ejabberd"
|
||||
/usr/sbin/ejabberdctl reopen-log
|
||||
eend $?
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.confd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
# Name of your ejabberd node. Used by ejabberdctl to determine which
|
||||
# node to communicate with.
|
||||
#EJABBERD_NODE="ejabberd@`hostname -s`"
|
||||
|
||||
# Max number of open network connections. Default is 1024. Increasing
|
||||
# this will slightly increase memory usage.
|
||||
#ERL_MAX_PORTS=1024
|
||||
|
||||
# Return memory to the system after using it, instead of keeping it
|
||||
# allocated for future use. Decreases the memory required by ejabberd,
|
||||
# but makes it run slower. Default is unset, set to any value to
|
||||
# activate.
|
||||
#ERL_FULLSWEEP_AFTER=0
|
||||
|
||||
# set to 1, "true" or "yes" if you have a symmetric-multi-processor
|
||||
# default is non smp
|
||||
#HAVE_SMP=0
|
||||
|
||||
|
@ -0,0 +1,64 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.0.2.initd,v 1.1 2008/08/03 16:19:05 caleb Exp $
|
||||
|
||||
opts="${opts} reload"
|
||||
|
||||
depend() {
|
||||
use dns
|
||||
need net
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
|
||||
eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
ebegin "Starting ejabberd"
|
||||
# the process name of beam is different depending whether smp is used.
|
||||
# set it explicitly so start-stop-daemon works
|
||||
case "$HAVE_SMP" in
|
||||
"1"|"true"|"yes")
|
||||
BEAMNAME="beam.smp"
|
||||
SMPOPT="enable"
|
||||
;;
|
||||
*)
|
||||
BEAMNAME="beam"
|
||||
SMPOPT="disable"
|
||||
;;
|
||||
esac
|
||||
cd /var/lib/ejabberd
|
||||
start-stop-daemon --start --quiet --chuid jabber:jabber \
|
||||
--name $BEAMNAME \
|
||||
--exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ejabberd"
|
||||
/usr/sbin/ejabberdctl stop
|
||||
RES=$?
|
||||
sleep 1
|
||||
if ps ax | grep "epmd -daemon" | grep -v "grep" >/dev/null;
|
||||
then
|
||||
kill `ps ax | grep "epmd -daemon" | grep -v "grep" | awk '{print $1;}'`
|
||||
fi
|
||||
if ps ax | grep "ejabber" | grep "beam" >/dev/null;
|
||||
then
|
||||
kill `ps ax | grep "ejabber" | grep "beam" | awk '{print $1}'`
|
||||
fi
|
||||
eend $RES
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ejabberd"
|
||||
/usr/sbin/ejabberdctl reopen-log
|
||||
eend $?
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/conf.d/ejabberd ] && . /etc/conf.d/ejabberd
|
||||
|
||||
# provide some default configuration
|
||||
ERL=/usr/bin/erl
|
||||
CONFIG=/etc/jabber/ejabberd.cfg
|
||||
INETRC=/etc/jabber/inetrc
|
||||
LOG_PATH=/var/log/jabber/ejabberd.log
|
||||
SASL_LOG=/var/log/jabber/sasl.log
|
||||
SPOOL=/var/spool/jabber
|
||||
|
||||
ARGS=
|
||||
while [ $# -ne 0 ] ; do
|
||||
PARAM=$1
|
||||
shift
|
||||
case $PARAM in
|
||||
--) break ;;
|
||||
--node) EJABBERD_NODE=$1; shift ;;
|
||||
--config) CONFIG=$1 ; shift ;;
|
||||
--log) LOG_PATH=$1 ; shift ;;
|
||||
--sasl-log) SASL_LOG=$1 ; shift ;;
|
||||
--spool) SPOOL=$1 ; shift ;;
|
||||
*) ARGS="$ARGS $PARAM" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%.*}" ] ; then
|
||||
SNAME=-sname
|
||||
else
|
||||
SNAME=-name
|
||||
fi
|
||||
|
||||
# export ejabberd configuration environment variables
|
||||
export HOME=/var/run/jabber
|
||||
export EJABBERD_EBIN=/usr/@libdir@/erlang/lib/calculate-ejabberd-@version@/ebin
|
||||
export EJABBERD_MSGS_PATH=/usr/@libdir@/erlang/lib/calculate-ejabberd-@version@/priv/msgs
|
||||
export EJABBERD_SO_PATH=/usr/@libdir@/erlang/lib/calculate-ejabberd-@version@/priv/lib
|
||||
export EJABBERD_LOG_PATH=$LOG_PATH
|
||||
export EJABBERD_CONFIG_PATH=$CONFIG
|
||||
|
||||
exec $ERL $SNAME $EJABBERD_NODE \
|
||||
-s ejabberd \
|
||||
-kernel inetrc \"$INETRC\" \
|
||||
-sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \
|
||||
-mnesia dir \"$SPOOL\" \
|
||||
$ERL_OPTIONS $ARGS "$@"
|
||||
|
||||
|
@ -0,0 +1,49 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/conf.d/ejabberd ] && . /etc/conf.d/ejabberd
|
||||
|
||||
# provide some default configuration
|
||||
ERL=/usr/bin/erl
|
||||
CONFIG=/etc/jabber/ejabberd.cfg
|
||||
INETRC=/etc/jabber/inetrc
|
||||
LOG_PATH=/var/log/jabber/ejabberd.log
|
||||
SASL_LOG=/var/log/jabber/sasl.log
|
||||
SPOOL=/var/spool/jabber
|
||||
|
||||
ARGS=
|
||||
while [ $# -ne 0 ] ; do
|
||||
PARAM=$1
|
||||
shift
|
||||
case $PARAM in
|
||||
--) break ;;
|
||||
--node) EJABBERD_NODE=$1; shift ;;
|
||||
--config) CONFIG=$1 ; shift ;;
|
||||
--log) LOG_PATH=$1 ; shift ;;
|
||||
--sasl-log) SASL_LOG=$1 ; shift ;;
|
||||
--spool) SPOOL=$1 ; shift ;;
|
||||
*) ARGS="$ARGS $PARAM" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%.*}" ] ; then
|
||||
SNAME=-sname
|
||||
else
|
||||
SNAME=-name
|
||||
fi
|
||||
|
||||
# export ejabberd configuration environment variables
|
||||
export HOME=/var/run/jabber
|
||||
export EJABBERD_EBIN=/usr/@libdir@/erlang/lib/calculate-ejabberd-@version@/ebin
|
||||
export EJABBERD_MSGS_PATH=/usr/@libdir@/erlang/lib/calculate-ejabberd-@version@/priv/msgs
|
||||
export EJABBERD_SO_PATH=/usr/@libdir@/erlang/lib/calculate-ejabberd-@version@/priv/lib
|
||||
export EJABBERD_LOG_PATH=$LOG_PATH
|
||||
export EJABBERD_CONFIG_PATH=$CONFIG
|
||||
|
||||
exec $ERL $SNAME $EJABBERD_NODE \
|
||||
-s ejabberd \
|
||||
-kernel inetrc \"$INETRC\" \
|
||||
-sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \
|
||||
-mnesia dir \"$SPOOL\" \
|
||||
$ERL_OPTIONS $ARGS "$@"
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec env HOME=/var/run/ejabberd \
|
||||
erl -pa /var/lib/ejabberd/ebin \
|
||||
-noinput \
|
||||
-sname ejabberdctl \
|
||||
-s ejabberd_ctl \
|
||||
-extra $@
|
@ -0,0 +1 @@
|
||||
{file, resolv, "/etc/resolv.conf"}.
|
@ -0,0 +1,265 @@
|
||||
diff -uNr ejabberd-2.0.2-beta1.ORIG/src/mod_logxml.erl ejabberd-2.0.2-beta1/src/mod_logxml.erl
|
||||
--- mod_logxml.erl
|
||||
+++ mod_logxml.erl
|
||||
@@ -0,0 +1,261 @@
|
||||
+%%%----------------------------------------------------------------------
|
||||
+%%% File : mod_logxml.erl
|
||||
+%%% Author : Badlop
|
||||
+%%% Purpose : Log XMPP packets to XML file
|
||||
+%%% Created :
|
||||
+%%% Id :
|
||||
+%%%----------------------------------------------------------------------
|
||||
+
|
||||
+-module(mod_logxml).
|
||||
+-author('badlop@ono.com').
|
||||
+
|
||||
+-behaviour(gen_mod).
|
||||
+
|
||||
+-export([start/2, init/7, stop/1,
|
||||
+ send_packet/3, receive_packet/4]).
|
||||
+
|
||||
+-include("ejabberd.hrl").
|
||||
+-include("jlib.hrl").
|
||||
+
|
||||
+-define(PROCNAME, ejabberd_mod_logxml).
|
||||
+
|
||||
+%% -------------------
|
||||
+%% Module control
|
||||
+%% -------------------
|
||||
+
|
||||
+start(Host, Opts) ->
|
||||
+ Logdir = gen_mod:get_opt(logdir, Opts, "/tmp/jabberlogs/"),
|
||||
+
|
||||
+ Rd = gen_mod:get_opt(rotate_days, Opts, 1),
|
||||
+ Rf = case gen_mod:get_opt(rotate_megs, Opts, 10) of
|
||||
+ no -> no;
|
||||
+ Rf1 -> Rf1*1024*1024
|
||||
+ end,
|
||||
+ Rp = case gen_mod:get_opt(rotate_kpackets, Opts, 10) of
|
||||
+ no -> no;
|
||||
+ Rp1 -> Rp1*1000
|
||||
+ end,
|
||||
+ RotateO = {Rd, Rf, Rp},
|
||||
+ CheckRKP = gen_mod:get_opt(check_rotate_kpackets, Opts, 1),
|
||||
+
|
||||
+ Timezone = gen_mod:get_opt(timezone, Opts, local),
|
||||
+
|
||||
+ Orientation = gen_mod:get_opt(orientation, Opts, [send, recv]),
|
||||
+ Stanza = gen_mod:get_opt(stanza, Opts, [iq, message, presence, other]),
|
||||
+ Direction = gen_mod:get_opt(direction, Opts, [internal, vhosts, external]),
|
||||
+ FilterO = {
|
||||
+ {orientation, Orientation},
|
||||
+ {stanza, Stanza},
|
||||
+ {direction, Direction}},
|
||||
+ ShowIP = gen_mod:get_opt(show_ip, Opts, false),
|
||||
+
|
||||
+ ejabberd_hooks:add(user_send_packet, Host, ?MODULE, send_packet, 90),
|
||||
+ ejabberd_hooks:add(user_receive_packet, Host, ?MODULE, receive_packet, 90),
|
||||
+ register(gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
+ spawn(?MODULE, init, [Host, Logdir, RotateO, CheckRKP,
|
||||
+ Timezone, ShowIP, FilterO])).
|
||||
+
|
||||
+stop(Host) ->
|
||||
+ ejabberd_hooks:delete(user_send_packet, Host, ?MODULE, send_packet, 90),
|
||||
+ ejabberd_hooks:delete(user_receive_packet, Host, ?MODULE, receive_packet, 90),
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
+ Proc ! stop,
|
||||
+ {wait, Proc}.
|
||||
+
|
||||
+init(Host, Logdir, RotateO, CheckRKP, Timezone, ShowIP, FilterO) ->
|
||||
+ {IoDevice, Filename, Gregorian_day} = open_file(Logdir, Host, Timezone),
|
||||
+ loop(Host, IoDevice, Filename, Logdir, CheckRKP, RotateO, 0, Gregorian_day,
|
||||
+ Timezone, ShowIP, FilterO).
|
||||
+
|
||||
+%% -------------------
|
||||
+%% Main
|
||||
+%% -------------------
|
||||
+
|
||||
+manage_rotate(Host, IoDevice, Filename, Logdir, RotateO, PacketC,
|
||||
+ Gregorian_day_log, Timezone) ->
|
||||
+ {RO_days, RO_size, RO_packets} = RotateO,
|
||||
+
|
||||
+ Rotate1 = case RO_packets of
|
||||
+ no -> false;
|
||||
+ PacketC -> true;
|
||||
+ _ -> false
|
||||
+ end,
|
||||
+
|
||||
+ Filesize = filelib:file_size(Filename),
|
||||
+ Rotate2 = if
|
||||
+ RO_size == no -> false;
|
||||
+ Filesize >= RO_size -> true;
|
||||
+ true -> false
|
||||
+ end,
|
||||
+
|
||||
+ Gregorian_day_today = get_gregorian_day(),
|
||||
+ Rotate3 = if
|
||||
+ RO_days == no -> false;
|
||||
+ (Gregorian_day_today - Gregorian_day_log) >= RO_days ->
|
||||
+ true;
|
||||
+ true -> false
|
||||
+ end,
|
||||
+
|
||||
+ case lists:any(fun(E) -> E end, [Rotate1, Rotate2, Rotate3]) of
|
||||
+ true ->
|
||||
+ {IoDevice2, Filename2, Gregorian_day2} =
|
||||
+ rotate_log(IoDevice, Logdir, Host, Timezone),
|
||||
+ {IoDevice2, Filename2, Gregorian_day2, 0};
|
||||
+ false ->
|
||||
+ {IoDevice, Filename, Gregorian_day_log, PacketC+1}
|
||||
+ end.
|
||||
+
|
||||
+filter(FilterO, E) ->
|
||||
+ {{orientation, OrientationO},{stanza, StanzaO},{direction, DirectionO}} =
|
||||
+ FilterO,
|
||||
+ {Orientation, From, To, Packet} = E,
|
||||
+
|
||||
+ {xmlelement, Stanza_str, _Attrs, _Els} = Packet,
|
||||
+ Stanza = list_to_atom(Stanza_str),
|
||||
+
|
||||
+ Hosts_all = ejabberd_config:get_global_option(hosts),
|
||||
+ {Host_local, Host_remote} = case Orientation of
|
||||
+ send -> {From#jid.lserver, To#jid.lserver};
|
||||
+ recv -> {To#jid.lserver, From#jid.lserver}
|
||||
+ end,
|
||||
+ Direction = case Host_remote of
|
||||
+ Host_local -> internal;
|
||||
+ _ ->
|
||||
+ case lists:member(Host_remote, Hosts_all) of
|
||||
+ true -> vhosts;
|
||||
+ false -> external
|
||||
+ end
|
||||
+ end,
|
||||
+
|
||||
+ {lists:all(fun(O) -> O end,
|
||||
+ [lists:member(Orientation, OrientationO),
|
||||
+ lists:member(Stanza, StanzaO),
|
||||
+ lists:member(Direction, DirectionO)]),
|
||||
+ {Orientation, Stanza, Direction}}.
|
||||
+
|
||||
+loop(Host, IoDevice, Filename, Logdir, CheckRKP, RotateO, PacketC,
|
||||
+ Gregorian_day, Timezone, ShowIP, FilterO) ->
|
||||
+ receive
|
||||
+ {addlog, E} ->
|
||||
+ {IoDevice3, Filename3, Gregorian_day3, PacketC3} =
|
||||
+ case filter(FilterO, E) of
|
||||
+ {true, OSD} ->
|
||||
+ Div = PacketC/CheckRKP,
|
||||
+ {IoDevice2, Filename2, Gregorian_day2, PacketC2} =
|
||||
+ case Div==round(Div) of
|
||||
+ true ->
|
||||
+ manage_rotate(Host, IoDevice, Filename,
|
||||
+ Logdir, RotateO, PacketC,
|
||||
+ Gregorian_day, Timezone);
|
||||
+ false ->
|
||||
+ {IoDevice, Filename, Gregorian_day,
|
||||
+ PacketC+1}
|
||||
+ end,
|
||||
+ add_log(IoDevice2, Timezone, ShowIP, E, OSD),
|
||||
+ {IoDevice2, Filename2, Gregorian_day2, PacketC2};
|
||||
+ _ ->
|
||||
+ {IoDevice, Filename, Gregorian_day, PacketC}
|
||||
+ end,
|
||||
+ loop(Host, IoDevice3, Filename3, Logdir, CheckRKP, RotateO,
|
||||
+ PacketC3, Gregorian_day3, Timezone, ShowIP, FilterO);
|
||||
+ stop ->
|
||||
+ close_file(IoDevice),
|
||||
+ ok;
|
||||
+ _ ->
|
||||
+ loop(Host, IoDevice, Filename, Logdir, CheckRKP, RotateO, PacketC,
|
||||
+ Gregorian_day, Timezone, ShowIP, FilterO)
|
||||
+ end.
|
||||
+
|
||||
+send_packet(FromJID, ToJID, P) ->
|
||||
+ Host = FromJID#jid.lserver,
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
+ Proc ! {addlog, {send, FromJID, ToJID, P}}.
|
||||
+
|
||||
+receive_packet(_JID, From, To, P) ->
|
||||
+ Host = To#jid.lserver,
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||
+ Proc ! {addlog, {recv, From, To, P}}.
|
||||
+
|
||||
+add_log(Io, Timezone, ShowIP, {Orientation, From, To, Packet}, _OSD) ->
|
||||
+ %%{Orientation, Stanza, Direction} = OSD,
|
||||
+ LocalJID = case Orientation of
|
||||
+ send -> From;
|
||||
+ recv -> To
|
||||
+ end,
|
||||
+ LocalIPS = case ShowIP of
|
||||
+ true ->
|
||||
+ {UserIP, _Port} = ejabberd_sm:get_user_ip(
|
||||
+ LocalJID#jid.user,
|
||||
+ LocalJID#jid.server,
|
||||
+ LocalJID#jid.resource),
|
||||
+ io_lib:format("lip=\"~s\" ", [inet_parse:ntoa(UserIP)]);
|
||||
+ false -> ""
|
||||
+ end,
|
||||
+ TimestampISO = get_now_iso(Timezone),
|
||||
+ io:fwrite(Io, "<packet or=\"~p\" ljid=\"~s\" ~sts=\"~s\">~s</packet>~n",
|
||||
+ [Orientation, jlib:jid_to_string(LocalJID), LocalIPS,
|
||||
+ TimestampISO, xml:element_to_string(Packet)]).
|
||||
+
|
||||
+%% -------------------
|
||||
+%% File
|
||||
+%% -------------------
|
||||
+
|
||||
+open_file(Logdir, Host, Timezone) ->
|
||||
+ TimeStamp = get_now_iso(Timezone),
|
||||
+ Year = string:substr(TimeStamp, 1, 4),
|
||||
+ Month = string:substr(TimeStamp, 5, 2),
|
||||
+ Day = string:substr(TimeStamp, 7, 2),
|
||||
+ Hour = string:substr(TimeStamp, 10, 2),
|
||||
+ Min = string:substr(TimeStamp, 13, 2),
|
||||
+ Sec = string:substr(TimeStamp, 16, 2),
|
||||
+ S = "-",
|
||||
+ Logname = lists:flatten([Host,S,Year,S,Month,S,Day,S,Hour,S,Min,S,Sec,
|
||||
+ ".xml"]),
|
||||
+ Filename = filename:join([Logdir, Logname]),
|
||||
+
|
||||
+ Gregorian_day = get_gregorian_day(),
|
||||
+
|
||||
+ %% Open file, create if it does not exist, create parent dirs if needed
|
||||
+ case file:read_file_info(Filename) of
|
||||
+ {ok, _} ->
|
||||
+ {ok, IoDevice} = file:open(Filename, [append]);
|
||||
+ {error, enoent} ->
|
||||
+ make_dir_rec(Logdir),
|
||||
+ {ok, IoDevice} = file:open(Filename, [append]),
|
||||
+ io:fwrite(IoDevice, "~s~n", ["<?xml version=\"1.0\"?>"]),
|
||||
+ io:fwrite(IoDevice, "~s~n", ["<?xml-stylesheet href=\"xmpp.xsl\" type=\"text/xsl\"?>"]),
|
||||
+ io:fwrite(IoDevice, "~s~n", ["<log>"])
|
||||
+ end,
|
||||
+ {IoDevice, Filename, Gregorian_day}.
|
||||
+
|
||||
+close_file(IoDevice) ->
|
||||
+ io:fwrite(IoDevice, "~s~n", ["</log>"]),
|
||||
+ file:close(IoDevice).
|
||||
+
|
||||
+rotate_log(IoDevice, Logdir, Host, Timezone) ->
|
||||
+ close_file(IoDevice),
|
||||
+ open_file(Logdir, Host, Timezone).
|
||||
+
|
||||
+make_dir_rec(Dir) ->
|
||||
+ case file:read_file_info(Dir) of
|
||||
+ {ok, _} ->
|
||||
+ ok;
|
||||
+ {error, enoent} ->
|
||||
+ DirS = filename:split(Dir),
|
||||
+ DirR = lists:sublist(DirS, length(DirS)-1),
|
||||
+ make_dir_rec(filename:join(DirR)),
|
||||
+ file:make_dir(Dir)
|
||||
+ end.
|
||||
+
|
||||
+%% -------------------
|
||||
+%% Utils
|
||||
+%% -------------------
|
||||
+
|
||||
+get_gregorian_day() -> calendar:date_to_gregorian_days(date()).
|
||||
+
|
||||
+get_now_iso(Timezone) ->
|
||||
+ TimeStamp = case Timezone of
|
||||
+ local -> calendar:now_to_local_time(now());
|
||||
+ universal -> calendar:now_to_universal_time(now())
|
||||
+ end,
|
||||
+ jlib:timestamp_to_iso(TimeStamp).
|
@ -0,0 +1,557 @@
|
||||
diff -uNr ejabberd-2.0.2-beta1.ORIG/src/mod_shared_roster_ldap.erl ejabberd-2.0.2-beta1/src/mod_shared_roster_ldap.erl
|
||||
--- mod_shared_roster_ldap.erl
|
||||
+++ mod_shared_roster_ldap.erl
|
||||
@@ -0,0 +1,553 @@
|
||||
+%%%----------------------------------------------------------------------
|
||||
+%%% File : mod_shared_roster_ldap.erl
|
||||
+%%% Author : Alexey Shchepin <alexey@sevcom.net>
|
||||
+%%% Purpose : LDAP shared roster management
|
||||
+%%% Created : 5 Mar 2005 by Alexey Shchepin <alexey@sevcom.net>
|
||||
+%%% Id : $Id: mod_shared_roster.erl 24 2005-04-14 01:15:31Z alexey $
|
||||
+%%%----------------------------------------------------------------------
|
||||
+
|
||||
+%%%----------------------------------------------------------------------
|
||||
+%%% Some changes to make it AD friendly and more usable :-)
|
||||
+%%% realloc@realloc.spb.ru
|
||||
+%%%----------------------------------------------------------------------
|
||||
+
|
||||
+
|
||||
+-module(mod_shared_roster_ldap).
|
||||
+-author('alexey@sevcom.net').
|
||||
+
|
||||
+-behaviour(gen_server).
|
||||
+-behaviour(gen_mod).
|
||||
+
|
||||
+%% gen_server callbacks
|
||||
+-export([
|
||||
+ init/1,
|
||||
+ handle_info/2,
|
||||
+ handle_call/3,
|
||||
+ handle_cast/2,
|
||||
+ terminate/2,
|
||||
+ code_change/3
|
||||
+]).
|
||||
+
|
||||
+-export([
|
||||
+ start/2,
|
||||
+ start_link/2,
|
||||
+ stop/1,
|
||||
+ get_user_roster/2,
|
||||
+ get_subscription_lists/3,
|
||||
+ get_jid_info/4,
|
||||
+ process_item/2,
|
||||
+ in_subscription/6,
|
||||
+ out_subscription/4
|
||||
+]).
|
||||
+
|
||||
+-include("ejabberd.hrl").
|
||||
+-include("eldap/eldap.hrl").
|
||||
+-include("jlib.hrl").
|
||||
+-include("mod_roster.hrl").
|
||||
+
|
||||
+-record(state, {
|
||||
+ host,
|
||||
+ eldap_id,
|
||||
+ servers,
|
||||
+ port,
|
||||
+ dn,
|
||||
+ base,
|
||||
+ password,
|
||||
+ uid,
|
||||
+ group_attr,
|
||||
+ group_desc,
|
||||
+ user_desc,
|
||||
+ uid_format,
|
||||
+ filter,
|
||||
+ ufilter,
|
||||
+ rfilter,
|
||||
+ gfilter
|
||||
+}).
|
||||
+
|
||||
+-define(LDAP_REQUEST_TIMEOUT, 10000).
|
||||
+
|
||||
+%% Unused callbacks.
|
||||
+handle_cast(_Request, State) ->
|
||||
+ {noreply, State}.
|
||||
+code_change(_OldVsn, State, _Extra) ->
|
||||
+ {ok, State}.
|
||||
+handle_info(_Info, State) ->
|
||||
+ {noreply, State}.
|
||||
+%% -----
|
||||
+
|
||||
+start(Host, Opts) ->
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
||||
+ ChildSpec = {
|
||||
+ Proc, {?MODULE, start_link, [Host, Opts]},
|
||||
+ permanent, 1000, worker, [?MODULE]
|
||||
+ },
|
||||
+ supervisor:start_child(ejabberd_sup, ChildSpec).
|
||||
+
|
||||
+stop(Host) ->
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
||||
+ gen_server:call(Proc, stop),
|
||||
+ supervisor:terminate_child(ejabberd_sup, Proc),
|
||||
+ supervisor:delete_child(ejabberd_sup, Proc).
|
||||
+
|
||||
+start_link(Host, Opts) ->
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
||||
+ gen_server:start_link({local, Proc}, ?MODULE, [Host, Opts], []).
|
||||
+
|
||||
+terminate(_Reason, State) ->
|
||||
+ Host = State#state.host,
|
||||
+ ejabberd_hooks:delete(roster_get, Host,
|
||||
+ ?MODULE, get_user_roster, 70),
|
||||
+ ejabberd_hooks:delete(roster_in_subscription, Host,
|
||||
+ ?MODULE, in_subscription, 30),
|
||||
+ ejabberd_hooks:delete(roster_out_subscription, Host,
|
||||
+ ?MODULE, out_subscription, 30),
|
||||
+ ejabberd_hooks:delete(roster_get_subscription_lists, Host,
|
||||
+ ?MODULE, get_subscription_lists, 70),
|
||||
+ ejabberd_hooks:delete(roster_get_jid_info, Host,
|
||||
+ ?MODULE, get_jid_info, 70),
|
||||
+ ejabberd_hooks:delete(roster_process_item, Host,
|
||||
+ ?MODULE, process_item, 50).
|
||||
+
|
||||
+init([Host, Opts]) ->
|
||||
+ State = parse_options(Host, Opts),
|
||||
+ ejabberd_hooks:add(roster_get, Host,
|
||||
+ ?MODULE, get_user_roster, 70),
|
||||
+ ejabberd_hooks:add(roster_in_subscription, Host,
|
||||
+ ?MODULE, in_subscription, 30),
|
||||
+ ejabberd_hooks:add(roster_out_subscription, Host,
|
||||
+ ?MODULE, out_subscription, 30),
|
||||
+ ejabberd_hooks:add(roster_get_subscription_lists, Host,
|
||||
+ ?MODULE, get_subscription_lists, 70),
|
||||
+ ejabberd_hooks:add(roster_get_jid_info, Host,
|
||||
+ ?MODULE, get_jid_info, 70),
|
||||
+ ejabberd_hooks:add(roster_process_item, Host,
|
||||
+ ?MODULE, process_item, 50),
|
||||
+ eldap:start_link(State#state.eldap_id,
|
||||
+ State#state.servers,
|
||||
+ State#state.port,
|
||||
+ State#state.dn,
|
||||
+ State#state.password),
|
||||
+ {ok, State}.
|
||||
+
|
||||
+get_user_roster(Items, US) ->
|
||||
+ {U, S} = US,
|
||||
+ DisplayedGroups = get_user_displayed_groups(US),
|
||||
+ %% Get shared roster users in all groups and remove self:
|
||||
+ SRUsers =
|
||||
+ lists:foldl(
|
||||
+ fun(Group, Acc1) ->
|
||||
+ lists:foldl(
|
||||
+ fun(User, Acc2) ->
|
||||
+ if User == US -> Acc2;
|
||||
+ true -> dict:append(User,
|
||||
+ get_group_name(S, Group),
|
||||
+ Acc2)
|
||||
+ end
|
||||
+ end, Acc1, get_group_users(S, Group))
|
||||
+ end, dict:new(), DisplayedGroups),
|
||||
+
|
||||
+ %% If partially subscribed users are also in shared roster, show them as
|
||||
+ %% totally subscribed:
|
||||
+ {NewItems1, SRUsersRest} =
|
||||
+ lists:mapfoldl(
|
||||
+ fun(Item, SRUsers1) ->
|
||||
+ {_, _, {U1, S1, _}} = Item#roster.usj,
|
||||
+ US1 = {U1, S1},
|
||||
+ case dict:find(US1, SRUsers1) of
|
||||
+ {ok, _GroupNames} ->
|
||||
+ {Item#roster{subscription = both, ask = none},
|
||||
+ dict:erase(US1, SRUsers1)};
|
||||
+ error ->
|
||||
+ {Item, SRUsers1}
|
||||
+ end
|
||||
+ end, SRUsers, Items),
|
||||
+
|
||||
+ %% Export items in roster format:
|
||||
+ SRItems = [#roster{usj = {U, S, {U1, S1, ""}},
|
||||
+ us = US,
|
||||
+ jid = {U1, S1, ""},
|
||||
+ name = get_user_name(U1,S1),
|
||||
+ subscription = both,
|
||||
+ ask = none,
|
||||
+ groups = GroupNames} ||
|
||||
+ {{U1, S1}, GroupNames} <- dict:to_list(SRUsersRest)],
|
||||
+ SRItems ++ NewItems1.
|
||||
+
|
||||
+%% This function in use to rewrite the roster entries when moving or renaming
|
||||
+%% them in the user contact list.
|
||||
+process_item(RosterItem, Host) ->
|
||||
+ USFrom = RosterItem#roster.us,
|
||||
+ {User,Server,_Resource} = RosterItem#roster.jid,
|
||||
+ USTo = {User,Server},
|
||||
+ DisplayedGroups = get_user_displayed_groups(USFrom),
|
||||
+ CommonGroups = lists:filter(fun(Group) ->
|
||||
+ is_user_in_group(USTo, Group, Server)
|
||||
+ end, DisplayedGroups),
|
||||
+ case CommonGroups of
|
||||
+ [] -> RosterItem;
|
||||
+ %% Roster item cannot be removed: We simply reset the original groups:
|
||||
+ _ when RosterItem#roster.subscription == remove ->
|
||||
+ GroupNames = lists:map(fun(Group) ->
|
||||
+ get_group_name(Host, Group)
|
||||
+ end, CommonGroups),
|
||||
+ RosterItem#roster{subscription = both, ask = none,
|
||||
+ groups=[GroupNames]};
|
||||
+ _ -> RosterItem#roster{subscription = both, ask = none}
|
||||
+ end.
|
||||
+
|
||||
+get_subscription_lists({F, T}, User, Server) ->
|
||||
+ LUser = jlib:nodeprep(User),
|
||||
+ LServer = jlib:nameprep(Server),
|
||||
+ US = {LUser, LServer},
|
||||
+ DisplayedGroups = get_user_displayed_groups(US),
|
||||
+ SRUsers =
|
||||
+ lists:usort(
|
||||
+ lists:flatmap(
|
||||
+ fun(Group) ->
|
||||
+ get_group_users(LServer, Group)
|
||||
+ end, DisplayedGroups)),
|
||||
+ SRJIDs = [{U1, S1, ""} || {U1, S1} <- SRUsers],
|
||||
+ {lists:usort(SRJIDs ++ F), lists:usort(SRJIDs ++ T)}.
|
||||
+
|
||||
+get_jid_info({Subscription, Groups}, User, Server, JID) ->
|
||||
+ LUser = jlib:nodeprep(User),
|
||||
+ LServer = jlib:nameprep(Server),
|
||||
+ US = {LUser, LServer},
|
||||
+ {U1, S1, _} = jlib:jid_tolower(JID),
|
||||
+ US1 = {U1, S1},
|
||||
+ DisplayedGroups = get_user_displayed_groups(US),
|
||||
+ SRUsers =
|
||||
+ lists:foldl(
|
||||
+ fun(Group, Acc1) ->
|
||||
+ lists:foldl(
|
||||
+ fun(User1, Acc2) ->
|
||||
+ dict:append(
|
||||
+ User1, get_group_name(LServer, Group), Acc2)
|
||||
+ end, Acc1, get_group_users(LServer, Group))
|
||||
+ end, dict:new(), DisplayedGroups),
|
||||
+ case dict:find(US1, SRUsers) of
|
||||
+ {ok, GroupNames} ->
|
||||
+ NewGroups = if
|
||||
+ Groups == [] -> GroupNames;
|
||||
+ true -> Groups
|
||||
+ end,
|
||||
+ {both, NewGroups};
|
||||
+ error ->
|
||||
+ {Subscription, Groups}
|
||||
+ end.
|
||||
+
|
||||
+in_subscription(Acc, User, Server, JID, Type, _Reason) ->
|
||||
+ process_subscription(in, User, Server, JID, Type, Acc).
|
||||
+
|
||||
+out_subscription(User, Server, JID, Type) ->
|
||||
+ process_subscription(out, User, Server, JID, Type, false).
|
||||
+
|
||||
+process_subscription(Direction, User, Server, JID, _Type, Acc) ->
|
||||
+ LUser = jlib:nodeprep(User),
|
||||
+ LServer = jlib:nameprep(Server),
|
||||
+ US = {LUser, LServer},
|
||||
+ {U1, S1, _} = jlib:jid_tolower(jlib:jid_remove_resource(JID)),
|
||||
+ US1 = {U1, S1},
|
||||
+ DisplayedGroups = get_user_displayed_groups(US),
|
||||
+ SRUsers =
|
||||
+ lists:usort(
|
||||
+ lists:flatmap(
|
||||
+ fun(Group) ->
|
||||
+ get_group_users(LServer, Group)
|
||||
+ end, DisplayedGroups)),
|
||||
+ case lists:member(US1, SRUsers) of
|
||||
+ true ->
|
||||
+ case Direction of
|
||||
+ in ->
|
||||
+ {stop, false};
|
||||
+ out ->
|
||||
+ stop
|
||||
+ end;
|
||||
+ false ->
|
||||
+ Acc
|
||||
+ end.
|
||||
+
|
||||
+get_group_users(Host, Group) ->
|
||||
+ make_request(Host, {get_group_users, Group}, []).
|
||||
+
|
||||
+get_group_name(Host, Group) ->
|
||||
+ make_request(Host, {get_group_name, Group}, Group).
|
||||
+
|
||||
+get_user_displayed_groups({User, Host}) ->
|
||||
+ make_request(Host, {get_user_displayed_groups, User}, []).
|
||||
+
|
||||
+is_user_in_group({User, _Server}, Group, Host) ->
|
||||
+ make_request(Host, {is_user_in_group, User, Group}, false).
|
||||
+
|
||||
+get_user_name(User, Host) ->
|
||||
+ make_request(Host, {get_user_name, User},[]).
|
||||
+
|
||||
+
|
||||
+%%%-----------------------
|
||||
+%%% Internal functions.
|
||||
+%%%-----------------------
|
||||
+handle_call({get_user_displayed_groups, User}, _From, State) ->
|
||||
+ GroupAttr = State#state.group_attr,
|
||||
+ Reply = case eldap_filter:parse(State#state.rfilter) of
|
||||
+ {ok, EldapFilter} ->
|
||||
+ case eldap:search(State#state.eldap_id, [
|
||||
+ {base, State#state.base},
|
||||
+ {filter, EldapFilter},
|
||||
+ {attributes, [GroupAttr]}]) of
|
||||
+ #eldap_search_result{entries = Es} ->
|
||||
+ lists:usort(lists:flatmap(
|
||||
+ fun(#eldap_entry{attributes = Attrs}) ->
|
||||
+ case Attrs of
|
||||
+ [{GroupAttr, ValuesList}] ->
|
||||
+ ValuesList;
|
||||
+ _ ->
|
||||
+ []
|
||||
+ end
|
||||
+ end, Es));
|
||||
+ _ ->
|
||||
+ []
|
||||
+ end;
|
||||
+ _ ->
|
||||
+ []
|
||||
+ end,
|
||||
+ {reply, Reply, State};
|
||||
+
|
||||
+handle_call({get_group_name, Group}, _From, State) ->
|
||||
+ GroupDescAttr = State#state.group_desc,
|
||||
+ Reply = case eldap_filter:parse(State#state.gfilter, [{"%g", Group}]) of
|
||||
+ {ok, EldapFilter} ->
|
||||
+ case eldap:search(State#state.eldap_id, [
|
||||
+ {base, State#state.base},
|
||||
+ {filter, EldapFilter},
|
||||
+ {attributes, [GroupDescAttr]}]) of
|
||||
+ #eldap_search_result{entries = [
|
||||
+ #eldap_entry{attributes =
|
||||
+ [{GroupDescAttr, GroupName} | _]}
|
||||
+ ]} ->
|
||||
+ GroupName;
|
||||
+ _ ->
|
||||
+ Group
|
||||
+ end;
|
||||
+ _ ->
|
||||
+ Group
|
||||
+ end,
|
||||
+ {reply, Reply, State};
|
||||
+
|
||||
+handle_call({get_user_name, User}, _From, State) ->
|
||||
+UserDescAttr = State#state.user_desc,
|
||||
+Reply = case eldap_filter:parse(State#state.ufilter, [{"%u", User}]) of
|
||||
+ {ok, EldapFilter} ->
|
||||
+ case eldap:search(State#state.eldap_id, [
|
||||
+ {base, State#state.base},
|
||||
+ {filter, EldapFilter},
|
||||
+ {attributes, [UserDescAttr]}]) of
|
||||
+ #eldap_search_result{entries = [
|
||||
+ #eldap_entry{attributes =
|
||||
+ [{UserDescAttr, UserName} | _]}
|
||||
+ ]} ->
|
||||
+ UserName;
|
||||
+ _ ->
|
||||
+ User
|
||||
+ end;
|
||||
+ _ ->
|
||||
+ User
|
||||
+ end,
|
||||
+ {reply, Reply, State};
|
||||
+
|
||||
+
|
||||
+handle_call({get_group_users, Group}, _From, State) ->
|
||||
+ UIDAttr = State#state.uid,
|
||||
+ UAF = State#state.uid_format,
|
||||
+ Host = State#state.host,
|
||||
+ Reply = case eldap_filter:parse(State#state.gfilter, [{"%g", Group}]) of
|
||||
+ {ok, EldapFilter} ->
|
||||
+ case eldap:search(State#state.eldap_id, [
|
||||
+ {base, State#state.base},
|
||||
+ {filter, EldapFilter},
|
||||
+ {attributes, [UIDAttr]}]) of
|
||||
+ #eldap_search_result{entries = Es} ->
|
||||
+ lists:usort(lists:flatmap(
|
||||
+ fun(#eldap_entry{attributes = Attrs}) ->
|
||||
+ case Attrs of
|
||||
+ [{UIDAttr, UsersList}] ->
|
||||
+ lists:foldl(fun(User, Acc) ->
|
||||
+ case catch get_user_part(User, UAF) of
|
||||
+ {ok, U} ->
|
||||
+ case ejabberd_auth:is_user_exists(U, Host) of
|
||||
+ true -> [{U, Host} | Acc];
|
||||
+ _ -> Acc
|
||||
+ end;
|
||||
+ _ -> Acc
|
||||
+ end
|
||||
+ end, [], UsersList);
|
||||
+ _ ->
|
||||
+ []
|
||||
+ end
|
||||
+ end, Es));
|
||||
+ _ ->
|
||||
+ []
|
||||
+ end;
|
||||
+ _ ->
|
||||
+ []
|
||||
+ end,
|
||||
+ {reply, Reply, State};
|
||||
+
|
||||
+handle_call({is_user_in_group, User, Group}, _From, State) ->
|
||||
+ Reply = case eldap_filter:parse(State#state.filter,
|
||||
+ [{"%u", User}, {"%g", Group}]) of
|
||||
+ {ok, EldapFilter} ->
|
||||
+ case eldap:search(State#state.eldap_id, [
|
||||
+ {base, State#state.base},
|
||||
+ {filter, EldapFilter},
|
||||
+ {attributes, ["dn"]}]) of
|
||||
+ #eldap_search_result{entries = [_|_]} ->
|
||||
+ true;
|
||||
+ _ ->
|
||||
+ false
|
||||
+ end;
|
||||
+ _ ->
|
||||
+ false
|
||||
+ end,
|
||||
+ {reply, Reply, State};
|
||||
+
|
||||
+handle_call(stop, _From, State) ->
|
||||
+ {stop, normal, ok, State};
|
||||
+
|
||||
+handle_call(_Request, _From, State) ->
|
||||
+ {reply, bad_request, State}.
|
||||
+
|
||||
+%%%-----------------------
|
||||
+%%% Auxiliary functions.
|
||||
+%%%-----------------------
|
||||
+parse_options(Host, Opts) ->
|
||||
+ Eldap_ID = atom_to_list(gen_mod:get_module_proc(Host, ?MODULE)),
|
||||
+ LDAPServers = case gen_mod:get_opt(ldap_servers, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ ejabberd_config:get_local_option({ldap_servers, Host});
|
||||
+ S -> S
|
||||
+ end,
|
||||
+ LDAPPort = case gen_mod:get_opt(ldap_port, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ case ejabberd_config:get_local_option({ldap_port, Host}) of
|
||||
+ undefined -> 389;
|
||||
+ P -> P
|
||||
+ end;
|
||||
+ P -> P
|
||||
+ end,
|
||||
+ LDAPBase = case gen_mod:get_opt(ldap_base, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ ejabberd_config:get_local_option({ldap_base, Host});
|
||||
+ B -> B
|
||||
+ end,
|
||||
+ GroupAttr = case gen_mod:get_opt(ldap_groupattr, Opts, undefined) of
|
||||
+ undefined -> "cn";
|
||||
+ GA -> GA
|
||||
+ end,
|
||||
+ GroupDesc = case gen_mod:get_opt(ldap_groupdesc, Opts, undefined) of
|
||||
+ undefined -> "cn";
|
||||
+ GD -> GD
|
||||
+ end,
|
||||
+ UserDesc = case gen_mod:get_opt(ldap_userdesc, Opts, undefined) of
|
||||
+ undefined -> "cn";
|
||||
+ UD -> UD
|
||||
+ end,
|
||||
+ UIDAttr = case gen_mod:get_opt(ldap_memberattr, Opts, undefined) of
|
||||
+ undefined -> "memberUid";
|
||||
+ UA -> UA
|
||||
+ end,
|
||||
+ UIDAttrFormat = case gen_mod:get_opt(ldap_memberattr_format, Opts, undefined) of
|
||||
+ undefined -> "%u";
|
||||
+ UAF -> UAF
|
||||
+ end,
|
||||
+ RootDN = case gen_mod:get_opt(ldap_rootdn, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ case ejabberd_config:get_local_option({ldap_rootdn, Host}) of
|
||||
+ undefined -> "";
|
||||
+ RDN -> RDN
|
||||
+ end;
|
||||
+ RDN -> RDN
|
||||
+ end,
|
||||
+ Password = case gen_mod:get_opt(ldap_password, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ case ejabberd_config:get_local_option({ldap_password, Host}) of
|
||||
+ undefined -> "";
|
||||
+ Pass -> Pass
|
||||
+ end;
|
||||
+ Pass -> Pass
|
||||
+ end,
|
||||
+ ConfigFilter = case gen_mod:get_opt(ldap_filter, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ ejabberd_config:get_local_option({ldap_filter, Host});
|
||||
+ F ->
|
||||
+ F
|
||||
+ end,
|
||||
+
|
||||
+ RosterFilter = case gen_mod:get_opt(ldap_rfilter, Opts, undefined) of
|
||||
+ undefined ->
|
||||
+ ejabberd_config:get_local_option({ldap_rfilter, Host});
|
||||
+ RF ->
|
||||
+ RF
|
||||
+ end,
|
||||
+
|
||||
+ SubFilter = "(&("++UIDAttr++"="++UIDAttrFormat++")("++GroupAttr++"=%g))",
|
||||
+ UserSubFilter = eldap_filter:do_sub(SubFilter, [{"%g", "*"}]),
|
||||
+ GroupSubFilter = eldap_filter:do_sub(SubFilter, [{"%u", "*"}]),
|
||||
+ Filter = case ConfigFilter of
|
||||
+ undefined -> SubFilter;
|
||||
+ "" -> SubFilter;
|
||||
+ _ -> "(&" ++ SubFilter ++ ConfigFilter ++ ")"
|
||||
+ end,
|
||||
+ UserFilter = case ConfigFilter of
|
||||
+ undefined -> UserSubFilter;
|
||||
+ "" -> UserSubFilter;
|
||||
+ _ -> "(&" ++ UserSubFilter ++ ConfigFilter ++ ")"
|
||||
+ end,
|
||||
+ GroupFilter = case ConfigFilter of
|
||||
+ undefined -> GroupSubFilter;
|
||||
+ "" -> GroupSubFilter;
|
||||
+ _ -> "(&" ++ GroupSubFilter ++ ConfigFilter ++ ")"
|
||||
+ end,
|
||||
+ #state{
|
||||
+ host = Host,
|
||||
+ eldap_id = Eldap_ID,
|
||||
+ servers = LDAPServers,
|
||||
+ port = LDAPPort,
|
||||
+ dn = RootDN,
|
||||
+ base = LDAPBase,
|
||||
+ password = Password,
|
||||
+ uid = UIDAttr,
|
||||
+ group_attr = GroupAttr,
|
||||
+ group_desc = GroupDesc,
|
||||
+ user_desc = UserDesc,
|
||||
+ uid_format = UIDAttrFormat,
|
||||
+ filter = Filter,
|
||||
+ ufilter = UserFilter,
|
||||
+ rfilter = RosterFilter,
|
||||
+ gfilter = GroupFilter
|
||||
+ }.
|
||||
+
|
||||
+get_user_part(String, Pattern) ->
|
||||
+ F = fun(S, P) ->
|
||||
+ First = string:str(P, "%u"),
|
||||
+ TailLength = length(P) - (First+1),
|
||||
+ string:sub_string(S, First, length(S) - TailLength)
|
||||
+ end,
|
||||
+ case catch F(String, Pattern) of
|
||||
+ {'EXIT', _} ->
|
||||
+ {error, badmatch};
|
||||
+ Result ->
|
||||
+ case regexp:sub(Pattern, "%u", Result) of
|
||||
+ {ok, String, _} -> {ok, Result};
|
||||
+ _ -> {error, badmatch}
|
||||
+ end
|
||||
+ end.
|
||||
+
|
||||
+make_request(Host, Request, Fallback) ->
|
||||
+ Proc = gen_mod:get_module_proc(Host, ?MODULE),
|
||||
+ case catch gen_server:call(Proc, Request, ?LDAP_REQUEST_TIMEOUT) of
|
||||
+ {'EXIT', _} ->
|
||||
+ Fallback;
|
||||
+ Result ->
|
||||
+ Result
|
||||
+ end.
|
||||
+
|
@ -0,0 +1,41 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# self-cert.sh for ejabberd, stolen from:
|
||||
# mkimapdcert,v 1.1 2001/01/02 03:54:25 drobbins Exp
|
||||
#
|
||||
# Copyright 2000 Double Precision, Inc. See COPYING for
|
||||
# distribution information.
|
||||
#
|
||||
# This is a short script to quickly generate a self-signed X.509 key for
|
||||
# eJabberd. Normally this script would get called by an automatic
|
||||
# package installation routine.
|
||||
|
||||
test -x /usr/bin/openssl || exit 0
|
||||
|
||||
prefix="/usr"
|
||||
pemfile="/etc/jabber/ssl.pem"
|
||||
randfile="/etc/jabber/ssl.rand"
|
||||
|
||||
if test -f $pemfile
|
||||
then
|
||||
echo "$pemfile already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp /dev/null $pemfile
|
||||
chmod 640 $pemfile
|
||||
chown root:jabber $pemfile
|
||||
|
||||
cleanup() {
|
||||
rm -f $pemfile
|
||||
rm -f $randfile
|
||||
exit 1
|
||||
}
|
||||
|
||||
dd if=/dev/urandom of=$randfile count=1 2>/dev/null
|
||||
/usr/bin/openssl req -new -x509 -days 365 -nodes \
|
||||
-config /etc/jabber/ssl.cnf -out $pemfile -keyout $pemfile || cleanup
|
||||
/usr/bin/openssl gendh -rand $randfile 512 >> $pemfile || cleanup
|
||||
/usr/bin/openssl x509 -subject -dates -fingerprint -noout -in $pemfile || cleanup
|
||||
rm -f $randfile
|
||||
|
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
######
|
||||
#
|
||||
# Generate a certificate and key with no passphrase.
|
||||
#
|
||||
######
|
||||
|
||||
OPENSSL=/usr/bin/openssl
|
||||
|
||||
## This generates the cert and key
|
||||
$OPENSSL req -new -x509 -newkey rsa:1024 -keyout /tmp/privkey.pem -out /etc/ejabberd/ssl.pem
|
||||
## This will remove the passphrase
|
||||
$OPENSSL rsa -in /tmp/privkey.pem -out /tmp/privkey.pem
|
||||
## Put it all together
|
||||
cat /tmp/privkey.pem >> /etc/ejabberd/ssl.pem
|
||||
## Cleanup
|
||||
rm /tmp/privkey.pem
|
||||
echo ""
|
||||
echo "Your new key is /etc/ejabberd/ssl.pem"
|
||||
echo ""
|
@ -0,0 +1,36 @@
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ssl.cnf,v 1.1 2006/10/12 16:26:07 chainsaw Exp $
|
||||
# This is the openssl config file to generate keys for ejabberd
|
||||
# It is read by self-cert.sh
|
||||
|
||||
[ req ]
|
||||
# you can increase this value, but be aware that it will make things much slower
|
||||
# this should be a power of 2!
|
||||
default_bits = 1024
|
||||
# leave the rest of these alone!
|
||||
encrypt_key = yes
|
||||
distinguished_name = req_dn
|
||||
x509_extensions = cert_type
|
||||
prompt = no
|
||||
|
||||
[ req_dn ]
|
||||
# 2-Letter ISO country code
|
||||
C=UK
|
||||
# FULL name of state/province/district
|
||||
# NO abbreviations!
|
||||
ST=Cambridgeshire
|
||||
# FULL name of city
|
||||
# NO abbreviations!
|
||||
L=Peterborough
|
||||
# Full Name of your organization
|
||||
# NO abbreviations!
|
||||
O=Bits and Bobs Ltd.
|
||||
# Leave this alone unless specifically need to change it!
|
||||
OU=Automatically-generated ejabberd SSL key
|
||||
# This should be a FQDN that resolves to the IP of your server
|
||||
CN=localhost
|
||||
# This should be the email address for the administrator of the server
|
||||
emailAddress=root@localhost
|
||||
|
||||
# Leave this alone!
|
||||
[ cert_type ]
|
||||
nsCertType = server
|
@ -0,0 +1,27 @@
|
||||
AUX calckernel-3.4.10.903-r2.patch 3217 RMD160 2af53fea69a8c4bb7295326c8dcca874186163eb SHA1 6988125ac5ec2788aeb24b39b9648edec2fcc09d SHA256 787528254f20544155f00fd36626d11eee681350a4217edfac22e6e21d68eee1
|
||||
AUX calckernel-3.4.10.903-r5.patch 4900 RMD160 c06016481281a2a056f31cd1c2796ed783627997 SHA1 96bc1c4466598c33117b2a018a66631f9e5132a8 SHA256 c5ad1a6f4bc16ed3971bed3179a629445bb88cd2267facb261502454b3ab2d94
|
||||
AUX calckernel-3.4.10.903-r6.patch 4906 RMD160 166a07f41f72363750f94249c0d14a0e64ede600 SHA1 858b563247c9485453be53bc60296397df675521 SHA256 4fd297e02b19b1accd18bdf19f06eb4fdfc52e2f75c67ad0bb1734f7e3b57f42
|
||||
AUX calckernel-3.4.10.903-r7.patch 7153 RMD160 6cea18fe9c3d0c3b820022b19e9cbd200a0d08dd SHA1 cb63c185c246ab52b22f4b3f267f985a2fa4ed1a SHA256 f713fc3dde936f9ac1d4b020166a0ae61dbbe3a16baaab2a946587c23fe1d8f0
|
||||
AUX calckernel-3.4.10.903-r9.patch 7859 RMD160 fd59dd6a6cf80476a95f970cb3b73806d1fb4450 SHA1 8b3461e50e27f01531fd8fd99ec53282ba8efb6b SHA256 5713894e8758cfa78b83053480b530a5841cc96a80194118a8f717cd9ab86070
|
||||
AUX calckernel-3.4.10.903.patch 1920 RMD160 9c52f4b43e3aec644308bf4e21df90dd64796aed SHA1 ac0ad37424cf13ee886645bb7df4c77d1bb765b3 SHA256 35799327095fa44febb7fcbdbec5e061d6b670e4aba7d901a24909df220f88ec
|
||||
AUX calckernel-3.4.9.patch 4652 RMD160 6f8253b8422a1b8c3eef45a0119fabf710018d0b SHA1 a25aa7f0e146cf07bfa2426007c84785ea1f6d20 SHA256 669104f1d2ac7819222c2543688a69474a2add9b1bc4162ba4f420bd31779273
|
||||
AUX genkernel.bash 2438 RMD160 b3d8e4436d8768c07d18c5aaff9c14fc16641729 SHA1 e15a9c6ef506aa6872a6a97d26751246dedded04 SHA256 e7de9771ba79ef878e2c9a21a1c1720f092c6047d3cc7d4a49ff6b90e7e2c248
|
||||
DIST LVM2.2.02.28.tgz 531905 RMD160 bf6f25db6e34bf362353ae9557691a7f01962502 SHA1 6eb2f6e1228b017ad23d0b7f2bb12fd113f96616 SHA256 2d8d7b123e427d0bfb7471d7c17dfd88890eb98257ca22ea3be5d7307e83aceb
|
||||
DIST busybox-1.7.4.tar.bz2 1727940 RMD160 a4b71a246449f88a59acda6ecf019f66b9b7c19b SHA1 e5dcaa25525ca63663c3d4e7027897fed54a4f95 SHA256 8480a7c1b9ac0fddff55e8daae807ccf0a47aa292137fa8c9f97cf0733b459c7
|
||||
DIST device-mapper.1.02.22.tgz 189726 RMD160 8bf9986536c49f53c398d6a2180e21e1235bea18 SHA1 a4533872c32951a1b549bb9207a13b7e4dae0701 SHA256 ff833a6cd6246686f5b3f5692fd6597f1ffbc60f08929e5fe68304cdafb61595
|
||||
DIST dmraid-1.0.0.rc14.tar.bz2 164234 RMD160 9cd238a981cfef9c5c1f2f1d6466b70c95ec9c7c SHA1 2b3284db46a995967d88993ae5ae36b57c513bc4 SHA256 a777354d6d69a9b58d84966cc7b37bc3f5c89539f885ad25fd874ed1c388fbec
|
||||
DIST e2fsprogs-1.39.tar.gz 3695111 RMD160 67e77a7cbf0e719fa8b5a8ac6285b334e1c3481b SHA1 c2dad0c9bd76701eafe3804e2a7d072aa198f046 SHA256 dc2033447e69a1612881151f6f163e8a3b80e51d16f5e8b3576f3f8ccb325ea3
|
||||
DIST e2fsprogs-1.40.9.tar.gz 4092812 RMD160 1cc51cb1b4bdcb338a2fdff50c79f38fb6e09eef SHA1 c584e9a8d3c444f42f4c0a786bb94f4a00ea2b48 SHA256 ab6852230dcb30d75f640125a5d0c7b496bbc31502afdb76528e3bcd4089c9e4
|
||||
DIST fuse-2.7.4.tar.gz 506658 RMD160 fe1808cfd58ad6651259245b424301e99881faa2 SHA1 7a86f5cf39f38e64ccbae093599d64a895b950ba SHA256 c8b070ece5d4e09bd06eea6c28818c718f803d93a4b85bacb9982deb8ded49e6
|
||||
DIST genkernel-3.4.10.903.tar.bz2 210258 RMD160 1042cb154be145a95c5d8f95f5b646e948f18bd8 SHA1 67ebe450d40718f701da0bddf5ca48d497ab2241 SHA256 9348d915137b9e266163d706045aee4ec6af76cba5f0f07f5fe05e2e7eb0954f
|
||||
DIST genkernel-3.4.9.tar.bz2 181731 RMD160 f26551a6013028fee23d7a1e6e2429fc7fa76d58 SHA1 ca6c482bb44133a04430fd0b5777294d5dd7cb8f SHA256 b3a09bb0135f052c13c0b3dac56d825b1f9c4068fbb9f81b2283f83301f559c7
|
||||
DIST genkernel-pkg-3.4-r3.tar.bz2 1915282 RMD160 8424628e94c51d500f7b28532901ad0c5e53ee38 SHA1 a4fec14ca086098fbe3d62810bf7892f7c0da326 SHA256 0681579b34705de7fc7ec7a08154cea9dc21142b612f4b7d904a4b588e3de684
|
||||
DIST unionfs-1.5pre-cvs200701042308.tar.gz 163418 RMD160 6d54be6db26a562dd943df2de9cf0e0138c45c6f SHA1 9559a0ae8e0552a9c3644c85a99c1be601c837fc SHA256 d1925eee22517df72828a7c75890c20a54335e135f6ed04ea43f8771c9b1c271
|
||||
DIST unionfs-fuse-0.22.tar.bz2 27355 RMD160 f29cbf41af0ba8f2181ac565a6663871676f6488 SHA1 e95799923ee3938e1fb44c6fd9aa7154d720063e SHA256 fa0c494a8ce63f235601fcc35e3a96527831169d6d5921ee49faccf3b25feb78
|
||||
EBUILD calckernel-3.4.10.903-r1.ebuild 4721 RMD160 0ad6351496f60f77f5cdb47f91e8887ad2b67111 SHA1 a7f6d9be941333647a4dbc578316792fdd942fc5 SHA256 2f5327f3b368a25cda0dcce60f287c38cd6a2a74e03b6e3280fdd846c1aaeaf8
|
||||
EBUILD calckernel-3.4.10.903-r2.ebuild 4722 RMD160 86a8fd0be899be5fe4db799269f0eae5063a30ac SHA1 2d52f4ff1805734cb0ffe572786015a9c0fe0311 SHA256 7ebc44592700cbfc4759508ddc147fe9cafe7c54116b731bfa42dfc7baa19206
|
||||
EBUILD calckernel-3.4.10.903-r5.ebuild 4722 RMD160 86a8fd0be899be5fe4db799269f0eae5063a30ac SHA1 2d52f4ff1805734cb0ffe572786015a9c0fe0311 SHA256 7ebc44592700cbfc4759508ddc147fe9cafe7c54116b731bfa42dfc7baa19206
|
||||
EBUILD calckernel-3.4.10.903-r6.ebuild 4722 RMD160 86a8fd0be899be5fe4db799269f0eae5063a30ac SHA1 2d52f4ff1805734cb0ffe572786015a9c0fe0311 SHA256 7ebc44592700cbfc4759508ddc147fe9cafe7c54116b731bfa42dfc7baa19206
|
||||
EBUILD calckernel-3.4.10.903-r7.ebuild 4722 RMD160 86a8fd0be899be5fe4db799269f0eae5063a30ac SHA1 2d52f4ff1805734cb0ffe572786015a9c0fe0311 SHA256 7ebc44592700cbfc4759508ddc147fe9cafe7c54116b731bfa42dfc7baa19206
|
||||
EBUILD calckernel-3.4.10.903-r9.ebuild 4722 RMD160 e4a76faac584cb8cfcb11ca0a2cbe1a1f18b89a1 SHA1 13af3abc15afdaa44e769beba2747574f8257e64 SHA256 9cfd0a1a10685992c72b29dca87d9610a4197c7faf10ef3b66b854fa5cea0e23
|
||||
EBUILD calckernel-3.4.9.ebuild 3905 RMD160 86bc088b4a639478f63a6fdab2178da244b2050c SHA1 516ae1c03ad80a2d3b99b29cb602012e7fb71191 SHA256 92aaa6af4097d46db892e3443fa505b7764b7252207c3a5b6319b494e0eed5cc
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.903.ebuild,v 1.1 2009/01/05 22:31:16 agaffney Exp $
|
||||
|
||||
# genkernel-9999 -> latest SVN
|
||||
# genkernel-9999.REV -> use SVN REV
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
VERSION_BUSYBOX='1.7.4'
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.40.9'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_FUSE='2.7.4'
|
||||
VERSION_UNIONFS_FUSE='0.22'
|
||||
|
||||
MY_P=gen${P/#calc}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MY_HOME="http://wolf31o2.org"
|
||||
RH_HOME="ftp://sources.redhat.com/pub"
|
||||
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="http://www.busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
|
||||
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
|
||||
inherit git bash-completion eutils
|
||||
S="${WORKDIR}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion eutils
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
${MY_HOME}/sources/genkernel/${MY_P}.tar.bz2
|
||||
${COMMON_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
#KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
|
||||
#KEYWORDS=""
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${MY_P}.tar.bz2
|
||||
fi
|
||||
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
|
||||
epatch "${FILESDIR}"/${P}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This block updates genkernel.conf
|
||||
sed -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|
||||
|| die "Could not adjust versions"
|
||||
insinto /etc
|
||||
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
|
||||
|
||||
doman genkernel.8 || die "doman"
|
||||
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
|
||||
|
||||
dobin genkernel || die "dobin genkernel"
|
||||
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/* || die "doins"
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
|
||||
|
||||
# Copy files to /var/cache/genkernel/src
|
||||
elog "Copying files to /var/cache/genkernel/src..."
|
||||
mkdir -p "${D}"/var/cache/genkernel/src
|
||||
cp -f \
|
||||
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
|
||||
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
|
||||
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
|
||||
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.903.ebuild,v 1.1 2009/01/05 22:31:16 agaffney Exp $
|
||||
|
||||
# genkernel-9999 -> latest SVN
|
||||
# genkernel-9999.REV -> use SVN REV
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
VERSION_BUSYBOX='1.7.4'
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.40.9'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_FUSE='2.7.4'
|
||||
VERSION_UNIONFS_FUSE='0.22'
|
||||
|
||||
MY_P=gen${P/#calc}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MY_HOME="http://wolf31o2.org"
|
||||
RH_HOME="ftp://sources.redhat.com/pub"
|
||||
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="http://www.busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
|
||||
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
|
||||
inherit git bash-completion eutils
|
||||
S="${WORKDIR}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion eutils
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
${MY_HOME}/sources/genkernel/${MY_P}.tar.bz2
|
||||
${COMMON_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
#KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
|
||||
#KEYWORDS=""
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${MY_P}.tar.bz2
|
||||
fi
|
||||
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
|
||||
epatch "${FILESDIR}"/${PF}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This block updates genkernel.conf
|
||||
sed -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|
||||
|| die "Could not adjust versions"
|
||||
insinto /etc
|
||||
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
|
||||
|
||||
doman genkernel.8 || die "doman"
|
||||
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
|
||||
|
||||
dobin genkernel || die "dobin genkernel"
|
||||
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/* || die "doins"
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
|
||||
|
||||
# Copy files to /var/cache/genkernel/src
|
||||
elog "Copying files to /var/cache/genkernel/src..."
|
||||
mkdir -p "${D}"/var/cache/genkernel/src
|
||||
cp -f \
|
||||
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
|
||||
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
|
||||
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
|
||||
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.903.ebuild,v 1.1 2009/01/05 22:31:16 agaffney Exp $
|
||||
|
||||
# genkernel-9999 -> latest SVN
|
||||
# genkernel-9999.REV -> use SVN REV
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
VERSION_BUSYBOX='1.7.4'
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.40.9'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_FUSE='2.7.4'
|
||||
VERSION_UNIONFS_FUSE='0.22'
|
||||
|
||||
MY_P=gen${P/#calc}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MY_HOME="http://wolf31o2.org"
|
||||
RH_HOME="ftp://sources.redhat.com/pub"
|
||||
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="http://www.busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
|
||||
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
|
||||
inherit git bash-completion eutils
|
||||
S="${WORKDIR}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion eutils
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
${MY_HOME}/sources/genkernel/${MY_P}.tar.bz2
|
||||
${COMMON_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
#KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
|
||||
#KEYWORDS=""
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${MY_P}.tar.bz2
|
||||
fi
|
||||
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
|
||||
epatch "${FILESDIR}"/${PF}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This block updates genkernel.conf
|
||||
sed -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|
||||
|| die "Could not adjust versions"
|
||||
insinto /etc
|
||||
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
|
||||
|
||||
doman genkernel.8 || die "doman"
|
||||
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
|
||||
|
||||
dobin genkernel || die "dobin genkernel"
|
||||
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/* || die "doins"
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
|
||||
|
||||
# Copy files to /var/cache/genkernel/src
|
||||
elog "Copying files to /var/cache/genkernel/src..."
|
||||
mkdir -p "${D}"/var/cache/genkernel/src
|
||||
cp -f \
|
||||
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
|
||||
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
|
||||
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
|
||||
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.903.ebuild,v 1.1 2009/01/05 22:31:16 agaffney Exp $
|
||||
|
||||
# genkernel-9999 -> latest SVN
|
||||
# genkernel-9999.REV -> use SVN REV
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
VERSION_BUSYBOX='1.7.4'
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.40.9'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_FUSE='2.7.4'
|
||||
VERSION_UNIONFS_FUSE='0.22'
|
||||
|
||||
MY_P=gen${P/#calc}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MY_HOME="http://wolf31o2.org"
|
||||
RH_HOME="ftp://sources.redhat.com/pub"
|
||||
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="http://www.busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
|
||||
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
|
||||
inherit git bash-completion eutils
|
||||
S="${WORKDIR}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion eutils
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
${MY_HOME}/sources/genkernel/${MY_P}.tar.bz2
|
||||
${COMMON_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
#KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
|
||||
#KEYWORDS=""
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${MY_P}.tar.bz2
|
||||
fi
|
||||
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
|
||||
epatch "${FILESDIR}"/${PF}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This block updates genkernel.conf
|
||||
sed -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|
||||
|| die "Could not adjust versions"
|
||||
insinto /etc
|
||||
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
|
||||
|
||||
doman genkernel.8 || die "doman"
|
||||
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
|
||||
|
||||
dobin genkernel || die "dobin genkernel"
|
||||
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/* || die "doins"
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
|
||||
|
||||
# Copy files to /var/cache/genkernel/src
|
||||
elog "Copying files to /var/cache/genkernel/src..."
|
||||
mkdir -p "${D}"/var/cache/genkernel/src
|
||||
cp -f \
|
||||
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
|
||||
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
|
||||
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
|
||||
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.903.ebuild,v 1.1 2009/01/05 22:31:16 agaffney Exp $
|
||||
|
||||
# genkernel-9999 -> latest SVN
|
||||
# genkernel-9999.REV -> use SVN REV
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
VERSION_BUSYBOX='1.7.4'
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.40.9'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_FUSE='2.7.4'
|
||||
VERSION_UNIONFS_FUSE='0.22'
|
||||
|
||||
MY_P=gen${P/#calc}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MY_HOME="http://wolf31o2.org"
|
||||
RH_HOME="ftp://sources.redhat.com/pub"
|
||||
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="http://www.busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
|
||||
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
|
||||
inherit git bash-completion eutils
|
||||
S="${WORKDIR}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion eutils
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
${MY_HOME}/sources/genkernel/${MY_P}.tar.bz2
|
||||
${COMMON_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
#KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
|
||||
#KEYWORDS=""
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${MY_P}.tar.bz2
|
||||
fi
|
||||
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
|
||||
epatch "${FILESDIR}"/${PF}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This block updates genkernel.conf
|
||||
sed -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|
||||
|| die "Could not adjust versions"
|
||||
insinto /etc
|
||||
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
|
||||
|
||||
doman genkernel.8 || die "doman"
|
||||
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
|
||||
|
||||
dobin genkernel || die "dobin genkernel"
|
||||
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/* || die "doins"
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
|
||||
|
||||
# Copy files to /var/cache/genkernel/src
|
||||
elog "Copying files to /var/cache/genkernel/src..."
|
||||
mkdir -p "${D}"/var/cache/genkernel/src
|
||||
cp -f \
|
||||
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
|
||||
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
|
||||
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
|
||||
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.10.903.ebuild,v 1.1 2009/01/05 22:31:16 agaffney Exp $
|
||||
|
||||
# genkernel-9999 -> latest SVN
|
||||
# genkernel-9999.REV -> use SVN REV
|
||||
# genkernel-VERSION -> normal genkernel release
|
||||
|
||||
VERSION_BUSYBOX='1.7.4'
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.40.9'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_FUSE='2.7.4'
|
||||
VERSION_UNIONFS_FUSE='0.22'
|
||||
|
||||
MY_P=gen${P/#calc}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
MY_HOME="http://wolf31o2.org"
|
||||
RH_HOME="ftp://sources.redhat.com/pub"
|
||||
DM_HOME="http://people.redhat.com/~heinzm/sw/dmraid/src"
|
||||
BB_HOME="http://www.busybox.net/downloads"
|
||||
|
||||
COMMON_URI="${DM_HOME}/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${DM_HOME}/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
${RH_HOME}/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
${RH_HOME}/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
${RH_HOME}/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
${BB_HOME}/busybox-${VERSION_BUSYBOX}.tar.bz2
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz
|
||||
mirror://sourceforge/fuse/fuse-${VERSION_FUSE}.tar.gz
|
||||
http://podgorny.cz/unionfs-fuse/releases/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2"
|
||||
|
||||
if [[ ${PV} == 9999* ]]
|
||||
then
|
||||
[[ ${PV} == 9999.* ]] && ESVN_UPDATE_CMD="svn up -r ${PV/9999./}"
|
||||
EGIT_REPO_URI="git://git.wolf31o2.org/projs/genkernel.git"
|
||||
inherit git bash-completion eutils
|
||||
S="${WORKDIR}"
|
||||
SRC_URI="${COMMON_URI}"
|
||||
else
|
||||
inherit bash-completion eutils
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
${MY_HOME}/sources/genkernel/${MY_P}.tar.bz2
|
||||
${COMMON_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Gentoo automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.gentoo.org"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sparc x86"
|
||||
#KEYWORDS=""
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == 9999* ]] ; then
|
||||
git_src_unpack
|
||||
else
|
||||
unpack ${MY_P}.tar.bz2
|
||||
fi
|
||||
use selinux && sed -i 's/###//g' "${S}"/gen_compile.sh
|
||||
epatch "${FILESDIR}"/${PF}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# This block updates genkernel.conf
|
||||
sed -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_BUSYBOX:$VERSION_BUSYBOX:" \
|
||||
-e "s:VERSION_FUSE:$VERSION_FUSE:" \
|
||||
-e "s:VERSION_UNIONFS_FUSE:$VERSION_UNIONFS_FUSE:" \
|
||||
"${S}"/genkernel.conf > "${T}"/genkernel.conf \
|
||||
|| die "Could not adjust versions"
|
||||
insinto /etc
|
||||
doins "${T}"/genkernel.conf || die "doins genkernel.conf"
|
||||
|
||||
doman genkernel.8 || die "doman"
|
||||
dodoc AUTHORS ChangeLog README TODO || die "dodoc"
|
||||
|
||||
dobin genkernel || die "dobin genkernel"
|
||||
|
||||
rm -f genkernel genkernel.8 AUTHORS ChangeLog README TODO genkernel.conf
|
||||
|
||||
insinto /usr/share/genkernel
|
||||
doins -r "${S}"/* || die "doins"
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/arch/ppc64/kernel-2.6.g5 "${S}"/arch/ppc64/kernel-2.6
|
||||
|
||||
# Copy files to /var/cache/genkernel/src
|
||||
elog "Copying files to /var/cache/genkernel/src..."
|
||||
mkdir -p "${D}"/var/cache/genkernel/src
|
||||
cp -f \
|
||||
"${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${DISTDIR}"/busybox-${VERSION_BUSYBOX}.tar.bz2 \
|
||||
"${DISTDIR}"/fuse-${VERSION_FUSE}.tar.gz \
|
||||
"${DISTDIR}"/unionfs-fuse-${VERSION_UNIONFS_FUSE}.tar.bz2 \
|
||||
"${D}"/var/cache/genkernel/src || die "Copying distfiles..."
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.9.ebuild,v 1.3 2008/02/14 04:33:25 wolf31o2 Exp $
|
||||
|
||||
inherit bash-completion eutils
|
||||
|
||||
MY_PN='genkernel'
|
||||
MY_PV=${PV}
|
||||
MY_P=${MY_PN}-${MY_PV}
|
||||
VERSION_DMAP='1.02.22'
|
||||
VERSION_DMRAID='1.0.0.rc14'
|
||||
VERSION_E2FSPROGS='1.39'
|
||||
VERSION_LVM='2.02.28'
|
||||
VERSION_PKG='3.4-r3'
|
||||
VERSION_UNIONFS='1.5pre-cvs200701042308'
|
||||
|
||||
DESCRIPTION="Calculate automatic kernel building scripts"
|
||||
HOMEPAGE="http://www.calculate-linux.ru/Calckernel"
|
||||
SRC_URI="mirror://gentoo/${MY_P}.tar.bz2
|
||||
mirror://gentoo/${MY_PN}-pkg-${VERSION_PKG}.tar.bz2
|
||||
http://dev.gentoo.org/~wolf31o2/sources/${MY_PN}/${MY_P}.tar.bz2
|
||||
http://dev.gentoo.org/~wolf31o2/sources/${MY_PN}/${MY_PN}-pkg-${VERSION_PKG}.tar.bz2
|
||||
http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
http://people.redhat.com/~heinzm/sw/dmraid/src/old/dmraid-${VERSION_DMRAID}.tar.bz2
|
||||
ftp://sources.redhat.com/pub/lvm2/LVM2.${VERSION_LVM}.tgz
|
||||
ftp://sources.redhat.com/pub/lvm2/old/LVM2.${VERSION_LVM}.tgz
|
||||
ftp://sources.redhat.com/pub/dm/device-mapper.${VERSION_DMAP}.tgz
|
||||
ftp://sources.redhat.com/pub/dm/old/device-mapper.${VERSION_DMAP}.tgz
|
||||
ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/unionfs-1.x/snapshots/unionfs-${VERSION_UNIONFS}.tar.gz
|
||||
mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
RESTRICT=""
|
||||
# Please don't touch individual KEYWORDS. Since this is maintained/tested by
|
||||
# Release Engineering, it's easier for us to deal with all arches at once.
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
#KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86"
|
||||
IUSE="ibm selinux"
|
||||
|
||||
DEPEND="sys-fs/e2fsprogs
|
||||
selinux? ( sys-libs/libselinux )
|
||||
!sys-kernel/genkernel"
|
||||
|
||||
RDEPEND="${DEPEND} app-arch/cpio"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${MY_P}.tar.bz2
|
||||
cd "${S}"
|
||||
unpack ${MY_PN}-pkg-${VERSION_PKG}.tar.bz2
|
||||
use selinux && sed -i 's/###//g' gen_compile.sh
|
||||
epatch "${FILESDIR}"/${P}.patch
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /etc
|
||||
cp "${S}"/genkernel.conf "${D}"/etc
|
||||
# This block updates genkernel.conf
|
||||
sed -i -e "s:VERSION_DMAP:$VERSION_DMAP:" \
|
||||
-e "s:VERSION_DMRAID:$VERSION_DMRAID:" \
|
||||
-e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \
|
||||
-e "s:VERSION_LVM:$VERSION_LVM:" \
|
||||
-e "s:VERSION_UNIONFS:$VERSION_UNIONFS:" \
|
||||
"${D}"/etc/genkernel.conf || die "Could not adjust versions"
|
||||
|
||||
dodir /usr/share/genkernel
|
||||
use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \
|
||||
cp "${S}"/ppc64/kernel-2.6.g5 "${S}"/ppc64/kernel-2.6
|
||||
cp -Rp "${S}"/* "${D}"/usr/share/genkernel
|
||||
|
||||
dodir /usr/bin
|
||||
dosym /usr/share/genkernel/genkernel /usr/bin/genkernel
|
||||
|
||||
rm -f "${D}"/usr/share/genkernel/genkernel.conf
|
||||
dodoc README
|
||||
|
||||
doman genkernel.8
|
||||
rm genkernel.8
|
||||
|
||||
cp "${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \
|
||||
"${DISTDIR}"/LVM2.${VERSION_LVM}.tgz \
|
||||
"${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \
|
||||
"${DISTDIR}"/unionfs-${VERSION_UNIONFS}.tar.gz \
|
||||
"${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \
|
||||
"${D}"/usr/share/genkernel/pkg
|
||||
|
||||
dobashcompletion "${FILESDIR}"/genkernel.bash
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog 'Documentation is available in the genkernel manual page'
|
||||
elog 'as well as the following URL:'
|
||||
echo
|
||||
elog 'http://www.gentoo.org/doc/en/genkernel.xml'
|
||||
echo
|
||||
ewarn "This package is known to not work with reiser4. If you are running"
|
||||
ewarn "reiser4 and have a problem, do not file a bug. We know it does not"
|
||||
ewarn "work and we don't plan on fixing it since reiser4 is the one that is"
|
||||
ewarn "broken in this regard. Try using a sane filesystem like ext3 or"
|
||||
ewarn "even reiser3."
|
||||
echo
|
||||
ewarn "The LUKS support has changed from versions prior to 3.4.4. Now,"
|
||||
ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah."
|
||||
echo
|
||||
|
||||
bash-completion_pkg_postinst
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
diff -ruN genkernel.orig/arch/x86/modules_load genkernel-3.4.10.903/arch/x86/modules_load
|
||||
--- genkernel.orig/arch/x86/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/arch/x86/modules_load 2009-06-11 13:07:17.000000000 +0400
|
||||
@@ -22,5 +22,5 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
|
||||
diff -ruN genkernel.orig/arch/x86_64/modules_load genkernel-3.4.10.903/arch/x86_64/modules_load
|
||||
--- genkernel.orig/arch/x86_64/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/arch/x86_64/modules_load 2009-06-11 13:07:17.000000000 +0400
|
||||
@@ -22,4 +22,4 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
diff -ruN genkernel.orig/defaults/initrd.scripts genkernel-3.4.10.903/defaults/initrd.scripts
|
||||
--- genkernel.orig/defaults/initrd.scripts 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.scripts 2009-06-11 13:14:47.000000000 +0400
|
||||
@@ -169,11 +169,24 @@
|
||||
# TODO: Check the size of the image versus the size of our tmpfs
|
||||
# along with the amount of available RAM and increase tmpfs size
|
||||
# if necessary. (Not having awk sucks...)
|
||||
- # z=0
|
||||
- # for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
- # cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
- # z=$(($z + $i)) ; done
|
||||
- # echo $z
|
||||
+
|
||||
+ # getting memory
|
||||
+ z=0
|
||||
+ for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
+ cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
+ z=$(($z + $i)) ; done
|
||||
+
|
||||
+ # getting size tmpfs of default
|
||||
+ let curtfs=$z/2
|
||||
+
|
||||
+ # getting size of image
|
||||
+ let q=`ls -la /newroot/mnt/cdrom/livecd.squashfs | sed -r -n 's/(\S*\s*){4}(\S*).*/\2/p'`/5000*6
|
||||
+
|
||||
+ if [[ $((${curtfs}<${q})) = "1" -a $((${q}<${z})) = "1" ]];
|
||||
+ then
|
||||
+ good_msg "Increasing size of tmpfs for ${NEW_ROOT}"
|
||||
+ mount -o remount,size=${q}000 -t tmpfs tmpfs /newroot
|
||||
+ fi
|
||||
good_msg "Copying loop file for caching..."
|
||||
cp -a ${NEW_ROOT}/mnt/cdrom/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
|
||||
if [ $? -ne 0 ]
|
||||
@@ -184,6 +197,8 @@
|
||||
rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null
|
||||
else
|
||||
LOOPEXT='../'
|
||||
+ good_msg "Unmounting media from ${NEW_ROOT}/mnt/cdrom"
|
||||
+ umount ${NEW_ROOT}/mnt/cdrom
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -998,10 +1012,13 @@
|
||||
mkdir /tmp
|
||||
mkdir -p ${UNION}
|
||||
# mkdir -p $CHANGES
|
||||
-# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
- good_msg "Creating union mount"
|
||||
- unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+## mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+ mount -t unionfs -o dirs=${rw_dir}:${ro_dir}=ro unionfs ${UNION}
|
||||
ret=$?
|
||||
+ chmod 1777 ${UNION}/tmp
|
||||
+ good_msg "Creating union mount"
|
||||
+# unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+# ret=$?
|
||||
if [ "${ret}" -ne 0 ]
|
||||
then
|
||||
bad_msg "Can't setup union mount!"
|
@ -0,0 +1,121 @@
|
||||
diff -ruN genkernel.orig/arch/x86/modules_load genkernel-3.4.10.903/arch/x86/modules_load
|
||||
--- genkernel.orig/arch/x86/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/arch/x86/modules_load 2009-07-10 17:47:23.000000000 +0400
|
||||
@@ -22,5 +22,5 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
|
||||
diff -ruN genkernel.orig/arch/x86_64/modules_load genkernel-3.4.10.903/arch/x86_64/modules_load
|
||||
--- genkernel.orig/arch/x86_64/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/arch/x86_64/modules_load 2009-07-10 17:47:23.000000000 +0400
|
||||
@@ -22,4 +22,4 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
diff -ruN genkernel.orig/defaults/initrd.scripts genkernel-3.4.10.903/defaults/initrd.scripts
|
||||
--- genkernel.orig/defaults/initrd.scripts 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.scripts 2009-07-10 17:47:23.000000000 +0400
|
||||
@@ -169,11 +169,24 @@
|
||||
# TODO: Check the size of the image versus the size of our tmpfs
|
||||
# along with the amount of available RAM and increase tmpfs size
|
||||
# if necessary. (Not having awk sucks...)
|
||||
- # z=0
|
||||
- # for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
- # cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
- # z=$(($z + $i)) ; done
|
||||
- # echo $z
|
||||
+
|
||||
+ # getting memory
|
||||
+ z=0
|
||||
+ for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
+ cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
+ z=$(($z + $i)) ; done
|
||||
+
|
||||
+ # getting size tmpfs of default
|
||||
+ let curtfs=$z/2
|
||||
+
|
||||
+ # getting size of image
|
||||
+ let q=`ls -la /newroot/mnt/cdrom/livecd.squashfs | sed -r -n 's/(\S*\s*){4}(\S*).*/\2/p'`/5000*6
|
||||
+
|
||||
+ if [[ $((${curtfs}<${q})) = "1" -a $((${q}<${z})) = "1" ]];
|
||||
+ then
|
||||
+ good_msg "Increasing size of tmpfs for ${NEW_ROOT}"
|
||||
+ mount -o remount,size=${q}000 -t tmpfs tmpfs /newroot
|
||||
+ fi
|
||||
good_msg "Copying loop file for caching..."
|
||||
cp -a ${NEW_ROOT}/mnt/cdrom/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
|
||||
if [ $? -ne 0 ]
|
||||
@@ -184,6 +197,8 @@
|
||||
rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null
|
||||
else
|
||||
LOOPEXT='../'
|
||||
+ good_msg "Unmounting media from ${NEW_ROOT}/mnt/cdrom"
|
||||
+ umount ${NEW_ROOT}/mnt/cdrom
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -998,10 +1013,13 @@
|
||||
mkdir /tmp
|
||||
mkdir -p ${UNION}
|
||||
# mkdir -p $CHANGES
|
||||
-# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
- good_msg "Creating union mount"
|
||||
- unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+## mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+ mount -t unionfs -o dirs=${rw_dir}:${ro_dir}=ro unionfs ${UNION}
|
||||
ret=$?
|
||||
+ chmod 1777 ${UNION}/tmp
|
||||
+ good_msg "Creating union mount"
|
||||
+# unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+# ret=$?
|
||||
if [ "${ret}" -ne 0 ]
|
||||
then
|
||||
bad_msg "Can't setup union mount!"
|
||||
diff -ruN genkernel.orig/defaults/linuxrc genkernel-3.4.10.903/defaults/linuxrc
|
||||
--- genkernel.orig/defaults/linuxrc 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/defaults/linuxrc 2009-07-10 17:53:06.000000000 +0400
|
||||
@@ -465,9 +465,36 @@
|
||||
then
|
||||
break
|
||||
else
|
||||
- bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
- got_good_root=0
|
||||
- REAL_ROOT=''
|
||||
+ # check for scratch
|
||||
+ if [ -e ${NEW_ROOT}/livecd.squashfs -a -d ${NEW_ROOT}/delta -a -d ${NEW_ROOT}/workspace ];
|
||||
+ then
|
||||
+ good_msg 'Found scratch data...'
|
||||
+ modprobe unionfs >/dev/null
|
||||
+ modprobe squashfs >/dev/null
|
||||
+ if mount -o remount,rw ${NEW_ROOT};
|
||||
+ then
|
||||
+ mkdir -p ${NEW_ROOT}/scratch && mkdir -p /union && mkdir -p ${NEW_ROOT}/workspace/mnt/builder && mkdir -p ${NEW_ROOT}/workspace/mnt/calculate
|
||||
+ if mount -o loop,ro -t squashfs ${NEW_ROOT}/livecd.squashfs ${NEW_ROOT}/scratch;
|
||||
+ then
|
||||
+ if mount -t unionfs -o ro,dirs=${NEW_ROOT}/workspace:${NEW_ROOT}/delta=ro:${NEW_ROOT}/scratch=ro unionfs /union;
|
||||
+ then
|
||||
+ mount -t unionfs -o ro,dirs=${NEW_ROOT}/delta:${NEW_ROOT}/scratch=ro unionfs /union/mnt/builder
|
||||
+ CHROOT=/union
|
||||
+ break;
|
||||
+ else
|
||||
+ bad_msg 'Could not merge scratch layers'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not mount scratch squashfs image'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not remount ${NEW_ROOT}'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
+ got_good_root=0
|
||||
+ REAL_ROOT=''
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
bad_msg "Could not mount specified ROOT, try again"
|
@ -0,0 +1,121 @@
|
||||
diff -ruN genkernel.orig/arch/x86/modules_load genkernel-3.4.10.903/arch/x86/modules_load
|
||||
--- genkernel.orig/arch/x86/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/arch/x86/modules_load 2009-07-10 17:47:23.000000000 +0400
|
||||
@@ -22,5 +22,5 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
|
||||
diff -ruN genkernel.orig/arch/x86_64/modules_load genkernel-3.4.10.903/arch/x86_64/modules_load
|
||||
--- genkernel.orig/arch/x86_64/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/arch/x86_64/modules_load 2009-07-10 17:47:23.000000000 +0400
|
||||
@@ -22,4 +22,4 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
diff -ruN genkernel.orig/defaults/initrd.scripts genkernel-3.4.10.903/defaults/initrd.scripts
|
||||
--- genkernel.orig/defaults/initrd.scripts 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.scripts 2009-07-10 17:47:23.000000000 +0400
|
||||
@@ -169,11 +169,24 @@
|
||||
# TODO: Check the size of the image versus the size of our tmpfs
|
||||
# along with the amount of available RAM and increase tmpfs size
|
||||
# if necessary. (Not having awk sucks...)
|
||||
- # z=0
|
||||
- # for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
- # cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
- # z=$(($z + $i)) ; done
|
||||
- # echo $z
|
||||
+
|
||||
+ # getting memory
|
||||
+ z=0
|
||||
+ for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
+ cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
+ z=$(($z + $i)) ; done
|
||||
+
|
||||
+ # getting size tmpfs of default
|
||||
+ let curtfs=$z/2
|
||||
+
|
||||
+ # getting size of image
|
||||
+ let q=`ls -la /newroot/mnt/cdrom/livecd.squashfs | sed -r -n 's/(\S*\s*){4}(\S*).*/\2/p'`/5000*6
|
||||
+
|
||||
+ if [[ $((${curtfs}<${q})) = "1" -a $((${q}<${z})) = "1" ]];
|
||||
+ then
|
||||
+ good_msg "Increasing size of tmpfs for ${NEW_ROOT}"
|
||||
+ mount -o remount,size=${q}000 -t tmpfs tmpfs /newroot
|
||||
+ fi
|
||||
good_msg "Copying loop file for caching..."
|
||||
cp -a ${NEW_ROOT}/mnt/cdrom/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
|
||||
if [ $? -ne 0 ]
|
||||
@@ -184,6 +197,8 @@
|
||||
rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null
|
||||
else
|
||||
LOOPEXT='../'
|
||||
+ good_msg "Unmounting media from ${NEW_ROOT}/mnt/cdrom"
|
||||
+ umount ${NEW_ROOT}/mnt/cdrom
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -998,10 +1013,13 @@
|
||||
mkdir /tmp
|
||||
mkdir -p ${UNION}
|
||||
# mkdir -p $CHANGES
|
||||
-# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
- good_msg "Creating union mount"
|
||||
- unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+## mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+ mount -t unionfs -o dirs=${rw_dir}:${ro_dir}=ro unionfs ${UNION}
|
||||
ret=$?
|
||||
+ chmod 1777 ${UNION}/tmp
|
||||
+ good_msg "Creating union mount"
|
||||
+# unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+# ret=$?
|
||||
if [ "${ret}" -ne 0 ]
|
||||
then
|
||||
bad_msg "Can't setup union mount!"
|
||||
diff -ruN genkernel.orig/defaults/linuxrc genkernel-3.4.10.903/defaults/linuxrc
|
||||
--- genkernel.orig/defaults/linuxrc 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel-3.4.10.903/defaults/linuxrc 2009-07-10 17:53:06.000000000 +0400
|
||||
@@ -465,9 +465,36 @@
|
||||
then
|
||||
break
|
||||
else
|
||||
- bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
- got_good_root=0
|
||||
- REAL_ROOT=''
|
||||
+ # check for scratch
|
||||
+ if [ -e ${NEW_ROOT}/livecd.squashfs -a -d ${NEW_ROOT}/delta -a -d ${NEW_ROOT}/workspace ];
|
||||
+ then
|
||||
+ good_msg 'Found scratch data...'
|
||||
+ modprobe unionfs >/dev/null
|
||||
+ modprobe squashfs >/dev/null
|
||||
+ if mount -o remount,rw ${NEW_ROOT};
|
||||
+ then
|
||||
+ mkdir -p ${NEW_ROOT}/calculate && mkdir -p /union && mkdir -p ${NEW_ROOT}/workspace/mnt/builder && mkdir -p ${NEW_ROOT}/workspace/mnt/scratch
|
||||
+ if mount -o loop,ro -t squashfs ${NEW_ROOT}/livecd.squashfs ${NEW_ROOT}/calculate;
|
||||
+ then
|
||||
+ if mount -t unionfs -o ro,dirs=${NEW_ROOT}/workspace:${NEW_ROOT}/delta=ro:${NEW_ROOT}/calculate=ro unionfs /union;
|
||||
+ then
|
||||
+ mount -t unionfs -o ro,dirs=${NEW_ROOT}/delta:${NEW_ROOT}/calculate=ro unionfs /union/mnt/builder
|
||||
+ CHROOT=/union
|
||||
+ break;
|
||||
+ else
|
||||
+ bad_msg 'Could not merge scratch layers'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not mount scratch squashfs image'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not remount ${NEW_ROOT}'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
+ got_good_root=0
|
||||
+ REAL_ROOT=''
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
bad_msg "Could not mount specified ROOT, try again"
|
@ -0,0 +1,191 @@
|
||||
diff -ruN genkernel-3.4.10.903.orig/arch/x86/modules_load genkernel-3.4.10.903/arch/x86/modules_load
|
||||
--- genkernel-3.4.10.903.orig/arch/x86/modules_load 2009-08-04 05:59:47.000000000 +0000
|
||||
+++ genkernel-3.4.10.903/arch/x86/modules_load 2009-08-04 05:59:38.000000000 +0000
|
||||
@@ -22,5 +22,5 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
|
||||
diff -ruN genkernel-3.4.10.903.orig/arch/x86_64/modules_load genkernel-3.4.10.903/arch/x86_64/modules_load
|
||||
--- genkernel-3.4.10.903.orig/arch/x86_64/modules_load 2009-08-04 05:59:47.000000000 +0000
|
||||
+++ genkernel-3.4.10.903/arch/x86_64/modules_load 2009-08-04 05:59:38.000000000 +0000
|
||||
@@ -22,4 +22,4 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
diff -ruN genkernel-3.4.10.903.orig/defaults/initrd.defaults genkernel-3.4.10.903/defaults/initrd.defaults
|
||||
--- genkernel-3.4.10.903.orig/defaults/initrd.defaults 2009-08-04 05:59:47.000000000 +0000
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.defaults 2009-08-04 05:59:38.000000000 +0000
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
REAL_ROOT=''
|
||||
CDROOT='0'
|
||||
+SCRATCH='0'
|
||||
CDROOT_DEV=''
|
||||
CDROOT_TYPE='auto'
|
||||
NEW_ROOT='/newroot'
|
||||
diff -ruN genkernel-3.4.10.903.orig/defaults/initrd.scripts genkernel-3.4.10.903/defaults/initrd.scripts
|
||||
--- genkernel-3.4.10.903.orig/defaults/initrd.scripts 2009-08-04 05:59:47.000000000 +0000
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.scripts 2009-08-04 06:02:27.000000000 +0000
|
||||
@@ -169,11 +169,24 @@
|
||||
# TODO: Check the size of the image versus the size of our tmpfs
|
||||
# along with the amount of available RAM and increase tmpfs size
|
||||
# if necessary. (Not having awk sucks...)
|
||||
- # z=0
|
||||
- # for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
- # cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
- # z=$(($z + $i)) ; done
|
||||
- # echo $z
|
||||
+
|
||||
+ # getting memory
|
||||
+ z=0
|
||||
+ for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
+ cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
+ z=$(($z + $i)) ; done
|
||||
+
|
||||
+ # getting size tmpfs of default
|
||||
+ let curtfs=$z/2
|
||||
+
|
||||
+ # getting size of image
|
||||
+ let q=`ls -la ${NEW_ROOT}/mnt/cdrom/${LOOP} | sed -r -n 's/(\S*\s*){4}(\S*).*/\2/p'`/5000*6
|
||||
+
|
||||
+ if [[ $((${curtfs}<${q})) = "1" -a $((${q}<${z})) = "1" ]];
|
||||
+ then
|
||||
+ good_msg "Increasing size of tmpfs for ${NEW_ROOT}"
|
||||
+ mount -o remount,size=${q}000 -t tmpfs tmpfs ${NEW_ROOT}
|
||||
+ fi
|
||||
good_msg "Copying loop file for caching..."
|
||||
cp -a ${NEW_ROOT}/mnt/cdrom/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
|
||||
if [ $? -ne 0 ]
|
||||
@@ -184,6 +197,8 @@
|
||||
rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null
|
||||
else
|
||||
LOOPEXT='../'
|
||||
+ good_msg "Unmounting media from ${NEW_ROOT}/mnt/cdrom"
|
||||
+ umount ${NEW_ROOT}/mnt/cdrom
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -998,10 +1013,61 @@
|
||||
mkdir /tmp
|
||||
mkdir -p ${UNION}
|
||||
# mkdir -p $CHANGES
|
||||
-# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+## mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+
|
||||
+ if [ "${SCRATCH}" -ne 0 ];
|
||||
+ then
|
||||
+ good_msg "Loading in scratch mode"
|
||||
+ BUILDERDIR=${UNION}/mnt/builder
|
||||
+ SCRATCHDIR=${UNION}/mnt/scratch
|
||||
+ DELTADIR=${rw_dir}/mnt/delta
|
||||
+ WORKSPACEDIR=${rw_dir}/mnt/workspace
|
||||
+ mount -o remount,rw ${rw_dir}/mnt/cdrom >/dev/null 2>&1
|
||||
+ touch ${rw_dir}/mnt/cdrom/livecd >/dev/null 2>&1
|
||||
+ if [ "$?" -ne 0 ];
|
||||
+ then
|
||||
+ ISRW=0
|
||||
+ else
|
||||
+ ISRW=1
|
||||
+ fi
|
||||
+
|
||||
+ mkdir -p ${DELTADIR}
|
||||
+ mkdir -p ${WORKSPACEDIR}
|
||||
+ mount -t unionfs -o dirs=${WORKSPACEDIR}=rw:${DELTADIR}=ro:${rw_dir}/mnt/livecd=ro unionfs ${UNION}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mkdir -p ${SCRATCHDIR}/calculate
|
||||
+ mkdir -p ${SCRATCHDIR}/delta
|
||||
+ mkdir -p ${SCRATCHDIR}/workspace
|
||||
+ mount -o bind ${rw_dir}/mnt/delta ${SCRATCHDIR}/delta
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mount -o bind ${rw_dir}/mnt/workspace ${SCRATCHDIR}/workspace
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mkdir -p ${BUILDERDIR}
|
||||
+ mount -t unionfs -o dirs=${DELTADIR}=rw:${rw_dir}/mnt/livecd=ro unionfs ${BUILDERDIR}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mount -o bind ${rw_dir}/mnt/livecd ${SCRATCHDIR}/calculate
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ if [ "$ISRW" -ne 0 ];
|
||||
+ then
|
||||
+ FLASHDIR=${UNION}/mnt/flash
|
||||
+ mkdir -p ${FLASHDIR}
|
||||
+ mount -o bind ${rw_dir}/mnt/cdrom ${FLASHDIR}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ else
|
||||
+ CDROMDIR=${UNION}/mnt/cdrom
|
||||
+ mkdir -p ${CDROMDIR}
|
||||
+ mount -o bind ${rw_dir}/mnt/cdrom ${CDROMDIR}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ fi
|
||||
+ else
|
||||
+ mount -t unionfs -o dirs=${rw_dir}:${ro_dir}=ro unionfs ${UNION}
|
||||
+ ret=$?
|
||||
+ fi
|
||||
+
|
||||
+ chmod 1777 ${UNION}/tmp
|
||||
good_msg "Creating union mount"
|
||||
- unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
- ret=$?
|
||||
+# unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+# ret=$?
|
||||
if [ "${ret}" -ne 0 ]
|
||||
then
|
||||
bad_msg "Can't setup union mount!"
|
||||
diff -ruN genkernel-3.4.10.903.orig/defaults/linuxrc genkernel-3.4.10.903/defaults/linuxrc
|
||||
--- genkernel-3.4.10.903.orig/defaults/linuxrc 2009-08-04 05:59:47.000000000 +0000
|
||||
+++ genkernel-3.4.10.903/defaults/linuxrc 2009-08-04 05:59:38.000000000 +0000
|
||||
@@ -62,6 +62,10 @@
|
||||
init_opts\=*)
|
||||
INIT_OPTS=`parse_opt "${x}"`
|
||||
;;
|
||||
+ # Scratch usbload
|
||||
+ scratch)
|
||||
+ SCRATCH=1
|
||||
+ ;;
|
||||
# Livecd options
|
||||
cdroot)
|
||||
CDROOT=1
|
||||
@@ -465,9 +469,36 @@
|
||||
then
|
||||
break
|
||||
else
|
||||
- bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
- got_good_root=0
|
||||
- REAL_ROOT=''
|
||||
+ # check for scratch
|
||||
+ if [ -e ${NEW_ROOT}/livecd.squashfs -a -d ${NEW_ROOT}/delta -a -d ${NEW_ROOT}/workspace ];
|
||||
+ then
|
||||
+ good_msg 'Found scratch data...'
|
||||
+ modprobe unionfs >/dev/null
|
||||
+ modprobe squashfs >/dev/null
|
||||
+ if mount -o remount,rw ${NEW_ROOT};
|
||||
+ then
|
||||
+ mkdir -p ${NEW_ROOT}/calculate && mkdir -p /union && mkdir -p ${NEW_ROOT}/workspace/mnt/builder && mkdir -p ${NEW_ROOT}/workspace/mnt/scratch
|
||||
+ if mount -o loop,ro -t squashfs ${NEW_ROOT}/livecd.squashfs ${NEW_ROOT}/calculate;
|
||||
+ then
|
||||
+ if mount -t unionfs -o ro,dirs=${NEW_ROOT}/workspace:${NEW_ROOT}/delta=ro:${NEW_ROOT}/calculate=ro unionfs /union;
|
||||
+ then
|
||||
+ mount -t unionfs -o ro,dirs=${NEW_ROOT}/delta:${NEW_ROOT}/calculate=ro unionfs /union/mnt/builder
|
||||
+ CHROOT=/union
|
||||
+ break;
|
||||
+ else
|
||||
+ bad_msg 'Could not merge scratch layers'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not mount scratch squashfs image'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not remount ${NEW_ROOT}'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
+ got_good_root=0
|
||||
+ REAL_ROOT=''
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
bad_msg "Could not mount specified ROOT, try again"
|
@ -0,0 +1,214 @@
|
||||
diff -ruN genkernel-3.4.10.903.orig/arch/x86/modules_load genkernel-3.4.10.903/arch/x86/modules_load
|
||||
--- genkernel-3.4.10.903.orig/arch/x86/modules_load 2009-08-07 07:28:37.088327160 +0000
|
||||
+++ genkernel-3.4.10.903/arch/x86/modules_load 2009-08-07 07:28:21.067454600 +0000
|
||||
@@ -22,5 +22,5 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
|
||||
diff -ruN genkernel-3.4.10.903.orig/arch/x86_64/modules_load genkernel-3.4.10.903/arch/x86_64/modules_load
|
||||
--- genkernel-3.4.10.903.orig/arch/x86_64/modules_load 2009-08-07 07:28:37.089327680 +0000
|
||||
+++ genkernel-3.4.10.903/arch/x86_64/modules_load 2009-08-07 07:28:21.068454640 +0000
|
||||
@@ -22,4 +22,4 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
diff -ruN genkernel-3.4.10.903.orig/defaults/initrd.defaults genkernel-3.4.10.903/defaults/initrd.defaults
|
||||
--- genkernel-3.4.10.903.orig/defaults/initrd.defaults 2009-08-07 07:28:37.089327680 +0000
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.defaults 2009-08-07 07:28:21.068454640 +0000
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
REAL_ROOT=''
|
||||
CDROOT='0'
|
||||
+SCRATCH='0'
|
||||
CDROOT_DEV=''
|
||||
CDROOT_TYPE='auto'
|
||||
NEW_ROOT='/newroot'
|
||||
diff -ruN genkernel-3.4.10.903.orig/defaults/initrd.scripts genkernel-3.4.10.903/defaults/initrd.scripts
|
||||
--- genkernel-3.4.10.903.orig/defaults/initrd.scripts 2009-08-07 07:28:37.089327680 +0000
|
||||
+++ genkernel-3.4.10.903/defaults/initrd.scripts 2009-08-07 07:28:21.069453960 +0000
|
||||
@@ -169,11 +169,24 @@
|
||||
# TODO: Check the size of the image versus the size of our tmpfs
|
||||
# along with the amount of available RAM and increase tmpfs size
|
||||
# if necessary. (Not having awk sucks...)
|
||||
- # z=0
|
||||
- # for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
- # cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
- # z=$(($z + $i)) ; done
|
||||
- # echo $z
|
||||
+
|
||||
+ # getting memory
|
||||
+ z=0
|
||||
+ for i in $(cat /proc/meminfo | grep -e ^MemFree -e ^Cached | \
|
||||
+ cut -d: -f2 | cut -dk -f1 | sed -e "s/^\s*//") ; do
|
||||
+ z=$(($z + $i)) ; done
|
||||
+
|
||||
+ # getting size tmpfs of default
|
||||
+ let curtfs=$z/2
|
||||
+
|
||||
+ # getting size of image
|
||||
+ let q=`ls -la ${NEW_ROOT}/mnt/cdrom/${LOOP} | sed -r -n 's/(\S*\s*){4}(\S*).*/\2/p'`/5000*6
|
||||
+
|
||||
+ if [[ $((${curtfs}<${q})) = "1" -a $((${q}<${z})) = "1" ]];
|
||||
+ then
|
||||
+ good_msg "Increasing size of tmpfs for ${NEW_ROOT}"
|
||||
+ mount -o remount,size=${q}000 -t tmpfs tmpfs ${NEW_ROOT}
|
||||
+ fi
|
||||
good_msg "Copying loop file for caching..."
|
||||
cp -a ${NEW_ROOT}/mnt/cdrom/${LOOP} ${NEW_ROOT}/mnt/${LOOP}
|
||||
if [ $? -ne 0 ]
|
||||
@@ -184,6 +197,8 @@
|
||||
rm -rf ${NEW_ROOT}/mnt/zisofs 2>/dev/null
|
||||
else
|
||||
LOOPEXT='../'
|
||||
+ good_msg "Unmounting media from ${NEW_ROOT}/mnt/cdrom"
|
||||
+ umount ${NEW_ROOT}/mnt/cdrom
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -998,10 +1013,61 @@
|
||||
mkdir /tmp
|
||||
mkdir -p ${UNION}
|
||||
# mkdir -p $CHANGES
|
||||
-# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+## mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+
|
||||
+ if [ "${SCRATCH}" -ne 0 ];
|
||||
+ then
|
||||
+ good_msg "Loading in scratch mode"
|
||||
+ BUILDERDIR=${UNION}/mnt/builder
|
||||
+ SCRATCHDIR=${UNION}/mnt/scratch
|
||||
+ DELTADIR=${rw_dir}/mnt/delta
|
||||
+ WORKSPACEDIR=${rw_dir}/mnt/workspace
|
||||
+ mount -o remount,rw ${rw_dir}/mnt/cdrom >/dev/null 2>&1
|
||||
+ touch ${rw_dir}/mnt/cdrom/livecd >/dev/null 2>&1
|
||||
+ if [ "$?" -ne 0 ];
|
||||
+ then
|
||||
+ ISRW=0
|
||||
+ else
|
||||
+ ISRW=1
|
||||
+ fi
|
||||
+
|
||||
+ mkdir -p ${DELTADIR}
|
||||
+ mkdir -p ${WORKSPACEDIR}
|
||||
+ mount -t unionfs -o dirs=${WORKSPACEDIR}=rw:${DELTADIR}=ro:${rw_dir}/mnt/livecd=ro unionfs ${UNION}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mkdir -p ${SCRATCHDIR}/calculate
|
||||
+ mkdir -p ${SCRATCHDIR}/delta
|
||||
+ mkdir -p ${SCRATCHDIR}/workspace
|
||||
+ mount -o bind ${rw_dir}/mnt/delta ${SCRATCHDIR}/delta
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mount -o bind ${rw_dir}/mnt/workspace ${SCRATCHDIR}/workspace
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mkdir -p ${BUILDERDIR}
|
||||
+ mount -t unionfs -o dirs=${DELTADIR}=rw:${rw_dir}/mnt/livecd=ro unionfs ${BUILDERDIR}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ mount -o bind ${rw_dir}/mnt/livecd ${SCRATCHDIR}/calculate
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ if [ "$ISRW" -ne 0 ];
|
||||
+ then
|
||||
+ FLASHDIR=${UNION}/mnt/flash
|
||||
+ mkdir -p ${FLASHDIR}
|
||||
+ mount -o bind ${rw_dir}/mnt/cdrom ${FLASHDIR}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ else
|
||||
+ CDROMDIR=${UNION}/mnt/cdrom
|
||||
+ mkdir -p ${CDROMDIR}
|
||||
+ mount -o bind ${rw_dir}/mnt/cdrom ${CDROMDIR}
|
||||
+ tmpret=$?;[ "$tmpret" -ne 0 ] && ret=$tmpret
|
||||
+ fi
|
||||
+ else
|
||||
+ mount -t unionfs -o dirs=${rw_dir}:${ro_dir}=ro unionfs ${UNION}
|
||||
+ ret=$?
|
||||
+ fi
|
||||
+
|
||||
+ chmod 1777 ${UNION}/tmp
|
||||
good_msg "Creating union mount"
|
||||
- unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
- ret=$?
|
||||
+# unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+# ret=$?
|
||||
if [ "${ret}" -ne 0 ]
|
||||
then
|
||||
bad_msg "Can't setup union mount!"
|
||||
diff -ruN genkernel-3.4.10.903.orig/defaults/linuxrc genkernel-3.4.10.903/defaults/linuxrc
|
||||
--- genkernel-3.4.10.903.orig/defaults/linuxrc 2009-08-07 07:28:37.089327680 +0000
|
||||
+++ genkernel-3.4.10.903/defaults/linuxrc 2009-08-07 07:28:21.070453880 +0000
|
||||
@@ -62,6 +62,10 @@
|
||||
init_opts\=*)
|
||||
INIT_OPTS=`parse_opt "${x}"`
|
||||
;;
|
||||
+ # Scratch usbload
|
||||
+ scratch)
|
||||
+ SCRATCH=1
|
||||
+ ;;
|
||||
# Livecd options
|
||||
cdroot)
|
||||
CDROOT=1
|
||||
@@ -465,9 +469,36 @@
|
||||
then
|
||||
break
|
||||
else
|
||||
- bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
- got_good_root=0
|
||||
- REAL_ROOT=''
|
||||
+ # check for scratch
|
||||
+ if [ -e ${NEW_ROOT}/livecd.squashfs -a -d ${NEW_ROOT}/delta -a -d ${NEW_ROOT}/workspace ];
|
||||
+ then
|
||||
+ good_msg 'Found scratch data...'
|
||||
+ modprobe unionfs >/dev/null
|
||||
+ modprobe squashfs >/dev/null
|
||||
+ if mount -o remount,rw ${NEW_ROOT};
|
||||
+ then
|
||||
+ mkdir -p ${NEW_ROOT}/calculate && mkdir -p /union && mkdir -p ${NEW_ROOT}/workspace/mnt/builder && mkdir -p ${NEW_ROOT}/workspace/mnt/scratch
|
||||
+ if mount -o loop,ro -t squashfs ${NEW_ROOT}/livecd.squashfs ${NEW_ROOT}/calculate;
|
||||
+ then
|
||||
+ if mount -t unionfs -o ro,dirs=${NEW_ROOT}/workspace:${NEW_ROOT}/delta=ro:${NEW_ROOT}/calculate=ro unionfs /union;
|
||||
+ then
|
||||
+ mount -t unionfs -o ro,dirs=${NEW_ROOT}/delta:${NEW_ROOT}/calculate=ro unionfs /union/mnt/builder
|
||||
+ CHROOT=/union
|
||||
+ break;
|
||||
+ else
|
||||
+ bad_msg 'Could not merge scratch layers'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not mount scratch squashfs image'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg 'Could not remount ${NEW_ROOT}'
|
||||
+ fi
|
||||
+ else
|
||||
+ bad_msg "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"
|
||||
+ got_good_root=0
|
||||
+ REAL_ROOT=''
|
||||
+ fi
|
||||
fi
|
||||
else
|
||||
bad_msg "Could not mount specified ROOT, try again"
|
||||
diff -ruN genkernel-3.4.10.903.orig/gen_initramfs.sh genkernel-3.4.10.903/gen_initramfs.sh
|
||||
--- genkernel-3.4.10.903.orig/gen_initramfs.sh 2009-01-05 22:22:10.000000000 +0000
|
||||
+++ genkernel-3.4.10.903/gen_initramfs.sh 2009-08-07 07:45:07.000000000 +0000
|
||||
@@ -560,8 +560,17 @@
|
||||
append_data 'overlay'
|
||||
fi
|
||||
|
||||
- gzip -9 "${CPIO}"
|
||||
- mv -f "${CPIO}.gz" "${CPIO}"
|
||||
+ # Select arch util
|
||||
+ if [ "`cat ${KERNEL_DIR}/.config |
|
||||
+ grep -Pc "^CONFIG_RD_LZMA=y|^CONFIG_INITRAMFS_COMPRESSION_LZMA=y"`" == "2" ] &&
|
||||
+ which lzma &>/dev/null;
|
||||
+ then
|
||||
+ lzma -9 "${CPIO}"
|
||||
+ mv -f "${CPIO}.lzma" "${CPIO}"
|
||||
+ else
|
||||
+ gzip -9 "${CPIO}"
|
||||
+ mv -f "${CPIO}.gz" "${CPIO}"
|
||||
+ fi
|
||||
|
||||
if isTrue "${INTEGRATED_INITRAMFS}"
|
||||
then
|
@ -0,0 +1,39 @@
|
||||
diff -NPur genkernel-3.4.10.903/arch/x86/modules_load genkernel_patch/arch/x86/modules_load
|
||||
--- genkernel-3.4.10.903/arch/x86/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel_patch/arch/x86/modules_load 2009-04-20 19:04:51.000000000 +0400
|
||||
@@ -22,5 +22,5 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
|
||||
diff -NPur genkernel-3.4.10.903/arch/x86_64/modules_load genkernel_patch/arch/x86_64/modules_load
|
||||
--- genkernel-3.4.10.903/arch/x86_64/modules_load 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel_patch/arch/x86_64/modules_load 2009-04-20 19:04:28.000000000 +0400
|
||||
@@ -22,4 +22,4 @@
|
||||
MODULES_USB="ehci-hcd uhci usb-ohci hid usb-storage uhci-hcd ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs fuse"
|
||||
+MODULES_FS="ext2 ext3 ext4 reiserfs jfs nfs xfs fuse"
|
||||
diff -NPur genkernel-3.4.10.903/defaults/initrd.scripts genkernel_patch/defaults/initrd.scripts
|
||||
--- genkernel-3.4.10.903/defaults/initrd.scripts 2009-01-06 01:22:10.000000000 +0300
|
||||
+++ genkernel_patch/defaults/initrd.scripts 2009-04-20 19:00:37.000000000 +0400
|
||||
@@ -998,10 +998,13 @@
|
||||
mkdir /tmp
|
||||
mkdir -p ${UNION}
|
||||
# mkdir -p $CHANGES
|
||||
-# mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
- good_msg "Creating union mount"
|
||||
- unionfs -o allow_other,cow,noinitgroups,suid,dev ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+## mount -t unionfs -o dirs=$CHANGES=rw unionfs ${UNION}
|
||||
+ mount -t unionfs -o dirs=${rw_dir}:${ro_dir}=ro unionfs ${UNION}
|
||||
ret=$?
|
||||
+ chmod 1777 ${UNION}/tmp
|
||||
+ good_msg "Creating union mount"
|
||||
+# unionfs -o allow_other,cow,noinitgroups,suid,dev,default_permissions,use_ino ${rw_dir}=RW:${ro_dir}=RO ${UNION} 2>/dev/null
|
||||
+# ret=$?
|
||||
if [ "${ret}" -ne 0 ]
|
||||
then
|
||||
bad_msg "Can't setup union mount!"
|
@ -0,0 +1,102 @@
|
||||
--- genkernel-3.4.9.orig/generic/initrd.defaults 2008-01-12 02:44:19.000000000 +0300
|
||||
+++ genkernel-3.4.9/generic/initrd.defaults 2008-02-13 00:50:27.000000000 +0300
|
||||
@@ -60,8 +60,12 @@
|
||||
fi
|
||||
|
||||
QUIET=1
|
||||
-ROOT_LINKS='bin sbin lib lib32 lib64 boot usr opt emul'
|
||||
-ROOT_TREES='etc root home var'
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# Calculate hack - перенесем копируемые директории из ROOT_TREES в ROOT_LINKS
|
||||
+# плюс добавим media
|
||||
+ROOT_LINKS='bin sbin lib lib32 lib64 boot usr opt emul etc root home var media'
|
||||
+ROOT_TREES=''
|
||||
+#-----------------------------------------------------------------------------
|
||||
INSMOD='insmod'
|
||||
if [ "${KMINOR}" -gt '4' ]
|
||||
then
|
||||
--- genkernel-3.4.9.orig/generic/initrd.scripts 2008-01-12 02:44:19.000000000 +0300
|
||||
+++ genkernel-3.4.9/generic/initrd.scripts 2008-01-24 17:25:05.000000000 +0300
|
||||
@@ -99,7 +99,12 @@
|
||||
# else
|
||||
# mount -r -t auto ${x} ${mntdir} &>/dev/null
|
||||
# fi
|
||||
- mount -r -t ${CDROOT_TYPE} ${x} ${mntdir} &>/dev/null
|
||||
+
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# Calculate hack - удалим вывод в null устройство приводящий к ошибке на экране
|
||||
+# mount -r -t ${CDROOT_TYPE} ${x} ${mntdir} &>/dev/null
|
||||
+ mount -r -t ${CDROOT_TYPE} ${x} ${mntdir}
|
||||
+#-----------------------------------------------------------------------------
|
||||
if [ "$?" = '0' ]
|
||||
then
|
||||
# Check for the media
|
||||
--- genkernel-3.4.9.orig/generic/linuxrc 2008-01-12 02:44:19.000000000 +0300
|
||||
+++ genkernel-3.4.9/generic/linuxrc 2008-01-24 17:22:47.000000000 +0300
|
||||
@@ -634,9 +634,12 @@
|
||||
|
||||
if [ "${USE_UNIONFS_NORMAL}" != '1' ]
|
||||
then
|
||||
- good_msg "Copying read-write image contents to tmpfs"
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# Calculate hack - закомментируем перенос директорий настроек на RAM-диск
|
||||
+# good_msg "Copying read-write image contents to tmpfs"
|
||||
# Copy over stuff that should be writable
|
||||
- (cd ${NEW_ROOT}/${FS_LOCATION}; cp -a ${ROOT_TREES} ${NEW_ROOT})
|
||||
+# (cd ${NEW_ROOT}/${FS_LOCATION}; cp -a ${ROOT_TREES} ${NEW_ROOT})
|
||||
+#-----------------------------------------------------------------------------
|
||||
|
||||
# Now we do the links.
|
||||
for x in ${ROOT_LINKS}
|
||||
@@ -684,7 +687,14 @@
|
||||
mkdir initrd proc tmp sys 2>/dev/null
|
||||
chmod 1777 tmp
|
||||
fi
|
||||
-
|
||||
+
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# Calculate hack - подмонтируем образ через unionfs для возможности записи
|
||||
+echo "mkdir unionfs && mount unionfs..."
|
||||
+mkdir mnt/unionfs
|
||||
+mount -t unionfs -o dirs=mnt/unionfs=rw:mnt/livecd=ro null mnt/livecd
|
||||
+#-----------------------------------------------------------------------------
|
||||
+
|
||||
#UML=`cat /proc/cpuinfo|grep UML|sed -e 's|model name.*: ||'`
|
||||
#if [ "${UML}" = 'UML' ]
|
||||
#then
|
||||
--- genkernel-3.4.9.orig/x86/modules_load 2008-01-12 02:44:18.000000000 +0300
|
||||
+++ genkernel-3.4.9/x86/modules_load 2008-01-24 17:23:17.000000000 +0300
|
||||
@@ -39,4 +39,8 @@
|
||||
ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs"
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# Calculate hack - добавим unionfs в список импортируемых в initrd модулей
|
||||
+MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs unionfs"
|
||||
+#-----------------------------------------------------------------------------
|
||||
+
|
||||
--- genkernel-3.4.9.orig/x86_64/modules_load 2008-01-12 02:44:17.000000000 +0300
|
||||
+++ genkernel-3.4.9/x86_64/modules_load 2008-01-24 17:23:28.000000000 +0300
|
||||
@@ -39,4 +39,8 @@
|
||||
ohci-hcd usbhid sl811-hcd"
|
||||
|
||||
# Filesystems
|
||||
-MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs"
|
||||
+#-----------------------------------------------------------------------------
|
||||
+# Calculate hack - добавим unionfs в список импортируемых в initrd модулей
|
||||
+MODULES_FS="ext2 ext3 reiserfs jfs nfs xfs unionfs"
|
||||
+#-----------------------------------------------------------------------------
|
||||
+
|
||||
--- genkernel-3.4.9.orig/gen_initramfs.sh 2008-10-27 14:21:08.000000000 +0300
|
||||
+++ genkernel-3.4.9/gen_initramfs.sh 2008-10-27 14:22:16.000000000 +0300
|
||||
@@ -242,7 +242,8 @@
|
||||
}
|
||||
|
||||
append_splash(){
|
||||
- if [ -x /usr/bin/splash_geninitramfs ] || [ -x /sbin/splash_geninitramfs ]
|
||||
+ splash_geninitramfs=`which splash_geninitramfs 2>/dev/null`
|
||||
+ if [ -x "${splash_geninitramfs}" ]
|
||||
then
|
||||
[ -z "${SPLASH_THEME}" ] && [ -e /etc/conf.d/splash ] && source /etc/conf.d/splash
|
||||
[ -z "${SPLASH_THEME}" ] && SPLASH_THEME=default
|
@ -0,0 +1,73 @@
|
||||
# genkernel (8) completion
|
||||
# Copyright 2006 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# Written by Aron Griffis <agriffis@gentoo.org>
|
||||
|
||||
_genkernel()
|
||||
{
|
||||
declare cur prev genkernel_help actions params
|
||||
COMPREPLY=()
|
||||
cur=${COMP_WORDS[COMP_CWORD]}
|
||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
|
||||
# extract initial list of params/actions from genkernel --help
|
||||
genkernel_help=$(command genkernel --help)
|
||||
actions=( $(<<<"$genkernel_help" sed -n \
|
||||
'/^Available Actions:/,/^$/s/^[[:space:]]\+\([^[:space:]]\+\).*/\1/p') )
|
||||
params=( $(<<<"$genkernel_help" egrep -oe '--[^[:space:]]{2,}') )
|
||||
|
||||
# attempt to complete the current parameter based on the list
|
||||
COMPREPLY=($(compgen -W "${params[*]/=*/=} ${actions[*]}" -- "$cur"))
|
||||
|
||||
# if we don't have a rhs to complete
|
||||
if [[ ${#COMPREPLY[@]} -gt 1 ]]; then
|
||||
return
|
||||
elif [[ ${#COMPREPLY[@]} -eq 0 && $cur != --*=* ]]; then
|
||||
return
|
||||
elif [[ ${#COMPREPLY[@]} -eq 1 && $COMPREPLY != --*= ]]; then
|
||||
# using nospace completion, add an explicit space
|
||||
COMPREPLY="${COMPREPLY} "
|
||||
return
|
||||
fi
|
||||
|
||||
# we have a unique lhs and need to complete the rhs
|
||||
declare args lhs rhs
|
||||
if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
|
||||
lhs=$COMPREPLY
|
||||
else
|
||||
lhs=${cur%%=*}=
|
||||
rhs=${cur#*=}
|
||||
fi
|
||||
|
||||
# genkernel's help gives clues as to what belongs on the rhs.
|
||||
# extract the clue for the current parameter
|
||||
args=" ${params[*]} "
|
||||
args="${args##* $lhs}"
|
||||
args="${args%% *}"
|
||||
|
||||
# generate a list of completions for the argument; this replaces args with
|
||||
# an array of results
|
||||
args=( $(case $args in
|
||||
('<0-5>') compgen -W "$(echo {1..5})" -- "$rhs" ;;
|
||||
('<outfile>'|'<file>') compgen -A file -o plusdirs -- "$rhs" ;;
|
||||
('<dir>') compgen -A directory -S / -- "$rhs" ;;
|
||||
('<tbz2>') compgen -G '*.tbz2' -G '*.tar.bz2' -o plusdirs -- "$rhs" ;;
|
||||
(*) compgen -o bashdefault -- "$rhs" ;; # punt
|
||||
esac) )
|
||||
|
||||
# we're using nospace completion to prevent spaces after paths that aren't
|
||||
# "done" yet. So do some hacking to the args to add spaces after
|
||||
# non-directories.
|
||||
declare slash=/
|
||||
args=( "${args[@]/%/ }" ) # add space to all
|
||||
args=( "${args[@]/%$slash /$slash}" ) # remove space from dirs
|
||||
|
||||
# recreate COMPREPLY
|
||||
if [[ $cur == "$lhs"* ]]; then
|
||||
COMPREPLY=( "${args[@]}" )
|
||||
elif [[ ${#args[@]} -gt 0 ]]; then
|
||||
COMPREPLY=( "${args[@]/#/$lhs}" )
|
||||
fi
|
||||
}
|
||||
|
||||
complete -o nospace -F _genkernel genkernel
|
@ -0,0 +1,32 @@
|
||||
DIST calculate-sources-2.6.24.tar.bz2 145392 RMD160 b136727b37dfc7f0ebae09de879b3c1d408e26b1 SHA1 54ebc34f2369d3605890d455cd8b223107a59917 SHA256 b254a035be7fdddd3c4c848f0d387b70cc16bbbb6aa9b0aad48082e27fe2ce7c
|
||||
DIST calculate-sources-2.6.25.tar.bz2 15378 RMD160 1c220ed5802710fa76ace6e58846009b844747b2 SHA1 d8b94ec1d3ef5039edd8aa1fd8327c2e353d9e80 SHA256 be8743cfb7cff4898c24453fc5e5dfb262a24c33c21510f2eb22d5d351f1926f
|
||||
DIST calculate-sources-2.6.26.tar.bz2 118522 RMD160 7b6e3622d43c4a80784ed4b9516604e2fe12b8d8 SHA1 217a34b7ae0b4d4318b663a048ccb83ca413d3f3 SHA256 67e5fc0fecddc2c8af3962c817eea06aea6b4f765e3a5308a912c150fd47b9f4
|
||||
DIST calculate-sources-2.6.27.tar.bz2 91962 RMD160 f63187f2300025f04502d753aa16a841486f85eb SHA1 32923a7dbcb6b895d0a66b00cd4821bbe851ccc1 SHA256 bfaa178724507abf2dfcff2a1f2fff80cca7c25e64248cfbb966cb118738cb26
|
||||
DIST calculate-sources-2.6.28.tar.bz2 73995 RMD160 2845f46fa3304fb045f2c4d59459c7915ff8da19 SHA1 98b4b20e0469f9263403efef70ddd85f0c91b0c8 SHA256 7353953253f7d2b271b659f312519e2362cde1ae27615674d53d791a07a4be28
|
||||
DIST calculate-sources-2.6.29.tar.bz2 89299 RMD160 42a9ae97658bf904ac1d84e7f4f22c3bc60a1635 SHA1 38e0e14dde388a1758dc88cef379e64152ded141 SHA256 edf1dd8c5ede2b932a2f6d7ec7c3ae850a6d62bde0dcec5aa603092e75aa7827
|
||||
DIST calculate-sources-2.6.30.tar.bz2 85042 RMD160 19890fb8b2acb1956c8f60b6a0a1963ffeba60df SHA1 226493cd4c7a21ce7e239ed7b5177fe6dbd98177 SHA256 3a630aec2688adecb12bb635d4697d09c7fb6eb8c88ea431a255c22aa5f5ad2d
|
||||
DIST linux-2.6.24.tar.bz2 46737783 RMD160 0e5194c69c3d82c41ece689c4f84e638f8776d34 SHA1 351aebc784a5395fe4c92d1e514a89680482f7e2 SHA256 413c64fbbcf81244cb5571be4963644a1e81166a2b0f008a016528363b65c5d3
|
||||
DIST linux-2.6.25.tar.bz2 48601689 RMD160 cf3ed52f888fe9df7a93abe4fdc2f598e1ba0ce4 SHA1 aa6187a1c212dd2d8bd906b023fcefdcf711f35e SHA256 108b2a3f2b05c0e57d1d0977619525e46f8d4b425aef4b38b47dcf94292f2dd2
|
||||
DIST linux-2.6.26.tar.bz2 49441874 RMD160 57c37e81afa48e7c05e1a933d390a12ac2921255 SHA1 3f44384bf84f27add3b6c43ec68f974d7f7e9c67 SHA256 666488e2511393fdb901eaf1e67275bcc38ab37c930e8a9adb290a95c1721a2a
|
||||
DIST linux-2.6.27.tar.bz2 50355835 RMD160 5be4595ad824a4af67c1ec0c692838ad0c31f0c0 SHA1 8425ec3be2652f9d511911ff4fcf99039d4574be SHA256 0e99bf9e83f4d1ae0c656741a84dfddfa9c4d2469cf35475f5939d02dc3e4393
|
||||
DIST linux-2.6.28.tar.bz2 52665364 RMD160 47e8925220e29e239f9478228fc53543c1f7b300 SHA1 4f40f8bf3fd110b0cc6e1fea5f539c98f9959e94 SHA256 ae0d97c55efe7fce01273c97f8152af0deff5541e3bbf5b9ad98689112b54380
|
||||
DIST linux-2.6.29.tar.bz2 56579370 RMD160 e0e8c0635665ed34618b04fe1140015a4b6ff806 SHA1 0640a2f4bea3fc272541f322b74ea365ad7f2349 SHA256 58a5ea16d499fe06f90fcbf1d687d1235d2cb9bc28bf979867bd3faadf38fc3f
|
||||
DIST linux-2.6.30.tar.bz2 59435895 RMD160 72219f992c6266dfe78c6d803d0506c9db1e45b8 SHA1 5fb7f2ccdc59c57887d586971a157bee7af324d1 SHA256 d7b9f19b92fd5c693c16cd62f441d051b699f28ec6a175d1b464e58bacd8c78f
|
||||
DIST patch-2.6.24.7.bz2 78117 RMD160 3c38588f5caea2902ae6bd1129a42eb14a0e8c7f SHA1 8daa0107234b6f3649e7577d1c53842306c471be SHA256 b6bbb0dea427aa733c37d58a94b819b523c8649d7605f498348de159380c28a1
|
||||
DIST patch-2.6.25.20.bz2 144933 RMD160 e962382912e6d6ddc64a691be6268ec780298e8f SHA1 53096b5e3b6b26b8504da282b92a5e9eb48f3482 SHA256 c4d69706880f274b84c8f5ef36ce955b3173e6ea3c083f724c0371096b27e738
|
||||
DIST patch-2.6.26.8.bz2 118090 RMD160 7d73a014b5bace732bf480b5a1081fc58083a7c1 SHA1 779612328dab4ed50ebb463ddf8430c586dec11f SHA256 611f7e118b5b09898493eab4c3071771742f2f3826b5733fa2f47284a38fbcf3
|
||||
DIST patch-2.6.27.21.bz2 314006 RMD160 9c5a732052d1231311395a1631e00cc253c10280 SHA1 b87855be728142d4cfaae9b25ec79f0aedb8f54f SHA256 ac48615ffab711edb64d88683aa50b839a2d12303abb6a9bfb21421112309c8c
|
||||
DIST patch-2.6.28.10.bz2 203102 RMD160 b1573d047e4247a5419cb95b2b23d8bd47a41f67 SHA1 61fb49c165a4476f54aa10d74ad445bf3bd66759 SHA256 f4a2f97f59d272571a4977916392628642a8e4388f94417a723dc4bdb0e47dc2
|
||||
DIST patch-2.6.28.9.bz2 173005 RMD160 226641938d0e9bd137b7388a4a015ebfa5216c55 SHA1 80de4c8dba6122fc8dfa5987b617090acf6842e0 SHA256 2d9342ac09e2c69a98ab000ee1313596e2bb9692cbe52ae52c43f913a7a03682
|
||||
DIST patch-2.6.29.5.bz2 114305 RMD160 4f21084b4d09cd5d635645620a5fdf2eff41efb0 SHA1 d7cbe1ab3a016c0123a510e118888d719fb30579 SHA256 39052e484462ef640850a0550c132653711a4091fecbe273f4144fe834ac77d4
|
||||
DIST patch-2.6.29.6.bz2 125142 RMD160 8bffb575e0b66a44c29a47920209b140d5e38d2d SHA1 b6320ec850ba692f5465baddbd7efcc068a5fdb8 SHA256 0294d475cbbc6cf43db25e64b92616309086cad6be4ee463f7f4b1d16d285c27
|
||||
DIST patch-2.6.30.4.bz2 70914 RMD160 d73d4bf563b1f78c66de360f64af815523dc5e92 SHA1 0e2718a98e1c5f9739e42764134a9c2fc0c7ee25 SHA256 b7716971e73c8fa96ecd9cdb598c8bd3a2a946e289cfef5dcfaa11a0022737ce
|
||||
EBUILD calculate-sources-2.6.24.7.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.25.20.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.26.8.ebuild 1077 RMD160 380839e07a357d47319a122c66f30174f7f0704e SHA1 f3aefc167269beca153b081b3e80b8b54eb84245 SHA256 f7cf0393119ccd832e12022ffd8d1d27ed853d6922777945a144bbff8958a1ce
|
||||
EBUILD calculate-sources-2.6.27.21.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.28.10.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.28.9.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.29.5.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.29.6.ebuild 1076 RMD160 5aa65f90fa1b21c675566e17eb40b114a0562ba1 SHA1 5d43faaf7a620f9e3eaaf15281d8ed2bc6d25085 SHA256 77f5c3e677743865753c53111c335474474483248f955e50b5e148a3753fa745
|
||||
EBUILD calculate-sources-2.6.30.4.ebuild 1141 RMD160 85ae16d4c89430e0c3d08433e03aae9ee524381e SHA1 1a8b417572e5e95a938b3325cd6ea46c243e9c43 SHA256 595d4660ee46d55e6f3bf8c1fa8b8f45f785d19030a1918ffc8db86878d25f0c
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
# Copyright 2007 Calculate Pack, http://www.calculate-linux.ru
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ETYPE="sources"
|
||||
|
||||
CALC_VER=""
|
||||
|
||||
KEYWORDS="amd64 x86"
|
||||
HOMEPAGE="http://www.calculate-linux.ru"
|
||||
|
||||
inherit kernel-2
|
||||
detect_version
|
||||
detect_arch
|
||||
|
||||
CKV=$(get_version_component_range 1-3)
|
||||
|
||||
CALC_SUBV=$(get_version_component_range 3-4)
|
||||
|
||||
CALC_K_SUBV=$(get_version_component_range 4)
|
||||
|
||||
KV_FULL="2.6.${CALC_SUBV}-calculate${CALC_VER}"
|
||||
|
||||
[ -z ${CALC_K_SUBV} ] && EXTRAVERSION="-calculate${CALC_VER}" ||
|
||||
EXTRAVERSION=".${CALC_K_SUBV}-calculate${CALC_VER}"
|
||||
UNIPATCH_STRICTORDER=1
|
||||
|
||||
CALC_URI="ftp://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
http://mirror.yandex.ru/calculate/${PN}/${PN}-${CKV}.tar.bz2
|
||||
ftp://ftp.linux.kiev.ua/pub/Linux/Calculate/${PN}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
DESCRIPTION="Full sources including the Calculate patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree"
|
||||
|
||||
SRC_URI="${KERNEL_URI} ${CALC_URI}"
|
||||
|
||||
UNIPATCH_LIST="${DISTDIR}/${PN}-${CKV}.tar.bz2"
|
||||
|
||||
pkg_postinst() {
|
||||
kernel-2_pkg_postinst
|
||||
einfo "For more info on this patchset, and how to report problems, see:"
|
||||
einfo "${HOMEPAGE}"
|
||||
}
|
Loading…
Reference in new issue