initial commit
This commit is contained in:
commit
514499661e
24 changed files with 3199 additions and 0 deletions
8
deb/.forgejo-bin.control
Normal file
8
deb/.forgejo-bin.control
Normal file
|
@ -0,0 +1,8 @@
|
|||
Package: forgejo-bin
|
||||
Architecture: amd64
|
||||
Priority: optional
|
||||
Provides: forgejo,gitea
|
||||
Depends: adduser (>= 3.11)
|
||||
Conflicts: forgejo,forgejo-bin
|
||||
Description: Forgejo: Beyond Coding. We Forge. (binary)
|
||||
The official Forgejo release binary in a Debian package
|
3
deb/.forgejo-bin.install
Normal file
3
deb/.forgejo-bin.install
Normal file
|
@ -0,0 +1,3 @@
|
|||
forgejo-bin-dl/forgejo /usr/bin
|
||||
forgejo.service /usr/lib/systemd/system
|
||||
app.ini /etc/forgejo
|
2552
deb/app.ini
Normal file
2552
deb/app.ini
Normal file
File diff suppressed because it is too large
Load diff
8
deb/debian/changelog
Normal file
8
deb/debian/changelog
Normal file
|
@ -0,0 +1,8 @@
|
|||
forgejo (1.18.3.0-1) unstable; urgency=medium
|
||||
|
||||
* Forgejo version 1.18.3-0
|
||||
* Use same versioning scheme as Arch package
|
||||
* See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#1-18-3-0
|
||||
|
||||
-- crystal <crystal@noreply.codeberg.org> Fri, 3 Feb 2023 12:38:00 +0000
|
||||
|
1
deb/debian/compat
Normal file
1
deb/debian/compat
Normal file
|
@ -0,0 +1 @@
|
|||
10
|
23
deb/debian/control
Normal file
23
deb/debian/control
Normal file
|
@ -0,0 +1,23 @@
|
|||
Source: forgejo
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: crystal <crystal@noreply.codeberg.org>
|
||||
Build-Depends: debhelper (>= 10)
|
||||
|
||||
Package: forgejo
|
||||
Architecture: amd64
|
||||
Priority: optional
|
||||
Provides: gitea
|
||||
Depends: adduser (>= 3.11)
|
||||
Conflicts: forgejo-sqlite,forgejo-bin
|
||||
Description: Forgejo: Beyond Coding. We Forge.
|
||||
Forgejo with bindata ONLY - Use this package for MySQL or PostgreSQL setup
|
||||
|
||||
Package: forgejo-sqlite
|
||||
Architecture: amd64
|
||||
Priority: optional
|
||||
Provides: forgejo,gitea
|
||||
Depends: adduser (>= 3.11)
|
||||
Conflicts: forgejo,forgejo-bin
|
||||
Description: Forgejo: Beyond Coding. We Forge. (SQLite)
|
||||
Forgejo with bindata and SQLite support - Use this package to get started immediately
|
3
deb/debian/forgejo-sqlite.install
Normal file
3
deb/debian/forgejo-sqlite.install
Normal file
|
@ -0,0 +1,3 @@
|
|||
forgejo-sqlite-bin/forgejo /usr/bin
|
||||
forgejo.service /usr/lib/systemd/system
|
||||
app.ini /etc/forgejo
|
1
deb/debian/forgejo-sqlite.postinst
Symbolic link
1
deb/debian/forgejo-sqlite.postinst
Symbolic link
|
@ -0,0 +1 @@
|
|||
forgejo.postinst
|
1
deb/debian/forgejo-sqlite.preinst
Symbolic link
1
deb/debian/forgejo-sqlite.preinst
Symbolic link
|
@ -0,0 +1 @@
|
|||
forgejo.preinst
|
1
deb/debian/forgejo-sqlite.prerm
Symbolic link
1
deb/debian/forgejo-sqlite.prerm
Symbolic link
|
@ -0,0 +1 @@
|
|||
forgejo.prerm
|
3
deb/debian/forgejo.install
Normal file
3
deb/debian/forgejo.install
Normal file
|
@ -0,0 +1,3 @@
|
|||
forgejo-bin/forgejo /usr/bin
|
||||
forgejo.service /usr/lib/systemd/system
|
||||
app.ini /etc/forgejo
|
14
deb/debian/forgejo.postinst
Normal file
14
deb/debian/forgejo.postinst
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
case "$1" in
|
||||
configure)
|
||||
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
|
||||
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
|
||||
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
|
||||
[ -z "$FORGEJO_NAME" ] && FORGEJO_NAME="Forgejo: Beyond coding. We forge."
|
||||
[ -z "$FORGEJO_GROUP" ] && FORGEJO_GROUP=forgejo
|
||||
chown $FORGEJO_USER:$FORGEJO_GROUP /etc/forgejo/app.ini
|
||||
systemctl daemon-reload || true
|
||||
systemctl restart forgejo || true
|
||||
systemctl enable forgejo || true
|
||||
;;
|
||||
esac
|
34
deb/debian/forgejo.preinst
Normal file
34
deb/debian/forgejo.preinst
Normal file
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
[ -f "/etc/default/forgejo" ] && . /etc/default/forgejo
|
||||
[ -z "$FORGEJO_HOME" ] && FORGEJO_HOME=/var/lib/forgejo
|
||||
[ -z "$FORGEJO_USER" ] && FORGEJO_USER=forgejo
|
||||
[ -z "$FORGEJO_NAME" ] && FORGEJO_NAME="Forgejo (Beyond coding. We forge.)"
|
||||
[ -z "$FORGEJO_GROUP" ] && FORGEJO_GROUP=forgejo
|
||||
if ! getent group | grep -q "^$FORGEJO_GROUP:" ; then
|
||||
echo -n "Adding group $FORGEJO_GROUP.."
|
||||
addgroup --quiet --system $FORGEJO_GROUP 2>/dev/null ||true
|
||||
echo "..done"
|
||||
fi
|
||||
test -d $FORGEJO_HOME || mkdir $FORGEJO_HOME
|
||||
if ! getent passwd | grep -q "^$FORGEJO_USER:"; then
|
||||
echo -n "Adding system user $FORGEJO_USER.."
|
||||
adduser --quiet \
|
||||
--system \
|
||||
--ingroup $FORGEJO_GROUP \
|
||||
--no-create-home \
|
||||
--disabled-password \
|
||||
$FORGEJO_USER 2>/dev/null || true
|
||||
echo "..done"
|
||||
fi
|
||||
usermod -c "$FORGEJO_NAME" \
|
||||
-d $FORGEJO_HOME \
|
||||
-g $FORGEJO_GROUP \
|
||||
-s "/bin/bash" \
|
||||
$FORGEJO_USER
|
||||
if ! dpkg-statoverride --list $FORGEJO_HOME >/dev/null ; then
|
||||
chown -R $FORGEJO_USER:$FORGEJO_GROUP $FORGEJO_HOME
|
||||
chmod u=rwx,g=rwx,o= $FORGEJO_HOME
|
||||
fi
|
||||
esac
|
3
deb/debian/forgejo.prerm
Normal file
3
deb/debian/forgejo.prerm
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
systemctl stop forgejo || true
|
||||
systemctl disable forgejo || true
|
4
deb/debian/rules
Normal file
4
deb/debian/rules
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd
|
86
deb/forgejo.service
Normal file
86
deb/forgejo.service
Normal file
|
@ -0,0 +1,86 @@
|
|||
[Unit]
|
||||
Description=Forgejo (Beyond coding. We forge.)
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
###
|
||||
# Don't forget to add the database service dependencies
|
||||
###
|
||||
#
|
||||
#Wants=mysql.service
|
||||
After=mysql.service
|
||||
#
|
||||
#Wants=mariadb.service
|
||||
After=mariadb.service
|
||||
#
|
||||
#Wants=postgresql.service
|
||||
After=postgresql.service
|
||||
#
|
||||
#Wants=memcached.service
|
||||
After=memcached.service
|
||||
#
|
||||
#Wants=redis.service
|
||||
After=redis.service
|
||||
#
|
||||
###
|
||||
# If using socket activation for main http/s
|
||||
###
|
||||
#
|
||||
#After=forgejo.main.socket
|
||||
#Requires=forgejo.main.socket
|
||||
#
|
||||
###
|
||||
# (You can also provide forgejo an http fallback and/or ssh socket too)
|
||||
#
|
||||
# An example of /etc/systemd/system/forgejo.main.socket
|
||||
###
|
||||
##
|
||||
## [Unit]
|
||||
## Description=Forgejo Web Socket
|
||||
## PartOf=forgejo.service
|
||||
##
|
||||
## [Socket]
|
||||
## Service=forgejo.service
|
||||
## ListenStream=<some_port>
|
||||
## NoDelay=true
|
||||
##
|
||||
## [Install]
|
||||
## WantedBy=sockets.target
|
||||
##
|
||||
###
|
||||
|
||||
[Service]
|
||||
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
|
||||
# LimitNOFILE=524288:524288
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
User=forgejo
|
||||
Group=forgejo
|
||||
WorkingDirectory=~
|
||||
# If using Unix socket: tells systemd to create the /run/forgejo folder, which will contain the forgejo.sock file
|
||||
# (manually creating /run/forgejo doesn't work, because it would not persist across reboots)
|
||||
#RuntimeDirectory=forgejo
|
||||
ExecStart=/usr/bin/forgejo web --config /etc/forgejo/app.ini
|
||||
Restart=always
|
||||
Environment=USER=forgejo HOME=/var/lib/forgejo GITEA_WORK_DIR=/var/lib/forgejo
|
||||
# If you install Git to directory prefix other than default PATH (which happens
|
||||
# for example if you install other versions of Git side-to-side with
|
||||
# distribution version), uncomment below line and add that prefix to PATH
|
||||
# Don't forget to place git-lfs binary on the PATH below if you want to enable
|
||||
# Git LFS support
|
||||
#Environment=PATH=/path/to/git/bin:/bin:/sbin:/usr/bin:/usr/sbin
|
||||
# If you want to bind Forgejo to a port below 1024, uncomment
|
||||
# the two values below, or use socket activation to pass Forgejo its ports as above
|
||||
###
|
||||
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||
#AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
###
|
||||
# In some cases, when using CapabilityBoundingSet and AmbientCapabilities option, you may want to
|
||||
# set the following value to false to allow capabilities to be applied on Forgejo process. The following
|
||||
# value if set to true sandboxes Forgejo service and prevent any processes from running with privileges
|
||||
# in the host user namespace.
|
||||
###
|
||||
#PrivateUsers=false
|
||||
###
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue