A debian/README.Debian => debian/README.Debian +5 -0
@@ 0,0 1,5 @@
+pagure for Debian
+-----------------
+
+
+ -- Sergio Durigan Junior <sergiodj@sergiodj.net> Thu, 21 Jul 2016 18:04:38 -0400
A debian/README.source => debian/README.source +10 -0
@@ 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
+
A debian/changelog => debian/changelog +5 -0
@@ 0,0 1,5 @@
+pagure (2.6+dfsg-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
A debian/compat => debian/compat +1 -0
A debian/control => debian/control +147 -0
@@ 0,0 1,147 @@
+Source: pagure
+Section: net
+Priority: optional
+Maintainer: Sergio Durigan Junior <sergiodj@sergiodj.net>
+Build-Depends:
+ debhelper (>=9),
+ dh-python,
+ dh-systemd,
+ dh-apache2,
+ python-all,
+ python-setuptools,
+ sphinx-common,
+ python-sphinx,
+ python-cloud-sptheme,
+# Python 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,
+# JavaScript deps
+ yui-compressor,
+ libjs-jquery,
+ libjs-jquery-dotdotdot,
+ libjs-jquery-selectize.js,
+ libjs-jquery-stupidtable,
+# Needed for testing
+ git,
+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,
+# The JS libs are not picked up as deps.
+ libjs-jquery,
+ libjs-jquery-dotdotdot,
+ libjs-jquery-selectize.js,
+ libjs-jquery-stupidtable,
+Recommends:
+ pagure-ev-server (= ${source:Version}),
+ pagure-milters (= ${source:Version}),
+ pagure-webhook-server (= ${source:Version}),
+ ${misc:Recommends},
+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.
+ .
+ You may be also interesed in other packages to enhance the
+ functionality of pagure:
+ * pagure-ev-server
+ * pagure-milters
+ * pagure-webhook-server
+
+Package: pagure-ev-server
+Architecture: all
+Depends:
+ pagure (= ${source:Version}),
+ ${misc:Depends},
+ ${python:Depends}
+Description: git-centered forge using pygit2 - EventSource server
+ Pagure is a git-centered forge, Python based using pygit2.
+ .
+ pagure-ev-server used to allow live-refreshing of a page when someone
+ is viewing it. For example, while you are reading a ticket if someone
+ comments on it, the comment will automatically show up on the page
+ without the need for you to reload the entire page.
+
+Package: pagure-milters
+Architecture: all
+Depends:
+ pagure (= ${source:Version}),
+ ${misc:Depends},
+ ${python:Depends},
+ postfix,
+Description: git-centered forge using pygit2 - milters (mail filters)
+ Pagure is a git-centered forge, Python based using pygit2.
+ .
+ pagure-milters is used to allow replying on a comment of a ticket or a
+ pull-request by directly replying to the notification sent. No need
+ to go to the page anymore to reply to a comment someone made.
+ .
+ It integrates with an MTA such as postfix or sendmail that you will
+ have running and have access to in order to change its configuration.
+
+Package: pagure-webhook-server
+Architecture: all
+Depends:
+ pagure (= ${source:Version}),
+ ${misc:Depends},
+ ${python:Depends}
+Description: git-centered forge using pygit2 - web-hook server
+ Pagure is a git-centered forge, Python based using pygit2.
+ .
+ pagure-webhook-server sends notifications to third party services
+ using POST http requests.
+
+Package: pagure-doc
+Architecture: all
+Section: doc
+Depends: ${sphinxdoc:Depends}, ${misc:Depends}
+Description: git-centered forge using pygit2 (documentation)
+ 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.
A debian/copyright => debian/copyright +58 -0
@@ 0,0 1,58 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: pagure
+Source: https://pagure.io/pagure
+
+Files: *
+Copyright: 2014-2016 Red Hat, Inc
+License: GPL-2+
+
+Files: pagure/hooks/files/git_multimail.py
+Copyright:
+ 2012-2014 Michael Haggerty and others
+ 2007 Andy Parkins
+License: GPL-2+
+
+Files: pagure/static/codemirror/codemirror.js
+Copyright: 2016 Marijn Haverbeke <marijnh@gmail.com> and others
+License: Expat
+
+Files: debian/*
+Copyright: 2016 Sergio Durigan Junior <sergiodj@sergiodj.net>
+License: GPL-2+
+
+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".
+
+License: Expat
+ 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.
A debian/files => debian/files +1 -0
@@ 0,0 1,1 @@
+pagure_2.6+dfsg-1_source.buildinfo net optional
A debian/pagure-doc.doc-base => debian/pagure-doc.doc-base +22 -0
@@ 0,0 1,22 @@
+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: Project Management
+
+Format: HTML
+Index: /usr/share/doc/pagure-doc/html/index.html
+Files:
+ /usr/share/doc/pagure-doc/html/*.html
+ /usr/share/doc/pagure-doc/html/*.js
+ /usr/share/doc/pagure-doc/html/*.inv
+ /usr/share/doc/pagure-doc/html/usage/*.html
+ /usr/share/doc/pagure-doc/html/_static/*
+ /usr/share/doc/pagure-doc/html/_sources/*.txt
+ /usr/share/doc/pagure-doc/html/_sources/usage/*.txt
+ /usr/share/doc/pagure-doc/html/_images/*.png
A debian/pagure-doc.docs => debian/pagure-doc.docs +4 -0
@@ 0,0 1,4 @@
+debian/README.Debian
+debian/README.source
+README.rst
+doc/_build/html/
A debian/pagure-doc.manpages => debian/pagure-doc.manpages +1 -0
@@ 0,0 1,1 @@
+doc/_build/man/pagure.1
A debian/pagure-ev-server.init => debian/pagure-ev-server.init +54 -0
@@ 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/share/pagure-ev-server/bin/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
A debian/pagure-ev-server.install => debian/pagure-ev-server.install +1 -0
@@ 0,0 1,1 @@
+ev-server/pagure-stream-server.py /usr/share/pagure-ev-server/bin/
A debian/pagure-ev-server.postinst => debian/pagure-ev-server.postinst +57 -0
@@ 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
A debian/pagure-ev-server.service => debian/pagure-ev-server.service +14 -0
@@ 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/share/pagure-ev-server/bin/pagure-stream-server.py
+Type=simple
+User=git
+Group=git
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
A debian/pagure-milters.init => debian/pagure-milters.init +53 -0
@@ 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-milters/bin/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
A debian/pagure-milters.install => debian/pagure-milters.install +1 -0
@@ 0,0 1,1 @@
+milters/comment_email_milter.py /usr/share/pagure-milters/bin/
A debian/pagure-milters.service => debian/pagure-milters.service +14 -0
@@ 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-milters/bin/comment_email_milter.py
+Type=simple
+User=postfix
+Group=postfix
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
A debian/pagure-milters.tmpfile => debian/pagure-milters.tmpfile +1 -0
@@ 0,0 1,1 @@
+../milters/milter_tempfile.conf<
\ No newline at end of file
A debian/pagure-webhook-server.init => debian/pagure-webhook-server.init +54 -0
@@ 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/share/pagure-webhook-server/bin/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
A debian/pagure-webhook-server.install => debian/pagure-webhook-server.install +1 -0
@@ 0,0 1,1 @@
+webhook-server/pagure-webhook-server.py /usr/share/pagure-webhook-server/bin/
A debian/pagure-webhook-server.postinst => debian/pagure-webhook-server.postinst +57 -0
@@ 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
A debian/pagure-webhook-server.service => debian/pagure-webhook-server.service +14 -0
@@ 0,0 1,14 @@
+[Unit]
+Description=Pagure WebHook server (Allowing web-hook notifications)
+After=redis.target
+Documentation=https://pagure.io/pagure
+
+[Service]
+ExecStart=/usr/share/pagure-webhook-server/bin/pagure-webhook-server.py
+Type=simple
+User=git
+Group=git
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
A debian/pagure.install => debian/pagure.install +10 -0
@@ 0,0 1,10 @@
+# Config files
+files/pagure.cfg.sample etc/pagure/
+files/alembic.ini etc/pagure/
+
+# Other interesting files to install
+createdb.py usr/share/pagure/
+files/pagure.wsgi usr/share/pagure/
+files/doc_pagure.wsgi usr/share/pagure/
+files/api_key_expire_mail.py usr/share/pagure/
+alembic/ usr/share/pagure/
A debian/pagure.links => debian/pagure.links +1 -0
@@ 0,0 1,1 @@
+/usr/share/javascript/jquery/jquery.min.js /usr/lib/python2.7/dist-packages/pagure/static/jquery.min.js
A debian/pagure.postinst => debian/pagure.postinst +57 -0
@@ 0,0 1,57 @@
+#!/bin/sh
+# postinst script for pagure
+#
+# 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}"
+ db_get gitolite3/gitdir
+ GITDIR="${RET:-/var/lib/gitolite3}"
+
+ if test -d $GITDIR ; then
+ mkdir -p ${GITDIR}/repositories/{,docs,forks,requests,tickets,repos}
+ mkdir -p ${GITDIR}/remotes/
+ chown -R ${GITUSER}:${GITUSER} ${GITDIR}/repositories/
+ chown -R ${GITUSER}:${GITUSER} ${GITDIR}/remotes/
+ 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
A debian/patches/0001-Support-python-bcrypt-instead-of-py-bcrypt.patch => debian/patches/0001-Support-python-bcrypt-instead-of-py-bcrypt.patch +35 -0
@@ 0,0 1,35 @@
+From: Sergio Durigan Junior <sergiodj@sergiodj.net>
+Date: Mon, 8 Aug 2016 20:16:35 -0400
+Subject: Support python-bcrypt instead of py-bcrypt
+
+This patch basically makes sure that the arguments to bcrypt.hashpw
+are encoded to UTF-8. This is a requirement of python-bcrypt. Using
+python-bcrypt has the advantage that the library is well maintained
+and available on more distributions, like Debian.
+---
+ pagure/lib/login.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/pagure/lib/login.py b/pagure/lib/login.py
+index 4227c94..989fb4e 100644
+--- a/pagure/lib/login.py
++++ b/pagure/lib/login.py
+@@ -72,7 +72,8 @@ def get_users_by_group(session, group):
+ def generate_hashed_value(password):
+ """ Generate hash value for password
+ """
+- return '$2$' + bcrypt.hashpw(to_unicode(password), bcrypt.gensalt())
++ return '$2$' + bcrypt.hashpw(password.encode("utf8"),
++ bcrypt.gensalt().encode("utf8"))
+
+
+ def check_password(entered_password, user_password, seed=None):
+@@ -86,7 +87,7 @@ def check_password(entered_password, user_password, seed=None):
+ _, version, user_password = user_password.split('$', 2)
+
+ if version == '2':
+- password = bcrypt.hashpw(to_unicode(entered_password), user_password)
++ password = bcrypt.hashpw(entered_password.encode("utf8"), user_password.encode("utf8"))
+
+ elif version == '1':
+ password = '%s%s' % (to_unicode(entered_password), seed)
A debian/patches/series => debian/patches/series +1 -0
@@ 0,0 1,1 @@
+0001-Support-python-bcrypt-instead-of-py-bcrypt.patch
A debian/postrm.ex => debian/postrm.ex +37 -0
@@ 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
A debian/preinst.ex => debian/preinst.ex +35 -0
@@ 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
A debian/prerm.ex => debian/prerm.ex +38 -0
@@ 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
A debian/rules => debian/rules +31 -0
@@ 0,0 1,31 @@
+#!/usr/bin/make -f
+
+export PYBUILD_NAME = pagure
+export PYBUILD_DESTDIR = debian/pagure/
+
+%:
+ dh $@ --with python2,systemd,sphinxdoc,apache2 --buildsystem=pybuild
+
+override_dh_auto_build:
+# Marking scripts as executable.
+ chmod 0755 \
+ createdb.py \
+ milters/comment_email_milter.py \
+ files/api_key_expire_mail.py
+# Removing executable bit from font files.
+ find pagure/static/hack_fonts/fonts/ -type f \
+ \( -name "*.ttf" -o -name "*.woff*" -o -name "*.eot" -o \
+ -name "*.svg" \) | xargs chmod -x
+# Generating the minified JS files from the no-minified ones.
+ find pagure/static/ -name "*.js" -type l \
+ | sed 's/\.js$$//' | while read file ; do \
+ yui-compressor -o $${file}.min.js $${file}.js; \
+ done
+# Generating the minified CSS from the non-minified ones.
+ find pagure/static/ -name "*.css" -type l \
+ | sed 's/\.css$$//' | while read file ; do \
+ yui-compressor -o $${file}.min.css $${file}.css; \
+ done
+ dh_auto_build
+ PYTHONPATH=$(CURDIR) http_proxy='127.0.0.1:9' \
+ make -C doc/ html man
A debian/source/format => debian/source/format +1 -0
@@ 0,0 1,1 @@
+3.0 (quilt)
A debian/source/options => debian/source/options +1 -0
@@ 0,0 1,1 @@
+extend-diff-ignore = "^[^/]*[.]egg-info/"
A debian/watch => debian/watch +2 -0
@@ 0,0 1,2 @@
+version=4
+https://pagure.io/releases/@PACKAGE@/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate