* [devel-distro] [PATCH 0/2] live-blender.iso и отсюда use/live/runapp
@ 2022-09-11 17:33 Michael Shigorin
2022-09-11 17:33 ` [devel-distro] [PATCH 1/2] live: add use/live/runapp Michael Shigorin
2022-09-11 17:33 ` [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender Michael Shigorin
0 siblings, 2 replies; 9+ messages in thread
From: Michael Shigorin @ 2022-09-11 17:33 UTC (permalink / raw)
To: devel-distro
Здравствуйте.
Тут задали на опеннетике вопрос по поводу свежевышедшего Blender 3.3:
"Когда уже выйдет Blender OS?". Начал было писать полушутливый ответ
на тему того, как просто с помощью mkimage-profiles сделать самому --
и на буковках "livecd-0ad" понял, что комментарий превращается...
правильно, в mini-HOWTO по сборке ещё и пакета-однострочника,
который был лишним ещё при создании.
В общем, теперь для создания livecd-шки под одно приложение из альта
достаточно собрать её с use/live/runapp, указав в LIVE_RUNAPP_BINARY
краткий или полный путь к собственно целевой программе. Если нужно
3D-ускорение, за основу можно сразу брать distro/.live-games --
по идее, всё нужное там уже есть (если нет, туда и добавляйте).
Michael Shigorin (2):
live: add use/live/runapp
live.mk: initial distro/live-blender
conf.d/live.mk | 7 ++++++-
features.in/live/README | 5 +++++
features.in/live/config.mk | 5 +++++
features.in/live/live/image-scripts.d/50-runapp | 16 ++++++++++++++++
4 files changed, 32 insertions(+), 1 deletion(-)
create mode 100755 features.in/live/live/image-scripts.d/50-runapp
--
2.33.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [devel-distro] [PATCH 1/2] live: add use/live/runapp
2022-09-11 17:33 [devel-distro] [PATCH 0/2] live-blender.iso и отсюда use/live/runapp Michael Shigorin
@ 2022-09-11 17:33 ` Michael Shigorin
2022-09-12 16:09 ` Антон Мидюков
2022-09-11 17:33 ` [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender Michael Shigorin
1 sibling, 1 reply; 9+ messages in thread
From: Michael Shigorin @ 2022-09-11 17:33 UTC (permalink / raw)
To: devel-distro
Add the possibility to directly configure the desktop app
for livecd kiosk mode to start.
This should have been done as soon as livecd-runapp
hit the streets -- livecd-{0ad,fgfs} definitely must go
as adding a line into config is trivially done near
the only place that requires them (conf.d/live.mk).
TODO: might be more generally useful for vm/* too,
take this out into a separate feature then.
---
features.in/live/README | 5 +++++
features.in/live/config.mk | 5 +++++
features.in/live/live/image-scripts.d/50-runapp | 16 ++++++++++++++++
3 files changed, 26 insertions(+)
create mode 100755 features.in/live/live/image-scripts.d/50-runapp
diff --git a/features.in/live/README b/features.in/live/README
index 72975f5c9..58302a182 100644
--- a/features.in/live/README
+++ b/features.in/live/README
@@ -19,3 +19,8 @@
** перечисляет префиксы каталогов драйвров ядра для удаления
** значение: пусто (по умолчанию) или список через пробел
** см. config.mk
+
+* LIVE_RUNAPP_BINARY
+** указывает имя программы для запуска в режиме киоска
+** значение: пусто (по умолчанию) или путь (из $PATH или полный)
+** см. тж. пакеты livecd-0ad, livecd-fgfs и сам livecd-runapp
diff --git a/features.in/live/config.mk b/features.in/live/config.mk
index e6d762285..59e65b9eb 100644
--- a/features.in/live/config.mk
+++ b/features.in/live/config.mk
@@ -99,6 +99,11 @@ else
use/live/suspend: use/live; @:
endif
+# for kiosks
+use/live/runapp: use/live;
+ @$(call add,LIVE_PACKAGES,livecd-runapp)
+ @$(call xport,LIVE_RUNAPP_BINARY)
+
# deny network/local drive access for security reasons
use/live/privacy: use/services use/memclean use/deflogin \
use/stage2/ata use/stage2/drm use/stage2/hid \
diff --git a/features.in/live/live/image-scripts.d/50-runapp b/features.in/live/live/image-scripts.d/50-runapp
new file mode 100755
index 000000000..3da410108
--- /dev/null
+++ b/features.in/live/live/image-scripts.d/50-runapp
@@ -0,0 +1,16 @@
+#!/bin/sh -efu
+# see also live-0ad
+
+CONFIG=/etc/sysconfig/livecd-runapp
+
+if [ -s "$CONFIG" ]; then
+ echo "$CONFIG exists, not overriding (from $(rpm -qf "$CONFIG"))"
+ exit 0
+fi
+
+mkdir -p "$(dirname "$CONFIG")"
+cat >> "$CONFIG" << _EOF_
+# mkimage-profiles live 50-runapp hook
+BINARY=$GLOBAL_LIVE_RUNAPP_BINARY
+_EOF_
+:
--
2.33.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender
2022-09-11 17:33 [devel-distro] [PATCH 0/2] live-blender.iso и отсюда use/live/runapp Michael Shigorin
2022-09-11 17:33 ` [devel-distro] [PATCH 1/2] live: add use/live/runapp Michael Shigorin
@ 2022-09-11 17:33 ` Michael Shigorin
2022-09-12 16:07 ` Антон Мидюков
1 sibling, 1 reply; 9+ messages in thread
From: Michael Shigorin @ 2022-09-11 17:33 UTC (permalink / raw)
To: devel-distro
It's been started as an answer to this question:
http://www.opennet.ru/opennews/art.shtml?num=57760#91
I *think* that distro/.live-kiosk is where use/live/runapp
should be, not the downstream distro/.live-games, since
the whole mini-feature is really about kiosks.
OTOH blender is somewhat akin to games in terms of being
a purely multimedia app with 3D acceleration required
for proper interactive mode, and that's what .live-games
strives to provide.
---
conf.d/live.mk | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/conf.d/live.mk b/conf.d/live.mk
index 6c8a427ae..3874136f0 100644
--- a/conf.d/live.mk
+++ b/conf.d/live.mk
@@ -52,7 +52,7 @@ distro/.live-desktop: distro/.live-x11 +live use/live/install use/stage2/net-eth
use/plymouth/live; @:
distro/.live-desktop-ru: distro/.live-desktop use/live/ru; @:
-distro/.live-kiosk: distro/.live-base use/live/autologin \
+distro/.live-kiosk: distro/.live-base use/live/autologin use/live/runapp \
use/syslinux/timeout/1 use/cleanup use/stage2/net-eth \
use/fonts/otf/adobe
@$(call add,CLEANUP_PACKAGES,'alterator*' 'guile*' 'vim-common')
@@ -142,6 +142,11 @@ distro/live-gimp: distro/live-icewm use/live/ru
@$(call add,LIVE_PACKAGES,macrofusion)
@$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync usbutils)
+distro/live-blender: distro/.live-games
+ @$(call add,LIVE_PACKAGES,blender)
+ @$(call add,LIVE_RUNAPP_BINARY,blender)
+ @$(call try,HOMEPAGE,http://blender.com/)
+
# NB: use/browser won't do as it provides a *single* browser ATM
distro/live-privacy: distro/.base +efi +systemd +vmguest \
use/live/base use/live/privacy use/live/ru \
--
2.33.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender
2022-09-11 17:33 ` [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender Michael Shigorin
@ 2022-09-12 16:07 ` Антон Мидюков
2022-09-12 16:17 ` Michael Shigorin
0 siblings, 1 reply; 9+ messages in thread
From: Антон Мидюков @ 2022-09-12 16:07 UTC (permalink / raw)
To: devel-distro
12.09.2022 00:33, Michael Shigorin пишет:
> It's been started as an answer to this question:
> http://www.opennet.ru/opennews/art.shtml?num=57760#91
>
> I *think* that distro/.live-kiosk is where use/live/runapp
> should be, not the downstream distro/.live-games, since
> the whole mini-feature is really about kiosks.
>
> OTOH blender is somewhat akin to games in terms of being
> a purely multimedia app with 3D acceleration required
> for proper interactive mode, and that's what .live-games
> strives to provide.
> ---
> conf.d/live.mk | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/conf.d/live.mk b/conf.d/live.mk
> index 6c8a427ae..3874136f0 100644
> --- a/conf.d/live.mk
> +++ b/conf.d/live.mk
> @@ -52,7 +52,7 @@ distro/.live-desktop: distro/.live-x11 +live use/live/install use/stage2/net-eth
> use/plymouth/live; @:
> distro/.live-desktop-ru: distro/.live-desktop use/live/ru; @:
>
> -distro/.live-kiosk: distro/.live-base use/live/autologin \
> +distro/.live-kiosk: distro/.live-base use/live/autologin use/live/runapp \
> use/syslinux/timeout/1 use/cleanup use/stage2/net-eth \
> use/fonts/otf/adobe
> @$(call add,CLEANUP_PACKAGES,'alterator*' 'guile*' 'vim-common')
> @@ -142,6 +142,11 @@ distro/live-gimp: distro/live-icewm use/live/ru
> @$(call add,LIVE_PACKAGES,macrofusion)
> @$(call add,LIVE_PACKAGES,qtfm openssh-clients rsync usbutils)
>
> +distro/live-blender: distro/.live-games
> + @$(call add,LIVE_PACKAGES,blender)
> + @$(call add,LIVE_RUNAPP_BINARY,blender)
Надо set, приложение же одно должно быть:
+ @$(call set,LIVE_RUNAPP_BINARY,blender)
> + @$(call try,HOMEPAGE,http://blender.com/)
> +
> # NB: use/browser won't do as it provides a *single* browser ATM
> distro/live-privacy: distro/.base +efi +systemd +vmguest \
> use/live/base use/live/privacy use/live/ru \
--
С уважением, Антон Мидюков <antohami@altlinux.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel-distro] [PATCH 1/2] live: add use/live/runapp
2022-09-11 17:33 ` [devel-distro] [PATCH 1/2] live: add use/live/runapp Michael Shigorin
@ 2022-09-12 16:09 ` Антон Мидюков
2022-09-12 16:21 ` Michael Shigorin
0 siblings, 1 reply; 9+ messages in thread
From: Антон Мидюков @ 2022-09-12 16:09 UTC (permalink / raw)
To: devel-distro
12.09.2022 00:33, Michael Shigorin пишет:
> Add the possibility to directly configure the desktop app
> for livecd kiosk mode to start.
>
> This should have been done as soon as livecd-runapp
> hit the streets -- livecd-{0ad,fgfs} definitely must go
> as adding a line into config is trivially done near
> the only place that requires them (conf.d/live.mk).
>
> TODO: might be more generally useful for vm/* too,
> take this out into a separate feature then.
> ---
> features.in/live/README | 5 +++++
> features.in/live/config.mk | 5 +++++
> features.in/live/live/image-scripts.d/50-runapp | 16 ++++++++++++++++
> 3 files changed, 26 insertions(+)
> create mode 100755 features.in/live/live/image-scripts.d/50-runapp
>
> diff --git a/features.in/live/README b/features.in/live/README
> index 72975f5c9..58302a182 100644
> --- a/features.in/live/README
> +++ b/features.in/live/README
> @@ -19,3 +19,8 @@
> ** перечисляет префиксы каталогов драйвров ядра для удаления
> ** значение: пусто (по умолчанию) или список через пробел
> ** см. config.mk
> +
> +* LIVE_RUNAPP_BINARY
> +** указывает имя программы для запуска в режиме киоска
> +** значение: пусто (по умолчанию) или путь (из $PATH или полный)
> +** см. тж. пакеты livecd-0ad, livecd-fgfs и сам livecd-runapp
> diff --git a/features.in/live/config.mk b/features.in/live/config.mk
> index e6d762285..59e65b9eb 100644
> --- a/features.in/live/config.mk
> +++ b/features.in/live/config.mk
> @@ -99,6 +99,11 @@ else
> use/live/suspend: use/live; @:
> endif
>
> +# for kiosks
> +use/live/runapp: use/live;
> + @$(call add,LIVE_PACKAGES,livecd-runapp)
> + @$(call xport,LIVE_RUNAPP_BINARY)
> +
> # deny network/local drive access for security reasons
> use/live/privacy: use/services use/memclean use/deflogin \
> use/stage2/ata use/stage2/drm use/stage2/hid \
> diff --git a/features.in/live/live/image-scripts.d/50-runapp b/features.in/live/live/image-scripts.d/50-runapp
> new file mode 100755
> index 000000000..3da410108
> --- /dev/null
> +++ b/features.in/live/live/image-scripts.d/50-runapp
> @@ -0,0 +1,16 @@
> +#!/bin/sh -efu
> +# see also live-0ad
> +
Не надо выполнять, если нет пакета livecd-runapp или не задана переменная LIVE_RUNAPP_BINARY:
+[ rpm -q livecd-runapp ] || exit 0
+[ -n "$GLOBAL_LIVE_RUNAPP_BINARY" ] || exit 0
так как иначе в live будет ничейный файл /etc/sysconfig/livecd-runapp либо файл с бессмысленным содержимым:
# mkimage-profiles live 50-runapp hook
BINARY=
что тоже нехорошо.
> +CONFIG=/etc/sysconfig/livecd-runapp
> +
> +if [ -s "$CONFIG" ]; then
> + echo "$CONFIG exists, not overriding (from $(rpm -qf "$CONFIG"))"
> + exit 0
> +fi
> +
> +mkdir -p "$(dirname "$CONFIG")"
> +cat >> "$CONFIG" << _EOF_
> +# mkimage-profiles live 50-runapp hook
> +BINARY=$GLOBAL_LIVE_RUNAPP_BINARY
> +_EOF_
> +:
--
С уважением, Антон Мидюков <antohami@altlinux.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender
2022-09-12 16:07 ` Антон Мидюков
@ 2022-09-12 16:17 ` Michael Shigorin
0 siblings, 0 replies; 9+ messages in thread
From: Michael Shigorin @ 2022-09-12 16:17 UTC (permalink / raw)
To: devel-distro
On Mon, Sep 12, 2022 at 11:07:57PM +0700, Антон Мидюков wrote:
> > +distro/live-blender: distro/.live-games
> > + @$(call add,LIVE_PACKAGES,blender)
> > + @$(call add,LIVE_RUNAPP_BINARY,blender)
> Надо set, приложение же одно должно быть:
> + @$(call set,LIVE_RUNAPP_BINARY,blender)
Согласен, отвлёкся-таки; прошу поправить при приёме.
--
---- WBR, Michael Shigorin / http://altlinux.org
------ http://opennet.ru / http://anna-news.info
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel-distro] [PATCH 1/2] live: add use/live/runapp
2022-09-12 16:09 ` Антон Мидюков
@ 2022-09-12 16:21 ` Michael Shigorin
2022-09-12 18:17 ` Антон Мидюков
0 siblings, 1 reply; 9+ messages in thread
From: Michael Shigorin @ 2022-09-12 16:21 UTC (permalink / raw)
To: devel-distro
On Mon, Sep 12, 2022 at 11:09:50PM +0700, Антон Мидюков wrote:
> > +++ b/features.in/live/live/image-scripts.d/50-runapp
> Не надо выполнять, если нет пакета livecd-runapp
> или не задана переменная LIVE_RUNAPP_BINARY:
>
> +[ rpm -q livecd-runapp ] || exit 0
> +[ -n "$GLOBAL_LIVE_RUNAPP_BINARY" ] || exit 0
Согласен, опять же прошу поправить при приёме.
Спасибо за такое внимание :)
--
---- WBR, Michael Shigorin / http://altlinux.org
------ http://opennet.ru / http://anna-news.info
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel-distro] [PATCH 1/2] live: add use/live/runapp
2022-09-12 16:21 ` Michael Shigorin
@ 2022-09-12 18:17 ` Антон Мидюков
2022-09-12 18:39 ` Michael Shigorin
0 siblings, 1 reply; 9+ messages in thread
From: Антон Мидюков @ 2022-09-12 18:17 UTC (permalink / raw)
To: devel-distro
12.09.2022 23:21, Michael Shigorin пишет:
> On Mon, Sep 12, 2022 at 11:09:50PM +0700, Антон Мидюков wrote:
>>> +++ b/features.in/live/live/image-scripts.d/50-runapp
>> Не надо выполнять, если нет пакета livecd-runapp
>> или не задана переменная LIVE_RUNAPP_BINARY:
>>
>> +[ rpm -q livecd-runapp ] || exit 0
>> +[ -n "$GLOBAL_LIVE_RUNAPP_BINARY" ] || exit 0
>
> Согласен, опять же прошу поправить при приёме.
> Спасибо за такое внимание :)
>
Хорошо. Только я написал, не подумав и не проверив. Вот так надо:
+rpm -q livecd-runapp || exit 0
+[ -n "${GLOBAL_LIVE_RUNAPP_BINARY:-}" ] || exit 0
Коммиты в ветке next:
https://git.altlinux.org/people/antohami/packages/mkimage-profiles.git?p=mkimage-profiles.git;a=shortlog;h=refs/heads/next
--
С уважением, Антон Мидюков <antohami@altlinux.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [devel-distro] [PATCH 1/2] live: add use/live/runapp
2022-09-12 18:17 ` Антон Мидюков
@ 2022-09-12 18:39 ` Michael Shigorin
0 siblings, 0 replies; 9+ messages in thread
From: Michael Shigorin @ 2022-09-12 18:39 UTC (permalink / raw)
To: devel-distro
On Tue, Sep 13, 2022 at 01:17:16AM +0700, Антон Мидюков wrote:
> >> +[ rpm -q livecd-runapp ] || exit 0
> > Согласен, опять же прошу поправить при приёме.
> Хорошо. Только я написал, не подумав и не проверив. Вот так надо:
> +rpm -q livecd-runapp || exit 0
Ага, а я уже старею -- глаз дёрнулся, но руки тоже не проверили.
> Коммиты в ветке next:
> https://git.altlinux.org/people/antohami/packages/mkimage-profiles.git?p=mkimage-profiles.git;a=shortlog;h=refs/heads/next
Спасибо!
--
---- WBR, Michael Shigorin / http://altlinux.org
------ http://opennet.ru / http://anna-news.info
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-09-12 18:39 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 17:33 [devel-distro] [PATCH 0/2] live-blender.iso и отсюда use/live/runapp Michael Shigorin
2022-09-11 17:33 ` [devel-distro] [PATCH 1/2] live: add use/live/runapp Michael Shigorin
2022-09-12 16:09 ` Антон Мидюков
2022-09-12 16:21 ` Michael Shigorin
2022-09-12 18:17 ` Антон Мидюков
2022-09-12 18:39 ` Michael Shigorin
2022-09-11 17:33 ` [devel-distro] [PATCH 2/2] live.mk: initial distro/live-blender Michael Shigorin
2022-09-12 16:07 ` Антон Мидюков
2022-09-12 16:17 ` Michael Shigorin
ALT Linux Distributions development
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel-distro/0 devel-distro/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel-distro devel-distro/ http://lore.altlinux.org/devel-distro \
devel-distro@lists.altlinux.org devel-distro@lists.altlinux.ru devel-distro@lists.altlinux.com
public-inbox-index devel-distro
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel-distro
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git