relocate all packages with new group names from gentoo

This commit is contained in:
sulincix committed 2022-11-20 07:45:54 +00:00
1 parent 20645c750a
commit e133dbe26f
54 files changed
+42 -40

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
#!/bin/sh
touch /etc/passwd
cat /etc/passwd.d/* | sed "s/#.*//g"| while read line ; do
if [ -z "${line}" ] ; then
: skip empty line
elif ! grep "^${line}$" /etc/passwd > /dev/null ; then
echo "${line}" >> /etc/passwd
fi
done
if [ ! -f /var/lib/ymp/sysconf/base-files/postinstall.done ]; then
mkdir -p /var/lib/ymp/sysconf/base-files/
mkdir /data/user/root -p
mkdir /data/log -p
mkdir -p /kernel/modules
mkdir -p /kernel/firmware
mkdir -p /usr/lib64
mkdir -p /usr/lib32
chown root /data/user/root
chmod 700 /data/user/root
ln -s data/user/root /root
ln -s ../run /var/run
ln -s ../data /data/data
ln -s ../tmp /data/tmp
ln -s ../data/log /var/log
ln -s ../kernel/modules /lib/modules
ln -s ../kernel/firmware /lib/firmare
ln -s ./lib64 /usr/lib
ln -s ./lib32 /usr/libx32
date > /var/lib/ymp/sysconf/base-files/postinstall.done
fi
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
name=base-files
release=1
version=1
url='https://gitlab.com/sulix/devel/sources/base-files'
description='Base system files'
email='parduscix@yandex.ru'
maintainer='sulincix'
license=('GPLv3')
source=("https://gitlab.com/sulix/devel/sources/base-files/-/archive/$version/base-files-$version.zip"
"base-files.sysconf")
md5sums=('1a7f97c99b2ba940d91faade186f4b3f'
'SKIP')
arch=(x86_64)
group=(sys.base)
cd "$name-$version"
package(){
mkdir -p ${DESTDIR}/etc/sysconf.d
make install
install ../base-files.sysconf ${DESTDIR}/etc/sysconf.d/base-files
}
+8
View File
@@ -0,0 +1,8 @@
#!/bin/busybox ash
/bin/busybox mkdir -p /var/lib/ymp/sysconf/busybox/
if /bin/busybox [ ! -f /var/lib/ymp/sysconf/busybox/postinstall.done ] ; then
/bin/busybox --install -s /bin
/bin/busybox install /bin/busybox /bin/su
/bin/busybox chmod u+s /bin/su
/bin/busybox date > /var/lib/ymp/sysconf/busybox.postinst.done
fi
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
name=busybox
version=1.35.0
release=1
url='https://busybox.net'
description='BusyBox is a software suite that provides several Unix utilities in a single executable file.'
email='parduscix@yandex.ru'
maintainer='sulincix'
license=('GPLv3')
arch=(x86_64)
source=("https://busybox.net/downloads/busybox-$version.tar.bz2"
"busybox.sysconf"
)
md5sums=("585949b1dd4292b604b7d199866e9913"
"SKIP"
)
group=(sys.base)
cd $name-$version
setup(){
make defconfig
sed -i "s|.*CONFIG_STATIC_LIBGCC .*|CONFIG_STATIC_LIBGCC=y|" .config
sed -i "s|.*CONFIG_STATIC .*|CONFIG_STATIC=y|" .config
}
build(){
make -j`nproc`
}
package(){
mkdir -p ${DESTDIR}/bin/ ${DESTDIR}/etc/sysconf.d
install busybox ${DESTDIR}/bin/busybox
install ../busybox.sysconf ${DESTDIR}/etc/sysconf.d/busybox
}
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
/sbin/ldconfig
/bin/busybox chmod +x -R /bin
/bin/busybox chmod +x -R /sbin
/bin/busybox chmod +x -R /usr/bin
/bin/busybox chmod +x -R /usr/sbin
+5
View File
@@ -0,0 +1,5 @@
/lib64/sulix
/lib32/sulix
include ld.so.conf.d/*.conf
/lib64
/lib32
+42
View File
@@ -0,0 +1,42 @@
#!/bin/sh
set -e
LOCALEGEN=/etc/locale.gen
LOCALES=/usr/share/i18n/locales
if [ -n "$POSIXLY_CORRECT" ]; then
unset POSIXLY_CORRECT
fi
[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
# Remove all old locale dir and locale-archive before generating new
# locale data.
rm -rf /usr/lib64/locale/locale-archive || true
umask 022
is_entry_ok() {
if [ -n "$locale" -a -n "$charset" ] ; then
true
else
echo "error: Bad entry '$locale $charset'"
false
fi
}
echo "Generating locales..."
while read locale charset; do \
case $locale in \#*) continue;; "") continue;; esac; \
is_entry_ok || continue
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 -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
echo ' done'; \
done < $LOCALEGEN
echo "Generation complete."
+145
View File
@@ -0,0 +1,145 @@
From e47de5cb2d4dbecb58f569ed241e8e95c568f03c Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Fri, 29 Apr 2022 16:37:51 +0200
Subject: [PATCH] Do not use --hash-style=both for building glibc shared
objects
The comment indicates that --hash-style=both was used to maintain
compatibility with static dlopen, but we had many internal ABI
changes since then, so this compatiblity does not add value anymore.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
---
Makeconfig | 9 +++++++++
Makerules | 7 +++++++
config.make.in | 1 +
configure | 28 ++++++++++++++++++++++++++++
configure.ac | 16 ++++++++++++++++
5 files changed, 61 insertions(+)
diff --git b/Makeconfig a/Makeconfig
index 760f14e92f..0aa5fb0099 100644
--- b/Makeconfig
+++ a/Makeconfig
@@ -362,6 +362,15 @@ relro-LDFLAGS = -Wl,-z,relro
LDFLAGS.so += $(relro-LDFLAGS)
LDFLAGS-rtld += $(relro-LDFLAGS)
+ifeq (yes,$(have-hash-style))
+# For the time being we unconditionally use 'both'. At some time we
+# should declare statically linked code as 'out of luck' and compile
+# with --hash-style=gnu only.
+hashstyle-LDFLAGS = -Wl,--hash-style=both
+LDFLAGS.so += $(hashstyle-LDFLAGS)
+LDFLAGS-rtld += $(hashstyle-LDFLAGS)
+endif
+
ifeq (no,$(build-pie-default))
pie-default = $(no-pie-ccflag)
else # build-pie-default
diff --git b/Makerules a/Makerules
index 354528b8c7..428464f092 100644
--- b/Makerules
+++ a/Makerules
@@ -557,6 +557,13 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
-Wl,--verbose 2>/dev/null | \
sed > $@T \
-e '/^=========/,/^=========/!d;/^=========/d' \
+ $(if $(filter yes,$(have-hash-style)), \
+ -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
+ -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
+ -e '/DATA_SEGMENT_ALIGN/{H;g}' \
+ , \
+ -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
+ ) \
-e 's/^.*\*(\.dynbss).*$$/& \
PROVIDE(__start___libc_freeres_ptrs = .); \
*(__libc_freeres_ptrs) \
diff --git b/config.make.in a/config.make.in
index fff4c78dd0..bf728c71c0 100644
--- b/config.make.in
+++ a/config.make.in
@@ -70,6 +70,7 @@ have-libcap = @have_libcap@
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
fno-unit-at-a-time = @fno_unit_at_a_time@
bind-now = @bindnow@
+have-hash-style = @libc_cv_hashstyle@
use-default-link = @use_default_link@
have-cxx-thread_local = @libc_cv_cxx_thread_local@
have-loop-to-function = @libc_cv_cc_loop_to_function@
diff --git b/configure a/configure
index 716dc041b6..5a730dc5fc 100755
--- b/configure
+++ a/configure
@@ -622,6 +622,7 @@ libc_cv_cc_nofma
libc_cv_mtls_dialect_gnu2
fno_unit_at_a_time
libc_cv_has_glob_dat
+libc_cv_hashstyle
libc_cv_fpie
libc_cv_z_execstack
ASFLAGS_config
@@ -6193,6 +6194,33 @@ $as_echo "$libc_cv_fpie" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style option" >&5
+$as_echo_n "checking for --hash-style option... " >&6; }
+if ${libc_cv_hashstyle+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<EOF
+int _start (void) { return 42; }
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
+ -fPIC -shared -o conftest.so conftest.c
+ -Wl,--hash-style=both -nostdlib 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then
+ libc_cv_hashstyle=yes
+else
+ libc_cv_hashstyle=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5
+$as_echo "$libc_cv_hashstyle" >&6; }
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
$as_echo_n "checking for GLOB_DAT reloc... " >&6; }
if ${libc_cv_has_glob_dat+:} false; then :
diff --git b/configure.ac a/configure.ac
index d08ad4d64e..a045f6608e 100644
--- b/configure.ac
+++ a/configure.ac
@@ -1360,6 +1360,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no])
AC_SUBST(libc_cv_fpie)
+AC_CACHE_CHECK(for --hash-style option,
+ libc_cv_hashstyle, [dnl
+cat > conftest.c <<EOF
+int _start (void) { return 42; }
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
+ -fPIC -shared -o conftest.so conftest.c
+ -Wl,--hash-style=both -nostdlib 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_cv_hashstyle=yes
+else
+ libc_cv_hashstyle=no
+fi
+rm -f conftest*])
+AC_SUBST(libc_cv_hashstyle)
+
AC_CACHE_CHECK(for GLOB_DAT reloc,
libc_cv_has_glob_dat, [dnl
cat > conftest.c <<EOF
--
2.37.1
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
export LANG=C
export LC_ALL=C
check(){
file="$1"
echo -en "\033[2K\rChecking: $file"
ldd $file |& grep "not found" | tr -s " " | cut -f1 -d" " | while read missing ; do
echo -en "\033[2K\r"
echo -e "\033[31;1m$file\033[;0m => $missing"
done | sort | uniq
}
find /lib64 /lib32 /lib /usr/lib /usr/lib64 /usr/lib32 -type f |& while read file; do
check $file
done
find /bin /sbin /usr/bin/ /usr/sbin -type f |& while read file; do
check $file
done
echo -en "\033[2K\r"
+4
View File
@@ -0,0 +1,4 @@
/usr/local/lib64
/usr/lib64
/usr/local/lib32
/usr/lib32
+8
View File
@@ -0,0 +1,8 @@
# Debian compability support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
# Debian compability support
/usr/local/lib/i386-linux-gnu
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
+116
View File
@@ -0,0 +1,116 @@
#!/bin/bash
name=glibc
release=1
version=2.36
url='https://gitlab.com/sulinos/devel/ymp'
description='GNU libc library'
email='parduscix@yandex.ru'
maintainer='sulincix'
license=('GPLv3')
arch=(x86_64)
dontstrip="31"
source=('https://ftp.gnu.org/gnu/glibc/glibc-2.36.tar.xz'
'ld.so.conf'
'usr-support.conf'
'x86_64-linux-gnu.conf'
'glibc.sysconf'
'reenable_DT_HASH.patch'
'locale-gen'
'revdep-rebuild'
)
md5sums=('00e9b89e043340f688bc93ec03239b57'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)
uses=(multilib)
group=(sys.base)
export CFLAGS="-O3 ${debug:+-g} -s -mno-tls-direct-seg-refs -mtune=generic -DSULIX"
export CXXFLAGS="-O3 ${debug:+-g} -s -mno-tls-direct-seg-refs -mtune=generic -DSULIX"
cd "$name-$version"
setup(){
# Thx archlinux
patch -Np1 -i "../reenable_DT_HASH.patch"
opts=(
--prefix=/usr
--mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://gitlab.com/sulix/main/issues
--enable-add-ons
--enable-bind-now
--enable-lock-elision
--enable-cet
--enable-multi-arch
--enable-static-pie
--enable-stack-protector=all
--enable-kernel=5.10.0
--enable-stackguard-randomization
--without-selinux
--disable-werror
)
if use multilib ; then
export CC="gcc -m32"
export CXX="g++ -m32"
mkdir glibc32-build
cd glibc32-build
echo "slibdir=/lib32" >> configparms
echo "rtlddir=/lib32" >> configparms
../configure ${opts[@]} \
--host=i686-pc-linux-gnu \
--libdir=/lib32 \
--libexecdir=/lib32/glibc
cd ..
fi
export CC="gcc"
export CXX="g++"
mkdir glibc-build
cd glibc-build
echo "slibdir=/lib64" >> configparms
echo "rtlddir=/lib64" >> configparms
../configure ${opts[@]} \
--host=x86_64-pc-linux-gnu \
--libdir=/lib64 \
--libexecdir=/lib64/glibc
cd ..
}
build(){
for bdir in glibc-build glibc32-build ; do
if [[ -d $bdir ]] ; then
make -C $bdir -O -j`nproc --all`
make -C $bdir info
fi
done
}
package(){
# create symlink lib64 (gentoo compability)
mkdir -p ${DESTDIR}/lib64
ln -s lib64 ${DESTDIR}/lib
if use multilib ; then
mkdir -p ${DESTDIR}/lib32
ln -s lib32 ${DESTDIR}/libx32
fi
for bdir in glibc32-build glibc-build ; do
if [[ -d $bdir ]] ; then
make -C $bdir install -j$(nproc --all)
fi
done
mkdir -p ${DESTDIR}/etc/ld.so.conf.d/ ${DESTDIR}/etc/sysconf.d/ ${DESTDIR}/bin
install ../ld.so.conf ${DESTDIR}/etc/ld.so.conf
install ../usr-support.conf ${DESTDIR}/etc/ld.so.conf.d/
install ../x86_64-linux-gnu.conf ${DESTDIR}/etc/ld.so.conf.d/
# remove ld.so.cache file (this file must generated by ldconfig command from inary)
rm -f ${DESTDIR}/etc/ld.so.cache
# install sysconf trigger
install ../glibc.sysconf ${DESTDIR}/etc/sysconf.d/glibc
# install extra tools
install ../locale-gen ${DESTDIR}/bin/locale-gen
install ../revdep-rebuild ${DESTDIR}/bin/revdep-rebuild
}