Skip to content

Commit 9a99479

Browse files
authored
Merge branch 'main' into fix-example-arch
2 parents 2026896 + 6324e68 commit 9a99479

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

docs/md/melange_build.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ melange build [flags]
6262
--package-append strings extra packages to install for each of the build environments
6363
--persist-lint-results persist lint results to JSON files in packages/{arch}/ directory
6464
--pipeline-dir string directory used to extend defined built-in pipelines
65+
--pipeline-dirs strings directories used to extend defined built-in pipelines
6566
-r, --repository-append strings path to extra repositories to include in the build environment
6667
--rm clean up intermediate artifacts (e.g. container images, temp dirs) (default true)
6768
--runner string which runner to use to enable running commands, default is based on your platform. Options are ["bubblewrap" "docker" "qemu"]

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ require (
3434
github.com/ulikunitz/xz v0.5.15
3535
github.com/yookoala/realpath v1.0.0
3636
github.com/zealic/xignore v0.3.3
37-
go.opentelemetry.io/otel v1.39.0
37+
go.opentelemetry.io/otel v1.40.0
3838
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.39.0
3939
go.opentelemetry.io/otel/sdk v1.39.0
4040
go.yaml.in/yaml/v2 v2.4.3
@@ -163,8 +163,8 @@ require (
163163
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
164164
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
165165
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect
166-
go.opentelemetry.io/otel/metric v1.39.0 // indirect
167-
go.opentelemetry.io/otel/trace v1.39.0 // indirect
166+
go.opentelemetry.io/otel/metric v1.40.0 // indirect
167+
go.opentelemetry.io/otel/trace v1.40.0 // indirect
168168
go.step.sm/crypto v0.76.0 // indirect
169169
golang.org/x/mod v0.31.0 // indirect
170170
golang.org/x/net v0.49.0 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,22 +364,22 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.6
364364
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0/go.mod h1:fvPi2qXDqFs8M4B4fmJhE92TyQs9Ydjlg3RvfUp+NbQ=
365365
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 h1:RbKq8BG0FI8OiXhBfcRtqqHcZcka+gU3cskNuf05R18=
366366
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0/go.mod h1:h06DGIukJOevXaj/xrNjhi/2098RZzcLTbc0jDAUbsg=
367-
go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48=
368-
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
367+
go.opentelemetry.io/otel v1.40.0 h1:oA5YeOcpRTXq6NN7frwmwFR0Cn3RhTVZvXsP4duvCms=
368+
go.opentelemetry.io/otel v1.40.0/go.mod h1:IMb+uXZUKkMXdPddhwAHm6UfOwJyh4ct1ybIlV14J0g=
369369
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0 h1:GqRJVj7UmLjCVyVJ3ZFLdPRmhDUp2zFmQe3RHIOsw24=
370370
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0/go.mod h1:ri3aaHSmCTVYu2AWv44YMauwAQc0aqI9gHKIcSbI1pU=
371371
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 h1:xJ2qHD0C1BeYVTLLR9sX12+Qb95kfeD/byKj6Ky1pXg=
372372
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0/go.mod h1:u5BF1xyjstDowA1R5QAO9JHzqK+ublenEW/dyqTjBVk=
373373
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.39.0 h1:8UPA4IbVZxpsD76ihGOQiFml99GPAEZLohDXvqHdi6U=
374374
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.39.0/go.mod h1:MZ1T/+51uIVKlRzGw1Fo46KEWThjlCBZKl2LzY5nv4g=
375-
go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0=
376-
go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs=
375+
go.opentelemetry.io/otel/metric v1.40.0 h1:rcZe317KPftE2rstWIBitCdVp89A2HqjkxR3c11+p9g=
376+
go.opentelemetry.io/otel/metric v1.40.0/go.mod h1:ib/crwQH7N3r5kfiBZQbwrTge743UDc7DTFVZrrXnqc=
377377
go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18=
378378
go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE=
379379
go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8=
380380
go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew=
381-
go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI=
382-
go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA=
381+
go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZYblVjw=
382+
go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA=
383383
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
384384
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
385385
go.step.sm/crypto v0.76.0 h1:K23BSaeoiY7Y5dvvijTeYC9EduDBetNwQYMBwMhi1aA=

pkg/cli/build.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ func addBuildFlags(fs *pflag.FlagSet, flags *BuildFlags) {
4747
fs.StringVar(&flags.BuildDate, "build-date", "", "date used for the timestamps of the files inside the image")
4848
fs.StringVar(&flags.WorkspaceDir, "workspace-dir", "", "directory used for the workspace at /home/build")
4949
fs.StringVar(&flags.PipelineDir, "pipeline-dir", "", "directory used to extend defined built-in pipelines")
50+
fs.StringSliceVar(&flags.PipelineDirs, "pipeline-dirs", []string{}, "directories used to extend defined built-in pipelines")
5051
fs.StringVar(&flags.SourceDir, "source-dir", "", "directory used for included sources")
5152
fs.StringVar(&flags.CacheDir, "cache-dir", "./melange-cache/", "directory used for cached inputs")
5253
fs.StringVar(&flags.CacheSource, "cache-source", "", "directory or bucket used for preloading the cache")
@@ -97,6 +98,7 @@ type BuildFlags struct {
9798
BuildDate string
9899
WorkspaceDir string
99100
PipelineDir string
101+
PipelineDirs []string
100102
SourceDir string
101103
CacheDir string
102104
CacheSource string
@@ -191,9 +193,9 @@ func (flags *BuildFlags) BuildOptions(ctx context.Context, args ...string) ([]bu
191193
build.WithBuildDate(flags.BuildDate),
192194
build.WithWorkspaceDir(flags.WorkspaceDir),
193195
// Order matters, so add any specified pipelineDir before
194-
// builtin pipelines.
196+
// builtin pipelines. Support both --pipeline-dir (singular, deprecated)
197+
// and --pipeline-dirs (plural, new). --pipeline-dir is processed first.
195198
build.WithPipelineDir(flags.PipelineDir),
196-
build.WithPipelineDir(BuiltinPipelineDir),
197199
build.WithCacheDir(flags.CacheDir),
198200
build.WithCacheSource(flags.CacheSource),
199201
build.WithPackageCacheDir(flags.ApkCacheDir),
@@ -244,6 +246,13 @@ func (flags *BuildFlags) BuildOptions(ctx context.Context, args ...string) ([]bu
244246
opts = append(opts, build.WithSourceDir(flags.SourceDir))
245247
}
246248

249+
// Add multiple pipeline directories from --pipeline-dirs
250+
for i := range flags.PipelineDirs {
251+
opts = append(opts, build.WithPipelineDir(flags.PipelineDirs[i]))
252+
}
253+
// Always append built-in pipeline directory as fallback
254+
opts = append(opts, build.WithPipelineDir(BuiltinPipelineDir))
255+
247256
if auth, ok := os.LookupEnv("HTTP_AUTH"); !ok {
248257
// Fine, no auth.
249258
} else if parts := strings.SplitN(auth, ":", 4); len(parts) != 4 {

0 commit comments

Comments
 (0)