Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package melange for openSUSE:Factory checked in at 2026-07-01 16:49:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/melange (Old) and /work/SRC/openSUSE:Factory/.melange.new.11887 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "melange" Wed Jul 1 16:49:58 2026 rev:167 rq:1362873 version:0.55.0 Changes: -------- --- /work/SRC/openSUSE:Factory/melange/melange.changes 2026-06-18 18:43:41.756728361 +0200 +++ /work/SRC/openSUSE:Factory/.melange.new.11887/melange.changes 2026-07-01 16:50:21.701668643 +0200 @@ -1,0 +2,10 @@ +Wed Jul 01 06:25:15 UTC 2026 - Johannes Kastl <[email protected]> + +- Update to version 0.55.0: + * fix(build): make MutateWith deterministic for forwarded inputs + (#2577) + * feat: pipelines: split/dev: Add prefix input (#2574) + * feat: pipelines: autoconf: Add targets input for make and + make-install (#2573) + +------------------------------------------------------------------- Old: ---- melange-0.54.0.obscpio New: ---- melange-0.55.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ melange.spec ++++++ --- /var/tmp/diff_new_pack.zR3xMp/_old 2026-07-01 16:50:24.037749609 +0200 +++ /var/tmp/diff_new_pack.zR3xMp/_new 2026-07-01 16:50:24.045749886 +0200 @@ -17,7 +17,7 @@ Name: melange -Version: 0.54.0 +Version: 0.55.0 Release: 0 Summary: Build APKs from source code License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.zR3xMp/_old 2026-07-01 16:50:24.109752105 +0200 +++ /var/tmp/diff_new_pack.zR3xMp/_new 2026-07-01 16:50:24.117752382 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/chainguard-dev/melange.git</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">refs/tags/v0.54.0</param> + <param name="revision">refs/tags/v0.55.0</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.zR3xMp/_old 2026-07-01 16:50:24.153753630 +0200 +++ /var/tmp/diff_new_pack.zR3xMp/_new 2026-07-01 16:50:24.161753907 +0200 @@ -3,6 +3,6 @@ <param name="url">https://github.com/chainguard-dev/melange</param> <param name="changesrevision">3f6115b820985d70ca3c93cdf8519c1b3b4cfe81</param></service><service name="tar_scm"> <param name="url">https://github.com/chainguard-dev/melange.git</param> - <param name="changesrevision">7fb1d6a354f948af3bb51e276f360edd8be7d4eb</param></service></servicedata> + <param name="changesrevision">ef24ddfc4e1a3d055e4fc39359e8110bc83f1b7d</param></service></servicedata> (No newline at EOF) ++++++ melange-0.54.0.obscpio -> melange-0.55.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipeline.go new/melange-0.55.0/pkg/build/pipeline.go --- old/melange-0.54.0/pkg/build/pipeline.go 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipeline.go 2026-06-23 22:18:03.000000000 +0200 @@ -40,15 +40,26 @@ func (sm *SubstitutionMap) MutateWith(with map[string]string) (map[string]string, error) { nw := maps.Clone(sm.Substitutions) + // Seed the parent's inherited "${{...}}" entries first, then this pipeline's + // own plain inputs, resolving each against the parent so a forwarded self-ref + // (`foo: ${{inputs.foo}}`) takes the parent value and the input then wins. for k, v := range with { - // already mutated? if strings.HasPrefix(k, "${{") { nw[k] = v - } else { - nk := fmt.Sprintf("${{inputs.%s}}", k) - nw[nk] = v } } + for k, v := range with { + if strings.HasPrefix(k, "${{") { + continue + } + nk := fmt.Sprintf("${{inputs.%s}}", k) + // Resolve against the parent scope; keep raw if not yet in scope (a + // sibling input) — the mutation loop below resolves it. + if rv, err := util.MutateStringFromMap(nw, v); err == nil { + v = rv + } + nw[nk] = v + } // do the actual mutations for k, v := range nw { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipeline_test.go new/melange-0.55.0/pkg/build/pipeline_test.go --- old/melange-0.54.0/pkg/build/pipeline_test.go 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipeline_test.go 2026-06-23 22:18:03.000000000 +0200 @@ -15,6 +15,7 @@ package build import ( + "maps" "os" "path/filepath" "testing" @@ -107,6 +108,170 @@ } } +// Regression: a nested `uses:` that forwards a same-named input (compile.go +// merges the parent's resolved "${{inputs.X}}" with the child's own "X") must +// resolve deterministically regardless of Go's random map order. +func Test_MutateWith_ForwardedSameNamedInput(t *testing.T) { + sm := &SubstitutionMap{Substitutions: map[string]string{}} + + for _, tc := range []struct { + name string + with map[string]string + wants map[string]string // key -> expected resolved value + }{{ + name: "forwarded self-reference resolves to parent value", + with: map[string]string{ + "${{inputs.admin-password}}": "adminpw", // inherited from parent + "admin-password": "${{inputs.admin-password}}", // forwarded down + }, + wants: map[string]string{"${{inputs.admin-password}}": "adminpw"}, + }, { + name: "literal override wins over inherited value", + with: map[string]string{ + "${{inputs.admin-password}}": "adminpw", + "admin-password": "literalsecret", + }, + wants: map[string]string{"${{inputs.admin-password}}": "literalsecret"}, + }, { + name: "child default wins over inherited parent value", + with: map[string]string{ + "${{inputs.tls-cert-dir}}": "/tmp/tls", // parent's value + "tls-cert-dir": "", // child's default (validateWith filled it) + }, + wants: map[string]string{"${{inputs.tls-cert-dir}}": ""}, + }, { + name: "plain input with no collision resolves normally", + with: map[string]string{"foo": "bar"}, + wants: map[string]string{"${{inputs.foo}}": "bar"}, + }, { + // Order-independence here comes from the final mutation loop + // re-resolving every entry, not from the input-loop order. + name: "sibling reference resolves regardless of order", + with: map[string]string{ + "a": "${{inputs.b}}", + "b": "bee", + }, + wants: map[string]string{ + "${{inputs.a}}": "bee", + "${{inputs.b}}": "bee", + }, + }, { + name: "multiple forwarded inputs all resolve to parent values", + with: map[string]string{ + "${{inputs.password}}": "pw", + "password": "${{inputs.password}}", + "${{inputs.cert-dir}}": "/d", + "cert-dir": "${{inputs.cert-dir}}", + }, + wants: map[string]string{ + "${{inputs.password}}": "pw", + "${{inputs.cert-dir}}": "/d", + }, + }} { + t.Run(tc.name, func(t *testing.T) { + // Run many times to defeat randomized map iteration order. + for i := range 1000 { + got, err := sm.MutateWith(tc.with) + if err != nil { + t.Fatalf("MutateWith: %v", err) + } + for k, want := range tc.wants { + if v := got[k]; v != want { + t.Fatalf("iter %d: %s: got %q, want %q", i, k, v, want) + } + } + } + }) + } +} + +// Forwarding the same-named input down many levels must keep resolving to the +// top value at any depth (each level passes a fully-resolved map to the next). +func Test_MutateWith_DeepForwarding(t *testing.T) { + sm := &SubstitutionMap{Substitutions: map[string]string{}} + for i := range 1000 { + // Top level: the input takes its real value. + m, err := sm.MutateWith(map[string]string{"admin-password": "adminpw"}) + if err != nil { + t.Fatalf("iter %d top: %v", i, err) + } + // Each deeper level inherits the parent's resolved map and forwards the + // same-named input (the self-referential `X: ${{inputs.X}}`). + for lvl := 1; lvl <= 5; lvl++ { + child := maps.Clone(m) + child["admin-password"] = "${{inputs.admin-password}}" + m, err = sm.MutateWith(child) + if err != nil { + t.Fatalf("iter %d level %d: %v", i, lvl, err) + } + } + if v := m["${{inputs.admin-password}}"]; v != "adminpw" { + t.Fatalf("iter %d: 6-level forwarded value = %q, want %q", i, v, "adminpw") + } + } +} + +// Functional: compile a 3-level nested `uses:` (parent->child->grandchild) that +// forwards a same-named input down to a `runs:` block. Pre-fix this +// intermittently failed stripComments with "invalid parameter name". +func Test_CompilePipelines_NestedForwardedInput(t *testing.T) { + ctx := slogtest.Context(t) + dir := t.TempDir() + write := func(name, body string) { + t.Helper() + require.NoError(t, os.WriteFile(filepath.Join(dir, name), []byte(body), 0o644)) + } + write("parent.yaml", ` +inputs: + password: + default: defaultpw +pipeline: + - uses: child + with: + password: ${{inputs.password}} +`) + write("child.yaml", ` +inputs: + password: + default: childdefault +pipeline: + - uses: grandchild + with: + password: ${{inputs.password}} +`) + write("grandchild.yaml", ` +inputs: + password: + default: grandchilddefault +pipeline: + - runs: | + echo "pw=${{inputs.password}}" +`) + + // repeats is an iteration count (NOT nesting depth); the pre-fix bug was + // intermittent (random map order), so repeat to fail reliably. + const repeats = 200 + for i := range repeats { + cfg := config.Configuration{ + Package: config.Package{Name: "foo", Version: "1.2.3"}, + Pipeline: []config.Pipeline{{ + Uses: "parent", + With: map[string]string{"password": "topsecret"}, + }}, + } + c := &Compiled{PipelineDirs: []string{dir}} + sm, err := NewSubstitutionMap(&cfg, "", "", nil) + require.NoError(t, err) + + require.NoError(t, c.CompilePipelines(ctx, sm, cfg.Pipeline), "iter %d", i) + + // parent -> child -> grandchild -> runs step + runs := cfg.Pipeline[0].Pipeline[0].Pipeline[0].Pipeline[0].Runs + require.Contains(t, runs, "pw=topsecret", "iter %d: runs=%q", i, runs) + require.NotContains(t, runs, "${{", "iter %d: unresolved template in runs=%q", i, runs) + } +} + func Test_substitutionNeedPackages(t *testing.T) { ctx := slogtest.Context(t) pkg := config.Package{ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipelines/autoconf/README.md new/melange-0.55.0/pkg/build/pipelines/autoconf/README.md --- old/melange-0.54.0/pkg/build/pipelines/autoconf/README.md 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipelines/autoconf/README.md 2026-06-23 22:18:03.000000000 +0200 @@ -29,6 +29,7 @@ | ---- | -------- | ----------- | ------- | | dir | false | The directory containing the Makefile. | . | | opts | false | Options to pass to the make command. | | +| targets | false | Makefile install targets, space-separated. | install | ## autoconf/make @@ -40,6 +41,7 @@ | ---- | -------- | ----------- | ------- | | dir | false | The directory containing the Makefile. | . | | opts | false | Options to pass to the make command. | | +| targets | false | Makefile targets to build, space-separated. | | <!-- end:pipeline-reference-gen --> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipelines/autoconf/make-install.yaml new/melange-0.55.0/pkg/build/pipelines/autoconf/make-install.yaml --- old/melange-0.54.0/pkg/build/pipelines/autoconf/make-install.yaml 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipelines/autoconf/make-install.yaml 2026-06-23 22:18:03.000000000 +0200 @@ -11,13 +11,18 @@ Options to pass to the make command. default: '' + targets: + description: | + Makefile install targets, space-separated. + default: "install" + needs: packages: - make pipeline: - runs: | - make -C "${{inputs.dir}}" install DESTDIR="${{targets.contextdir}}" V=1 ${{inputs.opts}} + make -C "${{inputs.dir}}" ${{inputs.targets}} DESTDIR="${{targets.contextdir}}" V=1 ${{inputs.opts}} # Delete all GNU libtool metadata files. These things are the bane of a # packager's existence: they contain useless metadata, cause overlinking and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipelines/autoconf/make.yaml new/melange-0.55.0/pkg/build/pipelines/autoconf/make.yaml --- old/melange-0.54.0/pkg/build/pipelines/autoconf/make.yaml 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipelines/autoconf/make.yaml 2026-06-23 22:18:03.000000000 +0200 @@ -11,10 +11,15 @@ Options to pass to the make command. default: '' + targets: + description: | + Makefile targets to build, space-separated. + default: '' + needs: packages: - make pipeline: - runs: | - make -C "${{inputs.dir}}" -j$(nproc) V=1 ${{inputs.opts}} + make -C "${{inputs.dir}}" -j$(nproc) V=1 ${{inputs.opts}} ${{inputs.targets}} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipelines/split/README.md new/melange-0.55.0/pkg/build/pipelines/split/README.md --- old/melange-0.54.0/pkg/build/pipelines/split/README.md 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipelines/split/README.md 2026-06-23 22:18:03.000000000 +0200 @@ -51,6 +51,7 @@ | Name | Required | Description | Default | | ---- | -------- | ----------- | ------- | | package | false | The package to split development files from | | +| prefix | false | The package's installation prefix | /usr | ## split/infodir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/melange-0.54.0/pkg/build/pipelines/split/dev.yaml new/melange-0.55.0/pkg/build/pipelines/split/dev.yaml --- old/melange-0.54.0/pkg/build/pipelines/split/dev.yaml 2026-06-17 06:01:16.000000000 +0200 +++ new/melange-0.55.0/pkg/build/pipelines/split/dev.yaml 2026-06-23 22:18:03.000000000 +0200 @@ -9,6 +9,10 @@ description: | The package to split development files from required: false + prefix: + description: | + The package's installation prefix + default: "/usr" pipeline: - runs: | @@ -24,15 +28,23 @@ i= j= cd "$PACKAGE_DIR" || exit 0 - libdirs=usr/ - [ -d lib/ ] && libdirs="lib/ $libdirs" - for i in usr/include usr/lib/pkgconfig usr/share/pkgconfig \ - usr/share/aclocal usr/share/gettext \ - usr/bin/*-config usr/bin/*_config usr/share/vala/vapi \ - usr/share/gir-[0-9]* usr/share/qt*/mkspecs \ - usr/lib/qt*/mkspecs \ - usr/lib/cmake usr/share/cmake \ - usr/lib/glade/modules usr/share/glade/catalogs \ + prefix="${{inputs.prefix}}" + # trim leading / + while [ "${prefix#/}" != "$prefix" ]; do + prefix="${prefix#/}" + done + libdirs="${prefix}/" + if [ "${prefix%%/*}" = "usr" ] && [ -d lib/ ]; then + # usr-merge case + libdirs="lib/ $libdirs" + fi + for i in "${prefix}"/include "${prefix}"/lib/pkgconfig "${prefix}"/share/pkgconfig \ + "${prefix}"/share/aclocal "${prefix}"/share/gettext \ + "${prefix}"/bin/*-config "${prefix}"/bin/*_config "${prefix}"/share/vala/vapi \ + "${prefix}"/share/gir-[0-9]* "${prefix}"/share/qt*/mkspecs \ + "${prefix}"/lib/qt*/mkspecs \ + "${prefix}"/lib/cmake "${prefix}"/share/cmake \ + "${prefix}"/lib/glade/modules "${prefix}"/share/glade/catalogs \ $(find . -name include -type d) \ $(find $libdirs -name '*.a' 2>/dev/null) \ $(find $libdirs -name '*.[cho]' \ @@ -46,9 +58,22 @@ done # move *.so links needed when linking the apps to -dev packages - for i in lib/*.so usr/lib/*.so; do - if [ -L "$i" ]; then - mkdir -p "${{targets.contextdir}}"/"${i%/*}" - mv "$i" "${{targets.contextdir}}/$i" || return 1 - fi + sodirs="$prefix/lib" + # Special case: if the prefix dir is */usr, then search + # for .so files in */lib in addition to */usr/lib + case "$prefix" in + usr) + sodirs="lib $sodirs" + ;; + */usr) + sodirs="${prefix%/*}/lib $sodirs" + ;; + esac + for sodir in $sodirs; do + for i in "$sodir"/*.so; do + if [ -L "$i" ]; then + mkdir -p "${{targets.contextdir}}"/"${i%/*}" + mv "$i" "${{targets.contextdir}}/$i" || return 1 + fi + done done ++++++ melange.obsinfo ++++++ --- /var/tmp/diff_new_pack.zR3xMp/_old 2026-07-01 16:50:26.585837923 +0200 +++ /var/tmp/diff_new_pack.zR3xMp/_new 2026-07-01 16:50:26.589838062 +0200 @@ -1,5 +1,5 @@ name: melange -version: 0.54.0 -mtime: 1781668876 -commit: 7fb1d6a354f948af3bb51e276f360edd8be7d4eb +version: 0.55.0 +mtime: 1782245883 +commit: ef24ddfc4e1a3d055e4fc39359e8110bc83f1b7d ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/melange/vendor.tar.gz /work/SRC/openSUSE:Factory/.melange.new.11887/vendor.tar.gz differ: char 36, line 1
