1
0
mirror of https://gitlab.com/packaging/gitea synced 2025-04-03 06:37:02 +00:00

Compare commits

...

57 Commits

Author SHA1 Message Date
morph027
20126c8f51
fix usage of new repo utils, refs #13
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-07-07 19:50:58 +02:00
morph027
dad4eebc13
use new repo utils, refs #13
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-07-07 19:43:43 +02:00
morph027
3c57e902d7
add missing executable bits
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-28 08:55:48 +02:00
morph027
46a3c4f025
change tests to init instead of systemd
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-28 08:52:07 +02:00
morph027
b4da93c2e7
change tests to init instead of systemd
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-28 08:50:17 +02:00
morph027
76dd904377
use UBUNTU_VERSION to simplify pipeline debugging
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-27 21:39:40 +02:00
morph027
2dbbc72e39
use DOCKER_VERSION to simplify pipeline debugging
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-27 19:18:17 +02:00
morph027
b185ebbe9e
pin docker to 19
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-27 17:15:52 +02:00
morph027
0c08e9675d
pin docker to 25
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-27 17:07:34 +02:00
morph027
82f6637981
bump docker dind (cgroup error)
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-05-27 17:02:04 +02:00
morph027
d058c14dd5
add rules for apt repo
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-02-06 10:03:32 +01:00
morph027
315ff0e1b0
ci: refine pages job dependency, add missing arm64
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-01-18 16:21:32 +01:00
morph027
28ceca30eb
ci: refine pages jon dependency
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-01-18 16:04:11 +01:00
morph027
1adabf6ace
ci: try to fix repo pipeline step
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-01-18 16:01:03 +01:00
morph027
ec04f77c98
ci: try to fix test pipeline step
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-01-18 15:43:38 +01:00
morph027
153ab6e886
ci: try to fix test pipeline step
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-01-18 15:31:59 +01:00
morph027
09f6cfc8dc Merge branch '11-can-t-update-to-1-21-4' into 'master'
fixes #11

Closes #11

See merge request packaging/gitea!4
2024-01-18 14:07:39 +00:00
morph027
f450540dc2
fixes #11
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2024-01-18 15:06:50 +01:00
morph027
0f9c8bed35
refine ci pipeline steps
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-12-23 12:25:57 +01:00
morph027
050fc4859c
fix dl url again
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-12-12 09:40:36 +01:00
morph027
74d7e81d43
increase delay
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-11-28 08:50:33 +01:00
morph027
63e4c70f1d
fix ci config
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-11-26 19:03:40 +01:00
morph027
73833d52dc Merge branch 'delay-trigger' into 'master'
add delay trigger

See merge request packaging/gitea!3
2023-11-26 18:00:19 +00:00
morph027
8c6ac8f4e6 add delay trigger 2023-11-26 18:00:18 +00:00
morph027
b00b9978af
fix dl url again
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-11-14 18:48:37 +01:00
morph027
5f0e2c85a3
print dl url
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-11-14 18:43:20 +01:00
morph027
2b8cb0ee34
change gitea dl url
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-11-14 18:38:21 +01:00
morph027
c2f3770f98
fix test install w/ new version scheme
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-05-27 12:26:07 +02:00
morph027
6e8272fe38
update version scheme
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2023-05-27 07:12:41 +02:00
morph027
1ed73b2f19 Add LICENSE 2022-09-06 18:45:41 +00:00
morph027
882c7a05d3
add label/origin/suite to repo
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-09-04 10:40:16 +02:00
morph027
95b3e57504
use repo.sh from packaging/utils
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-08-28 16:58:35 +02:00
morph027
84f3a5592c Merge branch 'patch' into 'master'
Combined two liners into one liner.

See merge request packaging/gitea!2
2022-08-14 08:34:29 +00:00
JeremyStarTM
d4638aa644 Combined two liners into one liner. 2022-08-13 20:26:48 +00:00
morph027
2a4e0c8685
systemd: add Restart
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-08-04 15:36:44 +02:00
morph027
5f329af2c8
update README
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-01-17 09:40:17 +01:00
morph027
4a5ddfe598
remove systemd autostart/enable, refs #6
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-01-17 09:38:25 +01:00
morph027
921b728097
refine build pipeline dependencies
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-01-17 09:34:11 +01:00
morph027
d503ae0774
fix build pipeline
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-01-17 09:25:21 +01:00
morph027
6398d11afd
fix build pipeline
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-01-17 09:15:49 +01:00
morph027
78aead52a3 Merge branch 'arm64' into 'master'
add arm64 builds, refs #5

