mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-30 16:14:13 +00:00
depot/sculpt: support for index files
The input for the pkg index is located at gems/run/sculpt/index. The sculpt.run script uses this input for generating the depot index file at depot/<user>/index/<version>. The tool/depot/publish tool support arguments of the form <user>/index/<version> where <version> corresponds to the Sculpt version. Issue #3172
This commit is contained in:
parent
0d5b8cb0fe
commit
1b518965cc
@ -500,17 +500,6 @@ puts $fd "[sculpt_version]"
|
|||||||
close $fd
|
close $fd
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Assemble 'depot_users.tar' with the keys and download locations of the
|
|
||||||
# depot user found at genode/depot/.
|
|
||||||
#
|
|
||||||
set depot_users_files [exec sh -c "cd [genode_dir]; \
|
|
||||||
find depot -maxdepth 3 -name pubkey \
|
|
||||||
-or -name download"]
|
|
||||||
exec sh -c "tar cf [run_dir]/genode/depot_users.tar -C [genode_dir] \
|
|
||||||
[join $depot_users_files]"
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Depot packages to be included in the default installation
|
# Depot packages to be included in the default installation
|
||||||
#
|
#
|
||||||
@ -599,6 +588,41 @@ exec tar cf [run_dir]/genode/launcher.tar -C [run_dir]/genode launcher
|
|||||||
exec rm -r [run_dir]/genode/launcher
|
exec rm -r [run_dir]/genode/launcher
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate depot index from gems/run/sculpt/index
|
||||||
|
#
|
||||||
|
set fd [open [genode_dir]/repos/gems/run/sculpt/index r]
|
||||||
|
set pkg_index [read $fd]
|
||||||
|
close $fd
|
||||||
|
|
||||||
|
# filter 'pkg' attribute
|
||||||
|
set pattern {(\<pkg[^\>]+?path=")([^/]+)(")}
|
||||||
|
while {[regexp $pattern $pkg_index dummy head pkg tail]} {
|
||||||
|
set pkg_path [depot_user]/pkg/[current_pkg $pkg]
|
||||||
|
regsub $pattern $pkg_index "$head$pkg_path$tail" pkg_index
|
||||||
|
}
|
||||||
|
|
||||||
|
# write filtered pkg index into the depot
|
||||||
|
file mkdir [depot_dir]/[depot_user]/index
|
||||||
|
set fd [open [depot_dir]/[depot_user]/index/[sculpt_version] w]
|
||||||
|
puts $fd $pkg_index
|
||||||
|
close $fd
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Assemble 'depot_users.tar' with the keys and download locations of the
|
||||||
|
# depot user found at genode/depot/.
|
||||||
|
#
|
||||||
|
# Add current depot index of [depot_user] as generated above.
|
||||||
|
#
|
||||||
|
set depot_users_files [exec sh -c "cd [genode_dir]; \
|
||||||
|
find depot -maxdepth 3 -name pubkey \
|
||||||
|
-or -name download"]
|
||||||
|
exec sh -c "tar cf [run_dir]/genode/depot_users.tar -C [genode_dir] \
|
||||||
|
[join $depot_users_files] \
|
||||||
|
depot/[depot_user]/index/[sculpt_version]"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create boot image
|
# Create boot image
|
||||||
#
|
#
|
||||||
|
27
repos/gems/run/sculpt/index
Normal file
27
repos/gems/run/sculpt/index
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<index>
|
||||||
|
|
||||||
|
<index name="GUI">
|
||||||
|
<pkg path="sticks_blue_backdrop" info="default desktop background"/>
|
||||||
|
<pkg path="themed_wm" info="ready-to-use window manager"/>
|
||||||
|
<pkg path="fonts_fs" info="font provider"/>
|
||||||
|
<pkg path="wm" info="window manager"/>
|
||||||
|
<pkg path="motif_decorator" info="Motif-style window decorator"/>
|
||||||
|
<pkg path="themed_decorator" info="modern-looking window decorator"/>
|
||||||
|
<pkg path="window_layouter" info="default window layouter"/>
|
||||||
|
</index>
|
||||||
|
|
||||||
|
<index name="Tools">
|
||||||
|
<pkg path="noux-system" info="command-line interface to the system"/>
|
||||||
|
<pkg path="qt5_textedit" info="Qt5-based text editor"/>
|
||||||
|
<pkg path="report_dump" info="save periodic snapshots of the report fs"/>
|
||||||
|
</index>
|
||||||
|
|
||||||
|
<index name="Demos">
|
||||||
|
<pkg path="nano3d" info="simple software-rendering demo"/>
|
||||||
|
</index>
|
||||||
|
|
||||||
|
<index name="Virtual machines">
|
||||||
|
<pkg path="vbox5-nova-sculpt" info="VBox5 for running Linux"/>
|
||||||
|
</index>
|
||||||
|
|
||||||
|
</index>
|
@ -56,9 +56,31 @@ endif
|
|||||||
dependencies_error:
|
dependencies_error:
|
||||||
@$(DEPENDENCIES_CMD)
|
@$(DEPENDENCIES_CMD)
|
||||||
|
|
||||||
|
TARGETS += $(addsuffix .tar.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(ARCHIVES)))
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generate compressed and signed archives
|
# Determine to-be-published index files from MAKECMDGOALS
|
||||||
|
#
|
||||||
|
|
||||||
|
INDEX_FILES := $(foreach A,$(MAKECMDGOALS),\
|
||||||
|
$(if $(call archive_has_type,$A,index),$A,))
|
||||||
|
|
||||||
|
INDEX_FILES_MISSING := $(sort $(foreach I, $(INDEX_FILES),\
|
||||||
|
$(if $(wildcard $(DEPOT_DIR)/$I),,$I)))
|
||||||
|
|
||||||
|
ifneq ($(INDEX_FILES_MISSING),)
|
||||||
|
$(MAKECMDGOALS): index_missing_error
|
||||||
|
else
|
||||||
|
TARGETS += $(addsuffix .xz.sig,$(addprefix $(PUBLIC_DIR)/,$(INDEX_FILES)))
|
||||||
|
endif
|
||||||
|
|
||||||
|
index_missing_error:
|
||||||
|
@echo "Error: missing depot content: $(INDEX_FILES_MISSING)"; false
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate compressed and signed archives and index files
|
||||||
#
|
#
|
||||||
|
|
||||||
include $(GENODE_DIR)/tool/depot/mk/gpg.inc
|
include $(GENODE_DIR)/tool/depot/mk/gpg.inc
|
||||||
@ -68,20 +90,25 @@ MISSING_PUBKEY_FILES := $(sort \
|
|||||||
$(if $(call pubkey_path,$A),,\
|
$(if $(call pubkey_path,$A),,\
|
||||||
$(DEPOT_DIR)/$(call pubkey_filename,$A))))
|
$(DEPOT_DIR)/$(call pubkey_filename,$A))))
|
||||||
|
|
||||||
TARGETS := $(addsuffix .tar.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(ARCHIVES)))
|
$(PUBLIC_DIR)/%.xz.sig : $(PUBLIC_DIR)/%.xz
|
||||||
|
|
||||||
$(PUBLIC_DIR)/%.tar.xz.sig : $(PUBLIC_DIR)/%.tar.xz
|
|
||||||
$(VERBOSE)rm -f $@;
|
$(VERBOSE)rm -f $@;
|
||||||
$(VERBOSE)$(GPG) --detach-sign --digest-algo SHA256 --no-tty --use-agent \
|
$(VERBOSE)$(GPG) --detach-sign --digest-algo SHA256 --no-tty --use-agent \
|
||||||
--local-user $(call pubkey_id,$*) - < $< > $@
|
--local-user $(call pubkey_id,$*) - < $< > $@
|
||||||
|
|
||||||
.PRECIOUS: $(TARGETS:.tar.xz.sig=.tar.xz)
|
.PRECIOUS: $(TARGETS:.xz.sig=.xz)
|
||||||
|
|
||||||
|
# archive
|
||||||
$(PUBLIC_DIR)/%.tar.xz: $(DEPOT_DIR)/%
|
$(PUBLIC_DIR)/%.tar.xz: $(DEPOT_DIR)/%
|
||||||
@$(ECHO) "$(DARK_COL)publish$(DEFAULT_COL) $@"
|
@$(ECHO) "$(DARK_COL)publish$(DEFAULT_COL) $@"
|
||||||
$(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@)
|
$(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@)
|
||||||
$(VERBOSE)tar cJf $@ -C $(dir $<) $(notdir $<)
|
$(VERBOSE)tar cJf $@ -C $(dir $<) $(notdir $<)
|
||||||
|
|
||||||
|
# index file
|
||||||
|
$(PUBLIC_DIR)/%.xz: $(DEPOT_DIR)/%
|
||||||
|
@$(ECHO) "$(DARK_COL)publish$(DEFAULT_COL) $@"
|
||||||
|
$(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@)
|
||||||
|
$(VERBOSE)xz <$< >$@
|
||||||
|
|
||||||
ifneq ($(MISSING_PUBKEY_FILES),)
|
ifneq ($(MISSING_PUBKEY_FILES),)
|
||||||
$(MAKECMDGOALS) $(TARGETS): missing_pubkey_files
|
$(MAKECMDGOALS) $(TARGETS): missing_pubkey_files
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user