Skip to content

Commit

Permalink
Move system maintenance service to busybox package
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandmn committed Feb 22, 2021
1 parent 5ac5f9f commit 9c31e6b
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 105 deletions.
25 changes: 19 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,25 @@ gitrel:
git push origin --tags


# Commit and push changes in both versioning systems (SVN and GIT)
revision:
ifneq ($(message),)
$(MAKE) svnrev
$(MAKE) gitrev
else
@printf "\n* Please specify 'message' parameter!\n\n"
exit 1
endif


# Display the help text
help:
echo -e "\
\nSYNOPSIS\n\
make build | install | clean | cleanall | release \n\
make cachestats | viewplan | viewpack | viewbuild\n\
make svnrev | gitrev | gitrel\n\
make help\n\
make build | clean | cleanall | release | install \n\
make cachestats | viewplan | viewpack | viewbuild \n\
make svnrev | gitrev | gitrel | revision \n\
make help \n\
\nDESCRIPTION\n\
Executes one of the make tasks defined through this Makefile flow, according \n\
to the specified DEVICE variable. In case is not defined/exported to the OS \n\
Expand All @@ -163,14 +174,14 @@ help:
build [-e package=<pack>]\n\
build one particular package (and all related dependencies) or \n\
the entire DEVICE distribution\n\
install -e package=<pack> | packages=<list of packs separated by space>]\n\
install one particular package and related dependencies\n\
clean [-e package=<pack> | packages=<list of packs separated by space>]\n\
cleanup one particular package or the entire DEVICE distribution\n\
cleanall\n\
Clean-up all DEVICE distributions, cache and stamps resources as well\n\
release\n\
Build the system release and create OS image for the current DEVICE\n\
install -e package=<pack> | packages=<list of packs separated by space>]\n\
install one particular package and related dependencies\n\
cachestats\n\
Displays cache statistics\n\
viewplan | plan\n\
Expand All @@ -188,6 +199,8 @@ help:
gitrel\n\
Create a new release tag into GitHub versioning repository using current\n\
addon version (defined in the addon descriptor - addon.xml file)\n\
revision\n\
Commit and push project changes in both versioning systems (SVN and GIT)\n\
help\n\
Shows this text\n\
\n\
Expand Down
12 changes: 10 additions & 2 deletions devices/RPi4/config/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,20 @@ hdmi_ignore_cec_init=0
disable_splash=1

# Uncomment to force a specific console size. By default it will be display's size minus overscan.
#framebuffer_width=1280
#framebuffer_height=720
# framebuffer_width=1280
# framebuffer_height=720

# Activate Pi camera (only if is attached to the device)
# start_x=1

################################################################################
# License keys to enable GPU hardware decoding for various codecs
# to obtain keys visit the shop at http://www.raspberrypi.com
################################################################################

# decode_MPG2=0x00000000
# decode_WVC1=0x00000000

################################################################################
# Include distribution specific config file if it exists.
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion packages/abstract/mediacenter/package.csh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PKG_NAME="mediacenter"
PKG_VERSION=""
PKG_URL=""
PKG_DEPENDS_TARGET="toolchain kodi repository.clue skin.clue module.clue service.clue weather.clue webinterface.clue program.slideshow program.search"
PKG_DEPENDS_TARGET="toolchain kodi repository.clue skin.clue module.clue service.clue weather.clue webinterface.clue program.slideshow program.search program.recovery"
PKG_SECTION="abstract"
PKG_DESCRIPTION="Metapackage to install kodi and related packages and addons"

Expand Down
15 changes: 15 additions & 0 deletions packages/addons/program/program.recovery/package.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
PKG_NAME="program.recovery"
PKG_VERSION="2.0.1"
PKG_ARCH="any"
PKG_URL="${DISTRO_ADDONS}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.zip"
PKG_DEPENDS_TARGET="toolchain kodi module.clue"
PKG_SECTION="program"
PKG_DESCRIPTION="Mediacenter System Backup and Restore"
PKG_TOOLCHAIN="manual"


