Repository: owncloud/ocis
Pull request #3415 (2022-03-29 07:18:53)

use trimpath and buildmode=pie for binaries
## Description
Drop gox, since it does not allow to set trimpath and buildmode.
Introduce:
- trimpath (for more reproducable builds)
- buidmode=pie https://en.wikipedia.org/wiki/Position-independent_code

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->
- Fixes https://github.com/owncloud/ocis/issues/3411

## Motivation and Context
Simplify packaging for some linux distros

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
- [x] CI
- [x] on Mac M1 by @pascalwengerter 
- [x] on Mac AMD64 by @micbar 
- [ ] on Linux AMD64 by @wkloucek 

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Technical debt
- [ ] Tests only (no source changes)

## Checklist:
<!-- Tick the checkboxes when done. -->
<!-- Raise documentation ticket in owncloud.github.io/ -->
- [ ] Code changes
- [ ] Unit tests added
- [ ] Acceptance tests added
- [ ] Documentation ticket raised: <link> 



Patch:
diff --git a/.bingo/Variables.mk b/.bingo/Variables.mk
index 94c5d9bced2..f442f5340bc 100644
--- a/.bingo/Variables.mk
+++ b/.bingo/Variables.mk
@@ -47,12 +47,6 @@ $(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
 	@echo "(re)installing $(GOBIN)/golangci-lint-v1.43.0"
 	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.43.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
 
-GOX := $(GOBIN)/gox-v1.0.1
-$(GOX): $(BINGO_DIR)/gox.mod
-	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
-	@echo "(re)installing $(GOBIN)/gox-v1.0.1"
-	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=gox.mod -o=$(GOBIN)/gox-v1.0.1 "github.com/mitchellh/gox"
-
 HUGO := $(GOBIN)/hugo-v0.91.0
 $(HUGO): $(BINGO_DIR)/hugo.mod
 	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@@ -106,4 +100,3 @@ $(REFLEX): $(BINGO_DIR)/reflex.mod
 	@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
 	@echo "(re)installing $(GOBIN)/reflex-v0.3.1"
 	@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=reflex.mod -o=$(GOBIN)/reflex-v0.3.1 "github.com/cespare/reflex"
-
diff --git a/.bingo/gox.mod b/.bingo/gox.mod
deleted file mode 100644
index c48c4a9fa34..00000000000
--- a/.bingo/gox.mod
+++ /dev/null
@@ -1,5 +0,0 @@
-module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
-
-go 1.17
-
-require github.com/mitchellh/gox v1.0.1
diff --git a/.bingo/gox.sum b/.bingo/gox.sum
deleted file mode 100644
index 0b5dfc49612..00000000000
--- a/.bingo/gox.sum
+++ /dev/null
@@ -1,6 +0,0 @@
-github.com/hashicorp/go-version v1.0.0 h1:21MVWPKDphxa7ineQQTrCU5brh7OuVVAzGOCnnCPtE8=
-github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI=
-github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4=
-github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
-github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
diff --git a/.bingo/variables.env b/.bingo/variables.env
index b54bcc82b4b..1deb407f41e 100644
--- a/.bingo/variables.env
+++ b/.bingo/variables.env
@@ -18,8 +18,6 @@ CALENS="${GOBIN}/calens-v0.2.0"
 
 GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.43.0"
 
-GOX="${GOBIN}/gox-v1.0.1"
-
 HUGO="${GOBIN}/hugo-v0.91.0"
 
 MOCKERY="${GOBIN}/mockery-v2.9.4"
@@ -37,4 +35,3 @@ PROTOC_GEN_MICROWEB="${GOBIN}/protoc-gen-microweb-v0.0.0-20211219183901-997c02ca
 PROTOC_GEN_OPENAPIV2="${GOBIN}/protoc-gen-openapiv2-v2.7.2"
 
 REFLEX="${GOBIN}/reflex-v0.3.1"
-
diff --git a/.drone.env b/.drone.env
index 00e65a19990..9911e34e3c9 100644
--- a/.drone.env
+++ b/.drone.env
@@ -3,5 +3,5 @@ CORE_COMMITID=df1a1eb2816775fe9c202c50ec8e8a1e01ecb256
 CORE_BRANCH=master
 
 # The test runner source for UI tests
-WEB_COMMITID=80d9bb6962cb034dc861116f59ae25f39fb3a52c
-WEB_BRANCH=no-shares-folder
+WEB_COMMITID=77faf9890974083c0c555fd83586c2448845b11d
+WEB_BRANCH=master
diff --git a/.make/release.mk b/.make/release.mk
index 6f99abec746..4c655230593 100644
--- a/.make/release.mk
+++ b/.make/release.mk
@@ -11,26 +11,118 @@ release-dirs:
 
 # docker specific packaging flags
 DOCKER_LDFLAGS += -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathType=path" -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathValue=/var/lib/ocis"
-release-linux-docker-amd64: $(GOX) release-dirs
-	@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
 
-release-linux-docker-arm: $(GOX) release-dirs
-	@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
+release-linux-docker-amd64: release-dirs
+	GOOS=linux \
+	GOARCH=amd64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
+		./cmd/$(NAME)
 
-release-linux-docker-arm64: $(GOX) release-dirs
-	@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
+release-linux-docker-arm: release-dirs
+	GOOS=linux \
+	GOARCH=arm \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
+		./cmd/$(NAME)
+
+	@# https://github.com/golang/go/issues/50405
+	@# -buildmode=pie not easily doable for arm
+
+release-linux-docker-arm64: release-dirs
+	GOOS=linux \
+	GOARCH=arm64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
+		./cmd/$(NAME)
 
 .PHONY: release-linux
-release-linux: $(GOX) release-dirs
-	@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
+release-linux: release-dirs
+	GOOS=linux \
+	GOARCH=amd64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
+		./cmd/$(NAME)
+
+	GOOS=linux \
+	GOARCH=386 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-386' \
+		./cmd/$(NAME)
+
+	GOOS=linux \
+	GOARCH=arm64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
+		./cmd/$(NAME)
+
+	GOOS=linux \
+	GOARCH=arm \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
+		./cmd/$(NAME)
+
+	@# https://github.com/golang/go/issues/50405
+	@# -buildmode=pie not easily doable for arm
 
 .PHONY: release-windows
-release-windows: $(GOX) release-dirs
-	@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
+release-windows: release-dirs
+	GOOS=windows \
+	GOARCH=amd64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '-extldflags "-static" $(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-windows-amd64' \
+		./cmd/$(NAME)
 
 .PHONY: release-darwin
-release-darwin: $(GOX) release-dirs
-	@$(GOX) -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64 arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
+release-darwin: release-dirs
+	GOOS=darwin \
+	GOARCH=amd64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '$(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-amd64' \
+		./cmd/$(NAME)
+
+	GOOS=darwin \
+	GOARCH=arm64 \
+	go build \
+		-tags 'netgo $(TAGS)' \
+		-buildmode=pie \
+		-trimpath \
+		-ldflags '$(LDFLAGS)' \
+		-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-arm64' \
+		./cmd/$(NAME)
 
 .PHONY: release-copy
 release-copy:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd0b2a0d11f..f2336ca827e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,6 @@ The following sections list the changes for unreleased.
 * Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)
 * Bugfix - Fix error handling in GraphAPI GetUsers call: [#3357](https://github.com/owncloud/ocis/pull/3357)
 * Bugfix - Replace public mountpoint fileid with grant fileid: [#3349](https://github.com/owncloud/ocis/pull/3349)
-* Change - Add remote item to mountpoint and fix spaceID: [#3365](https://github.com/owncloud/ocis/pull/3365)
 * Change - Switch NATS backend: [#3192](https://github.com/owncloud/ocis/pull/3192)
 * Change - Drop json config file support: [#3366](https://github.com/owncloud/ocis/pull/3366)
 * Change - Settings service now stores its data via metadata service: [#3232](https://github.com/owncloud/ocis/pull/3232)
@@ -53,14 +52,6 @@ The following sections list the changes for unreleased.
 
    https://github.com/owncloud/ocis/pull/3349
 
-* Change - Add remote item to mountpoint and fix spaceID: [#3365](https://github.com/owncloud/ocis/pull/3365)
-
-   A mountpoint represents the mounted share on the share receivers side. The original resource
-   is located where the grant has been set. This item is now shown as libregraph remoteItem on the
-   mountpoint. While adding this, we fixed the spaceID for mountpoints.
-
-   https://github.com/owncloud/ocis/pull/3365
-
 * Change - Switch NATS backend: [#3192](https://github.com/owncloud/ocis/pull/3192)
 
    We've switched the NATS backend from Streaming to JetStream, since NATS Streaming is
diff --git a/changelog/unreleased/add-remote-item-fix-spaceID.md b/changelog/unreleased/add-remote-item-fix-spaceID.md
deleted file mode 100644
index 3af08384b1a..00000000000
--- a/changelog/unreleased/add-remote-item-fix-spaceID.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Change: Add remote item to mountpoint and fix spaceID
-
-A mountpoint represents the mounted share on the share receivers side. The original resource is located where the grant has been set. This item is now shown as libregraph remoteItem on the mountpoint. While adding this, we fixed the spaceID for mountpoints.
-
-https://github.com/owncloud/ocis/pull/3365
diff --git a/go.mod b/go.mod
index fc233af889d..cf943b3e041 100644
--- a/go.mod
+++ b/go.mod
@@ -22,7 +22,7 @@ require (
 	github.com/blevesearch/bleve/v2 v2.3.2
 	github.com/coreos/go-oidc/v3 v3.1.0
 	github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19
-	github.com/cs3org/reva/v2 v2.0.0-20220329061810-7810180b5c04
+	github.com/cs3org/reva/v2 v2.0.0-20220328125240-96279f215b6e
 	github.com/disintegration/imaging v1.6.2
 	github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733
 	github.com/go-chi/chi/v5 v5.0.7
diff --git a/go.sum b/go.sum
index 6a5f54743a2..58b379583d0 100644
--- a/go.sum
+++ b/go.sum
@@ -337,8 +337,12 @@ github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD9
 github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
 github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19 h1:1jqPH58jCxvbaJ9WLIJ7W2/m622bWS6ChptzljSG6IQ=
 github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
-github.com/cs3org/reva/v2 v2.0.0-20220329061810-7810180b5c04 h1:5SVtdnihJ9zFBLPpD98XlXPVkotWAgBpXz7F/+CN7Jg=
-github.com/cs3org/reva/v2 v2.0.0-20220329061810-7810180b5c04/go.mod h1:kFqm3iwrRHyEnP606H+wSWmJzjk0nj2kPShsowriqxg=
+github.com/cs3org/reva/v2 v2.0.0-20220324071614-82800d7ef768 h1:9QNIi4oyHyv1ua8oPyeBdLcMU6hKDyNmGuSxWmf01BM=
+github.com/cs3org/reva/v2 v2.0.0-20220324071614-82800d7ef768/go.mod h1:kFqm3iwrRHyEnP606H+wSWmJzjk0nj2kPShsowriqxg=
+github.com/cs3org/reva/v2 v2.0.0-20220328094822-506516e945eb h1:cAj77j0jVtZlrTUue8pT/wFDKrt0oEppLHg+0QkD6gQ=
+github.com/cs3org/reva/v2 v2.0.0-20220328094822-506516e945eb/go.mod h1:kFqm3iwrRHyEnP606H+wSWmJzjk0nj2kPShsowriqxg=
+github.com/cs3org/reva/v2 v2.0.0-20220328125240-96279f215b6e h1:ciwo9RflVAQmgkIhhtuwJdfSKIrqg9fdj/lWJ53fm/k=
+github.com/cs3org/reva/v2 v2.0.0-20220328125240-96279f215b6e/go.mod h1:kFqm3iwrRHyEnP606H+wSWmJzjk0nj2kPShsowriqxg=
 github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
 github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
 github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
@@ -988,8 +992,6 @@ github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 h1:Z/i1e+gTZrmcGeZy
 github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103/go.mod h1:o9YPB5aGP8ob35Vy6+vyq3P3bWe7NQWzf+JLiXCiMaE=
 github.com/mennanov/fieldmask-utils v0.5.0 h1:8em4akN0NM3hmmrg8VbvOPfdS4SSBdbFd53m9VtfOg0=
 github.com/mennanov/fieldmask-utils v0.5.0/go.mod h1:lah2lHczE2ff+7SqnNKpB+YzaO7M3h5iNO4LgPTJheM=
-github.com/micbar/reva/v2 v2.0.0-20220325152342-12eabed07d4b h1:5oWofosj7SRMGSjGdMgaIc4ASyYtvct2XZH6Hfyeh2A=
-github.com/micbar/reva/v2 v2.0.0-20220325152342-12eabed07d4b/go.mod h1:kFqm3iwrRHyEnP606H+wSWmJzjk0nj2kPShsowriqxg=
 github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7 h1:M0R40eUlyqxMuZn3Knx4DJTwHE3TiPFzcWUA/BKtDMM=
 github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVWs=
 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
diff --git a/graph/pkg/service/v0/driveitems.go b/graph/pkg/service/v0/driveitems.go
index 6f72fe7b4cd..a5eb21a65f9 100644
--- a/graph/pkg/service/v0/driveitems.go
+++ b/graph/pkg/service/v0/driveitems.go
@@ -2,7 +2,6 @@ package svc
 
 import (
 	"context"
-	"errors"
 	"fmt"
 	"net/http"
 	"net/url"
@@ -93,30 +92,6 @@ func (g Graph) getDriveItem(ctx context.Context, root *storageprovider.ResourceI
 	return cs3ResourceToDriveItem(res.Info)
 }
 
-func (g Graph) getRemoteItem(ctx context.Context, root *storageprovider.ResourceId, baseURL *url.URL) (*libregraph.RemoteItem, error) {
-	client := g.GetGatewayClient()
-
-	ref := &storageprovider.Reference{
-		ResourceId: root,
-	}
-	res, err := client.Stat(ctx, &storageprovider.StatRequest{Ref: ref})
-	if err != nil {
-		return nil, err
-	}
-	if res.Status.Code != cs3rpc.Code_CODE_OK {
-		// Only log this, there could be mountpoints which have no grant
-		g.logger.Debug().Msg(res.Status.Message)
-		return nil, errors.New("could not fetch grant resource for the mountpoint")
-	}
-	item, err := cs3ResourceToRemoteItem(res.Info)
-	if err != nil {
-		return nil, err
-	}
-
-	item.WebDavUrl = libregraph.PtrString(baseURL.String() + resourceid.OwnCloudResourceIDWrap(root))
-	return item, nil
-}
-
 func formatDriveItems(mds []*storageprovider.ResourceInfo) ([]*libregraph.DriveItem, error) {
 	responses := make([]*libregraph.DriveItem, 0, len(mds))
 	for i := range mds {
@@ -165,38 +140,7 @@ func cs3ResourceToDriveItem(res *storageprovider.ResourceInfo) (*libregraph.Driv
 	return driveItem, nil
 }
 
-func cs3ResourceToRemoteItem(res *storageprovider.ResourceInfo) (*libregraph.RemoteItem, error) {
-	size := new(int64)
-	*size = int64(res.Size) // TODO lurking overflow: make size of libregraph drive item use uint64
-
-	remoteItem := &libregraph.RemoteItem{
-		Id:   libregraph.PtrString(resourceid.OwnCloudResourceIDWrap(res.Id)),
-		Size: size,
-	}
-
-	if name := path.Base(res.Path); name != "" {
-		remoteItem.Name = &name
-	}
-	if res.Etag != "" {
-		remoteItem.ETag = &res.Etag
-	}
-	if res.Mtime != nil {
-		lastModified := cs3TimestampToTime(res.Mtime)
-		remoteItem.LastModifiedDateTime = &lastModified
-	}
-	if res.Type == storageprovider.ResourceType_RESOURCE_TYPE_FILE && res.MimeType != "" {
-		// We cannot use a libregraph.File here because the openapi codegenerator autodetects 'File' as a go type ...
-		remoteItem.File = &libregraph.OpenGraphFile{
-			MimeType: &res.MimeType,
-		}
-	}
-	if res.Type == storageprovider.ResourceType_RESOURCE_TYPE_CONTAINER {
-		remoteItem.Folder = &libregraph.Folder{}
-	}
-	return remoteItem, nil
-}
-
-func (g Graph) getPathForResource(ctx context.Context, ID *storageprovider.ResourceId) (*string, error) {
+func (g Graph) getPathForDriveItem(ctx context.Context, ID *storageprovider.ResourceId) (*string, error) {
 	client := g.GetGatewayClient()
 	var path *string
 	res, err := client.GetPath(ctx, &storageprovider.GetPathRequest{ResourceId: ID})
@@ -241,13 +185,13 @@ func (g Graph) getSpecialDriveItem(ctx context.Context, ID *storageprovider.Reso
 		g.logger.Error().Err(err).Str("ID", ID.OpaqueId).Msg("Could not get readme Item")
 		return nil
 	}
-	itemPath, err := g.getPathForResource(ctx, ID)
+	itemPath, err := g.getPathForDriveItem(ctx, ID)
 	if err != nil {
 		g.logger.Error().Err(err).Str("ID", ID.OpaqueId).Msg("Could not get readme path")
 		return nil
 	}
 	spaceItem.SpecialFolder = &libregraph.SpecialFolder{Name: libregraph.PtrString(itemName)}
-	spaceItem.WebDavUrl = libregraph.PtrString(baseURL.String() + path.Join(space.Id.String(), *itemPath))
+	spaceItem.WebDavUrl = libregraph.PtrString(baseURL.String() + path.Join(space.Root.OpaqueId, *itemPath))
 
 	return spaceItem
 }
diff --git a/graph/pkg/service/v0/drives.go b/graph/pkg/service/v0/drives.go
index c2abdc43679..63e7e47216e 100644
--- a/graph/pkg/service/v0/drives.go
+++ b/graph/pkg/service/v0/drives.go
@@ -240,7 +240,7 @@ func (g Graph) CreateDrive(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
-	newDrive, err := g.cs3StorageSpaceToDrive(r.Context(), wdu, resp.StorageSpace)
+	newDrive, err := g.cs3StorageSpaceToDrive(wdu, resp.StorageSpace)
 	if err != nil {
 		g.logger.Error().Err(err).Msg("error parsing space")
 		errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, err.Error())
@@ -382,7 +382,7 @@ func (g Graph) UpdateDrive(w http.ResponseWriter, r *http.Request) {
 func (g Graph) formatDrives(ctx context.Context, baseURL *url.URL, storageSpaces []*storageprovider.StorageSpace) ([]*libregraph.Drive, error) {
 	responses := make([]*libregraph.Drive, 0, len(storageSpaces))
 	for _, storageSpace := range storageSpaces {
-		res, err := g.cs3StorageSpaceToDrive(ctx, baseURL, storageSpace)
+		res, err := g.cs3StorageSpaceToDrive(baseURL, storageSpace)
 		if err != nil {
 			return nil, err
 		}
@@ -429,7 +429,7 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor
 	return res, err
 }
 
-func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, space *storageprovider.StorageSpace) (*libregraph.Drive, error) {
+func (g Graph) cs3StorageSpaceToDrive(baseURL *url.URL, space *storageprovider.StorageSpace) (*libregraph.Drive, error) {
 	if space.Root == nil {
 		return nil, fmt.Errorf("space has no root")
 	}
@@ -491,12 +491,8 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa
 		}
 	}
 
-	spaceID := space.Root.StorageId
-	if space.Root.OpaqueId != space.Root.StorageId {
-		spaceID = rootID
-	}
 	drive := &libregraph.Drive{
-		Id:   &spaceID,
+		Id:   &space.Root.StorageId,
 		Name: &space.Name,
 		//"createdDateTime": "string (timestamp)", // TODO read from StorageSpace ... needs Opaque for now
 		//"description": "string", // TODO read from StorageSpace ... needs Opaque for now
@@ -506,24 +502,6 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa
 			Permissions: permissions,
 		},
 	}
-	if space.SpaceType == "mountpoint" {
-		var remoteItem *libregraph.RemoteItem
-		grantID := storageprovider.ResourceId{
-			StorageId: utils.ReadPlainFromOpaque(space.Opaque, "grantStorageID"),
-			OpaqueId:  utils.ReadPlainFromOpaque(space.Opaque, "grantOpaqueID"),
-		}
-		if grantID.StorageId != "" && grantID.OpaqueId != "" {
-			var err error
-			remoteItem, err = g.getRemoteItem(ctx, &grantID, baseURL)
-			if err != nil {
-				g.logger.Debug().Err(err).Msg(err.Error())
-			}
-		}
-		if remoteItem != nil {
-			drive.Root.RemoteItem = remoteItem
-		}
-	}
-
 	if space.Opaque != nil {
 		if description, ok := space.Opaque.Map["description"]; ok {
 			drive.Description = libregraph.PtrString(string(description.Value))
@@ -548,7 +526,7 @@ func (g Graph) cs3StorageSpaceToDrive(ctx context.Context, baseURL *url.URL, spa
 		// TODO read from StorageSpace ... needs Opaque for now
 		// TODO how do we build the url?
 		// for now: read from request
-		webDavURL := baseURL.String() + spaceID
+		webDavURL := baseURL.String() + space.Root.StorageId
 		drive.Root.WebDavUrl = &webDavURL
 	}
 
diff --git a/web/pkg/config/defaults/defaultconfig.go b/web/pkg/config/defaults/defaultconfig.go
index 89559525a08..8e921bbaad6 100644
--- a/web/pkg/config/defaults/defaultconfig.go
+++ b/web/pkg/config/defaults/defaultconfig.go
@@ -50,7 +50,7 @@ func DefaultConfig() *config.Config {
 					ResponseType: "code",
 					Scope:        "openid profile email",
 				},
-				Apps: []string{"files", "search", "media-viewer", "pdf-viewer", "external"},
+				Apps: []string{"files", "search", "media-viewer", "external"},
 			},
 		},
 	}


Test patch:
diff --git a/graph/pkg/service/v0/graph_test.go b/graph/pkg/service/v0/graph_test.go
index bd07a5cde8a..30c1160772d 100644
--- a/graph/pkg/service/v0/graph_test.go
+++ b/graph/pkg/service/v0/graph_test.go
@@ -7,7 +7,6 @@ import (
 	"io"
 	"net/http"
 	"net/http/httptest"
-	"time"
 
 	gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
 	provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
@@ -66,11 +65,11 @@ var _ = Describe("Graph", func() {
 				Status: status.NewOK(ctx),
 				StorageSpaces: []*provider.StorageSpace{
 					{
-						Id:        &provider.StorageSpaceId{OpaqueId: "sameID"},
+						Id:        &provider.StorageSpaceId{OpaqueId: "aspaceid"},
 						SpaceType: "aspacetype",
 						Root: &provider.ResourceId{
-							StorageId: "sameID",
-							OpaqueId:  "sameID",
+							StorageId: "aspaceid",
+							OpaqueId:  "anopaqueid",
 						},
 						Name: "aspacename",
 					},
@@ -95,11 +94,11 @@ var _ = Describe("Graph", func() {
 				"value":[
 					{
 						"driveType":"aspacetype",
-						"id":"sameID",
+						"id":"aspaceid",
 						"name":"aspacename",
 						"root":{
-							"id":"sameID!sameID",
-							"webDavUrl":"https://localhost:9200/dav/spaces/sameID"
+							"id":"aspaceid!anopaqueid",
+							"webDavUrl":"https://localhost:9200/dav/spaces/aspaceid"
 						}
 					}
 				]
@@ -111,11 +110,11 @@ var _ = Describe("Graph", func() {
 				Status: status.NewOK(ctx),
 				StorageSpaces: []*provider.StorageSpace{
 					{
-						Id:        &provider.StorageSpaceId{OpaqueId: "bsameID"},
+						Id:        &provider.StorageSpaceId{OpaqueId: "bspaceid"},
 						SpaceType: "bspacetype",
 						Root: &provider.ResourceId{
-							StorageId: "bsameID",
-							OpaqueId:  "bsameID",
+							StorageId: "bspaceid",
+							OpaqueId:  "bopaqueid",
 						},
 						Name: "bspacename",
 						Opaque: &typesv1beta1.Opaque{
@@ -126,11 +125,11 @@ var _ = Describe("Graph", func() {
 						},
 					},
 					{
-						Id:        &provider.StorageSpaceId{OpaqueId: "asameID"},
+						Id:        &provider.StorageSpaceId{OpaqueId: "aspaceid"},
 						SpaceType: "aspacetype",
 						Root: &provider.ResourceId{
-							StorageId: "asameID",
-							OpaqueId:  "asameID",
+							StorageId: "aspaceid",
+							OpaqueId:  "anopaqueid",
 						},
 						Name: "aspacename",
 						Opaque: &typesv1beta1.Opaque{
@@ -162,95 +161,29 @@ var _ = Describe("Graph", func() {
 					{
 						"driveAlias":"aspacetype/aspacename",
 						"driveType":"aspacetype",
-						"id":"asameID",
+						"id":"aspaceid",
 						"name":"aspacename",
 						"root":{
 							"eTag":"101112131415",
-							"id":"asameID!asameID",
-							"webDavUrl":"https://localhost:9200/dav/spaces/asameID"
+							"id":"aspaceid!anopaqueid",
+							"webDavUrl":"https://localhost:9200/dav/spaces/aspaceid"
 						}
 					},
 					{
 						"driveAlias":"bspacetype/bspacename",
 						"driveType":"bspacetype",
-						"id":"bsameID",
+						"id":"bspaceid",
 						"name":"bspacename",
 						"root":{
 							"eTag":"123456789",
-							"id":"bsameID!bsameID",
-							"webDavUrl":"https://localhost:9200/dav/spaces/bsameID"
+							"id":"bspaceid!bopaqueid",
+							"webDavUrl":"https://localhost:9200/dav/spaces/bspaceid"
 						}
 					}
 				]
 			}
 			`))
 		})
-		It("can list a spaces type mountpoint", func() {
-			gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
-				Status: status.NewOK(ctx),
-				StorageSpaces: []*provider.StorageSpace{
-					{
-						Id:        &provider.StorageSpaceId{OpaqueId: "aID!differentID"},
-						SpaceType: "mountpoint",
-						Root: &provider.ResourceId{
-							StorageId: "aID",
-							OpaqueId:  "differentID",
-						},
-						Name: "New Folder",
-						Opaque: &typesv1beta1.Opaque{
-							Map: map[string]*typesv1beta1.OpaqueEntry{
-								"spaceAlias":     {Decoder: "plain", Value: []byte("mountpoint/new-folder")},
-								"etag":           {Decoder: "plain", Value: []byte("101112131415")},
-								"grantStorageID": {Decoder: "plain", Value: []byte("ownerStorageID")},
-								"grantOpaqueID":  {Decoder: "plain", Value: []byte("opaqueID")},
-							},
-						},
-					},
-				},
-			}, nil)
-			gatewayClient.On("Stat", mock.Anything, mock.Anything).Return(&provider.StatResponse{
-				Status: status.NewOK(ctx),
-				Info: &provider.ResourceInfo{
-					Etag:  "123456789",
-					Type:  provider.ResourceType_RESOURCE_TYPE_CONTAINER,
-					Id:    &provider.ResourceId{StorageId: "ownerStorageID", OpaqueId: "opaqueID"},
-					Path:  "New Folder",
-					Mtime: &typesv1beta1.Timestamp{Seconds: 1648327606, Nanos: 0},
-					Size:  uint64(1234),
-				},
-			}, nil)
-			gatewayClient.On("GetQuota", mock.Anything, mock.Anything).Return(&provider.GetQuotaResponse{
-				Status: status.NewUnimplemented(ctx, fmt.Errorf("not supported"), "not supported"),
-			}, nil)
-
-			r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/me/drives", nil)
-			rr := httptest.NewRecorder()
-			svc.GetDrives(rr, r)
-
-			Expect(rr.Code).To(Equal(http.StatusOK))
-
-			body, _ := io.ReadAll(rr.Body)
-
-			var response map[string][]libregraph.Drive
-			err := json.Unmarshal(body, &response)
-			Expect(err).ToNot(HaveOccurred())
-			Expect(len(response["value"])).To(Equal(1))
-			value := response["value"][0]
-			Expect(*value.DriveAlias).To(Equal("mountpoint/new-folder"))
-			Expect(*value.DriveType).To(Equal("mountpoint"))
-			Expect(*value.Id).To(Equal("aID!differentID"))
-			Expect(*value.Name).To(Equal("New Folder"))
-			Expect(*value.Root.WebDavUrl).To(Equal("https://localhost:9200/dav/spaces/aID!differentID"))
-			Expect(*value.Root.ETag).To(Equal("101112131415"))
-			Expect(*value.Root.Id).To(Equal("aID!differentID"))
-			Expect(*value.Root.RemoteItem.ETag).To(Equal("123456789"))
-			Expect(*value.Root.RemoteItem.Id).To(Equal("ownerStorageID!opaqueID"))
-			Expect(value.Root.RemoteItem.LastModifiedDateTime.UTC()).To(Equal(time.Unix(1648327606, 0).UTC()))
-			Expect(*value.Root.RemoteItem.Folder).To(Equal(libregraph.Folder{}))
-			Expect(*value.Root.RemoteItem.Name).To(Equal("New Folder"))
-			Expect(*value.Root.RemoteItem.Size).To(Equal(int64(1234)))
-			Expect(*value.Root.RemoteItem.WebDavUrl).To(Equal("https://localhost:9200/dav/spaces/ownerStorageID!opaqueID"))
-		})
 		It("can not list spaces with wrong sort parameter", func() {
 			gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
 				Status:        status.NewOK(ctx),
diff --git a/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md b/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md
index 269ce9e1b5d..b0abde88428 100644
--- a/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md
+++ b/tests/acceptance/expected-failures-webUI-on-OCIS-storage.md
@@ -63,8 +63,8 @@ Other free text and markdown formatting can be used elsewhere in the document if
 - [webUISharingInternalUsersCollaborator/shareWithUsers.feature:35](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L35)
 - [webUISharingInternalUsersCollaborator/shareWithUsers.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L36)
 - [webUISharingInternalUsersCollaborator/shareWithUsers.feature:37](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersCollaborator/shareWithUsers.feature#L37)
-- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:155](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L155)
-- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:198](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L198)
+- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:156](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L156)
+- [webUISharingInternalUsersShareWithPage/shareWithUsers.feature:199](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalUsersShareWithPage/shareWithUsers.feature#L199)
 - [webUISharingPermissionsUsers/sharePermissionsUsers.feature:21](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L21)
 - [webUISharingPermissionsUsers/sharePermissionsUsers.feature:36](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L36)
 - [webUISharingPermissionsUsers/sharePermissionsUsers.feature:52](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPermissionsUsers/sharePermissionsUsers.feature#L52)
@@ -199,7 +199,7 @@ Other free text and markdown formatting can be used elsewhere in the document if
 - [webUIFilesActionMenu/versions.feature:93](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L93)
 
 ### [Accepting different shares with same filename from different users overwrites one file](https://github.com/owncloud/ocis/issues/713)
-- [webUISharingAcceptShares/acceptShares.feature:225](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L225)
+- [webUISharingAcceptShares/acceptShares.feature:228](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L228)
 
 ### [Deletion of a selected user/group as a collaborator has unusual behavior in UI](https://github.com/owncloud/web/issues/5857)
 - [webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingFolderAdvancedPermissionsGroups/shareAdvancePermissionsGroup.feature#L63)
@@ -359,7 +359,7 @@ Other free text and markdown formatting can be used elsewhere in the document if
 - [webUITrashbinDelete/trashbinDelete.feature:48](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUITrashbinDelete/trashbinDelete.feature#L48)
 
 ### [Tags page not implemented yet](https://github.com/owncloud/web/issues/5017)
-- [webUIDeleteFilesFolders/deleteFilesFolders.feature:136](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature#L136)
+- [webUIDeleteFilesFolders/deleteFilesFolders.feature:145](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIDeleteFilesFolders/deleteFilesFolders.feature#L145)
 - [webUIFilesSearch/search.feature:63](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L63)
 - [webUIFilesSearch/search.feature:71](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L71)
 - [webUIFilesSearch/search.feature:84](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesSearch/search.feature#L84)
@@ -484,8 +484,8 @@ Other free text and markdown formatting can be used elsewhere in the document if
 
 ### [[oCIS] Received share cannot be deleted/unshared if not shared with full permissions](https://github.com/owncloud/web/issues/5531)
 - [webUISharingAcceptShares/acceptShares.feature:50](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L50)
-- [webUISharingAcceptShares/acceptShares.feature:159](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L159)
-- [webUISharingAcceptShares/acceptShares.feature:198](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L198)
+- [webUISharingAcceptShares/acceptShares.feature:162](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L162)
+- [webUISharingAcceptShares/acceptShares.feature:201](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L201)
 
 ### [not possible to overwrite a received shared file](https://github.com/owncloud/ocis/issues/2267)
 - [webUISharingInternalGroups/shareWithGroups.feature:77](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingInternalGroups/shareWithGroups.feature#L77)
@@ -496,6 +496,3 @@ Other free text and markdown formatting can be used elsewhere in the document if
 
 ### [empty subfolder inside a folder to be uploaded is not created on the server](https://github.com/owncloud/web/issues/6348)
 - [webUIUpload/upload.feature:42](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/upload.feature#L42)
-
-### Unreleased changes in web master branch
-- [webUIFilesActionMenu/fileFolderActionMenu.feature:14](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/fileFolderActionMenu.feature#L14)
diff --git a/tests/acceptance/features/apiSpaces/listSpaces.feature b/tests/acceptance/features/apiSpaces/listSpaces.feature
index 392900a7ac8..7c6a01f3392 100644
--- a/tests/acceptance/features/apiSpaces/listSpaces.feature
+++ b/tests/acceptance/features/apiSpaces/listSpaces.feature
@@ -20,6 +20,12 @@ Feature: List and create spaces
       | name             | Alice Hansen |
       | quota@@@state    | normal       |
       | root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
+    And the json responded should contain a space "Shares Jail" with these key and value pairs:
+      | key              | value        |
+      | driveType        | virtual     |
+      | id               | %space_id%   |
+      | name             | Shares Jail |
+      | root@@@webDavUrl | %base_url%/dav/spaces/%space_id% |
 
   Scenario: An ordinary user can request information about their Space via the Graph API using a filter
     When user "Alice" lists all available spaces via the GraphApi with query "$filter=driveType eq 'personal'"
diff --git a/tests/config/drone/ocis-config.json b/tests/config/drone/ocis-config.json
index eefe2050a5a..de2ead136c9 100644
--- a/tests/config/drone/ocis-config.json
+++ b/tests/config/drone/ocis-config.json
@@ -17,7 +17,6 @@
     "draw-io",
     "markdown-editor",
     "media-viewer",
-    "pdf-viewer",
     "search"
   ],
   "external_apps": [