See merge request packaging/gitea!1
2022-01-17 07:59:18 +00:00
morph027
3a7165778a
add arm64 builds, refs #5
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
2022-01-17 08:55:54 +01:00
morph027
22739bc014
update README 2020-06-21 08:35:34 +02:00
morph027
25a82ff3b0
fix test install 2020-06-20 15:01:07 +02:00
morph027
e0ba99af5a
add update test 2020-06-20 14:53:29 +02:00
morph027
693e213a2f
add test 2020-06-20 14:39:39 +02:00
morph027
b4157100de
fix test install 2020-06-20 11:13:42 +02:00
morph027
a8cff58ba0
add test for package 2020-06-20 10:55:39 +02:00
morph027
73f653729c
systemd: add GITEA_WORK_DIR, relax EnvironmentFile loader 2020-06-20 10:16:02 +02:00
morph027
24b78505c6
fix systemd unit 2020-06-20 09:49:09 +02:00
morph027
81fcb1aedb
add file command 2020-06-19 07:14:57 +02:00
morph027
d59203622e
make sure gitea is an executable 2020-06-04 19:31:49 +02:00
morph027
2dba627301
adjust version fot automated builds 2020-05-10 13:52:06 +02:00
morph027
1f5a138044
adjust patchlevel fot automated builds 2020-05-10 13:47:03 +02:00
morph027
c267f36e04
repo: multiple versions 2020-04-12 15:04:25 +02:00
morph027
1a03dc7dfe
add README 2020-04-12 14:08:21 +02:00
morph027
8c895bd11d
fix builds 2020-04-12 13:47:32 +02:00
12 changed files with 425 additions and 47 deletions

View File

@ -1,88 +1,191 @@
---
stages:
- package
- test
- repo
- pages

package:
.vars: &vars
NAME: gitea
URL: "https://gitea.io"
DESCRIPTION: "A painless self-hosted Git service."
ARTIFACTS: "usr"

