commit
6ec866b20c
@ -1,3 +0,0 @@
|
||||
# Calculate format=squid
|
||||
SendEnv LANG LC_*
|
||||
|
@ -1,2 +0,0 @@
|
||||
# Calculate path=/etc/ssh
|
||||
StrictHostKeyChecking=no
|
@ -1,26 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="7"
|
||||
PYTHON_COMPAT=(python3_9)
|
||||
|
||||
SRC_URI="https://git.calculate-linux.org/calculate/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
DESCRIPTION="Collection of administration scripts for Calculate"
|
||||
HOMEPAGE="https://www.calculate-linux.org"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
S=${WORKDIR}/${PN}
|
||||
|
||||
RDEPEND=">=sys-apps/calculate-utils-3.6
|
||||
app-arch/zstd
|
||||
app-arch/xz-utils"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-check-lxc.patch
|
||||
"${FILESDIR}"/${P}-wan.patch
|
||||
)
|
@ -0,0 +1,29 @@
|
||||
diff --git a/cl-lxc b/cl-lxc
|
||||
index 714a44d..2914fe9 100755
|
||||
--- a/cl-lxc
|
||||
+++ b/cl-lxc
|
||||
@@ -549,6 +549,7 @@ update_prepare() {
|
||||
cl-update -s
|
||||
einfo $"Launching package update"
|
||||
lxc-attach $name_lxc -- cl-update -f
|
||||
+ rm -rf "$path_lxc/rootfs/var/calculate/{tmp/*,templates/*}"
|
||||
|
||||
ebegin $"Stopping container"
|
||||
lxc-stop $name_lxc
|
||||
@@ -592,6 +593,7 @@ upgrade_lxc() {
|
||||
reflink='--reflink'
|
||||
fi
|
||||
cp -a $reflink $path_lxc_prepare $path_work/$name_upgrading/rootfs$num_next
|
||||
+ rm -rf $path_work/$name_upgrading/rootfs$num_next/var/calculate/*
|
||||
eend
|
||||
|
||||
ebegin $"Copying network settings from main container"
|
||||
@@ -608,7 +610,7 @@ upgrade_lxc() {
|
||||
cat << EOL > $path_work/$name_upgrading/rootfs$num_next/etc/local.d/firststart.start
|
||||
cl-core --method setup_system --no-progress --usenew-conf --network on
|
||||
openrc
|
||||
-#rm /etc/local.d/firststart.start
|
||||
+rm /etc/local.d/firststart.start
|
||||
EOL
|
||||
chmod 755 $path_work/$name_upgrading/rootfs$num_next/etc/local.d/firststart.start
|
||||
eend
|
@ -0,0 +1,16 @@
|
||||
diff --git a/cl-lxc b/cl-lxc
|
||||
index 98b73a9..0ab9dd5 100755
|
||||
--- a/cl-lxc
|
||||
+++ b/cl-lxc
|
||||
@@ -600,6 +600,11 @@ upgrade_lxc() {
|
||||
$path_work/$name_upgrading/rootfs$num_next/etc/conf.d/net
|
||||
eend
|
||||
|
||||
+ ebegin $"Copying hash of root password"
|
||||
+ root=$(grep '^root:' $path_work/$name_upgrading/rootfs$num_cur/etc/shadow | sed 's/:/\\:/g')
|
||||
+ sed -i "s:^root\:.*$:$root:" $path_work/$name_upgrading/rootfs$num_next/etc/shadow
|
||||
+ eend
|
||||
+
|
||||
ebegin $"Preparing first boot setup script"
|
||||
cat << EOL > $path_work/$name_upgrading/rootfs$num_next/etc/local.d/firststart.start
|
||||
cl-core --method setup_system --no-progress --usenew-conf --network on
|
@ -0,0 +1,12 @@
|
||||
diff --git a/cl-lxc b/cl-lxc
|
||||
index 0ab9dd5..714a44d 100755
|
||||
--- a/cl-lxc
|
||||
+++ b/cl-lxc
|
||||
@@ -490,7 +490,6 @@ os_install_clock_timezone = $(cat /etc/timezone)
|
||||
[update]
|
||||
cl_update_rep_name =
|
||||
cl_update_rep_url =
|
||||
-cl_update_rep_sync =
|
||||
cl_update_eixupdate_force = force
|
||||
cl_update_force_fix_set = on
|
||||
EOL
|
@ -1,42 +0,0 @@
|
||||
diff --git a/cl-lxc b/cl-lxc
|
||||
index 9aaa10f..db548eb 100755
|
||||
--- a/cl-lxc
|
||||
+++ b/cl-lxc
|
||||
@@ -209,8 +209,17 @@ set_vars(){
|
||||
if [ $path_def = "$path_work" ]
|
||||
then
|
||||
path_change=
|
||||
+ if [ ! -d $path_work ]
|
||||
+ then
|
||||
+ mkdir -p $path_work
|
||||
+ fi
|
||||
else
|
||||
path_change=$path_work
|
||||
+ if [ ! -d $path_work ]
|
||||
+ then
|
||||
+ printf $"Directory '%s' is not found.\n" $path_work >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
|
||||
type_fs=$(df -Th $path_work | awk 'NR==2 {print $2}')
|
||||
@@ -448,7 +457,7 @@ create_lxc() {
|
||||
local random_mac=$(echo -n '02:'; hexdump -n5 -e '/1 ":%02X"' /dev/random | sed s/^://g)
|
||||
network_conf="lxc.net.0.type = veth
|
||||
lxc.net.0.flags = up
|
||||
-lxc.net.0.name = eth0
|
||||
+lxc.net.0.name = wan0
|
||||
lxc.net.0.link = br0
|
||||
lxc.net.0.hwaddr = ${random_mac}
|
||||
lxc.net.0.veth.pair = lxc-${name_lxc}"
|
||||
@@ -494,8 +503,8 @@ EOL
|
||||
EOL
|
||||
if [ $net_conf == veth ]
|
||||
then
|
||||
- cat << EOL > ${calculate_dir}/templates/default/runlevel.eth0
|
||||
-# Calculate mergepkg(sys-apps/openrc)!= path=/etc/runlevels/default name=net.eth0 protected link=/etc/init.d/net.lo symbolic
|
||||
+ cat << EOL > ${calculate_dir}/templates/default/runlevel.wan0
|
||||
+# Calculate mergepkg(sys-apps/openrc)!= path=/etc/runlevels/default name=net.wan0 protected link=/etc/init.d/net.lo symbolic
|
||||
EOL
|
||||
fi
|
||||
cat << EOL > ${calculate_dir}/templates/default/portage.binhost
|
@ -0,0 +1,22 @@
|
||||
diff --git a/cl-lxc b/cl-lxc
|
||||
index 9aaa10f..db548eb 100755
|
||||
--- a/cl-lxc
|
||||
+++ b/cl-lxc
|
||||
@@ -209,8 +209,17 @@ set_vars(){
|
||||
if [ $path_def = "$path_work" ]
|
||||
then
|
||||
path_change=
|
||||
+ if [ ! -d $path_work ]
|
||||
+ then
|
||||
+ mkdir -p $path_work
|
||||
+ fi
|
||||
else
|
||||
path_change=$path_work
|
||||
+ if [ ! -d $path_work ]
|
||||
+ then
|
||||
+ printf $"Directory '%s' is not found.\n" $path_work >&2
|
||||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
|
||||
type_fs=$(df -Th $path_work | awk 'NR==2 {print $2}')
|
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="7"
|
||||
PYTHON_COMPAT=(python3_9)
|
||||
|
||||
declare -A CALCULATE_MODULES=(
|
||||
["lib"]="3.7.2.16"
|
||||
["install"]="3.7.2.9"
|
||||
["core"]="3.7.2.3"
|
||||
["i18n"]="3.7.2.10"
|
||||
["client"]="3.7.2.3"
|
||||
["console"]="3.7.2.2"
|
||||
["console-gui"]="3.7.2.1"
|
||||
["update"]="3.7.2.23"
|
||||
["builder"]="3.7.2.7"
|
||||
)
|
||||
|
||||
inherit calculate-utils-r15
|
||||
|
||||
DESCRIPTION="A set of Calculate utilities for system installation, build and upgrade"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate_utilities"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64"
|
||||
|
@ -0,0 +1,28 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI="7"
|
||||
PYTHON_COMPAT=(python3_9)
|
||||
|
||||
declare -A CALCULATE_MODULES=(
|
||||
["lib"]="3.7.2.15"
|
||||
["install"]="3.7.2.9"
|
||||
["core"]="3.7.2.3"
|
||||
["i18n"]="3.7.2.10"
|
||||
["client"]="3.7.2.3"
|
||||
["console"]="3.7.2.2"
|
||||
["console-gui"]="3.7.2.1"
|
||||
["update"]="3.7.2.23"
|
||||
["builder"]="3.7.2.7"
|
||||
)
|
||||
|
||||
inherit calculate-utils-r15
|
||||
|
||||
DESCRIPTION="A set of Calculate utilities for system installation, build and upgrade"
|
||||
HOMEPAGE="http://www.calculate-linux.org/main/en/calculate_utilities"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3"
|
||||
KEYWORDS="amd64"
|
||||
|
Loading…
Reference in new issue