Adding debian/ dir, even though the packaging is not done yet.

This commit is contained in:
Sergio Durigan Junior 2016-08-08 13:52:08 -04:00
parent 6f6808c9d3
commit 56594dcbe9
27 changed files with 652 additions and 0 deletions

6
debian/README.Debian vendored Normal file
View file

@ -0,0 +1,6 @@
pagure for Debian
----------------
<possible notes regarding this package - if none, delete this file>
-- Sergio Durigan Junior <sergiodj@sergiodj.net> Thu, 21 Jul 2016 18:04:38 -0400

10
debian/README.source vendored Normal file
View file

@ -0,0 +1,10 @@
pagure for Debian
----------------
<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
-- Sergio Durigan Junior <sergiodj@sergiodj.net> Thu, 21 Jul 2016 18:04:38 -0400

5
debian/changelog vendored Normal file
View file

@ -0,0 +1,5 @@
pagure (2.3.4-1) unstable; urgency=medium
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
-- Sergio Durigan Junior <sergiodj@sergiodj.net> Thu, 21 Jul 2016 18:04:38 -0400

1
debian/compat vendored Normal file
View file

@ -0,0 +1 @@
9

128
debian/control vendored Normal file
View file

@ -0,0 +1,128 @@
Source: pagure
Section: web
Priority: optional
Maintainer: Sergio Durigan Junior <sergiodj@sergiodj.net>
Build-Depends:
debhelper (>=9),
dh-python,
dh-systemd,
python-all,
python-setuptools,
sphinx-common,
python-sphinx,
python-cloud-sptheme,
# Deps for pagure
python-alembic,
python-arrow,
python-binaryornot,
python-bleach,
python-blinker,
python-chardet,
python-docutils,
python-enum34,
python-flask,
python-flaskext.wtf,
python-flaskext.multistatic,
python-html5lib,
python-kitchen,
python-markdown,
python-munch,
python-pil,
python-psutil,
python-pygit2,
python-pygments,
python-openid,
python-openid-cla,
python-openid-teams,
python-redis,
python-six,
python-sqlalchemy,
python-straight.plugin,
python-trollius-redis,
python-wtforms,
python-fedora,
python-cryptography,
python-bcrypt,
Standards-Version: 3.9.8
Homepage: http://pagure.io/pagure
X-Python-Version: >= 2.7
Package: pagure
Architecture: all
Depends:
${misc:Depends},
${python:Depends},
gitolite3,
Recommends:
pagure-ev-server (= ${source:Version}),
pagure-milters (= ${source:Version}),
pagure-webhook-server (= ${source:Version}),
Suggests: pagure-doc
Description: git-centered forge using pygit2
Pagure is a git-centered forge, python based using pygit2.
.
With pagure you can host your project with its documentation, let your
users report issues or request enhancements using the ticketing system
and build your community of contributors by allowing them to fork your
projects and contribute to it via the now-popular pull-request
mechanism.
Package: pagure-ev-server
Architecture: all
Depends:
pagure (= ${source:Version}),
${misc:Depends},
${python:Depends}
Description: git-centered forge using pygit2
Pagure is a git-centered forge, python based using pygit2.
.
With pagure you can host your project with its documentation, let your
users report issues or request enhancements using the ticketing system
and build your community of contributors by allowing them to fork your
projects and contribute to it via the now-popular pull-request
mechanism.
Package: pagure-milters
Architecture: all
Depends:
pagure (= ${source:Version}),
${misc:Depends},
${python:Depends}
Description: git-centered forge using pygit2
Pagure is a git-centered forge, python based using pygit2.
.
With pagure you can host your project with its documentation, let your
users report issues or request enhancements using the ticketing system
and build your community of contributors by allowing them to fork your
projects and contribute to it via the now-popular pull-request
mechanism.
Package: pagure-webhook-server
Architecture: all
Depends:
pagure (= ${source:Version}),
${misc:Depends},
${python:Depends}
Description: git-centered forge using pygit2
Pagure is a git-centered forge, python based using pygit2.
.
With pagure you can host your project with its documentation, let your
users report issues or request enhancements using the ticketing system
and build your community of contributors by allowing them to fork your
projects and contribute to it via the now-popular pull-request
mechanism.
Package: pagure-doc
Architecture: all
Section: doc
Depends: ${sphinxdoc:Depends}, ${misc:Depends}
Description: git-centered forge using pygit2
Pagure is a git-centered forge, python based using pygit2.
.
With pagure you can host your project with its documentation, let your
users report issues or request enhancements using the ticketing system
and build your community of contributors by allowing them to fork your
projects and contribute to it via the now-popular pull-request
mechanism.
.
This is the common documentation package.

