gitlab-development-kit部署gitlab《一》
环境
mac 12.7.4
xcode 14.2
gdk 0.2.16
gitlab-foss 13.7
QA
-
xcode源码安装
https://crifan.github.io/xcode_dev_summary/website/xcode_dev/install_xcode/
https://xcodereleases.com
-
openssl1.1 源码安装
https://openssl-library.org/source/old/1.1.0/index.html
https://github.com/openssl/openssl/releases?q=1.1.0&expanded=true
./config --prefix=/usr/local/opt/openssl@1.1
make -
go 版本不能源码下载
https://go.dev/dl/
cp ~/Downloads/go1.18.9.darwin-amd64.tar.gz ~/.asdf/downloads/golang/1.18.9/archive.tar.gz
-
https://rubygems.org/ SSL_connect returned=1 errno=0 state=error: certificate verify failed
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
https://github.com/rubygems/rubygems/issues/1758
export SSL_CERT_FILE=/usr/local/etc/openssl@3/cert.pem
-
implicit declaration of function 'thin_http_parser_has_error' is invalid in C99
https://stackoverflow.com/questions/63851404/an-error-occurred-while-installing-thin-1-7-2
gem install thin -v '1.7.2' --source 'https://rubygems.org/' -- --with-cflags="-Wno-error=implicit-function-declaration"
-
checking for re2 requires C++11 compiler... extconf.rb failed
https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/1877
brew install re2
gem install re2 -v '1.2.0' --source 'https://rubygems.org/' -- --with-re2-dir="$(brew --prefix re2)" -- --with-cppflags="-x c++ -std=c++20" -
thrift
gem install thrift -v 0.21.0 --source 'https://rubygems.org/' -- --with-cppflags="-Wno-compound-token-split-by-macro"
-
pg
brew install libpq
-
macos "glob" is not exported by the File::Glob module
https://github.com/guanzhi/GmSSL/issues/811
This issue is due to the Perl package File::Glob, some simple changes will fix these errors. In files Configure and test/build.info, change
use if $^O ne "VMS", 'File::Glob' => qw/glob/;
into
use if $^O ne "VMS", 'File::Glob' => qw/:glob/;
Brewfile 注释的可以手动安装
brew "cmake"
brew "coreutils"
brew "docutils"
brew "dpkg"
brew "exiftool"
brew "git"
#brew "git-lfs"
#brew "gitleaks"
brew "gnupg"
brew "gpgme"
brew "graphicsmagick"
brew "icu4c"
brew "libiconv"
brew "libssh2"
#brew "openssl@1.1", link: :force
brew "pkg-config"
brew "re2"
brew "runit"
brew "sqlite"
#brew "vale"
#brew "vault"
brew "yamllint"
#cask "chromedriver"
brew install chromedriver --cask
-
go:linkname must refer to declared function or variable
https://stackoverflow.com/questions/71507321/go-1-18-build-error-on-mac-unix-syscall-darwin-1-13-go253-golinkname-mus
cd gitlab/workhorse
get -u golang.org/x/sys -
gitaly
gem install charlock_holmes warning: implicit conversion loses integer precision: 'long' to 'int32_t'
https://ruby-china.org/topics/40931
-
gitlabhq_development_ci exists, nothing to do here.
req: Unknown digest addext
req: Use -help for summary.
make: *** [localhost.key] Error 1openssl req -newkey rsa:4096 -new -nodes -x509 -days 3650 -out testdata/gitalycert.pem -keyout testdata/gitalykey.pem -subj "/C=US/ST=California/L=San Francisco/O=GitLab/OU=GitLab-Shell/CN=localhost" -addext "subjectAltName = IP:127.0.0.1, DNS:localhost"
brew install openssl@3.0
vim ~/.zshrc
export PATH="/usr/local/opt/openssl@3.0/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl@3.0/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@3.0/include" -
git diff Makefile
diff --git a/Makefile b/Makefile
index eec70e5f..f41031fd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+VERBOSE = 1
.NOTPARALLEL:START_TIME := $(shell date "+%s")
@@ -38,7 +39,8 @@ export GDK_QUIET = $(gdk_quiet)
include support/makefiles/*.mkifeq ($(platform),darwin)
-OPENSSL_PREFIX := $(shell brew --prefix openssl@1.1)
+#OPENSSL_PREFIX := $(shell brew --prefix openssl@1.1)
+OPENSSL_PREFIX := $(shell brew --prefix openssl@3.0)
OPENSSL := ${OPENSSL_PREFIX}/bin/openssl
else
OPENSSL := $(shell command -v openssl 2> /dev/null)
@@ -80,7 +82,7 @@ openldap-setup
prom-setup
object-storage-setup
gitlab-elasticsearch-indexer-setup
-gitlab-metrics-exporter-setup
+#gitlab-metrics-exporter-setup
grafana-setup
gitlab-ui-setup
gitlab-docs-setup
@@ -113,7 +115,7 @@ gitlab-k8s-agent-update
gitaly-update
gitlab-update
gitlab-elasticsearch-indexer-update
-gitlab-metrics-exporter-update
+#gitlab-metrics-exporter-update
object-storage-update
jaeger-update
grafana-update \ -
git diff Brewfile
--- a/Brewfile
+++ b/Brewfile
@@ -4,20 +4,20 @@ brew "docutils"
brew "dpkg"
brew "exiftool"
brew "git"
-brew "git-lfs"
-brew "gitleaks"
+#brew "git-lfs"
+#brew "gitleaks"
brew "gnupg"
brew "gpgme"
brew "graphicsmagick"
brew "icu4c"
brew "libiconv"
brew "libssh2"
-brew "openssl@1.1", link: :force
+#brew "openssl@1.1", link: :force
brew "pkg-config"
brew "re2"
brew "runit"
brew "sqlite"
-brew "vale"
-brew "vault"
+#brew "vale"
+#brew "vault"
brew "yamllint"
-cask "chromedriver"
+#cask "chromedriver"