From 85ff2d3a60a578e43c225833fa0d3cacc5339d3c Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Thu, 15 Apr 2021 06:41:12 +0200 Subject: [PATCH] Change go.mod path to Github --- go.mod | 2 +- internal/data/process.go | 2 +- internal/directives/add.go | 7 ++++--- internal/directives/delete.go | 5 +++-- internal/directives/directives.go | 7 ++++--- internal/directives/lookaside.go | 7 ++++--- internal/directives/patch.go | 7 ++++--- internal/directives/replace.go | 7 ++++--- internal/directives/spec_change.go | 7 ++++--- internal/git.go | 15 ++++++++------- internal/patch.go | 21 +++++++++++---------- internal/process.go | 15 ++++++++------- internal/srpm.go | 13 +++++++------ pb/cfg.pb.go | 11 +++++------ proto/cfg.proto | 2 +- 15 files changed, 69 insertions(+), 59 deletions(-) diff --git a/go.mod b/go.mod index c619f26..878295f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.rockylinux.org/release-engineering/public/srpmproc +module github.com/rocky-linux/srpmproc go 1.15 diff --git a/internal/data/process.go b/internal/data/process.go index c4366bc..26b637a 100644 --- a/internal/data/process.go +++ b/internal/data/process.go @@ -21,9 +21,9 @@ package data import ( - "git.rockylinux.org/release-engineering/public/srpmproc/internal/blob" "github.com/go-git/go-billy/v5" "github.com/go-git/go-git/v5/plumbing/transport/ssh" + "github.com/rocky-linux/srpmproc/internal/blob" ) type ProcessData struct { diff --git a/internal/directives/add.go b/internal/directives/add.go index 8934c7b..9225456 100644 --- a/internal/directives/add.go +++ b/internal/directives/add.go @@ -23,12 +23,13 @@ package directives import ( "errors" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" - "github.com/go-git/go-git/v5" "io/ioutil" "os" "path/filepath" + + "github.com/go-git/go-git/v5" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) // returns right if not empty, else left diff --git a/internal/directives/delete.go b/internal/directives/delete.go index 3e761e3..d2a5223 100644 --- a/internal/directives/delete.go +++ b/internal/directives/delete.go @@ -23,9 +23,10 @@ package directives import ( "errors" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" + "github.com/go-git/go-git/v5" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) func del(cfg *srpmprocpb.Cfg, _ *data.ProcessData, _ *data.ModeData, _ *git.Worktree, pushTree *git.Worktree) error { diff --git a/internal/directives/directives.go b/internal/directives/directives.go index 49fd89f..f369f4f 100644 --- a/internal/directives/directives.go +++ b/internal/directives/directives.go @@ -22,13 +22,14 @@ package directives import ( "encoding/json" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" - "github.com/go-git/go-git/v5" "log" "os" "path/filepath" "strings" + + "github.com/go-git/go-git/v5" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) func checkAddPrefix(file string) string { diff --git a/internal/directives/lookaside.go b/internal/directives/lookaside.go index c40c5a6..7d63443 100644 --- a/internal/directives/lookaside.go +++ b/internal/directives/lookaside.go @@ -27,13 +27,14 @@ import ( "crypto/sha256" "errors" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" - "github.com/go-git/go-git/v5" "io/ioutil" "os" "path/filepath" "time" + + "github.com/go-git/go-git/v5" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) func lookaside(cfg *srpmprocpb.Cfg, _ *data.ProcessData, md *data.ModeData, patchTree *git.Worktree, pushTree *git.Worktree) error { diff --git a/internal/directives/patch.go b/internal/directives/patch.go index dd77b82..a564c04 100644 --- a/internal/directives/patch.go +++ b/internal/directives/patch.go @@ -24,11 +24,12 @@ import ( "bytes" "errors" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" + "log" + "github.com/bluekeyes/go-gitdiff/gitdiff" "github.com/go-git/go-git/v5" - "log" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) func patch(cfg *srpmprocpb.Cfg, _ *data.ProcessData, _ *data.ModeData, patchTree *git.Worktree, pushTree *git.Worktree) error { diff --git a/internal/directives/replace.go b/internal/directives/replace.go index cf2a7ea..c93e684 100644 --- a/internal/directives/replace.go +++ b/internal/directives/replace.go @@ -23,11 +23,12 @@ package directives import ( "errors" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" - "github.com/go-git/go-git/v5" "io/ioutil" "os" + + "github.com/go-git/go-git/v5" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) func replace(cfg *srpmprocpb.Cfg, pd *data.ProcessData, _ *data.ModeData, patchTree *git.Worktree, pushTree *git.Worktree) error { diff --git a/internal/directives/spec_change.go b/internal/directives/spec_change.go index 0b5e6e9..2cc84fb 100644 --- a/internal/directives/spec_change.go +++ b/internal/directives/spec_change.go @@ -23,9 +23,6 @@ package directives import ( "errors" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" - "github.com/go-git/go-git/v5" "io/ioutil" "math" "os" @@ -34,6 +31,10 @@ import ( "strconv" "strings" "time" + + "github.com/go-git/go-git/v5" + "github.com/rocky-linux/srpmproc/internal/data" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" ) const ( diff --git a/internal/git.go b/internal/git.go index 52a4c59..9471f01 100644 --- a/internal/git.go +++ b/internal/git.go @@ -22,13 +22,6 @@ package internal import ( "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - "github.com/go-git/go-billy/v5/memfs" - "github.com/go-git/go-git/v5" - "github.com/go-git/go-git/v5/config" - "github.com/go-git/go-git/v5/plumbing" - "github.com/go-git/go-git/v5/plumbing/object" - "github.com/go-git/go-git/v5/storage/memory" "io/ioutil" "log" "net/http" @@ -36,6 +29,14 @@ import ( "sort" "strings" "time" + + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/config" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" + "github.com/go-git/go-git/v5/storage/memory" + "github.com/rocky-linux/srpmproc/internal/data" ) type remoteTarget struct { diff --git a/internal/patch.go b/internal/patch.go index 3312499..d71f706 100644 --- a/internal/patch.go +++ b/internal/patch.go @@ -22,21 +22,22 @@ package internal import ( "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/directives" - "git.rockylinux.org/release-engineering/public/srpmproc/modulemd" - srpmprocpb "git.rockylinux.org/release-engineering/public/srpmproc/pb" - "github.com/go-git/go-billy/v5/memfs" - "github.com/go-git/go-git/v5" - "github.com/go-git/go-git/v5/config" - "github.com/go-git/go-git/v5/plumbing" - "github.com/go-git/go-git/v5/storage/memory" - "google.golang.org/protobuf/encoding/prototext" "io/ioutil" "log" "path/filepath" "strings" "time" + + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/config" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/storage/memory" + "github.com/rocky-linux/srpmproc/internal/data" + "github.com/rocky-linux/srpmproc/internal/directives" + "github.com/rocky-linux/srpmproc/modulemd" + srpmprocpb "github.com/rocky-linux/srpmproc/pb" + "google.golang.org/protobuf/encoding/prototext" ) func cfgPatches(pd *data.ProcessData, md *data.ModeData, patchTree *git.Worktree, pushTree *git.Worktree) { diff --git a/internal/process.go b/internal/process.go index 977fba5..8b5593c 100644 --- a/internal/process.go +++ b/internal/process.go @@ -24,13 +24,6 @@ import ( "encoding/hex" "encoding/json" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - "github.com/go-git/go-billy/v5/memfs" - "github.com/go-git/go-git/v5" - "github.com/go-git/go-git/v5/config" - "github.com/go-git/go-git/v5/plumbing" - "github.com/go-git/go-git/v5/plumbing/object" - "github.com/go-git/go-git/v5/storage/memory" "io/ioutil" "log" "os" @@ -38,6 +31,14 @@ import ( "regexp" "strings" "time" + + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/config" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" + "github.com/go-git/go-git/v5/storage/memory" + "github.com/rocky-linux/srpmproc/internal/data" ) var tagImportRegex *regexp.Regexp diff --git a/internal/srpm.go b/internal/srpm.go index 02aa9a9..2066554 100644 --- a/internal/srpm.go +++ b/internal/srpm.go @@ -24,12 +24,6 @@ import ( "bytes" "crypto/sha256" "fmt" - "git.rockylinux.org/release-engineering/public/srpmproc/internal/data" - "github.com/cavaliercoder/go-cpio" - "github.com/cavaliercoder/go-rpm" - "github.com/go-git/go-billy/v5/memfs" - "github.com/go-git/go-git/v5" - "github.com/go-git/go-git/v5/storage/memory" "io" "io/ioutil" "log" @@ -37,6 +31,13 @@ import ( "os/exec" "path/filepath" "strings" + + "github.com/cavaliercoder/go-cpio" + "github.com/cavaliercoder/go-rpm" + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/storage/memory" + "github.com/rocky-linux/srpmproc/internal/data" ) type SrpmMode struct{} diff --git a/pb/cfg.pb.go b/pb/cfg.pb.go index 0a7181b..b3a7dd4 100644 --- a/pb/cfg.pb.go +++ b/pb/cfg.pb.go @@ -1192,12 +1192,11 @@ var file_cfg_proto_rawDesc = []byte{ 0x65, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x73, 0x70, 0x65, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x72, 0x70, 0x6d, 0x70, 0x72, 0x6f, 0x63, 0x2e, 0x50, - 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x42, 0x46, 0x5a, 0x44, 0x67, - 0x69, 0x74, 0x2e, 0x72, 0x6f, 0x63, 0x6b, 0x79, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x65, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x73, 0x72, 0x70, - 0x6d, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x70, 0x62, 0x3b, 0x73, 0x72, 0x70, 0x6d, 0x70, 0x72, 0x6f, - 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x42, 0x2f, 0x5a, 0x2d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x6f, 0x63, 0x6b, 0x79, 0x2d, + 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2f, 0x73, 0x72, 0x70, 0x6d, 0x70, 0x72, 0x6f, 0x63, 0x2f, 0x70, + 0x62, 0x3b, 0x73, 0x72, 0x70, 0x6d, 0x70, 0x72, 0x6f, 0x63, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cfg.proto b/proto/cfg.proto index 05bc4d6..ac8e219 100644 --- a/proto/cfg.proto +++ b/proto/cfg.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "git.rockylinux.org/release-engineering/public/srpmproc/pb;srpmprocpb"; +option go_package = "github.com/rocky-linux/srpmproc/pb;srpmprocpb"; package srpmproc;