[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2020-05-27 Thread Anatol Pomozov via arch-commits
Date: Wednesday, May 27, 2020 @ 21:10:57
  Author: anatolik
Revision: 636068

PKGBUILD cleanup

Remove legacy directories inside application root directory
Remove old bug workarounds

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |   40 +---
 gitlab.install |7 ++-
 2 files changed, 19 insertions(+), 28 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-05-27 21:10:52 UTC (rev 636067)
+++ PKGBUILD2020-05-27 21:10:57 UTC (rev 636068)
@@ -61,18 +61,12 @@
 _logdir="/var/log/gitlab"
 
 prepare() {
-  # Get first 7 characters from sha1 which has 40 characters in total
-  local revision=$(ls -d gitlab-foss | rev | cut -c 34-40 | rev)
-
   cd gitlab-foss
 
-  patch -p1 < ../build_fix.patch
-
   # GitLab tries to read its revision information from a file.
-  echo "${revision}" > REVISION
+  git rev-parse --short HEAD > REVISION
 
-  export SKIP_STORAGE_VALIDATION='true'
-
+  patch -p1 < ../build_fix.patch
   patch -p1 < ../configs.patch
   # '/home/git' path in the config files indicates a default path that need to 
be adjusted
   grep -FqR '/home/git' config || exit 1
@@ -79,8 +73,8 @@
 
   cp config/gitlab.yml.example config/gitlab.yml
   cp config/database.yml.postgresql config/database.yml
+  cp config/puma.rb.example config/puma.rb
   cp config/resque.yml.example config/resque.yml
-  cp config/puma.rb.example config/puma.rb
 
   echo "Setting up systemd service files ..."
   for service_file in gitlab-sidekiq.service gitlab-puma.service 
gitlab.logrotate gitlab-backup.service gitlab-mailroom.service; do
@@ -118,9 +112,10 @@
 }
 
 package() {
-  cd gitlab-foss
   depends+=('gitlab-shell')
 
+  cd gitlab-foss
+
   install -d "${pkgdir}/usr/share/webapps"
 
   cp -r "${srcdir}"/gitlab-foss "${pkgdir}${_datadir}"
@@ -143,18 +138,16 @@
   install -dm750 -o 105 -g 105 "${pkgdir}${_etcdir}"
   install -dm755 "${pkgdir}/usr/share/doc/gitlab"
 
-  ln -fs /run/gitlab "${pkgdir}${_homedir}/pids"
-  ln -fs /run/gitlab "${pkgdir}${_homedir}/sockets"
-  ln -fs ${_datadir}/log "${pkgdir}${_homedir}/log"
+  rm -r "${pkgdir}${_datadir}"/{builds,tmp,log}
 
-  rm -rf "${pkgdir}${_datadir}/public/uploads" && ln -fs "${_homedir}/uploads" 
"${pkgdir}${_datadir}/public/uploads"
-  rm -rf "${pkgdir}${_datadir}/builds" && ln -fs "${_homedir}/builds" 
"${pkgdir}${_datadir}/builds"
-  rm -rf "${pkgdir}${_datadir}/tmp" && ln -fs /var/tmp 
"${pkgdir}${_datadir}/tmp"
-  rm -rf "${pkgdir}${_datadir}/log" && ln -fs "${_logdir}" 
"${pkgdir}${_datadir}/log"
+  # TODO: Rails uses log dir under the rails root. Figure out if it is 
possible to configure rails
+  # to log right to /var/log/gitlab
+  ln -fs "${_logdir}" "${pkgdir}${_datadir}/log"
 
   # Fixes https://bugs.archlinux.org/task/59762
   ln -s "${_datadir}/config/boot.rb" "${pkgdir}"/${_etcdir}/boot.rb
 
+  # TODO: workhorse and shell secret files are the application data and should 
be stored under /var/lib/gitlab
   mv "${pkgdir}${_datadir}/.gitlab_workhorse_secret" 
"${pkgdir}${_etcdir}/gitlab_workhorse_secret"
   chmod 660 "${pkgdir}${_etcdir}/gitlab_workhorse_secret"
   chown root:105 "${pkgdir}${_etcdir}/gitlab_workhorse_secret"
@@ -167,14 +160,12 @@
   # Install config files
   for config_file in application.rb gitlab.yml database.yml puma.rb 
resque.yml; do
 mv "config/${config_file}" "${pkgdir}${_etcdir}/"
-[[ -f "${pkgdir}${_datadir}/config/${config_file}" ]] && rm 
"${pkgdir}${_datadir}/config/${config_file}"
+# TODO: configure rails app to use configs right from /etc
 ln -fs "${_etcdir}/${config_file}" "${pkgdir}${_datadir}/config/"
   done
 
-  # Install database symlink
-  ln -fs "${_etcdir}/database.yml" "${pkgdir}${_datadir}/config/database.yml"
-
   # Install secrets symlink
+  # TODO: ruby uses _datadir to load config files. Figure out if we can load 
files directly from /etc
   ln -fs "${_etcdir}/secrets.yml" "${pkgdir}${_datadir}/config/secrets.yml"
 
   # Install license and help files
@@ -181,12 +172,7 @@
   mv README.md MAINTENANCE.md CONTRIBUTING.md CHANGELOG.md PROCESS.md VERSION 
config/*.{example,postgresql} "${pkgdir}/usr/share/doc/gitlab"
   install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/gitlab/LICENSE"
 
-  # https://gitlab.com/gitlab-org/gitlab-foss/issues/765
-  cp -r "${pkgdir}${_datadir}/doc" "${pkgdir}${_datadir}/public/help"
-  find "${pkgdir}${_datadir}/public/help" -name "*.md" -exec rm {} \;
-  find "${pkgdir}${_datadir}/public/help/" -depth -type d -empty -exec rmdir 
{} \;
-
-  chown 105:105 "${pkgdir}${_datadir}/db/schema.rb"
+  # TODO: structure.sql looks more like an application data and should be 
stored under /var/lib/gitlab
   chown 105:105 "${pkgdir}${_datadir}/db/structure.sql"
 
   # Install systemd service files

Modified: gitlab.install
===
--- gitlab.install  2020-05-27 2

[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2020-05-26 Thread Anatol Pomozov via arch-commits
Date: Tuesday, May 26, 2020 @ 09:42:06
  Author: anatolik
Revision: 635016

upgpkg: gitlab 13.0.0-2: FS#66774 Adjust configs for the new file locations

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |2 +-
 gitlab.install |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-05-26 09:05:10 UTC (rev 635015)
+++ PKGBUILD2020-05-26 09:42:06 UTC (rev 635016)
@@ -11,7 +11,7 @@
 # need this again at some point in the future.
 pkgname=gitlab
 pkgver=13.0.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Project management and code hosting application"
 arch=('x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-foss";

Modified: gitlab.install
===
--- gitlab.install  2020-05-26 09:05:10 UTC (rev 635015)
+++ gitlab.install  2020-05-26 09:42:06 UTC (rev 635016)
@@ -24,6 +24,6 @@
 
 echo "=="
 echo "The new Puma server uses socket files by default thus 
configuration for gitlab-gitlay and gitlab-shell need to be updated."
-echo "Please check new option values for at 
/etc/webapps/gitlab-shell/config.yml and /etc/gitlab-gitaly/config.toml. Pay 
attention to 'gitlab_url' and 'secret_file' values."
+echo "Please check new option values for 'gitlab_url' and 
'secret_file' in /etc/webapps/gitlab-shell/config.yml and 
/etc/gitlab-gitaly/config.toml."
 fi
 }


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2020-05-26 Thread Anatol Pomozov via arch-commits
Date: Tuesday, May 26, 2020 @ 09:05:10
  Author: anatolik
Revision: 635015

Install database.yml config file

Postrgres is the only option for gitlab now. Let's install a config file
for this database to /etc.

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |2 +-
 gitlab.install |3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-05-26 08:43:03 UTC (rev 635014)
+++ PKGBUILD2020-05-26 09:05:10 UTC (rev 635015)
@@ -165,7 +165,7 @@
   sed -i "s|require_relative '../lib|require '${_datadir}/lib|" 
config/application.rb
 
   # Install config files
-  for config_file in application.rb gitlab.yml puma.rb resque.yml; do
+  for config_file in application.rb gitlab.yml database.yml puma.rb 
resque.yml; do
 mv "config/${config_file}" "${pkgdir}${_etcdir}/"
 [[ -f "${pkgdir}${_datadir}/config/${config_file}" ]] && rm 
"${pkgdir}${_datadir}/config/${config_file}"
 ln -fs "${_etcdir}/${config_file}" "${pkgdir}${_datadir}/config/"

Modified: gitlab.install
===
--- gitlab.install  2020-05-26 08:43:03 UTC (rev 635014)
+++ gitlab.install  2020-05-26 09:05:10 UTC (rev 635015)
@@ -1,9 +1,8 @@
 post_install() {
 echo "Configure your /etc/webapps/gitlab/gitlab.yml"
-echo "Set up your redis to run on /var/run/redis/redis.sock or configure 
gitlab to use redis TCP"
+echo "Set up your redis to run on /run/redis/redis.sock or configure 
gitlab to use redis TCP"
 echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
 echo "Copy /usr/share/doc/gitlab/secrets.yml.example to 
/etc/webapps/gitlab/secrets.yml and configure it"
-echo "Copy a database example config from /usr/share/doc/gitlab/ to 
/etc/webapps/gitlab/database.yml and configure it"
 echo "Setup the database:"
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
EXECJS_RUNTIME=Disabled bundle exec rake gitlab:setup RAILS_ENV=production\""
 echo "Finally run the following commands to check your installation:"


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2017-06-30 Thread Sven-Hendrik Haase
Date: Friday, June 30, 2017 @ 15:17:22
  Author: svenstaro
Revision: 241681

upgpkg: gitlab 9.3.2-3

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |8 ++--
 gitlab.install |2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-06-30 15:08:16 UTC (rev 241680)
+++ PKGBUILD2017-06-30 15:17:22 UTC (rev 241681)
@@ -8,12 +8,12 @@
 
 pkgname=gitlab
 pkgver=9.3.2
-pkgrel=2
+pkgrel=3
 pkgdesc="Project management and code hosting application"
 arch=('x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README";
 license=('MIT')
-depends=('ruby2.3' 'git' 'ruby2.3-bundler' 'gitlab-workhorse' 'openssh' 
'redis' 'libxslt' 'icu' 'nodejs')
+depends=('ruby2.3' 'git' 'ruby2.3-bundler' 'gitlab-workhorse' 'gitlab-gitaly' 
'openssh' 'redis' 'libxslt' 'icu' 'nodejs')
 makedepends=('cmake' 'postgresql' 'mariadb' 'yarn' 'go')
 optdepends=('postgresql: database backend'
 'mysql: database backend'
@@ -121,9 +121,6 @@
   cp config/resque.yml.example config/resque.yml
   sed -i 's/url.*/nope.sock/g' config/resque.yml
 
-  bundle-2.3 exec rake "gitlab:gitaly:install[/tmp/gitaly]" 
RAILS_ENV=production
-  rm -rf /tmp/gitaly/_build
-
   yarn install --production --pure-lockfile
   bundle-2.3 exec rake gitlab:assets:compile RAILS_ENV=production 
NODE_ENV=production
   bundle-2.3 exec rake gettext:compile RAILS_ENV=production
@@ -140,7 +137,6 @@
   install -d "${pkgdir}/usr/share/webapps"
 
   cp -r "${srcdir}/${_srcdir}"* "${pkgdir}${_datadir}"
-  cp -r /tmp/gitaly "${pkgdir}${_datadir}"/../gitaly  # This was prepared in 
build()
   chown -R root:root "${pkgdir}${_datadir}"
   chmod 755 "${pkgdir}${_datadir}"
 

Modified: gitlab.install
===
--- gitlab.install  2017-06-30 15:08:16 UTC (rev 241680)
+++ gitlab.install  2017-06-30 15:17:22 UTC (rev 241681)
@@ -16,5 +16,5 @@
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.3 exec rake db:migrate RAILS_ENV=production\""
 echo "Afterwards, restart gitlab-related services:"
 echo "# systemctl daemon-reload"
-echo "# systemctl restart gitlab-sidekiq gitlab-unicorn gitlab-workhorse"
+echo "# systemctl restart gitlab-sidekiq gitlab-unicorn gitlab-workhorse 
gitlab-gitaly"
 }


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2017-05-23 Thread Sven-Hendrik Haase
Date: Wednesday, May 24, 2017 @ 04:24:29
  Author: svenstaro
Revision: 229874

upgpkg: gitlab 9.2.0-2

Remove systemd-tmpfiles call

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |2 +-
 gitlab.install |2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-05-24 04:03:23 UTC (rev 229873)
+++ PKGBUILD2017-05-24 04:24:29 UTC (rev 229874)
@@ -8,7 +8,7 @@
 
 pkgname=gitlab
 pkgver=9.2.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README";

Modified: gitlab.install
===
--- gitlab.install  2017-05-24 04:03:23 UTC (rev 229873)
+++ gitlab.install  2017-05-24 04:24:29 UTC (rev 229874)
@@ -1,6 +1,4 @@
 post_install() {
-systemd-tmpfiles --create gitlab.conf
-
 echo "Configure your /etc/webapps/gitlab/gitlab.yml"
 echo "Set up your redis to run on /var/run/redis/redis.sock or configure 
gitlab to use redis TCP"
 echo "Put a secret bytestring to /etc/webapps/gitlab/secret"


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2017-01-15 Thread Sven-Hendrik Haase
Date: Sunday, January 15, 2017 @ 23:14:12
  Author: svenstaro
Revision: 207516

upgpkg: gitlab 8.15.4-1

upstream release 8.15.4

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |   16 ++--
 gitlab.install |8 
 2 files changed, 14 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-01-15 22:38:06 UTC (rev 207515)
+++ PKGBUILD2017-01-15 23:14:12 UTC (rev 207516)
@@ -7,13 +7,13 @@
 # Contributor: Caleb Maclennan 
 
 pkgname=gitlab
-pkgver=8.15.3
+pkgver=8.15.4
 pkgrel=1
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README";
 license=('MIT')
-depends=('ruby' 'git' 'ruby-bundler' 'gitlab-workhorse' 'openssh' 'redis' 
'libxslt' 'icu' 'nodejs')
+depends=('ruby2.3' 'git' 'ruby2.3-bundler' 'gitlab-workhorse' 'openssh' 
'redis' 'libxslt' 'icu' 'nodejs')
 makedepends=('cmake' 'postgresql' 'mariadb')
 optdepends=('postgresql: database backend'
 'mysql: database backend'
@@ -41,7 +41,7 @@
 nginx-ssl.conf.example
 lighttpd.conf.example)
 install='gitlab.install'
-sha512sums=('065b207a5a05874c12901634fece5a6e670a9218a82bbe330d18056dd34d8cd1ff2103bd6ca7426fa93cb9efb6358825a69d24470b78c50282ba54c0b6a512ae'
+sha512sums=('485907942cc84603886985c2fddbccf11d0b01ba8491af225387fb6e58629766177b59cd923df76c91e4d5dd4cc345deb5ce87f7012789f2f6c5fbef7fe5dfe5'
 
'1464ca9399b627bb8bd286608b4ad93feca6bc54c7e63c98180744e710295508a89a1a34c412b82e3eaad9308a82b2ea2483ae0f0b1e1149c24b17ab0d126f69'
 
'9844b8e42e8d50e6eac54711fb8c9745d506560676e0b8d5f1c42fb5177b9b4bac5c0d3c6a673d9e54f4b5e21056627db1d434c5c76d4f3ede8cc15a109f3cb6'
 
'e74f54224e7fd5f24c3459f34649ce5fddc70886faf7eb8520513d8715b3c17452aab62676b779c136ba576193a09ae3a5471abe51013d7ecd8b37d6e0acd393'
@@ -112,8 +112,8 @@
   msg "Fetching bundled gems..."
   # Gems will be installed into vendor/bundle
 
-  bundle config build.nokogiri --use-system-libraries
-  bundle install -j$(nproc) --no-cache --deployment --without development test 
aws kerberos
+  bundle-2.3 config build.nokogiri --use-system-libraries
+  bundle-2.3 install -j$(nproc) --no-cache --deployment --without development 
test aws kerberos
 
   # We'll temporarily stick this in here so we can build the assets
   cp config/database.yml.postgresql.orig config/database.yml
@@ -120,7 +120,7 @@
   cp config/resque.yml.example config/resque.yml
   sed -i 's/url.*/nope.sock/g' config/resque.yml
 
-  bundle exec rake assets:precompile RAILS_ENV=production --trace
+  bundle-2.3 exec rake assets:precompile RAILS_ENV=production --trace
 
   # After building assets, clean this up again
   rm config/database.yml config/database.yml.postgresql.orig
@@ -164,6 +164,10 @@
 
   sed -i "s|require_relative '../lib|require '${_datadir}/lib|" 
config/application.rb
 
+  # Fix for ruby-2.3 and bundle-2.3
+  sed -i "s|bundle|bundle-2.3|g" 
"${pkgdir}${_datadir}/lib/tasks/gitlab/check.rake"
+  grep -rl "bin/env ruby" "${pkgdir}${_datadir}" | xargs sed -i "s|bin/env 
ruby$|bin/env ruby-2.3|g"
+
   # Install config files
   for config_file in application.rb gitlab.yml unicorn.rb resque.yml; do
 mv "config/${config_file}" "${pkgdir}${_etcdir}/"

Modified: gitlab.install
===
--- gitlab.install  2017-01-15 22:38:06 UTC (rev 207515)
+++ gitlab.install  2017-01-15 23:14:12 UTC (rev 207516)
@@ -7,15 +7,15 @@
 echo "Copy /usr/share/doc/gitlab/secrets.yml.example to 
/etc/webapps/gitlab/secrets.yml and configure it"
 echo "Copy a database example config from /usr/share/doc/gitlab/ to 
/etc/webapps/gitlab/database.yml and configure it"
 echo "Setup the database:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake gitlab:setup RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.3 exec rake gitlab:setup RAILS_ENV=production\""
 echo "Finally run the following commands to check your installation:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake gitlab:env:info RAILS_ENV=production\""
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake gitlab:check RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.3 exec rake gitlab:env:info RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.3 exec rake gitlab:check RAILS_ENV=production\""
 }
 
 post_upgrade() {
 echo "You should upgrade your database:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake db:migrate RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr

[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2016-08-25 Thread Sven-Hendrik Haase
Date: Thursday, August 25, 2016 @ 20:13:08
  Author: svenstaro
Revision: 187545

upgpkg: gitlab 8.11.0-3

remove ruby-2.1 and bundle-2.1 references

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |   10 +-
 gitlab.install |   10 ++
 2 files changed, 11 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-08-25 20:07:36 UTC (rev 187544)
+++ PKGBUILD2016-08-25 20:13:08 UTC (rev 187545)
@@ -8,7 +8,7 @@
 
 pkgname=gitlab
 pkgver=8.11.0
-pkgrel=2
+pkgrel=3
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README";
@@ -43,10 +43,10 @@
 lighttpd.conf.example)
 install='gitlab.install'
 sha256sums=('8f78e05ad66e68383de198cfc20454675f3518732d609c88e6cc39f8a7c9806c'
-'becafe0f9811fea69a69b8e2739857ef007f0b7e89391229f123c79c285f34f3'
-'fbe5ec709ead1729e4de85f3f036f053b2b14041c540742315ff2d63a7bdd59a'
-'d21d8c961b2834115a1d9c646278782e0d1d1cde2357b58e67bad3a58527'
-'06c9f6575ddaeb9cfb70dd9c6cc50a2e676b0aba42731d1c7793a5ba12a2d4e5'
+'0dabb9c10f6ba49404c13d6be2d0d6cf1bf7e5a0b95f0dea566e33c356997307'
+'a348d69cf0d08a1aa0713deb615815ae5a2305a1a1c386bcee29f49eae446757'
+'e16a68539eeb49d24d2ab4a53ff95e33c67264a674b611c006dc5c8a24f41e0e'
+'f3863b2906526ba487cb594f7fdca926e6dd8b8cfe95dccbba0ff9171ef2bb62'
 'e2539301fe42869d8fdbaa1b53b30076fb436c4220a37e576ed704458f804852'
 'a1ee236a1f3e65cd26d9adb5f636f66fbab68777fd60d1c796cb26036bd0903f'
 '84614a2bfbd734f09c2c91531dd3c13e795186b50c0780a120c8e5bc2a892607'

Modified: gitlab.install
===
--- gitlab.install  2016-08-25 20:07:36 UTC (rev 187544)
+++ gitlab.install  2016-08-25 20:13:08 UTC (rev 187545)
@@ -1,18 +1,20 @@
 post_install() {
 systemd-tmpfiles --create gitlab.conf
 
+echo "Configure your /etc/webapps/gitlab/gitlab.yml"
+echo "Set up your redis to run on /var/run/redis/redis.sock or configure 
gitlab to use redis TCP"
 echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
 echo "Copy /usr/share/doc/gitlab/secrets.yml.example to 
/etc/webapps/gitlab/secrets.yml and configure it"
 echo "Copy a database example config from /usr/share/doc/gitlab/ to 
/etc/webapps/gitlab/database.yml and configure it"
 echo "Setup the database:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:setup RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake gitlab:setup RAILS_ENV=production\""
 echo "Finally run the following commands to check your installation:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:env:info RAILS_ENV=production\""
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:check RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake gitlab:env:info RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake gitlab:check RAILS_ENV=production\""
 }
 
 post_upgrade() {
 echo "You should upgrade your database:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake db:migrate RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle 
exec rake db:migrate RAILS_ENV=production\""
 echo "Afterwards, restart gitlab"
 }


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2016-05-27 Thread Sven-Hendrik Haase
Date: Friday, May 27, 2016 @ 16:31:44
  Author: svenstaro
Revision: 177281

upgpkg: gitlab 8.8.2-2

Fix permissions and env:info

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |4 ++--
 gitlab.install |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-05-27 13:58:28 UTC (rev 177280)
+++ PKGBUILD2016-05-27 14:31:44 UTC (rev 177281)
@@ -8,7 +8,7 @@
 
 pkgname=gitlab
 pkgver=8.8.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README";
@@ -129,7 +129,7 @@
 
   cp -r "${srcdir}/${_srcdir}" "${pkgdir}${_datadir}"
   chown -R 105:105 "${pkgdir}${_datadir}"
-  chmod 750 "${pkgdir}${_datadir}"
+  chmod 755 "${pkgdir}${_datadir}"
 
   install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}"
   install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/satellites"

Modified: gitlab.install
===
--- gitlab.install  2016-05-27 13:58:28 UTC (rev 177280)
+++ gitlab.install  2016-05-27 14:31:44 UTC (rev 177281)
@@ -7,7 +7,7 @@
 echo "Setup the database:"
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:setup RAILS_ENV=production\""
 echo "Finally run the following commands to check your installation:"
-echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:env_info RAILS_ENV=production\""
+echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:env:info RAILS_ENV=production\""
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:check RAILS_ENV=production\""
 }
 


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2016-05-07 Thread Sven-Hendrik Haase
Date: Saturday, May 7, 2016 @ 19:14:28
  Author: svenstaro
Revision: 174214

upgpkg: gitlab 8.7.3-4

Symlink secrets.yml

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |5 -
 gitlab.install |3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-05-07 17:12:30 UTC (rev 174213)
+++ PKGBUILD2016-05-07 17:14:28 UTC (rev 174214)
@@ -8,7 +8,7 @@
 
 pkgname=gitlab
 pkgver=8.7.3
-pkgrel=3
+pkgrel=4
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="https://gitlab.com/gitlab-org/gitlab-ce/tree/master#README";
@@ -166,6 +166,9 @@
   # Install database symlink
   ln -fs "${_etcdir}/database.yml" "${pkgdir}${_datadir}/config/database.yml"
 
+  # Install secrets symlink
+  ln -fs "${_etcdir}/secrets.yml" "${pkgdir}${_datadir}/config/secrets.yml"
+
   # Install license and help files
   mv README.md MAINTENANCE.md CONTRIBUTING.md CHANGELOG 
config/*.{example,mysql,postgresql} "${pkgdir}/usr/share/doc/${pkgname}"
   install -D "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

Modified: gitlab.install
===
--- gitlab.install  2016-05-07 17:12:30 UTC (rev 174213)
+++ gitlab.install  2016-05-07 17:14:28 UTC (rev 174214)
@@ -1,10 +1,11 @@
 post_install() {
 systemd-tmpfiles --create gitlab.conf
 
+echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
+echo "Copy /usr/share/doc/gitlab/secrets.yml.example to 
/etc/webapps/gitlab/secrets.yml and configure it"
 echo "Copy a database example config from /usr/share/doc/gitlab/ to 
/etc/webapps/gitlab/database.yml and configure it"
 echo "Setup the database:"
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:setup RAILS_ENV=production\""
-echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
 echo "Finally run the following commands to check your installation:"
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:env_info RAILS_ENV=production\""
 echo "# su - gitlab -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:check RAILS_ENV=production\""


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2016-05-03 Thread Sven-Hendrik Haase
Date: Tuesday, May 3, 2016 @ 22:54:18
  Author: svenstaro
Revision: 173599

upgpkg: gitlab 8.7.2-2

Generate assets inside of package

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |   21 ++---
 gitlab.install |4 +---
 2 files changed, 11 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-05-03 20:23:45 UTC (rev 173598)
+++ PKGBUILD2016-05-03 20:54:18 UTC (rev 173599)
@@ -8,7 +8,7 @@
 
 pkgname=gitlab
 pkgver=8.7.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="http://gitlab.org/gitlab-ce";
@@ -87,10 +87,6 @@
   sed -e "s|production: unix:/var/run/redis/redis.sock|production: 
redis://localhost:6379|" \
   config/resque.yml.example > config/resque.yml
 
-  msg2 "Patching redis_config path"
-  sed -i "s|require_relative '../lib|require '${_datadir}/lib|g" 
config/application.rb
-  sed -i "s|require_relative \"lib|require \"${_datadir}/lib|g" 
config/mail_room.yml
-
   msg2 "setting up systemd service files ..."
   for service_file in gitlab-sidekiq.service gitlab-unicorn.service 
gitlab.logrotate gitlab-backup.service gitlab-mailroom.service; do
 sed -i "s||${_homedir}|g" "${srcdir}/${service_file}"
@@ -107,6 +103,10 @@
 
   bundle-2.1 config build.nokogiri --use-system-libraries
   bundle-2.1 install -j$(nproc) --no-cache --deployment --without development 
test aws kerberos
+
+  cp config/database.yml.postgresql config/database.yml
+  sed -i '/symlink/d' config/initializers/gitlab_shell_secret_token.rb
+  bundle-2.1 exec rake assets:precompile RAILS_ENV=production
 }
 
 package() {
@@ -118,23 +118,22 @@
   chown -R 105:105 "${pkgdir}${_datadir}"
   chmod 750 "${pkgdir}${_datadir}"
 
-  install -dm750 -o 105 -g 105 "${pkgdir}${_datadir}/www"
-  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/www"
   install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/satellites"
   install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/builds"
+  install -dm750 -o 105 -g 105 "${pkgdir}${_homedir}/uploads"
   install -dm750 -o 105 -g 105 "${pkgdir}${_etcdir}"
   install -dm755 "${pkgdir}/usr/share/doc/${pkgname}"
 
+  touch "${_etcdir}/secret"
+  chmod 600 "${_etcdir}/secret"
+
   ln -fs /run/gitlab "${pkgdir}${_homedir}/pids"
   ln -fs /run/gitlab "${pkgdir}${_homedir}/sockets"
   ln -fs ${_datadir}/log "${pkgdir}${_homedir}/log"
-
   ln -fs "${_etcdir}/secret" "${pkgdir}${_datadir}/.secret"
 
   rm -rf "${pkgdir}${_datadir}/public/uploads" && ln -fs "${_homedir}/uploads" 
"${pkgdir}${_datadir}/public/uploads"
-  rm -rf "${pkgdir}${_datadir}/public/assets" && ln -fs "${_homedir}/assets" 
"${pkgdir}${_datadir}/public/assets"
   rm -rf "${pkgdir}${_datadir}/builds" && ln -fs "${_homedir}/builds" 
"${pkgdir}${_datadir}/builds"
-  # We are using PrivateTmp=true to start unicorn, so this is safe:
   rm -rf "${pkgdir}${_datadir}/tmp" && ln -fs /var/tmp 
"${pkgdir}${_datadir}/tmp"
   rm -rf "${pkgdir}${_datadir}/log" && ln -fs "${_logdir}" 
"${pkgdir}${_datadir}/log"
 
@@ -166,7 +165,7 @@
 
   # Install webserver config templates
   for config_file in apache apache-ssl apache2.2 apache2.2-ssl nginx nginx-ssl 
lighttpd; do
-install -m644 "${srcdir}/${config_file}.conf.example" "${pkgdir}${_etcdir}"
+install -m644 "${srcdir}/${config_file}.conf.example" 
"${pkgdir}/usr/share/doc/${pkgname}"
   done
 }
 

Modified: gitlab.install
===
--- gitlab.install  2016-05-03 20:23:45 UTC (rev 173598)
+++ gitlab.install  2016-05-03 20:54:18 UTC (rev 173599)
@@ -4,8 +4,6 @@
 echo "Copy a database example config from /usr/share/doc/gitlab/ to 
/etc/webapps/gitlab/database.yml and configure it"
 echo "Setup the database:"
 echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:setup RAILS_ENV=production\""
-echo "Compile the assets:"
-echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake assets:precompile RAILS_ENV=production\""
 echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
 echo "Finally run the following commands to check your installation:"
 echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:env_info RAILS_ENV=production\""
@@ -13,7 +11,7 @@
 }
 
 post_upgrade() {
-su - git -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.1 exec 
rake assets:precompile RAILS_ENV=production"
 echo "You should upgrade your database:"
 echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake db:migrate RAILS_ENV=production\""
+echo "Afterwards, restart gitlab"
 }


[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)

2016-05-03 Thread Sven-Hendrik Haase
Date: Tuesday, May 3, 2016 @ 15:04:02
  Author: svenstaro
Revision: 173566

upgpkg: gitlab 8.7.1-4

Fix syntax error

Modified:
  gitlab/trunk/PKGBUILD
  gitlab/trunk/gitlab.install

+
 PKGBUILD   |2 +-
 gitlab.install |   12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-05-03 12:44:09 UTC (rev 173565)
+++ PKGBUILD2016-05-03 13:04:02 UTC (rev 173566)
@@ -8,7 +8,7 @@
 
 pkgname=gitlab
 pkgver=8.7.1
-pkgrel=3
+pkgrel=4
 pkgdesc="Project management and code hosting application"
 arch=('i686' 'x86_64')
 url="http://gitlab.org/gitlab-ce";

Modified: gitlab.install
===
--- gitlab.install  2016-05-03 12:44:09 UTC (rev 173565)
+++ gitlab.install  2016-05-03 13:04:02 UTC (rev 173566)
@@ -1,11 +1,11 @@
 post_install() {
-   systemd-tmpfiles --create gitlab.conf
+systemd-tmpfiles --create gitlab.conf
 
 echo "Copy a database example config from /usr/share/doc/gitlab/ to 
/etc/webapps/gitlab/database.yml and configure it"
 echo "Setup the database:"
-   echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:setup RAILS_ENV=production\""
-   echo "Compile the assets:"
-   echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake assets:precompile RAILS_ENV=production\""
+echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:setup RAILS_ENV=production\""
+echo "Compile the assets:"
+echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake assets:precompile RAILS_ENV=production\""
 echo "Put a secret bytestring to /etc/webapps/gitlab/secret"
 echo "Finally run the following commands to check your installation:"
 echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake gitlab:env_info RAILS_ENV=production\""
@@ -13,7 +13,7 @@
 }
 
 post_upgrade() {
-   su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; bundle-2.1 
exec rake assets:precompile RAILS_ENV=production\"
+su - git -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.1 exec 
rake assets:precompile RAILS_ENV=production"
 echo "You should upgrade your database:"
-   echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake db:migrate RAILS_ENV=production\""
+echo "# su - git -s /bin/sh -c \"cd '/usr/share/webapps/gitlab'; 
bundle-2.1 exec rake db:migrate RAILS_ENV=production\""
 }