* [PATCH] gnu: Add cgit.
@ 2016-03-27 14:02 宋文武
2016-03-27 14:14 ` 宋文武
2016-03-28 16:33 ` Ludovic Courtès
0 siblings, 2 replies; 7+ messages in thread
From: 宋文武 @ 2016-03-27 14:02 UTC (permalink / raw)
To: guix-devel; +Cc: 宋文武
* gnu/packages/version-control.scm (cgit): New variable.
---
gnu/packages/version-control.scm | 60 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7d7276a..498885d 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -364,6 +364,66 @@ write native speed custom Git applications in any language with bindings.")
;; GPLv2 with linking exception
(license gpl2)))
+(define-public cgit
+ (package
+ (name "cgit")
+ (version "0.12")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://git.zx2c4.com/cgit/snapshot/cgit-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1dx54hgfyabmg9nm5qp6d01f54nlbqbbdwhwl0llb9imjf237qif"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;
+ #:test-target "test"
+ #:make-flags '("CC=gcc" "SHELL_PATH=sh")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-git
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Unpack the source of git into the 'git' directory.
+ (zero? (system*
+ "tar" "--strip-components=1" "-C" "git" "-xf"
+ (assoc-ref inputs "git:src")))))
+ (delete 'configure) ; no configure script
+ (add-after 'build 'build-man
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (zero? (apply system* `("make" ,@make-flags "doc-man")))))
+ (replace 'install
+ (lambda* (#:key make-flags outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (and (zero? (apply system*
+ `("make" ,@make-flags
+ ,(string-append "prefix=" out)
+ ,(string-append
+ "CGIT_SCRIPT_PATH=" out "/share/cgit")
+ "install" "install-man")))
+ ;; Move the platform-dependent 'cgit.cgi' into lib
+ ;; to get it stripped.
+ (rename-file (string-append out "/share/cgit/cgit.cgi")
+ (string-append out "/lib/cgit/cgit.cgi"))
+ #t)))))))
+ (native-inputs
+ `(("asciidoc" ,asciidoc)
+ ("xmllint" ,libxml2)
+ ("xsltprot" ,libxslt)))
+ (inputs
+ `(("docbook-xml" ,docbook-xml)
+ ("docbook-xsl" ,docbook-xsl)
+ ("git:src" ,(package-source git))
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)))
+ (home-page "https://git.zx2c4.com/cgit/")
+ (synopsis "Web frontend for git repositories")
+ (description
+ "CGit is an attempt to create a fast web interface for the Git SCM, using
+a built-in cache to decrease server I/O pressure.")
+ (license gpl2)))
+
(define-public shflags
(package
(name "shflags")
--
2.6.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] gnu: Add cgit.
2016-03-27 14:02 [PATCH] gnu: Add cgit 宋文武
@ 2016-03-27 14:14 ` 宋文武
2016-03-27 20:49 ` Thompson, David
2016-03-28 16:33 ` Ludovic Courtès
1 sibling, 1 reply; 7+ messages in thread
From: 宋文武 @ 2016-03-27 14:14 UTC (permalink / raw)
To: guix-devel
I get it built, but haven't run it.
For a cgit service, which CGI runner should we use?
IIUC, typical setup are:
- nginx + fcgiwrap (or uwsgi)
- apache httpd
- lighttpd
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gnu: Add cgit.
2016-03-27 14:14 ` 宋文武
@ 2016-03-27 20:49 ` Thompson, David
2016-03-28 10:13 ` 宋文武
2016-03-28 16:31 ` Ludovic Courtès
0 siblings, 2 replies; 7+ messages in thread
From: Thompson, David @ 2016-03-27 20:49 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
On Sun, Mar 27, 2016 at 10:14 AM, 宋文武 <iyzsong@member.fsf.org> wrote:
> I get it built, but haven't run it.
>
> For a cgit service, which CGI runner should we use?
> IIUC, typical setup are:
> - nginx + fcgiwrap (or uwsgi)
> - apache httpd
> - lighttpd
I'm partial to nginx, and it's the only one we have a service for, but
it could be made sufficiently generic that it can use any web server
that a user supplied a handler for. The nginx service is currently
missing a way to extend it with additional configuration. I posted a
patch for this awhile ago but it never made it to master due to some
issues. Once we make nginx extensible, writing a cgit service should
be easy.
BTW, have you verified that cgit does not distribute any minified
JavaScript files?
- Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gnu: Add cgit.
2016-03-27 20:49 ` Thompson, David
@ 2016-03-28 10:13 ` 宋文武
2016-03-28 16:31 ` Ludovic Courtès
1 sibling, 0 replies; 7+ messages in thread
From: 宋文武 @ 2016-03-28 10:13 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel
"Thompson, David" <dthompson2@worcester.edu> writes:
> On Sun, Mar 27, 2016 at 10:14 AM, 宋文武 <iyzsong@member.fsf.org> wrote:
>> I get it built, but haven't run it.
>>
>> For a cgit service, which CGI runner should we use?
>> IIUC, typical setup are:
>> - nginx + fcgiwrap (or uwsgi)
>> - apache httpd
>> - lighttpd
>
> I'm partial to nginx, and it's the only one we have a service for, but
> it could be made sufficiently generic that it can use any web server
> that a user supplied a handler for. The nginx service is currently
> missing a way to extend it with additional configuration. I posted a
> patch for this awhile ago but it never made it to master due to some
> issues. Once we make nginx extensible, writing a cgit service should
> be easy.
OK, nginx itself won't able to run CGI applications.
And since the website of fastcgi (used by fcgiwrap and lighttpd) is down
now, I'll try package uwsgi.
>
> BTW, have you verified that cgit does not distribute any minified
> JavaScript files?
No, and now it seems that cgit doesn't use javascript at all :-)
Thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gnu: Add cgit.
2016-03-27 20:49 ` Thompson, David
2016-03-28 10:13 ` 宋文武
@ 2016-03-28 16:31 ` Ludovic Courtès
1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2016-03-28 16:31 UTC (permalink / raw)
To: Thompson, David; +Cc: guix-devel
"Thompson, David" <dthompson2@worcester.edu> skribis:
> On Sun, Mar 27, 2016 at 10:14 AM, 宋文武 <iyzsong@member.fsf.org> wrote:
>> I get it built, but haven't run it.
>>
>> For a cgit service, which CGI runner should we use?
>> IIUC, typical setup are:
>> - nginx + fcgiwrap (or uwsgi)
>> - apache httpd
>> - lighttpd
>
> I'm partial to nginx, and it's the only one we have a service for, but
> it could be made sufficiently generic that it can use any web server
> that a user supplied a handler for. The nginx service is currently
> missing a way to extend it with additional configuration. I posted a
> patch for this awhile ago but it never made it to master due to some
> issues. Once we make nginx extensible, writing a cgit service should
> be easy.
We should get that patch in, it would be tremendously useful!
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gnu: Add cgit.
2016-03-27 14:02 [PATCH] gnu: Add cgit 宋文武
2016-03-27 14:14 ` 宋文武
@ 2016-03-28 16:33 ` Ludovic Courtès
2016-03-29 4:03 ` 宋文武
1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2016-03-28 16:33 UTC (permalink / raw)
To: 宋文武; +Cc: guix-devel
宋文武 <iyzsong@gmail.com> skribis:
> * gnu/packages/version-control.scm (cgit): New variable.
[...]
> + (arguments
> + '(#:tests? #f ;
Please add a comment on why tests are disabled. Better yet: fix’em!
;-)
> + (native-inputs
> + `(("asciidoc" ,asciidoc)
> + ("xmllint" ,libxml2)
> + ("xsltprot" ,libxslt)))
> + (inputs
> + `(("docbook-xml" ,docbook-xml)
> + ("docbook-xsl" ,docbook-xsl)
I would move DocBook to ‘native-inputs’.
> + (description
> + "CGit is an attempt to create a fast web interface for the Git SCM, using
> +a built-in cache to decrease server I/O pressure.")
> + (license gpl2)))
Version 2 only, right?
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] gnu: Add cgit.
2016-03-28 16:33 ` Ludovic Courtès
@ 2016-03-29 4:03 ` 宋文武
0 siblings, 0 replies; 7+ messages in thread
From: 宋文武 @ 2016-03-29 4:03 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
ludo@gnu.org (Ludovic Courtès) writes:
> 宋文武 <iyzsong@gmail.com> skribis:
>
>> * gnu/packages/version-control.scm (cgit): New variable.
>
> [...]
>
>> + (arguments
>> + '(#:tests? #f ;
>
> Please add a comment on why tests are disabled. Better yet: fix’em!
> ;-)
It try to build a some kind of full version of git, but
failed. (I give up on fixing it now.)
>> + (native-inputs
>> + `(("asciidoc" ,asciidoc)
>> + ("xmllint" ,libxml2)
>> + ("xsltprot" ,libxslt)))
>> + (inputs
>> + `(("docbook-xml" ,docbook-xml)
>> + ("docbook-xsl" ,docbook-xsl)
>
> I would move DocBook to ‘native-inputs’.
OK, since they’re only for building the manpage.
>
>> + (description
>> + "CGit is an attempt to create a fast web interface for the Git SCM, using
>> +a built-in cache to decrease server I/O pressure.")
>> + (license gpl2)))
>
> Version 2 only, right?
Yes, the source don't mention “later version”.
Pushed, thanks for review!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-03-29 4:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-27 14:02 [PATCH] gnu: Add cgit 宋文武
2016-03-27 14:14 ` 宋文武
2016-03-27 20:49 ` Thompson, David
2016-03-28 10:13 ` 宋文武
2016-03-28 16:31 ` Ludovic Courtès
2016-03-28 16:33 ` Ludovic Courtès
2016-03-29 4:03 ` 宋文武
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.