diff options
Diffstat (limited to 'internal/rosa/rosa.go')
| -rw-r--r-- | internal/rosa/rosa.go | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go index ac6648ab..83bf316b 100644 --- a/internal/rosa/rosa.go +++ b/internal/rosa/rosa.go @@ -60,6 +60,8 @@ var ( AbsSource = fhs.AbsRoot.Append("source") // AbsExtra holds extra files provided to a packaging container. AbsExtra = fhs.AbsRoot.Append("extra") + // AbsNet holds the output of [PackageAttr.Net]. + AbsNet = fhs.AbsRoot.Append("net") ) // TargetError is an unsupported target architecture name. @@ -375,6 +377,11 @@ type PackageAttr struct { // Whether to create [pkg.KindExecNet] instead of [pkg.KindExec]. HostNet bool + // Runs in a [pkg.KindExecNet] artifact if non-empty. + Net string + // Outcome of Net. + NetChecksum pkg.Checksum + // Whether cross-compilation is broken. RejectCross bool // Whether the [Helper] behaves identically across all architectures. @@ -719,6 +726,35 @@ export \ srn += "-cross-" + _arch } + if attr.Net != "" { + paths = append(paths, pkg.Path(AbsNet, true, t.New( + name+"-net", version, source, &PackageAttr{ + KnownChecksum: &attr.NetChecksum, + Writable: true, + Chmod: true, + EnterSource: true, + Env: attr.Env, + Patches: attr.Patches, + Bin: attr.Bin, + NoToolchain: attr.NoToolchain, + HostNet: true, + NoArch: true, + Extra: attr.Extra, + + Paths: slices.Concat(attr.Paths, []pkg.ExecPath{ + resolvconf(), + }), + Tools: slices.Concat(attr.Tools, P{ + _nssCACert, + }), + }, &GenericHelper{ + InPlace: true, + Install: "chmod +w /etc && ln -s .." + Prefix + "/etc/ssl /etc\n" + + attr.Net, + }, + ))) + } + return pkg.NewExec( srn, arch, attr.KnownChecksum, pkg.ExecTimeoutMax, attr.HostNet, |
