summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/gxslibc/ChangeLog7
-rw-r--r--sys-libs/gxslibc/Manifest7
-rw-r--r--sys-libs/gxslibc/gxslibc-2.6.1-r2.ebuild239
-rw-r--r--sys-libs/gxslibc/metadata.xml5
4 files changed, 258 insertions, 0 deletions
diff --git a/sys-libs/gxslibc/ChangeLog b/sys-libs/gxslibc/ChangeLog
new file mode 100644
index 000000000000..9fedfcf5ad4d
--- /dev/null
+++ b/sys-libs/gxslibc/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for sys-libs/gxslibc
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/gxslibc/ChangeLog,v 1.1 2008/05/17 11:48:55 pappy Exp $
+
+ 17 May 2008; <pappy@gentoo.org> gxslibc:
+ integrate the gxslibc with the gxs/linux
+ portage profile for Gentoo Linux and GXS
diff --git a/sys-libs/gxslibc/Manifest b/sys-libs/gxslibc/Manifest
new file mode 100644
index 000000000000..9e1765fc4237
--- /dev/null
+++ b/sys-libs/gxslibc/Manifest
@@ -0,0 +1,7 @@
+DIST glibc-2.6.1-gxs-GENTOOPATCHES.patch.gz 829226 RMD160 c1a2586d3698d70d497213762e1b4612a4d2256c SHA1 4b76792d7c02809105252cba0602c8410cabef02 SHA256 3e8f2de55fd181a550da4306f21aa9387d02ee58f6fefe1dd051b5c5b4919b34
+DIST glibc-2.6.1-gxs-LOCALEGEN_NSCD.patch.gz 8354 RMD160 583781b729108718a234f1ea7b38ca84f41728b0 SHA1 c735e59c610e5e994c8543d8e5dfbfd65d2ae987 SHA256 9cfbdc04efe0437c96dd6e1066c27366cb7f17715d2a5cb945fc46ab4a881cb7
+DIST glibc-2.6.1-gxs-ssp.patch.gz 1991 RMD160 98f41ce6e8a3d5bb07364a20cdcd5c5478bd5c84 SHA1 0e46b0b5e5e1355744bd0a22591d1d4d75c71825 SHA256 a9ac48c7243afec0289767c455ee6fa1e0a0e976dbcee850541e1b86ea2f3bd0
+DIST glibc-2.6.1.tar.bz2 15767401 RMD160 a58226e394780a6996d608febf5881134990919e SHA1 85573fee8d79180165e9466a1fc25133b5792190 SHA256 3ded3a3c3ba2cf02d72479a5cc0829c7c261a9d0934e49a79233de9fa276ec22
+EBUILD gxslibc-2.6.1-r2.ebuild 6374 RMD160 d3cf7fe6ec8247229bb5dc806438c3b06104fd16 SHA1 5cff242eb421880f6653ade6e9f613bb7a5d3515 SHA256 2d5a32f8635a22e8e1c21744184f9db86dfaaafbbd508b8e93948ec62185c5e3
+MISC ChangeLog 246 RMD160 f924b5cfbcca0e98847e96c165e07220f73be5f7 SHA1 d3c41c58683f305859a2827477fe9986bc5a6d01 SHA256 3e59539fd59c31f7f407536a25942be4d4b027f310a61a8138fa7585cc743403
+MISC metadata.xml 169 RMD160 823736fb636fd5ec00dafde495974dcede4b52e1 SHA1 2d5df6d9707b05261f4bd015b22858fdfb490c9f SHA256 2d4a1d18ff3a746ef2fb99436fba1ab4da97cc1d39a817929c38aecd0327b310
diff --git a/sys-libs/gxslibc/gxslibc-2.6.1-r2.ebuild b/sys-libs/gxslibc/gxslibc-2.6.1-r2.ebuild
new file mode 100644
index 000000000000..15b970499f2d
--- /dev/null
+++ b/sys-libs/gxslibc/gxslibc-2.6.1-r2.ebuild
@@ -0,0 +1,239 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/gxslibc/gxslibc-2.6.1-r2.ebuild,v 1.1 2008/05/17 11:48:55 pappy Exp $
+
+# the main installation routine and patches
+# from http://www.linuxfromscratch.org/hlfs
+
+DESCRIPTION="The Gentoo Linux Extreme Security version of the GNU libc6"
+
+HOMEPAGE="http://www.gentoo.org/proj/en/extreme-security/"
+
+# currently the only CHOST supported for this ebuild
+WANT_CHOST="i486-pc-linux-gnu"
+
+RELEASE="2.6.1"
+
+KERNELVER="2.6.18"
+
+GNU_MIRROR="ftp://ftp.gnu.org/gnu"
+
+PATCHDIST="http://dev.gentoo.org/~pappy/dist/gxs"
+PATCHPATH="sys-libs/gxslibc/files/${RELEASE}"
+MYPATCHES="glibc-${RELEASE}-gxs-GENTOOPATCHES.patch.gz"
+LOCALEGEN="glibc-${RELEASE}-gxs-LOCALEGEN_NSCD.patch.gz"
+GXSSPATCH="glibc-${RELEASE}-gxs-ssp.patch.gz"
+
+## the default upstream glibc
+SRC_URI="${SRC_URI} ${GNU_MIRROR}/glibc/glibc-${RELEASE}.tar.bz2"
+
+# comment out - already provided by gentoo patches
+# ${GNU_MIRROR}/glibc/glibc-libidn-${RELEASE}.tar.bz2"
+
+## contains a jumbo file with all patches from
+## sys-libs/glibc for this particular glibc setup
+SRC_URI="${SRC_URI} ${PATCHDIST}/${PATCHPATH}/${MYPATCHES}"
+
+## uses locale-gen from sys-libs/glibc
+## which in turn was taken from Debian
+SRC_URI="${SRC_URI} ${PATCHDIST}/${PATCHPATH}/${LOCALEGEN}"
+
+## GXS backport of SSP for >=glibc-2.4
+SRC_URI="${SRC_URI} ${PATCHDIST}/${PATCHPATH}/${GXSSPATCH}"
+
+LICENSE="LGPL-2"
+
+SLOT="1"
+
+# this ebuild only works on ARCH=x86 so far
+# (see CHOST notice above)
+KEYWORDS="~x86"
+
+# nls: not supported (test for -nls)
+# nptl,nptlonly: no linuxthreads
+IUSE="nls nptl nptlonly"
+
+# remove the remaining non-colliding
+# files from the orig sys-libs/glibc
+# package with the following command
+# when finished emerging this glibc:
+#
+# CONFIG_PROTECT="$(echo -n $(equery files sys-libs/gxslibc))" \
+# emerge -C sys-libs/glibc
+#
+# you also need to emerge gentoolkit
+# to run the equery inside the shell
+# command for setting up the env var
+PROVIDE="virtual/libc"
+
+RESTRICT="strip" #46186
+
+# we share a header file with gettext which seems
+# to make net-tools and busybox fail with linking
+# errors regarding to a libintl_gettext not found
+DEPEND=">=sys-devel/binutils-2.15.94
+ >=sys-devel/gcc-config-1.3.12
+ >=app-misc/pax-utils-0.1.10
+ virtual/os-headers
+ >=sys-apps/portage-2.1.2
+ !sys-devel/gettext"
+
+pkg_setup() {
+
+ einfo "checking use flags:-nls, nptl, nptlonly"
+ if (!( (!(use nls)) && (use nptl) && (use nptlonly) ))
+ then
+ eerror "please set USE=-nls to use this ebuild"
+ eerror "and enable nptl and nptlonly USE flags"
+ echo
+ exit 1
+ fi
+
+ einfo "checking CHOST: ${CHOST}"
+
+ if [[ "x${CHOST}y" != "x${WANT_CHOST}y" ]]
+ then
+ ewarn "for using this ebuild you need to have"
+ ewarn "your stage CHOST set to ${WANT_CHOST}"
+ eerror "bailing out: CHOST not compatible with ebuild"
+ exit 1
+ else
+ export CHOST="i486-pc-linux-gnu"
+ fi
+
+ einfo "overriding CFLAGS and CXXFLAGS for ebuild"
+ export CFLAGS="-O2 -pipe -march=i486 -mtune=i686 -fforce-addr -g -ggdb"
+ export CXXFLAGS="${CFLAGS}"
+
+ einfo "clearing CPPFLAGS ASFLAGS LDFLAGS for ebuild"
+ export CPPFLAGS=""
+ export ASFLAGS=""
+ export LDFLAGS=""
+
+ if [[ "x${MAKEOPTS}y" == "xy" ]]
+ then
+ einfo "setting MAKEOPTS for ebuild"
+ export MAKEOPTS="-j4"
+ fi
+
+ einfo "using CHOST:${CHOST}"
+ einfo "using C(XX)FLAGS:${CXXFLAGS}"
+ einfo "using MAKEOPTS:${MAKEOPTS}"
+}
+
+src_compile() {
+
+ cd "${WORKDIR}/glibc-${RELEASE}"
+
+ einfo "adding gentoo glibc patches"
+ patch -p1 --quiet < \
+ "${WORKDIR}/glibc-${RELEASE}-gxs-GENTOOPATCHES.patch" || \
+ die "could not apply gentoo patches"
+
+ einfo "adding localegen utility and nscd files"
+ patch -p1 --quiet < \
+ "${WORKDIR}/glibc-${RELEASE}-gxs-LOCALEGEN_NSCD.patch" || \
+ die "could not apply localegen patch"
+
+ einfo "adding GXS SSP patch"
+ patch -p1 --quiet < \
+ "${WORKDIR}/glibc-${RELEASE}-gxs-ssp.patch" || \
+ die "could not add GXS SSP patch"
+
+ mkdir -p "${WORKDIR}/glibc-build"
+ cd "${WORKDIR}/glibc-build"
+
+ "${WORKDIR}/glibc-${PV}/configure" \
+ --target="${CHOST}" \
+ --prefix=/usr \
+ --enable-bind-now \
+ --without-gd \
+ --disable-profile \
+ --disable-libssp \
+ --disable-nls \
+ --enable-add-ons=nptl,libidn \
+ --without-selinux \
+ --with-tls \
+ --with-__thread \
+ --enable-kernel="${KERNELVER}" \
+ --without-cvs || die "configuration failed"
+
+ make || die "compile failed"
+}
+
+src_install() {
+ cd "${WORKDIR}/glibc-build"
+
+ make install_root="${D}" install || die "make install failed"
+
+ insinto /etc
+
+ local configfiles="${WORKDIR}/glibc-${PV}/gentoo"
+
+ # install the locale-gen helper utility and config file
+ dosbin "${configfiles}/locale/locale-gen" || \
+ die "locale-gen helper script could not be installed"
+
+ doins "${configfiles}/locale/locale.gen" || \
+ die "locale.gen config file could not be installed"
+
+ # install the nscd startup script
+ doinitd "${configfiles}/etc/nscd" || \
+ die "nscd run level startup script could not be installed"
+
+ # install the config files for glibc
+ doins "${configfiles}"/etc/*.conf || \
+ die "glibc config files could not be installed"
+
+ # make sure the localtime is not overwritten by glibc emerges
+ rm "${D}/etc/localtime"
+}
+
+# NOTE: the locales are not in the .tbz2 file of the binpackage
+# NOTE: but will be generated in the postinst routine from here
+pkg_postinst() {
+ # make sure the file exists on the installed system
+ touch "${ROOT}/etc/ld.so.conf"
+
+ # install locales (logic taken from sys-libs/glibc)
+ local locale_list="${ROOT}/etc/locale.gen"
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]]
+ then
+ locale_list="${ROOT}/usr/share/i18n/SUPPORTED"
+ fi
+
+ # find the number of jobs available
+ local x jobs
+ for x in ${MAKEOPTS} ; do [[ "${x}" == -j* ]] && jobs=${x#-j} ; done
+
+ # generate the locales
+ locale-gen -j ${jobs:-2} --config "${locale_list}"
+
+ # set the timezone automatically if not found
+ if [[ ! -f "${ROOT}/etc/localtime" ]]
+ then
+ einfo "timezone not found: setting timezone to UTC"
+ cp --remove-destination \
+ "${ROOT}/usr/share/zoneinfo/UTC" \
+ "${ROOT}/etc/localtime"
+ fi
+
+ einfo "tuning directory and file permissions"
+ chown -v root:root "${ROOT}/etc/locale.gen"
+ chmod -v 0644 "${ROOT}/etc/locale.gen"
+
+ for TDIR in "${ROOT}/" \
+ "${ROOT}/etc"
+ do
+ chown -v root:root "${TDIR}"
+ chmod -v 0755 "${TDIR}"
+ done
+
+ for FILE in "${ROOT}/etc/locale.gen" \
+ "${ROOT}/etc/nscd.conf"
+ do
+ chown -v root:root "${FILE}"
+ chmod -v 0644 "${FILE}"
+ done
+}
+#eof#
diff --git a/sys-libs/gxslibc/metadata.xml b/sys-libs/gxslibc/metadata.xml
new file mode 100644
index 000000000000..a9c084362a62
--- /dev/null
+++ b/sys-libs/gxslibc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>extreme-security</herd>
+</pkgmetadata>