From d9ab95e87a7db84376c2b670bd13c704aa9f01c4 Mon Sep 17 00:00:00 2001 From: Alexander Tratsevskiy Date: Tue, 14 Feb 2023 00:39:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=20=D1=80?= =?UTF-8?q?=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D0=B9=20?= =?UTF-8?q?CCM=20=D0=B8=D0=B7=20=D0=BE=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D1=8B?= =?UTF-8?q?=D1=85,=20=D1=80=D0=B5=D0=B2=D0=B8=D0=B7=D0=B8=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=D0=B0=20=D0=BD=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profiles/CCM/calculate.env | 8 +++--- .../templates/6_ac_update_sync/revision/0-ini | 4 +++ .../revision/10-old/.calculate_directory | 1 - .../revision/10-old/1-migrate-ini.env | 12 --------- .../revision/10-old/2-migrate-CLSM-CLDM.env | 16 ------------ .../revision/10-old/3-migrate-CLSL-CLDL.env | 16 ------------ .../revision/10-old/4-migrate-CMC-CLS.env | 16 ------------ .../revision/2017/.calculate_directory | 1 - .../revision/2023/.calculate_directory | 1 + .../2023/20230214-ccm-container-overlay | 25 +++++++++++++++++++ 10 files changed, 34 insertions(+), 66 deletions(-) create mode 100644 profiles/templates/6_ac_update_sync/revision/0-ini delete mode 100644 profiles/templates/6_ac_update_sync/revision/10-old/.calculate_directory delete mode 100644 profiles/templates/6_ac_update_sync/revision/10-old/1-migrate-ini.env delete mode 100644 profiles/templates/6_ac_update_sync/revision/10-old/2-migrate-CLSM-CLDM.env delete mode 100644 profiles/templates/6_ac_update_sync/revision/10-old/3-migrate-CLSL-CLDL.env delete mode 100644 profiles/templates/6_ac_update_sync/revision/10-old/4-migrate-CMC-CLS.env delete mode 100644 profiles/templates/6_ac_update_sync/revision/2017/.calculate_directory create mode 100644 profiles/templates/6_ac_update_sync/revision/2023/.calculate_directory create mode 100644 profiles/templates/6_ac_update_sync/revision/2023/20230214-ccm-container-overlay diff --git a/profiles/CCM/calculate.env b/profiles/CCM/calculate.env index dafde3b..9cd6253 100644 --- a/profiles/CCM/calculate.env +++ b/profiles/CCM/calculate.env @@ -3,8 +3,8 @@ os_linux_name = 'Calculate Container Manager' os_linux_shortname = CCM [update] -cl_update_rep_name = gentoo,calculate,distros,container -cl_update_rep_url = https://git.calculate-linux.org/calculate/gentoo-overlay,https://git.calculate-linux.org/calculate/calculate-overlay,https://git.calculate-linux.org/calculate/distros-overlay,https://git.calculate-linux.org/calculate/container-overlay +cl_update_rep_name = gentoo,calculate,distros +cl_update_rep_url = https://git.calculate-linux.org/calculate/gentoo-overlay,https://git.calculate-linux.org/calculate/calculate-overlay,https://git.calculate-linux.org/calculate/distros-overlay cl_update_rep_list = - GitHub: https://github.com/calculatelinux/gentoo,https://github.com/calculatelinux/calculate,https://github.com/calculatelinux/distros,https://github.com/calculatelinux/container - Calculate: https://git.calculate-linux.org/calculate/gentoo-overlay,https://git.calculate-linux.org/calculate/calculate-overlay,https://git.calculate-linux.org/calculate/distros-overlay,https://git.calculate-linux.org/calculate/container-overlay + GitHub: https://github.com/calculatelinux/gentoo,https://github.com/calculatelinux/calculate,https://github.com/calculatelinux/distros + Calculate: https://git.calculate-linux.org/calculate/gentoo-overlay,https://git.calculate-linux.org/calculate/calculate-overlay,https://git.calculate-linux.org/calculate/distros-overlay diff --git a/profiles/templates/6_ac_update_sync/revision/0-ini b/profiles/templates/6_ac_update_sync/revision/0-ini new file mode 100644 index 0000000..b1a51a3 --- /dev/null +++ b/profiles/templates/6_ac_update_sync/revision/0-ini @@ -0,0 +1,4 @@ +# Calculate format=samba name=ini.env ini(overlay-distros.revision)== + +[overlay-distros] +revision = 20230214 diff --git a/profiles/templates/6_ac_update_sync/revision/10-old/.calculate_directory b/profiles/templates/6_ac_update_sync/revision/10-old/.calculate_directory deleted file mode 100644 index f761ab8..0000000 --- a/profiles/templates/6_ac_update_sync/revision/10-old/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=skip ini(overlay-distros.revision)<20160101 diff --git a/profiles/templates/6_ac_update_sync/revision/10-old/1-migrate-ini.env b/profiles/templates/6_ac_update_sync/revision/10-old/1-migrate-ini.env deleted file mode 100644 index f237966..0000000 --- a/profiles/templates/6_ac_update_sync/revision/10-old/1-migrate-ini.env +++ /dev/null @@ -1,12 +0,0 @@ -# Calculate path=/var/lib/calculate name=ini.env format=samba ini(overlay-distros.revision)<#-cut()-# - -[overlay-distros] -revision = #-cut()-# -world = #-ini(update.world)-# - -[update] -!world = - -[update-distros] -!world = -!revision = diff --git a/profiles/templates/6_ac_update_sync/revision/10-old/2-migrate-CLSM-CLDM.env b/profiles/templates/6_ac_update_sync/revision/10-old/2-migrate-CLSM-CLDM.env deleted file mode 100644 index 6073d33..0000000 --- a/profiles/templates/6_ac_update_sync/revision/10-old/2-migrate-CLSM-CLDM.env +++ /dev/null @@ -1,16 +0,0 @@ -# Calculate exec=/bin/bash ini(overlay-distros.revision)<#-cut()-# - -#-ini(overlay-distros.revision,#-cut()-#)-# - -if [ ! -f /etc/portage/make.profile ]; then - if file /etc/portage/make.profile | grep /var/lib/layman/distros/profiles/CLSM/amd64 > /dev/null - then - rm /etc/portage/make.profile - ln -sf ../../var/lib/layman/distros/profiles/CLDM/amd64 /etc/portage/make.profile - fi - if file /etc/portage/make.profile | grep /var/lib/layman/distros/profiles/CLSM/x86 > /dev/null - then - rm /etc/portage/make.profile - ln -sf ../../var/lib/layman/distros/profiles/CLDM/x86 /etc/portage/make.profile - fi -fi diff --git a/profiles/templates/6_ac_update_sync/revision/10-old/3-migrate-CLSL-CLDL.env b/profiles/templates/6_ac_update_sync/revision/10-old/3-migrate-CLSL-CLDL.env deleted file mode 100644 index b531d50..0000000 --- a/profiles/templates/6_ac_update_sync/revision/10-old/3-migrate-CLSL-CLDL.env +++ /dev/null @@ -1,16 +0,0 @@ -# Calculate exec=/bin/bash ini(overlay-distros.revision)<#-cut()-# - -#-ini(overlay-distros.revision,#-cut()-#)-# - -if [ ! -f /etc/portage/make.profile ]; then - if file /etc/portage/make.profile | grep /var/lib/layman/distros/profiles/CLSL/amd64 > /dev/null - then - rm /etc/portage/make.profile - ln -sf ../../var/lib/layman/distros/profiles/CLDL/amd64 /etc/portage/make.profile - fi - if file /etc/portage/make.profile | grep /var/lib/layman/distros/profiles/CLSL/x86 > /dev/null - then - rm /etc/portage/make.profile - ln -sf ../../var/lib/layman/distros/profiles/CLDL/x86 /etc/portage/make.profile - fi -fi diff --git a/profiles/templates/6_ac_update_sync/revision/10-old/4-migrate-CMC-CLS.env b/profiles/templates/6_ac_update_sync/revision/10-old/4-migrate-CMC-CLS.env deleted file mode 100644 index 08e3b65..0000000 --- a/profiles/templates/6_ac_update_sync/revision/10-old/4-migrate-CMC-CLS.env +++ /dev/null @@ -1,16 +0,0 @@ -# Calculate exec=/bin/bash ini(overlay-distros.revision)<#-cut()-# - -#-ini(overlay-distros.revision,#-cut()-#)-# - -if [ ! -f /etc/portage/make.profile ]; then - if file /etc/portage/make.profile | grep /var/lib/layman/distros/profiles/CMC/amd64 > /dev/null - then - rm /etc/portage/make.profile - ln -sf ../../var/lib/layman/distros/profiles/CLS/amd64 /etc/portage/make.profile - fi - if file /etc/portage/make.profile | grep /var/lib/layman/distros/profiles/CMC/x86 > /dev/null - then - rm /etc/portage/make.profile - ln -sf ../../var/lib/layman/distros/profiles/CLS/x86 /etc/portage/make.profile - fi -fi diff --git a/profiles/templates/6_ac_update_sync/revision/2017/.calculate_directory b/profiles/templates/6_ac_update_sync/revision/2017/.calculate_directory deleted file mode 100644 index b611b82..0000000 --- a/profiles/templates/6_ac_update_sync/revision/2017/.calculate_directory +++ /dev/null @@ -1 +0,0 @@ -# Calculate append=skip ini(overlay-distros.revision)<20180101 diff --git a/profiles/templates/6_ac_update_sync/revision/2023/.calculate_directory b/profiles/templates/6_ac_update_sync/revision/2023/.calculate_directory new file mode 100644 index 0000000..a500c1a --- /dev/null +++ b/profiles/templates/6_ac_update_sync/revision/2023/.calculate_directory @@ -0,0 +1 @@ +# Calculate append=skip ini(overlay-distros.revision)<20230101 diff --git a/profiles/templates/6_ac_update_sync/revision/2023/20230214-ccm-container-overlay b/profiles/templates/6_ac_update_sync/revision/2023/20230214-ccm-container-overlay new file mode 100644 index 0000000..9c7a41b --- /dev/null +++ b/profiles/templates/6_ac_update_sync/revision/2023/20230214-ccm-container-overlay @@ -0,0 +1,25 @@ +# Calculate exec=/bin/bash ini(overlay-distros.revision)<#-cut(0)-# + +#-ini(overlay-distros.revision,#-cut(0)-#)-# + +if -q grep '\[container\]' /etc/portage/repos.conf/zz-calculate.conf && \ + [[ ! -e /etc/portage/repos.conf/cl-lxc.conf ]] +then + while IFS= read -r line; do + if [[ $line == '[container]' ]]; then + new=1 + elif [[ ${line::1} == '[' ]]; then + new= + fi + + if [[ $new == 1 ]]; then + echo $line >> /etc/portage/repos.conf/cl-lxc.conf + else + echo $line >> /etc/portage/repos.conf/zz-calculate-new.conf + fi + + mv /etc/portage/repos.conf/{zz-calculate-new.conf,zz-calculate.conf} + done <<< $(cat /etc/portage/repos.conf/zz-calculate.conf) +fi + +exit 0