* Fix long standing issue with busybox and bash.
* Move retroarch bits to the retroarch package. * Add an upgrade script to autostart that executes after upgrades.
This commit is contained in:
parent
ac505d4305
commit
9e72309447
16 changed files with 144 additions and 117 deletions
|
@ -92,6 +92,18 @@ makeinstall_target() {
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
mkdir -p ${INSTALL}/etc/retroarch-joypad-autoconfig
|
||||||
|
cp -r ${PKG_DIR}/gamepads/* ${INSTALL}/etc/retroarch-joypad-autoconfig
|
||||||
|
|
||||||
|
# Remove unnecesary Retroarch Assets and overlays
|
||||||
|
for i in branding nuklear nxrgui pkg switch wallpapers zarch COPYING; do
|
||||||
|
rm -rf "${INSTALL}/usr/share/retroarch-assets/$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in automatic dot-art flatui neoactive pixel retroactive retrosystem systematic convert.sh NPMApng2PMApng.py; do
|
||||||
|
rm -rf "${INSTALL}/usr/share/retroarch-assets/xmb/$i"
|
||||||
|
done
|
||||||
|
|
||||||
enable_service retroarch.service
|
enable_service retroarch.service
|
||||||
enable_service tmp-cores.mount
|
enable_service tmp-cores.mount
|
||||||
enable_service tmp-joypads.mount
|
enable_service tmp-joypads.mount
|
||||||
|
|
|
@ -79,17 +79,6 @@ makeinstall_target() {
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
# Remove unnecesary Retroarch Assets and overlays
|
|
||||||
for i in branding nuklear nxrgui pkg switch wallpapers zarch COPYING; do
|
|
||||||
rm -rf "${INSTALL}/usr/share/retroarch-assets/$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
for i in automatic dot-art flatui neoactive pixel retroactive retrosystem systematic convert.sh NPMApng2PMApng.py; do
|
|
||||||
rm -rf "${INSTALL}/usr/share/retroarch-assets/xmb/$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p ${INSTALL}/etc/retroarch-joypad-autoconfig
|
|
||||||
cp -r ${PKG_DIR}/gamepads/* ${INSTALL}/etc/retroarch-joypad-autoconfig
|
|
||||||
ln -sf jelos.target ${INSTALL}/usr/lib/systemd/system/default.target
|
ln -sf jelos.target ${INSTALL}/usr/lib/systemd/system/default.target
|
||||||
|
|
||||||
mkdir -p ${INSTALL}/etc/profile.d
|
mkdir -p ${INSTALL}/etc/profile.d
|
||||||
|
@ -109,6 +98,13 @@ post_install() {
|
||||||
chmod -R 0755 ${INSTALL}/usr/lib/autostart ${INSTALL}/usr/bin/autostart
|
chmod -R 0755 ${INSTALL}/usr/lib/autostart ${INSTALL}/usr/bin/autostart
|
||||||
enable_service jelos-autostart.service
|
enable_service jelos-autostart.service
|
||||||
|
|
||||||
|
if [ ! -d "${INSTALL}/usr/share" ]
|
||||||
|
then
|
||||||
|
mkdir "${INSTALL}/usr/share"
|
||||||
|
fi
|
||||||
|
cp ${PKG_DIR}/sources/post-update ${INSTALL}/usr/share
|
||||||
|
chmod 755 ${INSTALL}/usr/share/post-update
|
||||||
|
|
||||||
# Issue banner
|
# Issue banner
|
||||||
cp ${PKG_DIR}/sources/issue ${INSTALL}/etc
|
cp ${PKG_DIR}/sources/issue ${INSTALL}/etc
|
||||||
ln -s /etc/issue ${INSTALL}/etc/motd
|
ln -s /etc/issue ${INSTALL}/etc/motd
|
||||||
|
@ -127,18 +123,4 @@ EOF
|
||||||
cp ${PKG_DIR}/sources/asound/${DEVICE}/* ${INSTALL}/usr/config/
|
cp ${PKG_DIR}/sources/asound/${DEVICE}/* ${INSTALL}/usr/config/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f ${INSTALL}/usr/bin/{sh,bash,busybox,sort}
|
|
||||||
cp $(get_build_dir busybox)/.install_pkg/usr/bin/busybox ${INSTALL}/usr/bin
|
|
||||||
cp $(get_build_dir bash)/.install_pkg/usr/bin/bash ${INSTALL}/usr/bin
|
|
||||||
cp $(get_build_dir coreutils)/.install_pkg/usr/bin/sort ${INSTALL}/usr/bin
|
|
||||||
|
|
||||||
ln -sf bash ${INSTALL}/usr/bin/sh
|
|
||||||
mkdir -p ${INSTALL}/etc
|
|
||||||
echo "/usr/bin/bash" >>${INSTALL}/etc/shells
|
|
||||||
echo "/usr/bin/sh" >>${INSTALL}/etc/shells
|
|
||||||
|
|
||||||
echo "chmod 4755 ${INSTALL}/usr/bin/bash" >> ${FAKEROOT_SCRIPT}
|
|
||||||
echo "chmod 4755 ${INSTALL}/usr/bin/busybox" >> ${FAKEROOT_SCRIPT}
|
|
||||||
find ${INSTALL}/usr/ -type f -iname "*.sh" -exec chmod +x {} \;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,31 +4,17 @@
|
||||||
|
|
||||||
. /etc/profile
|
. /etc/profile
|
||||||
|
|
||||||
### Switch the theme to system-theme if it hasn't already been done
|
|
||||||
|
|
||||||
if [ ! -L /storage/.config/emulationstation/themes/system-theme ]
|
|
||||||
then
|
|
||||||
rm -rf /storage/.config/emulationstation/themes/es-theme-art-book-next
|
|
||||||
mkdir -p /storage/.config/emulationstation/themes
|
|
||||||
ln -s /usr/share/themes/es-theme-art-book-next /storage/.config/emulationstation/themes/system-theme
|
|
||||||
sed -i 's#<string name="ThemeSet" value="es-theme-art-book-next"/>#<string name="ThemeSet" value="system-theme"/>#' /storage/.config/emulationstation/es_settings.cfg
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Resume normal startup stuff.
|
|
||||||
if [ -d "/storage/.config/system/configs" ]
|
if [ -d "/storage/.config/system/configs" ]
|
||||||
then
|
then
|
||||||
EXCLUDE="--exclude=configs"
|
EXCLUDE="--exclude=configs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rsync -a --delete ${EXCLUDE} /usr/config/system/ /storage/.config/system/
|
rsync -a --delete ${EXCLUDE} /usr/config/system/ /storage/.config/system/ &
|
||||||
rsync -a /usr/config/modules /storage/.config/
|
rsync -a /usr/config/modules /storage/.config/ &
|
||||||
rsync -a /usr/config/game /storage/.config/
|
rsync -a /usr/config/game /storage/.config/ &
|
||||||
rsync -a --delete /usr/config/locale/ /storage/.config/emulationstation/locale/
|
rsync -a --delete /usr/config/locale/ /storage/.config/emulationstation/locale/ &
|
||||||
|
|
||||||
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt
|
wait < <(jobs -p)
|
||||||
cp -f /usr/config/ppsspp/PSP/SYSTEM/controls.ini /storage/.config/ppsspp/PSP/SYSTEM/controls.ini
|
|
||||||
cp -f /usr/config/emulationstation/es_input.cfg /storage/.config/emulationstation
|
|
||||||
cp -f /usr/config/emulationstation/es_features.cfg /storage/.config/emulationstation
|
|
||||||
|
|
||||||
if [ ! -L "/storage/.emulationstation" ]
|
if [ ! -L "/storage/.emulationstation" ]
|
||||||
then
|
then
|
||||||
|
|
14
packages/jelos/sources/autostart/common/004-upgrade
Executable file
14
packages/jelos/sources/autostart/common/004-upgrade
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
if [ "$(cat /storage/.config/boot.hint)" = "UPGRADE" ]
|
||||||
|
then
|
||||||
|
if [ -e "/usr/share/post-update" ]
|
||||||
|
then
|
||||||
|
/usr/share/post-update
|
||||||
|
fi
|
||||||
|
rm /storage/.config/boot.hint
|
||||||
|
fi
|
22
packages/jelos/sources/post-update
Normal file
22
packages/jelos/sources/post-update
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
### This script contains items that we only want to execute after a JELOS upgrade.
|
||||||
|
|
||||||
|
### Switch the theme to system-theme if it hasn't already been done
|
||||||
|
if [ ! -L /storage/.config/emulationstation/themes/system-theme ]
|
||||||
|
then
|
||||||
|
rm -rf /storage/.config/emulationstation/themes/es-theme-art-book-next
|
||||||
|
mkdir -p /storage/.config/emulationstation/themes
|
||||||
|
ln -s /usr/share/themes/es-theme-art-book-next /storage/.config/emulationstation/themes/system-theme
|
||||||
|
sed -i 's#<string name="ThemeSet" value="es-theme-art-book-next"/>#<string name="ThemeSet" value="system-theme"/>#' /storage/.config/emulationstation/es_settings.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
### Always update these after an upgrade incase there are necessary changes
|
||||||
|
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt
|
||||||
|
cp -f /usr/config/emulationstation/es_input.cfg /storage/.config/emulationstation
|
||||||
|
cp -f /usr/config/emulationstation/es_features.cfg /storage/.config/emulationstation
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (C) 2016-2020 Team LibreELEC
|
# Copyright (C) 2016-2020 Team LibreELEC
|
||||||
# Copyright (C) 2020-present 351ELEC (https://github.com/351ELEC)
|
# Copyright (C) 2020-present 351ELEC (https://github.com/351ELEC)
|
||||||
|
# Copyright (C) 2022-present Fewtarius
|
||||||
|
|
||||||
PKG_NAME="bash"
|
PKG_NAME="bash"
|
||||||
PKG_VERSION="5.1.16"
|
PKG_VERSION="5.1.16"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="http://www.gnu.org/software/bash/"
|
PKG_SITE="http://www.gnu.org/software/bash/"
|
||||||
PKG_URL="http://ftpmirror.gnu.org/bash/$PKG_NAME-$PKG_VERSION.tar.gz"
|
PKG_URL="http://ftpmirror.gnu.org/bash/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
||||||
PKG_DEPENDS_TARGET="toolchain ncurses readline"
|
PKG_DEPENDS_TARGET="toolchain ncurses readline"
|
||||||
PKG_LONGDESC="The GNU Bourne Again shell."
|
PKG_LONGDESC="The GNU Bourne Again shell."
|
||||||
|
|
||||||
|
@ -14,3 +15,13 @@ PKG_CONFIGURE_OPTS_TARGET="--with-curses \
|
||||||
--enable-readline \
|
--enable-readline \
|
||||||
--without-bash-malloc \
|
--without-bash-malloc \
|
||||||
--with-installed-readline"
|
--with-installed-readline"
|
||||||
|
|
||||||
|
post_install() {
|
||||||
|
ln -sf bash ${INSTALL}/usr/bin/sh
|
||||||
|
mkdir -p ${INSTALL}/etc
|
||||||
|
cat <<EOF >${INSTALL}/etc/shells
|
||||||
|
/usr/bin/bash
|
||||||
|
/usr/bin/sh
|
||||||
|
EOF
|
||||||
|
chmod 4755 ${INSTALL}/usr/bin/bash
|
||||||
|
}
|
||||||
|
|
|
@ -145,8 +145,8 @@ CONFIG_AR=y
|
||||||
CONFIG_FEATURE_AR_LONG_FILENAMES=y
|
CONFIG_FEATURE_AR_LONG_FILENAMES=y
|
||||||
CONFIG_FEATURE_AR_CREATE=y
|
CONFIG_FEATURE_AR_CREATE=y
|
||||||
# CONFIG_UNCOMPRESS is not set
|
# CONFIG_UNCOMPRESS is not set
|
||||||
CONFIG_GUNZIP=y
|
# CONFIG_GUNZIP is not set
|
||||||
CONFIG_ZCAT=y
|
# CONFIG_ZCAT is not set
|
||||||
# CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set
|
# CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set
|
||||||
CONFIG_BUNZIP2=y
|
CONFIG_BUNZIP2=y
|
||||||
CONFIG_BZCAT=y
|
CONFIG_BZCAT=y
|
||||||
|
@ -292,8 +292,8 @@ CONFIG_SEQ=y
|
||||||
# CONFIG_SHUF is not set
|
# CONFIG_SHUF is not set
|
||||||
CONFIG_SLEEP=y
|
CONFIG_SLEEP=y
|
||||||
CONFIG_FEATURE_FANCY_SLEEP=y
|
CONFIG_FEATURE_FANCY_SLEEP=y
|
||||||
CONFIG_SORT=y
|
# CONFIG_SORT is not set
|
||||||
CONFIG_FEATURE_SORT_BIG=y
|
# CONFIG_FEATURE_SORT_BIG is not set
|
||||||
# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set
|
# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set
|
||||||
# CONFIG_SPLIT is not set
|
# CONFIG_SPLIT is not set
|
||||||
# CONFIG_FEATURE_SPLIT_FANCY is not set
|
# CONFIG_FEATURE_SPLIT_FANCY is not set
|
||||||
|
@ -464,9 +464,9 @@ CONFIG_FEATURE_FIND_PATH=y
|
||||||
CONFIG_FEATURE_FIND_REGEX=y
|
CONFIG_FEATURE_FIND_REGEX=y
|
||||||
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
||||||
CONFIG_FEATURE_FIND_LINKS=y
|
CONFIG_FEATURE_FIND_LINKS=y
|
||||||
CONFIG_GREP=n
|
# CONFIG_GREP is not set
|
||||||
CONFIG_EGREP=y
|
# CONFIG_EGREP is not set
|
||||||
CONFIG_FGREP=y
|
# CONFIG_FGREP is not set
|
||||||
CONFIG_FEATURE_GREP_CONTEXT=y
|
CONFIG_FEATURE_GREP_CONTEXT=y
|
||||||
CONFIG_XARGS=y
|
CONFIG_XARGS=y
|
||||||
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
|
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
|
||||||
|
@ -1087,10 +1087,10 @@ CONFIG_SV_DEFAULT_SERVICE_DIR=""
|
||||||
#
|
#
|
||||||
# Shells
|
# Shells
|
||||||
#
|
#
|
||||||
CONFIG_SH_IS_ASH=y
|
# CONFIG_SH_IS_ASH is not set
|
||||||
# CONFIG_SH_IS_HUSH is not set
|
# CONFIG_SH_IS_HUSH is not set
|
||||||
# CONFIG_SH_IS_NONE is not set
|
# CONFIG_SH_IS_NONE is not set
|
||||||
CONFIG_BASH_IS_ASH=y
|
# CONFIG_BASH_IS_ASH is not set
|
||||||
# CONFIG_BASH_IS_HUSH is not set
|
# CONFIG_BASH_IS_HUSH is not set
|
||||||
# CONFIG_BASH_IS_NONE is not set
|
# CONFIG_BASH_IS_NONE is not set
|
||||||
CONFIG_ASH=y
|
CONFIG_ASH=y
|
||||||
|
|
|
@ -62,7 +62,7 @@ pre_build_init() {
|
||||||
|
|
||||||
configure_host() {
|
configure_host() {
|
||||||
cd $PKG_BUILD/.$HOST_NAME
|
cd $PKG_BUILD/.$HOST_NAME
|
||||||
cp $PKG_DIR/config/busybox-host.conf .config
|
cp ${PKG_DIR}/config/busybox-host.conf .config
|
||||||
|
|
||||||
# set install dir
|
# set install dir
|
||||||
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$PKG_BUILD/.install_host\"|" .config
|
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$PKG_BUILD/.install_host\"|" .config
|
||||||
|
@ -76,7 +76,7 @@ configure_target() {
|
||||||
cp $FOUND_PATH .config
|
cp $FOUND_PATH .config
|
||||||
|
|
||||||
# set install dir
|
# set install dir
|
||||||
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$INSTALL/usr\"|" .config
|
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"${INSTALL}/usr\"|" .config
|
||||||
|
|
||||||
if [ ! "$CRON_SUPPORT" = "yes" ] ; then
|
if [ ! "$CRON_SUPPORT" = "yes" ] ; then
|
||||||
sed -i -e "s|^CONFIG_CROND=.*$|# CONFIG_CROND is not set|" .config
|
sed -i -e "s|^CONFIG_CROND=.*$|# CONFIG_CROND is not set|" .config
|
||||||
|
@ -105,7 +105,7 @@ configure_init() {
|
||||||
cp $FOUND_PATH .config
|
cp $FOUND_PATH .config
|
||||||
|
|
||||||
# set install dir
|
# set install dir
|
||||||
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$INSTALL/usr\"|" .config
|
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"${INSTALL}/usr\"|" .config
|
||||||
|
|
||||||
# optimize for size
|
# optimize for size
|
||||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-Os|"`
|
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-Os|"`
|
||||||
|
@ -123,56 +123,56 @@ makeinstall_host() {
|
||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
mkdir -p $INSTALL/usr/bin
|
mkdir -p ${INSTALL}/usr/bin
|
||||||
[ $TARGET_ARCH = x86_64 ] && cp $PKG_DIR/scripts/getedid $INSTALL/usr/bin
|
[ $TARGET_ARCH = x86_64 ] && cp ${PKG_DIR}/scripts/getedid ${INSTALL}/usr/bin
|
||||||
cp $PKG_DIR/scripts/createlog $INSTALL/usr/bin/
|
cp ${PKG_DIR}/scripts/createlog ${INSTALL}/usr/bin/
|
||||||
cp $PKG_DIR/scripts/dtfile $INSTALL/usr/bin
|
cp ${PKG_DIR}/scripts/dtfile ${INSTALL}/usr/bin
|
||||||
cp $PKG_DIR/scripts/dtname $INSTALL/usr/bin
|
cp ${PKG_DIR}/scripts/dtname ${INSTALL}/usr/bin
|
||||||
cp $PKG_DIR/scripts/lsb_release $INSTALL/usr/bin/
|
cp ${PKG_DIR}/scripts/lsb_release ${INSTALL}/usr/bin/
|
||||||
cp $PKG_DIR/scripts/pastebinit $INSTALL/usr/bin/
|
cp ${PKG_DIR}/scripts/pastebinit ${INSTALL}/usr/bin/
|
||||||
ln -sf pastebinit $INSTALL/usr/bin/paste
|
ln -sf pastebinit ${INSTALL}/usr/bin/paste
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/lib/coreelec
|
mkdir -p ${INSTALL}/usr/lib/coreelec
|
||||||
cp $PKG_DIR/scripts/functions $INSTALL/usr/lib/coreelec
|
cp ${PKG_DIR}/scripts/functions ${INSTALL}/usr/lib/coreelec
|
||||||
cp $PKG_DIR/scripts/fs-resize $INSTALL/usr/lib/coreelec
|
cp ${PKG_DIR}/scripts/fs-resize ${INSTALL}/usr/lib/coreelec
|
||||||
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \
|
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \
|
||||||
-i $INSTALL/usr/lib/coreelec/fs-resize
|
-i ${INSTALL}/usr/lib/coreelec/fs-resize
|
||||||
|
|
||||||
if listcontains "${FIRMWARE}" "rpi-eeprom"; then
|
if listcontains "${FIRMWARE}" "rpi-eeprom"; then
|
||||||
cp $PKG_DIR/scripts/rpi-flash-firmware $INSTALL/usr/lib/libreelec
|
cp ${PKG_DIR}/scripts/rpi-flash-firmware ${INSTALL}/usr/lib/libreelec
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $INSTALL/etc
|
mkdir -p ${INSTALL}/etc
|
||||||
cp $PKG_DIR/config/profile $INSTALL/etc
|
cp ${PKG_DIR}/config/profile ${INSTALL}/etc
|
||||||
cp $PKG_DIR/config/inputrc $INSTALL/etc
|
cp ${PKG_DIR}/config/inputrc ${INSTALL}/etc
|
||||||
cp $PKG_DIR/config/httpd.conf $INSTALL/etc
|
cp ${PKG_DIR}/config/httpd.conf ${INSTALL}/etc
|
||||||
cp $PKG_DIR/config/suspend-modules.conf $INSTALL/etc
|
cp ${PKG_DIR}/config/suspend-modules.conf ${INSTALL}/etc
|
||||||
|
|
||||||
# /etc/fstab is needed by...
|
# /etc/fstab is needed by...
|
||||||
touch $INSTALL/etc/fstab
|
touch ${INSTALL}/etc/fstab
|
||||||
|
|
||||||
# /etc/machine-id, needed by systemd and dbus
|
# /etc/machine-id, needed by systemd and dbus
|
||||||
ln -sf /storage/.cache/systemd-machine-id $INSTALL/etc/machine-id
|
ln -sf /storage/.cache/systemd-machine-id ${INSTALL}/etc/machine-id
|
||||||
|
|
||||||
# /etc/mtab is needed by udisks etc...
|
# /etc/mtab is needed by udisks etc...
|
||||||
ln -sf /proc/self/mounts $INSTALL/etc/mtab
|
ln -sf /proc/self/mounts ${INSTALL}/etc/mtab
|
||||||
|
|
||||||
# create /etc/hostname
|
# create /etc/hostname
|
||||||
ln -sf /proc/sys/kernel/hostname $INSTALL/etc/hostname
|
ln -sf /proc/sys/kernel/hostname ${INSTALL}/etc/hostname
|
||||||
|
|
||||||
# add webroot
|
# add webroot
|
||||||
mkdir -p $INSTALL/usr/www
|
mkdir -p ${INSTALL}/usr/www
|
||||||
echo "It works" > $INSTALL/usr/www/index.html
|
echo "It works" > ${INSTALL}/usr/www/index.html
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/www/error
|
mkdir -p ${INSTALL}/usr/www/error
|
||||||
echo "404" > $INSTALL/usr/www/error/404.html
|
echo "404" > ${INSTALL}/usr/www/error/404.html
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
ROOT_PWD="`$TOOLCHAIN/bin/cryptpw -m sha512 $ROOT_PASSWORD`"
|
ROOT_PWD="`$TOOLCHAIN/bin/cryptpw -m sha512 ${ROOT_PASSWORD}`"
|
||||||
|
|
||||||
echo "chmod 4755 $INSTALL/usr/bin/busybox" >> $FAKEROOT_SCRIPT
|
echo "chmod 4755 ${INSTALL}/usr/bin/busybox" >> $FAKEROOT_SCRIPT
|
||||||
echo "chmod 000 $INSTALL/usr/cache/shadow" >> $FAKEROOT_SCRIPT
|
echo "chmod 000 ${INSTALL}/usr/cache/shadow" >> $FAKEROOT_SCRIPT
|
||||||
|
|
||||||
add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh"
|
add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh"
|
||||||
add_group root 0
|
add_group root 0
|
||||||
|
@ -188,36 +188,36 @@ post_install() {
|
||||||
|
|
||||||
# cron support
|
# cron support
|
||||||
if [ "$CRON_SUPPORT" = "yes" ] ; then
|
if [ "$CRON_SUPPORT" = "yes" ] ; then
|
||||||
mkdir -p $INSTALL/usr/lib/systemd/system
|
mkdir -p ${INSTALL}/usr/lib/systemd/system
|
||||||
cp $PKG_DIR/system.d.opt/cron.service $INSTALL/usr/lib/systemd/system
|
cp ${PKG_DIR}/system.d.opt/cron.service ${INSTALL}/usr/lib/systemd/system
|
||||||
enable_service cron.service
|
enable_service cron.service
|
||||||
mkdir -p $INSTALL/usr/share/services
|
mkdir -p ${INSTALL}/usr/share/services
|
||||||
cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services
|
cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services
|
||||||
cp $PKG_DIR/system.d.opt/cron-defaults.service $INSTALL/usr/lib/systemd/system
|
cp ${PKG_DIR}/system.d.opt/cron-defaults.service ${INSTALL}/usr/lib/systemd/system
|
||||||
enable_service cron-defaults.service
|
enable_service cron-defaults.service
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_init() {
|
makeinstall_init() {
|
||||||
mkdir -p $INSTALL/bin
|
mkdir -p ${INSTALL}/bin
|
||||||
ln -sf busybox $INSTALL/usr/bin/sh
|
ln -sf busybox ${INSTALL}/usr/bin/sh
|
||||||
ln -sf busybox $INSTALL/usr/bin/bc
|
ln -sf busybox ${INSTALL}/usr/bin/bc
|
||||||
chmod 4755 $INSTALL/usr/bin/busybox
|
chmod 4755 ${INSTALL}/usr/bin/busybox
|
||||||
|
|
||||||
mkdir -p $INSTALL/etc
|
mkdir -p ${INSTALL}/etc
|
||||||
touch $INSTALL/etc/fstab
|
touch ${INSTALL}/etc/fstab
|
||||||
ln -sf /proc/self/mounts $INSTALL/etc/mtab
|
ln -sf /proc/self/mounts ${INSTALL}/etc/mtab
|
||||||
|
|
||||||
if find_file_path initramfs/platform_init; then
|
if find_file_path initramfs/platform_init; then
|
||||||
cp ${FOUND_PATH} $INSTALL
|
cp ${FOUND_PATH} ${INSTALL}
|
||||||
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \
|
sed -e "s/@BOOT_LABEL@/${DISTRO_BOOTLABEL}/g" \
|
||||||
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \
|
-e "s/@DISK_LABEL@/${DISTRO_DISKLABEL}/g" \
|
||||||
-i $INSTALL/platform_init
|
-i ${INSTALL}/platform_init
|
||||||
chmod 755 $INSTALL/platform_init
|
chmod 755 ${INSTALL}/platform_init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp $PKG_DIR/scripts/functions $INSTALL
|
cp ${PKG_DIR}/scripts/functions ${INSTALL}
|
||||||
cp $PKG_DIR/scripts/init $INSTALL
|
cp ${PKG_DIR}/scripts/init ${INSTALL}
|
||||||
|
|
||||||
if [ -e "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/device.init" ]
|
if [ -e "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/device.init" ]
|
||||||
then
|
then
|
||||||
|
@ -227,8 +227,8 @@ makeinstall_init() {
|
||||||
fi
|
fi
|
||||||
chmod 755 ${INSTALL}/device.init
|
chmod 755 ${INSTALL}/device.init
|
||||||
|
|
||||||
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \
|
sed -e "s/@DISTRONAME@/${DISTRONAME}/g" \
|
||||||
-e "s/@KERNEL_NAME@/$KERNEL_NAME/g" \
|
-e "s/@KERNEL_NAME@/${KERNEL_NAME}/g" \
|
||||||
-i $INSTALL/init
|
-i ${INSTALL}/init
|
||||||
chmod 755 $INSTALL/init
|
chmod 755 ${INSTALL}/init
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,19 +3,18 @@
|
||||||
|
|
||||||
PKG_NAME="coreutils"
|
PKG_NAME="coreutils"
|
||||||
PKG_VERSION="8.31"
|
PKG_VERSION="8.31"
|
||||||
PKG_SHA256="ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd"
|
|
||||||
PKG_LICENSE="GPLv2+"
|
PKG_LICENSE="GPLv2+"
|
||||||
PKG_SITE="https://www.gnu.org/software/coreutils/"
|
PKG_SITE="https://www.gnu.org/software/coreutils/"
|
||||||
PKG_URL="https://ftp.gnu.org/gnu/coreutils/coreutils-$PKG_VERSION.tar.xz"
|
PKG_URL="https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_VERSION}.tar.xz"
|
||||||
PKG_DEPENDS_TARGET="toolchain"
|
PKG_DEPENDS_TARGET="toolchain"
|
||||||
PKG_LONGDESC="The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system."
|
PKG_LONGDESC="The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system."
|
||||||
PKG_TOOLCHAIN="auto"
|
PKG_TOOLCHAIN="auto"
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
mkdir -p $INSTALL/usr/bin
|
mkdir -p ${INSTALL}/usr/bin
|
||||||
cp $PKG_BUILD/.${TARGET_NAME}/src/stdbuf $INSTALL/usr/bin/
|
cp ${PKG_BUILD}/.${TARGET_NAME}/src/stdbuf ${INSTALL}/usr/bin/
|
||||||
cp $PKG_BUILD/.${TARGET_NAME}/src/timeout $INSTALL/usr/bin/
|
cp ${PKG_BUILD}/.${TARGET_NAME}/src/timeout ${INSTALL}/usr/bin/
|
||||||
cp $PKG_BUILD/.${TARGET_NAME}/src/sort $INSTALL/usr/bin/
|
cp ${PKG_BUILD}/.${TARGET_NAME}/src/sort ${INSTALL}/usr/bin/
|
||||||
mkdir -p $INSTALL/usr/lib/coreutils
|
mkdir -p ${INSTALL}/usr/lib/coreutils
|
||||||
cp $PKG_BUILD/.${TARGET_NAME}/src/libstdbuf.so $INSTALL/usr/lib/coreutils/
|
cp ${PKG_BUILD}/.${TARGET_NAME}/src/libstdbuf.so ${INSTALL}/usr/lib/coreutils/
|
||||||
}
|
}
|
||||||
|
|
1
post-update
Symbolic link
1
post-update
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
packages/jelos/sources/post-update
|
Loading…
Reference in a new issue