[gnome-build-meta/valentindavid/toolbox-gnome-sdk: 2/2] toolbox: Use gnome-sdk as default image




commit 18f1206ff23c76d53722551b150a38031c59ce26
Author: Valentin David <me valentindavid com>
Date:   Wed Oct 13 14:36:48 2021 +0200

    toolbox: Use gnome-sdk as default image

 elements/vm/toolbox.bst                  |  2 ++
 files/toolbox/gnome-sdk-as-default.patch | 55 ++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
---
diff --git a/elements/vm/toolbox.bst b/elements/vm/toolbox.bst
index 2a0476ce1..a773e1bf9 100644
--- a/elements/vm/toolbox.bst
+++ b/elements/vm/toolbox.bst
@@ -85,6 +85,8 @@ sources:
   directory: 'src/vendor/golang.org/x/sys'
 - kind: patch
   path: files/toolbox/riscv.patch
+- kind: patch
+  path: files/toolbox/gnome-sdk-as-default.patch
 
 build-depends:
 - freedesktop-sdk.bst:components/systemd.bst
diff --git a/files/toolbox/gnome-sdk-as-default.patch b/files/toolbox/gnome-sdk-as-default.patch
new file mode 100644
index 000000000..9875010b4
--- /dev/null
+++ b/files/toolbox/gnome-sdk-as-default.patch
@@ -0,0 +1,55 @@
+diff --git a/src/pkg/utils/utils.go b/src/pkg/utils/utils.go
+index b6eecb2..34e2a33 100644
+--- a/src/pkg/utils/utils.go
++++ b/src/pkg/utils/utils.go
+@@ -52,7 +52,7 @@ type Distro struct {
+ 
+ const (
+       idTruncLength          = 12
+-      releaseDefaultFallback = "33"
++      releaseDefaultFallback = "master"
+ )
+ 
+ const (
+@@ -62,7 +62,7 @@ const (
+ )
+ 
+ var (
+-      distroDefault = "fedora"
++      distroDefault = "gnome"
+ 
+       preservedEnvironmentVariables = []string{
+               "COLORTERM",
+@@ -109,12 +109,20 @@ var (
+                       "ubi8",
+                       false,
+               },
++                "gnome": {
++                        "gnome-toolbox",
++                        "gnome-sdk",
++                        parseReleaseGNOME,
++                        "registry.gitlab.gnome.org",
++                        "GNOME/gnome-build-meta",
++                        false,
++                },
+       }
+ )
+ 
+ var (
+       ContainerNameDefault       string
+-      ContainerNamePrefixDefault = "fedora-toolbox"
++      ContainerNamePrefixDefault = "gnome-toolbox"
+ )
+ 
+ func init() {
+@@ -616,6 +624,10 @@ func parseReleaseFedora(str string) (string, error) {
+       return release, nil
+ }
+ 
++func parseReleaseGNOME(release string) (string, error) {
++        return release, nil
++}
++
+ func parseReleaseRHEL(str string) (string, error) {
+       if i := strings.IndexRune(str, '.'); i == -1 {
+               return "", errors.New("release must have a '.'")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]