From 2426a56e0f9e2dc50642b0b46f377648524ac87d Mon Sep 17 00:00:00 2001 From: plct-sunmin89 Date: Thu, 25 May 2023 16:54:33 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0cuttlefish=20go=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/20230111-cuttlefish-setup.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/articles/20230111-cuttlefish-setup.md b/articles/20230111-cuttlefish-setup.md index 3775277..d038af1 100644 --- a/articles/20230111-cuttlefish-setup.md +++ b/articles/20230111-cuttlefish-setup.md @@ -92,6 +92,29 @@ sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f sudo usermod -aG kvm,cvdnetwork,render $USER sudo reboot ``` +## 2023年5月备注 + +debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令,生成最终的cuttlefish-user*.deb),按照上文提到的go代理设置,可能遇到如下报错: +```bash +github.com/google/uuid@v1.3.0/go.mod: verifying module: github.com/google/uuid@v1.3.0/go.mod: Get "https://sum.golang.org/lookup/github.com/google/uuid@v1.3.0": dial tcp 142.251.42.241:443: i/o timeout +``` +请把设置代理的命令放到frontend/src/goutil,并且把原来的代理注释掉,这是一个bash脚本,作用是为go build配置一些环境变量,debian/rules会调用它。 + +```bash +diff --git a/frontend/src/goutil b/frontend/src/goutil +index 449ccab..03e7cd8 100755 +--- a/frontend/src/goutil ++++ b/frontend/src/goutil +@@ -24,7 +24,9 @@ if [[ "$version" > "1.15" ]]; then + # Temporary solution until https://github.com/golang/go/issues/28194 is fixed + # in order to retry failed fetch requests. + # GOPROXY fallback was added in Go 1.15 +- export GOPROXY="proxy.golang.org|proxy.golang.org|direct" ++ #export GOPROXY="proxy.golang.org|proxy.golang.org|direct" ++ go env -w GO111MODULE=on ++ go env -w GOPROXY=https://goproxy.cn,direct + fi +``` # 6. 下载 CuttleFish 镜像 -- Gitee From 6149ffa208a41608a627ef526dd64baead7cd293 Mon Sep 17 00:00:00 2001 From: sunmin89 Date: Thu, 25 May 2023 09:00:54 +0000 Subject: [PATCH 2/5] update articles/20230111-cuttlefish-setup.md. Signed-off-by: sunmin89 --- articles/20230111-cuttlefish-setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/20230111-cuttlefish-setup.md b/articles/20230111-cuttlefish-setup.md index d038af1..06a5f06 100644 --- a/articles/20230111-cuttlefish-setup.md +++ b/articles/20230111-cuttlefish-setup.md @@ -92,9 +92,9 @@ sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f sudo usermod -aG kvm,cvdnetwork,render $USER sudo reboot ``` -## 2023年5月备注 +## 5.1 有关go代理的备注(2023年5月) -debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令,生成最终的cuttlefish-user*.deb),按照上文提到的go代理设置,可能遇到如下报错: +debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令),生成最终的cuttlefish-user*.deb,按照上文提到的go代理设置,可能遇到如下报错: ```bash github.com/google/uuid@v1.3.0/go.mod: verifying module: github.com/google/uuid@v1.3.0/go.mod: Get "https://sum.golang.org/lookup/github.com/google/uuid@v1.3.0": dial tcp 142.251.42.241:443: i/o timeout ``` -- Gitee From 40e5e581f6ad2bd925b844effa24a3843f86c8e9 Mon Sep 17 00:00:00 2001 From: plct-sunmin89 Date: Thu, 25 May 2023 16:54:33 +0800 Subject: [PATCH 3/5] Update cuttlefish GO_PROXY settings --- articles/20230111-cuttlefish-setup.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/articles/20230111-cuttlefish-setup.md b/articles/20230111-cuttlefish-setup.md index 3775277..d038af1 100644 --- a/articles/20230111-cuttlefish-setup.md +++ b/articles/20230111-cuttlefish-setup.md @@ -92,6 +92,29 @@ sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f sudo usermod -aG kvm,cvdnetwork,render $USER sudo reboot ``` +## 2023年5月备注 + +debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令,生成最终的cuttlefish-user*.deb),按照上文提到的go代理设置,可能遇到如下报错: +```bash +github.com/google/uuid@v1.3.0/go.mod: verifying module: github.com/google/uuid@v1.3.0/go.mod: Get "https://sum.golang.org/lookup/github.com/google/uuid@v1.3.0": dial tcp 142.251.42.241:443: i/o timeout +``` +请把设置代理的命令放到frontend/src/goutil,并且把原来的代理注释掉,这是一个bash脚本,作用是为go build配置一些环境变量,debian/rules会调用它。 + +```bash +diff --git a/frontend/src/goutil b/frontend/src/goutil +index 449ccab..03e7cd8 100755 +--- a/frontend/src/goutil ++++ b/frontend/src/goutil +@@ -24,7 +24,9 @@ if [[ "$version" > "1.15" ]]; then + # Temporary solution until https://github.com/golang/go/issues/28194 is fixed + # in order to retry failed fetch requests. + # GOPROXY fallback was added in Go 1.15 +- export GOPROXY="proxy.golang.org|proxy.golang.org|direct" ++ #export GOPROXY="proxy.golang.org|proxy.golang.org|direct" ++ go env -w GO111MODULE=on ++ go env -w GOPROXY=https://goproxy.cn,direct + fi +``` # 6. 下载 CuttleFish 镜像 -- Gitee From 72e0a3e37e6a2134298457b4dbc83789ea41af18 Mon Sep 17 00:00:00 2001 From: sunmin89 Date: Thu, 25 May 2023 09:00:54 +0000 Subject: [PATCH 4/5] update articles/20230111-cuttlefish-setup.md. Signed-off-by: sunmin89 --- articles/20230111-cuttlefish-setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/20230111-cuttlefish-setup.md b/articles/20230111-cuttlefish-setup.md index d038af1..06a5f06 100644 --- a/articles/20230111-cuttlefish-setup.md +++ b/articles/20230111-cuttlefish-setup.md @@ -92,9 +92,9 @@ sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f sudo usermod -aG kvm,cvdnetwork,render $USER sudo reboot ``` -## 2023年5月备注 +## 5.1 有关go代理的备注(2023年5月) -debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令,生成最终的cuttlefish-user*.deb),按照上文提到的go代理设置,可能遇到如下报错: +debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令),生成最终的cuttlefish-user*.deb,按照上文提到的go代理设置,可能遇到如下报错: ```bash github.com/google/uuid@v1.3.0/go.mod: verifying module: github.com/google/uuid@v1.3.0/go.mod: Get "https://sum.golang.org/lookup/github.com/google/uuid@v1.3.0": dial tcp 142.251.42.241:443: i/o timeout ``` -- Gitee From de6450e983e20ec74570e37712b9ba686159db03 Mon Sep 17 00:00:00 2001 From: sunmin89 Date: Thu, 25 May 2023 13:01:52 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=83=A8=E5=88=86=E7=9A=84=E8=AF=AD=E6=B3=95=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunmin89 --- articles/20230111-cuttlefish-setup.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/articles/20230111-cuttlefish-setup.md b/articles/20230111-cuttlefish-setup.md index 06a5f06..0b9e341 100644 --- a/articles/20230111-cuttlefish-setup.md +++ b/articles/20230111-cuttlefish-setup.md @@ -92,13 +92,13 @@ sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f sudo usermod -aG kvm,cvdnetwork,render $USER sudo reboot ``` -## 5.1 有关go代理的备注(2023年5月) + **注意:设置 go 代理的问题,升级到较新的 android-cuttlefish 仓库后,在执行debuild 之前设置的 go 代理可能无效,可以参考如下方法解决!** -debuild命令用于生成Debian发行版及其衍生版的软件包(后缀名.deb),在frontend文件夹中,debuild会根据debian/rules里面的规则(调用go build指令),生成最终的cuttlefish-user*.deb,按照上文提到的go代理设置,可能遇到如下报错: +上述 debuild 命令用于生成 Debian 发行版及其衍生版的软件包(后缀名 .deb),在 frontend 文件夹中,debuild 会根据`debian/rules`里面的规则(调用 `go build` 指令),生成最终的 cuttlefish-user*.deb,按照上文提到的方法设置 go 代理,可能遇到如下报错: ```bash github.com/google/uuid@v1.3.0/go.mod: verifying module: github.com/google/uuid@v1.3.0/go.mod: Get "https://sum.golang.org/lookup/github.com/google/uuid@v1.3.0": dial tcp 142.251.42.241:443: i/o timeout ``` -请把设置代理的命令放到frontend/src/goutil,并且把原来的代理注释掉,这是一个bash脚本,作用是为go build配置一些环境变量,debian/rules会调用它。 +请把设置代理的命令放到 `frontend/src/goutil`,并且把原来的代理注释掉,goutil 是一个 bash 脚本,作用是为 `go build` 配置一些环境变量,`debian/rules` 会调用它。 ```bash diff --git a/frontend/src/goutil b/frontend/src/goutil -- Gitee