From fbed9470ae18298d136c60571382828b19a2b0bd Mon Sep 17 00:00:00 2001 From: Juan RP <xtraeme@gmail.com> Date: Fri, 25 May 2012 14:55:52 +0200 Subject: [PATCH] New package: eglibc-2.15.1.20120525. --- common/shlibs | 13 ++++ srcpkgs/eglibc-devel | 1 + srcpkgs/eglibc-locales | 1 + srcpkgs/eglibc-nscd | 1 + srcpkgs/eglibc/eglibc-devel.template | 16 +++++ srcpkgs/eglibc/eglibc-locales.INSTALL | 39 ++++++++++++ srcpkgs/eglibc/eglibc-locales.template | 16 +++++ srcpkgs/eglibc/eglibc-nscd.rshlibs | 4 ++ srcpkgs/eglibc/eglibc-nscd.template | 19 ++++++ srcpkgs/eglibc/files/libc-locales | 27 ++++++++ srcpkgs/eglibc/files/nscd.conf | 8 +++ srcpkgs/eglibc/files/nscd.logrotate | 5 ++ srcpkgs/eglibc/files/nscd.service | 11 ++++ srcpkgs/eglibc/files/nscd.socket | 8 +++ srcpkgs/eglibc/files/nscd.tmpfiles.d | 2 + srcpkgs/eglibc/files/nsswitch.conf | 15 +++++ srcpkgs/eglibc/template | 85 ++++++++++++++++++++++++++ 17 files changed, 271 insertions(+) create mode 120000 srcpkgs/eglibc-devel create mode 120000 srcpkgs/eglibc-locales create mode 120000 srcpkgs/eglibc-nscd create mode 100644 srcpkgs/eglibc/eglibc-devel.template create mode 100644 srcpkgs/eglibc/eglibc-locales.INSTALL create mode 100644 srcpkgs/eglibc/eglibc-locales.template create mode 100644 srcpkgs/eglibc/eglibc-nscd.rshlibs create mode 100644 srcpkgs/eglibc/eglibc-nscd.template create mode 100644 srcpkgs/eglibc/files/libc-locales create mode 100644 srcpkgs/eglibc/files/nscd.conf create mode 100644 srcpkgs/eglibc/files/nscd.logrotate create mode 100644 srcpkgs/eglibc/files/nscd.service create mode 100644 srcpkgs/eglibc/files/nscd.socket create mode 100644 srcpkgs/eglibc/files/nscd.tmpfiles.d create mode 100644 srcpkgs/eglibc/files/nsswitch.conf create mode 100644 srcpkgs/eglibc/template diff --git a/common/shlibs b/common/shlibs index cf81e51180..10f92357f0 100644 --- a/common/shlibs +++ b/common/shlibs @@ -36,6 +36,19 @@ libnss_nisplus.so.2 glibc-2.8 libnss_nis.so.2 glibc-2.8 libcrypt.so.1 glibc-2.8 libBrokenLocale.so.1 glibc-2.8 +libc.so.6 eglibc-2.15.1 +libm.so.6 eglibc-2.15.1 +libpthread.so.0 eglibc-2.15.1 +librt.so.1 eglibc-2.15.1 +libdl.so.2 eglibc-2.15.1 +ld-linux-x86-64.so.2 eglibc-2.15.1 x86_64 +ld-linux.so.2 eglibc-2.15.1 i686 +libresolv.so.2 eglibc-2.15.1 +libanl.so.1 eglibc-2.15.1 +libthread_db.so.1 eglibc-2.15.1 +libutil.so.1 eglibc-2.15.1 +libnsl.so.1 eglibc-2.15.1 +libnss_files.so.2 eglibc-2.15.1 libz.so.1 zlib-1.2.3 libbz2.so.1 bzip2-1.0.5 libarchive.so.12 libarchive-3.0.2 diff --git a/srcpkgs/eglibc-devel b/srcpkgs/eglibc-devel new file mode 120000 index 0000000000..b14d590472 --- /dev/null +++ b/srcpkgs/eglibc-devel @@ -0,0 +1 @@ +eglibc \ No newline at end of file diff --git a/srcpkgs/eglibc-locales b/srcpkgs/eglibc-locales new file mode 120000 index 0000000000..b14d590472 --- /dev/null +++ b/srcpkgs/eglibc-locales @@ -0,0 +1 @@ +eglibc \ No newline at end of file diff --git a/srcpkgs/eglibc-nscd b/srcpkgs/eglibc-nscd new file mode 120000 index 0000000000..b14d590472 --- /dev/null +++ b/srcpkgs/eglibc-nscd @@ -0,0 +1 @@ +eglibc \ No newline at end of file diff --git a/srcpkgs/eglibc/eglibc-devel.template b/srcpkgs/eglibc/eglibc-devel.template new file mode 100644 index 0000000000..83021345a7 --- /dev/null +++ b/srcpkgs/eglibc/eglibc-devel.template @@ -0,0 +1,16 @@ +# Template file for 'eglibc-devel'. +# +provides="glibc-devel-${version}" +replaces="glibc-devel>=0" +depends="kernel-libc-headers>=3.3<3.4 eglibc>=$version" +short_desc="${short_desc} (development files)" +long_desc="${long_desc} + + This package contains files for development: headers, static libs, etc." + +do_install() { + vmove usr/include usr + vmove "usr/lib/*.a" usr/lib + vmove "usr/lib/*crt1.o" usr/lib + vmove usr/share/info usr/share +} diff --git a/srcpkgs/eglibc/eglibc-locales.INSTALL b/srcpkgs/eglibc/eglibc-locales.INSTALL new file mode 100644 index 0000000000..44dce6c1af --- /dev/null +++ b/srcpkgs/eglibc/eglibc-locales.INSTALL @@ -0,0 +1,39 @@ +# Rebuild locales set in /etc/default/libc-locales. +# +case "${ACTION}" in +post) + LOCALE_ARCHIVEDIR=usr/lib/locale + LOCALE_ARCHIVE=${LOCALE_ARCHIVEDIR}/locale-archive + LOCALES_CONF=etc/default/libc-locales + LOCALES=usr/share/i18n/locales + LOCALE_ALIAS=usr/share/locale/locale.alias + + [ -n "$POSIXLY_CORRECT" ] && unset POSIXLY_CORRECT + [ -f $LOCALE_ARCHIVE ] && rm -f $LOCALE_ARCHIVE + [ ! -d $LOCALE_ARCHIVEDIR ] && mkdir -p $LOCALE_ARCHIVEDIR + + echo "Generating GNU libc locales..." + while read locale charset; do + case $locale in + \#*) continue;; + "") continue;; + esac + if [ -n "$locale" -a -n "$charset" ]; then + echo -n " $(echo $locale | sed 's/\([^.\@]*\).*/\1/')" + echo -n ".$charset" + echo -n $(echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/') + echo -n '...' + if [ -f $LOCALES/$locale ]; then + input=$locale + else + input=$(echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/') + fi + localedef --prefix=. \ + -i $input -c -f $charset -A $LOCALE_ALIAS $locale + echo ' done.' + else + echo "Ignoring wrong locale: $locale $charset..." + fi + done < $LOCALES_CONF + ;; +esac diff --git a/srcpkgs/eglibc/eglibc-locales.template b/srcpkgs/eglibc/eglibc-locales.template new file mode 100644 index 0000000000..c17ce57461 --- /dev/null +++ b/srcpkgs/eglibc/eglibc-locales.template @@ -0,0 +1,16 @@ +# Template file for 'eglibc-locales'. +# +noarch=yes +provides="glibc-locales-${version}" +replaces="glibc-locales>=0" +conf_files="/etc/default/libc-locales" +short_desc="${short_desc} -- locales" +long_desc="${long_desc} + + This package contains the ${sourcepkg} locale files, for non US users." + +do_install() { + vmove etc/default etc + vmove usr/share/i18n usr/share + vmove usr/share/locale usr/share +} diff --git a/srcpkgs/eglibc/eglibc-nscd.rshlibs b/srcpkgs/eglibc/eglibc-nscd.rshlibs new file mode 100644 index 0000000000..975a2b2b7e --- /dev/null +++ b/srcpkgs/eglibc/eglibc-nscd.rshlibs @@ -0,0 +1,4 @@ +librt.so.1 +libpthread.so.0 +libnsl.so.1 +libc.so.6 diff --git a/srcpkgs/eglibc/eglibc-nscd.template b/srcpkgs/eglibc/eglibc-nscd.template new file mode 100644 index 0000000000..7fcc837dd3 --- /dev/null +++ b/srcpkgs/eglibc/eglibc-nscd.template @@ -0,0 +1,19 @@ +# Template file for 'eglibc-nscd'. +# +provides="nscd-${version}" +replaces="nscd>=0" +systemd_services="nscd.service on" +conf_files="/etc/nscd.conf" +short_desc="Name Service Cache Daemon (EGLIBC)" +long_desc=" + This package contains nscd, a daemon that provides a cache for the + most common name service requests, provided by EGLIBC." + +do_install() { + vmove usr/sbin/nscd usr/sbin + vinstall ${FILESDIR}/nscd.service 644 lib/systemd/system + vinstall ${FILESDIR}/nscd.socket 644 lib/systemd/system + vinstall ${FILESDIR}/nscd.tmpfiles.d 644 usr/lib/tmpfiles.d nscd.conf + vinstall ${FILESDIR}/nscd.conf 644 etc + vinstall ${FILESDIR}/nscd.logrotate 644 etc/logrotate.d nscd +} diff --git a/srcpkgs/eglibc/files/libc-locales b/srcpkgs/eglibc/files/libc-locales new file mode 100644 index 0000000000..934f2d3b08 --- /dev/null +++ b/srcpkgs/eglibc/files/libc-locales @@ -0,0 +1,27 @@ +# +# List of GNU libc locales regenerated by the glibc-locales package. +# All libc locales are available in /usr/share/i18n/locales. +# +# If you add new locales you can regenerate them with: +# ``xbps-bin -f reconfigure glibc-locales´´ +# +# By default we enable de, fr, it, en (US and GB) and es locales +# for ISO-8859-1[5] and UTF-8. +# +en_US ISO-8859-1 +en_US.UTF-8 UTF-8 +en_GB ISO-8859-1 +en_GB.UTF-8 UTF-8 +de_DE ISO-8859-1 +de_DE@euro ISO-8859-15 +de_DE.UTF-8 UTF-8 +it_IT ISO-8859-1 +it_IT@euro ISO-8859-15 +it_IT.UTF-8 UTF-8 +fr_FR ISO-8859-1 +fr_FR@euro ISO-8859-15 +fr_FR.UTF-8 UTF-8 +es_ES ISO-8859-1 +es_ES@euro ISO-8859-15 +es_ES.UTF-8 UTF-8 + diff --git a/srcpkgs/eglibc/files/nscd.conf b/srcpkgs/eglibc/files/nscd.conf new file mode 100644 index 0000000000..4c551dd637 --- /dev/null +++ b/srcpkgs/eglibc/files/nscd.conf @@ -0,0 +1,8 @@ +# Configuration file for nscd(8). +# +logfile /var/log/nscd.log +server-user nobody +enable-cache passwd yes +enable-cache group yes +enable-cache hosts yes +enable-cache services yes diff --git a/srcpkgs/eglibc/files/nscd.logrotate b/srcpkgs/eglibc/files/nscd.logrotate new file mode 100644 index 0000000000..02b289006d --- /dev/null +++ b/srcpkgs/eglibc/files/nscd.logrotate @@ -0,0 +1,5 @@ +/var/log/nscd.log { + sharedscripts + copytruncate + missingok +} diff --git a/srcpkgs/eglibc/files/nscd.service b/srcpkgs/eglibc/files/nscd.service new file mode 100644 index 0000000000..262bb53498 --- /dev/null +++ b/srcpkgs/eglibc/files/nscd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Name Service Cache Daemon + +[Service] +ExecStart=/usr/sbin/nscd -d +ExecStop=/usr/sbin/nscd --shutdown +Restart=always + +[Install] +WantedBy=multi-user.target +Also=nscd.socket diff --git a/srcpkgs/eglibc/files/nscd.socket b/srcpkgs/eglibc/files/nscd.socket new file mode 100644 index 0000000000..9b8da6f39a --- /dev/null +++ b/srcpkgs/eglibc/files/nscd.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Name Service Cache Daemon Socket + +[Socket] +ListenStream=/var/run/nscd/socket + +[Install] +WantedBy=sockets.target diff --git a/srcpkgs/eglibc/files/nscd.tmpfiles.d b/srcpkgs/eglibc/files/nscd.tmpfiles.d new file mode 100644 index 0000000000..b670496349 --- /dev/null +++ b/srcpkgs/eglibc/files/nscd.tmpfiles.d @@ -0,0 +1,2 @@ +d /var/run/nscd 0755 root root - +d /var/db/nscd 0755 root root - diff --git a/srcpkgs/eglibc/files/nsswitch.conf b/srcpkgs/eglibc/files/nsswitch.conf new file mode 100644 index 0000000000..90638a446e --- /dev/null +++ b/srcpkgs/eglibc/files/nsswitch.conf @@ -0,0 +1,15 @@ +# /etc/nsswitch.conf +# +# See nsswitch.conf(5) for information. +# +passwd: files +group: files +shadow: files + +hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 +networks: files + +protocols: files +services: files +ethers: files +rpc: files diff --git a/srcpkgs/eglibc/template b/srcpkgs/eglibc/template new file mode 100644 index 0000000000..72009ccf39 --- /dev/null +++ b/srcpkgs/eglibc/template @@ -0,0 +1,85 @@ +# Template file for 'eglibc' +pkgname=eglibc +_distver="2.15.1" +_datesvn="20120525" +version="${_distver}.${_datesvn}" +wrksrc="eglibc-${_distver}_${_datesvn}" +depends="base-files eglibc-locales>=$version" +makedepends="bison perl" +provides="glibc-${_distver}" +subpackages="eglibc-locales eglibc-devel eglibc-nscd" +nostrip_files="ld-$version.so libc-$version.so libpthread-$version.so libthread_db-1.0.so" +conf_files="/etc/rpc /etc/ld.so.conf /etc/nsswitch.conf" +homepage="http://www.eglibc.org" +short_desc="Embedded GLIBC" +maintainer="Juan RP <xtraeme@gmail.com>" +license="GPL-3, BSD" +distfiles="http://xbps.nopcode.org/distfiles/${pkgname}-${_distver}_${_datesvn}.tar.xz" +checksum=66999ad696cf62077e7b0342987c9bff266e440c9fede4fbdf56043bc8f6a56b +long_desc=" + Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) that is + designed to work well on embedded systems. EGLIBC strives to be source and + binary compatible with GLIBC. EGLIBC's goals include reduced footprint, + configurable components, better support for cross-compilation and cross-testing." + +do_configure() { + mkdir build && cd build + ../configure ${CONFIGURE_SHARED_ARGS} --enable-stackguard-randomization \ + --enable-bind-now --enable-kernel=2.6.27 --enable-multi-arch \ + --without-cvs --without-gd --disable-profile \ + --libdir=/usr/lib --libexecdir=/usr/lib +} + +do_build() { + cd build && make ${makejobs} +} + +do_install() { + # Do not install stuff into lib64 dirs. + vmkdir lib + cd ${DESTDIR} && ln -sf lib lib64 && cd $wrksrc + + # Create DESTDIR/etc/ld.so.conf + vmkdir etc/ld.so.conf.d + echo "include /etc/ld.so.conf.d/*.conf" > ${DESTDIR}/etc/ld.so.conf + + cd build + make install_root=${DESTDIR} install + + # create /etc/default/libc-locales + vinstall ${FILESDIR}/libc-locales 644 etc/default + cp ${wrksrc}/localedata/SUPPORTED ${wrksrc}/build + sed -i -e "s|/| |g" \ + -e 's|\\| |g' \ + -e "s|SUPPORTED-LOCALES=||" \ + -e "s|^|#|g" ${wrksrc}/build/SUPPORTED + cat ${wrksrc}/build/SUPPORTED >> ${DESTDIR}/etc/default/libc-locales + + # ldd is a bash script, so make it run as such. + . $XBPS_HELPERSDIR/replace-interpreter.sh + replace_interpreter bash ${DESTDIR}/usr/bin/ldd + + # On x86_64, add dynamic linker's 32bit version to ldd. + if [ "$XBPS_MACHINE" = "x86_64" ]; then + rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2" + sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \ + ${DESTDIR}/usr/bin/ldd + fi + install -m644 ${FILESDIR}/nsswitch.conf ${DESTDIR}/etc + echo "/usr/local/lib" > ${DESTDIR}/etc/ld.so.conf.d/usr_local.conf + chmod 644 ${DESTDIR}/etc/ld.so.conf.d/usr_local.conf + # Remove unused files. + rm -f ${DESTDIR}/etc/ld.so.cache + rm -f ${DESTDIR}/etc/localtime + rm -f ${DESTDIR}/lib64 + # Remove timezone stuff, provided by tzdata. + rm -f ${DESTDIR}/usr/sbin/zic + rm -f ${DESTDIR}/usr/sbin/zdump + rm -f ${DESTDIR}/usr/bin/tzselect + rm -rf ${DESTDIR}/usr/share/zoneinfo + # Modify some files to not have the same hash than in glibc pkg. + for f in ${conf_files} /etc/ld.so.conf.d/usr_local.conf \ + /usr/lib/gconv/gconv-modules; do + echo "# $pkgname-$version" >> ${DESTDIR}${f} + done +}