user/gitlab-foss: fix APKBUILD
This commit is contained in:
parent
02bebb22f7
commit
f8643d1074
2 changed files with 100 additions and 41 deletions
|
@ -63,6 +63,7 @@ install="$pkgname.pre-install $pkgname.post-install $pkgname.post-upgrade"
|
||||||
subpackages="$pkgname-assets::noarch"
|
subpackages="$pkgname-assets::noarch"
|
||||||
source="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/$_gittag/gitlab-foss-$_gittag.tar.gz
|
source="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/$_gittag/gitlab-foss-$_gittag.tar.gz
|
||||||
libgit-1.4-compat.patch
|
libgit-1.4-compat.patch
|
||||||
|
database-config.patch
|
||||||
$_pkgname.initd
|
$_pkgname.initd
|
||||||
$_pkgname.mailroom.initd
|
$_pkgname.mailroom.initd
|
||||||
$_pkgname.rails.initd
|
$_pkgname.rails.initd
|
||||||
|
@ -72,7 +73,7 @@ source="https://gitlab.com/gitlab-org/gitlab-foss/-/archive/$_gittag/gitlab-foss
|
||||||
$_pkgname.logrotate
|
$_pkgname.logrotate
|
||||||
bin-wrapper.in
|
bin-wrapper.in
|
||||||
"
|
"
|
||||||
builddir="$srcdir/gitlab-foss-$_gitrev"
|
builddir="$srcdir/gitlab-foss-$_gittag"
|
||||||
|
|
||||||
_prefix="usr/lib/bundles/$_pkgname"
|
_prefix="usr/lib/bundles/$_pkgname"
|
||||||
|
|
||||||
|
@ -110,69 +111,69 @@ prepare() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
# local bundle_without='exclude development kerberos mysql test'
|
local bundle_without='exclude development kerberos mysql test'
|
||||||
|
|
||||||
# cd "$builddir"/workhorse
|
cd "$builddir"/workhorse
|
||||||
|
|
||||||
# make
|
make
|
||||||
|
|
||||||
# cd "$builddir"
|
cd "$builddir"
|
||||||
|
|
||||||
# msg "Installing Ruby gems..."
|
msg "Installing Ruby gems..."
|
||||||
# bundle config --local without "$bundle_without"
|
bundle config --local without "$bundle_without"
|
||||||
# bundle config --local build.ffi --enable-system-libffi
|
bundle config --local build.ffi --enable-system-libffi
|
||||||
# bundle config --local build.gpgme --use-system-libraries
|
bundle config --local build.gpgme --use-system-libraries
|
||||||
# bundle config --local build.nokogiri --use-system-libraries \
|
bundle config --local build.nokogiri --use-system-libraries \
|
||||||
# --with-xml2-include=/usr/include/libxml2 \
|
--with-xml2-include=/usr/include/libxml2 \
|
||||||
# --with-xslt-include=/usr/include/libxslt
|
--with-xslt-include=/usr/include/libxslt
|
||||||
# bundle config --local build.ruby-magic --enable-system-libraries
|
bundle config --local build.ruby-magic --enable-system-libraries
|
||||||
# bundle config --local build.rugged --use-system-libraries
|
bundle config --local build.rugged --use-system-libraries
|
||||||
# # https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357
|
# https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357
|
||||||
# bundle config --local build.google-protobuf --with-cflags=-D__va_copy=va_copy
|
bundle config --local build.google-protobuf --with-cflags=-D__va_copy=va_copy
|
||||||
|
|
||||||
# bundle install --no-cache
|
bundle install --no-cache
|
||||||
|
|
||||||
# Fix https://github.com/funny-falcon/murmurhash3-ruby/pull/9
|
# Fix https://github.com/funny-falcon/murmurhash3-ruby/pull/9
|
||||||
# (
|
(
|
||||||
# cd vendor/bundle/ruby/*/extensions/*/*/murmurhash3-*
|
cd vendor/bundle/ruby/*/extensions/*/*/murmurhash3-*
|
||||||
# mkdir -p murmurhash3
|
mkdir -p murmurhash3
|
||||||
# mv native.so murmurhash3/
|
mv native.so murmurhash3/
|
||||||
# )
|
)
|
||||||
|
|
||||||
# Replace bundled CA bundle with symlink.
|
# Replace bundled CA bundle with symlink.
|
||||||
# (
|
(
|
||||||
# cd vendor/bundle/ruby/*/gems/aws-sdk-core-*/
|
cd vendor/bundle/ruby/*/gems/aws-sdk-core-*/
|
||||||
# rm ca-bundle.crt
|
rm ca-bundle.crt
|
||||||
# ln -s /etc/ssl/certs/ca-certificates.crt ca-bundle.crt
|
ln -s /etc/ssl/certs/ca-certificates.crt ca-bundle.crt
|
||||||
# )
|
)
|
||||||
|
|
||||||
# Remove faulty RPATH.
|
# Remove faulty RPATH.
|
||||||
# chrpath -d vendor/bundle/ruby/*/extensions/*/*/ruby-magic-*/magic/magic.so
|
chrpath -d vendor/bundle/ruby/*/extensions/*/*/ruby-magic-*/magic/magic.so
|
||||||
|
|
||||||
# Patch installed gem gitlab-markup to use python3.
|
# Patch installed gem gitlab-markup to use python3.
|
||||||
# Option "-S" causes that Python cannot find docutils module.
|
# Option "-S" causes that Python cannot find docutils module.
|
||||||
# sed -i 's/python2 -S/python3/g' \
|
sed -i 's/python2 -S/python3/g' \
|
||||||
# vendor/bundle/ruby/*/gems/gitlab-markup-*/lib/github/markups.rb
|
vendor/bundle/ruby/*/gems/gitlab-markup-*/lib/github/markups.rb
|
||||||
|
|
||||||
# Remove non-sense require of code for tests from top-level module
|
# Remove non-sense require of code for tests from top-level module
|
||||||
# (we're gonna delete tests from the package).
|
# (we're gonna delete tests from the package).
|
||||||
# sed -i '/require .carrierwave/test/matchers./d' \
|
sed -i '/require .carrierwave/test/matchers./d' \
|
||||||
# vendor/bundle/ruby/*/gems/carrierwave-*/lib/carrierwave.rb
|
vendor/bundle/ruby/*/gems/carrierwave-*/lib/carrierwave.rb
|
||||||
|
|
||||||
# msg "Installing npm modules..."
|
msg "Installing npm modules..."
|
||||||
# yarn install --production --frozen-lockfile
|
yarn install --production --frozen-lockfile
|
||||||
|
|
||||||
# Since we have moved assets gems into a group, they are not implicitly
|
# Since we have moved assets gems into a group, they are not implicitly
|
||||||
# loaded by default. This will be reverted after compiling assets.
|
# loaded by default. This will be reverted after compiling assets.
|
||||||
# sed -i.bak '/Bundler.require(\*Rails.groups/s/)/, :assets)/' \
|
sed -i.bak '/Bundler.require(\*Rails.groups/s/)/, :assets)/' \
|
||||||
# config/application.rb
|
config/application.rb
|
||||||
|
|
||||||
# assets:precompile and gettext:compile bootstraps the app,
|
# assets:precompile and gettext:compile bootstraps the app,
|
||||||
# # so they needs configs.
|
# so they needs configs.
|
||||||
# cp config/gitlab.yml.example config/gitlab.yml
|
cp config/gitlab.yml.example config/gitlab.yml
|
||||||
# cp config/database.yml.postgresql config/database.yml
|
cp config/database.yml.postgresql config/database.yml
|
||||||
# cp config/secrets.yml.example config/secrets.yml
|
cp config/secrets.yml.example config/secrets.yml
|
||||||
#
|
|
||||||
# The configured path is not readable for the user building
|
# The configured path is not readable for the user building
|
||||||
# the package, so we must remove it; GitLab will use the default path.
|
# the package, so we must remove it; GitLab will use the default path.
|
||||||
sed -i '/^\s*secret_file:.*/d' config/gitlab.yml
|
sed -i '/^\s*secret_file:.*/d' config/gitlab.yml
|
||||||
|
@ -379,6 +380,7 @@ assets() {
|
||||||
sha512sums="
|
sha512sums="
|
||||||
d976dda4677f143598a9b87f7dea929c83ba4adedace4252fc2f15cf5c7fbebff473074e6659b017ced78e9397590900d309f6c6411e9dbd58306196a91b01e1 gitlab-foss-v15.7.2.tar.gz
|
d976dda4677f143598a9b87f7dea929c83ba4adedace4252fc2f15cf5c7fbebff473074e6659b017ced78e9397590900d309f6c6411e9dbd58306196a91b01e1 gitlab-foss-v15.7.2.tar.gz
|
||||||
80e27697772c4529720f2ec65d314641cd5f437070d0fefd3c521852ff6dad8c9127534e379a5c0bcee4bbae8d5a373d131bf91a58606d02c89104e34a88baac libgit-1.4-compat.patch
|
80e27697772c4529720f2ec65d314641cd5f437070d0fefd3c521852ff6dad8c9127534e379a5c0bcee4bbae8d5a373d131bf91a58606d02c89104e34a88baac libgit-1.4-compat.patch
|
||||||
|
dd984ae890c10119df6c510be1bd22e3d18652115ccaec6cb3e0a7c49d00cc72ec1c7c2414c29e6a13171c0a139626c8227e0ba3020f0ec3fe2c318b47101248 database-config.patch
|
||||||
55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd
|
55b0667d3969113ffd6860652ee8bdb9a534c25f413f33b2739e922c886988e7cea72c1c00c7eecf29fcff3682b1324156365605ffc6aae45d1e0ccddf96288b gitlab.initd
|
||||||
1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd
|
1f451b67a5d5e58650b0fe862a2b65cfb8bff5502b37d94ae90619c1ff9affbecf24428303a2849bebce5f94bef37078f0e5710e344bbab616134e910938384a gitlab.mailroom.initd
|
||||||
b6a6d9ba20557e61efa24f2d5a489873fefbb981f7d4465794a857b2971263c08ec29cc001c372522cdc0d48245e59751307c9f44f6ef4d87bf2e3ec5c23fb1c gitlab.rails.initd
|
b6a6d9ba20557e61efa24f2d5a489873fefbb981f7d4465794a857b2971263c08ec29cc001c372522cdc0d48245e59751307c9f44f6ef4d87bf2e3ec5c23fb1c gitlab.rails.initd
|
||||||
|
|
57
user/gitlab-foss/database-config.patch
Normal file
57
user/gitlab-foss/database-config.patch
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql
|
||||||
|
index 5329a8e..a4daab1 100644
|
||||||
|
--- a/config/database.yml.postgresql
|
||||||
|
+++ b/config/database.yml.postgresql
|
||||||
|
@@ -18,13 +18,6 @@ production:
|
||||||
|
# port: 8600
|
||||||
|
# record: secondary.postgresql.service.consul
|
||||||
|
# interval: 300
|
||||||
|
- geo:
|
||||||
|
- adapter: postgresql
|
||||||
|
- encoding: unicode
|
||||||
|
- database: gitlabhq_geo_production
|
||||||
|
- username: git
|
||||||
|
- password: "secure password"
|
||||||
|
- host: localhost
|
||||||
|
|
||||||
|
#
|
||||||
|
# Development specific
|
||||||
|
@@ -39,13 +32,6 @@ development:
|
||||||
|
host: localhost
|
||||||
|
variables:
|
||||||
|
statement_timeout: 15s
|
||||||
|
- geo:
|
||||||
|
- adapter: postgresql
|
||||||
|
- encoding: unicode
|
||||||
|
- database: gitlabhq_geo_development
|
||||||
|
- username: postgres
|
||||||
|
- password: "secure password"
|
||||||
|
- host: localhost
|
||||||
|
|
||||||
|
#
|
||||||
|
# Staging specific
|
||||||
|
@@ -58,13 +44,6 @@ staging:
|
||||||
|
username: git
|
||||||
|
password: "secure password"
|
||||||
|
host: localhost
|
||||||
|
- geo:
|
||||||
|
- adapter: postgresql
|
||||||
|
- encoding: unicode
|
||||||
|
- database: gitlabhq_geo_staging
|
||||||
|
- username: git
|
||||||
|
- password: "secure password"
|
||||||
|
- host: localhost
|
||||||
|
|
||||||
|
# Warning: The database defined as "test" will be erased and
|
||||||
|
# re-generated from your development database when you run "rake".
|
||||||
|
@@ -80,10 +59,3 @@ test: &test
|
||||||
|
prepared_statements: false
|
||||||
|
variables:
|
||||||
|
statement_timeout: 15s
|
||||||
|
- geo:
|
||||||
|
- adapter: postgresql
|
||||||
|
- encoding: unicode
|
||||||
|
- database: gitlabhq_geo_test
|
||||||
|
- username: postgres
|
||||||
|
- password:
|
||||||
|
- host: localhost
|
Loading…
Add table
Add a link
Reference in a new issue