summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/f_generic.sh2
-rw-r--r--src/backend/f_help.sh16
-rw-r--r--src/backend/f_modeswitch.sh79
-rwxr-xr-xsrc/frontend/cli/vasile.sh12
4 files changed, 35 insertions, 74 deletions
diff --git a/src/backend/f_generic.sh b/src/backend/f_generic.sh
index ce413fe..a72d1cb 100644
--- a/src/backend/f_generic.sh
+++ b/src/backend/f_generic.sh
@@ -38,7 +38,7 @@ checkjailsum () {
fi
}
-dkmsmodbuild () {
+makedkms () {
checkifroot
if [[ -x /usr/sbin/dkms ]] ; then
for i in $(dkms status | cut -d " " -f1,2 | sed -e 's/,//g' | sed -e 's/ /\//g' | sed -e 's/://g') ; do
diff --git a/src/backend/f_help.sh b/src/backend/f_help.sh
index f8cc605..96b48e1 100644
--- a/src/backend/f_help.sh
+++ b/src/backend/f_help.sh
@@ -44,13 +44,6 @@ echo -e "\
the live filesystem will be compressed, live services will be autoenabled, live bootloader autoconfigured and in the end live iso image will be built. You will find
a list of predefined live services list hardcoded into "$colorstart"libvasile"$colorstop". Adjust it to suit your needs.
- "$colorstart"--resetmode"$colorstop"
- This option will allow you to reset the system state. It will remove whole portage tree, overlays and portage configuration files and reset the system profile. Usually
- you will never want to call this option directly, unless you really really really know what are you doing. It is called automatically when switching to other states.
-
- !!! WARNING !!! : Never never never leave the system in this state. You will no longer be able to install/remove/upgrade any packages untill you set the system profile,
- get the portage tree, overlays and configure portage by hand. Or, you can always activate one of the three other supported system states.
-
"$colorstart"--binmode"$colorstop"
This option will allow you to change the system state to binmode. In this state portage will allways use only binary packages from the binhost. It will fetch a minimal
portage tree without any ebuilds in it, but only with portage profiles, metadata and eclass. It will also fetch overlay and portage configuration files, and will adjust
@@ -58,15 +51,6 @@ echo -e "\
!!! WARNING !!! : Never never never modify or create any file in "$colorstart"/etc/portage/"$colorstop" in this state.
- "$colorstart"--mixedmode"$colorstop"
- This option will allow you to change the system state to mixedmode. In this state portage will prefer binary packages from the binhost over ebuilds from the portage tree.
- It will fetch the full portage tree, the overlay and portage configuration files, and adjust "$colorstart"make.conf"$colorstop" for binary/ebuild usage. Usually you will find this system state
- useful if you want to install a package not available in the binhost, you want to upgrade a package to a newer version from portage tree or if you wanna rebuild a package
- with your own useflags.
-
- !!! WARNING !!! : Never never never modify any file in "$colorstart"/etc/portage/"$colorstop" in this state. If you want to adjust useflags or keywords for a package, you can create a new file
- e.g.: "$colorstart"100-my.package.use"$colorstop" in "$colorstart"/etc/portage/package.use/"$colorstop" or "$colorstart"100-my.package.keywords"$colorstop" in "$colorstart"/etc/portage/package.keywords/"$colorstop".
-
"$colorstart"--srcmode"$colorstop"
This option will allow you to change the system state to srcmode. In more clear terms, it will transform your Kogaion/Argent/Redcore system into pure Gentoo. Binary packages
from the binhost will be ignored, and you will only install packages building from portage tree using emerge. It will fetch the full portage tree, the overlay and portage
diff --git a/src/backend/f_modeswitch.sh b/src/backend/f_modeswitch.sh
index 8a40938..79fb424 100644
--- a/src/backend/f_modeswitch.sh
+++ b/src/backend/f_modeswitch.sh
@@ -1,20 +1,20 @@
#!/usr/bin/env bash
-rmmainporttree () {
+delmainporttree () {
einfo "I am removing Gentoo ebuild tree"
if [ -d ""$jailmainportpath"/.git" ] ; then
find "$jailmainportpath" -mindepth 1 -exec rm -rf {} \; > /dev/null 2>&1
fi
}
-rmaddonporttree () {
+deladdonporttree () {
einfo "I am removing Redcore ebuild tree"
if [ -d ""$jailaddonportpath"/.git" ] ; then
find "$jailaddonportpath" -mindepth 1 -exec rm -rf {} \; > /dev/null 2>&1
fi
}
-rmportcfgtree () {
+delportcfgtree () {
einfo "I am removing portage configuration"
rm ""$jailportcfgtarget"/make.conf" > /dev/null 2>&1
rm ""$jailportcfgtarget"/make.profile" > /dev/null 2>&1
@@ -24,12 +24,12 @@ rmportcfgtree () {
resetmode () {
checkifroot
- rmmainporttree
- rmaddonporttree
- rmportcfgtree
+ delmainporttree
+ deladdonporttree
+ delportcfgtree
}
-dlmainportfulltree () {
+getmainportsrctree () {
if [ ! -d ""$jailmainportpath"/.git" ] ; then
einfo "I am injecting Gentoo ebuild tree"
cd "$jailmainportpath" && git init > /dev/null 2>&1
@@ -40,7 +40,7 @@ dlmainportfulltree () {
fi
}
-dlmainportmintree () {
+getmainportbintree () {
if [ ! -d ""$jailmainportpath"/.git" ] ; then
einfo "I am injecting Gentoo ebuild tree"
cd "$jailmainportpath" && git init > /dev/null 2>&1
@@ -55,7 +55,7 @@ dlmainportmintree () {
fi
}
-dladdonportfulltree () {
+getaddonportsrctree () {
if [ ! -d ""$jailaddonportpath"/.git" ] ; then
einfo "I am injecting Redcore ebuild tree"
cd "$jailaddonportpath" && git init > /dev/null 2>&1
@@ -65,7 +65,7 @@ dladdonportfulltree () {
fi
}
-dladdonportmintree () {
+getaddonportbintree () {
if [ ! -d ""$jailaddonportpath"/.git" ] ; then
einfo "I am injecting Redcore ebuild tree"
cd "$jailaddonportpath" && git init > /dev/null 2>&1
@@ -79,23 +79,28 @@ dladdonportmintree () {
fi
}
-dlportcfgtree () {
+getportcfgtree () {
pushd /opt > /dev/null 2>&1
einfo "I am injecting portage configuration"
git clone https://pagure.io/redcore/redcore-build.git
popd > /dev/null 2>&1
}
-injectportmintree () {
- dlmainportmintree
- dladdonportmintree
- dlportcfgtree
+getsrctree () {
+ getmainportsrctree
+ getaddonportsrctree
+ getportcfgtree
}
-injectportfulltree () {
- dlmainportfulltree
- dladdonportfulltree
- dlportcfgtree
+getbintree () {
+ getmainportbintree
+ getaddonportbintree
+ getportcfgtree
+}
+
+setmakeconf () {
+ ln -sf "$jailportcfgsource" "$jailportcfgtarget"
+ ln -sf "$jailportcfgtarget"/make.conf.amd64-generic "$jailportcfgtarget"/make.conf
}
setmakeopts () {
@@ -112,40 +117,18 @@ setprofile () {
. /etc/profile
}
-setbinmodecfg () {
- ln -sf "$jailportcfgsource" "$jailportcfgtarget"
- ln -sf "$jailportcfgtarget"/make.conf.amd64-binmode "$jailportcfgtarget"/make.conf
-}
-
-binmode () {
+setbinmode () {
resetmode
- injectportmintree
- setbinmodecfg
- setprofile
-}
-
-setmixedmodecfg () {
- ln -sf "$jailportcfgsource" "$jailportcfgtarget"
- ln -sf "$jailportcfgtarget"/make.conf.amd64-mixedmode "$jailportcfgtarget"/make.conf
-}
-
-mixedmode () {
- resetmode
- injectportfulltree
- setmixedmodecfg
+ getbintree
+ setmakeconf
setmakeopts
setprofile
}
-setsrcmodecfg () {
- ln -sf "$jailportcfgsource" "$jailportcfgtarget"
- ln -sf "$jailportcfgtarget"/make.conf.amd64-srcmode "$jailportcfgtarget"/make.conf
-}
-
-srcmode() {
+setsrcmode () {
resetmode
- injectportfulltree
- setsrcmodecfg
+ getsrctree
+ setmakeconf
setmakeopts
- setprofile
+ setprofiles
}
diff --git a/src/frontend/cli/vasile.sh b/src/frontend/cli/vasile.sh
index 557caee..51ec3e9 100755
--- a/src/frontend/cli/vasile.sh
+++ b/src/frontend/cli/vasile.sh
@@ -21,20 +21,14 @@ case $1 in
--makeiso)
makeiso
;;
- --resetmode)
- resetmode
- ;;
--binmode)
- binmode
- ;;
- --mixedmode)
- mixedmode
+ setbinmode
;;
--srcmode)
- srcmode
+ setsrcmode
;;
--dkms)
- dkmsmodbuild
+ makedkms
;;
--help)
showhelp