[arch-commits] Commit in gitlab/trunk (PKGBUILD gitlab.install)
Sven-Hendrik Haase
svenstaro at archlinux.org
Tue May 3 20:54:18 UTC 2016
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
===================================================================
--- PKGBUILD 2016-05-03 20:23:45 UTC (rev 173598)
+++ PKGBUILD 2016-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>|${_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"
}
More information about the arch-commits
mailing list