Patchwork [11/11] gnu: Add pagure.

login
register
mail settings
Submitter ng0
Date Dec. 11, 2016, 6:12 p.m.
Message ID <20161211181237.24485-12-ng0@libertad.pw>
Download mbox | patch
Permalink /patch/18372/
State New
Headers show

Comments

ng0 - Dec. 11, 2016, 6:12 p.m.
* gnu/packages/version-control.scm (pagure): New variable.
---
 gnu/packages/version-control.scm | 81 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 80 insertions(+), 1 deletion(-)
ng0 - Dec. 11, 2016, 6:48 p.m.
ng0 <ng0@libertad.pw> writes:

> * gnu/packages/version-control.scm (pagure): New variable.
> ---
>  gnu/packages/version-control.scm | 81 +++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 80 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index f6845fab0..1eee6ad87 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.
>  ;;;
> @@ -1265,3 +1265,82 @@ 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.
> +             (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")))

Please add this when commiting:
XXX: The certificate issue upstream https://pagure.io/fedora-infrastructure/issue/5600

Thanks!

> +       (sha256
> +        (base32
> +         "1h629hd8wfvdnmlrd1g3hpxcgkqzrxdpnxnmqhd2wi04g86pn7pg"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:python ,python-2
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'install-additional-files
> +           ;; We need to copy files.
> +           (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
> +     `(("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)
> +       ;; 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 "Git-centered forge based on pygit2")
> +    (description
> +     "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.")
> +    (license license:gpl2+)))
> -- 
> 2.11.0
>
>
Leo Famulari - Dec. 11, 2016, 10:54 p.m.
On Sun, Dec 11, 2016 at 06:12:37PM +0000, ng0 wrote:
> * gnu/packages/version-control.scm (pagure): New variable.

> +         (add-after 'install 'install-additional-files
> +           ;; We need to copy files.

Can you give a little more detail about what these files are, why we
need them, etc?

> +           (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)))))

> +       ;; pyclamd ; only for VIRUS_SCAN_ATTACHMENTS

Is this a TODO package?
Ricardo Wurmus - Dec. 13, 2016, 10:05 p.m.
Hi ng0,

thanks for the patch set!

> * gnu/packages/version-control.scm (pagure): New variable.
> ---
>  gnu/packages/version-control.scm | 81 +++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 80 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index f6845fab0..1eee6ad87 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.
>  ;;;
> @@ -1265,3 +1265,82 @@ 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.
> +             (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
> +           ;; We need to copy files.
> +           (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/"))

Are these files useful for us?  Or should this really be handled by a
service because the files are just examples?

> +             #t)))))
> +    (propagated-inputs

Is it really necessary to propagate these inputs?  Is this package used
as a Python library or does it provide executables?  In the latter case
the python-build-system takes care of wrapping executables, so that
propagation won’t be necessary.

> +     `(("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)
> +       ;; 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)

Unusual name.  If you added this package please make sure to rename it
to “python2-straight-plugin” (no “.” in package names).

> +       ("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 "Git-centered forge based on pygit2")

What is a forge?

> +    (description
> +     "Pagure is a git-centered forge, python based using pygit2.

“Python-based”

> +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

“projects” is plural, so I’m not sure what “contribute to it” (singular)
refers to.

> +the now-popular pull-request mechanism.")

I’d remove “now-popular”.

> +    (license license:gpl2+)))

Patch

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index f6845fab0..1eee6ad87 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.
 ;;;
@@ -1265,3 +1265,82 @@  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.
+             (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
+           ;; We need to copy files.
+           (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
+     `(("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)
+       ;; 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 "Git-centered forge based on pygit2")
+    (description
+     "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.")
+    (license license:gpl2+)))