Bug 44561 - Зависает сборка с make 4.4.0, если заданы THE_GROUPS или MAIN_GROUPS
Summary: Зависает сборка с make 4.4.0, если заданы THE_GROUPS или MAIN_GROUPS
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: mkimage-profiles (show other bugs)
Version: unstable
Hardware: all Linux
: P5 critical
Assignee: Антон Мидюков
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-06 19:55 MSK by Антон Мидюков
Modified: 2022-12-30 21:19 MSK (History)
8 users (show)

See Also:


Attachments
Защита функций от спонтанного выполнения в make-4.4 (3.91 KB, patch)
2022-12-21 21:08 MSK, Антон Мидюков
no flags Details | Diff
Защита функций от спонтанного выполнения в make-4.4 (3.99 KB, patch)
2022-12-22 18:10 MSK, Антон Мидюков
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Антон Мидюков 2022-12-06 19:55:42 MSK
Зависает сборка с make 4.4.0, если заданы THE_GROUPS или MAIN_GROUPS.

В image.in/functions.mk зависает код:

# prefix/suffix group name to form a path (relative/absolute)
rgroup = $(1:%=groups/%.directory)
group  = $(addprefix $(PKGDIR)/,$(call rgroup,$(1)))

# map first argument (a function) onto second one (an argument list)
map = $(foreach a,$(2),$(call $(1),$(a)))

# happens at least twice, and variables are the same by design
groups2lists = $(shell $(groups2lists_body))
define groups2lists_body
{ if [ -n "$(THE_GROUPS)$(MAIN_GROUPS)" ]; then \
	  sed -rn 's,^X-Alterator-PackageList=(.*)$$,\1,p' \
		$(call map,group,$(THE_GROUPS) $(MAIN_GROUPS)) | \
		sed 's/;/\n/g'; \
fi; }
endef

https://github.com/altlinux/mkimage-profiles/blob/sisyphus/image.in/functions.mk

В логе много сообщений:

sed: can't read /groups/tools/diag.directory: No such file or directory

и зависание.

О проблеме:
https://bugzilla.altlinux.org/show_bug.cgi?id=44226#c6

Но я так и не понял пока, как тут подправить надо.
Comment 1 Антон Мидюков 2022-12-21 21:08:58 MSK
Created attachment 12132 [details]
Защита функций от спонтанного выполнения в make-4.4

Заменил

VAR = <code>

на

define VAR
$(if $(filter VAR,$(0)),<code>
endef

Так у меня работает.
Comment 2 Антон Мидюков 2022-12-22 18:10:28 MSK
Created attachment 12139 [details]
Защита функций от спонтанного выполнения в make-4.4
Comment 3 Repository Robot 2022-12-30 21:19:27 MSK
mkimage-profiles-1.5.0-alt1 -> sisyphus:

 Fri Dec 30 2022 Anton Midyukov <antohami@altlinux> 1.5.0-alt1
 - Updating lists for riscv64 (thanks iv@)
 - check conditions of make for equality of variables with an empty value
 - Set variable BRANCH, if not defined or empty; show $BRANCH
 - Add STDOUT option to output log to stdout
 - reports.mk: archive report with REPORT=2
 - profile.mk: do not cleanup BUILDDIR, which is a symlink
 - use/dev: Fix: Enable hasher-privd by default (thanks manowar@)
 - regular.mk: set KFLAVOUR un-def for jeos in Sisyphus
 - regular.mk: add drm kernel moules + firmware to initrd for all
 - regular.mk: net-install is available for alles BRANCH
 - grub: drop $linux_suffix in *.cfg
 - grub: add ip=dhcp to bootargs in 88netinstall.cfg
 - sound: use wireplumber instead pipewire-media-session for pipewire in
   Sisyphus (request by aris@)
 - uboot: add u-boot-rpi3 to list
 - image.in/functions.mk: protect the code from spontaneous execution
   (Closes: 44561)
 - regular.mk: add use/efi/dtb
 - education: add latest commits (from cas@)
 - workstation: add latest commits (from sem@)
 - alt-server: add latest commits (from jqt4)
 - slinux: Add pam_gnome-keyring (from jqt4)