diff --git a/envsetup.sh b/envsetup.sh index 64d491f..e42ea99 100755 --- a/envsetup.sh +++ b/envsetup.sh @@ -45,10 +45,11 @@ while (("$#" >= 1)); do --kde) echo "${DOCKER_BUILD_CONTAINER_NAME_KDE}" > $TOOL_TEMP/docker001;; --pkgrel-bump) echo 'TOOL_SKIPBUMP=false' > $TOOL_TEMP/envvar001;; --mkiso) export intended && iso_variant_selector;; - --mkiso-clean-cli) intended && make_clean_iso;; + --mkiso-clean-cli) intended && make_cli_clean_iso;; --mkiso-plasma-clean-cli) intended && make_plasma_clean_iso;; # Create LiveOS env with plasma desktop --leave-tmp) echo 'true' > $TOOL_TEMP/.keep_tmp;; # This will be used by docker builder only ( keep away from help menu ) -c|--clean) TOOL_CLEAN=true;; + --repo-update) echo "WIP" ;; -d|--docker) if [ $# -eq 1 ]; then msg_error "Docker option cant be used alone ( need to be first arg! )" diff --git a/load_modules.sh b/load_modules.sh index 56e11c6..3f49a96 100755 --- a/load_modules.sh +++ b/load_modules.sh @@ -73,6 +73,10 @@ loading "Docker functions..." source $P_ROOT/build/toolset/shell/modules/docker_modules.sh loaded "Docker functions" +loading "Repo update system functions" +source $P_ROOT/build/toolset/shell/modules/repo_modules.sh +loaded "Repo update system functions" + # Feed the scriptlet main arch export ARCH=$(cat $TOOL_TEMP/is_arch) diff --git a/shell/iso_modules/cli_main.sh b/shell/iso_modules/cli_main.sh index a37f715..8c56732 100644 --- a/shell/iso_modules/cli_main.sh +++ b/shell/iso_modules/cli_main.sh @@ -13,6 +13,34 @@ make_cli_rootfs() { # Now clean up some firmware files that wont be needed for installation in x86_64 env as_root rm -rf $ISO_ROOT/rootfs/system/lib/firmware/{netronome,qcom,mellanox,qca} + + set +e + + # Now clean up some firmware files that wont be needed for installation in x86_64 env + as_root rm -rf $ISO_ROOT/rootfs/system/lib/firmware/{netronome,qcom,mellanox,qca} + + # Same for other things + as_root rm -rf $ISO_ROOT/rootfs/system/var/cache/bottle/pkg/* + as_root rm -rf $ISO_ROOT/rootfs/system/include/ + as_root rm -rf $ISO_ROOT/rootfs/system/usr/include + as_root rm -rf $ISO_ROOT/rootfs/system/usr/scr + as_root rm -rf $ISO_ROOT/rootfs/system/usr/libexec/gcc + as_root rm -rf $ISO_ROOT/rootfs/system/usr/lib*/lib*.a + as_root rm -rf $ISO_ROOT/rootfs/system/usr/lib*/lib*.la + as_root rm -rf $ISO_ROOT/rootfs/system/usr/lib*/*/lib*.a + as_root rm -rf $ISO_ROOT/rootfs/system/usr/lib*/*/lib*.la + as_root rm -rf $ISO_ROOT/rootfs/system/usr/lib/lib*.a + + # Firmware + as_root mv $ISO_ROOT/rootfs/system/lib/firmware/{amd,amdgpu,nvidia} $ISO_ROOT/rootfs/system + as_root rm -rf $ISO_ROOT/rootfs/system/lib/firmware/* + as_root mv $ISO_ROOT/rootfs/system/{amd,amdgpu,nvidia} $ISO_ROOT/rootfs/system/lib/firmware/ + + # strip + as_root strip --strip-unneeded $ISO_ROOT/rootfs/system/usr/bin/* &> /dev/null + as_root strip --strip-unneeded $ISO_ROOT/rootfs/system/usr/lib*/*.so &> /dev/null + + set -e } # Start from scratch and delete old files diff --git a/shell/modules/pkg_build.sh b/shell/modules/pkg_build.sh index 114caa0..0bd9b00 100644 --- a/shell/modules/pkg_build.sh +++ b/shell/modules/pkg_build.sh @@ -165,13 +165,13 @@ build_pkg_docker() { docker_user_run_cmd $DOCKER_BUILD_CONTAINER_NAME_KDE "cd ~/$TOOL_MAIN_NAME && ./envsetup --leave-tmp -b ${PKG_NAME}" # Reset the container - docker_build_kde_reset + #docker_build_kde_reset else msg_debug "Using build container" docker_user_run_cmd $DOCKER_BUILD_CONTAINER_NAME "cd ~/$TOOL_MAIN_NAME && ./envsetup --leave-tmp -b ${PKG_NAME}" # Reset the container - docker_build_base_reset + #docker_build_base_reset fi rm -f $TOOL_TEMP/builds $TOOL_TEMP/.builder_locked diff --git a/shell/modules/repo_modules.sh b/shell/modules/repo_modules.sh new file mode 100644 index 0000000..fd9ecd8 --- /dev/null +++ b/shell/modules/repo_modules.sh @@ -0,0 +1,19 @@ +## +# Load all pieces of repo system moudles here +## + +# Load global functions that are used by beelow modules +source $P_ROOT/build/toolset/shell/modules/repo_updater/repo_common.sh +loaded " repo -> common functions" + +# Functions to update local repositories +source $P_ROOT/build/toolset/shell/modules/repo_updater/repo_update.sh +loaded " repo -> update functions" + +# Functions to push local repository to server +source $P_ROOT/build/toolset/shell/modules/repo_updater/repo_push.sh +loaded " repo -> push functions" + +# Functions from all modules to make one working big function out of +source $P_ROOT/build/toolset/shell/modules/repo_updater/repo_system.sh +loaded " repo -> system functions" diff --git a/shell/modules/repo_updater/repo_common.sh b/shell/modules/repo_updater/repo_common.sh new file mode 100644 index 0000000..8a8707e --- /dev/null +++ b/shell/modules/repo_updater/repo_common.sh @@ -0,0 +1,7 @@ +## +# Here will be the common functions that are used by other repo modules +## + +repo_fail_if_docker() { + echo "Fail" +} diff --git a/shell/modules/repo_updater/repo_push.sh b/shell/modules/repo_updater/repo_push.sh new file mode 100644 index 0000000..a538cf1 --- /dev/null +++ b/shell/modules/repo_updater/repo_push.sh @@ -0,0 +1,3 @@ +## +# Repo push functions and failsafes +## diff --git a/shell/modules/repo_updater/repo_system.sh b/shell/modules/repo_updater/repo_system.sh new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/shell/modules/repo_updater/repo_system.sh @@ -0,0 +1 @@ + diff --git a/shell/modules/repo_updater/repo_update.sh b/shell/modules/repo_updater/repo_update.sh new file mode 100644 index 0000000..0647a8c --- /dev/null +++ b/shell/modules/repo_updater/repo_update.sh @@ -0,0 +1,3 @@ +## +# Repo updater functions +## diff --git a/shell/modules/variables.sh b/shell/modules/variables.sh index 0766718..5e26693 100644 --- a/shell/modules/variables.sh +++ b/shell/modules/variables.sh @@ -52,7 +52,8 @@ export DISTRO_NAME=evolinx export STRAP="base-strap" # Rootfs packages -export CLI_PKG="base-system nano dracut wireless-tools base-install-scripts sudo parted libmd" +export CLI_PKG="base-system nano dracut base-install-scripts sudo parted libmd" +#export CLI_PKG="base-minimal util-linux coreutils libseccomp linux" export INSTALLER_PKG="base-system nano dracut wireless-tools base-install-scripts sudo parted libmd plymouth plasma-desktop konsole" ##