Запуск/установка Kumir

Все команды выполнял в Live-системе:

Длинные выводы буду скрывать под спойлер.

  1. Узнаем, где расположен локальный оверлей:
# cat /etc/portage/repos.conf/zz-calculate.conf 
Спойлер
# cat /etc/portage/repos.conf/zz-calculate.conf 

[DEFAULT]
main-repo = gentoo

[distros]
priority = 50
sync-uri = https://github.com/calculatelinux/distros
location = /var/db/repos/distros
auto-sync = Yes
sync-type = calculate

[calculate]
priority = 50
sync-uri = https://github.com/calculatelinux/calculate
location = /var/db/repos/calculate
auto-sync = Yes
sync-type = calculate

[gentoo]
priority = 50
sync-uri = https://github.com/calculatelinux/gentoo
location = /var/db/repos/gentoo
auto-sync = Yes
sync-type = calculate

[custom]
location = /var/calculate/repos/custom
  1. Создадим категорию программ в локальном оверлее:
# mkdir -p /var/calculate/repos/custom/dev-lang/kumir2
  1. Создадим ebuild-файл для Нашей программы (использую mcedit из пакета app-misc/mc, который сразу создаёт отсутствующий файл и позволяет наполнить его. Для создания пустого файла можно использовать touch):
# mcedit /var/calculate/repos/custom/dev-lang/kumir2/kumir2-2.1.0.ebuild
  1. Вставим код ebuild-файла, который можно взять из этого сообщения;

  2. Проверим наполненный Нами файл:

# cat /var/calculate/repos/custom/dev-lang/kumir2/kumir2-2.1.0.ebuild
Спойлер
# cat /var/calculate/repos/custom/dev-lang/kumir2/kumir2-2.1.0.ebuild

# Copyright 2020-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit rpm

DESCRIPTION="Implementation of Kumir programming language, designed by academician Ershov."
HOMEPAGE="https://www.niisi.ru/kumir/"
SRC_URI="amd64? ( https://mirror.yandex.ru/rosa/rosa2021.1/repository/x86_64/contrib/release/kumir-all-${PV}-7-rosa2021.1.x86_64.rpm )"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="mirror strip"

RDEPEND="
    dev-qt/qtcore:5
    dev-qt/qtgui:5
    dev-qt/qtprintsupport:5
    dev-qt/qtscript:5
    dev-qt/qtsvg:5
    dev-qt/qtx11extras:5
"

DEPEND="${RDEPEND}"

S="${WORKDIR}"

src_unpack() {
    rpm_unpack kumir-all-${PV}-7-rosa2021.1.x86_64.rpm
}

src_install() {
    cp -R "${WORKDIR}/usr" "${D}" || die "install failed!"
}
  1. Создадим manifest для Нашего ebuild:
# ebuild /var/calculate/repos/custom/dev-lang/kumir2/kumir2-2.1.0.ebuild manifest
Спойлер
# ebuild /var/calculate/repos/custom/dev-lang/kumir2/kumir2-2.1.0.ebuild manifest

>>> Downloading 'https://mirror.yandex.ru/rosa/rosa2021.1/repository/x86_64/contrib/release/kumir-all-2.1.0-7-rosa2021.1.x86_64.rpm'
--2024-12-16 06:53:47--  https://mirror.yandex.ru/rosa/rosa2021.1/repository/x86_64/contrib/release/kumir-all-2.1.0-7-rosa2021.1.x86_64.rpm
Resolving mirror.yandex.ru (mirror.yandex.ru)... 213.180.204.183, 2a02:6b8::183
Connecting to mirror.yandex.ru (mirror.yandex.ru)|213.180.204.183|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8931617 (8.5M) [application/x-redhat-package-manager]
Saving to: ‘/var/calculate/distfiles/kumir-all-2.1.0-7-rosa2021.1.x86_64.rpm.__download__’

/var/calculate/distfiles/kumir-all-2.1.0-7-rosa2021. 100%[=====================================================================================================================>]   8.52M  3.34MB/s    in 2.6s    

