From 5ef0d5b2bc7b80840fde82ccccdf32a8f418d223 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 28 May 2025 11:11:49 +0300 Subject: [PATCH 01/30] chore(core): improve build and add libswtpm Signed-off-by: Nikita Korolev cdi-artifact: copy source code to src dir Signed-off-by: Nikita Korolev fix render package templates Signed-off-by: Nikita Korolev add Version func and refactor func process_packages_images Signed-off-by: Nikita Korolev rm .werf/werf.inc.yaml1 Signed-off-by: Nikita Korolev fix tmpl Signed-off-by: Nikita Korolev upd templae Versions Signed-off-by: Nikita Korolev process_packages_images fix .Files.Glob Signed-off-by: Nikita Korolev add goproxy Signed-off-by: Nikita Korolev chore(ci): add audit, dvcr, importer, uploader to svace (#1131) Signed-off-by: Maksim Fedotov fix new packages Signed-off-by: Nikita Korolev refactor pkg gmp Signed-off-by: Nikita Korolev fix vars for 4 pkgs Signed-off-by: Nikita Korolev fix cdi-artifact branch version Signed-off-by: Nikita Korolev cdi-artifact fix copy patches Signed-off-by: Nikita Korolev cdi-art fix patch apply Signed-off-by: Nikita Korolev fix pkg image foe cdi-importer Signed-off-by: Nikita Korolev --- .werf/defines/helpers.tmpl | 145 +++++++++++++ .werf/defines/image-digest.tmpl | 34 +++ .werf/defines/parse-base-images-map.tmpl | 22 +- .werf/defines/process-images.tmpl | 50 +++++ .werf/defines/process-packages-images.tmpl | 52 +++++ .../defines/virtualization-src-artifact.tmpl | 21 ++ .werf/images.yaml | 61 +----- .werf/packages.yaml | 59 ------ component_versions/version_map.yml | 1 + images/base-alt-p11-binaries/werf.inc.yaml | 8 +- images/base-alt-p11/werf.inc.yaml | 6 +- images/bounder/werf.inc.yaml | 13 +- images/cdi-apiserver/werf.inc.yaml | 6 +- images/cdi-artifact/werf.inc.yaml | 48 ++++- images/cdi-cloner/werf.inc.yaml | 25 ++- images/cdi-controller/werf.inc.yaml | 14 +- images/cdi-importer/werf.inc.yaml | 14 +- images/cdi-operator/werf.inc.yaml | 6 +- images/distroless/werf.inc.yaml | 8 +- images/dvcr-artifact/werf.inc.yaml | 16 +- images/dvcr-importer/werf.inc.yaml | 6 +- images/dvcr-uploader/werf.inc.yaml | 6 +- images/dvcr/werf.inc.yaml | 46 +++-- images/edk2/werf.inc.yaml | 109 ++++++---- images/hooks/werf.inc.yaml | 22 +- images/kube-api-rewriter/werf.inc.yaml | 13 +- images/libvirt/werf.inc.yaml | 193 +++++++++--------- images/packages/binaries/acl/werf.inc.yaml | 33 ++- images/packages/binaries/bzip2/werf.inc.yaml | 35 +++- .../packages/binaries/dmidecode/werf.inc.yaml | 34 ++- images/packages/binaries/dtc/werf.inc.yaml | 8 +- images/packages/binaries/file/werf.inc.yaml | 35 +++- images/packages/binaries/fuse3/werf.inc.yaml | 8 +- images/packages/binaries/glib2/werf.inc.yaml | 33 ++- images/packages/binaries/glibc/werf.inc.yaml | 34 ++- images/packages/binaries/gmp/werf.inc.yaml | 32 ++- images/packages/binaries/gnutls/werf.inc.yaml | 59 +++++- .../packages/binaries/libattr/werf.inc.yaml | 8 +- .../packages/binaries/libaudit/werf.inc.yaml | 8 +- .../packages/binaries/libblkid/werf.inc.yaml | 8 +- .../packages/binaries/libbrotli/werf.inc.yaml | 8 +- images/packages/binaries/libbsd/werf.inc.yaml | 8 +- .../packages/binaries/libburn/werf.inc.yaml | 8 +- .../packages/binaries/libgcrypt/werf.inc.yaml | 8 +- .../packages/binaries/libtpms/werf.inc.yaml | 72 +++++++ images/packages/binaries/lvm2/werf.inc.yaml | 8 +- images/packages/binaries/nbdkit/werf.inc.yaml | 34 ++- .../packages/binaries/nftables/werf.inc.yaml | 33 ++- .../packages/binaries/numactl/werf.inc.yaml | 33 ++- .../packages/binaries/openssl/werf.inc.yaml | 35 +++- images/packages/binaries/swtpm/werf.inc.yaml | 59 +++--- .../packages/binaries/xorriso/werf.inc.yaml | 33 ++- images/packages/werf.inc.yaml | 1 + images/pre-delete-hook/werf.inc.yaml | 12 +- images/qemu/werf.inc.yaml | 124 ++++++----- images/src-artifact/werf.inc.yaml | 4 + images/svace-builder/werf.inc.yaml | 10 +- images/virt-api/werf.inc.yaml | 8 +- images/virt-artifact/werf.inc.yaml | 40 +++- images/virt-controller/werf.inc.yaml | 8 +- images/virt-handler/werf.inc.yaml | 30 ++- images/virt-launcher/werf.inc.yaml | 78 ++++--- images/virt-operator/werf.inc.yaml | 8 +- images/virtualization-api/werf.inc.yaml | 6 +- images/virtualization-artifact/werf.inc.yaml | 10 +- images/virtualization-audit/werf.inc.yaml | 6 +- .../virtualization-controller/werf.inc.yaml | 6 +- images/vm-route-forge/werf.inc.yaml | 16 +- werf-giterminism.yaml | 4 +- werf.yaml | 16 +- 70 files changed, 1357 insertions(+), 708 deletions(-) create mode 100644 .werf/defines/helpers.tmpl create mode 100644 .werf/defines/image-digest.tmpl create mode 100644 .werf/defines/process-images.tmpl create mode 100644 .werf/defines/process-packages-images.tmpl create mode 100644 .werf/defines/virtualization-src-artifact.tmpl delete mode 100644 .werf/packages.yaml create mode 100644 images/packages/binaries/libtpms/werf.inc.yaml create mode 100644 images/packages/werf.inc.yaml create mode 100644 images/src-artifact/werf.inc.yaml diff --git a/.werf/defines/helpers.tmpl b/.werf/defines/helpers.tmpl new file mode 100644 index 0000000000..8c7eb071a2 --- /dev/null +++ b/.werf/defines/helpers.tmpl @@ -0,0 +1,145 @@ +{{/* +Add {{.ModulePath }}modules/999-{{ .ModuleName }} if set .ModulePath + +Usage "PreffixPath": + +git: +- add: {{ include "PreffixPath" . }}/{{ $.ImageName }} +# /modules/999-virtualization/{{ $.ImageName }} +# /{{ $.ImageName }} + +- add: {{ include "PreffixPath" . }}/src +# /modules/999-virtualization/src +# /src +*/}} + +{{ define "PreffixPath" }} +{{- $FullPath := "" -}} +{{- if .ModuleName -}} +{{- $FullPath = (printf "/modules/%s-%s" .ModulePriority .ModuleName) -}} +{{- if .ModulePath -}} +{{- $FullPath = (printf "%smodules/%s-%s" .ModulePath .ModulePriority .ModuleName) -}} +{{- end -}} +{{- end -}} +{{- $FullPath -}} +{{ end }} + +{{/* +Helpers for generate images name with or without ModuleName +.ImageName - folder name +"suffix" - optional, if set, then image name will be .ImageName-suffix + +Usage "ImageName": +.ImageName := "cdi-artifact" + +{{ include "ImageName" (tuple . .ImageName) }} +With set .ModuleName: virtualization/cdi-artifact +Without .ModuleName: cdi-artifact + +{{ include "ImageName" (tuple . .ImageName "src") }} +With set .ModuleName: virtualization/cdi-artifact-src +Without .ModuleName: cdi-artifact-src + +{{ include "ImageName" (tuple . "dvcr-artifact") }} +With set .ModuleName: virtualization/dvcr-artifact +Without .ModuleName: cdi-artifact + +{{ include "ImageName" (tuple . "dvcr-artifact" "cbuilder") }} +With set .ModuleName: virtualization/dvcr-artifact-cbuilder +Without .ModuleName: dvcr-artifact-cbuilder +*/}} + +{{ define "ImageName" }} + +{{- $ctx := . -}} +{{- $ImageName := "" -}} +{{- $ImageNameSuffix := "" -}} + +{{- if (kindIs "slice" .) -}} +{{- $ctx = index . 0 -}} +{{- if ge (len .) 2 -}} +{{- $ImageName = index . 1 -}} +{{- end -}} +{{- if ge (len .) 3 -}} +{{- $ImageNameSuffix = index . 2 -}} +{{- end -}} +{{- else -}} +{{- fail "Should be slice of 2 or 3 elem" }} +{{- end -}} + + +{{- include "ModuleNamePreffix" $ctx -}} +{{- $ImageName -}} +{{- if $ImageNameSuffix }}-{{ $ImageNameSuffix }}{{ end -}} + +{{ end }} + +{{ define "ModuleNamePreffix" }} +{{- if .ModuleName }}{{ .ModuleName }}/{{ end -}} +{{ end }} + +{{/* +Same as ImageName +*/}} + +{{ define "PkgImageName" }} + +{{- $ctx := . -}} +{{- $ImageName := "" -}} +{{- $ImageNameSuffix := "" -}} + +{{- if (kindIs "slice" .) -}} +{{- $ctx = index . 0 -}} +{{- if ge (len .) 2 -}} +{{- $ImageName = index . 1 -}} +{{- end -}} +{{- if ge (len .) 3 -}} +{{- $ImageNameSuffix = index . 2 -}} +{{- end -}} +{{- else -}} +{{- fail "Should be slice of 2 or 3 elem" }} +{{- end -}} + +{{- include "PkgModuleNamePreffix" $ctx -}} +{{- $ImageName -}} +{{- if $ImageNameSuffix }}-{{ $ImageNameSuffix }}{{ end -}} + +{{ end }} + +{{ define "PkgModuleNamePreffix" }} +{{- if .PkgModuleName }}{{ .PkgModuleName }}/{{ end -}} +{{ end }} + +{{/*========*/}} +{{/* +Add new vars (Version and Package) in current context for build virt +*/}} + +{{ define "virtualization software versions" }} +{{- if and (eq .ModuleName "virtualization") (not (hasKey . "Version")) -}} +{{ include "Versions" . }} +{{- end -}} +{{ end }} + +{{ define "Versions" }} + +{{- $_ := set . "Version" dict -}} +{{- $_ := set . "Package" dict -}} +{{- $versions_path := "component_versions/version_map.yml" -}} + +{{- if .ModuleName -}} +{{- $module_versions_ctx := (printf "%smodules/%s-%s/" .ModulePath .ModulePriority .ModuleName ) }} +{{- $versions_path = (printf "%s%s" $module_versions_ctx $versions_path) -}} +{{- end -}} + +{{- $versions_ctx := (.Files.Get $versions_path | fromYaml) -}} + +{{- range $k, $v := $versions_ctx.firmware -}} +{{- $_ := set $.Version $k $v -}} +{{- end -}} + +{{- range $k, $v := $versions_ctx.package -}} +{{- $_ := set $.Package $k $v -}} +{{- end -}} + +{{ end }} diff --git a/.werf/defines/image-digest.tmpl b/.werf/defines/image-digest.tmpl new file mode 100644 index 0000000000..1ef649b3ce --- /dev/null +++ b/.werf/defines/image-digest.tmpl @@ -0,0 +1,34 @@ +{{/* +{{ define "images_digest_image" }} +{{- $context := . -}} + +--- +image: images-digests +fromImage: builder/alpine +dependencies: + {{- range $imageDigest := $context.ImagesDigestList }} + {{- $ImageNameCamel := $imageDigest | splitList "/" | last | camelcase | untitle }} +- image: {{ $imageDigest }} + before: setup + imports: + - type: ImageDigest + targetEnv: MODULE_IMAGE_DIGEST_{{ $ImageNameCamel }} + {{- end }} +shell: + beforeInstall: + - apk add --no-cache jq + setup: + - | + env | grep MODULE_IMAGE_DIGEST | jq -Rn ' + reduce inputs as $i ( + {}; + . * ( + $i | ltrimstr("MODULE_IMAGE_DIGEST_") | sub("=";"_") | + split("_") as [$imageName, $digest] | + {($imageName): $digest} + ) + ) + ' > /images_digests.json + cat images_digests.json +{{ end }} +*/}} \ No newline at end of file diff --git a/.werf/defines/parse-base-images-map.tmpl b/.werf/defines/parse-base-images-map.tmpl index 158127c451..a471e5c179 100644 --- a/.werf/defines/parse-base-images-map.tmpl +++ b/.werf/defines/parse-base-images-map.tmpl @@ -1,24 +1,24 @@ {{- define "parse_base_images_map" }} - {{- $virtualizationImages := .Files.Get "base-images/virtualization_images.yml" | fromYaml }} - {{- $deckhouseImages := .Files.Get "base-images/deckhouse_images.yml" | fromYaml }} + {{- $virtualizationImages := .Files.Get "base-images/virtualization_images.yml" | fromYaml -}} + {{- $deckhouseImages := .Files.Get "base-images/deckhouse_images.yml" | fromYaml -}} # virtualizationImages have image format: # BASE_IMAGE: "@sha256abcde12345 {{- range $k, $v := $virtualizationImages }} - {{ $baseImagePath := (printf "%s%s" $virtualizationImages.REGISTRY_PATH (trimSuffix "/" $v)) }} - {{- if ne $k "REGISTRY_PATH" }} - {{- $_ := set $virtualizationImages $k $baseImagePath }} - {{- end }} + {{ $baseImagePath := (printf "%s%s" $virtualizationImages.REGISTRY_PATH (trimSuffix "/" $v)) -}} + {{- if ne $k "REGISTRY_PATH" -}} + {{- $_ := set $virtualizationImages $k $baseImagePath -}} + {{- end -}} {{- end }} {{- $_ := unset $virtualizationImages "REGISTRY_PATH" }} # deckhouse_images has a format # /: "sha256:abcde12345 - {{- range $k, $v := $deckhouseImages }} - {{ $baseImagePath := (printf "%s@%s" $deckhouseImages.REGISTRY_PATH (trimSuffix "/" $v)) }} - {{- if ne $k "REGISTRY_PATH" }} - {{- $_ := set $deckhouseImages $k $baseImagePath }} - {{- end }} + {{- range $k, $v := $deckhouseImages -}} + {{ $baseImagePath := (printf "%s@%s" $deckhouseImages.REGISTRY_PATH (trimSuffix "/" $v)) -}} + {{- if ne $k "REGISTRY_PATH" -}} + {{- $_ := set $deckhouseImages $k $baseImagePath -}} + {{- end -}} {{- end }} {{- $_ := unset $deckhouseImages "REGISTRY_PATH" }} diff --git a/.werf/defines/process-images.tmpl b/.werf/defines/process-images.tmpl new file mode 100644 index 0000000000..b5870bc479 --- /dev/null +++ b/.werf/defines/process-images.tmpl @@ -0,0 +1,50 @@ +{{/* # Common dirs */}} +{{- define "module_image_template" }} +{{- tpl .ImageBuildData . | nindent 0 }} +{{- end }} + +{{ define "process_images" }} + +{{/* # Context inside folder images */}} +{{- $Root := . }} + +{{ $ImagesBuildFiles := .Files.Glob "images/*/{Dockerfile,werf.inc.yaml}" }} + +{{- range $path, $content := $ImagesBuildFiles }} + +{{- $ctx := dict }} +{{- $_ := set $ctx "ImageInstructionType" "Stapel" }} + +{{- $ImageData := regexReplaceAll "^images/([0-9a-z-_]+)/(Dockerfile|werf.inc.yaml)$" $path "${1}#${2}" | split "#" }} + +{{- $_ := set $ctx "ImageName" $ImageData._0 }} +{{- $_ := set $ctx "ImageBuildData" $content }} +{{- $_ := set $ctx "Files" $Root.Files }} +{{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }} +{{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }} +{{- $_ := set $ctx "MODULE_EDITION" $Root.MODULE_EDITION }} +{{- $_ := set $ctx "Version" $Root.Version }} +{{- $_ := set $ctx "Package" $Root.Package }} +{{- $_ := set $ctx "GOPROXY" (env "GOPROXY" "https://proxy.golang.org,direct") }} +{{- $_ := set $ctx "ProjectName" $ctx.ImageName }} +{{- $_ := set $ctx "Commit" $Root.Commit }} +{{- $_ := set $ctx "SVACE_ENABLED" $Root.SVACE_ENABLED }} +{{- $_ := set $ctx "SVACE_ANALYZE_SSH_USER" $Root.SVACE_ANALYZE_SSH_USER }} +{{- $_ := set $ctx "SVACE_ANALYZE_HOST" $Root.SVACE_ANALYZE_HOST }} +{{- $_ := set $ctx "SVACE_IMAGE_SUFFIX" $Root.SVACE_IMAGE_SUFFIX }} + + +{{- include "module_image_template" $ctx }} + +{{- range $ImageYamlMainfest := regexSplit "\n?---[ \t]*\n" (include "module_image_template" $ctx) -1 }} +{{- $ImageManifest := $ImageYamlMainfest | fromYaml }} +{{- if $ImageManifest | dig "final" true }} +{{- if $ImageManifest.image }} +{{- $_ := set $ "ImagesIDList" (append $.ImagesIDList $ImageManifest.image) }} +{{- end }} +{{- end }} +{{- end }} + +{{- end }} + +{{- end }} \ No newline at end of file diff --git a/.werf/defines/process-packages-images.tmpl b/.werf/defines/process-packages-images.tmpl new file mode 100644 index 0000000000..2422f6d57b --- /dev/null +++ b/.werf/defines/process-packages-images.tmpl @@ -0,0 +1,52 @@ +{{/* +# Parse variables for images from their path. +# for example: `packages/binaries/swtpm/werf.inc.yaml` turns into +# ImageType: packages/binaries +# ImageName: swtpm +*/}} + +{{ define "process_packages_images" }} +{{- $Root := . }} + +{{/*{{- $packageImagePathRegex := "^images/(packages)/([0-9a-z-_]+)/([0-9a-z-_]+)/(werf.inc.yaml)$" }}*/}} +{{- $packageImagePathGlob := "images/packages/*/*/{Dockerfile,werf.inc.yaml}" }} +{{- $packageImagePathRegex := "images/(packages)/([0-9a-z-_]+)/([0-9a-z-_]+)/(werf.inc.yaml)$" }} + +{{- if $Root.ModuleName -}} +{{- $modulePath := (printf "%smodules/%s-%s/" $Root.ModulePath $Root.ModulePriority $Root.ModuleName ) }} +{{- $packageImagePathGlob = (printf "%s%s" $modulePath $packageImagePathGlob) -}} +{{- end -}} + +{{ $ImagePackages := $Root.Files.Glob $packageImagePathGlob }} + +{{- range $path, $content := $ImagePackages }} +{{- $ctx := dict }} +{{- $_ := set $ctx "ImageInstructionType" "Stapel" }} + +{{- $ImageData := regexReplaceAll $packageImagePathRegex $path "${1}#${2}#${3}#${4}" | split "#" }} + +{{- $_ := set $ctx "PackagePath" (printf "%s/%s" $ImageData._0 $ImageData._1) }} +{{- $_ := set $ctx "ImageName" $ImageData._2 }} +{{- $_ := set $ctx "ImageBuildData" $content }} +{{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }} +{{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }} +{{- $_ := set $ctx "MODULE_EDITION" $Root.MODULE_EDITION }} +{{- $_ := set $ctx "PackageVersion" $Root.Package }} +{{- $_ := set $ctx "GOPROXY" (env "GOPROXY" "https://proxy.golang.org,direct") }} + +{{- include "module_image_template" $ctx }} + +{{- range $ImageYamlMainfest := regexSplit "\n?---[ \t]*\n" (include "module_image_template" $ctx) -1 }} +{{- $ImageManifest := $ImageYamlMainfest | fromYaml }} +{{- if $ImageManifest | dig "final" true }} +{{- if $ImageManifest.image }} +{{- $_ := set $ "ImagesIDList" (append $.ImagesIDList $ImageManifest.image) }} +{{- end }} +{{- end }} +{{- end }} + +{{- end }} + +{{- end }} + + diff --git a/.werf/defines/virtualization-src-artifact.tmpl b/.werf/defines/virtualization-src-artifact.tmpl new file mode 100644 index 0000000000..46744346e5 --- /dev/null +++ b/.werf/defines/virtualization-src-artifact.tmpl @@ -0,0 +1,21 @@ +{{/* common/src-artifact */}} + +{{ define "image-src-artifact" }} +{{- $ctx := . -}} +{{- $fromImage := "" -}} + +{{- if $ctx.ModuleName -}} +{{- $fromImage = "fromImage: common/src-artifact"}} +{{- else -}} +{{- $fromImage = "fromImage: src-artifact"}} +{{- end -}} + +image: {{ include "ImageName" (list . "src-artifact") }} +{{ $fromImage }} +final: false +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO }} +shell: + beforeInstall: +{{ end }} diff --git a/.werf/images.yaml b/.werf/images.yaml index d9259b8048..32749d078e 100644 --- a/.werf/images.yaml +++ b/.werf/images.yaml @@ -1,60 +1 @@ -# Common dirs -{{- define "module_image_template" }} - - {{- if eq .ImageInstructionType "Dockerfile" }} ---- -image: images/{{ .ImageName }} -context: images/{{ .ImageName }} -dockerfile: Dockerfile - {{- else }} - {{- tpl .ImageBuildData . | nindent 0 }} - {{- end }} - -{{- end }} - -# Context inside folder images -{{- $Root := . }} - -{{ $ImagesBuildFiles := .Files.Glob "images/*/{Dockerfile,werf.inc.yaml}" }} - -{{- range $path, $content := $ImagesBuildFiles }} - {{- $ctx := dict }} - - {{- if regexMatch "/werf.inc.yaml$" $path }} - {{- $_ := set $ctx "ImageInstructionType" "Stapel" }} - {{- else }} - {{- $_ := set $ctx "ImageInstructionType" "Dockerfile" }} - {{- end }} - - {{- $ImageData := $path | split "/" }} - - {{- $_ := set $ctx "ImageName" $ImageData._1 }} - {{- $_ := set $ctx "ImageBuildData" $content }} - {{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }} - {{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }} - {{- $_ := set $ctx "MODULE_EDITION" $Root.MODULE_EDITION }} - {{- $_ := set $ctx "Version" $Root.Version }} - {{- $_ := set $ctx "ProjectName" $ctx.ImageName }} - {{- $_ := set $ctx "Commit" $Root.Commit }} - {{- $_ := set $ctx "SVACE_ENABLED" $Root.SVACE_ENABLED }} - {{- $_ := set $ctx "SVACE_ANALYZE_SSH_USER" $Root.SVACE_ANALYZE_SSH_USER }} - {{- $_ := set $ctx "SVACE_ANALYZE_HOST" $Root.SVACE_ANALYZE_HOST }} - {{- $_ := set $ctx "SVACE_IMAGE_SUFFIX" $Root.SVACE_IMAGE_SUFFIX }} - - - {{- include "module_image_template" $ctx }} - - {{- range $ImageYamlMainfest := regexSplit "\n?---[ \t]*\n" (include "module_image_template" $ctx) -1 }} - {{- $ImageManifest := $ImageYamlMainfest | fromYaml }} - - {{- if $ImageManifest | dig "final" true }} - - {{- if $ImageManifest.image }} - {{- $_ := set $ "ImagesIDList" (append $.ImagesIDList $ImageManifest.image) }} - {{- end }} - - {{- end }} - - {{- end }} - -{{- end }} \ No newline at end of file +{{ include "process_images" . }} \ No newline at end of file diff --git a/.werf/packages.yaml b/.werf/packages.yaml deleted file mode 100644 index 355aeea4d1..0000000000 --- a/.werf/packages.yaml +++ /dev/null @@ -1,59 +0,0 @@ -{{- define "packages_template" }} - - {{- if eq .ImageInstructionType "Dockerfile" }} ---- -image: images/{{ .ImageName }} -context: images/{{ .ImageName }} -dockerfile: Dockerfile - {{- else }} - {{- tpl .ImageBuildData . | nindent 0 }} - {{- end }} - -{{- end }} - -{{- $Root := . }} - - -{{ $ImagePackages := .Files.Glob "images/packages/*/*/{Dockerfile,werf.inc.yaml}" }} -{{- range $path, $content := $ImagePackages }} - {{- $ctx := dict }} - - {{- if regexMatch "/werf.inc.yaml$" $path }} - {{- $_ := set $ctx "ImageInstructionType" "Stapel" }} - {{- else }} - {{- $_ := set $ctx "ImageInstructionType" "Dockerfile" }} - {{- end }} - -# Parse variables for images from their path. -# for example: `packages/binaries/swtpm/werf.inc.yaml` turns into -# ImageType: packages/binaries -# ImageName: swtpm - - {{- $ImageData := regexReplaceAll "^images/(packages)/([0-9a-z-_]+)/([0-9a-z-_]+)/(Dockerfile|werf.inc.yaml)$" $path "${1}#${2}#${3}#${4}" | split "#" }} - - {{- $_ := set $ctx "ImageType" (printf "%s/%s" $ImageData._0 $ImageData._1) }} - {{- $_ := set $ctx "ImageName" $ImageData._2 }} - {{- $_ := set $ctx "ImageBuildData" $content }} - {{- $_ := set $ctx "Files" $Root.Files }} - {{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }} - {{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }} - {{- $_ := set $ctx "MODULE_EDITION" $Root.MODULE_EDITION }} - {{- $_ := set $ctx "Version" $Root.Version }} - {{- $_ := set $ctx "Package" $Root.Packages }} - - {{- include "packages_template" $ctx }} - - {{- range $ImageYamlMainfest := regexSplit "\n?---[ \t]*\n" (include "packages_template" $ctx) -1 }} - {{- $ImageManifest := $ImageYamlMainfest | fromYaml }} - - {{- if $ImageManifest | dig "final" true }} - - {{- if $ImageManifest.image }} - {{- $_ := set $ "ImagesIDList" (append $.ImagesIDList $ImageManifest.image) }} - {{- end }} - - {{- end }} - - {{- end }} - -{{- end }} diff --git a/component_versions/version_map.yml b/component_versions/version_map.yml index f043403f33..49d70cbe3b 100644 --- a/component_versions/version_map.yml +++ b/component_versions/version_map.yml @@ -27,3 +27,4 @@ package: dtc: v1.7.2 fuse3: fuse-3.16.2 libgcrypt: libgcrypt-1.10.2 + libtpms: 0.10.0 diff --git a/images/base-alt-p11-binaries/werf.inc.yaml b/images/base-alt-p11-binaries/werf.inc.yaml index d7135798cb..c506c217ef 100644 --- a/images/base-alt-p11-binaries/werf.inc.yaml +++ b/images/base-alt-p11-binaries/werf.inc.yaml @@ -10,14 +10,12 @@ libraries: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: false fromImage: BASE_ALT_P11 git: - - add: /images/{{ $.ImageName }} - to: / - includePaths: - - relocate_binaries.sh + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/relocate_binaries.sh + to: /relocate_binaries.sh shell: install: {{- include "alt packages proxy" . | nindent 2 }} diff --git a/images/base-alt-p11/werf.inc.yaml b/images/base-alt-p11/werf.inc.yaml index a5e813ae97..e84dec444f 100644 --- a/images/base-alt-p11/werf.inc.yaml +++ b/images/base-alt-p11/werf.inc.yaml @@ -1,7 +1,11 @@ --- -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: false +{{- if not .ModuleName }} fromImage: BASE_ALT_P11 +{{- else }} +fromImage: builder/alt +{{- end }} shell: setup: # Create nonroot-user group and user. diff --git a/images/bounder/werf.inc.yaml b/images/bounder/werf.inc.yaml index bc100d3144..8cfcdc0fb6 100644 --- a/images/bounder/werf.inc.yaml +++ b/images/bounder/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: - - image: {{ $.ImageName }}-cbuilder + - image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} add: /bins to: /usr/local/bin after: setup @@ -10,12 +10,12 @@ imageSpec: config: cmd: ["hello_bounder"] --- -image: {{ $.ImageName }}-cbuilder +image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} final: false fromImage: builder/golang-bookworm-1.23 git: - - add: /images/{{ $.ImageName }}/static_binaries - to: / + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/static_binaries + to: /static_binaries stageDependencies: install: - '*.c' @@ -26,6 +26,7 @@ shell: {{- include "debian packages clean" . | nindent 2 }} install: - | + cd /static_binaries echo "Building simple app that prints hello cdi" mkdir -p /bins musl-gcc -static -Os -o /bins/hello_bounder hello_bounder.c diff --git a/images/cdi-apiserver/werf.inc.yaml b/images/cdi-apiserver/werf.inc.yaml index ef2f329a12..b0a4648ea7 100644 --- a/images/cdi-apiserver/werf.inc.yaml +++ b/images/cdi-apiserver/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: cdi-artifact +- image: {{ include "ImageName" (tuple . "cdi-artifact") }} add: /cdi-binaries to: /usr/bin before: setup diff --git a/images/cdi-artifact/werf.inc.yaml b/images/cdi-artifact/werf.inc.yaml index f132c404ce..0fcfe8b672 100644 --- a/images/cdi-artifact/werf.inc.yaml +++ b/images/cdi-artifact/werf.inc.yaml @@ -2,31 +2,58 @@ {{- $version := "v1.60.3-v12n.1" }} {{- $gitRepoUrl := "deckhouse/3p-containerized-data-importer" }} +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +final: false +fromImage: builder/src +git: + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} + to: /src + stageDependencies: + install: + - '**/*' + excludePaths: + - patches/README.md +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + echo "Git clone CDI repository..." + git clone --depth 1 --branch {{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /src/containerized-data-importer + + rm -rf /src/containerized-data-importer/.git + --- -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: false fromImage: builder/golang-bookworm-1.23 mount: - fromPath: ~/go-pkg-cache to: /go/pkg +import: +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /src/containerized-data-importer + to: /containerized-data-importer + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO }} +- id: GOPROXY + value: {{ .GOPROXY }} shell: beforeInstall: - {{- include "alt packages proxy" . | nindent 2 }} + {{- include "debian packages proxy" . | nindent 2 }} - | apt-get install --yes libnbd-dev - {{- include "alt packages clean" . | nindent 2 }} + {{- include "debian packages clean" . | nindent 2 }} install: - | + export GOPROXY=$(cat /run/secrets/GOPROXY) mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - echo "Git clone CDI repository..." - git config --global --add advice.detachedHead false - git clone --depth 1 --branch {{ $version }} $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} /containerized-data-importer - - | echo Download Go modules. cd /containerized-data-importer @@ -83,12 +110,14 @@ shell: - ls -la /cdi-binaries --- -image: {{ $.ImageName }}-cbuilder +image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} final: false fromImage: builder/golang-bookworm-1.23 git: - - add: /images/{{ $.ImageName }}/static_binaries + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: / + includePaths: + - static_binaries stageDependencies: install: - '*.c' @@ -99,6 +128,7 @@ shell: apt-get install --yes musl-dev musl-tools {{- include "debian packages clean" . | nindent 2 }} - | + cd /static_binaries echo "Building simple app that prints hello cdi" mkdir -p /bins musl-gcc -static -Os -o /bins/hello hello.c diff --git a/images/cdi-cloner/werf.inc.yaml b/images/cdi-cloner/werf.inc.yaml index a76e17dd46..12b868be01 100644 --- a/images/cdi-cloner/werf.inc.yaml +++ b/images/cdi-cloner/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: {{ $.ImageName }}-bins +- image: {{ include "ImageName" (tuple . .ImageName "bins") }} add: /relocate to: / before: setup @@ -21,23 +21,23 @@ binaries: {{ $virtCDIClonerDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageName }}-bins +image: {{ include "ImageName" (tuple . .ImageName "bins") }} final: false -fromImage: base-alt-p11-binaries +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} import: -- image: {{ $.ImageName }}-gobuild +- image: {{ include "ImageName" (tuple . .ImageName "gobuild") }} add: /cdi-binaries to: /usr/bin includePaths: - cloner-startup before: install -- image: cdi-artifact-cbuilder +- image: {{ include "ImageName" (tuple . "cdi-artifact-cbuilder") }} add: /bins to: /usr/bin before: install includePaths: - hello -- image: cdi-artifact +- image: {{ include "ImageName" (tuple . "cdi-artifact") }} add: /cdi-binaries to: /usr/bin includePaths: @@ -49,18 +49,23 @@ shell: - | /relocate_binaries.sh -i "{{ $virtCDIClonerDependencies.binaries | join " " }}" -o /relocate --- -image: {{ $.ImageName }}-gobuild +image: {{ include "ImageName" (tuple . .ImageName "gobuild") }} final: false fromImage: builder/golang-bookworm-1.23 git: - - add: /images/{{ $.ImageName }}/cloner-startup + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/cloner-startup to: /app stageDependencies: install: - '**/*' +secrets: +- id: GOPROXY + value: {{ .GOPROXY }} shell: install: - | mkdir -p /cdi-binaries cd /app + export GOPROXY=$(cat /run/secrets/GOPROXY) + go mod download go build -ldflags="-s -w" -o /cdi-binaries/cloner-startup ./cmd/cloner-startup diff --git a/images/cdi-controller/werf.inc.yaml b/images/cdi-controller/werf.inc.yaml index 26895bc2cc..4922452743 100644 --- a/images/cdi-controller/werf.inc.yaml +++ b/images/cdi-controller/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: {{ $.ImageName }}-bins +- image: {{ include "ImageName" (tuple . .ImageName "bins") }} add: /relocate to: / before: setup @@ -20,9 +20,9 @@ packages: {{ $cdiClonerDependencies := include "cdi-controller-deps" . | fromYaml }} -image: {{ $.ImageName }}-bins +image: {{ include "ImageName" (tuple . .ImageName "bins") }} final: false -fromImage: base-alt-p11-binaries +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} import: - image: tools/util-linux add: / @@ -30,13 +30,13 @@ import: after: setup includePaths: - sbin/blockdev -- image: cdi-artifact-cbuilder +- image: {{ include "ImageName" (tuple . "cdi-artifact" "cbuilder") }} add: /bins to: /relocate/usr/bin after: setup includePaths: - printFile -- image: cdi-artifact +- image: {{ include "ImageName" (tuple . "cdi-artifact") }} add: /cdi-binaries to: /usr/bin includePaths: diff --git a/images/cdi-importer/werf.inc.yaml b/images/cdi-importer/werf.inc.yaml index b2b7ad1b7c..91e7c13647 100644 --- a/images/cdi-importer/werf.inc.yaml +++ b/images/cdi-importer/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: {{ $.ImageName }}-bins +- image: {{ include "ImageName" (tuple . .ImageName "bins") }} add: /relocate to: / before: setup @@ -31,9 +31,9 @@ binaries: {{ $cdiImporterDependencies := include "cdi-importer-deps" . | fromYaml }} -image: {{ $.ImageName }}-bins +image: {{ include "ImageName" (tuple . .ImageName "bins") }} final: false -fromImage: base-alt-p11-binaries +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} import: - image: tools/util-linux add: / @@ -43,7 +43,7 @@ import: - sbin/blockdev - bin/mount - bin/umount -- image: cdi-artifact +- image: {{ include "ImageName" (tuple . "cdi-artifact") }} add: /cdi-binaries to: /usr/bin before: setup @@ -51,7 +51,7 @@ import: - cdi-image-size-detection - cdi-importer - cdi-source-update-poller -- image: qemu +- image: {{ include "ImageName" (tuple . "qemu") }} add: /qemu-img to: /relocate before: setup diff --git a/images/cdi-operator/werf.inc.yaml b/images/cdi-operator/werf.inc.yaml index b27884c46e..fe47bd0c04 100644 --- a/images/cdi-operator/werf.inc.yaml +++ b/images/cdi-operator/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: cdi-artifact +- image: {{ include "ImageName" (tuple . "cdi-artifact") }} add: /cdi-binaries to: /usr/bin includePaths: diff --git a/images/distroless/werf.inc.yaml b/images/distroless/werf.inc.yaml index 555e583025..4d347ed106 100644 --- a/images/distroless/werf.inc.yaml +++ b/images/distroless/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: false fromImage: builder/scratch import: - - image: {{ $.ImageName }}-artifact + - image: {{ include "ImageName" (tuple . .ImageName "artifact") }} add: /relocate to: / before: setup @@ -15,8 +15,8 @@ imageSpec: LC_ALL: POSIX user: 64535 --- -image: {{ $.ImageName }}-artifact -fromImage: base-alt-p11-binaries +image: {{ include "ImageName" (tuple . .ImageName "artifact") }} +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} final: false shell: beforeInstall: diff --git a/images/dvcr-artifact/werf.inc.yaml b/images/dvcr-artifact/werf.inc.yaml index c1b6f8a29a..2ba02a062d 100644 --- a/images/dvcr-artifact/werf.inc.yaml +++ b/images/dvcr-artifact/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ $.ImageName }}-builder +image: {{ include "ImageName" (tuple . .ImageName "builder") }} final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: -- add: /images/{{ $.ImageName }} +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: /src stageDependencies: install: @@ -11,6 +11,9 @@ git: - go.sum setup: - "**/*.go" +secrets: +- id: GOPROXY + value: {{ .GOPROXY }} shell: install: {{- include "debian packages proxy" . | nindent 2 }} @@ -20,6 +23,7 @@ shell: - mkdir /out - cd /src - | + export GOPROXY=$(cat /run/secrets/GOPROXY) export GO111MODULE=on export GOOS=linux export CGO_ENABLED=1 @@ -56,9 +60,9 @@ binaries: {{ $dvcrDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageName }}-bins +image: {{ include "ImageName" (tuple . .ImageName "bins") }} final: false -fromImage: base-alt-p11-binaries +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} import: - image: tools/util-linux add: / @@ -67,7 +71,7 @@ import: includePaths: - bin/mount - bin/umount -- image: {{ $.ImageName }}-builder +- image: {{ include "ImageName" (tuple . .ImageName "builder") }} add: /out to: /usr/local/bin before: setup @@ -84,7 +88,7 @@ import: add: /nbdkit to: /nbdkit before: install -- image: qemu +- image: {{ include "ImageName" (tuple . "qemu") }} add: /qemu-img to: /qemu-img before: install diff --git a/images/dvcr-importer/werf.inc.yaml b/images/dvcr-importer/werf.inc.yaml index 11c74b8e50..5d2fc8fde0 100644 --- a/images/dvcr-importer/werf.inc.yaml +++ b/images/dvcr-importer/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: dvcr-artifact-bins +- image: {{ include "ImageName" (tuple . "dvcr-artifact" "bins") }} add: /relocate to: / after: install diff --git a/images/dvcr-uploader/werf.inc.yaml b/images/dvcr-uploader/werf.inc.yaml index 98258c6e93..9033cc9126 100644 --- a/images/dvcr-uploader/werf.inc.yaml +++ b/images/dvcr-uploader/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: dvcr-artifact-bins +- image: {{ include "ImageName" (tuple . "dvcr-artifact" "bins") }} add: /relocate to: / after: install diff --git a/images/dvcr/werf.inc.yaml b/images/dvcr/werf.inc.yaml index 36aaeb110f..a380362826 100644 --- a/images/dvcr/werf.inc.yaml +++ b/images/dvcr/werf.inc.yaml @@ -1,15 +1,32 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +{{- $version := "2.8.3" }} +{{- $gitRepoUrl := "distribution/distribution.git" }} + +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + echo "Git clone CDI repository..." + git clone --depth 1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /distribution + +--- +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: {{ $.ImageName }}-builder +- image: {{ include "ImageName" (tuple . .ImageName "builder") }} add: /container-registry-binary to: /usr/bin before: setup includePaths: - registry # Registry configuration is stored in configmap: templates/dvcr/configmap.yaml -- image: {{ $.ImageName }}-artifact-bins +- image: {{ include "ImageName" (tuple . "dvcr-artifact" "bins") }} add: /relocate/usr/local/bin/dvcr-cleaner to: /usr/local/bin/dvcr-cleaner before: setup @@ -17,23 +34,24 @@ imageSpec: config: user: 64535 --- -{{- $version := "2.8.3" }} -{{- $gitRepoUrl := "distribution/distribution.git" }} - -image: {{ $.ImageName }}-builder +image: {{ include "ImageName" (tuple . .ImageName "builder") }} final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} mount: - fromPath: ~/go-pkg-cache to: /go/pkg +import: +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /distribution + to: /distribution + before: install secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +- id: GOPROXY + value: {{ .GOPROXY }} shell: install: - | - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - + export GOPROXY=$(cat /run/secrets/GOPROXY) export GOOS=linux export GOARCH=amd64 export CGO_ENABLED=0 @@ -47,9 +65,9 @@ shell: mkdir -p $GOPATH/src/github.com/docker cd $GOPATH/src/github.com/docker - git clone --depth 1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} + mv /distribution . cd distribution export VERSION={{ $version }} {{- $_ := set $ "ProjectName" (list $.ImageName "dvcr" | join "/") }} - {{- include "image-build.build" (set $ "BuildCommand" `go build -o /container-registry-binary/ -ldflags '-s -w -X registry/version.Version=v$VERSION -X registry/version.Revision=v$VERSION' ./cmd/registry`) | nindent 6 }} + {{- include "image-build.build" (set $ "BuildCommand" `go build -o /container-registry-binary/ -ldflags '-s -w -X registry/version.Version=v$VERSION -X registry/version.Revision=v$VERSION' ./cmd/registry`) | nindent 6 }} \ No newline at end of file diff --git a/images/edk2/werf.inc.yaml b/images/edk2/werf.inc.yaml index 422b228415..ab82c52642 100644 --- a/images/edk2/werf.inc.yaml +++ b/images/edk2/werf.inc.yaml @@ -3,41 +3,93 @@ {{- $version := get $.Version $gitRepoName }} {{- $gitRepoUrl := "tianocore/edk2.git" }} -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} final: false -fromImage: base-alt-p11 +fromImage: {{ include "ImageName" (tuple . "src-artifact") }} git: -- add: /images/{{ $.ImageName }} - to: / - includePaths: - - build.sh +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/build.sh + to: /build.sh stageDependencies: - setup: + install: - build.sh -- add: /images/{{ $.ImageName }}/logo - to: / - includePaths: - - Logo.bmp +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/logo/Logo.bmp + to: /Logo.bmp stageDependencies: - setup: + install: - '**/*' -- add: /images/{{ $.ImageName }}/json +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/json to: /FIRMWARE includePaths: - '*.json' stageDependencies: - setup: + install: - '*.json' -- add: /images/{{ $.ImageName }}/uefi-revocation-list +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/uefi-revocation-list to: /FIRMWARE includePaths: - '*.bin' stageDependencies: - setup: + install: - '*.bin' secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + echo "Git clone Edk2 repository..." + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $gitRepoName }}-{{ $version }} {{ $gitRepoName }}-{{ $version }} + + git clone $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-platforms.git + + cd /{{ $gitRepoName }}-{{ $version }} + + if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then + echo "Change submodule url" + git submodule set-url -- CryptoPkg/Library/OpensslLib/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl + git submodule set-url -- UnitTestFrameworkPkg/Library/CmockaLib/cmocka $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-cmocka.git + git submodule set-url -- MdeModulePkg/Universal/RegularExpressionDxe/oniguruma $(cat /run/secrets/SOURCE_REPO)/kkos/oniguruma.git + git submodule set-url -- MdeModulePkg/Library/BrotliCustomDecompressLib/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git + git submodule set-url -- BaseTools/Source/C/BrotliCompress/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git + git submodule set-url -- RedfishPkg/Library/JsonLib/jansson $(cat /run/secrets/SOURCE_REPO)/akheron/jansson.git + git submodule set-url -- UnitTestFrameworkPkg/Library/GoogleTestLib/googletest $(cat /run/secrets/SOURCE_REPO)/google/googletest.git + git submodule set-url -- UnitTestFrameworkPkg/Library/SubhookLib/subhook $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-subhook.git + git submodule set-url -- MdePkg/Library/BaseFdtLib/libfdt $(cat /run/secrets/SOURCE_REPO)/devicetree-org/pylibfdt.git + git submodule set-url -- MdePkg/Library/MipiSysTLib/mipisyst $(cat /run/secrets/SOURCE_REPO)/MIPI-Alliance/public-mipi-sys-t.git + git submodule set-url -- CryptoPkg/Library/MbedTlsLib/mbedtls $(cat /run/secrets/SOURCE_REPO)/Mbed-TLS/mbedtls.git + git submodule set-url -- SecurityPkg/DeviceSecurity/SpdmLib/libspdm $(cat /run/secrets/SOURCE_REPO)/DMTF/libspdm.git + fi + + git submodule update --init --recursive + +--- + +image: {{ include "ImageName" (tuple . .ImageName) }} +final: false +fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }} +import: +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /{{ $gitRepoName }}-{{ $version }} + to: /{{ $gitRepoName }}-{{ $version }} + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /edk2-platforms + to: /edk2-platforms + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /FIRMWARE + to: /FIRMWARE + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /Logo.bmp + to: /Logo.bmp + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /build.sh + to: /build.sh + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -64,30 +116,7 @@ shell: install: - | - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $gitRepoName }}-{{ $version }} {{ $gitRepoName }}-{{ $version }} - - git clone $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-platforms.git - - cd {{ $gitRepoName }}-{{ $version }} - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Change submodule url" - git submodule set-url -- CryptoPkg/Library/OpensslLib/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl - git submodule set-url -- UnitTestFrameworkPkg/Library/CmockaLib/cmocka $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-cmocka.git - git submodule set-url -- MdeModulePkg/Universal/RegularExpressionDxe/oniguruma $(cat /run/secrets/SOURCE_REPO)/kkos/oniguruma.git - git submodule set-url -- MdeModulePkg/Library/BrotliCustomDecompressLib/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git - git submodule set-url -- BaseTools/Source/C/BrotliCompress/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git - git submodule set-url -- RedfishPkg/Library/JsonLib/jansson $(cat /run/secrets/SOURCE_REPO)/akheron/jansson.git - git submodule set-url -- UnitTestFrameworkPkg/Library/GoogleTestLib/googletest $(cat /run/secrets/SOURCE_REPO)/google/googletest.git - git submodule set-url -- UnitTestFrameworkPkg/Library/SubhookLib/subhook $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-subhook.git - git submodule set-url -- MdePkg/Library/BaseFdtLib/libfdt $(cat /run/secrets/SOURCE_REPO)/devicetree-org/pylibfdt.git - git submodule set-url -- MdePkg/Library/MipiSysTLib/mipisyst $(cat /run/secrets/SOURCE_REPO)/MIPI-Alliance/public-mipi-sys-t.git - git submodule set-url -- CryptoPkg/Library/MbedTlsLib/mbedtls $(cat /run/secrets/SOURCE_REPO)/Mbed-TLS/mbedtls.git - git submodule set-url -- SecurityPkg/DeviceSecurity/SpdmLib/libspdm $(cat /run/secrets/SOURCE_REPO)/DMTF/libspdm.git - fi - - git submodule update --init --recursive + cd /{{ $gitRepoName }}-{{ $version }} # Set env edk export EDK_TOOLS_PATH=$(pwd)/BaseTools diff --git a/images/hooks/werf.inc.yaml b/images/hooks/werf.inc.yaml index 5d13dd4b33..5ab510a0f8 100644 --- a/images/hooks/werf.inc.yaml +++ b/images/hooks/werf.inc.yaml @@ -1,21 +1,33 @@ --- -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} final: false -fromImage: builder/golang-bookworm-1.24 +fromImage: builder/src git: -- add: /images/{{ $.ImageName }} +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: /app/images/hooks stageDependencies: install: - go.mod - go.sum - setup: - - "**/*.go" + - '**/*.go' +--- +image: {{ include "ImageName" (tuple . .ImageName) }} +final: false +fromImage: builder/golang-bookworm-1.24 +import: + - image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /app/images/hooks + to: /app/images/hooks + before: install mount: - fromPath: ~/go-pkg-cache to: /go/pkg +secrets: +- id: GOPROXY + value: {{ .GOPROXY }} shell: install: + - export GOPROXY=$(cat /run/secrets/GOPROXY) - cd /app/images/hooks - go mod download setup: diff --git a/images/kube-api-rewriter/werf.inc.yaml b/images/kube-api-rewriter/werf.inc.yaml index 91531318ff..78e58b1da4 100644 --- a/images/kube-api-rewriter/werf.inc.yaml +++ b/images/kube-api-rewriter/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ $.ImageName }}-builder +image: {{ include "ImageName" (tuple . .ImageName "builder") }} final: false fromImage: builder/golang-bookworm-1.23 git: - - add: /images/{{ $.ImageName }} + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: /src/kube-api-rewriter stageDependencies: install: @@ -11,11 +11,15 @@ git: - go.sum setup: - "**/*.go" +secrets: +- id: GOPROXY + value: {{ .GOPROXY }} mount: - fromPath: ~/go-pkg-cache to: /go/pkg shell: install: + - export GOPROXY=$(cat /run/secrets/GOPROXY) - cd /src/kube-api-rewriter - go mod download setup: @@ -27,10 +31,11 @@ shell: - go build -v -a -o kube-api-rewriter ./cmd/kube-api-rewriter --- -image: {{ $.ImageName }} + +image: {{ include "ImageName" (tuple . .ImageName) }} fromImage: builder/scratch import: - - image: {{ $.ImageName }}-builder + - image: {{ include "ImageName" (tuple . .ImageName "builder") }} add: /src/kube-api-rewriter/kube-api-rewriter to: /app/kube-api-rewriter after: install diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index 6fb3e40ea9..b62376f167 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -3,11 +3,11 @@ {{- $version := get $.Version $gitRepoName }} {{- $gitRepoUrl := "libvirt/libvirt.git" }} -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} final: false -fromImage: base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: builder/src git: -- add: /images/{{ $.ImageName }}/ +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: / includePaths: - install-libvirt.sh @@ -17,100 +17,107 @@ git: stageDependencies: install: - '**/*' - setup: - - install-libvirt.sh +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /{{ $gitRepoName }}-{{ $version }} + + cd /{{ $gitRepoName }}-{{ $version }} + + if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then + echo "Change submodule url" + git submodule set-url -- subprojects/keycodemapdb $(cat /run/secrets/SOURCE_REPO)/keycodemap/keycodemapdb.git + fi + +--- +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- binutils +- gcc-c++ +- git gettext +- bash-completion +- clang ccache +- make cmake +- meson ninja-build +- attr +- iproute iptables iptables-nft iptables-ipv6 +- openvswitch ebtables +- pkgconfig +- polkit kmod +- lvm2 parted +- qemu-img open-iscsi +- xml-utils xsltproc +- systemd-container polkit +- python3 python3-devel +- python3-module-pytest python3-module-docutils +- python3-tools python3-module-pip +- python3-module-black +- mdevctl tshark +- util-linux dmsetup pm-utils +libraries: +- libudev-devel +- libpciaccess-devel +- libyajl-devel sanlock-devel +- libpcap-devel libnl-devel +- libselinux-devel libsasl2-devel +- libssh-devel +- libssh2-devel +- libparted-devel +- libdevmapper-devel +- ceph-devel +- libiscsi-devel libglusterfs-devel +- libnuma-devel libcap-ng-devel +- libcurl-devel libaudit-devel +- libfuse-devel libnbd-devel +- libblkid-devel libgcrypt-devel +- libgnutls-devel libp11-kit-devel +- libreadline-devel libtasn1-devel +- libattr-devel libbsd-devel +- libsystemd-devel libuuid-devel +- libjson-c-devel systemtap-sdt-devel +- libacl-devel glib2-devel glibc-utils +- libgio-devel libxml2-devel +- libtirpc-devel libsasl2-devel +- wireshark-devel +- zlib-devel libclocale +- libfuse3-devel libnuma libslirp-devel +- libyajl-devel libselinux-devel +{{- end -}} + +{{ $builderDependencies := include "$name" . | fromYaml }} +image: {{ include "ImageName" (tuple . .ImageName) }} +final: false +fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }}{{ $.SVACE_IMAGE_SUFFIX }} import: +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /{{ $gitRepoName }}-{{ $version }} + to: /{{ $gitRepoName }}-{{ $version }} + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /patches + to: /patches + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /install-libvirt.sh + to: /install-libvirt.sh + before: install - image: packages/binaries/dmidecode add: /dmidecode to: /dmidecode before: install -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} - | - apt-get install --yes \ - binutils \ - gcc-c++ \ - git \ - gettext \ - bash-completion \ - clang \ - ccache \ - make cmake \ - meson \ - ninja-build \ - libudev-devel \ - libpciaccess-devel \ - libyajl-devel \ - sanlock-devel \ - libpcap-devel \ - libnl-devel \ - libselinux-devel \ - iproute \ - iptables \ - iptables-nft \ - iptables-ipv6 \ - openvswitch \ - ebtables \ - libsasl2-devel \ - pkgconfig \ - libssh-devel \ - libssh2-devel \ - polkit kmod \ - qemu-img \ - lvm2 \ - libparted-devel \ - parted \ - libdevmapper-devel \ - ceph-devel \ - open-iscsi \ - libiscsi-devel \ - libglusterfs-devel \ - libnuma-devel \ - libcap-ng-devel \ - libcurl-devel \ - libaudit-devel \ - libfuse-devel \ - libnbd-devel \ - libblkid-devel \ - libgcrypt-devel \ - libgnutls-devel \ - libp11-kit-devel \ - libreadline-devel \ - libtasn1-devel \ - libattr-devel \ - libbsd-devel \ - libsystemd-devel \ - libuuid-devel \ - libjson-c-devel \ - systemtap-sdt-devel \ - systemd-container \ - attr \ - libacl-devel \ - glib2-devel \ - glibc-utils \ - libgio-devel \ - libxml2-devel \ - xml-utils \ - xsltproc \ - python3 python3-devel \ - python3-module-pytest \ - python3-module-docutils \ - python3-tools \ - python3-module-pip \ - polkit \ - libtirpc-devel \ - libsasl2-devel \ - wireshark-devel \ - tshark \ - zlib-devel \ - mdevctl \ - util-linux dmsetup pm-utils libclocale \ - libfuse3-devel libnuma libslirp-devel \ - libyajl-devel libselinux-devel + apt-get install -y \ + {{ $builderDependencies.packages | join " " }} \ + {{ $builderDependencies.libraries | join " " }} {{- include "alt packages clean" . | nindent 2 }} - | @@ -121,8 +128,6 @@ shell: ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc - pip3 install black - install: - | mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config @@ -137,13 +142,7 @@ shell: export NINJA="/usr/bin/ninja" export PYTHON="/usr/bin/python3" - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} {{ $gitRepoName }}-{{ $version }} - - cd {{ $gitRepoName }}-{{ $version }} - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Change submodule url" - git submodule set-url -- subprojects/keycodemapdb $(cat /run/secrets/SOURCE_REPO)/keycodemap/keycodemapdb.git - fi + cd /{{ $gitRepoName }}-{{ $version }} for p in /patches/*.patch ; do echo -n "Apply ${p} ... " diff --git a/images/packages/binaries/acl/werf.inc.yaml b/images/packages/binaries/acl/werf.inc.yaml index 6e2b813894..13c5b8d005 100644 --- a/images/packages/binaries/acl/werf.inc.yaml +++ b/images/packages/binaries/acl/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "acl.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -23,12 +38,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -41,9 +58,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src cd /src ./autogen.sh diff --git a/images/packages/binaries/bzip2/werf.inc.yaml b/images/packages/binaries/bzip2/werf.inc.yaml index 2cc547ff00..672326ba1b 100644 --- a/images/packages/binaries/bzip2/werf.inc.yaml +++ b/images/packages/binaries/bzip2/werf.inc.yaml @@ -1,16 +1,30 @@ --- -# development pkgs -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "bzip2/bzip2.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -23,12 +37,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -43,9 +59,6 @@ shell: OUTDIR=/out pkgver=$( echo {{ $version }} | cut -d "-" -f2) - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src mkdir -p $OUTDIR/usr/lib64 diff --git a/images/packages/binaries/dmidecode/werf.inc.yaml b/images/packages/binaries/dmidecode/werf.inc.yaml index 3418899898..3a105ced18 100644 --- a/images/packages/binaries/dmidecode/werf.inc.yaml +++ b/images/packages/binaries/dmidecode/werf.inc.yaml @@ -1,16 +1,32 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /dmidecode before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "dmidecode.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch dmidecode-{{ $version }} /src + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -21,12 +37,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -39,9 +57,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch dmidecode-{{ $version }} /src cd /src make -j$(nproc) prefix=/usr diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 817aa124b8..3f28d33412 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libfdt before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "dtc/dtc.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/file/werf.inc.yaml b/images/packages/binaries/file/werf.inc.yaml index d56ffe6011..05f91425f4 100644 --- a/images/packages/binaries/file/werf.inc.yaml +++ b/images/packages/binaries/file/werf.inc.yaml @@ -1,15 +1,30 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "file/file.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -24,12 +39,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -42,9 +59,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + cd /src autoreconf -f -i diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index a02f5a7a69..b38235e10f 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libfuse3 before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "libfuse/libfuse.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index dd7bb71b5f..f6bf6db91e 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /glib2 before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "GNOME/glib.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -22,12 +37,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -40,9 +57,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src meson setup _build -Dprefix=$OUTDIR/usr -Dgtk_doc=false -Dbuildtype=release -Dstrip=true diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index 8f377e0384..8c6a2300c5 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /glibc before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "glibc.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -23,12 +38,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -41,9 +58,6 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src mkdir /build cd /build diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index 44f9273641..91979c995d 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -1,17 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libgmp10 before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "gmp/gmp" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -22,12 +36,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -40,9 +56,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./configure \ diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index aa2e666b21..223b7f5866 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -1,16 +1,48 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /gnutls before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "gnutls/gnutls.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + + cd /src + + if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then + git submodule set-url -- devel/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl.git + git submodule set-url -- tests/suite/tls-fuzzer/tlsfuzzer $(cat /run/secrets/SOURCE_REPO)/tomato42/tlsfuzzer.git + git submodule set-url -- tests/suite/tls-fuzzer/python-ecdsa $(cat /run/secrets/SOURCE_REPO)/warner/python-ecdsa + git submodule set-url -- gnulib $(cat /run/secrets/SOURCE_REPO)/libidn/gnulib-mirror.git + git submodule set-url -- devel/nettle $(cat /run/secrets/SOURCE_REPO)/gnutls/nettle.git + git submodule set-url -- devel/libtasn1 $(cat /run/secrets/SOURCE_REPO)/gnutls/libtasn1.git + git submodule set-url -- devel/abi-dump $(cat /run/secrets/SOURCE_REPO)/gnutls/abi-dump.git + git submodule set-url -- cligen $(cat /run/secrets/SOURCE_REPO)/gnutls/cligen.git + git submodule set-url -- tests/suite/tls-interoperability $(cat /run/secrets/SOURCE_REPO)/redhat-crypto/tests/interop.git + fi + + # git submodule update --init --recursive + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -24,20 +56,24 @@ packages: - libtasn1-devel libtasn1-utils libidn2-devel zlib-devel - libunbound-devel bison gtk-doc texinfo texlive - libev4 libev-devel libgcrypt-devel libopencdk-devel +- liboqs-devel libzstd-devel libreadline-devel gcc-c++ {{- end -}} {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} - | + apt-get update apt-get install -y \ {{ $builderDependencies.packages | join " " }} @@ -46,14 +82,17 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./bootstrap - ./configure --prefix=/usr --libdir=/usr/lib64 --disable-tests + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib64 \ + --with-default-trust-store-file=/usr/share/ca-certificates/ca-bundle.crt \ + --disable-tests \ + --disable-doc make -j$(nproc) diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index 1ea8072c05..03475d806b 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libattr before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "attr.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -20,7 +20,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index 4e74fb017c..92ffd4dfbf 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libaudit before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "linux-audit/audit-userspace.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index 36187f2a23..2a10a1305c 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libblkid before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "util-linux/util-linux.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index b544438580..fe750fd439 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libbrotli before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "google/brotli.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index d7ded9d8a4..28dc5ff8b4 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libbsd before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "libbsd/libbsd.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index 9080905343..5616999826 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libburn before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "libburnia/libburn.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index f5f7878f16..41df34e63b 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libcrypt before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "gpg/libgcrypt" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libtpms/werf.inc.yaml b/images/packages/binaries/libtpms/werf.inc.yaml new file mode 100644 index 0000000000..d9069d8f13 --- /dev/null +++ b/images/packages/binaries/libtpms/werf.inc.yaml @@ -0,0 +1,72 @@ +--- +image: {{ $.PackagePath }}/{{ $.ImageName }} +final: false +fromImage: builder/scratch +import: +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder + add: /out + to: /libtpms + before: setup + +--- +{{- $version := get $.PackageVersion $.ImageName }} +{{- $gitRepoUrl := "stefanberger/libtpms.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src +--- + +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc gcc-c++ +- make autoconf automake libtool +- libssl-devel perl-podlators +{{- end -}} + +{{ $builderDependencies := include "$name" . | fromYaml }} + +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +final: false +fromImage: builder/alt +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install +shell: + beforeInstall: + {{- include "alt packages proxy" . | nindent 2 }} + - | + apt-get install -y \ + {{ $builderDependencies.packages | join " " }} + + {{- include "alt packages clean" . | nindent 2 }} + + install: + - | + OUTDIR=/out + + cd /src + + ./autogen.sh + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib64 \ + --with-tpm2 \ + --with-openssl + + make -j$(nproc) + + make DESTDIR=$OUTDIR install diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index 1c10f91448..6f38766f09 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /libdevmapper before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "lvmteam/lvm2.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -23,7 +23,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/nbdkit/werf.inc.yaml b/images/packages/binaries/nbdkit/werf.inc.yaml index 01ad4e9f09..7529316be5 100644 --- a/images/packages/binaries/nbdkit/werf.inc.yaml +++ b/images/packages/binaries/nbdkit/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /nbdkit before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "nbdkit/nbdkit.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -40,12 +55,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -55,13 +72,10 @@ shell: {{- include "alt packages clean" . | nindent 2 }} - install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src cd /src autoreconf -i diff --git a/images/packages/binaries/nftables/werf.inc.yaml b/images/packages/binaries/nftables/werf.inc.yaml index c6276962f1..f8e993be5a 100644 --- a/images/packages/binaries/nftables/werf.inc.yaml +++ b/images/packages/binaries/nftables/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /nftables before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "nftables.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -24,12 +39,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -56,9 +73,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src cd /src ./autogen.sh diff --git a/images/packages/binaries/numactl/werf.inc.yaml b/images/packages/binaries/numactl/werf.inc.yaml index f00f9e540c..874fcc3896 100644 --- a/images/packages/binaries/numactl/werf.inc.yaml +++ b/images/packages/binaries/numactl/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /numactl before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "numactl/numactl.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -22,12 +37,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -40,9 +57,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src cd /src ./autogen.sh diff --git a/images/packages/binaries/openssl/werf.inc.yaml b/images/packages/binaries/openssl/werf.inc.yaml index 714a70e5da..8040f716ea 100644 --- a/images/packages/binaries/openssl/werf.inc.yaml +++ b/images/packages/binaries/openssl/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /openssl before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "openssl/openssl.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -23,12 +38,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -41,9 +58,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + cd /src ./Configure --prefix=/usr CC=/usr/bin/musl-gcc -static diff --git a/images/packages/binaries/swtpm/werf.inc.yaml b/images/packages/binaries/swtpm/werf.inc.yaml index cca8b69b65..42b8c99f31 100644 --- a/images/packages/binaries/swtpm/werf.inc.yaml +++ b/images/packages/binaries/swtpm/werf.inc.yaml @@ -1,16 +1,32 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /swtpm before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "stefanberger/swtpm.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src +--- + {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -31,43 +47,34 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install +- image: packages/binaries/libtpms + add: /libtpms + to: /libtpms + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} - | apt-get install -y \ {{ $builderDependencies.packages | join " " }} - - {{ if not $.DistroPackagesProxy }} - REPO_URL=http://ftp.altlinux.org/pub/distributions - {{- else }} - REPO_URL=http://{{ $.DistroPackagesProxy }}/repository/archive-ALT-Linux-APT-Repository - {{- end }} - - # libtpms libtpms-devel requares version 0.10 that in sisyphus repo - cat >/etc/apt/sources.list.d/alt-sisyphus.list< ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src + cd /src ./autogen.sh \ diff --git a/images/packages/binaries/xorriso/werf.inc.yaml b/images/packages/binaries/xorriso/werf.inc.yaml index 0e97414736..3d67e3520b 100644 --- a/images/packages/binaries/xorriso/werf.inc.yaml +++ b/images/packages/binaries/xorriso/werf.inc.yaml @@ -1,16 +1,31 @@ --- -image: {{ $.ImageType }}/{{ $.ImageName }} +image: {{ $.PackagePath }}/{{ $.ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.ImageType }}/{{ $.ImageName }}-builder +- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder add: /out to: /xorriso before: setup --- -{{- $version := get $.Package $.ImageName }} +{{- $version := get $.PackageVersion $.ImageName }} {{- $gitRepoUrl := "libburnia/libisoburn.git" }} +{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} + +image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +final: false +fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch release-{{ $version }} /src +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -23,12 +38,14 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageType }}/{{ $.ImageName }}-builder +image: {{ $.PackagePath }}/{{ $.ImageName }}-builder final: false fromImage: builder/alt -secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} +import: +- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} + add: /src + to: /src + before: install shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -41,9 +58,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch release-{{ $version }} /src cd /src ./bootstrap diff --git a/images/packages/werf.inc.yaml b/images/packages/werf.inc.yaml new file mode 100644 index 0000000000..c1a5cefcbe --- /dev/null +++ b/images/packages/werf.inc.yaml @@ -0,0 +1 @@ +{{ include "process_packages_images" . }} \ No newline at end of file diff --git a/images/pre-delete-hook/werf.inc.yaml b/images/pre-delete-hook/werf.inc.yaml index a8c8260778..8e3b3ef040 100644 --- a/images/pre-delete-hook/werf.inc.yaml +++ b/images/pre-delete-hook/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: pre-delete-hook-builder +image: {{ include "ImageName" (tuple . .ImageName "builder") }} final: false fromImage: builder/golang-bookworm-1.23 git: -- add: /images/{{ $.ImageName }} +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: /pre-delete-hook stageDependencies: install: @@ -11,11 +11,15 @@ git: - go.sum setup: - "**/*.go" +secrets: +- id: GOPROXY + value: {{ .GOPROXY }} mount: - fromPath: ~/go-pkg-cache to: /go/pkg shell: install: + - export GOPROXY=$(cat /run/secrets/GOPROXY) - cd /pre-delete-hook - go mod download setup: @@ -25,10 +29,10 @@ shell: - export CGO_ENABLED=0 - go build -v -a -o pre-delete-hook main.go --- -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} fromImage: builder/scratch import: -- image: pre-delete-hook-builder +- image: {{ include "ImageName" (tuple . .ImageName "builder") }} add: /pre-delete-hook/pre-delete-hook to: /pre-delete-hook after: install diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index 50e972f953..d4d2f39cf1 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -3,7 +3,56 @@ {{- $version := get $.Version $gitRepoName }} {{- $gitRepoUrl := "qemu/qemu.git" }} +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +final: false +fromImage: {{ include "ImageName" (tuple . "src-artifact") }} +git: +- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} + to: / + includePaths: + - install-qemu.sh + - patches + excludePaths: + - patches/README.md + stageDependencies: + install: + - '**/*' +- add: {{ include "PreffixPath" . }}/images/base-alt-p11-binaries/relocate_binaries.sh + to: /relocate_binaries.sh + stageDependencies: + install: + - '**/*' +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /{{ $gitRepoName }}-{{ $version }} + + cd /{{ $gitRepoName }}-{{ $version }} + if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then + echo "Change submodule url" + git submodule set-url -- roms/seabios $(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios.git + git submodule set-url -- roms/SLOF $(cat /run/secrets/SOURCE_REPO)/qemu-project/SLOF.git + git submodule set-url -- roms/ipxe $(cat /run/secrets/SOURCE_REPO)/qemu-project/ipxe.git + git submodule set-url -- roms/openbios $(cat /run/secrets/SOURCE_REPO)/qemu-project/openbios.git + git submodule set-url -- roms/qemu-palcode $(cat /run/secrets/SOURCE_REPO)/qemu-project/qemu-palcode.git + git submodule set-url -- roms/u-boot $(cat /run/secrets/SOURCE_REPO)/qemu-project/u-boot.git + git submodule set-url -- roms/skiboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/skiboot.git + git submodule set-url -- roms/QemuMacDrivers $(cat /run/secrets/SOURCE_REPO)/qemu-project/QemuMacDrivers.git + git submodule set-url -- roms/seabios-hppa $(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios-hppa.git + git submodule set-url -- roms/u-boot-sam460ex $(cat /run/secrets/SOURCE_REPO)/qemu-project/u-boot-sam460ex.git + git submodule set-url -- roms/edk2 $(cat /run/secrets/SOURCE_REPO)/qemu-project/edk2.git + git submodule set-url -- roms/opensbi $(cat /run/secrets/SOURCE_REPO)/qemu-project/opensbi.git + git submodule set-url -- roms/qboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/qboot.git + git submodule set-url -- roms/vbootrom $(cat /run/secrets/SOURCE_REPO)/qemu-project/vbootrom.git + git submodule set-url -- tests/lcitool/libvirt-ci $(cat /run/secrets/SOURCE_REPO)/libvirt/libvirt-ci.git + fi +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -27,6 +76,7 @@ packages: - python3-module-pip - python3-module-sphinx - python3-module-sphinx_rtd_theme +- python3-module-black libraries: - glibc-devel-static - zlib-devel-static @@ -38,22 +88,18 @@ libraries: - glib2-devel - libdw-devel - perl-devel -- libssh-devel -- libssh2-devel +- libssh-devel libssh2-devel - libcap-ng-devel - libxfs-devel - zlib-devel -- libcurl-devel -- libpci-devel +- libcurl-devel libpci-devel - libgvnc-devel - glibc-kernheaders - libfdt-devel - libpixman-devel - libkeyutils-devel -- libuuid-devel -- libpam0-devel -- libtasn1-devel -- libslirp-devel +- libuuid-devel libpam0-devel +- libtasn1-devel libslirp-devel - libdrm-devel - libxdp-devel libSDL2-devel libSDL2_image-devel - libncursesw-devel libalsa-devel libpulseaudio-devel @@ -77,33 +123,29 @@ libraries: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: false -fromImage: base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} -git: -- add: /images/{{ $.ImageName }}/ - to: / - includePaths: - - install-qemu.sh - - patches - excludePaths: - - patches/README.md - stageDependencies: - setup: - - install-qemu.sh - -- add: /images/base-alt-p11-binaries - to: / - includePaths: - - relocate_binaries.sh - stageDependencies: - setup: - - '**/*' +fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }}{{ $.SVACE_IMAGE_SUFFIX }} import: +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /{{ $gitRepoName }}-{{ $version }} + to: /{{ $gitRepoName }}-{{ $version }} + before: install - image: packages/binaries/dmidecode add: /dmidecode to: /dmidecode before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /patches + to: /patches + before: install +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: / + to: / + before: install + includePaths: + - install-qemu.sh + - relocate_binaries.sh secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -125,8 +167,6 @@ shell: ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc - pip3 install black - install: - | mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config @@ -141,27 +181,7 @@ shell: export NINJA="/usr/bin/ninja" export PYTHON="/usr/bin/python3" - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} {{ $gitRepoName }}-{{ $version }} - - cd {{ $gitRepoName }}-{{ $version }} - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Change submodule url" - git submodule set-url -- roms/seabios $(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios.git - git submodule set-url -- roms/SLOF $(cat /run/secrets/SOURCE_REPO)/qemu-project/SLOF.git - git submodule set-url -- roms/ipxe $(cat /run/secrets/SOURCE_REPO)/qemu-project/ipxe.git - git submodule set-url -- roms/openbios $(cat /run/secrets/SOURCE_REPO)/qemu-project/openbios.git - git submodule set-url -- roms/qemu-palcode $(cat /run/secrets/SOURCE_REPO)/qemu-project/qemu-palcode.git - git submodule set-url -- roms/u-boot $(cat /run/secrets/SOURCE_REPO)/qemu-project/u-boot.git - git submodule set-url -- roms/skiboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/skiboot.git - git submodule set-url -- roms/QemuMacDrivers $(cat /run/secrets/SOURCE_REPO)/qemu-project/QemuMacDrivers.git - git submodule set-url -- roms/seabios-hppa $(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios-hppa.git - git submodule set-url -- roms/u-boot-sam460ex $(cat /run/secrets/SOURCE_REPO)/qemu-project/u-boot-sam460ex.git - git submodule set-url -- roms/edk2 $(cat /run/secrets/SOURCE_REPO)/qemu-project/edk2.git - git submodule set-url -- roms/opensbi $(cat /run/secrets/SOURCE_REPO)/qemu-project/opensbi.git - git submodule set-url -- roms/qboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/qboot.git - git submodule set-url -- roms/vbootrom $(cat /run/secrets/SOURCE_REPO)/qemu-project/vbootrom.git - git submodule set-url -- tests/lcitool/libvirt-ci $(cat /run/secrets/SOURCE_REPO)/libvirt/libvirt-ci.git - fi + cd /{{ $gitRepoName }}-{{ $version }} for p in /patches/*.patch ; do echo -n "Apply ${p} ... " diff --git a/images/src-artifact/werf.inc.yaml b/images/src-artifact/werf.inc.yaml new file mode 100644 index 0000000000..8e62eabde2 --- /dev/null +++ b/images/src-artifact/werf.inc.yaml @@ -0,0 +1,4 @@ +--- +image: {{ include "ImageName" (tuple . .ImageName) }} +final: false +fromImage: builder/src diff --git a/images/svace-builder/werf.inc.yaml b/images/svace-builder/werf.inc.yaml index 103cc9016e..172aa6fb1c 100644 --- a/images/svace-builder/werf.inc.yaml +++ b/images/svace-builder/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ $.ImageName }}-download +image: {{ include "ImageName" (tuple . .ImageName "download") }} final: false fromImage: builder/alpine secrets: @@ -16,11 +16,11 @@ shell: - git clone --depth 1 --branch v4.0.250415 $(cat /run/secrets/SOURCE_REPO)/ispras/svace.git /opt/svace --- -image: base-alt-p11/svace +image: {{ include "ImageName" (tuple . "base-alt" "p11/svace") }} final: false fromImage: BASE_ALT_P11 import: -- image: {{ $.ImageName }}-download +- image: {{ include "ImageName" (tuple . .ImageName "download") }} add: /opt/svace to: /opt/svace before: install @@ -36,11 +36,11 @@ shell: - | ln -s /opt/svace/bin/svace /usr/local/bin/svace --- -image: builder/golang-bookworm-1.23/svace +image: {{ include "ImageName" (tuple . "builder/golang-bookworm" "1.23/svace") }} final: false fromImage: builder/golang-bookworm-1.23 import: -- image: {{ $.ImageName }}-download +- image: {{ include "ImageName" (tuple . .ImageName "download") }} add: /opt/svace to: /opt/svace before: install diff --git a/images/virt-api/werf.inc.yaml b/images/virt-api/werf.inc.yaml index db384f716f..3e8742c9fa 100644 --- a/images/virt-api/werf.inc.yaml +++ b/images/virt-api/werf.inc.yaml @@ -1,14 +1,14 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt-binaries/ to: /usr/bin includePaths: - virt-api before: setup -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt-config-files/ to: /etc includePaths: diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 60ad5a3a93..b07c14940c 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -1,7 +1,21 @@ --- # Source https://github.com/kubevirt/kubevirt/blob/v1.3.1/hack/dockerized#L15 {{- $version := "v1.3.1" }} -{{- $tag := print $version "-v12n.2"}} +{{- $tag := print $version "-v12n.1"}} +--- +image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +final: false +fromImage: {{ include "ImageName" (tuple . "src-artifact") }} +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/deckhouse/3p-kubevirt --branch {{ $tag }} /kubevirt + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -25,15 +39,22 @@ packages: {{ $virtArtifactDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: false -fromImage: base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }}{{ $.SVACE_IMAGE_SUFFIX }} +import: +- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + add: /kubevirt + to: /kubevirt + before: install mount: - fromPath: ~/go-pkg-cache to: /go/pkg secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO }} +- id: GOPROXY + value: {{ .GOPROXY }} shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} @@ -45,13 +66,12 @@ shell: install: - | - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git config --global --add advice.detachedHead false - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/deckhouse/3p-kubevirt --branch {{ $tag }} /kubevirt - cd /kubevirt - go mod download - go get github.com/opencontainers/runc@v1.1.14 - go get github.com/containers/common@v0.60.4 + export GOPROXY=$(cat /run/secrets/GOPROXY) + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + cd /kubevirt + go mod download + go get github.com/opencontainers/runc@v1.1.14 + go get github.com/containers/common@v0.60.4 - | echo Download Go modules. diff --git a/images/virt-controller/werf.inc.yaml b/images/virt-controller/werf.inc.yaml index 7380f31c32..05d34f169e 100644 --- a/images/virt-controller/werf.inc.yaml +++ b/images/virt-controller/werf.inc.yaml @@ -1,14 +1,14 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt-binaries/ to: /usr/bin includePaths: - virt-controller before: setup -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt-config-files/ to: /etc includePaths: diff --git a/images/virt-handler/werf.inc.yaml b/images/virt-handler/werf.inc.yaml index f40e4f9129..b2c7545415 100644 --- a/images/virt-handler/werf.inc.yaml +++ b/images/virt-handler/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ $.ImageName }} -fromImage: distroless +image: {{ include "ImageName" (tuple . .ImageName) }} +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: -- image: {{ $.ImageName }}-bins +- image: {{ include "ImageName" (tuple . .ImageName "bins") }} add: /relocate to: / after: install @@ -15,7 +15,7 @@ import: includePaths: - usr/bin/cp - usr/bin/coreutils -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt-binaries/ to: /usr/bin after: install @@ -23,19 +23,17 @@ import: - virt-chroot - virt-handler - container-disk -- image: virt-artifact - add: /kubevirt/cmd/{{ $.ImageName }}/ - to: / +- image: {{ include "ImageName" (tuple . "virt-artifact") }} + add: /kubevirt/cmd/{{ $.ImageName }}/virt_launcher.cil + to: /virt_launcher.cil after: install - includePaths: - - virt_launcher.cil -- image: virt-artifact - add: /kubevirt-config-files/ - to: / +- image: {{ include "ImageName" (tuple . "virt-artifact") }} + add: /kubevirt-config-files/.version + to: /.version after: install includePaths: - .version -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt/cmd/{{ $.ImageName }}/ to: /etc after: install @@ -66,9 +64,9 @@ binaries: {{ $virtHandlerDependencies := include "$name" . | fromYaml }} -image: {{ $.ImageName }}-bins +image: {{ include "ImageName" (tuple . .ImageName "bins") }} final: false -fromImage: base-alt-p11-binaries +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} import: - image: tools/util-linux add: / @@ -89,7 +87,7 @@ import: add: /acl to: /acl before: install -- image: qemu +- image: {{ include "ImageName" (tuple . "qemu") }} add: /qemu-img to: /relocate before: setup diff --git a/images/virt-launcher/werf.inc.yaml b/images/virt-launcher/werf.inc.yaml index f2097e9fff..822b3351c9 100644 --- a/images/virt-launcher/werf.inc.yaml +++ b/images/virt-launcher/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ $.ImageName }} +image: {{ include "ImageName" (tuple . .ImageName) }} final: true -fromImage: distroless +fromImage: {{ include "ImageName" (tuple . "distroless") }} import: - - image: {{ $.ImageName }}-binaries + - image: {{ include "ImageName" (tuple . .ImageName "binaries") }} add: /relocate to: / after: install @@ -153,12 +153,12 @@ binaries: {{- $gitRepoName := "libvirt" }} {{- $version := get $.Version $gitRepoName }} -image: {{ $.ImageName }}-binaries +image: {{ include "ImageName" (tuple . .ImageName "binaries") }} final: false -fromImage: base-alt-p11-binaries +fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} git: # Add qemu and virtqemud configs - - add: /images/{{ $.ImageName }}/configs + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/configs to: /relocate/etc/libvirt stageDependencies: setup: @@ -167,7 +167,7 @@ git: includePaths: - qemu.conf - virtqemud.conf - - add: /images/{{ $.ImageName }}/configs + - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/configs to: /relocate/etc stageDependencies: setup: @@ -176,11 +176,11 @@ git: - nsswitch.conf import: # Libvirt and QEMU libraries and binaries -- image: libvirt +- image: {{ include "ImageName" (tuple . "libvirt") }} add: /BINS to: /libvirt-bins before: install -- image: qemu +- image: {{ include "ImageName" (tuple . "qemu") }} add: /BINS to: /qemu-bins before: install @@ -190,7 +190,7 @@ import: before: install # EDK2 (uefi firmware) -- image: edk2 +- image: {{ include "ImageName" (tuple . "edk2") }} add: /FIRMWARE/ to: /relocate/usr/share/edk2/ovmf before: install @@ -199,7 +199,7 @@ import: - '*.bin' - '*.efi' - '*.iso' -- image: edk2 +- image: {{ include "ImageName" (tuple . "edk2") }} add: /FIRMWARE/ to: /relocate/usr/share/qemu/firmware before: install @@ -207,14 +207,12 @@ import: - '*.json' # Import from virt artifact -- image: virt-artifact - add: /kubevirt-config-files/ - to: / +- image: {{ include "ImageName" (tuple . "virt-artifact") }} + add: /kubevirt-config-files/.version + to: /.version after: install - includePaths: - - .version -- image: virt-artifact +- image: {{ include "ImageName" (tuple . "virt-artifact") }} add: /kubevirt-binaries/ to: /relocate/usr/bin before: setup @@ -225,7 +223,7 @@ import: - virt-launcher-monitor - virt-probe - virt-tail -- image: {{ $.ImageName }}-gobuilder +- image: {{ include "ImageName" (tuple . .ImageName "gobuilder") }} add: /binaries to: /relocate/usr/bin before: setup @@ -255,6 +253,13 @@ import: add: /acl to: /acl before: install +- image: packages/binaries/libtpms + add: /libtpms + to: /libtpms + before: install + includePaths: + - usr/lib64/*.so + - usr/lib64/*.so.* # Statically builded - image: packages/binaries/openssl @@ -281,7 +286,7 @@ import: - usr/bin/coreutils -- image: {{ $.ImageName }}-cbuilder +- image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} add: /bins to: /relocate/usr/bin before: setup @@ -293,19 +298,6 @@ shell: - | apt-get install -y {{ $virtLauncherDependencies.libs | join " " }} {{ $virtLauncherDependencies.packages | join " " }} - {{ if not $.DistroPackagesProxy }} - REPO_URL=http://ftp.altlinux.org/pub/distributions - {{- else }} - REPO_URL=http://{{ $.DistroPackagesProxy }}/repository/archive-ALT-Linux-APT-Repository - {{- end }} - # libtpms libtpms-devel require version 0.10 that in sisyphus repo - cat >/etc/apt/sources.list.d/alt-sisyphus.list< Date: Mon, 9 Jun 2025 21:27:57 +0300 Subject: [PATCH 02/30] use ModuleNamePrefix for images Signed-off-by: Nikita Korolev --- .werf/defines/process-images.tmpl | 2 ++ images/base-alt-p11-binaries/werf.inc.yaml | 2 +- images/base-alt-p11/werf.inc.yaml | 2 +- images/bounder/werf.inc.yaml | 8 ++--- images/cdi-apiserver/werf.inc.yaml | 6 ++-- images/cdi-artifact/werf.inc.yaml | 8 ++--- images/cdi-cloner/werf.inc.yaml | 18 +++++------ images/cdi-controller/werf.inc.yaml | 14 ++++----- images/cdi-importer/werf.inc.yaml | 14 ++++----- images/cdi-operator/werf.inc.yaml | 6 ++-- images/distroless/werf.inc.yaml | 8 ++--- images/dvcr-artifact/werf.inc.yaml | 10 +++---- images/dvcr-importer/werf.inc.yaml | 6 ++-- images/dvcr-uploader/werf.inc.yaml | 6 ++-- images/dvcr/werf.inc.yaml | 14 ++++----- images/edk2/werf.inc.yaml | 18 +++++------ images/hooks/werf.inc.yaml | 6 ++-- images/kube-api-rewriter/werf.inc.yaml | 6 ++-- images/libvirt/werf.inc.yaml | 12 ++++---- images/pre-delete-hook/werf.inc.yaml | 6 ++-- images/qemu/werf.inc.yaml | 14 ++++----- images/src-artifact/werf.inc.yaml | 2 +- images/svace-builder/werf.inc.yaml | 10 +++---- images/virt-api/werf.inc.yaml | 8 ++--- images/virt-artifact/werf.inc.yaml | 12 ++++---- images/virt-controller/werf.inc.yaml | 8 ++--- images/virt-handler/werf.inc.yaml | 20 ++++++------- images/virt-launcher/werf.inc.yaml | 30 +++++++++---------- images/virt-operator/werf.inc.yaml | 8 ++--- images/virtualization-api/werf.inc.yaml | 6 ++-- images/virtualization-artifact/werf.inc.yaml | 2 +- images/virtualization-audit/werf.inc.yaml | 6 ++-- .../virtualization-controller/werf.inc.yaml | 6 ++-- images/vm-route-forge/werf.inc.yaml | 8 ++--- 34 files changed, 157 insertions(+), 155 deletions(-) diff --git a/.werf/defines/process-images.tmpl b/.werf/defines/process-images.tmpl index b5870bc479..a8ad6f48e1 100644 --- a/.werf/defines/process-images.tmpl +++ b/.werf/defines/process-images.tmpl @@ -18,6 +18,8 @@ {{- $ImageData := regexReplaceAll "^images/([0-9a-z-_]+)/(Dockerfile|werf.inc.yaml)$" $path "${1}#${2}" | split "#" }} {{- $_ := set $ctx "ImageName" $ImageData._0 }} +{{- $_ := set $ctx "ModuleNamePrefix" "" }} +{{- $_ := set $ctx "ModulePathPrefix" "" }} {{- $_ := set $ctx "ImageBuildData" $content }} {{- $_ := set $ctx "Files" $Root.Files }} {{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }} diff --git a/images/base-alt-p11-binaries/werf.inc.yaml b/images/base-alt-p11-binaries/werf.inc.yaml index c506c217ef..d856d774a7 100644 --- a/images/base-alt-p11-binaries/werf.inc.yaml +++ b/images/base-alt-p11-binaries/werf.inc.yaml @@ -10,7 +10,7 @@ libraries: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: BASE_ALT_P11 git: diff --git a/images/base-alt-p11/werf.inc.yaml b/images/base-alt-p11/werf.inc.yaml index e84dec444f..5e7e71456a 100644 --- a/images/base-alt-p11/werf.inc.yaml +++ b/images/base-alt-p11/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false {{- if not .ModuleName }} fromImage: BASE_ALT_P11 diff --git a/images/bounder/werf.inc.yaml b/images/bounder/werf.inc.yaml index 8cfcdc0fb6..11906bfa4a 100644 --- a/images/bounder/werf.inc.yaml +++ b/images/bounder/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: - - image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} + - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder add: /bins to: /usr/local/bin after: setup @@ -10,7 +10,7 @@ imageSpec: config: cmd: ["hello_bounder"] --- -image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder final: false fromImage: builder/golang-bookworm-1.23 git: diff --git a/images/cdi-apiserver/werf.inc.yaml b/images/cdi-apiserver/werf.inc.yaml index b0a4648ea7..fe1a3e7539 100644 --- a/images/cdi-apiserver/werf.inc.yaml +++ b/images/cdi-apiserver/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "cdi-artifact") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact add: /cdi-binaries to: /usr/bin before: setup diff --git a/images/cdi-artifact/werf.inc.yaml b/images/cdi-artifact/werf.inc.yaml index 0fcfe8b672..943bcf2509 100644 --- a/images/cdi-artifact/werf.inc.yaml +++ b/images/cdi-artifact/werf.inc.yaml @@ -2,7 +2,7 @@ {{- $version := "v1.60.3-v12n.1" }} {{- $gitRepoUrl := "deckhouse/3p-containerized-data-importer" }} -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: @@ -26,14 +26,14 @@ shell: rm -rf /src/containerized-data-importer/.git --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/golang-bookworm-1.23 mount: - fromPath: ~/go-pkg-cache to: /go/pkg import: -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /src/containerized-data-importer to: /containerized-data-importer before: install @@ -110,7 +110,7 @@ shell: - ls -la /cdi-binaries --- -image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder final: false fromImage: builder/golang-bookworm-1.23 git: diff --git a/images/cdi-cloner/werf.inc.yaml b/images/cdi-cloner/werf.inc.yaml index 12b868be01..3da21c6927 100644 --- a/images/cdi-cloner/werf.inc.yaml +++ b/images/cdi-cloner/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . .ImageName "bins") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins add: /relocate to: / before: setup @@ -21,23 +21,23 @@ binaries: {{ $virtCDIClonerDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName "bins") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries import: -- image: {{ include "ImageName" (tuple . .ImageName "gobuild") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-gobuild add: /cdi-binaries to: /usr/bin includePaths: - cloner-startup before: install -- image: {{ include "ImageName" (tuple . "cdi-artifact-cbuilder") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact-cbuilder add: /bins to: /usr/bin before: install includePaths: - hello -- image: {{ include "ImageName" (tuple . "cdi-artifact") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact add: /cdi-binaries to: /usr/bin includePaths: @@ -49,7 +49,7 @@ shell: - | /relocate_binaries.sh -i "{{ $virtCDIClonerDependencies.binaries | join " " }}" -o /relocate --- -image: {{ include "ImageName" (tuple . .ImageName "gobuild") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-gobuild final: false fromImage: builder/golang-bookworm-1.23 git: diff --git a/images/cdi-controller/werf.inc.yaml b/images/cdi-controller/werf.inc.yaml index 4922452743..44ab523349 100644 --- a/images/cdi-controller/werf.inc.yaml +++ b/images/cdi-controller/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}) }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . .ImageName "bins") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins add: /relocate to: / before: setup @@ -20,9 +20,9 @@ packages: {{ $cdiClonerDependencies := include "cdi-controller-deps" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName "bins") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries import: - image: tools/util-linux add: / @@ -30,13 +30,13 @@ import: after: setup includePaths: - sbin/blockdev -- image: {{ include "ImageName" (tuple . "cdi-artifact" "cbuilder") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact-cbuilder add: /bins to: /relocate/usr/bin after: setup includePaths: - printFile -- image: {{ include "ImageName" (tuple . "cdi-artifact") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact add: /cdi-binaries to: /usr/bin includePaths: diff --git a/images/cdi-importer/werf.inc.yaml b/images/cdi-importer/werf.inc.yaml index 91e7c13647..022ab298b1 100644 --- a/images/cdi-importer/werf.inc.yaml +++ b/images/cdi-importer/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . .ImageName "bins") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins add: /relocate to: / before: setup @@ -31,9 +31,9 @@ binaries: {{ $cdiImporterDependencies := include "cdi-importer-deps" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName "bins") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries import: - image: tools/util-linux add: / @@ -43,7 +43,7 @@ import: - sbin/blockdev - bin/mount - bin/umount -- image: {{ include "ImageName" (tuple . "cdi-artifact") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact add: /cdi-binaries to: /usr/bin before: setup @@ -51,7 +51,7 @@ import: - cdi-image-size-detection - cdi-importer - cdi-source-update-poller -- image: {{ include "ImageName" (tuple . "qemu") }} +- image: {{ .ModuleNamePrefix }}qemu add: /qemu-img to: /relocate before: setup diff --git a/images/cdi-operator/werf.inc.yaml b/images/cdi-operator/werf.inc.yaml index fe47bd0c04..df5c2d3e41 100644 --- a/images/cdi-operator/werf.inc.yaml +++ b/images/cdi-operator/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}) }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "cdi-artifact") }} +- image: {{ .ModuleNamePrefix }}cdi-artifact add: /cdi-binaries to: /usr/bin includePaths: diff --git a/images/distroless/werf.inc.yaml b/images/distroless/werf.inc.yaml index 4d347ed106..5d9fa78189 100644 --- a/images/distroless/werf.inc.yaml +++ b/images/distroless/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/scratch import: - - image: {{ include "ImageName" (tuple . .ImageName "artifact") }} + - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-artifact add: /relocate to: / before: setup @@ -15,8 +15,8 @@ imageSpec: LC_ALL: POSIX user: 64535 --- -image: {{ include "ImageName" (tuple . .ImageName "artifact") }} -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-artifact +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries final: false shell: beforeInstall: diff --git a/images/dvcr-artifact/werf.inc.yaml b/images/dvcr-artifact/werf.inc.yaml index 2ba02a062d..fa9f4d4689 100644 --- a/images/dvcr-artifact/werf.inc.yaml +++ b/images/dvcr-artifact/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName "builder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: @@ -60,9 +60,9 @@ binaries: {{ $dvcrDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName "bins") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries import: - image: tools/util-linux add: / @@ -71,7 +71,7 @@ import: includePaths: - bin/mount - bin/umount -- image: {{ include "ImageName" (tuple . .ImageName "builder") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder add: /out to: /usr/local/bin before: setup @@ -88,7 +88,7 @@ import: add: /nbdkit to: /nbdkit before: install -- image: {{ include "ImageName" (tuple . "qemu") }} +- image: {{ .ModuleNamePrefix }}qemu add: /qemu-img to: /qemu-img before: install diff --git a/images/dvcr-importer/werf.inc.yaml b/images/dvcr-importer/werf.inc.yaml index 5d2fc8fde0..a1d5dfd8d3 100644 --- a/images/dvcr-importer/werf.inc.yaml +++ b/images/dvcr-importer/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "dvcr-artifact" "bins") }} +- image: {{ .ModuleNamePrefix }}dvcr-artifact-bins add: /relocate to: / after: install diff --git a/images/dvcr-uploader/werf.inc.yaml b/images/dvcr-uploader/werf.inc.yaml index 9033cc9126..80427a7b4a 100644 --- a/images/dvcr-uploader/werf.inc.yaml +++ b/images/dvcr-uploader/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}) }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "dvcr-artifact" "bins") }} +- image: {{ .ModuleNamePrefix }}dvcr-artifact-bins add: /relocate to: / after: install diff --git a/images/dvcr/werf.inc.yaml b/images/dvcr/werf.inc.yaml index a380362826..d42b988010 100644 --- a/images/dvcr/werf.inc.yaml +++ b/images/dvcr/werf.inc.yaml @@ -2,7 +2,7 @@ {{- $version := "2.8.3" }} {{- $gitRepoUrl := "distribution/distribution.git" }} -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -16,17 +16,17 @@ shell: git clone --depth 1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /distribution --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . .ImageName "builder") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder add: /container-registry-binary to: /usr/bin before: setup includePaths: - registry # Registry configuration is stored in configmap: templates/dvcr/configmap.yaml -- image: {{ include "ImageName" (tuple . "dvcr-artifact" "bins") }} +- image: {{ .ModuleNamePrefix }}dvcr-artifact-bins add: /relocate/usr/local/bin/dvcr-cleaner to: /usr/local/bin/dvcr-cleaner before: setup @@ -34,14 +34,14 @@ imageSpec: config: user: 64535 --- -image: {{ include "ImageName" (tuple . .ImageName "builder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} mount: - fromPath: ~/go-pkg-cache to: /go/pkg import: -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /distribution to: /distribution before: install diff --git a/images/edk2/werf.inc.yaml b/images/edk2/werf.inc.yaml index ab82c52642..becfc1f1a9 100644 --- a/images/edk2/werf.inc.yaml +++ b/images/edk2/werf.inc.yaml @@ -3,9 +3,9 @@ {{- $version := get $.Version $gitRepoName }} {{- $gitRepoUrl := "tianocore/edk2.git" }} -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: {{ include "ImageName" (tuple . "src-artifact") }} +fromImage: {{ .ModuleNamePrefix }}src-artifact git: - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/build.sh to: /build.sh @@ -66,27 +66,27 @@ shell: --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11 import: -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /{{ $gitRepoName }}-{{ $version }} to: /{{ $gitRepoName }}-{{ $version }} before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /edk2-platforms to: /edk2-platforms before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /FIRMWARE to: /FIRMWARE before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /Logo.bmp to: /Logo.bmp before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /build.sh to: /build.sh before: install diff --git a/images/hooks/werf.inc.yaml b/images/hooks/werf.inc.yaml index 5ab510a0f8..57613cdf69 100644 --- a/images/hooks/werf.inc.yaml +++ b/images/hooks/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: @@ -11,11 +11,11 @@ git: - go.sum - '**/*.go' --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/golang-bookworm-1.24 import: - - image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} + - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /app/images/hooks to: /app/images/hooks before: install diff --git a/images/kube-api-rewriter/werf.inc.yaml b/images/kube-api-rewriter/werf.inc.yaml index 78e58b1da4..c907a71b7e 100644 --- a/images/kube-api-rewriter/werf.inc.yaml +++ b/images/kube-api-rewriter/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName "builder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23 git: @@ -32,10 +32,10 @@ shell: --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: builder/scratch import: - - image: {{ include "ImageName" (tuple . .ImageName "builder") }} + - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder add: /src/kube-api-rewriter/kube-api-rewriter to: /app/kube-api-rewriter after: install diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index b62376f167..35b67ef257 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -3,7 +3,7 @@ {{- $version := get $.Version $gitRepoName }} {{- $gitRepoUrl := "libvirt/libvirt.git" }} -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: @@ -91,19 +91,19 @@ libraries: {{- end -}} {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }}{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} import: -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /{{ $gitRepoName }}-{{ $version }} to: /{{ $gitRepoName }}-{{ $version }} before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /patches to: /patches before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /install-libvirt.sh to: /install-libvirt.sh before: install diff --git a/images/pre-delete-hook/werf.inc.yaml b/images/pre-delete-hook/werf.inc.yaml index 8e3b3ef040..81a6e004ec 100644 --- a/images/pre-delete-hook/werf.inc.yaml +++ b/images/pre-delete-hook/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName "builder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23 git: @@ -29,10 +29,10 @@ shell: - export CGO_ENABLED=0 - go build -v -a -o pre-delete-hook main.go --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: builder/scratch import: -- image: {{ include "ImageName" (tuple . .ImageName "builder") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder add: /pre-delete-hook/pre-delete-hook to: /pre-delete-hook after: install diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index d4d2f39cf1..c0123c033f 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -3,9 +3,9 @@ {{- $version := get $.Version $gitRepoName }} {{- $gitRepoUrl := "qemu/qemu.git" }} -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: {{ include "ImageName" (tuple . "src-artifact") }} +fromImage: {{ .ModuleNamePrefix }}src-artifact git: - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} to: / @@ -123,11 +123,11 @@ libraries: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }}{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} import: -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /{{ $gitRepoName }}-{{ $version }} to: /{{ $gitRepoName }}-{{ $version }} before: install @@ -135,11 +135,11 @@ import: add: /dmidecode to: /dmidecode before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /patches to: /patches before: install -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: / to: / before: install diff --git a/images/src-artifact/werf.inc.yaml b/images/src-artifact/werf.inc.yaml index 8e62eabde2..9d877793d9 100644 --- a/images/src-artifact/werf.inc.yaml +++ b/images/src-artifact/werf.inc.yaml @@ -1,4 +1,4 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/src diff --git a/images/svace-builder/werf.inc.yaml b/images/svace-builder/werf.inc.yaml index 172aa6fb1c..87e62d41b9 100644 --- a/images/svace-builder/werf.inc.yaml +++ b/images/svace-builder/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName "download") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-download final: false fromImage: builder/alpine secrets: @@ -16,11 +16,11 @@ shell: - git clone --depth 1 --branch v4.0.250415 $(cat /run/secrets/SOURCE_REPO)/ispras/svace.git /opt/svace --- -image: {{ include "ImageName" (tuple . "base-alt" "p11/svace") }} +image: {{ .ModuleNamePrefix }}base-alt-p11/svace final: false fromImage: BASE_ALT_P11 import: -- image: {{ include "ImageName" (tuple . .ImageName "download") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-download add: /opt/svace to: /opt/svace before: install @@ -36,11 +36,11 @@ shell: - | ln -s /opt/svace/bin/svace /usr/local/bin/svace --- -image: {{ include "ImageName" (tuple . "builder/golang-bookworm" "1.23/svace") }} +image: {{ .ModuleNamePrefix }}builder/golang-bookworm-1.23/svace final: false fromImage: builder/golang-bookworm-1.23 import: -- image: {{ include "ImageName" (tuple . .ImageName "download") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-download add: /opt/svace to: /opt/svace before: install diff --git a/images/virt-api/werf.inc.yaml b/images/virt-api/werf.inc.yaml index 3e8742c9fa..a6183e39b4 100644 --- a/images/virt-api/werf.inc.yaml +++ b/images/virt-api/werf.inc.yaml @@ -1,14 +1,14 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-binaries/ to: /usr/bin includePaths: - virt-api before: setup -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-config-files/ to: /etc includePaths: diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index b07c14940c..afc2c31654 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -3,9 +3,9 @@ {{- $version := "v1.3.1" }} {{- $tag := print $version "-v12n.1"}} --- -image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: {{ include "ImageName" (tuple . "src-artifact") }} +fromImage: {{ .ModuleNamePrefix }}src-artifact secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO }} @@ -17,7 +17,7 @@ shell: --- -{{- $name := print $.ImageName "-dependencies" -}} +{{- $name := print .ImageName "-dependencies" -}} {{- define "$name" -}} packages: - git @@ -39,11 +39,11 @@ packages: {{ $virtArtifactDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11") }}{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} import: -- image: {{ include "ImageName" (tuple . .ImageName "src-artifact") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /kubevirt to: /kubevirt before: install diff --git a/images/virt-controller/werf.inc.yaml b/images/virt-controller/werf.inc.yaml index 05d34f169e..7eef10eecc 100644 --- a/images/virt-controller/werf.inc.yaml +++ b/images/virt-controller/werf.inc.yaml @@ -1,14 +1,14 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-binaries/ to: /usr/bin includePaths: - virt-controller before: setup -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-config-files/ to: /etc includePaths: diff --git a/images/virt-handler/werf.inc.yaml b/images/virt-handler/werf.inc.yaml index b2c7545415..51cc5a4560 100644 --- a/images/virt-handler/werf.inc.yaml +++ b/images/virt-handler/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . .ImageName "bins") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins add: /relocate to: / after: install @@ -15,7 +15,7 @@ import: includePaths: - usr/bin/cp - usr/bin/coreutils -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-binaries/ to: /usr/bin after: install @@ -23,17 +23,17 @@ import: - virt-chroot - virt-handler - container-disk -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt/cmd/{{ $.ImageName }}/virt_launcher.cil to: /virt_launcher.cil after: install -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-config-files/.version to: /.version after: install includePaths: - .version -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt/cmd/{{ $.ImageName }}/ to: /etc after: install @@ -64,9 +64,9 @@ binaries: {{ $virtHandlerDependencies := include "$name" . | fromYaml }} -image: {{ include "ImageName" (tuple . .ImageName "bins") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries import: - image: tools/util-linux add: / @@ -87,7 +87,7 @@ import: add: /acl to: /acl before: install -- image: {{ include "ImageName" (tuple . "qemu") }} +- image: {{ .ModuleNamePrefix }}qemu add: /qemu-img to: /relocate before: setup diff --git a/images/virt-launcher/werf.inc.yaml b/images/virt-launcher/werf.inc.yaml index 822b3351c9..a1c5eb12e9 100644 --- a/images/virt-launcher/werf.inc.yaml +++ b/images/virt-launcher/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: true -fromImage: {{ include "ImageName" (tuple . "distroless") }} +fromImage: {{ .ModuleNamePrefix }}distroless import: - - image: {{ include "ImageName" (tuple . .ImageName "binaries") }} + - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-binaries add: /relocate to: / after: install @@ -153,9 +153,9 @@ binaries: {{- $gitRepoName := "libvirt" }} {{- $version := get $.Version $gitRepoName }} -image: {{ include "ImageName" (tuple . .ImageName "binaries") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-binaries final: false -fromImage: {{ include "ImageName" (tuple . "base-alt-p11" "binaries") }} +fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries git: # Add qemu and virtqemud configs - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/configs @@ -176,11 +176,11 @@ git: - nsswitch.conf import: # Libvirt and QEMU libraries and binaries -- image: {{ include "ImageName" (tuple . "libvirt") }} +- image: {{ .ModuleNamePrefix }}libvirt add: /BINS to: /libvirt-bins before: install -- image: {{ include "ImageName" (tuple . "qemu") }} +- image: {{ .ModuleNamePrefix }}qemu add: /BINS to: /qemu-bins before: install @@ -190,7 +190,7 @@ import: before: install # EDK2 (uefi firmware) -- image: {{ include "ImageName" (tuple . "edk2") }} +- image: {{ .ModuleNamePrefix }}edk2 add: /FIRMWARE/ to: /relocate/usr/share/edk2/ovmf before: install @@ -199,7 +199,7 @@ import: - '*.bin' - '*.efi' - '*.iso' -- image: {{ include "ImageName" (tuple . "edk2") }} +- image: {{ .ModuleNamePrefix }}edk2 add: /FIRMWARE/ to: /relocate/usr/share/qemu/firmware before: install @@ -207,12 +207,12 @@ import: - '*.json' # Import from virt artifact -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-config-files/.version to: /.version after: install -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-binaries/ to: /relocate/usr/bin before: setup @@ -223,7 +223,7 @@ import: - virt-launcher-monitor - virt-probe - virt-tail -- image: {{ include "ImageName" (tuple . .ImageName "gobuilder") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-gobuilder add: /binaries to: /relocate/usr/bin before: setup @@ -286,7 +286,7 @@ import: - usr/bin/coreutils -- image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder add: /bins to: /relocate/usr/bin before: setup @@ -436,7 +436,7 @@ shell: cp -a etc/libvirt etc/libvirt-init --- -image: {{ include "ImageName" (tuple . .ImageName "gobuilder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-gobuilder final: false fromImage: builder/golang-bookworm-1.23 git: @@ -481,7 +481,7 @@ shell: go build -ldflags="-s -w" -o /binaries/vlctl ./cmd/vlctl/main.go echo "Done" --- -image: {{ include "ImageName" (tuple . .ImageName "cbuilder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder final: false fromImage: builder/golang-bookworm-1.23 git: diff --git a/images/virt-operator/werf.inc.yaml b/images/virt-operator/werf.inc.yaml index 0df23aaa04..022ad77e2a 100644 --- a/images/virt-operator/werf.inc.yaml +++ b/images/virt-operator/werf.inc.yaml @@ -1,14 +1,14 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-binaries/ to: /usr/bin includePaths: - virt-operator before: setup -- image: {{ include "ImageName" (tuple . "virt-artifact") }} +- image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt-config-files/ to: /etc includePaths: diff --git a/images/virtualization-api/werf.inc.yaml b/images/virtualization-api/werf.inc.yaml index d0bc391879..9102396d19 100644 --- a/images/virtualization-api/werf.inc.yaml +++ b/images/virtualization-api/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: - - image: {{ include "ImageName" (tuple . "virtualization-artifact") }} + - image: {{ .ModuleNamePrefix }}virtualization-artifact add: /usr/local/go/src/virtualization-controller/virtualization-api to: /app/virtualization-api after: install diff --git a/images/virtualization-artifact/werf.inc.yaml b/images/virtualization-artifact/werf.inc.yaml index ee0af30d58..738143ee2e 100644 --- a/images/virtualization-artifact/werf.inc.yaml +++ b/images/virtualization-artifact/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: diff --git a/images/virtualization-audit/werf.inc.yaml b/images/virtualization-audit/werf.inc.yaml index 8ab773c4db..83816cf184 100644 --- a/images/virtualization-audit/werf.inc.yaml +++ b/images/virtualization-audit/werf.inc.yaml @@ -1,9 +1,9 @@ {{- if eq .MODULE_EDITION "EE" }} --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: - - image: {{ include "ImageName" (tuple . "virtualization-artifact") }} + - image: {{ .ModuleNamePrefix }}virtualization-artifact add: /usr/local/go/src/virtualization-controller/virtualization-audit to: /app/virtualization-audit after: install diff --git a/images/virtualization-controller/werf.inc.yaml b/images/virtualization-controller/werf.inc.yaml index 303c4772ff..dafab85b54 100644 --- a/images/virtualization-controller/werf.inc.yaml +++ b/images/virtualization-controller/werf.inc.yaml @@ -1,8 +1,8 @@ --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: - - image: {{ include "ImageName" (tuple . "virtualization-artifact") }} + - image: {{ .ModuleNamePrefix }}virtualization-artifact add: /usr/local/go/src/virtualization-controller/virtualization-controller to: /app/virtualization-controller after: install diff --git a/images/vm-route-forge/werf.inc.yaml b/images/vm-route-forge/werf.inc.yaml index b405dec7e6..6aea4995e8 100644 --- a/images/vm-route-forge/werf.inc.yaml +++ b/images/vm-route-forge/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ include "ImageName" (tuple . .ImageName "builder") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: @@ -36,10 +36,10 @@ shell: {{- $_ := set $ "ProjectName" (list $.ImageName "vm-route-forge" | join "/") }} {{- include "image-build.build" (set $ "BuildCommand" `go build -ldflags="-s -w" -o vm-route-forge cmd/vm-route-forge/main.go`) | nindent 6 }} --- -image: {{ include "ImageName" (tuple . .ImageName) }} -fromImage: {{ include "ImageName" (tuple . "distroless") }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} +fromImage: {{ .ModuleNamePrefix }}distroless import: -- image: {{ include "ImageName" (tuple . .ImageName "builder") }} +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder add: /app/images/vm-route-forge/vm-route-forge to: /app/vm-route-forge after: install From 33a1f651817414697e22572164a73b70f70a22cb Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Mon, 9 Jun 2025 21:54:14 +0300 Subject: [PATCH 03/30] use instead include Signed-off-by: Nikita Korolev --- .werf/defines/process-packages-images.tmpl | 2 ++ images/base-alt-p11-binaries/werf.inc.yaml | 2 +- images/bounder/werf.inc.yaml | 2 +- images/cdi-artifact/werf.inc.yaml | 4 ++-- images/cdi-cloner/werf.inc.yaml | 2 +- images/dvcr-artifact/werf.inc.yaml | 2 +- images/edk2/werf.inc.yaml | 8 ++++---- images/hooks/werf.inc.yaml | 2 +- images/kube-api-rewriter/werf.inc.yaml | 2 +- images/libvirt/werf.inc.yaml | 2 +- images/packages/binaries/acl/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/bzip2/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/dmidecode/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/dtc/werf.inc.yaml | 8 ++++---- images/packages/binaries/file/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/fuse3/werf.inc.yaml | 8 ++++---- images/packages/binaries/glib2/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/glibc/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/gmp/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/gnutls/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/libattr/werf.inc.yaml | 8 ++++---- images/packages/binaries/libaudit/werf.inc.yaml | 8 ++++---- images/packages/binaries/libblkid/werf.inc.yaml | 8 ++++---- images/packages/binaries/libbrotli/werf.inc.yaml | 8 ++++---- images/packages/binaries/libbsd/werf.inc.yaml | 8 ++++---- images/packages/binaries/libburn/werf.inc.yaml | 8 ++++---- images/packages/binaries/libgcrypt/werf.inc.yaml | 8 ++++---- images/packages/binaries/libtpms/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/lvm2/werf.inc.yaml | 8 ++++---- images/packages/binaries/nbdkit/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/nftables/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/numactl/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/openssl/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/swtpm/werf.inc.yaml | 16 ++++++++-------- images/packages/binaries/xorriso/werf.inc.yaml | 16 ++++++++-------- images/pre-delete-hook/werf.inc.yaml | 2 +- images/qemu/werf.inc.yaml | 4 ++-- images/virt-launcher/werf.inc.yaml | 10 +++++----- images/virtualization-artifact/werf.inc.yaml | 4 ++-- images/vm-route-forge/werf.inc.yaml | 4 ++-- 40 files changed, 187 insertions(+), 185 deletions(-) diff --git a/.werf/defines/process-packages-images.tmpl b/.werf/defines/process-packages-images.tmpl index 2422f6d57b..0af1987dca 100644 --- a/.werf/defines/process-packages-images.tmpl +++ b/.werf/defines/process-packages-images.tmpl @@ -27,6 +27,8 @@ {{- $_ := set $ctx "PackagePath" (printf "%s/%s" $ImageData._0 $ImageData._1) }} {{- $_ := set $ctx "ImageName" $ImageData._2 }} +{{- $_ := set $ctx "ModuleNamePrefix" "" }} +{{- $_ := set $ctx "ModulePathPrefix" "" }} {{- $_ := set $ctx "ImageBuildData" $content }} {{- $_ := set $ctx "SOURCE_REPO" $Root.SOURCE_REPO }} {{- $_ := set $ctx "SOURCE_REPO_GIT" $Root.SOURCE_REPO_GIT }} diff --git a/images/base-alt-p11-binaries/werf.inc.yaml b/images/base-alt-p11-binaries/werf.inc.yaml index d856d774a7..afc45a23ee 100644 --- a/images/base-alt-p11-binaries/werf.inc.yaml +++ b/images/base-alt-p11-binaries/werf.inc.yaml @@ -14,7 +14,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: BASE_ALT_P11 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/relocate_binaries.sh + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/relocate_binaries.sh to: /relocate_binaries.sh shell: install: diff --git a/images/bounder/werf.inc.yaml b/images/bounder/werf.inc.yaml index 11906bfa4a..fc430cb4e4 100644 --- a/images/bounder/werf.inc.yaml +++ b/images/bounder/werf.inc.yaml @@ -14,7 +14,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder final: false fromImage: builder/golang-bookworm-1.23 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/static_binaries + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/static_binaries to: /static_binaries stageDependencies: install: diff --git a/images/cdi-artifact/werf.inc.yaml b/images/cdi-artifact/werf.inc.yaml index 943bcf2509..e80aecc4d0 100644 --- a/images/cdi-artifact/werf.inc.yaml +++ b/images/cdi-artifact/werf.inc.yaml @@ -6,7 +6,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /src stageDependencies: install: @@ -114,7 +114,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder final: false fromImage: builder/golang-bookworm-1.23 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: / includePaths: - static_binaries diff --git a/images/cdi-cloner/werf.inc.yaml b/images/cdi-cloner/werf.inc.yaml index 3da21c6927..a5c48f4663 100644 --- a/images/cdi-cloner/werf.inc.yaml +++ b/images/cdi-cloner/werf.inc.yaml @@ -53,7 +53,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-gobuild final: false fromImage: builder/golang-bookworm-1.23 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/cloner-startup + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/cloner-startup to: /app stageDependencies: install: diff --git a/images/dvcr-artifact/werf.inc.yaml b/images/dvcr-artifact/werf.inc.yaml index fa9f4d4689..a756067b7e 100644 --- a/images/dvcr-artifact/werf.inc.yaml +++ b/images/dvcr-artifact/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /src stageDependencies: install: diff --git a/images/edk2/werf.inc.yaml b/images/edk2/werf.inc.yaml index becfc1f1a9..4d670c8fe1 100644 --- a/images/edk2/werf.inc.yaml +++ b/images/edk2/werf.inc.yaml @@ -7,24 +7,24 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: {{ .ModuleNamePrefix }}src-artifact git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/build.sh +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/build.sh to: /build.sh stageDependencies: install: - build.sh -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/logo/Logo.bmp +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/logo/Logo.bmp to: /Logo.bmp stageDependencies: install: - '**/*' -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/json +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/json to: /FIRMWARE includePaths: - '*.json' stageDependencies: install: - '*.json' -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/uefi-revocation-list +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/uefi-revocation-list to: /FIRMWARE includePaths: - '*.bin' diff --git a/images/hooks/werf.inc.yaml b/images/hooks/werf.inc.yaml index 57613cdf69..4138baadf0 100644 --- a/images/hooks/werf.inc.yaml +++ b/images/hooks/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /app/images/hooks stageDependencies: install: diff --git a/images/kube-api-rewriter/werf.inc.yaml b/images/kube-api-rewriter/werf.inc.yaml index c907a71b7e..d2ec53b768 100644 --- a/images/kube-api-rewriter/werf.inc.yaml +++ b/images/kube-api-rewriter/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /src/kube-api-rewriter stageDependencies: install: diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index 35b67ef257..be4d52e048 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -7,7 +7,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: / includePaths: - install-libvirt.sh diff --git a/images/packages/binaries/acl/werf.inc.yaml b/images/packages/binaries/acl/werf.inc.yaml index 13c5b8d005..8a2d31e1f0 100644 --- a/images/packages/binaries/acl/werf.inc.yaml +++ b/images/packages/binaries/acl/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "acl.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/bzip2/werf.inc.yaml b/images/packages/binaries/bzip2/werf.inc.yaml index 672326ba1b..53159ab73e 100644 --- a/images/packages/binaries/bzip2/werf.inc.yaml +++ b/images/packages/binaries/bzip2/werf.inc.yaml @@ -1,20 +1,20 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "bzip2/bzip2.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/dmidecode/werf.inc.yaml b/images/packages/binaries/dmidecode/werf.inc.yaml index 3a105ced18..ed6ed58dc2 100644 --- a/images/packages/binaries/dmidecode/werf.inc.yaml +++ b/images/packages/binaries/dmidecode/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /dmidecode before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "dmidecode.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 3f28d33412..3e80afc491 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libfdt before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "dtc/dtc.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/file/werf.inc.yaml b/images/packages/binaries/file/werf.inc.yaml index 05f91425f4..eaa6042cf8 100644 --- a/images/packages/binaries/file/werf.inc.yaml +++ b/images/packages/binaries/file/werf.inc.yaml @@ -1,20 +1,20 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "file/file.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index b38235e10f..a23206cb25 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libfuse3 before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libfuse/libfuse.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index f6bf6db91e..3fea15e43e 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /glib2 before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "GNOME/glib.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index 8c6a2300c5..cdf597a234 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /glibc before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "glibc.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index 91979c995d..a1f9e43b58 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libgmp10 before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "gmp/gmp" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -36,11 +36,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index 223b7f5866..a7fbc0e117 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /gnutls before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "gnutls/gnutls.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -61,11 +61,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index 03475d806b..fb6ad2803b 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libattr before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "attr.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -20,7 +20,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index 92ffd4dfbf..060dc98b42 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libaudit before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "linux-audit/audit-userspace.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index 2a10a1305c..4e62d7184f 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libblkid before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "util-linux/util-linux.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index fe750fd439..644b0fa7f8 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libbrotli before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "google/brotli.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index 28dc5ff8b4..471f0a888f 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libbsd before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libbsd/libbsd.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index 5616999826..16c9690dfd 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libburn before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libburnia/libburn.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -21,7 +21,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 41df34e63b..17380134f6 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libcrypt before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "gpg/libgcrypt" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -22,7 +22,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/libtpms/werf.inc.yaml b/images/packages/binaries/libtpms/werf.inc.yaml index d9069d8f13..008dbc0d4a 100644 --- a/images/packages/binaries/libtpms/werf.inc.yaml +++ b/images/packages/binaries/libtpms/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libtpms before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "stefanberger/libtpms.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index 6f38766f09..cfca092cd0 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -1,15 +1,15 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libdevmapper before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "lvmteam/lvm2.git" }} {{- $name := print $.ImageName "-dependencies" -}} @@ -23,7 +23,7 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt secrets: diff --git a/images/packages/binaries/nbdkit/werf.inc.yaml b/images/packages/binaries/nbdkit/werf.inc.yaml index 7529316be5..42d4d367c7 100644 --- a/images/packages/binaries/nbdkit/werf.inc.yaml +++ b/images/packages/binaries/nbdkit/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /nbdkit before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "nbdkit/nbdkit.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -55,11 +55,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/nftables/werf.inc.yaml b/images/packages/binaries/nftables/werf.inc.yaml index f8e993be5a..d2b75e91e7 100644 --- a/images/packages/binaries/nftables/werf.inc.yaml +++ b/images/packages/binaries/nftables/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /nftables before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "nftables.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/numactl/werf.inc.yaml b/images/packages/binaries/numactl/werf.inc.yaml index 874fcc3896..4d065e88be 100644 --- a/images/packages/binaries/numactl/werf.inc.yaml +++ b/images/packages/binaries/numactl/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /numactl before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "numactl/numactl.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/openssl/werf.inc.yaml b/images/packages/binaries/openssl/werf.inc.yaml index 8040f716ea..55578fda37 100644 --- a/images/packages/binaries/openssl/werf.inc.yaml +++ b/images/packages/binaries/openssl/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /openssl before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "openssl/openssl.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/swtpm/werf.inc.yaml b/images/packages/binaries/swtpm/werf.inc.yaml index 42b8c99f31..2d0d7d99a3 100644 --- a/images/packages/binaries/swtpm/werf.inc.yaml +++ b/images/packages/binaries/swtpm/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /swtpm before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "stefanberger/swtpm.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -47,11 +47,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/xorriso/werf.inc.yaml b/images/packages/binaries/xorriso/werf.inc.yaml index 3d67e3520b..4b33e421ef 100644 --- a/images/packages/binaries/xorriso/werf.inc.yaml +++ b/images/packages/binaries/xorriso/werf.inc.yaml @@ -1,21 +1,21 @@ --- -image: {{ $.PackagePath }}/{{ $.ImageName }} +image: {{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +- image: {{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /xorriso before: setup --- -{{- $version := get $.PackageVersion $.ImageName }} +{{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libburnia/libisoburn.git" }} -{{- $PkgImageName := (printf "%s/%s" $.PackagePath $.ImageName) }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +image: {{ $PkgImageName }}-src-artifact final: false -fromImage: {{ include "PkgImageName" (tuple . "src-artifact") }} +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ $.PackagePath }}/{{ $.ImageName }}-builder +image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ include "ImageName" (tuple . $PkgImageName "src-artifact") }} +- image: {{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/pre-delete-hook/werf.inc.yaml b/images/pre-delete-hook/werf.inc.yaml index 81a6e004ec..cb9423be17 100644 --- a/images/pre-delete-hook/werf.inc.yaml +++ b/images/pre-delete-hook/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23 git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /pre-delete-hook stageDependencies: install: diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index c0123c033f..ac14c80a76 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -7,7 +7,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: {{ .ModuleNamePrefix }}src-artifact git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: / includePaths: - install-qemu.sh @@ -17,7 +17,7 @@ git: stageDependencies: install: - '**/*' -- add: {{ include "PreffixPath" . }}/images/base-alt-p11-binaries/relocate_binaries.sh +- add: {{ .ModulePathPrefix }}/images/base-alt-p11-binaries/relocate_binaries.sh to: /relocate_binaries.sh stageDependencies: install: diff --git a/images/virt-launcher/werf.inc.yaml b/images/virt-launcher/werf.inc.yaml index a1c5eb12e9..cd25cff152 100644 --- a/images/virt-launcher/werf.inc.yaml +++ b/images/virt-launcher/werf.inc.yaml @@ -158,7 +158,7 @@ final: false fromImage: {{ .ModuleNamePrefix }}base-alt-p11-binaries git: # Add qemu and virtqemud configs - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/configs + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/configs to: /relocate/etc/libvirt stageDependencies: setup: @@ -167,7 +167,7 @@ git: includePaths: - qemu.conf - virtqemud.conf - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/configs + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/configs to: /relocate/etc stageDependencies: setup: @@ -440,14 +440,14 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-gobuilder final: false fromImage: builder/golang-bookworm-1.23 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/node-labeller + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/node-labeller to: /node-labeller includePaths: - '**/*' stageDependencies: install: - '**/*' - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/vlctl + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/vlctl to: /src-vlctl includePaths: - '**/*' @@ -485,7 +485,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-cbuilder final: false fromImage: builder/golang-bookworm-1.23 git: - - add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }}/static_binaries + - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/static_binaries to: /static_binaries stageDependencies: install: diff --git a/images/virtualization-artifact/werf.inc.yaml b/images/virtualization-artifact/werf.inc.yaml index 738143ee2e..6052cafdbe 100644 --- a/images/virtualization-artifact/werf.inc.yaml +++ b/images/virtualization-artifact/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: -- add: {{ include "PreffixPath" . }}/api +- add: {{ .ModulePathPrefix }}/api to: /usr/local/go/api stageDependencies: install: @@ -11,7 +11,7 @@ git: - go.sum setup: - "**/*.go" -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /usr/local/go/src/virtualization-controller stageDependencies: install: diff --git a/images/vm-route-forge/werf.inc.yaml b/images/vm-route-forge/werf.inc.yaml index 6aea4995e8..574341ffed 100644 --- a/images/vm-route-forge/werf.inc.yaml +++ b/images/vm-route-forge/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: -- add: {{ include "PreffixPath" . }}/images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /app/images/vm-route-forge stageDependencies: install: @@ -11,7 +11,7 @@ git: - go.sum setup: - "**/*.go" -- add: {{ include "PreffixPath" . }}/api +- add: {{ .ModulePathPrefix }}/api to: /app/api stageDependencies: setup: From 55f642f14cbe5ab0fca29d7d91a11b82c1badfd1 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 10:46:33 +0300 Subject: [PATCH 04/30] add rm git to src-artifact Signed-off-by: Nikita Korolev --- images/base-alt-p11-binaries/werf.inc.yaml | 4 ++++ images/edk2/werf.inc.yaml | 2 +- images/packages/binaries/acl/werf.inc.yaml | 1 + images/packages/binaries/bzip2/werf.inc.yaml | 1 + .../packages/binaries/dmidecode/werf.inc.yaml | 1 + images/packages/binaries/dtc/werf.inc.yaml | 24 ++++++++++++++++--- images/packages/binaries/fuse3/werf.inc.yaml | 18 +++++++++++--- images/packages/binaries/glib2/werf.inc.yaml | 1 + images/packages/binaries/glibc/werf.inc.yaml | 1 + images/packages/binaries/gmp/werf.inc.yaml | 1 + images/qemu/werf.inc.yaml | 2 +- images/virt-artifact/werf.inc.yaml | 2 +- 12 files changed, 49 insertions(+), 9 deletions(-) diff --git a/images/base-alt-p11-binaries/werf.inc.yaml b/images/base-alt-p11-binaries/werf.inc.yaml index afc45a23ee..8446fad4f4 100644 --- a/images/base-alt-p11-binaries/werf.inc.yaml +++ b/images/base-alt-p11-binaries/werf.inc.yaml @@ -12,7 +12,11 @@ libraries: image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false +{{- if not .ModuleName }} fromImage: BASE_ALT_P11 +{{- else }} +fromImage: builder/alt +{{- end }} git: - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/relocate_binaries.sh to: /relocate_binaries.sh diff --git a/images/edk2/werf.inc.yaml b/images/edk2/werf.inc.yaml index 4d670c8fe1..0b867082c2 100644 --- a/images/edk2/werf.inc.yaml +++ b/images/edk2/werf.inc.yaml @@ -5,7 +5,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: {{ .ModuleNamePrefix }}src-artifact +fromImage: builder/src git: - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/build.sh to: /build.sh diff --git a/images/packages/binaries/acl/werf.inc.yaml b/images/packages/binaries/acl/werf.inc.yaml index 8a2d31e1f0..ed9e25cdfd 100644 --- a/images/packages/binaries/acl/werf.inc.yaml +++ b/images/packages/binaries/acl/werf.inc.yaml @@ -25,6 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src + rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/bzip2/werf.inc.yaml b/images/packages/binaries/bzip2/werf.inc.yaml index 53159ab73e..c7b7cdca26 100644 --- a/images/packages/binaries/bzip2/werf.inc.yaml +++ b/images/packages/binaries/bzip2/werf.inc.yaml @@ -24,6 +24,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/dmidecode/werf.inc.yaml b/images/packages/binaries/dmidecode/werf.inc.yaml index ed6ed58dc2..6e73b6dfaa 100644 --- a/images/packages/binaries/dmidecode/werf.inc.yaml +++ b/images/packages/binaries/dmidecode/werf.inc.yaml @@ -25,6 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch dmidecode-{{ $version }} /src + rm -rf /src/.git --- diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 3e80afc491..4989e7c420 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -11,6 +11,22 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "dtc/dtc.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -25,6 +41,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -40,9 +61,6 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src export SETUPTOOLS_SCM_PRETEND_VERSION=1.7.2 diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index a23206cb25..d624e0477a 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -11,7 +11,22 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libfuse/libfuse.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -40,9 +55,6 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src meson setup build -Duseroot=false -Dprefix=$OUTDIR/usr diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index 3fea15e43e..3735773ad0 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -25,6 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index cdf597a234..63064c8703 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -25,6 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index a1f9e43b58..b456f57adf 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -25,6 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index ac14c80a76..9af2748593 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -5,7 +5,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: {{ .ModuleNamePrefix }}src-artifact +fromImage: builder/src git: - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: / diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index afc2c31654..88759ed244 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -5,7 +5,7 @@ --- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: {{ .ModuleNamePrefix }}src-artifact +fromImage: builder/src secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO }} From 3a1d511ab2e74a08a246cbb4584965a16854b557 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 10:47:15 +0300 Subject: [PATCH 05/30] gnutls add rm git, upd submodules Signed-off-by: Nikita Korolev --- images/packages/binaries/gnutls/werf.inc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index a7fbc0e117..3f13a48b91 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -40,7 +40,8 @@ shell: git submodule set-url -- tests/suite/tls-interoperability $(cat /run/secrets/SOURCE_REPO)/redhat-crypto/tests/interop.git fi - # git submodule update --init --recursive + git submodule update --init --recursive + rm -rf /src/.git --- From 35250ecfc9c95b6a18dfefc51f78e43c2da6f9a7 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 11:02:49 +0300 Subject: [PATCH 06/30] add src Signed-off-by: Nikita Korolev --- .../packages/binaries/libattr/werf.inc.yaml | 23 +++++++++++++++-- .../packages/binaries/libaudit/werf.inc.yaml | 23 +++++++++++++++-- .../packages/binaries/libblkid/werf.inc.yaml | 23 +++++++++++++++-- .../packages/binaries/libbrotli/werf.inc.yaml | 24 +++++++++++++++--- images/packages/binaries/libbsd/werf.inc.yaml | 21 ++++++++++++++++ .../packages/binaries/libburn/werf.inc.yaml | 23 +++++++++++++++-- .../packages/binaries/libgcrypt/werf.inc.yaml | 24 +++++++++++++++--- images/packages/binaries/lvm2/werf.inc.yaml | 25 ++++++++++++++++--- 8 files changed, 169 insertions(+), 17 deletions(-) diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index fb6ad2803b..e22007714d 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -11,7 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "attr.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -23,6 +39,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,9 +59,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./autogen.sh ./configure \ diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index 060dc98b42..4bccdb4087 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -11,7 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "linux-audit/audit-userspace.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -24,6 +40,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -39,9 +60,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./autogen.sh ./configure \ diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index 4e62d7184f..4375ab888b 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -11,7 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "util-linux/util-linux.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -25,6 +41,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -40,9 +61,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./autogen.sh ./configure \ diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index 644b0fa7f8..45e82fa325 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -11,7 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "google/brotli.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -24,6 +40,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,9 +59,6 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src mkdir /build cd /build diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index 471f0a888f..42bcd4df4c 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -11,7 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libbsd/libbsd.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -24,6 +40,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index 16c9690dfd..a0aa136801 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -11,6 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "libburnia/libburn.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -24,6 +41,10 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -38,9 +59,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./bootstrap ./configure \ diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 17380134f6..649245fa88 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -11,6 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "gpg/libgcrypt" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -25,6 +42,10 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -40,9 +61,6 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src autoreconf diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index cfca092cd0..52843a2335 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -11,6 +11,23 @@ import: --- {{- $version := get .PackageVersion .ImageName }} {{- $gitRepoUrl := "lvmteam/lvm2.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + +image: {{ $PkgImageName }}-src-artifact +final: false +fromImage: builder/src +secrets: +- id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} +shell: + install: + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + + git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src + rm -rf /src/.git + +--- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -26,6 +43,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} @@ -41,9 +63,6 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src autoconf From 0e2535420a33fd186e2468efa7c85f8dbcd64818 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 12:52:59 +0300 Subject: [PATCH 07/30] fix import images Signed-off-by: Nikita Korolev --- images/packages/binaries/libburn/werf.inc.yaml | 1 + images/packages/binaries/libgcrypt/werf.inc.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index a0aa136801..a47e84dbd2 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -41,6 +41,7 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: - image: {{ $PkgImageName }}-src-artifact add: /src to: /src diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 649245fa88..4ca65d08b3 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -42,6 +42,7 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: - image: {{ $PkgImageName }}-src-artifact add: /src to: /src From 0e86e38d097ed5b44e360d44353c96bf810a5a5d Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 13:03:15 +0300 Subject: [PATCH 08/30] delete helpers template Signed-off-by: Nikita Korolev --- .werf/defines/helpers.tmpl | 145 ------------------------------------- 1 file changed, 145 deletions(-) delete mode 100644 .werf/defines/helpers.tmpl diff --git a/.werf/defines/helpers.tmpl b/.werf/defines/helpers.tmpl deleted file mode 100644 index 8c7eb071a2..0000000000 --- a/.werf/defines/helpers.tmpl +++ /dev/null @@ -1,145 +0,0 @@ -{{/* -Add {{.ModulePath }}modules/999-{{ .ModuleName }} if set .ModulePath - -Usage "PreffixPath": - -git: -- add: {{ include "PreffixPath" . }}/{{ $.ImageName }} -# /modules/999-virtualization/{{ $.ImageName }} -# /{{ $.ImageName }} - -- add: {{ include "PreffixPath" . }}/src -# /modules/999-virtualization/src -# /src -*/}} - -{{ define "PreffixPath" }} -{{- $FullPath := "" -}} -{{- if .ModuleName -}} -{{- $FullPath = (printf "/modules/%s-%s" .ModulePriority .ModuleName) -}} -{{- if .ModulePath -}} -{{- $FullPath = (printf "%smodules/%s-%s" .ModulePath .ModulePriority .ModuleName) -}} -{{- end -}} -{{- end -}} -{{- $FullPath -}} -{{ end }} - -{{/* -Helpers for generate images name with or without ModuleName -.ImageName - folder name -"suffix" - optional, if set, then image name will be .ImageName-suffix - -Usage "ImageName": -.ImageName := "cdi-artifact" - -{{ include "ImageName" (tuple . .ImageName) }} -With set .ModuleName: virtualization/cdi-artifact -Without .ModuleName: cdi-artifact - -{{ include "ImageName" (tuple . .ImageName "src") }} -With set .ModuleName: virtualization/cdi-artifact-src -Without .ModuleName: cdi-artifact-src - -{{ include "ImageName" (tuple . "dvcr-artifact") }} -With set .ModuleName: virtualization/dvcr-artifact -Without .ModuleName: cdi-artifact - -{{ include "ImageName" (tuple . "dvcr-artifact" "cbuilder") }} -With set .ModuleName: virtualization/dvcr-artifact-cbuilder -Without .ModuleName: dvcr-artifact-cbuilder -*/}} - -{{ define "ImageName" }} - -{{- $ctx := . -}} -{{- $ImageName := "" -}} -{{- $ImageNameSuffix := "" -}} - -{{- if (kindIs "slice" .) -}} -{{- $ctx = index . 0 -}} -{{- if ge (len .) 2 -}} -{{- $ImageName = index . 1 -}} -{{- end -}} -{{- if ge (len .) 3 -}} -{{- $ImageNameSuffix = index . 2 -}} -{{- end -}} -{{- else -}} -{{- fail "Should be slice of 2 or 3 elem" }} -{{- end -}} - - -{{- include "ModuleNamePreffix" $ctx -}} -{{- $ImageName -}} -{{- if $ImageNameSuffix }}-{{ $ImageNameSuffix }}{{ end -}} - -{{ end }} - -{{ define "ModuleNamePreffix" }} -{{- if .ModuleName }}{{ .ModuleName }}/{{ end -}} -{{ end }} - -{{/* -Same as ImageName -*/}} - -{{ define "PkgImageName" }} - -{{- $ctx := . -}} -{{- $ImageName := "" -}} -{{- $ImageNameSuffix := "" -}} - -{{- if (kindIs "slice" .) -}} -{{- $ctx = index . 0 -}} -{{- if ge (len .) 2 -}} -{{- $ImageName = index . 1 -}} -{{- end -}} -{{- if ge (len .) 3 -}} -{{- $ImageNameSuffix = index . 2 -}} -{{- end -}} -{{- else -}} -{{- fail "Should be slice of 2 or 3 elem" }} -{{- end -}} - -{{- include "PkgModuleNamePreffix" $ctx -}} -{{- $ImageName -}} -{{- if $ImageNameSuffix }}-{{ $ImageNameSuffix }}{{ end -}} - -{{ end }} - -{{ define "PkgModuleNamePreffix" }} -{{- if .PkgModuleName }}{{ .PkgModuleName }}/{{ end -}} -{{ end }} - -{{/*========*/}} -{{/* -Add new vars (Version and Package) in current context for build virt -*/}} - -{{ define "virtualization software versions" }} -{{- if and (eq .ModuleName "virtualization") (not (hasKey . "Version")) -}} -{{ include "Versions" . }} -{{- end -}} -{{ end }} - -{{ define "Versions" }} - -{{- $_ := set . "Version" dict -}} -{{- $_ := set . "Package" dict -}} -{{- $versions_path := "component_versions/version_map.yml" -}} - -{{- if .ModuleName -}} -{{- $module_versions_ctx := (printf "%smodules/%s-%s/" .ModulePath .ModulePriority .ModuleName ) }} -{{- $versions_path = (printf "%s%s" $module_versions_ctx $versions_path) -}} -{{- end -}} - -{{- $versions_ctx := (.Files.Get $versions_path | fromYaml) -}} - -{{- range $k, $v := $versions_ctx.firmware -}} -{{- $_ := set $.Version $k $v -}} -{{- end -}} - -{{- range $k, $v := $versions_ctx.package -}} -{{- $_ := set $.Package $k $v -}} -{{- end -}} - -{{ end }} From bbc5f0444cfc455b170fa12add44613cc63be852 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 13:07:08 +0300 Subject: [PATCH 09/30] back versions template Signed-off-by: Nikita Korolev --- .werf/defines/process-packages-images.tmpl | 22 ++++++++++++++++++++ images/packages/binaries/fuse3/werf.inc.yaml | 5 +++++ 2 files changed, 27 insertions(+) diff --git a/.werf/defines/process-packages-images.tmpl b/.werf/defines/process-packages-images.tmpl index 0af1987dca..8188ebdc84 100644 --- a/.werf/defines/process-packages-images.tmpl +++ b/.werf/defines/process-packages-images.tmpl @@ -52,3 +52,25 @@ {{- end }} +{{ define "Versions" }} + +{{- $_ := set . "Version" dict -}} +{{- $_ := set . "Package" dict -}} +{{- $versions_path := "component_versions/version_map.yml" -}} + +{{- if .ModuleName -}} +{{- $module_versions_ctx := (printf "%smodules/%s-%s/" .ModulePath .ModulePriority .ModuleName ) }} +{{- $versions_path = (printf "%s%s" $module_versions_ctx $versions_path) -}} +{{- end -}} + +{{- $versions_ctx := (.Files.Get $versions_path | fromYaml) -}} + +{{- range $k, $v := $versions_ctx.firmware -}} +{{- $_ := set $.Version $k $v -}} +{{- end -}} + +{{- range $k, $v := $versions_ctx.package -}} +{{- $_ := set $.Package $k $v -}} +{{- end -}} + +{{ end }} \ No newline at end of file diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index d624e0477a..4cf0a7554b 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -40,6 +40,11 @@ packages: image: {{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt +import: +- image: {{ $PkgImageName }}-src-artifact + add: /src + to: /src + before: install secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} From f3b235a4cadf1eb44ee6d9ce9fab546cd37d7f8a Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 13:38:16 +0300 Subject: [PATCH 10/30] glib2 coment git rm Signed-off-by: Nikita Korolev --- images/packages/binaries/glib2/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index 3735773ad0..ad6dde4b13 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} From 122f2820f3ba45c7c92b2aca91831bd8f1da62f4 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 13:43:53 +0300 Subject: [PATCH 11/30] fix libbsd Signed-off-by: Nikita Korolev --- images/packages/binaries/libbsd/werf.inc.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index 42bcd4df4c..b8a3b1d410 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} @@ -60,9 +60,7 @@ shell: install: - | OUTDIR=/out - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src cd /src ./autogen ./configure \ From cea77c3135ddf0b88dfdce1a5c8fafb7dd89bd02 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 14:11:19 +0300 Subject: [PATCH 12/30] comment rm -rf git folder Signed-off-by: Nikita Korolev --- images/packages/binaries/acl/werf.inc.yaml | 2 +- images/packages/binaries/bzip2/werf.inc.yaml | 2 +- images/packages/binaries/dmidecode/werf.inc.yaml | 2 +- images/packages/binaries/dtc/werf.inc.yaml | 2 +- images/packages/binaries/fuse3/werf.inc.yaml | 2 +- images/packages/binaries/glibc/werf.inc.yaml | 2 +- images/packages/binaries/gmp/werf.inc.yaml | 2 +- images/packages/binaries/gnutls/werf.inc.yaml | 2 +- images/packages/binaries/libattr/werf.inc.yaml | 2 +- images/packages/binaries/libaudit/werf.inc.yaml | 2 +- images/packages/binaries/libblkid/werf.inc.yaml | 2 +- images/packages/binaries/libbrotli/werf.inc.yaml | 2 +- images/packages/binaries/libburn/werf.inc.yaml | 2 +- images/packages/binaries/libgcrypt/werf.inc.yaml | 2 +- images/packages/binaries/lvm2/werf.inc.yaml | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/images/packages/binaries/acl/werf.inc.yaml b/images/packages/binaries/acl/werf.inc.yaml index ed9e25cdfd..9b62d327b6 100644 --- a/images/packages/binaries/acl/werf.inc.yaml +++ b/images/packages/binaries/acl/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch v{{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/bzip2/werf.inc.yaml b/images/packages/binaries/bzip2/werf.inc.yaml index c7b7cdca26..1c5f0e9c89 100644 --- a/images/packages/binaries/bzip2/werf.inc.yaml +++ b/images/packages/binaries/bzip2/werf.inc.yaml @@ -24,7 +24,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/dmidecode/werf.inc.yaml b/images/packages/binaries/dmidecode/werf.inc.yaml index 6e73b6dfaa..3c9dd61cb2 100644 --- a/images/packages/binaries/dmidecode/werf.inc.yaml +++ b/images/packages/binaries/dmidecode/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch dmidecode-{{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 4989e7c420..1b18de4a27 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index 4cf0a7554b..eeeb83a76c 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index 63064c8703..fbf3521f26 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index b456f57adf..1c683a373e 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index 3f13a48b91..6552071aec 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -41,7 +41,7 @@ shell: fi git submodule update --init --recursive - rm -rf /src/.git + # rm -rf /src/.git --- diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index e22007714d..8403f39f36 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index 4bccdb4087..aa4b38a3d0 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index 4375ab888b..8b3597854f 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index 45e82fa325..b2fa6f61c6 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index a47e84dbd2..b052149ddc 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 4ca65d08b3..74f1c7e854 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index 52843a2335..fdbe672248 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -25,7 +25,7 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - rm -rf /src/.git + # rm -rf /src/.git --- From 9a85412bbff14fd94735b1e91deac33a2769bdc8 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 11 Jun 2025 21:50:28 +0300 Subject: [PATCH 13/30] add .ModuleNamePrefix to pkgs Signed-off-by: Nikita Korolev --- images/cdi-importer/werf.inc.yaml | 2 +- images/dvcr-artifact/werf.inc.yaml | 6 +++--- images/libvirt/werf.inc.yaml | 2 +- images/packages/binaries/acl/werf.inc.yaml | 10 +++++----- images/packages/binaries/bzip2/werf.inc.yaml | 10 +++++----- images/packages/binaries/dmidecode/werf.inc.yaml | 10 +++++----- images/packages/binaries/dtc/werf.inc.yaml | 10 +++++----- images/packages/binaries/file/werf.inc.yaml | 10 +++++----- images/packages/binaries/fuse3/werf.inc.yaml | 10 +++++----- images/packages/binaries/glib2/werf.inc.yaml | 10 +++++----- images/packages/binaries/glibc/werf.inc.yaml | 10 +++++----- images/packages/binaries/gmp/werf.inc.yaml | 10 +++++----- images/packages/binaries/gnutls/werf.inc.yaml | 10 +++++----- images/packages/binaries/libattr/werf.inc.yaml | 10 +++++----- images/packages/binaries/libaudit/werf.inc.yaml | 10 +++++----- images/packages/binaries/libblkid/werf.inc.yaml | 10 +++++----- images/packages/binaries/libbrotli/werf.inc.yaml | 10 +++++----- images/packages/binaries/libbsd/werf.inc.yaml | 10 +++++----- images/packages/binaries/libburn/werf.inc.yaml | 10 +++++----- images/packages/binaries/libgcrypt/werf.inc.yaml | 10 +++++----- images/packages/binaries/libtpms/werf.inc.yaml | 10 +++++----- images/packages/binaries/lvm2/werf.inc.yaml | 10 +++++----- images/packages/binaries/nbdkit/werf.inc.yaml | 10 +++++----- images/packages/binaries/nftables/werf.inc.yaml | 10 +++++----- images/packages/binaries/numactl/werf.inc.yaml | 10 +++++----- images/packages/binaries/openssl/werf.inc.yaml | 10 +++++----- images/packages/binaries/swtpm/werf.inc.yaml | 12 ++++++------ images/packages/binaries/xorriso/werf.inc.yaml | 10 +++++----- images/qemu/werf.inc.yaml | 2 +- images/virt-handler/werf.inc.yaml | 6 +++--- images/virt-launcher/werf.inc.yaml | 16 ++++++++-------- 31 files changed, 143 insertions(+), 143 deletions(-) diff --git a/images/cdi-importer/werf.inc.yaml b/images/cdi-importer/werf.inc.yaml index 022ab298b1..10173124b5 100644 --- a/images/cdi-importer/werf.inc.yaml +++ b/images/cdi-importer/werf.inc.yaml @@ -55,7 +55,7 @@ import: add: /qemu-img to: /relocate before: setup -- image: packages/binaries/nbdkit +- image: {{ .ModuleNamePrefix }}packages/binaries/nbdkit add: /nbdkit to: /nbdkit before: install diff --git a/images/dvcr-artifact/werf.inc.yaml b/images/dvcr-artifact/werf.inc.yaml index a756067b7e..43735d11b1 100644 --- a/images/dvcr-artifact/werf.inc.yaml +++ b/images/dvcr-artifact/werf.inc.yaml @@ -75,16 +75,16 @@ import: add: /out to: /usr/local/bin before: setup -- image: packages/binaries/file +- image: {{ .ModuleNamePrefix }}packages/binaries/file add: /file to: /file before: install # deps for file -- image: packages/binaries/bzip2 +- image: {{ .ModuleNamePrefix }}packages/binaries/bzip2 add: /bzip2 to: /bzip2 before: install -- image: packages/binaries/nbdkit +- image: {{ .ModuleNamePrefix }}packages/binaries/nbdkit add: /nbdkit to: /nbdkit before: install diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index be4d52e048..39e42d6954 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -107,7 +107,7 @@ import: add: /install-libvirt.sh to: /install-libvirt.sh before: install -- image: packages/binaries/dmidecode +- image: {{ .ModuleNamePrefix }}packages/binaries/dmidecode add: /dmidecode to: /dmidecode before: install diff --git a/images/packages/binaries/acl/werf.inc.yaml b/images/packages/binaries/acl/werf.inc.yaml index 9b62d327b6..0896b4f24b 100644 --- a/images/packages/binaries/acl/werf.inc.yaml +++ b/images/packages/binaries/acl/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "acl.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/bzip2/werf.inc.yaml b/images/packages/binaries/bzip2/werf.inc.yaml index 1c5f0e9c89..9bde45a9ca 100644 --- a/images/packages/binaries/bzip2/werf.inc.yaml +++ b/images/packages/binaries/bzip2/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup @@ -12,7 +12,7 @@ import: {{- $gitRepoUrl := "bzip2/bzip2.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/dmidecode/werf.inc.yaml b/images/packages/binaries/dmidecode/werf.inc.yaml index 3c9dd61cb2..4c7154a53a 100644 --- a/images/packages/binaries/dmidecode/werf.inc.yaml +++ b/images/packages/binaries/dmidecode/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /dmidecode before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "dmidecode.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 1b18de4a27..66e4d05abe 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libfdt before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "dtc/dtc.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/file/werf.inc.yaml b/images/packages/binaries/file/werf.inc.yaml index eaa6042cf8..063efc0278 100644 --- a/images/packages/binaries/file/werf.inc.yaml +++ b/images/packages/binaries/file/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /{{ $.ImageName }} before: setup @@ -12,7 +12,7 @@ import: {{- $gitRepoUrl := "file/file.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index eeeb83a76c..085560916c 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libfuse3 before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "libfuse/libfuse.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index ad6dde4b13..fef73ab3fa 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /glib2 before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "GNOME/glib.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index fbf3521f26..fce81a51eb 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /glibc before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "glibc.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index 1c683a373e..bfd25ea82d 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libgmp10 before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "gmp/gmp" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index 6552071aec..cd59a1c274 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /gnutls before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "gnutls/gnutls.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -62,11 +62,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index 8403f39f36..a3142f2b7c 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libattr before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "attr.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -36,11 +36,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index aa4b38a3d0..d65253a313 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libaudit before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "linux-audit/audit-userspace.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index 8b3597854f..4b6d27fcab 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libblkid before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "util-linux/util-linux.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index b2fa6f61c6..881f13640e 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libbrotli before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "google/brotli.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index b8a3b1d410..c29623ef1c 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libbsd before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "libbsd/libbsd.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index b052149ddc..6f255ba775 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libburn before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "libburnia/libburn.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 74f1c7e854..2ce50e8c2b 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libcrypt before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "gpg/libgcrypt" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/libtpms/werf.inc.yaml b/images/packages/binaries/libtpms/werf.inc.yaml index 008dbc0d4a..83976f5287 100644 --- a/images/packages/binaries/libtpms/werf.inc.yaml +++ b/images/packages/binaries/libtpms/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libtpms before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "stefanberger/libtpms.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index fdbe672248..ba90f20aee 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /libdevmapper before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "lvmteam/lvm2.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -40,11 +40,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/nbdkit/werf.inc.yaml b/images/packages/binaries/nbdkit/werf.inc.yaml index 42d4d367c7..3b6a3c2e7f 100644 --- a/images/packages/binaries/nbdkit/werf.inc.yaml +++ b/images/packages/binaries/nbdkit/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /nbdkit before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "nbdkit/nbdkit.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -55,11 +55,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/nftables/werf.inc.yaml b/images/packages/binaries/nftables/werf.inc.yaml index d2b75e91e7..3ff3cc128e 100644 --- a/images/packages/binaries/nftables/werf.inc.yaml +++ b/images/packages/binaries/nftables/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /nftables before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "nftables.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -39,11 +39,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/numactl/werf.inc.yaml b/images/packages/binaries/numactl/werf.inc.yaml index 4d065e88be..8e62f7d8f6 100644 --- a/images/packages/binaries/numactl/werf.inc.yaml +++ b/images/packages/binaries/numactl/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /numactl before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "numactl/numactl.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -37,11 +37,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/openssl/werf.inc.yaml b/images/packages/binaries/openssl/werf.inc.yaml index 55578fda37..b63813b943 100644 --- a/images/packages/binaries/openssl/werf.inc.yaml +++ b/images/packages/binaries/openssl/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /openssl before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "openssl/openssl.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/packages/binaries/swtpm/werf.inc.yaml b/images/packages/binaries/swtpm/werf.inc.yaml index 2d0d7d99a3..2561fc7297 100644 --- a/images/packages/binaries/swtpm/werf.inc.yaml +++ b/images/packages/binaries/swtpm/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /swtpm before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "stefanberger/swtpm.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -47,15 +47,15 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install -- image: packages/binaries/libtpms +- image: {{ .ModuleNamePrefix }}packages/binaries/libtpms add: /libtpms to: /libtpms before: install diff --git a/images/packages/binaries/xorriso/werf.inc.yaml b/images/packages/binaries/xorriso/werf.inc.yaml index 4b33e421ef..22da500524 100644 --- a/images/packages/binaries/xorriso/werf.inc.yaml +++ b/images/packages/binaries/xorriso/werf.inc.yaml @@ -1,9 +1,9 @@ --- -image: {{ .PackagePath }}/{{ .ImageName }} +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false fromImage: builder/scratch import: -- image: {{ .PackagePath }}/{{ .ImageName }}-builder +- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder add: /out to: /xorriso before: setup @@ -13,7 +13,7 @@ import: {{- $gitRepoUrl := "libburnia/libisoburn.git" }} {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} -image: {{ $PkgImageName }}-src-artifact +image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src secrets: @@ -38,11 +38,11 @@ packages: {{ $builderDependencies := include "$name" . | fromYaml }} -image: {{ .PackagePath }}/{{ .ImageName }}-builder +image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt import: -- image: {{ $PkgImageName }}-src-artifact +- image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact add: /src to: /src before: install diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index 9af2748593..eb2f514367 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -131,7 +131,7 @@ import: add: /{{ $gitRepoName }}-{{ $version }} to: /{{ $gitRepoName }}-{{ $version }} before: install -- image: packages/binaries/dmidecode +- image: {{ .ModuleNamePrefix }}packages/binaries/dmidecode add: /dmidecode to: /dmidecode before: install diff --git a/images/virt-handler/werf.inc.yaml b/images/virt-handler/werf.inc.yaml index 51cc5a4560..4368d7ba67 100644 --- a/images/virt-handler/werf.inc.yaml +++ b/images/virt-handler/werf.inc.yaml @@ -75,15 +75,15 @@ import: includePaths: - bin/mount - bin/umount -- image: packages/binaries/xorriso +- image: {{ .ModuleNamePrefix }}packages/binaries/xorriso add: /xorriso to: /xorriso before: install -- image: packages/binaries/nftables +- image: {{ .ModuleNamePrefix }}packages/binaries/nftables add: /nftables to: /nftables before: install -- image: packages/binaries/acl +- image: {{ .ModuleNamePrefix }}packages/binaries/acl add: /acl to: /acl before: install diff --git a/images/virt-launcher/werf.inc.yaml b/images/virt-launcher/werf.inc.yaml index cd25cff152..6f0e7f6626 100644 --- a/images/virt-launcher/werf.inc.yaml +++ b/images/virt-launcher/werf.inc.yaml @@ -184,7 +184,7 @@ import: add: /BINS to: /qemu-bins before: install -- image: packages/binaries/dmidecode +- image: {{ .ModuleNamePrefix }}packages/binaries/dmidecode add: /dmidecode to: /dmidecode before: install @@ -231,29 +231,29 @@ import: - node-labeller - vlctl -- image: packages/binaries/swtpm +- image: {{ .ModuleNamePrefix }}packages/binaries/swtpm add: /swtpm to: /swtpm before: install -- image: packages/binaries/numactl +- image: {{ .ModuleNamePrefix }}packages/binaries/numactl add: /numactl to: /numactl before: install -- image: packages/binaries/xorriso +- image: {{ .ModuleNamePrefix }}packages/binaries/xorriso add: /xorriso to: /xorriso before: install -- image: packages/binaries/gnutls +- image: {{ .ModuleNamePrefix }}packages/binaries/gnutls add: /gnutls to: /gnutls before: install -- image: packages/binaries/acl +- image: {{ .ModuleNamePrefix }}packages/binaries/acl add: /acl to: /acl before: install -- image: packages/binaries/libtpms +- image: {{ .ModuleNamePrefix }}packages/binaries/libtpms add: /libtpms to: /libtpms before: install @@ -262,7 +262,7 @@ import: - usr/lib64/*.so.* # Statically builded -- image: packages/binaries/openssl +- image: {{ .ModuleNamePrefix }}packages/binaries/openssl add: /openssl to: /relocate after: setup From ec070de38aadc89c2cc38c9102b1330e5c73c441 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Mon, 23 Jun 2025 16:02:44 +0300 Subject: [PATCH 14/30] ++ fix typos in image names Signed-off-by: Ivan Mikheykin --- images/cdi-controller/werf.inc.yaml | 2 +- images/cdi-operator/werf.inc.yaml | 2 +- images/dvcr-uploader/werf.inc.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/cdi-controller/werf.inc.yaml b/images/cdi-controller/werf.inc.yaml index 44ab523349..a01afca53e 100644 --- a/images/cdi-controller/werf.inc.yaml +++ b/images/cdi-controller/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ .ModuleNamePrefix }}{{ .ImageName }}) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: {{ .ModuleNamePrefix }}distroless import: - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-bins diff --git a/images/cdi-operator/werf.inc.yaml b/images/cdi-operator/werf.inc.yaml index df5c2d3e41..5b6030cd58 100644 --- a/images/cdi-operator/werf.inc.yaml +++ b/images/cdi-operator/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ .ModuleNamePrefix }}{{ .ImageName }}) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: {{ .ModuleNamePrefix }}distroless import: - image: {{ .ModuleNamePrefix }}cdi-artifact diff --git a/images/dvcr-uploader/werf.inc.yaml b/images/dvcr-uploader/werf.inc.yaml index 80427a7b4a..0eedc4ca25 100644 --- a/images/dvcr-uploader/werf.inc.yaml +++ b/images/dvcr-uploader/werf.inc.yaml @@ -1,5 +1,5 @@ --- -image: {{ .ModuleNamePrefix }}{{ .ImageName }}) }} +image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: {{ .ModuleNamePrefix }}distroless import: - image: {{ .ModuleNamePrefix }}dvcr-artifact-bins From 289d125f4b3c9dde8655c32f4de79f5cda22d6c7 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Tue, 24 Jun 2025 01:46:53 +0300 Subject: [PATCH 15/30] ++ support fallback to global dockercfg if module is included as embedded Signed-off-by: Ivan Mikheykin --- templates/registry-secret.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/registry-secret.yaml b/templates/registry-secret.yaml index a749873a59..df92d166f8 100644 --- a/templates/registry-secret.yaml +++ b/templates/registry-secret.yaml @@ -1,3 +1,8 @@ +{{/* Use module specific dockercfg if set. Use global dockercfg if module included as embedded. */}} +{{- $dockercfg := dig "registry" "dockercfg" "" .Values.virtualization }} +{{- if eq $dockercfg "" }} +{{- $dockercfg = .Values.global.modulesImages.registry.dockercfg }} +{{- end }} --- apiVersion: v1 kind: Secret @@ -7,5 +12,5 @@ metadata: {{- include "helm_lib_module_labels" (list .) | nindent 2 }} type: kubernetes.io/dockerconfigjson data: - .dockerconfigjson: {{ .Values.virtualization.registry.dockercfg }} + .dockerconfigjson: {{ $dockercfg | quote }} From 2c2e21fcba7da62ad18eec2b96021c166db15402 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 26 Jun 2025 16:04:30 +0300 Subject: [PATCH 16/30] ++ virtualization-artifact: use /src directory for sources instead of /usr/local/go/src with stdlib sources. Signed-off-by: Ivan Mikheykin --- images/virtualization-api/werf.inc.yaml | 2 +- images/virtualization-artifact/werf.inc.yaml | 26 +++++++++++-------- images/virtualization-audit/werf.inc.yaml | 2 +- .../virtualization-controller/werf.inc.yaml | 2 +- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/images/virtualization-api/werf.inc.yaml b/images/virtualization-api/werf.inc.yaml index 9102396d19..6379731274 100644 --- a/images/virtualization-api/werf.inc.yaml +++ b/images/virtualization-api/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: {{ .ModuleNamePrefix }}distroless import: - image: {{ .ModuleNamePrefix }}virtualization-artifact - add: /usr/local/go/src/virtualization-controller/virtualization-api + add: /out/virtualization-api to: /app/virtualization-api after: install imageSpec: diff --git a/images/virtualization-artifact/werf.inc.yaml b/images/virtualization-artifact/werf.inc.yaml index 6052cafdbe..fd5cd5e79d 100644 --- a/images/virtualization-artifact/werf.inc.yaml +++ b/images/virtualization-artifact/werf.inc.yaml @@ -3,16 +3,16 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: -- add: {{ .ModulePathPrefix }}/api - to: /usr/local/go/api +- add: /api + to: /src/api stageDependencies: install: - go.mod - go.sum setup: - "**/*.go" -- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} - to: /usr/local/go/src/virtualization-controller +- add: /images/{{ $.ImageName }} + to: /src/images/virtualization-artifact stageDependencies: install: - go.mod @@ -28,22 +28,26 @@ mount: shell: install: - export GOPROXY=$(cat /run/secrets/GOPROXY) - - cd /usr/local/go/src/virtualization-controller + - cd /src/images/virtualization-artifact - go mod download setup: - - cd /usr/local/go/src/virtualization-controller - - export GO111MODULE=on + - cd /src/images/virtualization-artifact + - mkdir /out - export GOOS=linux - - export CGO_ENABLED=0 - export GOARCH=amd64 + - export CGO_ENABLED=0 + - | + echo "Build virtualization-controller binary" {{- $_ := set $ "ProjectName" (list $.ImageName "virtualization-controller" | join "/") }} - {{- $buildCommand := printf "go build -tags %s -v -a -o virtualization-controller ./cmd/virtualization-controller" .MODULE_EDITION -}} + {{- $buildCommand := printf "go build -tags %s -v -a -o /out/virtualization-controller ./cmd/virtualization-controller" .MODULE_EDITION -}} {{- include "image-build.build" (set $ "BuildCommand" $buildCommand) | nindent 6 }} + echo "Build virtualization-api binary" {{- $_ := set $ "ProjectName" (list $.ImageName "virtualization-api" | join "/") }} - {{- include "image-build.build" (set $ "BuildCommand" `go build -v -a -o virtualization-api ./cmd/virtualization-api`) | nindent 6 }} + {{- include "image-build.build" (set $ "BuildCommand" `go build -v -o /out/virtualization-api ./cmd/virtualization-api`) | nindent 6 }} {{- if eq .MODULE_EDITION "EE" }} - | + echo "Build virtualization-audit binary" {{- $_ := set $ "ProjectName" (list $.ImageName "virtualization-audit" | join "/") }} - {{- include "image-build.build" (set $ "BuildCommand" `go build -v -a -o virtualization-audit ./cmd/virtualization-audit`) | nindent 6 }} + {{- include "image-build.build" (set $ "BuildCommand" `go build -v -o /out/virtualization-audit ./cmd/virtualization-audit`) | nindent 6 }} {{- end }} diff --git a/images/virtualization-audit/werf.inc.yaml b/images/virtualization-audit/werf.inc.yaml index 83816cf184..494c422fb4 100644 --- a/images/virtualization-audit/werf.inc.yaml +++ b/images/virtualization-audit/werf.inc.yaml @@ -4,7 +4,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: {{ .ModuleNamePrefix }}distroless import: - image: {{ .ModuleNamePrefix }}virtualization-artifact - add: /usr/local/go/src/virtualization-controller/virtualization-audit + add: /out/virtualization-audit to: /app/virtualization-audit after: install imageSpec: diff --git a/images/virtualization-controller/werf.inc.yaml b/images/virtualization-controller/werf.inc.yaml index dafab85b54..519c778e2f 100644 --- a/images/virtualization-controller/werf.inc.yaml +++ b/images/virtualization-controller/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} fromImage: {{ .ModuleNamePrefix }}distroless import: - image: {{ .ModuleNamePrefix }}virtualization-artifact - add: /usr/local/go/src/virtualization-controller/virtualization-controller + add: /out/virtualization-controller to: /app/virtualization-controller after: install imageSpec: From 0e18ae76d77898d7f4a6055e7e7686478cf9a81f Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 26 Jun 2025 16:50:07 +0300 Subject: [PATCH 17/30] ++ dvcr-artifact: add install stage with go mod download Signed-off-by: Ivan Mikheykin --- images/dvcr-artifact/werf.inc.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/images/dvcr-artifact/werf.inc.yaml b/images/dvcr-artifact/werf.inc.yaml index 43735d11b1..4fc5302c1a 100644 --- a/images/dvcr-artifact/werf.inc.yaml +++ b/images/dvcr-artifact/werf.inc.yaml @@ -15,20 +15,21 @@ secrets: - id: GOPROXY value: {{ .GOPROXY }} shell: - install: + beforeInstall: {{- include "debian packages proxy" . | nindent 2 }} - apt-get -qq install -y --no-install-recommends libnbd-dev {{- include "debian packages clean" . | nindent 2 }} + install: + - cd /src + - export GOPROXY=$(cat /run/secrets/GOPROXY) + - go mod download setup: - mkdir /out - cd /src - | - export GOPROXY=$(cat /run/secrets/GOPROXY) - export GO111MODULE=on export GOOS=linux - export CGO_ENABLED=1 export GOARCH=amd64 - - | + export CGO_ENABLED=1 {{- $_ := set $ "ProjectName" (list $.ImageName "dvcr-importer" | join "/") }} {{- include "image-build.build" (set $ "BuildCommand" `go build -ldflags="-s -w" -o /out/dvcr-importer ./cmd/dvcr-importer`) | nindent 6 }} {{- $_ := set $ "ProjectName" (list $.ImageName "dvcr-uploader" | join "/") }} From 37d66054053856d484422098438b3e2f10dff1a0 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 26 Jun 2025 17:16:04 +0300 Subject: [PATCH 18/30] ++ edk2: add submodule url rewrite for berkeley-softfloat-3, sort commands Signed-off-by: Ivan Mikheykin --- images/edk2/werf.inc.yaml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/images/edk2/werf.inc.yaml b/images/edk2/werf.inc.yaml index 0b867082c2..d66d6b4fcb 100644 --- a/images/edk2/werf.inc.yaml +++ b/images/edk2/werf.inc.yaml @@ -7,24 +7,24 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false fromImage: builder/src git: -- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/build.sh +- add: {{ .ModulePathPrefix }}/images/{{ .ImageName }}/build.sh to: /build.sh stageDependencies: install: - build.sh -- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/logo/Logo.bmp +- add: {{ .ModulePathPrefix }}/images/{{ .ImageName }}/logo/Logo.bmp to: /Logo.bmp stageDependencies: install: - '**/*' -- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/json +- add: {{ .ModulePathPrefix }}/images/{{ .ImageName }}/json to: /FIRMWARE includePaths: - '*.json' stageDependencies: install: - '*.json' -- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }}/uefi-revocation-list +- add: {{ .ModulePathPrefix }}/images/{{ .ImageName }}/uefi-revocation-list to: /FIRMWARE includePaths: - '*.bin' @@ -38,7 +38,7 @@ shell: install: - | mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - + echo "Git clone Edk2 repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $gitRepoName }}-{{ $version }} {{ $gitRepoName }}-{{ $version }} @@ -47,19 +47,20 @@ shell: cd /{{ $gitRepoName }}-{{ $version }} if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Change submodule url" + echo "Rewrite submodule URLs" + git submodule set-url -- ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 $(cat /run/secrets/SOURCE_REPO)/ucb-bar/berkeley-softfloat-3.git + git submodule set-url -- BaseTools/Source/C/BrotliCompress/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git + git submodule set-url -- CryptoPkg/Library/MbedTlsLib/mbedtls $(cat /run/secrets/SOURCE_REPO)/Mbed-TLS/mbedtls.git git submodule set-url -- CryptoPkg/Library/OpensslLib/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl - git submodule set-url -- UnitTestFrameworkPkg/Library/CmockaLib/cmocka $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-cmocka.git - git submodule set-url -- MdeModulePkg/Universal/RegularExpressionDxe/oniguruma $(cat /run/secrets/SOURCE_REPO)/kkos/oniguruma.git git submodule set-url -- MdeModulePkg/Library/BrotliCustomDecompressLib/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git - git submodule set-url -- BaseTools/Source/C/BrotliCompress/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git - git submodule set-url -- RedfishPkg/Library/JsonLib/jansson $(cat /run/secrets/SOURCE_REPO)/akheron/jansson.git - git submodule set-url -- UnitTestFrameworkPkg/Library/GoogleTestLib/googletest $(cat /run/secrets/SOURCE_REPO)/google/googletest.git - git submodule set-url -- UnitTestFrameworkPkg/Library/SubhookLib/subhook $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-subhook.git + git submodule set-url -- MdeModulePkg/Universal/RegularExpressionDxe/oniguruma $(cat /run/secrets/SOURCE_REPO)/kkos/oniguruma.git git submodule set-url -- MdePkg/Library/BaseFdtLib/libfdt $(cat /run/secrets/SOURCE_REPO)/devicetree-org/pylibfdt.git git submodule set-url -- MdePkg/Library/MipiSysTLib/mipisyst $(cat /run/secrets/SOURCE_REPO)/MIPI-Alliance/public-mipi-sys-t.git - git submodule set-url -- CryptoPkg/Library/MbedTlsLib/mbedtls $(cat /run/secrets/SOURCE_REPO)/Mbed-TLS/mbedtls.git + git submodule set-url -- RedfishPkg/Library/JsonLib/jansson $(cat /run/secrets/SOURCE_REPO)/akheron/jansson.git git submodule set-url -- SecurityPkg/DeviceSecurity/SpdmLib/libspdm $(cat /run/secrets/SOURCE_REPO)/DMTF/libspdm.git + git submodule set-url -- UnitTestFrameworkPkg/Library/CmockaLib/cmocka $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-cmocka.git + git submodule set-url -- UnitTestFrameworkPkg/Library/GoogleTestLib/googletest $(cat /run/secrets/SOURCE_REPO)/google/googletest.git + git submodule set-url -- UnitTestFrameworkPkg/Library/SubhookLib/subhook $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-subhook.git fi git submodule update --init --recursive @@ -93,7 +94,7 @@ import: shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} - - | + - | apt-get install -y \ gcc gcc-c++ \ git curl \ From e743a3dd24198381df1b19235093e963d2ca3a29 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 26 Jun 2025 18:22:52 +0300 Subject: [PATCH 19/30] ++ remove GO111MODULE=on (I just need a new commit to debug submodule problem) Signed-off-by: Ivan Mikheykin --- images/kube-api-rewriter/werf.inc.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/images/kube-api-rewriter/werf.inc.yaml b/images/kube-api-rewriter/werf.inc.yaml index d2ec53b768..597a68b776 100644 --- a/images/kube-api-rewriter/werf.inc.yaml +++ b/images/kube-api-rewriter/werf.inc.yaml @@ -24,7 +24,6 @@ shell: - go mod download setup: - cd /src/kube-api-rewriter - - export GO111MODULE=on - export GOOS=linux - export CGO_ENABLED=0 - export GOARCH=amd64 From 9b7856812d6251bee1862acd3931888134885430 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 26 Jun 2025 21:22:06 +0300 Subject: [PATCH 20/30] ++ forgot ModulePathPrefix Signed-off-by: Ivan Mikheykin --- images/virtualization-artifact/werf.inc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/virtualization-artifact/werf.inc.yaml b/images/virtualization-artifact/werf.inc.yaml index fd5cd5e79d..b4509757ea 100644 --- a/images/virtualization-artifact/werf.inc.yaml +++ b/images/virtualization-artifact/werf.inc.yaml @@ -3,7 +3,7 @@ image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} git: -- add: /api +- add: {{ .ModulePathPrefix }}/api to: /src/api stageDependencies: install: @@ -11,7 +11,7 @@ git: - go.sum setup: - "**/*.go" -- add: /images/{{ $.ImageName }} +- add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /src/images/virtualization-artifact stageDependencies: install: From 1d1f40a8908f7bbef4eb329c5fe348dea84cc133 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Fri, 27 Jun 2025 15:28:15 +0300 Subject: [PATCH 21/30] ++ svace builder: use builder/src to download sources ++ fix more submodule rewrites (git submodule set-url expect submodule name, not path) Signed-off-by: Ivan Mikheykin --- images/libvirt/werf.inc.yaml | 2 +- images/packages/binaries/gnutls/werf.inc.yaml | 5 ++-- images/qemu/werf.inc.yaml | 2 +- images/svace-builder/werf.inc.yaml | 29 +++++++++---------- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index 39e42d6954..db69de313f 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -31,7 +31,7 @@ shell: if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then echo "Change submodule url" - git submodule set-url -- subprojects/keycodemapdb $(cat /run/secrets/SOURCE_REPO)/keycodemap/keycodemapdb.git + git submodule set-url -- keycodemapdb $(cat /run/secrets/SOURCE_REPO)/keycodemap/keycodemapdb.git fi --- diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index cd59a1c274..80fa7027b8 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -25,18 +25,19 @@ shell: mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - + cd /src if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then git submodule set-url -- devel/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl.git git submodule set-url -- tests/suite/tls-fuzzer/tlsfuzzer $(cat /run/secrets/SOURCE_REPO)/tomato42/tlsfuzzer.git git submodule set-url -- tests/suite/tls-fuzzer/python-ecdsa $(cat /run/secrets/SOURCE_REPO)/warner/python-ecdsa + git submodule set-url -- tests/suite/tls-fuzzer/tlslite-ng $(cat /run/secrets/SOURCE_REPO)/tomato42/tlslite-ng.git git submodule set-url -- gnulib $(cat /run/secrets/SOURCE_REPO)/libidn/gnulib-mirror.git git submodule set-url -- devel/nettle $(cat /run/secrets/SOURCE_REPO)/gnutls/nettle.git git submodule set-url -- devel/libtasn1 $(cat /run/secrets/SOURCE_REPO)/gnutls/libtasn1.git git submodule set-url -- devel/abi-dump $(cat /run/secrets/SOURCE_REPO)/gnutls/abi-dump.git - git submodule set-url -- cligen $(cat /run/secrets/SOURCE_REPO)/gnutls/cligen.git + git submodule set-url -- devel/cligen $(cat /run/secrets/SOURCE_REPO)/gnutls/cligen.git git submodule set-url -- tests/suite/tls-interoperability $(cat /run/secrets/SOURCE_REPO)/redhat-crypto/tests/interop.git fi diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index eb2f514367..82910a123e 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -50,7 +50,7 @@ shell: git submodule set-url -- roms/opensbi $(cat /run/secrets/SOURCE_REPO)/qemu-project/opensbi.git git submodule set-url -- roms/qboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/qboot.git git submodule set-url -- roms/vbootrom $(cat /run/secrets/SOURCE_REPO)/qemu-project/vbootrom.git - git submodule set-url -- tests/lcitool/libvirt-ci $(cat /run/secrets/SOURCE_REPO)/libvirt/libvirt-ci.git + git submodule set-url -- tests/lcitool/libvirt-ci $(cat /run/secrets/SOURCE_REPO)/libvirt/libvirt-ci.git fi --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/svace-builder/werf.inc.yaml b/images/svace-builder/werf.inc.yaml index 87e62d41b9..fdb5e24875 100644 --- a/images/svace-builder/werf.inc.yaml +++ b/images/svace-builder/werf.inc.yaml @@ -1,26 +1,22 @@ --- -image: {{ .ModuleNamePrefix }}{{ .ImageName }}-download +image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact final: false -fromImage: builder/alpine +fromImage: builder/src secrets: -- id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} + - id: SOURCE_REPO + value: {{ $.SOURCE_REPO_GIT }} shell: - beforeInstall: - - apk update - - apk add wget - - apk add git openssh-client - - mkdir ~/.ssh/ - - echo "StrictHostKeyChecking accept-new" > ~/.ssh/config install: - - git clone --depth 1 --branch v4.0.250415 $(cat /run/secrets/SOURCE_REPO)/ispras/svace.git /opt/svace + - | + mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + git clone --depth 1 --branch v4.0.250415 $(cat /run/secrets/SOURCE_REPO)/ispras/svace.git /opt/svace --- image: {{ .ModuleNamePrefix }}base-alt-p11/svace final: false fromImage: BASE_ALT_P11 import: -- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-download +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /opt/svace to: /opt/svace before: install @@ -31,7 +27,8 @@ shell: apt-get install -y \ wget rsync bzip2 golang git binutils make gcc \ glibc-pthread glibc-devel glibc-devel-static - echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + {{- include "alt packages clean" . | nindent 2 }} + - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config install: - | ln -s /opt/svace/bin/svace /usr/local/bin/svace @@ -40,7 +37,7 @@ image: {{ .ModuleNamePrefix }}builder/golang-bookworm-1.23/svace final: false fromImage: builder/golang-bookworm-1.23 import: -- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-download +- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /opt/svace to: /opt/svace before: install @@ -50,8 +47,8 @@ shell: - | apt-get install -y \ bzip2 rsync - mkdir -p /root/.ssh - echo "StrictHostKeyChecking accept-new" > ~/.ssh/config + {{- include "debian packages clean" . | nindent 2 }} + - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config install: - | ln -s /opt/svace/bin/svace /usr/local/bin/svace From fde43d8b593bf93fb1ce5136c010324f45ae2d36 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Mon, 30 Jun 2025 15:22:48 +0300 Subject: [PATCH 22/30] ++ edk2, qemu, gnutls, libvirt: replace set-url with git -c url.insteadOf= stanzas Signed-off-by: Ivan Mikheykin --- images/edk2/werf.inc.yaml | 28 +++++++---------- images/libvirt/werf.inc.yaml | 12 ++++++-- images/packages/binaries/gnutls/werf.inc.yaml | 23 ++++++-------- images/qemu/werf.inc.yaml | 30 ++++++++----------- 4 files changed, 42 insertions(+), 51 deletions(-) diff --git a/images/edk2/werf.inc.yaml b/images/edk2/werf.inc.yaml index d66d6b4fcb..91408c57f4 100644 --- a/images/edk2/werf.inc.yaml +++ b/images/edk2/werf.inc.yaml @@ -46,25 +46,19 @@ shell: cd /{{ $gitRepoName }}-{{ $version }} - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Rewrite submodule URLs" - git submodule set-url -- ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 $(cat /run/secrets/SOURCE_REPO)/ucb-bar/berkeley-softfloat-3.git - git submodule set-url -- BaseTools/Source/C/BrotliCompress/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git - git submodule set-url -- CryptoPkg/Library/MbedTlsLib/mbedtls $(cat /run/secrets/SOURCE_REPO)/Mbed-TLS/mbedtls.git - git submodule set-url -- CryptoPkg/Library/OpensslLib/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl - git submodule set-url -- MdeModulePkg/Library/BrotliCustomDecompressLib/brotli $(cat /run/secrets/SOURCE_REPO)/google/brotli.git - git submodule set-url -- MdeModulePkg/Universal/RegularExpressionDxe/oniguruma $(cat /run/secrets/SOURCE_REPO)/kkos/oniguruma.git - git submodule set-url -- MdePkg/Library/BaseFdtLib/libfdt $(cat /run/secrets/SOURCE_REPO)/devicetree-org/pylibfdt.git - git submodule set-url -- MdePkg/Library/MipiSysTLib/mipisyst $(cat /run/secrets/SOURCE_REPO)/MIPI-Alliance/public-mipi-sys-t.git - git submodule set-url -- RedfishPkg/Library/JsonLib/jansson $(cat /run/secrets/SOURCE_REPO)/akheron/jansson.git - git submodule set-url -- SecurityPkg/DeviceSecurity/SpdmLib/libspdm $(cat /run/secrets/SOURCE_REPO)/DMTF/libspdm.git - git submodule set-url -- UnitTestFrameworkPkg/Library/CmockaLib/cmocka $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-cmocka.git - git submodule set-url -- UnitTestFrameworkPkg/Library/GoogleTestLib/googletest $(cat /run/secrets/SOURCE_REPO)/google/googletest.git - git submodule set-url -- UnitTestFrameworkPkg/Library/SubhookLib/subhook $(cat /run/secrets/SOURCE_REPO)/tianocore/edk2-subhook.git + if [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]] ; then + echo "Checkout submodules" + git submodule update --init --recursive + else + echo "Checkout submodules with URL rewrite" + # mbed-tls rewrite is needed for submodules from ARMmbed renamed organization. + git \ + -c url."$(cat /run/secrets/SOURCE_REPO)/mbed-tls/".insteadOf=https://github.com/ARMmbed/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://github.com/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://gitlab.com/ \ + submodule update --init --recursive fi - git submodule update --init --recursive - --- image: {{ .ModuleNamePrefix }}{{ .ImageName }} diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index db69de313f..0534b76e7b 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -29,9 +29,15 @@ shell: cd /{{ $gitRepoName }}-{{ $version }} - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Change submodule url" - git submodule set-url -- keycodemapdb $(cat /run/secrets/SOURCE_REPO)/keycodemap/keycodemapdb.git + if [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]] ; then + echo "Checkout submodules" + git submodule update --init --recursive + else + echo "Checkout submodules with URL rewrite" + git \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://github.com/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://gitlab.com/ \ + submodule update --init --recursive fi --- diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index 80fa7027b8..e75ad84b3f 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -28,22 +28,17 @@ shell: cd /src - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - git submodule set-url -- devel/openssl $(cat /run/secrets/SOURCE_REPO)/openssl/openssl.git - git submodule set-url -- tests/suite/tls-fuzzer/tlsfuzzer $(cat /run/secrets/SOURCE_REPO)/tomato42/tlsfuzzer.git - git submodule set-url -- tests/suite/tls-fuzzer/python-ecdsa $(cat /run/secrets/SOURCE_REPO)/warner/python-ecdsa - git submodule set-url -- tests/suite/tls-fuzzer/tlslite-ng $(cat /run/secrets/SOURCE_REPO)/tomato42/tlslite-ng.git - git submodule set-url -- gnulib $(cat /run/secrets/SOURCE_REPO)/libidn/gnulib-mirror.git - git submodule set-url -- devel/nettle $(cat /run/secrets/SOURCE_REPO)/gnutls/nettle.git - git submodule set-url -- devel/libtasn1 $(cat /run/secrets/SOURCE_REPO)/gnutls/libtasn1.git - git submodule set-url -- devel/abi-dump $(cat /run/secrets/SOURCE_REPO)/gnutls/abi-dump.git - git submodule set-url -- devel/cligen $(cat /run/secrets/SOURCE_REPO)/gnutls/cligen.git - git submodule set-url -- tests/suite/tls-interoperability $(cat /run/secrets/SOURCE_REPO)/redhat-crypto/tests/interop.git + if [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]] ; then + echo "Checkout submodules" + git submodule update --init --recursive + else + echo "Checkout submodules with URL rewrite" + git \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://github.com/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://gitlab.com/ \ + submodule update --init --recursive fi - git submodule update --init --recursive - # rm -rf /src/.git - --- {{- $name := print $.ImageName "-dependencies" -}} diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index 82910a123e..6b497b6651 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -34,24 +34,20 @@ shell: cd /{{ $gitRepoName }}-{{ $version }} - if ! [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]];then - echo "Change submodule url" - git submodule set-url -- roms/seabios $(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios.git - git submodule set-url -- roms/SLOF $(cat /run/secrets/SOURCE_REPO)/qemu-project/SLOF.git - git submodule set-url -- roms/ipxe $(cat /run/secrets/SOURCE_REPO)/qemu-project/ipxe.git - git submodule set-url -- roms/openbios $(cat /run/secrets/SOURCE_REPO)/qemu-project/openbios.git - git submodule set-url -- roms/qemu-palcode $(cat /run/secrets/SOURCE_REPO)/qemu-project/qemu-palcode.git - git submodule set-url -- roms/u-boot $(cat /run/secrets/SOURCE_REPO)/qemu-project/u-boot.git - git submodule set-url -- roms/skiboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/skiboot.git - git submodule set-url -- roms/QemuMacDrivers $(cat /run/secrets/SOURCE_REPO)/qemu-project/QemuMacDrivers.git - git submodule set-url -- roms/seabios-hppa $(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios-hppa.git - git submodule set-url -- roms/u-boot-sam460ex $(cat /run/secrets/SOURCE_REPO)/qemu-project/u-boot-sam460ex.git - git submodule set-url -- roms/edk2 $(cat /run/secrets/SOURCE_REPO)/qemu-project/edk2.git - git submodule set-url -- roms/opensbi $(cat /run/secrets/SOURCE_REPO)/qemu-project/opensbi.git - git submodule set-url -- roms/qboot $(cat /run/secrets/SOURCE_REPO)/qemu-project/qboot.git - git submodule set-url -- roms/vbootrom $(cat /run/secrets/SOURCE_REPO)/qemu-project/vbootrom.git - git submodule set-url -- tests/lcitool/libvirt-ci $(cat /run/secrets/SOURCE_REPO)/libvirt/libvirt-ci.git + if [[ "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]] ; then + echo "Checkout submodules" + git submodule update --init --recursive + else + echo "Checkout submodules with URL rewrite" + # mbed-tls rewrite is needed for edk2 submodule. + git \ + -c url."$(cat /run/secrets/SOURCE_REPO)/qemu-project/seabios.git".insteadOf=https://gitlab.com/qemu-project/seabios.git/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/mbed-tls/".insteadOf=https://github.com/ARMmbed/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://github.com/ \ + -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://gitlab.com/ \ + submodule update --init --recursive fi + --- {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} From 67636de78238a886c8b98113573680b3d8d8d7ae Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Wed, 2 Jul 2025 11:54:02 +0300 Subject: [PATCH 23/30] ++ sync with main: use svace builder from deckhouse base images Signed-off-by: Ivan Mikheykin --- images/dvcr-artifact/werf.inc.yaml | 8 ++- images/dvcr/werf.inc.yaml | 4 +- images/libvirt/werf.inc.yaml | 3 +- images/qemu/werf.inc.yaml | 3 +- images/svace-builder/werf.inc.yaml | 54 -------------------- images/virt-artifact/werf.inc.yaml | 3 +- images/virtualization-artifact/werf.inc.yaml | 4 +- images/vm-route-forge/werf.inc.yaml | 2 +- werf.yaml | 15 ++---- 9 files changed, 22 insertions(+), 74 deletions(-) delete mode 100644 images/svace-builder/werf.inc.yaml diff --git a/images/dvcr-artifact/werf.inc.yaml b/images/dvcr-artifact/werf.inc.yaml index 4fc5302c1a..26c59191d2 100644 --- a/images/dvcr-artifact/werf.inc.yaml +++ b/images/dvcr-artifact/werf.inc.yaml @@ -1,7 +1,7 @@ --- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false -fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }} git: - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /src @@ -16,9 +16,15 @@ secrets: value: {{ .GOPROXY }} shell: beforeInstall: +{{- if eq $.SVACE_ENABLED "false" }} {{- include "debian packages proxy" . | nindent 2 }} - apt-get -qq install -y --no-install-recommends libnbd-dev {{- include "debian packages clean" . | nindent 2 }} +{{- else }} + {{- include "alt packages proxy" . | nindent 2 }} + - apt-get -qq install -y libnbd-devel + {{- include "alt packages clean" . | nindent 2 }} +{{- end }} install: - cd /src - export GOPROXY=$(cat /run/secrets/GOPROXY) diff --git a/images/dvcr/werf.inc.yaml b/images/dvcr/werf.inc.yaml index d42b988010..f49e398f20 100644 --- a/images/dvcr/werf.inc.yaml +++ b/images/dvcr/werf.inc.yaml @@ -36,7 +36,7 @@ imageSpec: --- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false -fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }} mount: - fromPath: ~/go-pkg-cache to: /go/pkg @@ -70,4 +70,4 @@ shell: export VERSION={{ $version }} {{- $_ := set $ "ProjectName" (list $.ImageName "dvcr" | join "/") }} - {{- include "image-build.build" (set $ "BuildCommand" `go build -o /container-registry-binary/ -ldflags '-s -w -X registry/version.Version=v$VERSION -X registry/version.Revision=v$VERSION' ./cmd/registry`) | nindent 6 }} \ No newline at end of file + {{- include "image-build.build" (set $ "BuildCommand" `go build -o /container-registry-binary/ -ldflags '-s -w -X registry/version.Version=v$VERSION -X registry/version.Revision=v$VERSION' ./cmd/registry`) | nindent 6 }} diff --git a/images/libvirt/werf.inc.yaml b/images/libvirt/werf.inc.yaml index 0534b76e7b..3d712ec52d 100644 --- a/images/libvirt/werf.inc.yaml +++ b/images/libvirt/werf.inc.yaml @@ -99,7 +99,8 @@ libraries: {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ .ModuleNamePrefix }}base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} +{{- $baseAltP11 := printf "%sbase-alt-p11" .ModuleNamePrefix }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary $baseAltP11 "builder/alt-go-svace" }} import: - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /{{ $gitRepoName }}-{{ $version }} diff --git a/images/qemu/werf.inc.yaml b/images/qemu/werf.inc.yaml index 6b497b6651..bf70621a3b 100644 --- a/images/qemu/werf.inc.yaml +++ b/images/qemu/werf.inc.yaml @@ -121,7 +121,8 @@ libraries: image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ .ModuleNamePrefix }}base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} +{{- $baseAltP11 := printf "%sbase-alt-p11" .ModuleNamePrefix }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary $baseAltP11 "builder/alt-go-svace" }} import: - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /{{ $gitRepoName }}-{{ $version }} diff --git a/images/svace-builder/werf.inc.yaml b/images/svace-builder/werf.inc.yaml deleted file mode 100644 index fdb5e24875..0000000000 --- a/images/svace-builder/werf.inc.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- -image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact -final: false -fromImage: builder/src -secrets: - - id: SOURCE_REPO - value: {{ $.SOURCE_REPO_GIT }} -shell: - install: - - | - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - - git clone --depth 1 --branch v4.0.250415 $(cat /run/secrets/SOURCE_REPO)/ispras/svace.git /opt/svace ---- -image: {{ .ModuleNamePrefix }}base-alt-p11/svace -final: false -fromImage: BASE_ALT_P11 -import: -- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact - add: /opt/svace - to: /opt/svace - before: install -shell: - beforeInstall: - {{- include "alt packages proxy" . | nindent 2 }} - - | - apt-get install -y \ - wget rsync bzip2 golang git binutils make gcc \ - glibc-pthread glibc-devel glibc-devel-static - {{- include "alt packages clean" . | nindent 2 }} - - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - install: - - | - ln -s /opt/svace/bin/svace /usr/local/bin/svace ---- -image: {{ .ModuleNamePrefix }}builder/golang-bookworm-1.23/svace -final: false -fromImage: builder/golang-bookworm-1.23 -import: -- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact - add: /opt/svace - to: /opt/svace - before: install -shell: - beforeInstall: - {{- include "debian packages proxy" . | nindent 2 }} - - | - apt-get install -y \ - bzip2 rsync - {{- include "debian packages clean" . | nindent 2 }} - - mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config - install: - - | - ln -s /opt/svace/bin/svace /usr/local/bin/svace diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 88759ed244..aea1f29d5b 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -41,7 +41,8 @@ packages: image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: {{ .ModuleNamePrefix }}base-alt-p11{{ $.SVACE_IMAGE_SUFFIX }} +{{- $baseAltP11 := printf "%sbase-alt-p11" .ModuleNamePrefix }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary $baseAltP11 "builder/alt-go-svace" }} import: - image: {{ .ModuleNamePrefix }}{{ .ImageName }}-src-artifact add: /kubevirt diff --git a/images/virtualization-artifact/werf.inc.yaml b/images/virtualization-artifact/werf.inc.yaml index b4509757ea..972176ce76 100644 --- a/images/virtualization-artifact/werf.inc.yaml +++ b/images/virtualization-artifact/werf.inc.yaml @@ -1,7 +1,7 @@ --- image: {{ .ModuleNamePrefix }}{{ .ImageName }} final: false -fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }} git: - add: {{ .ModulePathPrefix }}/api to: /src/api @@ -45,7 +45,7 @@ shell: echo "Build virtualization-api binary" {{- $_ := set $ "ProjectName" (list $.ImageName "virtualization-api" | join "/") }} {{- include "image-build.build" (set $ "BuildCommand" `go build -v -o /out/virtualization-api ./cmd/virtualization-api`) | nindent 6 }} -{{- if eq .MODULE_EDITION "EE" }} +{{- if or (eq .MODULE_EDITION "EE") (eq .SVACE_ENABLED "true") }} - | echo "Build virtualization-audit binary" {{- $_ := set $ "ProjectName" (list $.ImageName "virtualization-audit" | join "/") }} diff --git a/images/vm-route-forge/werf.inc.yaml b/images/vm-route-forge/werf.inc.yaml index 574341ffed..d7bebdbc63 100644 --- a/images/vm-route-forge/werf.inc.yaml +++ b/images/vm-route-forge/werf.inc.yaml @@ -1,7 +1,7 @@ --- image: {{ .ModuleNamePrefix }}{{ .ImageName }}-builder final: false -fromImage: builder/golang-bookworm-1.23{{ $.SVACE_IMAGE_SUFFIX }} +fromImage: {{ eq $.SVACE_ENABLED "false" | ternary "builder/golang-bookworm-1.23" "builder/alt-go-svace" }} git: - add: {{ .ModulePathPrefix }}/images/{{ $.ImageName }} to: /app/images/vm-route-forge diff --git a/werf.yaml b/werf.yaml index aebfdc6b3f..5cb0a1267e 100644 --- a/werf.yaml +++ b/werf.yaml @@ -26,8 +26,6 @@ build: # svace analyze toggler {{- $_ := set . "SVACE_ENABLED" (env "SVACE_ENABLED" "false") }} -{{- $_ := set . "SVACE_IMAGE_SUFFIX" "" }} -{{- if ne .SVACE_ENABLED "false" }}{{ $_ := set . "SVACE_IMAGE_SUFFIX" "/svace" }}{{ end }} {{- $_ := set . "SVACE_ANALYZE_HOST" (env "SVACE_ANALYZE_HOST" "example.host") }} {{- $_ := set . "SVACE_ANALYZE_SSH_USER" (env "SVACE_ANALYZE_SSH_USER" "user") }} @@ -39,15 +37,6 @@ build: {{ $_ := set . "Package" dict }} {{- $versions_ctx := (.Files.Get "component_versions/version_map.yml" | fromYaml) }} -# svace analyze toggler -{{- $_ := set . "SVACE_ENABLED" (env "SVACE_ENABLED" "false") }} - -{{- $_ := set . "SVACE_IMAGE_SUFFIX" "" }} -{{- if ne .SVACE_ENABLED "false" }}{{ $_ := set . "SVACE_IMAGE_SUFFIX" "/svace" }}{{ end }} - -{{- $_ := set . "SVACE_ANALYZE_HOST" (env "SVACE_ANALYZE_HOST" "example.host") }} - -{{- $_ := set . "SVACE_ANALYZE_SSH_USER" (env "SVACE_ANALYZE_SSH_USER" "user") }} {{- range $k, $v := $versions_ctx.firmware }} {{- $_ := set $.Version $k $v}} @@ -94,7 +83,11 @@ shell: cat images_digests.json --- image: python-dependencies +{{- if not .ModuleName }} fromImage: BASE_ALT_P11 +{{- else }} +fromImage: builder/alt +{{- end }} fromCacheVersion: "2025-28-05.1" git: - add: /lib/python/requirements.txt From 68859dd0324033571bfaf92dc5c94addbafd9f86 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Wed, 2 Jul 2025 13:26:48 +0300 Subject: [PATCH 24/30] ++ fixes to download sources via proxy Signed-off-by: Ivan Mikheykin --- images/packages/binaries/glib2/werf.inc.yaml | 22 +++++++++++++++++-- images/packages/binaries/gnutls/werf.inc.yaml | 8 +++---- images/packages/binaries/nbdkit/werf.inc.yaml | 6 ++--- .../packages/binaries/nftables/werf.inc.yaml | 22 +++++-------------- images/qemu/werf.inc.yaml | 15 +++++++++++++ 5 files changed, 47 insertions(+), 26 deletions(-) diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index fef73ab3fa..e4fb12de68 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -20,12 +20,30 @@ secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO_GIT }} shell: + beforeInstall: + {{- include "alt packages proxy" . | nindent 2}} + - apt-get install -y meson + {{- include "alt packages clean" . | nindent 2}} + install: - | mkdir -p ~/.ssh && echo "StrictHostKeyChecking accept-new" > ~/.ssh/config git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src - # rm -rf /src/.git + + if [[ ! "$(cat /run/secrets/SOURCE_REPO)" =~ "github.com" ]] ; then + # Clone meson wraps with url rewrite. + # Configure script options require only 3 subprojects. + cd /src + for subproj in gvdb libffi sysprof ; do + echo "Rewrite url for ${subproj} subproject." + wrapfile="subprojects/${subproj}.wrap" + # Rewrite https://HOSTNAME/ to SOURCE_REPO secret in the wrap file. + sed -i '/^#/n ; /^url/ s|\(url\ \?=\ \?\)\(.*:\/\/[^\/]*\/\)|\1'$(cat /run/secrets/SOURCE_REPO)'\/|' ${wrapfile} + meson subprojects download ${subproj} + done + fi + --- {{- $name := print $.ImageName "-dependencies" -}} @@ -52,7 +70,7 @@ shell: - | apt-get install -y \ {{ $builderDependencies.packages | join " " }} - + {{- include "alt packages clean" . | nindent 2 }} install: diff --git a/images/packages/binaries/gnutls/werf.inc.yaml b/images/packages/binaries/gnutls/werf.inc.yaml index e75ad84b3f..dc70a0118a 100644 --- a/images/packages/binaries/gnutls/werf.inc.yaml +++ b/images/packages/binaries/gnutls/werf.inc.yaml @@ -44,7 +44,7 @@ shell: {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: -- gcc git gperf glibc-devel-static wget +- gcc git gperf glibc-devel-static - make autoconf automake libtool makeinfo gettext-devel patch - perl-Net-SSLeay perl-IPC-Cmd perl-Pod-Html - gem-gettext-devel gettext po4a @@ -70,9 +70,7 @@ shell: beforeInstall: {{- include "alt packages proxy" . | nindent 2 }} - | - apt-get update - apt-get install -y \ - {{ $builderDependencies.packages | join " " }} + apt-get install -y {{ $builderDependencies.packages | join " " }} {{- include "alt packages clean" . | nindent 2 }} @@ -82,7 +80,7 @@ shell: cd /src - ./bootstrap + ./bootstrap --skip-po ./configure \ --prefix=/usr \ diff --git a/images/packages/binaries/nbdkit/werf.inc.yaml b/images/packages/binaries/nbdkit/werf.inc.yaml index 3b6a3c2e7f..eeec67c16d 100644 --- a/images/packages/binaries/nbdkit/werf.inc.yaml +++ b/images/packages/binaries/nbdkit/werf.inc.yaml @@ -49,7 +49,6 @@ packages: - zlib - libblkio - libnbd -- libtorrent-rasterbar-devel - libssh {{- end -}} @@ -77,14 +76,15 @@ shell: OUTDIR=/out cd /src - + autoreconf -i ./configure \ --disable-static \ --prefix=/usr \ --libdir=/usr/lib64 \ - --without-bash-completions + --without-bash-completions \ + --disable-torrent make -j$(nproc) diff --git a/images/packages/binaries/nftables/werf.inc.yaml b/images/packages/binaries/nftables/werf.inc.yaml index 3ff3cc128e..1bb1bf3aec 100644 --- a/images/packages/binaries/nftables/werf.inc.yaml +++ b/images/packages/binaries/nftables/werf.inc.yaml @@ -35,6 +35,12 @@ packages: - automake autoconf make makeinfo libtool - musl-devel-static - flex bison asciidoc-a2x +- libmnl-devel +- libnftnl-devel +- libgmp-devel +- libreadline-devel +- libjansson-devel +- libedit-devel {{- end -}} {{ $builderDependencies := include "$name" . | fromYaml }} @@ -53,23 +59,7 @@ shell: - | apt-get install -y \ {{ $builderDependencies.packages | join " " }} - - {{ if not $.DistroPackagesProxy }} - REPO_URL=http://ftp.altlinux.org/pub/distributions - {{- else }} - REPO_URL=http://{{ $.DistroPackagesProxy }}/repository/archive-ALT-Linux-APT-Repository - {{- end }} - - cat >/etc/apt/sources.list.d/alt-sisyphus.list< ~/.ssh/config @@ -46,6 +50,17 @@ shell: -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://github.com/ \ -c url."$(cat /run/secrets/SOURCE_REPO)/".insteadOf=https://gitlab.com/ \ submodule update --init --recursive + + echo "Download meson subprojects with URL rewrites." + # Configure script options require only 3 subprojects. + for subproj in berkeley-softfloat-3 berkeley-testfloat-3 keycodemapdb ; do + echo "Rewrite url for ${subproj} subproject." + wrapfile="subprojects/${subproj}.wrap" + # Rewrite https://HOSTNAME/ to SOURCE_REPO secret in the wrap file. + sed -i '/^#/n ; /^url/ s|\(url\ \?=\ \?\)\(.*:\/\/[^\/]*\/\)|\1'$(cat /run/secrets/SOURCE_REPO)'\/|' ${wrapfile} + meson subprojects download ${subproj} + done + fi --- From 3092e9776d27d6e545569f0b0e78acf6f881232d Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Fri, 4 Jul 2025 21:06:57 +0300 Subject: [PATCH 25/30] ++ exclude "build only" non-final images Signed-off-by: Ivan Mikheykin --- images/packages/binaries/dtc/werf.inc.yaml | 3 +++ images/packages/binaries/fuse3/werf.inc.yaml | 4 +++- images/packages/binaries/glib2/werf.inc.yaml | 3 +++ images/packages/binaries/glibc/werf.inc.yaml | 3 +++ images/packages/binaries/gmp/werf.inc.yaml | 3 +++ images/packages/binaries/libattr/werf.inc.yaml | 3 +++ images/packages/binaries/libaudit/werf.inc.yaml | 3 +++ images/packages/binaries/libblkid/werf.inc.yaml | 3 +++ images/packages/binaries/libbrotli/werf.inc.yaml | 3 +++ images/packages/binaries/libbsd/werf.inc.yaml | 3 +++ images/packages/binaries/libburn/werf.inc.yaml | 3 +++ images/packages/binaries/libgcrypt/werf.inc.yaml | 3 +++ images/packages/binaries/lvm2/werf.inc.yaml | 5 ++++- 13 files changed, 40 insertions(+), 2 deletions(-) diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 66e4d05abe..8285e6579a 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -69,3 +71,4 @@ shell: meson compile -C build meson install -C build +{{- end }} diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index 085560916c..003f224faf 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -65,4 +67,4 @@ shell: meson setup build -Duseroot=false -Dprefix=$OUTDIR/usr meson compile -C build meson install -C build - +{{- end }} diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index e4fb12de68..faac02a5c4 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -83,3 +85,4 @@ shell: meson compile -C _build meson install -C _build +{{- end}} diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index fce81a51eb..4d304f2488 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -77,3 +79,4 @@ shell: make DESTDIR=$OUTDIR install +{{- end }} diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index bfd25ea82d..eaa2efb066 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -186,3 +188,4 @@ shell: make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end}} diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index a3142f2b7c..b17f7b3b65 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -70,3 +72,4 @@ shell: make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end}} diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index d65253a313..865dc8ddac 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -72,3 +74,4 @@ shell: --disable-zos-remote make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end }} diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index 4b6d27fcab..b87bdd889b 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -74,3 +76,4 @@ shell: --disable-examples make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end }} diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index 881f13640e..e9b67ea12f 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -70,3 +72,4 @@ shell: make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end }} diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index c29623ef1c..5692b797b3 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -71,3 +73,4 @@ shell: make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end }} diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index 6f255ba775..b36e449608 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -70,3 +72,4 @@ shell: --disable-static make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end}} diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 2ce50e8c2b..58d2ff8f23 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -79,3 +81,4 @@ shell: make -j$(nproc) make DESTDIR=$OUTDIR install libtool --finish /usr/lib64 +{{- end}} diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index ba90f20aee..f4a9f868f6 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -1,3 +1,5 @@ +{{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false @@ -63,7 +65,7 @@ shell: install: - | OUTDIR=/out - + cd /src autoconf ./configure \ @@ -83,3 +85,4 @@ shell: make -j$(nproc) make DESTDIR=$OUTDIR install +{{- end }} From 8f29ab9ea13e6997aee47a3eb2185a7a3ac5dc01 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Fri, 4 Jul 2025 21:54:03 +0300 Subject: [PATCH 26/30] ++ defines should not be inside ifs Signed-off-by: Ivan Mikheykin --- images/packages/binaries/dtc/werf.inc.yaml | 4 ++++ images/packages/binaries/fuse3/werf.inc.yaml | 4 ++++ images/packages/binaries/glibc/werf.inc.yaml | 3 +++ images/packages/binaries/gmp/werf.inc.yaml | 3 +++ images/packages/binaries/libattr/werf.inc.yaml | 3 +++ images/packages/binaries/libaudit/werf.inc.yaml | 4 ++++ images/packages/binaries/libblkid/werf.inc.yaml | 4 ++++ images/packages/binaries/libbrotli/werf.inc.yaml | 3 +++ images/packages/binaries/libbsd/werf.inc.yaml | 3 +++ images/packages/binaries/libburn/werf.inc.yaml | 4 +++- images/packages/binaries/libgcrypt/werf.inc.yaml | 4 +++- images/packages/binaries/lvm2/werf.inc.yaml | 4 +++- 12 files changed, 40 insertions(+), 3 deletions(-) diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 8285e6579a..2473db761a 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -30,6 +30,8 @@ shell: # rm -rf /src/.git --- +{{- end }} + {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -38,6 +40,8 @@ packages: - flex bison meson {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index 003f224faf..83c0bdc748 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -29,6 +29,8 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git --- +{{- end}} + {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -37,6 +39,8 @@ packages: - ninja-build libudev-devel {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index 4d304f2488..e1555cac03 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -29,6 +29,7 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git --- +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} @@ -39,6 +40,8 @@ packages: - make bison python3 {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index eaa2efb066..e6ac033691 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -29,6 +29,8 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git --- +{{- end }} + {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -37,6 +39,7 @@ packages: - make makeinfo autoconf automake {{- end -}} +{{- if eq .ModuleNamePrefix "" }} {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index b17f7b3b65..12dda5acd2 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -30,12 +30,15 @@ shell: # rm -rf /src/.git --- +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: - gcc git make libtool gettext-tools {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index 865dc8ddac..71adde9359 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -30,6 +30,8 @@ shell: # rm -rf /src/.git --- +{{- end }} + {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -37,6 +39,8 @@ packages: - git make libtool {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index b87bdd889b..f0809e91e3 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -30,6 +30,8 @@ shell: # rm -rf /src/.git --- +{{- end }} + {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -38,6 +40,8 @@ packages: - bison flex {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index e9b67ea12f..4d85e55535 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -30,6 +30,7 @@ shell: # rm -rf /src/.git --- +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -37,6 +38,8 @@ packages: - git cmake make {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index 5692b797b3..6f8060cbca 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -30,6 +30,7 @@ shell: # rm -rf /src/.git --- +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -37,6 +38,8 @@ packages: - git make libtool libmd-devel {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index b36e449608..e49d775fe4 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -30,7 +30,7 @@ shell: # rm -rf /src/.git --- - +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -38,6 +38,8 @@ packages: - git make libtool {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 58d2ff8f23..7f34ca7842 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -30,7 +30,7 @@ shell: # rm -rf /src/.git --- - +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -39,6 +39,8 @@ packages: - libtool libgpg-error-devel {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index f4a9f868f6..9ec18858c0 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -30,7 +30,7 @@ shell: # rm -rf /src/.git --- - +{{- end }} {{- $name := print $.ImageName "-dependencies" -}} {{- define "$name" -}} packages: @@ -40,6 +40,8 @@ packages: - libtinfo-devel libudev-devel libaio-devel {{- end -}} +{{- if eq .ModuleNamePrefix "" }} + {{ $builderDependencies := include "$name" . | fromYaml }} image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder From feebe0d28f0e299bbf267932d7c00a99596e841c Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Fri, 4 Jul 2025 22:20:14 +0300 Subject: [PATCH 27/30] ++ move all declarations to the top Signed-off-by: Ivan Mikheykin --- images/packages/binaries/dtc/werf.inc.yaml | 34 ++++++++---------- images/packages/binaries/fuse3/werf.inc.yaml | 33 ++++++++--------- images/packages/binaries/glibc/werf.inc.yaml | 35 +++++++++---------- images/packages/binaries/gmp/werf.inc.yaml | 32 ++++++++--------- .../packages/binaries/libattr/werf.inc.yaml | 27 +++++++------- .../packages/binaries/libaudit/werf.inc.yaml | 30 +++++++--------- .../packages/binaries/libblkid/werf.inc.yaml | 32 ++++++++--------- .../packages/binaries/libbrotli/werf.inc.yaml | 29 +++++++-------- images/packages/binaries/libbsd/werf.inc.yaml | 29 +++++++-------- .../packages/binaries/libburn/werf.inc.yaml | 29 +++++++-------- .../packages/binaries/libgcrypt/werf.inc.yaml | 31 ++++++++-------- images/packages/binaries/lvm2/werf.inc.yaml | 33 ++++++++--------- 12 files changed, 168 insertions(+), 206 deletions(-) diff --git a/images/packages/binaries/dtc/werf.inc.yaml b/images/packages/binaries/dtc/werf.inc.yaml index 2473db761a..3d36acfa93 100644 --- a/images/packages/binaries/dtc/werf.inc.yaml +++ b/images/packages/binaries/dtc/werf.inc.yaml @@ -1,3 +1,17 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git make rpm-macros-meson +- flex bison meson +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "dtc/dtc.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +25,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "dtc/dtc.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -28,22 +38,8 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git ---- - -{{- end }} - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git make rpm-macros-meson -- flex bison meson -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} +--- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/fuse3/werf.inc.yaml b/images/packages/binaries/fuse3/werf.inc.yaml index 83c0bdc748..289b94ef40 100644 --- a/images/packages/binaries/fuse3/werf.inc.yaml +++ b/images/packages/binaries/fuse3/werf.inc.yaml @@ -1,3 +1,17 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc git +- make rpm-macros-alternatives meson +- ninja-build libudev-devel +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "libfuse/libfuse.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +25,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "libfuse/libfuse.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -28,21 +38,8 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git ---- -{{- end}} - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc git -- make rpm-macros-alternatives meson -- ninja-build libudev-devel -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} +--- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/glibc/werf.inc.yaml b/images/packages/binaries/glibc/werf.inc.yaml index e1555cac03..bc1c4a9325 100644 --- a/images/packages/binaries/glibc/werf.inc.yaml +++ b/images/packages/binaries/glibc/werf.inc.yaml @@ -1,3 +1,18 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git pkg-config cmake +- hardlink binutils glibc-kernheaders +- make bison python3 +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "glibc.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +26,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "glibc.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -28,22 +39,8 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git ---- -{{- end }} - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git pkg-config cmake -- hardlink binutils glibc-kernheaders -- make bison python3 -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} +--- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/gmp/werf.inc.yaml b/images/packages/binaries/gmp/werf.inc.yaml index e6ac033691..44a9f8a4e8 100644 --- a/images/packages/binaries/gmp/werf.inc.yaml +++ b/images/packages/binaries/gmp/werf.inc.yaml @@ -1,3 +1,17 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- git +- flex gcc-c++ +- make makeinfo autoconf automake +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "gmp/gmp" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +25,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "gmp/gmp" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -28,20 +38,8 @@ shell: git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $version }} /src # rm -rf /src/.git ---- -{{- end }} - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- git -- flex gcc-c++ -- make makeinfo autoconf automake -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} -{{ $builderDependencies := include "$name" . | fromYaml }} +--- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libattr/werf.inc.yaml b/images/packages/binaries/libattr/werf.inc.yaml index 12dda5acd2..c2edc60565 100644 --- a/images/packages/binaries/libattr/werf.inc.yaml +++ b/images/packages/binaries/libattr/werf.inc.yaml @@ -1,3 +1,15 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc git make libtool gettext-tools +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "attr.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +23,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "attr.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,17 +38,6 @@ shell: # rm -rf /src/.git --- -{{- end }} -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc git make libtool gettext-tools -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libaudit/werf.inc.yaml b/images/packages/binaries/libaudit/werf.inc.yaml index 71adde9359..4608afaa5a 100644 --- a/images/packages/binaries/libaudit/werf.inc.yaml +++ b/images/packages/binaries/libaudit/werf.inc.yaml @@ -1,3 +1,16 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git make libtool +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "linux-audit/audit-userspace.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +24,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "linux-audit/audit-userspace.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,19 +39,6 @@ shell: # rm -rf /src/.git --- -{{- end }} - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git make libtool -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libblkid/werf.inc.yaml b/images/packages/binaries/libblkid/werf.inc.yaml index f0809e91e3..fee90073b0 100644 --- a/images/packages/binaries/libblkid/werf.inc.yaml +++ b/images/packages/binaries/libblkid/werf.inc.yaml @@ -1,3 +1,17 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git make libtool gettext-devel +- bison flex +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "util-linux/util-linux.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +25,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "util-linux/util-linux.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,20 +40,6 @@ shell: # rm -rf /src/.git --- -{{- end }} - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git make libtool gettext-devel -- bison flex -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libbrotli/werf.inc.yaml b/images/packages/binaries/libbrotli/werf.inc.yaml index 4d85e55535..929d9d28ad 100644 --- a/images/packages/binaries/libbrotli/werf.inc.yaml +++ b/images/packages/binaries/libbrotli/werf.inc.yaml @@ -1,3 +1,16 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git cmake make +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "google/brotli.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +24,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "google/brotli.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,18 +39,6 @@ shell: # rm -rf /src/.git --- -{{- end }} -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git cmake make -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index 6f8060cbca..e640c8c364 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -1,3 +1,16 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git make libtool libmd-devel +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "libbsd/libbsd.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +24,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "libbsd/libbsd.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,18 +39,6 @@ shell: # rm -rf /src/.git --- -{{- end }} -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git make libtool libmd-devel -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libburn/werf.inc.yaml b/images/packages/binaries/libburn/werf.inc.yaml index e49d775fe4..204e7dca50 100644 --- a/images/packages/binaries/libburn/werf.inc.yaml +++ b/images/packages/binaries/libburn/werf.inc.yaml @@ -1,3 +1,16 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc +- git make libtool +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "libburnia/libburn.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +24,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "libburnia/libburn.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,18 +39,6 @@ shell: # rm -rf /src/.git --- -{{- end }} -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc -- git make libtool -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - - {{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libgcrypt/werf.inc.yaml b/images/packages/binaries/libgcrypt/werf.inc.yaml index 7f34ca7842..4f38604db7 100644 --- a/images/packages/binaries/libgcrypt/werf.inc.yaml +++ b/images/packages/binaries/libgcrypt/werf.inc.yaml @@ -1,3 +1,17 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- git gcc +- make pkgconfig makeinfo autoconf +- libtool libgpg-error-devel +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "gpg/libgcrypt" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +25,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "gpg/libgcrypt" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,19 +40,6 @@ shell: # rm -rf /src/.git --- -{{- end }} -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- git gcc -- make pkgconfig makeinfo autoconf -- libtool libgpg-error-devel -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/lvm2/werf.inc.yaml b/images/packages/binaries/lvm2/werf.inc.yaml index 9ec18858c0..6de561b95e 100644 --- a/images/packages/binaries/lvm2/werf.inc.yaml +++ b/images/packages/binaries/lvm2/werf.inc.yaml @@ -1,3 +1,18 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- git gcc gcc-c++ make autoconf automake +- pkgconfig makeinfo rpm-build-python3 +- libreadline-devel +- libtinfo-devel libudev-devel libaio-devel +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "lvmteam/lvm2.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +26,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "lvmteam/lvm2.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -30,20 +41,6 @@ shell: # rm -rf /src/.git --- -{{- end }} -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- git gcc gcc-c++ make autoconf automake -- pkgconfig makeinfo rpm-build-python3 -- libreadline-devel -- libtinfo-devel libudev-devel libaio-devel -{{- end -}} - -{{- if eq .ModuleNamePrefix "" }} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt From 5c0275fd6e3eeb943531cab427e6c9b6fc2f0e96 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Fri, 4 Jul 2025 22:38:47 +0300 Subject: [PATCH 28/30] ++ last fixes Signed-off-by: Ivan Mikheykin --- images/packages/binaries/glib2/werf.inc.yaml | 29 +++++++++---------- images/packages/binaries/libbsd/werf.inc.yaml | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/images/packages/binaries/glib2/werf.inc.yaml b/images/packages/binaries/glib2/werf.inc.yaml index faac02a5c4..4ba16b1b7d 100644 --- a/images/packages/binaries/glib2/werf.inc.yaml +++ b/images/packages/binaries/glib2/werf.inc.yaml @@ -1,3 +1,17 @@ +{{- $name := print $.ImageName "-dependencies" -}} +{{- define "$name" -}} +packages: +- gcc gcc-c++ +- git pkg-config meson cmake +- libunwind-devel libelf-devel libffi-devel zlib-devel libpcre2-devel sysprof-devel libgvdb-devel +{{- end -}} + +{{- $builderDependencies := include "$name" . | fromYaml }} + +{{- $version := get .PackageVersion .ImageName }} +{{- $gitRepoUrl := "GNOME/glib.git" }} +{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} + {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} {{- if eq .ModuleNamePrefix "" }} --- @@ -11,10 +25,6 @@ import: before: setup --- -{{- $version := get .PackageVersion .ImageName }} -{{- $gitRepoUrl := "GNOME/glib.git" }} -{{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} - image: {{ .ModuleNamePrefix }}{{ $PkgImageName }}-src-artifact final: false fromImage: builder/src @@ -47,17 +57,6 @@ shell: fi --- - -{{- $name := print $.ImageName "-dependencies" -}} -{{- define "$name" -}} -packages: -- gcc gcc-c++ -- git pkg-config meson cmake -- libunwind-devel libelf-devel libffi-devel zlib-devel libpcre2-devel sysprof-devel libgvdb-devel -{{- end -}} - -{{ $builderDependencies := include "$name" . | fromYaml }} - image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }}-builder final: false fromImage: builder/alt diff --git a/images/packages/binaries/libbsd/werf.inc.yaml b/images/packages/binaries/libbsd/werf.inc.yaml index e640c8c364..193a5f30e2 100644 --- a/images/packages/binaries/libbsd/werf.inc.yaml +++ b/images/packages/binaries/libbsd/werf.inc.yaml @@ -12,7 +12,7 @@ packages: {{- $PkgImageName := (printf "%s/%s" .PackagePath .ImageName) }} {{/* Temporarily exclude images from build as submodule. TODO remove 'if' when this image is used in import section. */}} -{- if eq .ModuleNamePrefix "" }} +{{- if eq .ModuleNamePrefix "" }} --- image: {{ .ModuleNamePrefix }}{{ .PackagePath }}/{{ .ImageName }} final: false From 56eac1a75c3684f63eaea4d70a90903c138b73f8 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Fri, 4 Jul 2025 22:45:10 +0300 Subject: [PATCH 29/30] ++ use more recent builder/alt Signed-off-by: Ivan Mikheykin --- base-images/deckhouse_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base-images/deckhouse_images.yml b/base-images/deckhouse_images.yml index f70c51362b..807ef58b39 100644 --- a/base-images/deckhouse_images.yml +++ b/base-images/deckhouse_images.yml @@ -8,8 +8,8 @@ base/python: "sha256:bda80f25bbfb09a9e6793a5fcc3a560ebb058ba6618f413a778056951e6 base/python-v3.12.10: "sha256:bda80f25bbfb09a9e6793a5fcc3a560ebb058ba6618f413a778056951e663461" # fromImage: builder/scratch builder/alpine: "sha256:286e7fddf397a48ed2529f630881876284ff09c84c6dcfce9d982f4e035648cd" # from: alpine:3.20.6 builder/alpine-3.20: "sha256:286e7fddf397a48ed2529f630881876284ff09c84c6dcfce9d982f4e035648cd" # from: alpine:3.20.6 -builder/alt: "sha256:7223768d0f8af786c3621de7761075cf6f8f025b3b4bf7edfdceac21038d5fef" # from: registry.altlinux.org/p11/alt:20250321 -builder/alt-2025-04-24: "sha256:7223768d0f8af786c3621de7761075cf6f8f025b3b4bf7edfdceac21038d5fef" # from: registry.altlinux.org/p11/alt:20250321 +builder/alt: "sha256:ee2b848c440ecbbe0e941bcbc1e7c75001ae05662742a015594edf470e4c5465" # from: registry.altlinux.org/p11/alt:20250321 +builder/alt-2025-05-31: "sha256:ee2b848c440ecbbe0e941bcbc1e7c75001ae05662742a015594edf470e4c5465" # from: registry.altlinux.org/p11/alt:20250321 builder/golang-alpine: "sha256:f6f526535fdfcdf869a9e09831beeb3ed0d0eac3076a18840dfbfcd1b069c895" # from: golang:1.24.2-alpine3.20 builder/golang-alpine-1.23: "sha256:68747b189da26bd5bff8f6ec0a9d614940f4d05adcee91ab50b4ee39e335d1c2" # from: golang:1.23.8-alpine3.20 builder/golang-alpine-1.24: "sha256:f6f526535fdfcdf869a9e09831beeb3ed0d0eac3076a18840dfbfcd1b069c895" # from: golang:1.24.2-alpine3.20 From 9beb0878b1fb1fa26ac9b02a46665aa3c32ad394 Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Wed, 9 Jul 2025 11:36:08 +0300 Subject: [PATCH 30/30] add findmnt for fix hotplug fo sc like type file Signed-off-by: Nikita Korolev --- images/virt-handler/werf.inc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/images/virt-handler/werf.inc.yaml b/images/virt-handler/werf.inc.yaml index 4368d7ba67..5aadbfd9eb 100644 --- a/images/virt-handler/werf.inc.yaml +++ b/images/virt-handler/werf.inc.yaml @@ -52,6 +52,7 @@ packages: - libnftnl - libjansson4 binaries: +- /usr/bin/findmnt - /usr/bin/getfacl - /usr/bin/setfacl - /usr/sbin/nft