Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/toolbox.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ distribution for creating containers. If the host is not supported, then it
falls back to a Fedora image. Supported host operating systems are:

* Arch Linux
* Fedora
* Fedora Linux
* Fedora ELN
* Red Hat Enterprise Linux >= 8.5
* Ubuntu

Expand All @@ -68,6 +69,7 @@ specifies its version. Supported combinations are:
Distro |Release
-------|----------
arch |latest or rolling
eln |latest
fedora |\<release\> or f\<release\> eg., 36 or f36
rhel |\<major\>.\<minor\> eg., 8.5
ubuntu |\<YY\>.\<MM\> eg., 22.04
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ sources = files(
'pkg/term/term_test.go',
'pkg/utils/libsubid-wrappers.c',
'pkg/utils/arch.go',
'pkg/utils/eln.go',
'pkg/utils/errors.go',
'pkg/utils/fedora.go',
'pkg/utils/rhel.go',
Expand Down
39 changes: 39 additions & 0 deletions src/pkg/utils/eln.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright © 2021 – 2026 Red Hat Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package utils

func getDefaultReleaseELN() (string, error) {
return "latest", nil
}

func getFullyQualifiedImageELN(image, release string) string {
imageFull := "quay.io/fedora/" + image
return imageFull
}

func getP11KitClientPathsELN() []string {
paths := []string{"/usr/lib64/pkcs11/p11-kit-client.so"}
return paths
}

func parseReleaseELN(release string) (string, error) {
if release != "latest" && release != "" {
return "", &ParseReleaseError{"The release must be 'latest'."}
}

return "latest", nil
}
9 changes: 9 additions & 0 deletions src/pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ var (
getP11KitClientPathsArch,
parseReleaseArch,
},
"eln": {
Comment thread
yselkowitz marked this conversation as resolved.
"eln-toolbox",
"eln-toolbox",
false,
getDefaultReleaseELN,
getFullyQualifiedImageELN,
getP11KitClientPathsELN,
parseReleaseELN,
},
"fedora": {
"fedora-toolbox",
"fedora-toolbox",
Expand Down
15 changes: 15 additions & 0 deletions src/pkg/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ func TestParseRelease(t *testing.T) {
inputRelease: "foo",
errMsg: "The release must be 'latest'.",
},
{
inputDistro: "eln",
inputRelease: "",
output: "latest",
},
{
inputDistro: "eln",
inputRelease: "latest",
output: "latest",
},
{
inputDistro: "eln",
inputRelease: "11",
errMsg: "The release must be 'latest'.",
},
{
inputDistro: "fedora",
inputRelease: "f34",
Expand Down