Skip to content
Permalink
b7ef5b9c45
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 120 lines (99 sloc) 3.95 KB
#!/bin/env beesh
# BEE_VERSION glibc-2.36-2
#SRCURL[0]="https://ftp.gnu.org/gnu/glibc/glibc-${PKGVERSION}.tar.bz2"
SRCURL[0]="https://beehive.molgen.mpg.de/fa3409fd10d880163231d7a5b060255c/glibc-2.36.tar.bz2"
PATCHURL=(
/src/mariux/patches/glibc-2.33-0001-ldconfig-don-t-generate-links-by-default-v2.patch
/src/mariux/patches/glibc-2.36-0002-ldconfig-don-t-remove-stale-symlinks-by-default.patch
/src/mariux/patches/glibc-linux-Fix-sys-mount.h-usage-with-kernel-headers.patch
/src/mariux/patches/glibc-2.36-0004-tunables-Terminate-if-end-of-input-is-reached-CVE-2023-4911.patch
/src/mariux/patches/glibc-2.36-Makerules-fix-MAKEFLAGS-assignment-for-upcoming-make.patch
)
SYSCONFDIR=/etc
SBINDIR=/usr/sbin
LIBEXECDIR=/usr/lib/glibc
ROOTSBINDIR=/sbin
SLIBDIR=/lib
mee_patch_post() {
# set DL - cut /tools from dynloader in temporary system
DL=$(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
# if not temporary system just set DL to current dynloader
: ${DL:=$(readelf -l /bin/sh | sed -n 's@.*interpret.*\(/lib.*\)]$@\1@p')}
# replace dynloader in test-script..
echo "sed-ing scripts/test-installation.pl - dynloader => ${DL}"
sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" scripts/test-installation.pl
unset DL
# use /bin/bash instead of /bin/sh ..
echo "sed-ing elf/ldd.bash.in"
sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
# fix some binary issues when gzipping manpages..
echo "sed-ing manual/Makefile"
sed -i 's|gzip -9|gzip -n -9|' manual/Makefile
}
mee_configure() {
bee_configure \
--enable-kernel=5.15.77 \
--enable-stack-protector=strong
}
mee_build_pre() {
echo "CFLAGS += -march=x86-64 -mtune=generic" > configparms
echo "slibdir=${SLIBDIR}" >> configparms
echo "rootsbindir=${ROOTSBINDIR}" >> configparms
}
mee_build_post() {
cp -v ${S}/iconvdata/gconv-modules iconvdata
}
mee_check() {
make -k check
}
mee_install_pre() {
# create temporary ld.co.conf to build glibc..
mkdir -p ${D}${SYSCONFDIR}
touch ${D}${SYSCONFDIR}/ld.so.conf
}
mee_install() {
# install.. DESTDIR is called install_root in glibc..
make install install_root=${D}
}
mee_install_post() {
# remove temporary ld.so.* because this is not part of the package
rm -v ${D}${SYSCONFDIR}/ld.so.{conf,cache}
if [ "${SLIBDIR}" != "${LIBDIR}" ] ; then
cd ${D}${SLIBDIR}
for i in * ; do
start_cmd ln -v $i ${D}${LIBDIR}/$i
done
cd -
fi
if [ "${ROOTSBINDIR}" != "${SBINDIR}" ] ; then
cd ${D}${ROOTSBINDIR}
for i in * ; do
start_cmd mv -v $i ${D}${SBINDIR}/$i
start_cmd ln -sv ${SBINDIR}/$i ${D}${ROOTSBINDIR}/$i
done
cd -
fi
# "make install" created (e.g.) /lib64/ld-linux-x86-64.so.2
# we have /lib64 -> /lib , so move the lib and remove the lib64 directory
#
mv $D/lib64/ld-linux-x86-64.so.${PKGVERSION[1]} $D/lib/
rmdir $D/lib64
mkdir -pv ${D}${LIBDIR}/locale
localedef --prefix=${D} -i cs_CZ -f UTF-8 cs_CZ.UTF-8
localedef --prefix=${D} -i de_DE -f ISO-8859-1 de_DE
localedef --prefix=${D} -i de_DE@euro -f ISO-8859-15 de_DE@euro
localedef --prefix=${D} -i de_DE -f UTF-8 de_DE.UTF-8
localedef --prefix=${D} -i en_HK -f ISO-8859-1 en_HK
localedef --prefix=${D} -i en_PH -f ISO-8859-1 en_PH
localedef --prefix=${D} -i en_US -f ISO-8859-1 en_US
localedef --prefix=${D} -i en_US -f UTF-8 en_US.UTF-8
localedef --prefix=${D} -i es_MX -f ISO-8859-1 es_MX
localedef --prefix=${D} -i fa_IR -f UTF-8 fa_IR
localedef --prefix=${D} -i fr_FR -f ISO-8859-1 fr_FR
localedef --prefix=${D} -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
localedef --prefix=${D} -i fr_FR -f UTF-8 fr_FR.UTF-8
localedef --prefix=${D} -i it_IT -f ISO-8859-1 it_IT
localedef --prefix=${D} -i ja_JP -f EUC-JP ja_JP
localedef --prefix=${D} -i tr_TR -f UTF-8 tr_TR.UTF-8
localedef --prefix=${D} -i zh_CN -f GB18030 zh_CN.GB18030
}