2024-12-16 06:53:50 (3.34 MB/s) - ‘/var/calculate/distfiles/kumir-all-2.1.0-7-rosa2021.1.x86_64.rpm.__download__’ saved [8931617/8931617]

>>> Creating Manifest for /var/calculate/repos/custom/dev-lang/kumir2
  1. Выполним синхронизацию:
# eix-sync && eix-update
Спойлер
# eix-sync && eix-update

 * Running !-hooks
 * Running /usr/sbin/cl-core --method update --sync-only --skip-eix-update
Repositories synchronization
 * Checking current binhost ...                                                                                                                                                                              [ ok ]
 * Checking Distros updates ...                                                                                                                                                                              [ ok ]
 * Checking Calculate updates ...                                                                                                                                                                            [ ok ]
 * Checking Gentoo updates ...                                                                                                                                                                               [ ok ]
 * Synchronization finished
System configuration
 * Update server http://mirror.mephi.ru/calculate
 * System sync finished!
 * Copying old database to /var/cache/eix/previous.eix
 * Running eix-update
Reading Portage settings...
Building database (/var/cache/eix/portage.eix)...
[0] "gentoo" /var/db/repos/gentoo/ (cache: metadata-md5-or-flat)
     Reading category 170|170 (100) Finished             
[1] "custom" /var/calculate/repos/custom (cache: parse|ebuild*3.0.24#metadata-md5#metadata-flat#assign)
     Reading category 170|170 (100) Finished    
[2] "calculate" /var/db/repos/calculate (cache: parse|ebuild*3.0.24#metadata-md5#metadata-flat#assign)
     Reading category 170|170 (100) Finished        
[3] "distros" /var/db/repos/distros (cache: parse|ebuild*3.0.24#metadata-md5#metadata-flat#assign)
     Reading category 170|170 (100) EMPTY!
Applying masks...
Calculating hash tables...
Writing database file /var/cache/eix/portage.eix...
Database contains 19103 packages in 170 categories
 * Calling eix-diff
[N]   >> dev-lang/kumir2 (~2.1.0) [1]: Implementation of Kumir programming language, designed by academician Ershov.
 * Time statistics:
     2 seconds for syncing
     3 seconds for eix-update
     5 seconds total
Reading Portage settings...
Building database (/var/cache/eix/portage.eix)...
[0] "gentoo" /var/db/repos/gentoo/ (cache: metadata-md5-or-flat)
     Reading category 170|170 (100) Finished             
[1] "custom" /var/calculate/repos/custom (cache: parse|ebuild*3.0.24#metadata-md5#metadata-flat#assign)
     Reading category 170|170 (100) Finished    
[2] "calculate" /var/db/repos/calculate (cache: parse|ebuild*3.0.24#metadata-md5#metadata-flat#assign)
     Reading category 170|170 (100) Finished        
[3] "distros" /var/db/repos/distros (cache: parse|ebuild*3.0.24#metadata-md5#metadata-flat#assign)
     Reading category 170|170 (100) EMPTY!
Applying masks...
Calculating hash tables...
Writing database file /var/cache/eix/portage.eix...
Database contains 19103 packages in 170 categories

, где увидим, что созданный kumir2 отобразился в добавленных:

 * Calling eix-diff
[N]   >> dev-lang/kumir2 (~2.1.0) [1]: Implementation of Kumir programming language, designed by academician Ershov.
  1. Для наглядности выполним поиск пакета:
# emerge -s dev-lang/kumir2 
Спойлер
# emerge -s dev-lang/kumir2 

Local copy of remote index is up-to-date and will be used.
  
[ Results for search key : dev-lang/kumir2 ]
Searching...

*  dev-lang/kumir2 [ Masked ]
      Latest version available: 2.1.0
      Latest version installed: [ Not Installed ]
      Size of files: 8723 KiB
      Homepage:      https://www.niisi.ru/kumir/
      Description:   Implementation of Kumir programming language, designed by academician Ershov.
      License:       

[ Applications found : 1 ]

, где обратим внимание на то, что пакет замаскирован;

  1. Попробуем выполнить установку:
# emerge -av dev-lang/kumir2 
Спойлер
# emerge -av dev-lang/kumir2 

Local copy of remote index is up-to-date and will be used.

Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.63 s (backtrack: 0/20).

[binary  N     ] dev-qt/qtprintsupport-5.15.14:5/5.15::gentoo  USE="cups -debug -gles2-only -test" 222 KiB
[binary  N     ] dev-qt/qtscript-5.15.14:5/5.15::gentoo  USE="jit scripttools -debug -test" 1007 KiB
[binary  N     ] app-arch/rpm2targz-2021.03.16::gentoo  25 KiB
[ebuild  N    ~] dev-lang/kumir2-2.1.0::custom  0 KiB

Total: 4 packages (4 new, 3 binaries), Size of downloads: 1253 KiB

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by dev-lang/kumir2 (argument)
=dev-lang/kumir2-2.1.0 ~amd64

Would you like to add these changes to your config files? [Yes/No]

, где увидим, какие зависимости требуется установить, и что требуется принять изменения для keywords;

  1. Принимаем эти изменения, выполняя нижеуказанную команду с нажатием клавиши u:
# dispatch-conf
Спойлер
# dispatch-conf

--- /etc/portage/package.accept_keywords/custom 2024-12-16 06:29:52.650000233 +0000
+++ /etc/portage/package.accept_keywords/._cfg0000_custom       2024-12-16 06:55:52.214738210 +0000
@@ -1 +1,3 @@
 # This file will be migrate to new installation
+# required by dev-lang/kumir2 (argument)
+=dev-lang/kumir2-2.1.0 ~amd64

>> (1 of 1) -- /etc/portage/package.accept_keywords/custom
>> q quit, h help, n next, e edit-new, z zap-new, u use-new
   m merge, t toggle-merge, l look-merge:  
  1. Вот теперь производим установку:
# emerge -av dev-lang/kumir2 
Спойлер
# emerge -av dev-lang/kumir2 

Local copy of remote index is up-to-date and will be used.

Local copy of remote index is up-to-date and will be used.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.61 s (backtrack: 0/20).

[binary  N     ] dev-qt/qtprintsupport-5.15.14:5/5.15::gentoo  USE="cups -debug -gles2-only -test" 222 KiB
[binary  N     ] dev-qt/qtscript-5.15.14:5/5.15::gentoo  USE="jit scripttools -debug -test" 1007 KiB
[binary  N     ] app-arch/rpm2targz-2021.03.16::gentoo  25 KiB
[ebuild  N    ~] dev-lang/kumir2-2.1.0::custom  0 KiB

Total: 4 packages (4 new, 3 binaries), Size of downloads: 1253 KiB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging binary (1 of 4) dev-qt/qtprintsupport-5.15.14::gentoo
>>> Emerging binary (2 of 4) dev-qt/qtscript-5.15.14::gentoo
>>> Emerging binary (3 of 4) app-arch/rpm2targz-2021.03.16::gentoo
>>> Installing (3 of 4) app-arch/rpm2targz-2021.03.16::gentoo
>>> Installing (1 of 4) dev-qt/qtprintsupport-5.15.14::gentoo
>>> Installing (2 of 4) dev-qt/qtscript-5.15.14::gentoo
>>> Completed (3 of 4) app-arch/rpm2targz-2021.03.16::gentoo
>>> Completed (1 of 4) dev-qt/qtprintsupport-5.15.14::gentoo
>>> Completed (2 of 4) dev-qt/qtscript-5.15.14::gentoo
>>> Emerging (4 of 4) dev-lang/kumir2-2.1.0::custom
>>> Installing (4 of 4) dev-lang/kumir2-2.1.0::custom
>>> Recording dev-lang/kumir2 in "world" favorites file...
>>> Completed (4 of 4) dev-lang/kumir2-2.1.0::custom
>>> Jobs: 4 of 4 complete                                               Load avg: 0.59, 0.32, 0.22
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
  1. Получаем результат:
Спойлер