mirror of
https://gitlab.com/packaging/gitea
synced 2025-04-06 16:17:05 +00:00
Compare commits
No commits in common. "master" and "1.11.4-p1" have entirely different histories.
179
.gitlab-ci.yml
179
.gitlab-ci.yml
@ -1,191 +1,88 @@
|
|||||||
---
|
|
||||||
stages:
|
stages:
|
||||||
- package
|
- package
|
||||||
- test
|
|
||||||
- repo
|
- repo
|
||||||
- pages
|
- pages
|
||||||
|
|
||||||
.vars: &vars
|
package:
|
||||||
NAME: gitea
|
|
||||||
URL: "https://gitea.io"
|
|
||||||
DESCRIPTION: "A painless self-hosted Git service."
|
|
||||||
ARTIFACTS: "usr"
|
|
||||||
|
|
||||||
.package: &package
|
|
||||||
stage: package
|
stage: package
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
|
variables:
|
||||||
|
NAME: gitea
|
||||||
|
URL: "https://gitea.io"
|
||||||
|
DESCRIPTION: "A painless self-hosted Git service."
|
||||||
|
ARTIFACTS: "usr"
|
||||||
script:
|
script:
|
||||||
- export VERSION=$(echo ${CI_COMMIT_TAG#*v} | cut -d'+' -f1)
|
- export VERSION=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f1)
|
||||||
- export PATCHLEVEL=$(echo ${CI_COMMIT_TAG} | cut -d'+' -f2)
|
- export PATCHLEVEL=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f2)
|
||||||
- apt-get -qq update
|
- apt-get -qq update
|
||||||
- apt-get -qqy install ruby-dev ruby-ffi curl file
|
- apt-get -qqy install ruby-dev ruby-ffi curl
|
||||||
- gem install fpm
|
- gem install specific_install
|
||||||
|
- gem specific_install https://github.com/root360/fpm.git all_fixes
|
||||||
- mkdir -p "${CI_PROJECT_DIR}/package_root/usr/bin"
|
- mkdir -p "${CI_PROJECT_DIR}/package_root/usr/bin"
|
||||||
- echo "https://dl.gitea.com/gitea/${VERSION}/gitea-${VERSION}-linux-${ARCH}"
|
- curl -sL -o "${CI_PROJECT_DIR}/package_root/usr/bin/gitea" "https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64"
|
||||||
- curl -sL -o
|
|
||||||
"${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
|
||||||
"https://dl.gitea.com/gitea/${VERSION}/gitea-${VERSION}-linux-${ARCH}"
|
|
||||||
- file
|
|
||||||
--mime-type
|
|
||||||
--brief
|
|
||||||
"${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
|
||||||
| grep -q 'application/x-executable'
|
|
||||||
- chmod +x "${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
- chmod +x "${CI_PROJECT_DIR}/package_root/usr/bin/gitea"
|
||||||
- gem install fpm
|
|
||||||
- fpm
|
- fpm
|
||||||
--architecture "${ARCH}"
|
|
||||||
--input-type dir
|
--input-type dir
|
||||||
--output-type deb
|
--output-type deb
|
||||||
--package "${CI_PROJECT_DIR}/gitea_${VERSION}+${PATCHLEVEL}_${ARCH}.deb"
|
--package "${CI_PROJECT_DIR}/gitea_${VERSION}-p${PATCHLEVEL}_amd64.deb"
|
||||||
--name "${NAME}"
|
--name "${NAME}"
|
||||||
--version "${VERSION}+${PATCHLEVEL}"
|
--version "${VERSION}-p${PATCHLEVEL}"
|
||||||
--description "${DESCRIPTION}"
|
--description "${DESCRIPTION}"
|
||||||
--maintainer "Stefan Heitmüller <stefan.heitmueller@gmx.com>"
|
--maintainer "Stefan Heitmüller <stefan.heitmueller@gmx.com>"
|
||||||
--url "${URL}"
|
--url "${URL}"
|
||||||
--depends git
|
--depends git
|
||||||
--deb-recommends morph027-keyring
|
--deb-systemd "${CI_PROJECT_DIR}/package_root/usr/lib/systemd/system/${NAME}.service"
|
||||||
--deb-systemd "${CI_PROJECT_DIR}/.packaging/${NAME}.service"
|
--deb-systemd-enable
|
||||||
|
--deb-systemd-auto-start
|
||||||
--deb-activate-noawait /etc/init.d
|
--deb-activate-noawait /etc/init.d
|
||||||
--prefix=/
|
--prefix=/
|
||||||
--before-install "${CI_PROJECT_DIR}/.packaging/before-install.sh"
|
--after-install "${CI_PROJECT_DIR}/package_scripts/after-install.sh"
|
||||||
--chdir "${CI_PROJECT_DIR}/package_root"
|
--chdir "${CI_PROJECT_DIR}/package_root"
|
||||||
$ARTIFACTS
|
$ARTIFACTS
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/*.deb
|
- $CI_PROJECT_DIR/*.deb
|
||||||
expire_in: 7 days
|
|
||||||
|
|
||||||
.manual: &manual
|
|
||||||
when: manual
|
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
.trigger: &trigger
|
reprepro:
|
||||||
when: delayed
|
|
||||||
start_in: 2 hours
|
|
||||||
only:
|
|
||||||
- triggers
|
|
||||||
|
|
||||||
gitea-amd64-tag:
|
|
||||||
<<: [*package, *manual]
|
|
||||||
variables:
|
|
||||||
<<: *vars
|
|
||||||
ARCH: amd64
|
|
||||||
|
|
||||||
gitea-amd64-trigger:
|
|
||||||
<<: [*package, *trigger]
|
|
||||||
variables:
|
|
||||||
<<: *vars
|
|
||||||
ARCH: amd64
|
|
||||||
|
|
||||||
gitea-arm64-tag:
|
|
||||||
<<: [*package, *manual]
|
|
||||||
variables:
|
|
||||||
<<: *vars
|
|
||||||
ARCH: arm64
|
|
||||||
|
|
||||||
gitea-arm64-trigger:
|
|
||||||
<<: [*package, *trigger]
|
|
||||||
variables:
|
|
||||||
<<: *vars
|
|
||||||
ARCH: arm64
|
|
||||||
|
|
||||||
.test-install: &test-install
|
|
||||||
stage: test
|
|
||||||
image: ubuntu:noble
|
|
||||||
script:
|
|
||||||
- ./.gitlab-ci/test-install.sh
|
|
||||||
|
|
||||||
.test-update: &test-update
|
|
||||||
stage: test
|
|
||||||
image: ubuntu:noble
|
|
||||||
script:
|
|
||||||
- ./.gitlab-ci/test-update.sh
|
|
||||||
|
|
||||||
test-install-trigger:
|
|
||||||
<<: *test-install
|
|
||||||
needs:
|
|
||||||
- gitea-amd64-trigger
|
|
||||||
only:
|
|
||||||
- trigger
|
|
||||||
|
|
||||||
test-install-tag:
|
|
||||||
<<: *test-install
|
|
||||||
needs:
|
|
||||||
- gitea-amd64-tag
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
test-update-trigger:
|
|
||||||
<<: *test-update
|
|
||||||
needs:
|
|
||||||
- gitea-amd64-trigger
|
|
||||||
only:
|
|
||||||
- trigger
|
|
||||||
|
|
||||||
test-update-tag:
|
|
||||||
<<: *test-update
|
|
||||||
needs:
|
|
||||||
- gitea-amd64-tag
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
.repro: &repo
|
|
||||||
cache:
|
cache:
|
||||||
untracked: true
|
untracked: true
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/.repo
|
- $CI_PROJECT_DIR/repo
|
||||||
key: repo
|
key: reprepro
|
||||||
stage: repo
|
stage: repo
|
||||||
image: registry.gitlab.com/packaging/utils:latest
|
image: registry.gitlab.com/packaging/reprepro-multiple-versions:latest
|
||||||
script:
|
script:
|
||||||
- /deb.sh gitea
|
- echo "$SIGNING_KEY" > /tmp/key
|
||||||
|
- gpg --import /tmp/key
|
||||||
repo-apt-tag:
|
- rm -f /tmp/key
|
||||||
<<: [*repo]
|
- test -f $CI_PROJECT_DIR/repo/gpg.key || gpg --export --armor "$SIGNING_KEY_ID" > $CI_PROJECT_DIR/repo/gpg.key
|
||||||
needs:
|
- sed -i 's,##SIGNING_KEY_ID##,'$SIGNING_KEY_ID',' repo/conf/distributions
|
||||||
- gitea-amd64-tag
|
- find $CI_PROJECT_DIR -type f -name "*.deb" -exec
|
||||||
- gitea-arm64-tag
|
reprepro
|
||||||
- test-install-tag
|
-b $CI_PROJECT_DIR/repo
|
||||||
- test-update-tag
|
includedeb
|
||||||
rules:
|
gitea
|
||||||
- if: $CI_COMMIT_TAG && $CI_PIPELINE_SOURCE != "trigger"
|
{} \+;
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
repo-apt-trigger:
|
|
||||||
<<: [*repo]
|
|
||||||
needs:
|
|
||||||
- gitea-amd64-trigger
|
|
||||||
- gitea-arm64-trigger
|
|
||||||
- test-install-trigger
|
|
||||||
- test-update-trigger
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_TAG && $CI_PIPELINE_SOURCE == "trigger"
|
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
cache:
|
cache:
|
||||||
untracked: true
|
untracked: true
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/.repo
|
- $CI_PROJECT_DIR/repo
|
||||||
key: repo
|
key: reprepro
|
||||||
policy: pull
|
policy: pull
|
||||||
stage: pages
|
stage: pages
|
||||||
image: ubuntu:focal
|
image: ubuntu:focal
|
||||||
needs:
|
|
||||||
- job: repo-apt-tag
|
|
||||||
optional: true
|
|
||||||
- job: repo-apt-trigger
|
|
||||||
optional: true
|
|
||||||
script:
|
script:
|
||||||
- mkdir $CI_PROJECT_DIR/public
|
- mkdir $CI_PROJECT_DIR/public
|
||||||
- cp -rv
|
- cp -r $CI_PROJECT_DIR/repo/gpg.key $CI_PROJECT_DIR/repo/dists $CI_PROJECT_DIR/repo/pool $CI_PROJECT_DIR/public/
|
||||||
$CI_PROJECT_DIR/.repo/deb/gpg.key
|
|
||||||
$CI_PROJECT_DIR/.repo/deb/gitea/gitea/{dists,pool}
|
|
||||||
$CI_PROJECT_DIR/public/
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- $CI_PROJECT_DIR/public
|
- $CI_PROJECT_DIR/public
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
- triggers
|
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
APP_NAME = Gitea: Git with a cup of tea
|
|
||||||
RUN_USER = gitea
|
|
||||||
RUN_MODE = prod
|
|
||||||
|
|
||||||
[oauth2]
|
|
||||||
JWT_SECRET = ZNx_gU2J4h3LaVbsKnH8uF2w7N6zpz3OY9hutxY1KUM
|
|
||||||
|
|
||||||
[security]
|
|
||||||
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1OTI2NTUwNjJ9.cd4bdwfg3nK0cDb_1abVCp54skt40CgSh5gN4ltgGBE
|
|
||||||
INSTALL_LOCK = true
|
|
||||||
SECRET_KEY = 8Az2FqMaPXLFaUUT6isOZpiXATm60Wv2SLjxPBtObOnHYfCsPDmIXLugLEEpM5Wl
|
|
||||||
|
|
||||||
[database]
|
|
||||||
DB_TYPE = sqlite3
|
|
||||||
HOST = 127.0.0.1:5432
|
|
||||||
NAME = gitea
|
|
||||||
USER = gitea
|
|
||||||
PASSWD =
|
|
||||||
SSL_MODE = disable
|
|
||||||
CHARSET = utf8
|
|
||||||
PATH = /var/lib/gitea/data/gitea.db
|
|
||||||
|
|
||||||
[repository]
|
|
||||||
ROOT = /var/lib/gitea/gitea-repositories
|
|
||||||
|
|
||||||
[server]
|
|
||||||
SSH_DOMAIN = localhost
|
|
||||||
DOMAIN = localhost
|
|
||||||
HTTP_PORT = 3000
|
|
||||||
ROOT_URL = http://localhost:3000/
|
|
||||||
DISABLE_SSH = false
|
|
||||||
SSH_PORT = 22
|
|
||||||
LFS_START_SERVER = true
|
|
||||||
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
|
|
||||||
LFS_JWT_SECRET = TYm7pYjpik1bAJeZUMCsJGedKDQHvOi3cZdu36xMotk
|
|
||||||
OFFLINE_MODE = false
|
|
||||||
|
|
||||||
[mailer]
|
|
||||||
ENABLED = false
|
|
||||||
|
|
||||||
[service]
|
|
||||||
REGISTER_EMAIL_CONFIRM = false
|
|
||||||
ENABLE_NOTIFY_MAIL = false
|
|
||||||
DISABLE_REGISTRATION = false
|
|
||||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = false
|
|
||||||
ENABLE_CAPTCHA = false
|
|
||||||
REQUIRE_SIGNIN_VIEW = false
|
|
||||||
DEFAULT_KEEP_EMAIL_PRIVATE = false
|
|
||||||
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
|
|
||||||
DEFAULT_ENABLE_TIMETRACKING = true
|
|
||||||
NO_REPLY_ADDRESS = noreply.localhost
|
|
||||||
|
|
||||||
[picture]
|
|
||||||
DISABLE_GRAVATAR = false
|
|
||||||
ENABLE_FEDERATED_AVATAR = true
|
|
||||||
|
|
||||||
[openid]
|
|
||||||
ENABLE_OPENID_SIGNIN = true
|
|
||||||
ENABLE_OPENID_SIGNUP = true
|
|
||||||
|
|
||||||
[session]
|
|
||||||
PROVIDER = file
|
|
||||||
|
|
||||||
[log]
|
|
||||||
MODE = file
|
|
||||||
LEVEL = info
|
|
||||||
ROOT_PATH = /var/lib/gitea/log
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: gitea
|
|
||||||
# Required-Start: $syslog $network
|
|
||||||
# Required-Stop: $syslog
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
# Short-Description: A self-hosted Git service written in Go.
|
|
||||||
# Description: A self-hosted Git service written in Go.
|
|
||||||
### END INIT INFO
|
|
||||||
|
|
||||||
# Do NOT "set -e"
|
|
||||||
|
|
||||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
|
|
||||||
DESC="Gitea - Git with a cup of tea"
|
|
||||||
NAME=gitea
|
|
||||||
SERVICEVERBOSE=yes
|
|
||||||
PIDFILE=/run/$NAME.pid
|
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
|
||||||
WORKINGDIR=/var/lib/$NAME
|
|
||||||
DAEMON=/usr/bin/$NAME
|
|
||||||
DAEMON_ARGS="web -c /etc/$NAME/app.ini"
|
|
||||||
USER=gitea
|
|
||||||
STOP_SCHEDULE="${STOP_SCHEDULE:-QUIT/5/TERM/1/KILL/5}"
|
|
||||||
|
|
||||||
# Read configuration variable file if it is present
|
|
||||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
|
||||||
|
|
||||||
# Exit if the package is not installed
|
|
||||||
[ -x "$DAEMON" ] || exit 0
|
|
||||||
|
|
||||||
do_start()
|
|
||||||
{
|
|
||||||
GITEA_ENVS="USER=$USER GITEA_WORK_DIR=$WORKINGDIR HOME=/var/lib/$USER"
|
|
||||||
GITEA_EXEC="$DAEMON -- $DAEMON_ARGS"
|
|
||||||
sh -c "start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile \\
|
|
||||||
--background --chdir $WORKINGDIR --chuid $USER \\
|
|
||||||
--exec /bin/bash -- -c '/usr/bin/env $GITEA_ENVS $GITEA_EXEC'"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_stop()
|
|
||||||
{
|
|
||||||
start-stop-daemon --stop --quiet --retry=$STOP_SCHEDULE --pidfile $PIDFILE --name $NAME --oknodo
|
|
||||||
rm -f $PIDFILE
|
|
||||||
}
|
|
||||||
|
|
||||||
do_status()
|
|
||||||
{
|
|
||||||
if [ -f $PIDFILE ]; then
|
|
||||||
if kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
|
|
||||||
echo "$NAME is running, PID is $(cat $PIDFILE)"
|
|
||||||
else
|
|
||||||
echo "$NAME process is dead, but pidfile exists"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$NAME is not running"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
echo "Starting $DESC" "$NAME"
|
|
||||||
do_start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
echo "Stopping $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
do_status
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
echo "Restarting $DESC" "$NAME"
|
|
||||||
do_stop
|
|
||||||
do_start
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2
|
|
||||||
exit 2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
. "${CI_PROJECT_DIR}/.gitlab-ci/test.sh"
|
|
||||||
|
|
||||||
apt-get -y install "${CI_PROJECT_DIR}/gitea_${VERSION}+${PATCHLEVEL}_amd64.deb"
|
|
||||||
start_gitea
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
. "${CI_PROJECT_DIR}/.gitlab-ci/test.sh"
|
|
||||||
|
|
||||||
curl -sL -o /etc/apt/trusted.gpg.d/morph027-gitea.asc https://packaging.gitlab.io/gitea/gpg.key
|
|
||||||
echo "deb [arch=amd64] https://packaging.gitlab.io/gitea gitea main" > /etc/apt/sources.list.d/morph027-gitea.list
|
|
||||||
apt-get update
|
|
||||||
apt-get -y install gitea
|
|
||||||
install -o gitea -g gitea -m 644 "/${CI_PROJECT_DIR}/.gitlab-ci/app.ini" /etc/gitea/app.ini
|
|
||||||
start_gitea
|
|
||||||
curl -s localhost:3000/api/v1/version | jq -e '.version'
|
|
||||||
apt-get -y --allow-downgrades install "${CI_PROJECT_DIR}/gitea_${VERSION}+${PATCHLEVEL}_amd64.deb"
|
|
||||||
restart_gitea
|
|
||||||
curl -s localhost:3000/api/v1/version | jq -e '.version'
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
VERSION=$(echo "${CI_COMMIT_TAG#*v}" | cut -d'+' -f1)
|
|
||||||
PATCHLEVEL=$(echo "${CI_COMMIT_TAG}" | cut -d'+' -f2)
|
|
||||||
export VERSION PATCHLEVEL
|
|
||||||
|
|
||||||
if [ ! -f /etc/init.d/gitea ]; then
|
|
||||||
cp -v "${CI_PROJECT_DIR}"/.gitlab-ci/init /etc/init.d/gitea
|
|
||||||
fi
|
|
||||||
|
|
||||||
start_gitea() {
|
|
||||||
/etc/init.d/gitea start
|
|
||||||
sleep 10
|
|
||||||
if ! /etc/init.d/gitea status | grep 'gitea is running'; then
|
|
||||||
cat /var/lib/gitea/log/gitea.log
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
restart_gitea() {
|
|
||||||
/etc/init.d/gitea stop
|
|
||||||
start_gitea
|
|
||||||
}
|
|
||||||
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get -y install curl jq
|
|
@ -1,8 +0,0 @@
|
|||||||
Origin: morph027
|
|
||||||
Suite: gitea
|
|
||||||
Label: gitea
|
|
||||||
Codename: gitea
|
|
||||||
Components: main
|
|
||||||
Architectures: amd64 arm64
|
|
||||||
SignWith: ##SIGNING_KEY_ID##
|
|
||||||
Limit: 0
|
|
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2022 packaging
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
44
README.md
44
README.md
@ -1,44 +0,0 @@
|
|||||||
# [Gitea](https://gitea.io) Debian/Ubuntu Packages
|
|
||||||
|
|
||||||
Packages are built using [fpm](https://github.com/jordansissel/fpm/) by pushing released tags and repo is created using [Gitlabs static pages](https://morph027.gitlab.io/blog/repo-hosting-using-gitlab-pages/).
|
|
||||||
|
|
||||||
Minimum install and update tests are in place to prevent upload of broken packages.
|
|
||||||
|
|
||||||
### Add repo signing key to apt
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo curl -sL -o /etc/apt/trusted.gpg.d/morph027-gitea.asc https://packaging.gitlab.io/gitea/gpg.key
|
|
||||||
```
|
|
||||||
|
|
||||||
### Add repo to apt
|
|
||||||
|
|
||||||
```
|
|
||||||
echo "deb https://packaging.gitlab.io/gitea gitea main" | sudo tee /etc/apt/sources.list.d/morph027-gitea.list
|
|
||||||
```
|
|
||||||
|
|
||||||
### Install
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install gitea morph027-keyring
|
|
||||||
```
|
|
||||||
|
|
||||||
### Start
|
|
||||||
|
|
||||||
```
|
|
||||||
systemctl enable --now gitea
|
|
||||||
```
|
|
||||||
|
|
||||||
## Extras
|
|
||||||
|
|
||||||
### unattended-upgrades
|
|
||||||
|
|
||||||
To enable automatic upgrades using `unattended-upgrades`, just add the following config file:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cat > /etc/apt/apt.conf.d/50gitea <<EOF
|
|
||||||
Unattended-Upgrade::Allowed-Origins {
|
|
||||||
"morph027:gitea";
|
|
||||||
};
|
|
||||||
EOF
|
|
||||||
```
|
|
@ -3,15 +3,14 @@ Description=Gitea (Git with a cup of tea)
|
|||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
RestartSec=30s
|
RestartSec=2s
|
||||||
Type=simple
|
Type=simple
|
||||||
User=gitea
|
User=gitea
|
||||||
Group=gitea
|
Group=gitea
|
||||||
WorkingDirectory=/var/lib/gitea/
|
WorkingDirectory=/var/lib/gitea/
|
||||||
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
|
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
|
||||||
Restart=on-failure
|
Restart=always
|
||||||
Environment="GITEA_WORK_DIR=/var/lib/gitea/"
|
EnvironmentFile=/etc/default/gitea
|
||||||
EnvironmentFile=-/etc/default/gitea
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.targe
|
@ -6,9 +6,5 @@ getent passwd gitea >/dev/null 2>&1 || adduser \
|
|||||||
--gecos 'Gitea' \
|
--gecos 'Gitea' \
|
||||||
--group \
|
--group \
|
||||||
--disabled-password \
|
--disabled-password \
|
||||||
--home /var/lib/gitea \
|
--home /home/gitea \
|
||||||
gitea
|
gitea
|
||||||
|
|
||||||
if [ ! -d /etc/gitea ]; then
|
|
||||||
install -d -o gitea -g gitea -m 770 /etc/gitea
|
|
||||||
fi
|
|
4
repo/conf/distributions
Normal file
4
repo/conf/distributions
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Codename: gitea
|
||||||
|
Components: main
|
||||||
|
Architectures: amd64
|
||||||
|
SignWith: ##SIGNING_KEY_ID##
|
Loading…
Reference in New Issue
Block a user