diff mbox

[11/11] gnu: Add pagure.

Message ID 20161214122526.4458-12-ng0@libertad.pw
State New
Headers show

Commit Message

ng0 Dec. 14, 2016, 12:25 p.m. UTC
* gnu/packages/version-control.scm (pagure): New variable.
---
 gnu/packages/version-control.scm | 87 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 86 insertions(+), 1 deletion(-)

Comments

Leo Famulari Dec. 14, 2016, 3:36 p.m. UTC | #1
On Wed, Dec 14, 2016 at 12:25:26PM +0000, ng0 wrote:
> * gnu/packages/version-control.scm (pagure): New variable.

How can I test this? Is there supposed to be 'runserver.py' file to run?

https://pagure.io/pagure
ng0 Dec. 14, 2016, 4:27 p.m. UTC | #2
Leo Famulari <leo@famulari.name> writes:

> On Wed, Dec 14, 2016 at 12:25:26PM +0000, ng0 wrote:
>> * gnu/packages/version-control.scm (pagure): New variable.
>
> How can I test this? Is there supposed to be 'runserver.py' file to run?
>
> https://pagure.io/pagure

It's mostly "read the docs" and as I progressed in reading the
docs, I realized I forgot to add some more files.
So... New patch coming in later, sorry. Can everything else
except pagure be merged already? Or do you want to wait on that?

https://docs.pagure.org/pagure/install.html#installing-pagure-via-setup-py
Leo Famulari Dec. 14, 2016, 4:47 p.m. UTC | #3
On Wed, Dec 14, 2016 at 04:27:18PM +0000, ng0 wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Wed, Dec 14, 2016 at 12:25:26PM +0000, ng0 wrote:
> >> * gnu/packages/version-control.scm (pagure): New variable.
> >
> > How can I test this? Is there supposed to be 'runserver.py' file to run?
> >
> > https://pagure.io/pagure
> 
> It's mostly "read the docs" and as I progressed in reading the
> docs, I realized I forgot to add some more files.
> So... New patch coming in later, sorry. Can everything else
> except pagure be merged already? Or do you want to wait on that?

Seeing Pagure run is the best way to test the rest of the patches, so
I'd rather wait.

Note that the v2 patches still need to be changed to download their
source code from PyPi.
ng0 Dec. 14, 2016, 6:26 p.m. UTC | #4
ng0 <ng0@libertad.pw> writes:

> Leo Famulari <leo@famulari.name> writes:
>
>> On Wed, Dec 14, 2016 at 12:25:26PM +0000, ng0 wrote:
>>> * gnu/packages/version-control.scm (pagure): New variable.
>>
>> How can I test this? Is there supposed to be 'runserver.py' file to run?
>>
>> https://pagure.io/pagure
>
> It's mostly "read the docs" and as I progressed in reading the
> docs, I realized I forgot to add some more files.
> So... New patch coming in later, sorry. Can everything else
> except pagure be merged already? Or do you want to wait on that?
>
> https://docs.pagure.org/pagure/install.html#installing-pagure-via-setup-py

Appending to my last message, it can take a while until I submit
the next change. Getting this package working is in my own
interest so I will definitely finish this.
ng0 Dec. 19, 2016, 9:07 a.m. UTC | #5
Moved the sources from github to pypi as suggested by Leo.
As I need to write a service for redis and pagure to sufficiently test pagure, it would be good if the dependencies could be added before pagure.
diff mbox

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7918b90ca..3b8fecc38 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -10,7 +10,7 @@ 
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1263,3 +1263,88 @@  a built-in wiki, built-in file browsing, built-in tickets system, etc.")
     (description "Stagit creates static pages for git repositories, the results can
 be served with a HTTP file server of your choice.")
     (license license:expat)))
+
+(define-public pagure
+  (package
+    (name "pagure")
+    (version "2.10.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (list
+             ;; XXX: upstream serves an invalid certificate,
+             ;; https://pagure.io/fedora-infrastructure/issue/5600
+             (string-append "https://web.archive.org/web/20161211142731/"
+                            "https://releases.pagure.org/pagure/pagure-"
+                            version ".tar.gz")
+             (string-append "https://releases.pagure.org/pagure/"
+                                 name "-" version ".tar.gz")))
+       (sha256
+        (base32
+         "1h629hd8wfvdnmlrd1g3hpxcgkqzrxdpnxnmqhd2wi04g86pn7pg"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-additional-files
+           ;; Copy the sample files as they can help setting up
+           ;; the service. This is a step mentioned at
+           ;; https://docs.pagure.org/pagure/install.html#installing-pagure-via-setup-py
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "files/pagure.cfg.sample"
+                           (string-append (assoc-ref outputs "out") "/etc/pagure/"))
+             (install-file "files/alembic.ini"
+                           (string-append (assoc-ref outputs "out") "/etc/pagure/"))
+             (install-file "files/pagure.conf"
+                           (string-append (assoc-ref outputs "out") "/etc/httpd/conf.d/"))
+             (install-file "files/pagure.wsgi"
+                           (string-append (assoc-ref outputs "out") "/share/pagure/"))
+             (install-file "createdb.py"
+                           (string-append (assoc-ref outputs "out") "/share/pagure/"))
+             #t)))))
+    (propagated-inputs
+     ;; There are no executables provided, it is all provided
+     ;; as a library.
+     `(("python2-alembic" ,python2-alembic)
+       ("python2-arrow" ,python2-arrow)
+       ("python2-binaryornot" ,python2-binaryornot)
+       ("python2-bleach" ,python2-bleach)
+       ("python2-blinker" ,python2-blinker)
+       ("python2-chardet" ,python2-chardet)
+       ("python2-docutils" ,python2-docutils)
+       ("python2-enum34" ,python2-enum34)
+       ("python2-flask" ,python2-flask)
+       ("python2-flask-wtf" ,python2-flask-wtf)
+       ("python2-flask-multistatic" ,python2-flask-multistatic)
+       ("python2-kitchen" ,python2-kitchen)
+       ("python2-markdown" ,python2-markdown)
+       ("python2-munch" ,python2-munch)
+       ("python2-pillow" ,python2-pillow)
+       ("python2-psutil" ,python2-psutil)
+       ;; TODO: pyclamd ; only for VIRUS_SCAN_ATTACHMENTS
+       ("python2-pygit2" ,python2-pygit2)
+       ("python2-pygments" ,python2-pygments)
+       ("python2-openid" ,python2-openid)
+       ("python2-openid-cla" ,python2-openid-cla)
+       ("python2-openid-teams" ,python2-openid-teams)
+       ("python2-redis" ,python2-redis)
+       ("python2-six" ,python2-six)
+       ("python2-sqlalchemy" ,python2-sqlalchemy)
+       ("python2-straight.plugin" ,python2-straight.plugin)
+       ("python2-trollius-redis" ,python2-trollius-redis)
+       ("python2-wtforms" ,python2-wtforms)
+       ("python2-cryptography" ,python2-cryptography)
+       ;; TODO: python2-fedora ;for fas and openid auth backends
+       ("python2-py-bcrypt" ,python2-py-bcrypt)))
+    (home-page "https://pagure.io/pagure/")
+    (synopsis "Web-based collaborative software platform based on pygit2")
+    (description
+     "Pagure is a git-centered, web-based collaborative
+software platform, 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 project and contribute to it via
+the pull-request mechanism.")
+    (license license:gpl2+)))