diff --git a/pkg/fabric-client/channel/txnsender_test.go b/pkg/fabric-client/channel/txnsender_test.go index e981fdfdb8..5568efe4ae 100644 --- a/pkg/fabric-client/channel/txnsender_test.go +++ b/pkg/fabric-client/channel/txnsender_test.go @@ -19,8 +19,8 @@ import ( fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient" "github.com/hyperledger/fabric-sdk-go/api/apitxn" "github.com/hyperledger/fabric-sdk-go/api/apitxn/mocks" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/cauthdsl" "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/mocks" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" ) diff --git a/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh b/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh index 480f166004..0a4eb10720 100755 --- a/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh +++ b/scripts/third_party_pins/fabric/apply_fabric_client_utils.sh @@ -19,7 +19,6 @@ declare -a PKGS=( "common/util" "common/metadata" "common/channelconfig" - "common/cauthdsl" "common/ledger/util" "common/logbridge" @@ -44,7 +43,6 @@ declare -a FILES=( "common/util/utils.go" "common/metadata/metadata.go" "common/channelconfig/keys.go" - "common/cauthdsl/cauthdsl_builder.go" "common/logbridge/logbridge.go" diff --git a/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh b/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh index 14da3cbc21..58eb2734f9 100755 --- a/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh +++ b/scripts/third_party_pins/fabric/apply_fabric_external_utils.sh @@ -14,14 +14,16 @@ IMPORT_SUBSTS=($IMPORT_SUBSTS) GOIMPORTS_CMD=goimports declare -a PKGS=( + "common/cauthdsl" ) declare -a FILES=( + "common/cauthdsl/cauthdsl_builder.go" ) echo 'Removing current upstream project from working directory ...' -rm -Rf "${INTERNAL_PATH}/common/flogging" -mkdir -p "${INTERNAL_PATH}/common/flogging" +rm -Rf "${INTERNAL_PATH}/common" +mkdir -p "${INTERNAL_PATH}/common" # Create directory structure for packages for i in "${PKGS[@]}" diff --git a/scripts/third_party_pins/fabric/apply_upstream.sh b/scripts/third_party_pins/fabric/apply_upstream.sh index 4bd93dec85..7502358da2 100755 --- a/scripts/third_party_pins/fabric/apply_upstream.sh +++ b/scripts/third_party_pins/fabric/apply_upstream.sh @@ -49,6 +49,7 @@ declare -a CLIENT_UTILS_IMPORT_SUBSTS=( 's/\"github.com\/hyperledger\/fabric\/common\/flogging/flogging\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/common\/logbridge/g' 's/\"github.com\/op\/go-logging/logging\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\/common\/logbridge/g' 's/\"github.com\/hyperledger\/fabric\/bccsp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/bccsp/g' + 's/\"github.com\/hyperledger\/fabric\/common\/cauthdsl/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/common\/cauthdsl/g' 's/\"github.com\/hyperledger\/fabric\/protos\/common/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/common/g' 's/\"github.com\/hyperledger\/fabric\/protos\/peer/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/peer/g' 's/\"github.com\/hyperledger\/fabric\/protos\/msp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/msp/g' @@ -62,6 +63,8 @@ eval "INTERNAL_PATH=$THIRDPARTY_INTERNAL_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJE # external utils echo "Pinning and patching fabric external utils ..." declare -a EXTERNAL_UTILS_IMPORT_SUBSTS=( + 's/\"github.com\/hyperledger\/fabric\/protos\/common/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/common/g' + 's/\"github.com\/hyperledger\/fabric\/protos\/msp/\"github.com\/hyperledger\/fabric-sdk-go\/third_party\/github.com\/hyperledger\/fabric\/protos\/msp/g' 's/\"github.com\/hyperledger\/fabric\//\"github.com\/hyperledger\/fabric-sdk-go\/internal\/github.com\/hyperledger\/fabric\//g' ) eval "INTERNAL_PATH=$THIRDPARTY_FABRIC_PATH TMP_PROJECT_PATH=$TMP_PROJECT_PATH IMPORT_SUBSTS=\"${EXTERNAL_UTILS_IMPORT_SUBSTS[*]}\" $SCRIPTS_PATH/apply_fabric_external_utils.sh" diff --git a/scripts/third_party_pins/fabric/patches/0002-Update-package-flogging-for-vendoring.patch b/scripts/third_party_pins/fabric/patches/0002-Update-package-flogging-for-vendoring.patch deleted file mode 100644 index 1ede5b5372..0000000000 --- a/scripts/third_party_pins/fabric/patches/0002-Update-package-flogging-for-vendoring.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 81c8693fad42fa98ab38c8946fbb79d355e08392 Mon Sep 17 00:00:00 2001 -From: Troy Ronda -Date: Tue, 19 Sep 2017 11:29:58 -0400 -Subject: [PATCH] Update package flogging for vendoring - -Copyright SecureKey Technologies Inc. All Rights Reserved. -SPDX-License-Identifier: Apache-2.0 - -Signed-off-by: Troy Ronda ---- - common/flogging/logging.go | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/common/flogging/logging.go b/common/flogging/logging.go -index 841aed7a..f4f0b8d7 100644 ---- a/common/flogging/logging.go -+++ b/common/flogging/logging.go -@@ -47,7 +47,6 @@ var ( - func init() { - logger = logging.MustGetLogger(pkgLogID) - Reset() -- initgrpclogger() - } - - // Reset sets to logging to the defaults defined in this package. --- -2.14.1 - diff --git a/test/integration/base_test_setup.go b/test/integration/base_test_setup.go index bcf3140163..02dc529f9c 100644 --- a/test/integration/base_test_setup.go +++ b/test/integration/base_test_setup.go @@ -18,12 +18,12 @@ import ( "github.com/hyperledger/fabric-sdk-go/api/apitxn" deffab "github.com/hyperledger/fabric-sdk-go/def/fabapi" "github.com/hyperledger/fabric-sdk-go/def/fabapi/opt" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/cauthdsl" "github.com/hyperledger/fabric-sdk-go/pkg/config" "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/events" "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/orderer" fabricTxn "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn" admin "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/admin" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl" pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" ) diff --git a/test/integration/orgs/test_setup.go b/test/integration/orgs/test_setup.go index 67a5f3d2be..7bc03bb368 100644 --- a/test/integration/orgs/test_setup.go +++ b/test/integration/orgs/test_setup.go @@ -19,7 +19,6 @@ import ( deffab "github.com/hyperledger/fabric-sdk-go/def/fabapi" "github.com/hyperledger/fabric-sdk-go/def/fabapi/opt" - "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/common/cauthdsl" "github.com/hyperledger/fabric-sdk-go/pkg/config" client "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client" "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/channel" @@ -29,6 +28,7 @@ import ( "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/admin" "github.com/hyperledger/fabric-sdk-go/test/integration" "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/bccsp/factory" + "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/common/cauthdsl" ) var org1 = "Org1" diff --git a/internal/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go b/third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go similarity index 100% rename from internal/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go rename to third_party/github.com/hyperledger/fabric/common/cauthdsl/cauthdsl_builder.go