From 65ed3f325f15a7ec86f0df66f82b85442c859e9e Mon Sep 17 00:00:00 2001 From: Carsten Lohrke Date: Wed, 14 Jun 2006 18:24:00 +0000 Subject: [PATCH] Fix KDM symlink attack vulnerability, bug #136201. Package-Manager: portage-2.1 --- kde-base/kdebase/ChangeLog | 9 +- .../kdebase/files/digest-kdebase-3.4.3-r2 | 6 + .../kdebase/files/digest-kdebase-3.5.2-r2 | 9 + kde-base/kdebase/kdebase-3.4.3-r2.ebuild | 154 +++++++++++++++ kde-base/kdebase/kdebase-3.5.2-r2.ebuild | 181 ++++++++++++++++++ kde-base/kdm/ChangeLog | 10 +- kde-base/kdm/files/digest-kdm-3.4.3-r2 | 3 + kde-base/kdm/files/digest-kdm-3.5.2-r1 | 6 + kde-base/kdm/files/digest-kdm-3.5.3-r1 | 6 + kde-base/kdm/kdm-3.4.3-r2.ebuild | 74 +++++++ kde-base/kdm/kdm-3.5.2-r1.ebuild | 78 ++++++++ kde-base/kdm/kdm-3.5.3-r1.ebuild | 77 ++++++++ 12 files changed, 611 insertions(+), 2 deletions(-) create mode 100644 kde-base/kdebase/files/digest-kdebase-3.4.3-r2 create mode 100644 kde-base/kdebase/files/digest-kdebase-3.5.2-r2 create mode 100644 kde-base/kdebase/kdebase-3.4.3-r2.ebuild create mode 100644 kde-base/kdebase/kdebase-3.5.2-r2.ebuild create mode 100644 kde-base/kdm/files/digest-kdm-3.4.3-r2 create mode 100644 kde-base/kdm/files/digest-kdm-3.5.2-r1 create mode 100644 kde-base/kdm/files/digest-kdm-3.5.3-r1 create mode 100644 kde-base/kdm/kdm-3.4.3-r2.ebuild create mode 100644 kde-base/kdm/kdm-3.5.2-r1.ebuild create mode 100644 kde-base/kdm/kdm-3.5.3-r1.ebuild diff --git a/kde-base/kdebase/ChangeLog b/kde-base/kdebase/ChangeLog index e847eb830521..4e4eb161848d 100644 --- a/kde-base/kdebase/ChangeLog +++ b/kde-base/kdebase/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for kde-base/kdebase # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/ChangeLog,v 1.285 2006/06/11 15:04:35 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/ChangeLog,v 1.286 2006/06/14 18:23:59 carlo Exp $ + +*kdebase-3.5.2-r2 (14 Jun 2006) +*kdebase-3.4.3-r2 (14 Jun 2006) + + 14 Jun 2006; Carsten Lohrke +kdebase-3.4.3-r2.ebuild, + +kdebase-3.5.2-r2.ebuild: + Fix KDM symlink attack vulnerability, bug #136201. 11 Jun 2006; Carsten Lohrke kdebase-3.5.2-r1.ebuild: Restore keywords. diff --git a/kde-base/kdebase/files/digest-kdebase-3.4.3-r2 b/kde-base/kdebase/files/digest-kdebase-3.4.3-r2 new file mode 100644 index 000000000000..8564f4a82491 --- /dev/null +++ b/kde-base/kdebase/files/digest-kdebase-3.4.3-r2 @@ -0,0 +1,6 @@ +MD5 0437cf2231a850d7a1b47d07daca603f kdebase-3.4.3-kubuntu-hal.patch.gz 8441 +RMD160 9b7fe6198e8d01205ab37f69a72520a233013906 kdebase-3.4.3-kubuntu-hal.patch.gz 8441 +SHA256 9703cf0727fd54a0bf6d404858e44d2d63970ce5a01aa0502e82f3ff842a9dc7 kdebase-3.4.3-kubuntu-hal.patch.gz 8441 +MD5 7b25feba2774c077601d472dae5352c8 kdebase-3.4.3.tar.bz2 22425835 +RMD160 7af02903b0fc750e7b9778391ef8948b54f69ce7 kdebase-3.4.3.tar.bz2 22425835 +SHA256 d7802446a046ed647e5d068b7c4a21cfdb9c883b31de65838f106c5b5d4b8b1c kdebase-3.4.3.tar.bz2 22425835 diff --git a/kde-base/kdebase/files/digest-kdebase-3.5.2-r2 b/kde-base/kdebase/files/digest-kdebase-3.5.2-r2 new file mode 100644 index 000000000000..55c56022e98f --- /dev/null +++ b/kde-base/kdebase/files/digest-kdebase-3.5.2-r2 @@ -0,0 +1,9 @@ +MD5 3e2318954d6f810815147acf0377e1e9 kdebase-3.5-patchset-01.tar.bz2 5552 +RMD160 196f2f57924ccab4109061794d09f579917f4ed1 kdebase-3.5-patchset-01.tar.bz2 5552 +SHA256 10b635594c7936f618abf3a9b41785fb1cb2c2d2a4be5bb889abff518b8e5ee0 kdebase-3.5-patchset-01.tar.bz2 5552 +MD5 9cf154e31d27902925386a9e0b5ef2ea kdebase-3.5.2-patchset.tar.bz2 5578 +RMD160 85656629b35a7aff41e96b1ffa464a38a377c281 kdebase-3.5.2-patchset.tar.bz2 5578 +SHA256 47db65bda783c05d8ede7ba1d598f0fcf92ab365ae2ba44475352eec5c3ba701 kdebase-3.5.2-patchset.tar.bz2 5578 +MD5 c5685e1be34e033286aa1f37002a0552 kdebase-3.5.2.tar.bz2 23590820 +RMD160 216ff59c49bb4fee2aa3b7d976ec40a8cccff107 kdebase-3.5.2.tar.bz2 23590820 +SHA256 21150b7e553e83487e70e70e3d13ce107c6c5d57133b40f413807887a9e431f7 kdebase-3.5.2.tar.bz2 23590820 diff --git a/kde-base/kdebase/kdebase-3.4.3-r2.ebuild b/kde-base/kdebase/kdebase-3.4.3-r2.ebuild new file mode 100644 index 000000000000..303ee10e5ca6 --- /dev/null +++ b/kde-base/kdebase/kdebase-3.4.3-r2.ebuild @@ -0,0 +1,154 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/kdebase-3.4.3-r2.ebuild,v 1.1 2006/06/14 18:24:00 carlo Exp $ + +inherit kde-dist eutils + +DESCRIPTION="KDE base packages: the desktop, panel, window manager, konqueror..." + +SRC_URI="${SRC_URI} mirror://gentoo/kdebase-3.4.3-kubuntu-hal.patch.gz" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ppc ~ppc64 sparc ~x86" +IUSE="arts cups java ldap ieee1394 hal lm_sensors logitech-mouse openexr opengl pam samba ssl" +# hal: enables hal backend for 'media:' ioslave + +DEPEND="arts? ( ~kde-base/arts-${PV} ) + >=media-libs/freetype-2 + media-libs/fontconfig + pam? ( kde-base/kdebase-pam ) + >=dev-libs/cyrus-sasl-2 + ldap? ( >=net-nds/openldap-2 ) + cups? ( net-print/cups ) + ssl? ( dev-libs/openssl ) + opengl? ( virtual/opengl ) + openexr? ( >=media-libs/openexr-1.2 ) + samba? ( >=net-fs/samba-3.0.4 ) + lm_sensors? ( sys-apps/lm_sensors ) + logitech-mouse? ( >=dev-libs/libusb-0.1.10a ) + ieee1394? ( sys-libs/libraw1394 ) + hal? ( sys-apps/dbus + sys-apps/hal )" + +RDEPEND="${DEPEND} + || ( ( + x11-apps/xmessage + x11-apps/xsetroot + x11-apps/xset + x11-apps/xrandr + x11-apps/mkfontdir + || ( x11-misc/xkeyboard-config x11-misc/xkbdata ) + x11-apps/setxkbmap + ) virtual/x11 ) + java? ( >=virtual/jre-1.4 ) + virtual/eject" + +DEPEND="${DEPEND} + dev-util/pkgconfig + ia64? ( >=sys-kernel/linux-headers-2.6.11-r4 )" + +src_unpack() { + kde_src_unpack + + epatch "${FILESDIR}/kdebase-3.4.1-startkde-gentoo.patch" + + # Configure patch. Applied for 3.5. + epatch "${FILESDIR}/kdebase-3.4-configure.patch" + + # Support for hal-0.5, backported from 3.5 branch. + epatch "${WORKDIR}/kdebase-3.4.3-kubuntu-hal.patch" + + # Fix XDMCP (kde bug 114385). Applied for 3.4.4. + epatch "${FILESDIR}/kdebase-3.4.3-xdmcp.patch" + + # Avoid using imake (kde bug 114466). + epatch "${FILESDIR}/kdebase-3.4.3-noimake.patch" + + # Fix KDM symlink vulnerability, bug #136201 + epatch "${FILESDIR}/post-3.5.0-kdebase-kdm.diff" + + # For the configure and noimake patch. + make -f admin/Makefile.common || die +} + +src_compile() { + local myconf="--with-dpms --with-x-binaries-dir=/usr/bin + $(use_with arts) $(use_with ldap) + $(use_with cups) $(use_with opengl gl) + $(use_with ssl) $(use_with samba) $(use_with openexr) + $(use_with lm_sensors sensors) $(use_with logitech-mouse libusb) + $(use_with ieee1394 libraw1394) $(use_with hal)" + + if use pam; then + myconf="${myconf} --with-pam=yes" + else + myconf="${myconf} --with-pam=no --with-shadow" + fi + + # the java test is problematic (see kde bug 100729) and + # useless. All that's needed for java applets to work is + # to have the 'java' executable in PATH. + myconf="${myconf} --without-java" + + kde_src_compile +} + +src_install() { + kde_src_install + cd ${S}/kdm && make DESTDIR=${D} GENKDMCONF_FLAGS="--no-old --no-backup --no-in-notice" install + + # startup and shutdown scripts + insinto ${KDEDIR}/env + doins ${FILESDIR}/agent-startup.sh + + exeinto ${KDEDIR}/shutdown + doexe ${FILESDIR}/agent-shutdown.sh + + # freedesktop environment variables + cat < ${T}/xdg.sh +export XDG_DATA_DIRS="${KDEDIR}/share:/usr/share" +export XDG_CONFIG_DIRS="${KDEDIR}/etc/xdg" +EOF + insinto ${KDEDIR}/env + doins ${T}/xdg.sh + + # x11 session script + cat < ${T}/kde-${SLOT} +#!/bin/sh +exec ${KDEDIR}/bin/startkde +EOF + exeinto /etc/X11/Sessions + doexe ${T}/kde-${SLOT} + + # freedesktop compliant session script + sed -e "s:@KDE_BINDIR@:${KDEDIR}/bin:g;s:Name=KDE:Name=KDE ${SLOT}:" \ + ${S}/kdm/kfrontend/sessions/kde.desktop.in > ${T}/kde-${SLOT}.desktop + insinto /usr/share/xsessions + doins ${T}/kde-${SLOT}.desktop + + # Customize the kdmrc configuration + sed -i -e "s:#SessionsDirs=:SessionsDirs=/usr/share/xsessions\n#SessionsDirs=:" \ + -e "s:#GreetFont=:GreetFont=Sans Serif,24,-1,5,50,0,0,0,0,0\n#GreetFont=:" \ + -e "s:#StdFont=:StdFont=Sans Serif,12,-1,5,50,0,0,0,0,0\n#StdFont=:" \ + -e "s:#FailFont=:FailFont=Sans Serif,12,-1,5,75,0,0,0,0,0\n#FailFont=:" \ + -e "s:#AntiAliasing=:AntiAliasing=true\n#AntiAliasing=:" \ + ${D}/${KDEDIR}/share/config/kdm/kdmrc || die + + rmdir ${D}/${KDEDIR}/share/templates/.source/emptydir +} + +pkg_postinst() { + # set the default kdm face icon if it's not already set by the system admin + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/default1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" + fi + + mkdir -p ${ROOT}${KDEDIR}/share/templates/.source/emptydir + + echo + einfo "To enable gpg-agent and/or ssh-agent in KDE sessions," + einfo "edit ${KDEDIR}/env/agent-startup.sh and" + einfo "${KDEDIR}/shutdown/agent-shutdown.sh" + echo +} diff --git a/kde-base/kdebase/kdebase-3.5.2-r2.ebuild b/kde-base/kdebase/kdebase-3.5.2-r2.ebuild new file mode 100644 index 000000000000..7a7889a05e1a --- /dev/null +++ b/kde-base/kdebase/kdebase-3.5.2-r2.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/kdebase-3.5.2-r2.ebuild,v 1.1 2006/06/14 18:24:00 carlo Exp $ + +inherit kde-dist eutils flag-o-matic + +SRC_URI="${SRC_URI} + mirror://gentoo/kdebase-3.5.2-patchset.tar.bz2 + mirror://gentoo/kdebase-3.5-patchset-01.tar.bz2" + +DESCRIPTION="KDE base packages: the desktop, panel, window manager, konqueror..." + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ppc ~ppc64 sparc ~x86" +IUSE="arts cups java ldap ieee1394 hal lm_sensors logitech-mouse openexr opengl +pam samba ssl zeroconf xcomposite xscreensaver xinerama" +# hal: enables hal backend for 'media:' ioslave + +DEPEND="arts? ( ~kde-base/arts-${PV} ) + >=media-libs/freetype-2 + media-libs/fontconfig + pam? ( kde-base/kdebase-pam ) + >=dev-libs/cyrus-sasl-2 + ldap? ( >=net-nds/openldap-2 ) + cups? ( net-print/cups ) + ssl? ( dev-libs/openssl ) + opengl? ( virtual/opengl ) + openexr? ( >=media-libs/openexr-1.2 ) + samba? ( >=net-fs/samba-3.0.4 ) + lm_sensors? ( sys-apps/lm_sensors ) + logitech-mouse? ( >=dev-libs/libusb-0.1.10a ) + ieee1394? ( sys-libs/libraw1394 ) + hal? ( >=sys-apps/dbus-0.33 + =sys-apps/hal-0.5* + sys-apps/pmount ) + zeroconf? ( net-misc/mDNSResponder ) + xcomposite? ( || ( ( + x11-libs/libXcomposite + x11-libs/libXdamage + ) ${T}/xdg.sh +export XDG_DATA_DIRS="${KDEDIR}/share:/usr/share" +export XDG_CONFIG_DIRS="${KDEDIR}/etc/xdg" +EOF + insinto ${KDEDIR}/env + doins ${T}/xdg.sh + + # x11 session script + cat < ${T}/kde-${SLOT} +#!/bin/sh +exec ${KDEDIR}/bin/startkde +EOF + exeinto /etc/X11/Sessions + doexe ${T}/kde-${SLOT} + + # freedesktop compliant session script + sed -e "s:@KDE_BINDIR@:${KDEDIR}/bin:g;s:Name=KDE:Name=KDE ${SLOT}:" \ + ${S}/kdm/kfrontend/sessions/kde.desktop.in > ${T}/kde-${SLOT}.desktop + insinto /usr/share/xsessions + doins ${T}/kde-${SLOT}.desktop + + # Customize the kdmrc configuration + sed -i -e "s:#SessionsDirs=:SessionsDirs=/usr/share/xsessions\n#SessionsDirs=:" \ + ${D}/${KDEDIR}/share/config/kdm/kdmrc || die + + rmdir ${D}/${KDEDIR}/share/templates/.source/emptydir +} + +pkg_postinst() { + # set the default kdm face icon if it's not already set by the system admin + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/default1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" + fi + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/root.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/root1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/root.face.icon" + fi + + mkdir -p ${ROOT}${KDEDIR}/share/templates/.source/emptydir + + echo + einfo "To enable gpg-agent and/or ssh-agent in KDE sessions," + einfo "edit ${KDEDIR}/env/agent-startup.sh and" + einfo "${KDEDIR}/shutdown/agent-shutdown.sh" + echo +} diff --git a/kde-base/kdm/ChangeLog b/kde-base/kdm/ChangeLog index 5ec8e2c9db2b..bfee3d57e0f6 100644 --- a/kde-base/kdm/ChangeLog +++ b/kde-base/kdm/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for kde-base/kdm # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdm/ChangeLog,v 1.55 2006/06/11 14:59:55 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdm/ChangeLog,v 1.56 2006/06/14 18:20:26 carlo Exp $ + +*kdm-3.5.3-r1 (14 Jun 2006) +*kdm-3.5.2-r1 (14 Jun 2006) +*kdm-3.4.3-r2 (14 Jun 2006) + + 14 Jun 2006; Carsten Lohrke +kdm-3.4.3-r2.ebuild, + +kdm-3.5.2-r1.ebuild, +kdm-3.5.3-r1.ebuild: + Fix KDM symlink attack vulnerability, bug #136201. 11 Jun 2006; Carsten Lohrke kdm-3.5.2.ebuild: Restore keywords. diff --git a/kde-base/kdm/files/digest-kdm-3.4.3-r2 b/kde-base/kdm/files/digest-kdm-3.4.3-r2 new file mode 100644 index 000000000000..4de606d6f395 --- /dev/null +++ b/kde-base/kdm/files/digest-kdm-3.4.3-r2 @@ -0,0 +1,3 @@ +MD5 7b25feba2774c077601d472dae5352c8 kdebase-3.4.3.tar.bz2 22425835 +RMD160 7af02903b0fc750e7b9778391ef8948b54f69ce7 kdebase-3.4.3.tar.bz2 22425835 +SHA256 d7802446a046ed647e5d068b7c4a21cfdb9c883b31de65838f106c5b5d4b8b1c kdebase-3.4.3.tar.bz2 22425835 diff --git a/kde-base/kdm/files/digest-kdm-3.5.2-r1 b/kde-base/kdm/files/digest-kdm-3.5.2-r1 new file mode 100644 index 000000000000..97c2fd5ac603 --- /dev/null +++ b/kde-base/kdm/files/digest-kdm-3.5.2-r1 @@ -0,0 +1,6 @@ +MD5 3e2318954d6f810815147acf0377e1e9 kdebase-3.5-patchset-01.tar.bz2 5552 +RMD160 196f2f57924ccab4109061794d09f579917f4ed1 kdebase-3.5-patchset-01.tar.bz2 5552 +SHA256 10b635594c7936f618abf3a9b41785fb1cb2c2d2a4be5bb889abff518b8e5ee0 kdebase-3.5-patchset-01.tar.bz2 5552 +MD5 c5685e1be34e033286aa1f37002a0552 kdebase-3.5.2.tar.bz2 23590820 +RMD160 216ff59c49bb4fee2aa3b7d976ec40a8cccff107 kdebase-3.5.2.tar.bz2 23590820 +SHA256 21150b7e553e83487e70e70e3d13ce107c6c5d57133b40f413807887a9e431f7 kdebase-3.5.2.tar.bz2 23590820 diff --git a/kde-base/kdm/files/digest-kdm-3.5.3-r1 b/kde-base/kdm/files/digest-kdm-3.5.3-r1 new file mode 100644 index 000000000000..cfd18542a977 --- /dev/null +++ b/kde-base/kdm/files/digest-kdm-3.5.3-r1 @@ -0,0 +1,6 @@ +MD5 71b9ee636bc39514d3d445b7034b7aa7 kdebase-3.5-patchset-02.tar.bz2 7118 +RMD160 ea3c7215e68754e8acac03e9fafea8aa9c6d1202 kdebase-3.5-patchset-02.tar.bz2 7118 +SHA256 459e2ce09a7151fd5f52bf77570dccd2447f00a604dab65adf7dfb5da431ac1b kdebase-3.5-patchset-02.tar.bz2 7118 +MD5 9cb6b8291c4f3f986e16f72129e8fcd0 kdebase-3.5.3.tar.bz2 23634194 +RMD160 ef55c72b97577dd86e5c64bf589ff9b2d556ec07 kdebase-3.5.3.tar.bz2 23634194 +SHA256 5a2b9bc5e2682684519dbae89b3bd73fbf5de1f1effd3ca072173a9638dc3ff8 kdebase-3.5.3.tar.bz2 23634194 diff --git a/kde-base/kdm/kdm-3.4.3-r2.ebuild b/kde-base/kdm/kdm-3.4.3-r2.ebuild new file mode 100644 index 000000000000..75978488ab31 --- /dev/null +++ b/kde-base/kdm/kdm-3.4.3-r2.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdm/kdm-3.4.3-r2.ebuild,v 1.1 2006/06/14 18:20:26 carlo Exp $ + +KMNAME=kdebase +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +DESCRIPTION="KDE login manager, similar to xdm and gdm" +KEYWORDS="~alpha ~amd64 ~ia64 ppc ~ppc64 sparc ~x86" +IUSE="pam" + +KMEXTRA="kdmlib/" +KMEXTRACTONLY="libkonq/konq_defaults.h + kioslave/thumbnail/configure.in.in" # for the HAVE_LIBART test +KMCOMPILEONLY="kcontrol/background" +DEPEND="pam? ( kde-base/kdebase-pam ) + $(deprange $PV $MAXKDEVER kde-base/kcontrol)" + # Requires the desktop background settings and kdm modules, + # so until we separate the kcontrol modules into separate ebuilds :-), + # there's a dep here + +# Fix XDMCP (kde bug 114385). Applied for 3.4.4. +PATCHES="${FILESDIR}/kdebase-3.4.3-xdmcp.patch" + +# Avoid using imake (kde bug 114466). +PATCHES="${PATCHES} ${FILESDIR}/kdebase-3.4.3-noimake.patch" + +# Fix KDM symlink vulnerability, bug #136201 +PATCHES="${PATCHES} $FILESDIR/post-3.5.0-kdebase-kdm.diff" + +src_compile() { + local myconf="--with-x-binaries-dir=/usr/bin" + + if use pam; then + myconf="${myconf} --with-pam=yes" + else + myconf="${myconf} --with-pam=no --with-shadow" + fi + + kde-meta_src_compile myconf configure + kde_remove_flag kdm/kfrontend -fomit-frame-pointer + kde-meta_src_compile make +} + +src_install() { + kde-meta_src_install + cd ${S}/kdm && make DESTDIR=${D} GENKDMCONF_FLAGS="--no-old --no-backup --no-in-notice" install + + # We tell kdm to /use session files from /usr/share/xsessions. + # I've removed some other kdmrc mods from here, since it's not clear why + # the default aren't ok (and I'm not sure about the benefits of using + # the xdm configfiles under /etc/X11 instead of our own ones), + # and it's the Gentoo Way to avoid modifying upstream behaviour. + # Tell me if you don't like this. --danarmak + cd ${D}/${KDEDIR}/share/config/kdm || die + sed -i -e "s:#SessionsDirs=:SessionsDirs=/usr/share/xsessions\n#SessionsDirs=:" \ + -e "s:#GreetFont=:GreetFont=Sans Serif,24,-1,5,50,0,0,0,0,0\n#GreetFont=:" \ + -e "s:#StdFont=:StdFont=Sans Serif,12,-1,5,50,0,0,0,0,0\n#StdFont=:" \ + -e "s:#FailFont=:FailFont=Sans Serif,12,-1,5,75,0,0,0,0,0\n#FailFont=:" \ + -e "s:#AntiAliasing=:AntiAliasing=true\n#AntiAliasing=:" \ + kdmrc +} + +pkg_postinst() { + # set the default kdm face icon if it's not already set by the system admin + # because this is user-overrideable in that way, it's not in src_install + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/default1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" + fi +} diff --git a/kde-base/kdm/kdm-3.5.2-r1.ebuild b/kde-base/kdm/kdm-3.5.2-r1.ebuild new file mode 100644 index 000000000000..cf4aeef37423 --- /dev/null +++ b/kde-base/kdm/kdm-3.5.2-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdm/kdm-3.5.2-r1.ebuild,v 1.1 2006/06/14 18:20:26 carlo Exp $ + +KMNAME=kdebase +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +SRC_URI="${SRC_URI} + mirror://gentoo/kdebase-3.5-patchset-01.tar.bz2" + +DESCRIPTION="KDE login manager, similar to xdm and gdm" +KEYWORDS="~alpha ~amd64 ~ia64 ppc ~ppc64 sparc ~x86 ~x86-fbsd" +IUSE="pam" + +KMEXTRA="kdmlib/" +# kioslave/thumbnail/configure.in.in is to have HAVE_LIBART. Can be dropped on +# 3.5_beta1. +KMEXTRACTONLY="libkonq/konq_defaults.h" +# kioslave/thumbnail/configure.in.in" +KMCOMPILEONLY="kcontrol/background" +DEPEND="pam? ( kde-base/kdebase-pam ) + $(deprange $PV $MAXKDEVER kde-base/kcontrol)" + # Requires the desktop background settings and kdm kcontrol modules +RDEPEND="${DEPEND} + kde-base/kdepasswd" + + +src_unpack() { + kde-meta_src_unpack + + # Avoid using imake (kde bug 114466) + epatch "${WORKDIR}/patches/kdebase-3.5.0_beta2-noimake.patch" + + # Fix KDM symlink vulnerability, bug #136201 + epatch "${FILESDIR}/post-3.5.0-kdebase-kdm.diff" +} + +src_compile() { + local myconf="--with-x-binaries-dir=/usr/bin" + + if use pam; then + myconf="${myconf} --with-pam=yes" + else + myconf="${myconf} --with-pam=no --with-shadow" + fi + + export USER_LDFLAGS="${LDFLAGS}" + + kde-meta_src_compile myconf configure + kde_remove_flag kdm/kfrontend -fomit-frame-pointer + kde-meta_src_compile make +} + +src_install() { + kde-meta_src_install + cd ${S}/kdm && make DESTDIR=${D} GENKDMCONF_FLAGS="--no-old --no-backup --no-in-notice" install + + # Customize the kdmrc configuration + sed -i -e "s:#SessionsDirs=:SessionsDirs=/usr/share/xsessions\n#SessionsDirs=:" \ + ${D}/${KDEDIR}/share/config/kdm/kdmrc || die +} + +pkg_postinst() { + # set the default kdm face icon if it's not already set by the system admin + # because this is user-overrideable in that way, it's not in src_install + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/default1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" + fi + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/root.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/root1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/root.face.icon" + fi +} diff --git a/kde-base/kdm/kdm-3.5.3-r1.ebuild b/kde-base/kdm/kdm-3.5.3-r1.ebuild new file mode 100644 index 000000000000..fbe40149103d --- /dev/null +++ b/kde-base/kdm/kdm-3.5.3-r1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdm/kdm-3.5.3-r1.ebuild,v 1.1 2006/06/14 18:20:26 carlo Exp $ + +KMNAME=kdebase +MAXKDEVER=$PV +KM_DEPRANGE="$PV $MAXKDEVER" +inherit kde-meta eutils + +SRC_URI="${SRC_URI} + mirror://gentoo/kdebase-3.5-patchset-02.tar.bz2" + +DESCRIPTION="KDE login manager, similar to xdm and gdm" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="pam" + +KMEXTRA="kdmlib/" +# kioslave/thumbnail/configure.in.in is to have HAVE_LIBART. Can be dropped on +# 3.5_beta1. +KMEXTRACTONLY="libkonq/konq_defaults.h" +# kioslave/thumbnail/configure.in.in" +KMCOMPILEONLY="kcontrol/background" +DEPEND="pam? ( kde-base/kdebase-pam ) + $(deprange $PV $MAXKDEVER kde-base/kcontrol)" + # Requires the desktop background settings and kdm kcontrol modules +RDEPEND="${DEPEND} + kde-base/kdepasswd" + +src_unpack() { + kde-meta_src_unpack + + # Avoid using imake (kde bug 114466) + epatch "${WORKDIR}/patches/kdebase-3.5.0_beta2-noimake.patch" + + # Fix KDM symlink vulnerability, bug #136201 + epatch "${FILESDIR}/post-3.5.0-kdebase-kdm.diff" +} + +src_compile() { + local myconf="--with-x-binaries-dir=/usr/bin" + + if use pam; then + myconf="${myconf} --with-pam=yes" + else + myconf="${myconf} --with-pam=no --with-shadow" + fi + + export USER_LDFLAGS="${LDFLAGS}" + + kde-meta_src_compile myconf configure + kde_remove_flag kdm/kfrontend -fomit-frame-pointer + kde-meta_src_compile make +} + +src_install() { + kde-meta_src_install + cd ${S}/kdm && make DESTDIR=${D} GENKDMCONF_FLAGS="--no-old --no-backup --no-in-notice" install + + # Customize the kdmrc configuration + sed -i -e "s:#SessionsDirs=:SessionsDirs=/usr/share/xsessions\n#SessionsDirs=:" \ + ${D}/${KDEDIR}/share/config/kdm/kdmrc || die +} + +pkg_postinst() { + # set the default kdm face icon if it's not already set by the system admin + # because this is user-overrideable in that way, it's not in src_install + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/default1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/.default.face.icon" + fi + if [ ! -e "${ROOT}${KDEDIR}/share/apps/kdm/faces/root.face.icon" ]; then + mkdir -p "${ROOT}${KDEDIR}/share/apps/kdm/faces" + cp "${ROOT}${KDEDIR}/share/apps/kdm/pics/users/root1.png" \ + "${ROOT}${KDEDIR}/share/apps/kdm/faces/root.face.icon" + fi +} -- 2.26.2