makeinstall_target() {
# deploy resources
mkdir -p $INSTALL/usr/share/kodi/addons/$PKG_NAME
cp -PR $PKG_BUILD/* $INSTALL/usr/share/kodi/addons/$PKG_NAME/
}
35 changes: 0 additions & 35 deletions packages/addons/service/service.clue/oldpackage.csh

This file was deleted.

2 changes: 1 addition & 1 deletion packages/compress/bzip2/package.csh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PKG_NAME="bzip2"
PKG_VERSION="1.0.6"
PKG_SHA256="a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
PKG_URL="${DISTRO_SOURCES}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_URL="ftp://sourceware.org/pub/bzip2/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="gcc:host"
PKG_DEPENDS_TARGET="toolchain"
PKG_DESCRIPTION="A high-quality bzip2 data compressor."
Expand Down
55 changes: 3 additions & 52 deletions packages/network/samba/config/smb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,10 @@
# "strict allocate = yes" breaks large network transfers to external hdd
# Force this to "no" in case "yes" becomes the default in future
strict allocate = no

allocation roundup size = 0

# Using the following configurations as a template allows you to add
# writeable shares of disks and paths under /home

[Update]
path = /home/.update
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /home/.update
# Using the following configurations as a template allows you to add
# writeable shares of disks and paths under /home

[Videos]
path = /home/videos
Expand Down Expand Up @@ -102,30 +93,6 @@
writeable = yes
root preexec = mkdir -p /home/pictures

[Emulators]
path = /home/emulators
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /home/emulators

[Configfiles]
path = /home/.config
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /home/.config

[Userdata]
path = /home/.kodi/userdata
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /home/.kodi/userdata

[Screenshots]
path = /home/screenshots
available = yes
Expand All @@ -134,27 +101,11 @@
writeable = yes
root preexec = mkdir -p /home/screenshots

[Logfiles]
path = /home/logfiles
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /home/logfiles
root preexec = createlog

[Backup]
path = /home/backup
available = yes
browseable = yes
public = yes
writeable = yes
writeable = no
root preexec = mkdir -p /home/backup

[Picons]
path = /home/picons
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /home/picons/tvh /home/picons/vdr
2 changes: 1 addition & 1 deletion packages/network/samba/default.d/samba.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SAMBA_AUTOSHARE="true"
SAMBA_USERNAME="root"
SAMBA_USERNAME="admin"
SAMBA_PASSWORD="clue"
SAMBA_SECURE="false"
SAMBA_MINPROTOCOL="SMB2"
Expand Down
4 changes: 4 additions & 0 deletions packages/system/busybox/package.csh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ makeinstall_target() {
mkdir -p $INSTALL/usr/lib/clue
cp $PKG_DIR/scripts/functions $INSTALL/usr/lib/clue
cp $PKG_DIR/scripts/fs-resize $INSTALL/usr/lib/clue
cp $PKG_DIR/scripts/backup-restore $INSTALL/usr/lib/clue
cp $PKG_DIR/scripts/factory-reset $INSTALL/usr/lib/clue
sed -e "s/@DISTRO_NAME@/$DISTRO_NAME/g" \
-i $INSTALL/usr/lib/clue/fs-resize

Expand Down Expand Up @@ -171,6 +173,8 @@ post_install() {
enable_service welcome.service
enable_service var.mount
enable_service fs-resize.service
enable_service backup-restore.service
enable_service factory-reset.service
listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service boot-firmware.service

# cron support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ show_reset_msg() {
echo ""
}

if [ -f /home/.cache/reset_oe ]; then
if [ -f /home/.cache/reset_clue ]; then
# hard reset
rm -f /home/.cache/reset_oe
rm -f /home/.cache/reset_clue
get_target
if [ ! -z $target ]; then
show_reset_msg
Expand All @@ -62,9 +62,9 @@ if [ -f /home/.cache/reset_oe ]; then
echo
StartProgress countdown "Rebooting in 5s... " 5 "NOW"
fi
elif [ -f /home/.cache/reset_xbmc ]; then
elif [ -f /home/.cache/reset_kodi ]; then
# soft reset
rm -f /home/.cache/reset_xbmc
rm -f /home/.cache/reset_kodi
get_target
if [ ! -z $target ]; then
show_reset_msg
Expand Down
2 changes: 1 addition & 1 deletion packages/system/busybox/scripts/init
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ BACKUP_FILE=$(ls -1 /sysroot/home/.restore/??????????????.tar 2>/dev/null | head

if [ -f /sysroot/home/.please_resize_me ]; then
INIT_UNIT="--unit=fs-resize.target"
elif [ -f /sysroot/home/.cache/reset_oe -o -f /sysroot/home/.cache/reset_xbmc ]; then
elif [ -f /sysroot/home/.cache/reset_clue -o -f /sysroot/home/.cache/reset_kodi ]; then
INIT_UNIT="--unit=factory-reset.target"
elif [ -f "$BACKUP_FILE" ]; then
INIT_UNIT="--unit=backup-restore.target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ hdmi_ignore_cec_init=0
disable_splash=1

# Uncomment to force a specific console size. By default it will be display's size minus overscan.
#framebuffer_width=1280
#framebuffer_height=720
# framebuffer_width=1280
# framebuffer_height=720

# Activate Pi camera (only if is attached to the device)
# start_x=1
Expand Down

0 comments on commit 9c31e6b

Please sign in to comment.