38
debian/copyright vendored Normal file
View file

@ -0,0 +1,38 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pagure
Source: <url://example.com>
Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2016 Sergio Durigan Junior <sergiodj@sergiodj.net>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid picking licenses with terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.

15
debian/pagure-doc.doc-base vendored Normal file
View file

@ -0,0 +1,15 @@
Document: pagure
Title: Debian pagure Manual
Author:
Abstract: pagure is a git-centered forge using pygit2
With pagure you can host your project with its documentation, let your
users report issues or request enhancements using the ticketing system
and build your community of contributors by allowing them to fork your
projects and contribute to it via the now-popular pull-request
mechanism.
Section: Web
Format: HTML
Index: /usr/share/doc/pagure/html/index.html
Files: /usr/share/doc/pagure/html/*.html

3
debian/pagure-doc.docs vendored Normal file
View file

@ -0,0 +1,3 @@
README.Debian
README.source
doc/_build/html/

1
debian/pagure-doc.manpages vendored Normal file
View file

@ -0,0 +1 @@
doc/_build/man/pagure.1

54
debian/pagure-ev-server.init vendored Normal file
View file

@ -0,0 +1,54 @@
#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides: pagure-ev-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description:
# Description:
# <...>
# <...>
### END INIT INFO
# Author: Sergio Durigan Junior <sergiodj@sergiodj.net>
DESC="pagure"
DAEMON="/usr/lib/pagure/pagure-ev-server/pagure-stream-server.py"
PIDFILE="/var/run/pagure/pagure-ev-server.pid"
U="git"
test -x "${DAEMON}" || exit 0
. /lib/lsb/init-functions
case "${1}" in
start)
start-stop-daemon --start --background -m --oknodo --pidfile $PIDFILE --chuid ${U}:${U} --exec $DAEMON
;;
stop)
start-stop-daemon --stop --pidfile $PIDFILE --oknodo --exec ${DAEMON}
rm -f $PIDFILE
;;
restart)
${0} stop
${0} start
;;
status)
status_of_proc "${DAEMON}" "Pagure EV Server"
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0

1
debian/pagure-ev-server.install vendored Normal file
View file

@ -0,0 +1 @@
ev-server/pagure-stream-server.py debian/tmp/usr/lib/pagure/pagure-ev-server/

57
debian/pagure-ev-server.postinst vendored Normal file
View file

@ -0,0 +1,57 @@
#!/bin/sh
# postinst script for pagure-ev-server
#
# see: dh_installdeb(1)
set -e
# 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>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
# Source debconf library.
if test -f /usr/share/debconf/confmodule ; then
. /usr/share/debconf/confmodule
fi
case "$1" in
configure)
# We run using the same user as gitolite. For more on the
# gituser value information, see the gitolite3 package.
db_get gitolite3/gituser
GITUSER="${RET:-gitolite3}"
if test "$GITUSER" != "git" ; then
# We must replace the user specified to run the scripts.
sed -i -e "s/U=\"git\"/U=\"$GITUSER\"/" /etc/init.d/pagure-ev-server
if test -f /lib/systemd/system/pagure-ev-server.service ; then
sed -i -e "s/User=git/User=$GITUSER/" \
-e "s/Group=git/Group=$GITUSER/" /lib/systemd/system/pagure-ev-server.service
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

14
debian/pagure-ev-server.service vendored Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Pagure EventSource server (Allowing live refresh of the pages supporting it)
After=redis.target
Documentation=https://pagure.io/pagure
[Service]
ExecStart=/usr/lib/pagure/pagure-ev-server/pagure-stream-server.py
Type=simple
User=git
Group=git
Restart=on-failure
[Install]
WantedBy=multi-user.target

53
debian/pagure-milters.init vendored Normal file
View file

@ -0,0 +1,53 @@
#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides: pagure-milters
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description:
# Description:
# <...>
# <...>
### END INIT INFO
# Author: Sergio Durigan Junior <sergiodj@sergiodj.net>
DESC="pagure"
DAEMON="/usr/bin/python2 /usr/share/pagure/pagure-milters/comment_email_milter.py"
PIDFILE="/var/run/pagure/pagure-milters.pid"
test -x "${DAEMON}" || exit 0
. /lib/lsb/init-functions
case "${1}" in
start)
start-stop-daemon --start --background -m --oknodo --pidfile $PIDFILE --exec "$DAEMON"
;;
stop)
start-stop-daemon --stop --pidfile $PIDFILE --oknodo --exec "$DAEMON"
rm -f $PIDFILE
;;
restart)
${0} stop
${0} start
;;
status)
status_of_proc "${DAEMON}" "Pagure Milters"
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0

1
debian/pagure-milters.install vendored Normal file
View file

@ -0,0 +1 @@
milters/comment_email_milter.py debian/tmp/usr/share/pagure/pagure-milters/

14
debian/pagure-milters.service vendored Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Pagure SMTP filter (Milter) Daemon (talk to postfix over a socket)
After=postfix.target
Documentation=https://pagure.io/pagure
[Service]
ExecStart=/usr/bin/python2 /usr/share/pagure/pagure-milters/comment_email_milter.py
Type=simple
User=postfix
Group=postfix
Restart=on-failure
[Install]
WantedBy=multi-user.target

1
debian/pagure-milters.tmpfile vendored Symbolic link
View file

@ -0,0 +1 @@
../milters/milter_tempfile.conf

54
debian/pagure-webhook-server.init vendored Normal file
View file

@ -0,0 +1,54 @@
#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides: pagure-webhook-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description:
# Description:
# <...>
# <...>
### END INIT INFO
# Author: Sergio Durigan Junior <sergiodj@sergiodj.net>
DESC="pagure"
DAEMON="/usr/lib/pagure/pagure-webhook-server/pagure-webhook-server.py"
PIDFILE="/var/run/pagure/pagure-webhook-server.pid"
U="git"
test -x "${DAEMON}" || exit 0
. /lib/lsb/init-functions
case "${1}" in
start)
start-stop-daemon --start --background -m --oknodo --pidfile $PIDFILE --chuid ${U}:${U} --exec $DAEMON
;;
stop)
start-stop-daemon --stop --pidfile $PIDFILE --oknodo --exec ${DAEMON}
rm -f $PIDFILE
;;
restart)
${0} stop
${0} start
;;
status)
status_of_proc "${DAEMON}" "Pagure WebHook Server"
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
exit 0

1
debian/pagure-webhook-server.install vendored Normal file
View file

@ -0,0 +1 @@
webhook-server/pagure-webhook-server.py debian/tmp/usr/lib/pagure/pagure-webhook-server/

57
debian/pagure-webhook-server.postinst vendored Normal file
View file

@ -0,0 +1,57 @@
#!/bin/sh
# postinst script for pagure-webhook-server
#
# see: dh_installdeb(1)
set -e
# 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>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
# Source debconf library.
if test -f /usr/share/debconf/confmodule ; then
. /usr/share/debconf/confmodule
fi
case "$1" in
configure)
# We run using the same user as gitolite. For more on the
# gituser value information, see the gitolite3 package.
db_get gitolite3/gituser
GITUSER="${RET:-gitolite3}"
if test "$GITUSER" != "git" ; then
# We must replace the user specified to run the scripts.
sed -i -e "s/U=\"git\"/U=\"$GITUSER\"/" /etc/init.d/pagure-webhook-server
if test -f /lib/systemd/system/pagure-webhook-server.service ; then
sed -i -e "s/User=git/User=$GITUSER/" \
-e "s/Group=git/Group=$GITUSER/" /lib/systemd/system/pagure-webhook-server.service
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

14
debian/pagure-webhook-server.service vendored Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Pagure WebHook server (Allowing web-hook notifications)
After=redis.target
Documentation=https://pagure.io/pagure
[Service]
ExecStart=/usr/lib/pagure/pagure-webhook-server/pagure-webhook-server.py
Type=simple
User=git
Group=git
Restart=on-failure
[Install]
WantedBy=multi-user.target

37
debian/postrm.ex vendored Normal file
View file

@ -0,0 +1,37 @@
#!/bin/sh
# postrm script for pagure
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

35
debian/preinst.ex vendored Normal file
View file

@ -0,0 +1,35 @@
#!/bin/sh
# preinst script for pagure
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

38
debian/prerm.ex vendored Normal file
View file

@ -0,0 +1,38 @@
#!/bin/sh
# prerm script for pagure
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

11
debian/rules vendored Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/make -f
export PYBUILD_NAME = pagure
%:
dh $@ --with python2,systemd,sphinxdoc --buildsystem=pybuild
override_dh_auto_build:
dh_auto_build
PYTHONPATH=$(CURDIR) http_proxy='127.0.0.1:9' \
make -C doc/ html man

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (quilt)

2
debian/watch vendored Normal file
View file

@ -0,0 +1,2 @@
version=4
https://pagure.io/releases/@PACKAGE@/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate