Skip to content

Commit

Permalink
Merge pull request #1326 from gibmat/make-revert-library-shared
Browse files Browse the repository at this point in the history
Make revert library shared
  • Loading branch information
stgraber authored Oct 21, 2024
2 parents dcca3fa + 1d8f4e7 commit dcc093a
Show file tree
Hide file tree
Showing 91 changed files with 90 additions and 90 deletions.
2 changes: 1 addition & 1 deletion cmd/incus-agent/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"sync"

"github.com/lxc/incus/v6/internal/linux"
"github.com/lxc/incus/v6/internal/revert"
deviceConfig "github.com/lxc/incus/v6/internal/server/device/config"
"github.com/lxc/incus/v6/internal/server/ip"
"github.com/lxc/incus/v6/internal/server/util"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incus-migrate/main_migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/lxc/incus/v6/client"
cli "github.com/lxc/incus/v6/internal/cmd"
"github.com/lxc/incus/v6/internal/linux"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/version"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/archive"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
"github.com/lxc/incus/v6/shared/units"
"github.com/lxc/incus/v6/shared/util"
Expand Down
2 changes: 1 addition & 1 deletion cmd/incus-user/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (

"github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/internal/linux"
"github.com/lxc/incus/v6/internal/revert"
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/idmap"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/subprocess"
localtls "github.com/lxc/incus/v6/shared/tls"
"github.com/lxc/incus/v6/shared/util"
Expand Down
2 changes: 1 addition & 1 deletion cmd/incus/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/internal/i18n"
"github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/shared/api"
config "github.com/lxc/incus/v6/shared/cliconfig"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/termios"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/api_1.0.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"strings"

"github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/auth/oidc"
"github.com/lxc/incus/v6/internal/server/cluster"
Expand All @@ -28,6 +27,7 @@ import (
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/api_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"github.com/lxc/incus/v6/client"
internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/certificate"
"github.com/lxc/incus/v6/internal/server/cluster"
Expand All @@ -43,6 +42,7 @@ import (
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
"github.com/lxc/incus/v6/shared/util"
"github.com/lxc/incus/v6/shared/validate"
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/api_cluster_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os"

"github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/acme"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/cluster"
Expand All @@ -23,6 +22,7 @@ import (
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
"github.com/lxc/incus/v6/shared/util"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/api_cluster_evacuation.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"golang.org/x/sync/errgroup"

"github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/cluster"
"github.com/lxc/incus/v6/internal/server/db"
dbCluster "github.com/lxc/incus/v6/internal/server/db/cluster"
Expand All @@ -35,6 +34,7 @@ import (
apiScriptlet "github.com/lxc/incus/v6/shared/api/scriptlet"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/subprocess"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/api_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/jmap"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/backup"
"github.com/lxc/incus/v6/internal/server/db"
Expand All @@ -43,6 +42,7 @@ import (
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/units"
"github.com/lxc/incus/v6/shared/util"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/api_internal_recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

internalInstance "github.com/lxc/incus/v6/internal/instance"
internalRecover "github.com/lxc/incus/v6/internal/recover"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/backup"
backupConfig "github.com/lxc/incus/v6/internal/server/backup/config"
Expand All @@ -27,6 +26,7 @@ import (
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
)

// Define API endpoints for recover actions.
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"gopkg.in/yaml.v2"

"github.com/lxc/incus/v6/internal/instancewriter"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/backup"
"github.com/lxc/incus/v6/internal/server/db"
dbCluster "github.com/lxc/incus/v6/internal/server/db/cluster"
Expand All @@ -29,6 +28,7 @@ import (
"github.com/lxc/incus/v6/shared/idmap"
"github.com/lxc/incus/v6/shared/ioprogress"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/units"
"github.com/lxc/incus/v6/shared/util"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (

internalIO "github.com/lxc/incus/v6/internal/io"
"github.com/lxc/incus/v6/internal/linux"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/rsync"
"github.com/lxc/incus/v6/internal/server/acme"
"github.com/lxc/incus/v6/internal/server/apparmor"
Expand Down Expand Up @@ -80,6 +79,7 @@ import (
"github.com/lxc/incus/v6/shared/idmap"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/proxy"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
"github.com/lxc/incus/v6/shared/util"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
ociSpecs "github.com/opencontainers/runtime-spec/specs-go"

internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/cluster"
"github.com/lxc/incus/v6/internal/server/db"
dbCluster "github.com/lxc/incus/v6/internal/server/db/cluster"
Expand All @@ -31,6 +30,7 @@ import (
"github.com/lxc/incus/v6/internal/server/task"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/instance_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ import (
"github.com/pkg/sftp"

internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/instance"
"github.com/lxc/incus/v6/internal/server/lifecycle"
"github.com/lxc/incus/v6/internal/server/request"
"github.com/lxc/incus/v6/internal/server/response"
"github.com/lxc/incus/v6/internal/server/state"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
)

func instanceFileHandler(d *Daemon, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/instance_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/gorilla/mux"

internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/instance"
"github.com/lxc/incus/v6/internal/server/lifecycle"
Expand All @@ -21,6 +20,7 @@ import (
"github.com/lxc/incus/v6/internal/server/storage"
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/internal/version"
"github.com/lxc/incus/v6/shared/revert"
)

var instanceLogCmd = APIEndpoint{
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/instance_put.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/gorilla/mux"

internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/db"
"github.com/lxc/incus/v6/internal/server/db/cluster"
"github.com/lxc/incus/v6/internal/server/db/operationtype"
Expand All @@ -26,6 +25,7 @@ import (
"github.com/lxc/incus/v6/internal/version"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
)

// swagger:operation PUT /1.0/instances/{name} instances instance_put
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/instances_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/gorilla/websocket"

internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/backup"
"github.com/lxc/incus/v6/internal/server/cluster"
"github.com/lxc/incus/v6/internal/server/db"
Expand All @@ -39,6 +38,7 @@ import (
"github.com/lxc/incus/v6/shared/archive"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/osarch"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/main_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"github.com/lxc/incus/v6/client"
cli "github.com/lxc/incus/v6/internal/cmd"
"github.com/lxc/incus/v6/internal/ports"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/cluster"
"github.com/lxc/incus/v6/internal/server/db"
"github.com/lxc/incus/v6/internal/server/node"
"github.com/lxc/incus/v6/internal/server/sys"
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/termios"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/gorilla/mux"

"github.com/lxc/incus/v6/client"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/cluster"
clusterRequest "github.com/lxc/incus/v6/internal/server/cluster/request"
Expand All @@ -38,6 +37,7 @@ import (
"github.com/lxc/incus/v6/internal/version"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"strings"
"time"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/backup"
"github.com/lxc/incus/v6/internal/server/certificate"
"github.com/lxc/incus/v6/internal/server/cluster"
Expand All @@ -28,6 +27,7 @@ import (
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/subprocess"
"github.com/lxc/incus/v6/shared/util"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/storage_buckets.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/gorilla/mux"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/backup"
"github.com/lxc/incus/v6/internal/server/db"
Expand All @@ -29,6 +28,7 @@ import (
"github.com/lxc/incus/v6/internal/version"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
"github.com/lxc/incus/v6/shared/util"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/storage_pools_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"fmt"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/cluster/request"
"github.com/lxc/incus/v6/internal/server/db"
"github.com/lxc/incus/v6/internal/server/state"
storagePools "github.com/lxc/incus/v6/internal/server/storage"
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
)

// storagePoolDBCreate creates a storage pool DB entry and returns the created Pool ID.
Expand Down
2 changes: 1 addition & 1 deletion cmd/incusd/storage_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/lxc/incus/v6/internal/filter"
internalInstance "github.com/lxc/incus/v6/internal/instance"
internalIO "github.com/lxc/incus/v6/internal/io"
"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/backup"
"github.com/lxc/incus/v6/internal/server/cluster"
Expand All @@ -43,6 +42,7 @@ import (
"github.com/lxc/incus/v6/shared/api"
"github.com/lxc/incus/v6/shared/archive"
"github.com/lxc/incus/v6/shared/logger"
"github.com/lxc/incus/v6/shared/revert"
localtls "github.com/lxc/incus/v6/shared/tls"
"github.com/lxc/incus/v6/shared/util"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/linux/memfd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"golang.org/x/sys/unix"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/shared/revert"
)

// CreateMemfd creates a new memfd for the provided byte slice.
Expand Down
2 changes: 1 addition & 1 deletion internal/linux/pty.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"golang.org/x/sys/unix"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/shared/revert"
)

// OpenPtyInDevpts creates a new PTS pair, configures them and returns them.
Expand Down
2 changes: 1 addition & 1 deletion internal/server/apparmor/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/google/uuid"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/sys"
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/shared/revert"
)

var archiveProfileTpl = template.Must(template.New("archiveProfile").Parse(`#include <tunables/global>
Expand Down
2 changes: 1 addition & 1 deletion internal/server/apparmor/rsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/google/uuid"

"github.com/lxc/incus/v6/internal/revert"
"github.com/lxc/incus/v6/internal/server/sys"
internalUtil "github.com/lxc/incus/v6/internal/util"
"github.com/lxc/incus/v6/shared/revert"
)

var rsyncProfileTpl = template.Must(template.New("rsyncProfile").Parse(`#include <tunables/global>
Expand Down
Loading

0 comments on commit dcc093a

Please sign in to comment.