.package: &package
stage: package
image: golang:latest
variables:
NAME: drone-server
URL: "https://gitea.io"
DESCRIPTION: "A painless self-hosted Git service."
ARTIFACTS: "usr"
script:
- export VERSION=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f1)
- export PATCHLEVEL=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f2)
- export VERSION=$(echo ${CI_COMMIT_TAG#*v} | cut -d'+' -f1)
- export PATCHLEVEL=$(echo ${CI_COMMIT_TAG} | cut -d'+' -f2)
- apt-get -qq update
- apt-get -qqy install ruby-dev ruby-ffi curl
- gem install specific_install
- gem specific_install https://github.com/root360/fpm.git all_fixes
- apt-get -qqy install ruby-dev ruby-ffi curl file
- gem install fpm
- mkdir -p "${CI_PROJECT_DIR}/package_root/usr/bin"
- curl -sL -o "${CI_PROJECT_DIR}/package_root/usr/bin/gitea" "https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64"
- 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.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"
- gem install fpm
- fpm
--architecture "${ARCH}"
--input-type dir
--output-type deb
--package "${CI_PROJECT_DIR}/gitea_${VERSION}-p${PATCHLEVEL}_amd64.deb"
--package "${CI_PROJECT_DIR}/gitea_${VERSION}+${PATCHLEVEL}_${ARCH}.deb"
--name "${NAME}"
--version "${VERSION}-p${PATCHLEVEL}"
--version "${VERSION}+${PATCHLEVEL}"
--description "${DESCRIPTION}"
--maintainer "Stefan Heitmüller <stefan.heitmueller@gmx.com>"
--url "${URL}"
--depends git
--deb-systemd "${CI_PROJECT_DIR}/package_root/usr/lib/systemd/system/${NAME}.service"
--deb-systemd-enable
--deb-systemd-auto-start
--deb-recommends morph027-keyring
--deb-systemd "${CI_PROJECT_DIR}/.packaging/${NAME}.service"
--deb-activate-noawait /etc/init.d
--prefix=/
--after-install "${CI_PROJECT_DIR}/package_scripts/after-install.sh"
--before-install "${CI_PROJECT_DIR}/.packaging/before-install.sh"
--chdir "${CI_PROJECT_DIR}/package_root"
$ARTIFACTS
artifacts:
paths:
- $CI_PROJECT_DIR/*.deb
expire_in: 7 days

.manual: &manual
when: manual
only:
- tags

reprepro:
.trigger: &trigger
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:
untracked: true
paths:
- $CI_PROJECT_DIR/repo
key: reprepro
- $CI_PROJECT_DIR/.repo
key: repo
stage: repo
image: registry.gitlab.com/packaging/reprepro-multiple-versions:latest
image: registry.gitlab.com/packaging/utils:latest
script:
- echo "$SIGNING_KEY" > /tmp/key
- gpg --import /tmp/key
- rm -f /tmp/key
- test -f $CI_PROJECT_DIR/repo/gpg.key || gpg --export --armor "$SIGNING_KEY_ID" > $CI_PROJECT_DIR/repo/gpg.key
- sed -i 's,##SIGNING_KEY_ID##,'$SIGNING_KEY_ID',' repo/conf/distributions
- find $CI_PROJECT_DIR -type f -name "*.deb" -exec
reprepro
-b $CI_PROJECT_DIR/repo
includedeb
gitea
{} \+;
only:
- tags
- /deb.sh gitea

repo-apt-tag:
<<: [*repo]
needs:
- gitea-amd64-tag
- gitea-arm64-tag
- test-install-tag
- test-update-tag
rules:
- if: $CI_COMMIT_TAG && $CI_PIPELINE_SOURCE != "trigger"


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:
cache:
untracked: true
paths:
- $CI_PROJECT_DIR/repo
key: reprepro
- $CI_PROJECT_DIR/.repo
key: repo
policy: pull
stage: pages
image: ubuntu:focal
needs:
- job: repo-apt-tag
optional: true
- job: repo-apt-trigger
optional: true
script:
- mkdir $CI_PROJECT_DIR/public
- cp -r $CI_PROJECT_DIR/repo/gpg.key $CI_PROJECT_DIR/repo/dists $CI_PROJECT_DIR/repo/pool $CI_PROJECT_DIR/public/
- cp -rv
$CI_PROJECT_DIR/.repo/deb/gpg.key
$CI_PROJECT_DIR/.repo/deb/gitea/gitea/{dists,pool}
$CI_PROJECT_DIR/public/
artifacts:
paths:
- $CI_PROJECT_DIR/public
expire_in: 1 day
only:
- tags
- triggers

68
.gitlab-ci/app.ini Normal file
View File

@ -0,0 +1,68 @@
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

84
.gitlab-ci/init Executable file
View File

@ -0,0 +1,84 @@
#!/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

6
.gitlab-ci/test-install.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash

. "${CI_PROJECT_DIR}/.gitlab-ci/test.sh"

apt-get -y install "${CI_PROJECT_DIR}/gitea_${VERSION}+${PATCHLEVEL}_amd64.deb"
start_gitea

14
.gitlab-ci/test-update.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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'

29
.gitlab-ci/test.sh Executable file
View File

@ -0,0 +1,29 @@
#!/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

View File

@ -6,5 +6,9 @@ getent passwd gitea >/dev/null 2>&1 || adduser \
--gecos 'Gitea' \
--group \
--disabled-password \
--home /home/gitea \
--home /var/lib/gitea \
gitea

if [ ! -d /etc/gitea ]; then
install -d -o gitea -g gitea -m 770 /etc/gitea
fi

View File

@ -3,14 +3,15 @@ Description=Gitea (Git with a cup of tea)
After=network.target

[Service]
RestartSec=2s
RestartSec=30s
Type=simple
User=gitea
Group=gitea
WorkingDirectory=/var/lib/gitea/
ExecStart=/usr/bin/gitea web -c /etc/gitea/app.ini
Restart=always
EnvironmentFile=/etc/default/gitea
Restart=on-failure
Environment="GITEA_WORK_DIR=/var/lib/gitea/"
EnvironmentFile=-/etc/default/gitea

[Install]
WantedBy=multi-user.targe
WantedBy=multi-user.target

View File

@ -0,0 +1,8 @@
Origin: morph027
Suite: gitea
Label: gitea
Codename: gitea
Components: main
Architectures: amd64 arm64
SignWith: ##SIGNING_KEY_ID##
Limit: 0

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
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 Normal file
View File

@ -0,0 +1,44 @@
# [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
```

View File

@ -1,4 +0,0 @@
Codename: gitea
Components: main
Architectures: amd64
SignWith: ##SIGNING_KEY_ID##