Merge tag 'debian/12.9.2-5' into buster-fasttrack
gitlab Debian release 12.9.2-5
This commit is contained in:
commit
a7bb45eb22
12 changed files with 16 additions and 328 deletions
20
debian/adduser.sh
vendored
20
debian/adduser.sh
vendored
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# add gitlab user (requires adduser >= 3.34)
|
||||
# don't muck around with this unless you KNOW what you're doing
|
||||
|
||||
# Take gitlab_user from envornment variable or use gitlab
|
||||
test -n "${gitlab_user}" || gitlab_user="gitlab"
|
||||
|
||||
# Take gitlab_data_dir from envornment variable or use /var/lib/gitlab
|
||||
test -n "${gitlab_data_dir}" || gitlab_data_dir="/var/lib/gitlab"
|
||||
|
||||
# Create gitlab user with home in /var/lib
|
||||
echo "Creating/updating ${gitlab_user} user account..."
|
||||
adduser --system --home /var/lib/gitlab --gecos "${gitlab_user} user" --shell /bin/sh \
|
||||
--quiet --disabled-password --group ${gitlab_user} || {
|
||||
echo "Proceeding with existing ${gitlab_user} user..."
|
||||
}
|
||||
|
||||
# Give gitlab_user ownership of gitlab_data_dir
|
||||
chown ${gitlab_user} ${gitlab_data_dir}
|
13
debian/changelog
vendored
13
debian/changelog
vendored
|
@ -1,3 +1,16 @@
|
|||
gitlab (12.9.2-5) experimental; urgency=medium
|
||||
|
||||
[ vv221 ]
|
||||
* Build assets generated by webpack in production mode (Closes: #956508,
|
||||
#927297)
|
||||
|
||||
[ Pirate Praveen ]
|
||||
* Drop gitlab-common binary (moved to src:gitaly)
|
||||
* Drop work around for missing assets/select2.png (not required in
|
||||
NODE_ENV=production mode for webpack)
|
||||
|
||||
-- Pirate Praveen <praveen@debian.org> Sun, 12 Apr 2020 17:52:22 +0530
|
||||
|
||||
gitlab (12.9.2-4+fto10+1) buster-fasttrack; urgency=medium
|
||||
|
||||
* Rebuild for buster-fasttrack.
|
||||
|
|
24
debian/conf/gitlab-common.defaults
vendored
24
debian/conf/gitlab-common.defaults
vendored
|
@ -1,24 +0,0 @@
|
|||
gitlab_common_conf_private=/var/lib/gitlab-common/gitlab-common.conf
|
||||
gitlab_common_conf=/etc/gitlab-common/gitlab-common.conf
|
||||
gitlab_debian_conf_example=/usr/lib/gitlab/templates/gitlab-debian.conf.example
|
||||
gitlab_debian_conf_private=/var/lib/gitlab/gitlab-debian.conf
|
||||
gitlab_debian_conf=/etc/gitlab/gitlab-debian.conf
|
||||
gitlab_cache_path=/var/cache/gitlab
|
||||
gitlab_scripts=/usr/lib/gitlab/scripts
|
||||
gitlab_yml_example=/usr/lib/gitlab/templates/gitlab.yml.example
|
||||
gitlab_yml_private=/var/lib/gitlab/gitlab.yml
|
||||
gitlab_yml=/etc/gitlab/gitlab.yml
|
||||
gitlab_shell_config_example=/usr/lib/gitlab-shell/config.yml.example
|
||||
gitlab_shell_config_private=/var/lib/gitlab/gitlab-shell-config.yml
|
||||
gitlab_shell_config=/etc/gitlab-shell/config.yml
|
||||
gitlab_nginx_log=/var/log/gitlab
|
||||
gitlab_ssl_path=/etc/gitlab/ssl
|
||||
gitlab_shell_root=/usr/share/gitlab-shell
|
||||
gitlab_shell_log=/var/log/gitlab-shell
|
||||
gitlab_common_tmpfiles_example=/usr/lib/gitlab-common/templates/tmpfiles.d/gitlab-common.conf.example
|
||||
gitlab_common_tmpfiles_private=/var/lib/gitlab/tmpfiles.d-gitlab-common.conf
|
||||
gitlab_common_tmpfiles=/usr/lib/tmpfiles.d/gitlab-common.conf
|
||||
nginx_user=www-data
|
||||
nginx_conf_example=/usr/lib/gitlab/templates/nginx.conf.example
|
||||
nginx_ssl_conf_example=/usr/lib/gitlab/templates/nginx.ssl.conf.example
|
||||
nginx_site_private=/var/lib/gitlab/nginx.conf
|
|
@ -1 +0,0 @@
|
|||
d /run/gitlab 2750 GITLAB_USER www-data -
|
18
debian/control
vendored
18
debian/control
vendored
|
@ -417,20 +417,4 @@ Description: git powered software platform to collaborate on code (non-omnibus)
|
|||
omnibus.
|
||||
.
|
||||
Note: Currently this package is in contrib because it uses yarn to install
|
||||
front end dependencies.
|
||||
|
||||
Package: gitlab-common
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
ruby | ruby-interpreter,
|
||||
adduser (>= 3.34~),
|
||||
git (>= 1:2.24~),
|
||||
ucf,
|
||||
gitlab-shell (>= 12.0~)
|
||||
Description: git powered software platform to collaborate on code (common)
|
||||
gitlab provides web based interface to host source code and track issues.
|
||||
It allows anyone for fork a repository and send merge requests. Code review
|
||||
is possible using merge request workflow. Using groups and roles project
|
||||
access can be controlled.
|
||||
.
|
||||
This package includes configurations common to gitlab and gitaly.
|
||||
some of its front end dependencies.
|
||||
|
|
22
debian/gitlab-common.config
vendored
22
debian/gitlab-common.config
vendored
|
@ -1,22 +0,0 @@
|
|||
#!/bin/sh
|
||||
# config maintainer script for gitlab
|
||||
|
||||
CONFIGFILE=/etc/gitlab-common/gitlab-common.conf
|
||||
|
||||
set -e
|
||||
|
||||
# source debconf stuffs
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
# Load config file, if it exists.
|
||||
if [ -e $CONFIGFILE ]; then
|
||||
. $CONFIGFILE || true
|
||||
|
||||
# Store values from config file into
|
||||
# debconf db.
|
||||
db_set gitlab-common/user "$gitlab_user"
|
||||
fi
|
||||
|
||||
# Do you want to change gitlab user?
|
||||
db_input high gitlab-common/user || true
|
||||
db_go
|
2
debian/gitlab-common.dirs
vendored
2
debian/gitlab-common.dirs
vendored
|
@ -1,2 +0,0 @@
|
|||
/var/lib/gitlab-common
|
||||
/etc/gitlab-common
|
3
debian/gitlab-common.install
vendored
3
debian/gitlab-common.install
vendored
|
@ -1,3 +0,0 @@
|
|||
debian/adduser.sh usr/lib/gitlab-common/scripts
|
||||
debian/conf/gitlab-common.defaults usr/lib/gitlab-common
|
||||
debian/conf/tmpfiles.d/gitlab-common.conf.example usr/lib/gitlab-common/templates/tmpfiles.d
|
85
debian/gitlab-common.postinst
vendored
85
debian/gitlab-common.postinst
vendored
|
@ -1,85 +0,0 @@
|
|||
#! /bin/sh
|
||||
# postinst script for gitlab
|
||||
# copied from postinst script for hplip
|
||||
# $Id: hplip.postinst,v 1.1 2005/10/15 21:39:04 hmh Exp $
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# Show debconf questions
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
gitlab_common_defaults=/usr/lib/gitlab-common/gitlab-common.defaults
|
||||
gitlab_common_defaults_copy=/var/lib/gitlab-common/gitlab-common.defaults
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
#
|
||||
# quoting from the policy:
|
||||
# Any necessary prompting should almost always be confined to the
|
||||
# post-installation script, and should be protected with a conditional
|
||||
# so that unnecessary prompting doesn't happen if a package's
|
||||
# installation fails and the `postinst' is called with `abort-upgrade',
|
||||
# `abort-remove' or `abort-deconfigure'.
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Read default values
|
||||
. ${gitlab_common_defaults}
|
||||
|
||||
# Copy defaults for use with postrm
|
||||
cp ${gitlab_common_defaults} ${gitlab_common_defaults_copy}
|
||||
|
||||
# Read gitlab_user from debconf db
|
||||
db_get gitlab-common/user
|
||||
gitlab_user=$RET >/dev/null
|
||||
|
||||
# Create gitlab user
|
||||
. /usr/lib/gitlab-common/scripts/adduser.sh
|
||||
|
||||
# Keep config file and debconf db in sync
|
||||
touch ${gitlab_common_conf_private}
|
||||
test -z "$gitlab_user" || grep -Eq '^ *gitlab_user=' ${gitlab_common_conf_private} || \
|
||||
echo "gitlab_user=" >> ${gitlab_common_conf_private}
|
||||
sed -e "s/^ *gitlab_user=.*/gitlab_user=\"$gitlab_user\"/" \
|
||||
< ${gitlab_common_conf_private} > ${gitlab_common_conf_private}.tmp
|
||||
mv -f ${gitlab_common_conf_private}.tmp ${gitlab_common_conf_private}
|
||||
|
||||
echo "Registering ${gitlab_common_conf} via ucf"
|
||||
ucf --debconf-ok --three-way ${gitlab_common_conf_private} ${gitlab_common_conf}
|
||||
ucfr gitlab-common ${gitlab_common_conf}
|
||||
|
||||
# Manage tmpfiles.d/gitlab-common.conf via ucf
|
||||
cp ${gitlab_common_tmpfiles_example} ${gitlab_common_tmpfiles_private}
|
||||
sed -i "s/GITLAB_USER/${gitlab_user}/" ${gitlab_common_tmpfiles_private}
|
||||
echo "Registering ${gitlab_common_tmpfiles} via ucf"
|
||||
ucf --debconf-ok --three-way ${gitlab_common_tmpfiles_private} ${gitlab_common_tmpfiles}
|
||||
ucfr gitlab-common ${gitlab_common_tmpfiles}
|
||||
;;
|
||||
|
||||
triggered)
|
||||
# Already handled
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
db_stop
|
||||
|
||||
#DEBHELPER#
|
136
debian/gitlab-common.postrm
vendored
136
debian/gitlab-common.postrm
vendored
|
@ -1,136 +0,0 @@
|
|||
#! /bin/sh
|
||||
# postrm.skeleton
|
||||
# Skeleton maintainer script showing all the possible cases.
|
||||
# Written by Charles Briscoe-Smith, March-June 1998. Public Domain.
|
||||
|
||||
# Abort if any command returns an error value
|
||||
set -e
|
||||
|
||||
# Set variables
|
||||
gitlab_common_defaults_copy=/var/lib/gitlab-common/gitlab-common.defaults
|
||||
|
||||
# This script is called twice during the removal of the package; once
|
||||
# after the removal of the package's files from the system, and as
|
||||
# the final step in the removal of this package, after the package's
|
||||
# conffiles have been removed.
|
||||
|
||||
# Ensure the menu system is updated
|
||||
|
||||
# Read debian specific configuration
|
||||
if [ -f ${gitlab_common_defaults_copy} ]; then . ${gitlab_common_defaults_copy}; fi
|
||||
if [ -f ${gitlab_common_conf} ]; then . ${gitlab_common_conf}; fi
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
# This package is being removed, but its configuration has not yet
|
||||
# been purged.
|
||||
:
|
||||
|
||||
# Remove diversion
|
||||
# ldconfig is NOT needed during removal of a library, only during
|
||||
# installation
|
||||
|
||||
;;
|
||||
purge)
|
||||
# This package has previously been removed and is now having
|
||||
# its configuration purged from the system.
|
||||
:
|
||||
# purge debconf questions
|
||||
if [ -e /usr/share/debconf/confmodule ]; then
|
||||
# Source debconf library.
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
if [ ! -z "${gitlab_user}" ]; then
|
||||
# Do only if gitlab_user is set
|
||||
echo "Removing user: ${gitlab_user}"
|
||||
if id -u ${gitlab_user}; then userdel -r ${gitlab_user}; fi
|
||||
else
|
||||
echo "gitlab_user not set. Hence not removing user."
|
||||
fi
|
||||
# Remove private copies of configuration files
|
||||
rm -f ${gitlab_common_conf_private}
|
||||
rm -f ${gitlab_common_defaults_copy}
|
||||
|
||||
# Remove my changes to the db.
|
||||
db_purge
|
||||
fi
|
||||
|
||||
# we mimic dpkg as closely as possible, so we remove configuration
|
||||
# files with dpkg backup extensions too:
|
||||
### Some of the following is from Tore Anderson:
|
||||
for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
|
||||
rm -f ${gitlab_common_conf}$ext
|
||||
done
|
||||
|
||||
# Remove conf file
|
||||
if which ucf >/dev/null; then
|
||||
if [ -n "${gitlab_common_conf}" ]; then ucf --purge ${gitlab_common_conf}; fi
|
||||
fi
|
||||
if which ucfr >/dev/null; then
|
||||
if [ -n "${gitlab_common_conf}" ]; then ucfr --purge gitlab-common ${gitlab_common_conf}; fi
|
||||
fi
|
||||
rm -f ${gitlab_common_conf}
|
||||
|
||||
# cleanup complete
|
||||
exit 0
|
||||
|
||||
;;
|
||||
disappear)
|
||||
if test "$2" != overwriter; then
|
||||
echo "$0: undocumented call to \`postrm $*'" 1>&2
|
||||
exit 0
|
||||
fi
|
||||
# This package has been completely overwritten by package $3
|
||||
# (version $4). All our files are already gone from the system.
|
||||
# This is a special case: neither "prerm remove" nor "postrm remove"
|
||||
# have been called, because dpkg didn't know that this package would
|
||||
# disappear until this stage.
|
||||
:
|
||||
|
||||
;;
|
||||
upgrade)
|
||||
# About to upgrade FROM THIS VERSION to version $2 of this package.
|
||||
# "prerm upgrade" has been called for this version, and "preinst
|
||||
# upgrade" has been called for the new version. Last chance to
|
||||
# clean up.
|
||||
:
|
||||
|
||||
;;
|
||||
failed-upgrade)
|
||||
# About to upgrade from version $2 of this package TO THIS VERSION.
|
||||
# "prerm upgrade" has been called for the old version, and "preinst
|
||||
# upgrade" has been called for this version. This is only used if
|
||||
# the previous version's "postrm upgrade" couldn't handle it and
|
||||
# returned non-zero. (Fix old postrm bugs here.)
|
||||
:
|
||||
|
||||
;;
|
||||
abort-install)
|
||||
# Back out of an attempt to install this package. Undo the effects of
|
||||
# "preinst install...". There are two sub-cases.
|
||||
:
|
||||
|
||||
if test "${2+set}" = set; then
|
||||
# When the install was attempted, version $2's configuration
|
||||
# files were still on the system. Undo the effects of "preinst
|
||||
# install $2".
|
||||
:
|
||||
|
||||
else
|
||||
# We were being installed from scratch. Undo the effects of
|
||||
# "preinst install".
|
||||
:
|
||||
|
||||
fi ;;
|
||||
abort-upgrade)
|
||||
# Back out of an attempt to upgrade this package from version $2
|
||||
# TO THIS VERSION. Undo the effects of "preinst upgrade $2".
|
||||
:
|
||||
|
||||
;;
|
||||
*) echo "$0: didn't understand being called with \`$1'" 1>&2
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
exit 0
|
11
debian/gitlab-common.templates
vendored
11
debian/gitlab-common.templates
vendored
|
@ -1,11 +0,0 @@
|
|||
Template: gitlab-common/user
|
||||
Type: string
|
||||
Default: gitlab
|
||||
_Description: Operating System user for this instance of Gitlab:
|
||||
Please choose the username of the user used to run this instance of Gitlab.
|
||||
.
|
||||
This username will also be used in SSH urls of projects hosted with this
|
||||
instance of Gitlab. For example, git@git.example.com:foo/bar.git
|
||||
.
|
||||
Note: Do not reuse any existing system users like www-data, it will not have
|
||||
the permissions required to run the Gitlab instance.
|
9
debian/rake-tasks.sh
vendored
9
debian/rake-tasks.sh
vendored
|
@ -41,12 +41,7 @@ runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake gettext:po_to_json
|
|||
echo "Precompiling assets..."
|
||||
runuser -u ${gitlab_user} -- sh -c '/usr/bin/bundle exec rake tmp:cache:clear assets:precompile'
|
||||
|
||||
# Workaround for https://gitlab.com/gitlab-org/gitlab/-/issues/213245
|
||||
echo "Adding symbolic link for assets/select2.png..."
|
||||
runuser -u ${gitlab_user} -- sh -c 'cd /usr/share/gitlab/public/assets && \
|
||||
if ! [ -f select2.png ]; then \
|
||||
ln -s select2-d6b5d8d83dbc18fb8d77c8761d331cd9e5123c9684950bab0406e98a24ac5ae8.png select2.png; fi'
|
||||
|
||||
echo "Webpacking..."
|
||||
# Workaround for webpack crashing with nodejs 10 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956211
|
||||
runuser -u ${gitlab_user} -- sh -c 'NODE_OPTIONS="--max-old-space-size=2048" webpack --config config/webpack.config.js'
|
||||
# Build assets in production mode - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=956508
|
||||
runuser -u ${gitlab_user} -- sh -c 'NODE_ENV="production" NODE_OPTIONS="--max-old-space-size=4096" webpack --config config/webpack.config.js'
|
||||
|
|
Loading…
Reference in a new issue