diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2003-09-17 08:31:09 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2003-09-17 08:31:09 +0000 |
commit | 0222d3a5af5effaa16607878297f31a6ef36c733 (patch) | |
tree | 21ba6272a67cec830145e0e75c91d84d8f6030ca /sys-libs | |
parent | fixing Manifest (diff) | |
download | historical-0222d3a5af5effaa16607878297f31a6ef36c733.tar.gz historical-0222d3a5af5effaa16607878297f31a6ef36c733.tar.bz2 historical-0222d3a5af5effaa16607878297f31a6ef36c733.zip |
fixed bug #24242
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/nss-mysql/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/nss-mysql/files/digest-nss-mysql-0.43-r1 | 1 | ||||
-rw-r--r-- | sys-libs/nss-mysql/nss-mysql-0.43-r1.ebuild | 120 |
3 files changed, 123 insertions, 2 deletions
diff --git a/sys-libs/nss-mysql/Manifest b/sys-libs/nss-mysql/Manifest index 8e35493af27b..440651beb38c 100644 --- a/sys-libs/nss-mysql/Manifest +++ b/sys-libs/nss-mysql/Manifest @@ -1,7 +1,7 @@ -MD5 d2b801ef460c6f5a5069f653b2751d6f nss-mysql-0.43-r1.ebuild 3890 +MD5 d772afe11fa060fc50e3fc99a41f62c0 nss-mysql-0.43-r1.ebuild 3971 MD5 b7bcaf64bde2965b10596c654a43f086 nss-mysql-0.43.ebuild 3451 MD5 01f3833ac88b50b45f295c17e0d21d9e nss-mysql-0.40.ebuild 3451 -MD5 b54829846fe39c8d52ab649a35785406 ChangeLog 850 +MD5 5dfbcc23aed58827e32705975ce082fc ChangeLog 984 MD5 b8db99e6a0041767a1c380f416aec806 files/digest-nss-mysql-0.43-r1 66 MD5 2b0ba07ff0f49db19b3600a2dc55d8be files/gentoo.sql.nss-mysql-0.40.gentoo 1927 MD5 59a4106196b7eda79f0df359006a6479 files/digest-nss-mysql-0.40 66 diff --git a/sys-libs/nss-mysql/files/digest-nss-mysql-0.43-r1 b/sys-libs/nss-mysql/files/digest-nss-mysql-0.43-r1 new file mode 100644 index 000000000000..6a2420404378 --- /dev/null +++ b/sys-libs/nss-mysql/files/digest-nss-mysql-0.43-r1 @@ -0,0 +1 @@ +MD5 1b3e62509dec0904142a06c58e9b9473 nss-mysql-0.43.tar.gz 209713 diff --git a/sys-libs/nss-mysql/nss-mysql-0.43-r1.ebuild b/sys-libs/nss-mysql/nss-mysql-0.43-r1.ebuild new file mode 100644 index 000000000000..d79f7858037c --- /dev/null +++ b/sys-libs/nss-mysql/nss-mysql-0.43-r1.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/nss-mysql/nss-mysql-0.43-r1.ebuild,v 1.1 2003/09/17 08:30:57 robbat2 Exp $ + +DESCRIPTION="NSS MySQL Module" +HOMEPAGE="http://savannah.gnu.org/projects/${PN}" +SRC_URI="http://savannah.gnu.org/download/${PN}/${PN}.pkg/${PV}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 ~arm ~alpha ~amd64 ~hppa ~mips ~ppc" +IUSE="static" + +DEPEND="virtual/glibc + >=dev-db/mysql-3.23.51-r1" +RDEPEND="${DEPEND} + sys-apps/gzip + sys-apps/sed" + +src_compile() { + use static && myconf="--enable-static" + ./configure ${myconf} \ + --host=${CHOST} \ + --prefix=/usr \ + --infodir=/usr/share/info \ + --sysconfdir=/etc/nss-mysql \ + --libdir=/lib \ + --mandir=/usr/share/man || die "./configure failed" + emake || die +} + +src_install () { + make DESTDIR=${D} install || die + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README SHADOW THANKS TODO UPGRADE sample.sql + newdoc ${FILESDIR}/gentoo.sql.${PN}-0.40.gentoo gentoo.sql +} + +pkg_postinst() { + einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" + einfo "to autosetup nss-mysql and the mysql tables." + einfo "You should then edit your /etc/nsswitch.conf file to activate nss_mysql" + einfo "and suit your intentions. Below is an partial example:" + einfo + einfo "passwd: files mysql" + einfo "shadow: files mysql" + einfo "group: files mysql" +} + +pkg_config() { + local PASS="" + local PAS2="" + echo "In order to continue we'll need to know a MySQL username with enough" + echo "privleges to create databases, mysql-users and grant privleges," + echo "typically a user named root." + echo + echo -n "MySQL-root-user [root]: " + read USERNAME + if [ -z "${USERNAME}" ]; then + USERNAME="root" + fi + echo -n "Is it required to use a password in order to access mysql with ${USERNAME} [Y/n]: " + read NEEDPASS + POPT="-p" + if [ "${NEEDPASS}" == "n" ]; then + POPT="" + fi + cmd="${ROOT}/usr/bin/makepasswd --minchars=10 --maxchars=12 2>/dev/null" + if [ -z "${PASS}" -a -x "${cmd/ *}" ]; then + einfo "makepasswd found for password generation" + PASS=`eval $cmd` + PAS2=`eval $cmd` + fi + cmd="${ROOT}/usr/bin/passook 2>/dev/null" + if [ -z "${PASS}" -a -x "${cmd/ *}" ]; then + einfo "passook found for password generation" + PASS=`eval $cmd` + PAS2=`eval $cmd` + fi + cmd="${ROOT}/bin/dd if=/dev/random bs=32k count=1 2>/dev/null | md5sum | awk '{print \$1}'" + if [ -z "${PASS}" -a -x "${cmd/ *}" ]; then + einfo "Falling back to dd and m5sum..." + PASS=`eval $cmd``eval $cmd` + PAS2=`eval $cmd``eval $cmd` + fi + if [ -z "${PASS}" ]; then + echo ""; + echo "Didn't manage to find a passwd-generator, please type a passwords of your choise"; + echo -n "Shadow-access-password (root-only): "; + read PASS + echo -n "Select-public-info-password: "; + read PAS2 + else + einfo "shadow access password: ${PASS}" + einfo "public access password: ${PAS2}" + fi + if [ -z "${PAS2}" ]; then + PAS2="${RANDOM}${RANDOM}${RANDOM}${RANDOM}" + fi + if [ -z "${PASS}" ]; then + einfo "I will not accept that you leave that the shadow-access-password empty" + die + fi + if [ ! -z "$POPT" ]; then + einfo "Pass the mysql-users \"${USERNAME}\"s password to mysql:"; + echo -n "mysql> " + fi + ( zcat /usr/share/doc/${PF}/gentoo.sql.gz | sed "s/'another_password'/'${PASS}'/g;s/'password'/'${PAS2}'/g" | mysql ${POPT} -u ${USERNAME} ) || die + sed -e "s|shadow.db_password =.*|shadow.db_password = ${PASS};|" -i /etc/nss-mysql/nss-mysql-root.conf + sed -e "s|users.db_password =.*|users.db_password = ${PAS2};|" -i /etc/nss-mysql/nss-mysql.conf + chown -R 0.0 /etc/nss-mysql + chmod 600 /etc/nss-mysql/nss-mysql-root.conf + chmod 644 /etc/nss-mysql/nss-mysql.conf + einfo "nss_mysql-configfiles and mysql-tables should now be setup" + einfo "remember to activate nss-mysql in /etc/nsswitch.conf with someting simillar to:" + einfo + einfo "passwd: files mysql" + einfo "shadow: files mysql" + einfo "group: files mysql" + einfo +} |