From patchwork Sat Jan 6 13:59:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 58429 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C10D727BBE9; Sat, 6 Jan 2024 14:01:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 177F627BBE2 for ; Sat, 6 Jan 2024 14:01:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rM7EQ-00035C-Sq; Sat, 06 Jan 2024 09:00:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rM7EP-00034g-Cx for guix-patches@gnu.org; Sat, 06 Jan 2024 09:00:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rM7EP-0000G0-4P for guix-patches@gnu.org; Sat, 06 Jan 2024 09:00:57 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rM7ET-0007fQ-Rv for guix-patches@gnu.org; Sat, 06 Jan 2024 09:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68287] [PATCH] gnu: cgit: Update to 793c420897e18eb3474c751d54cf4e0983f85433. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Jan 2024 14:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68287 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68287@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170454962225566 (code B ref -1); Sat, 06 Jan 2024 14:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jan 2024 14:00:22 +0000 Received: from localhost ([127.0.0.1]:58838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rM7Dp-0006eI-Q0 for submit@debbugs.gnu.org; Sat, 06 Jan 2024 09:00:22 -0500 Received: from lists.gnu.org ([2001:470:142::17]:50778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rM7Dn-0006UQ-QN for submit@debbugs.gnu.org; Sat, 06 Jan 2024 09:00:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rM7Dc-0002SW-Jv for guix-patches@gnu.org; Sat, 06 Jan 2024 09:00:08 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rM7DZ-0007S6-8S for guix-patches@gnu.org; Sat, 06 Jan 2024 09:00:08 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id F266B245156; Sat, 6 Jan 2024 14:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1704549601; bh=IjJrWuJgZZ52moZs1cXGqnayNm1my3OLIMvhJDQP8LM=; h=From:To:Cc:Subject:Date; b=mUPwVlOoBzcoCUuEKuqswXN+O5nCA4lt9mo+nr1Rmtro3Xcm+ZWKlRq6/1mXWZTJn Sg73DzRBSuw8NUduH4Yl5V6xctWR4YolU11z2tk97krN11BcsDMXGrptDUKkqQvr1W KpA35cZLLwEYMDpeuzOTNeNeTgigL37LBahb5cO9FH2Le6GvwHdQL2AQyR+d3KZMkf AkAv18BvpdHDe7a7Jtxic6DYnTFhrwXNMTXEDByeYWHGGGKZSOHMciwCLxSHNDop/2 XjvHnH0iU1RFx6mA55vk4bCE8QaXnMRKs0W+2FBfwd6llOzdY+bGAAZCnlPMgVMRkZ K3T1xju8EFNgRLu0W+UyagENc67NV8kfoSAmSJIGCRIqRbkU/shIP31cU1JVA9I666 yue1ZEyuCKextcHv+RJDmXoXMW4VLo7gcWkkMKuAXLsRN287696hQ5co+EWF5TTEHC rTDDlQjX4kP8Ai+2UHya1WQA7UnN44ReuXN6ehZwg/DTwmVIWB96CejjF+By48Uehj Jb+bGFQqZ6uKtrCph4RCgP5Kfo5aXbXTdt1sLRHuvVBzpwEE1g+2s5Xfu7hdSJtXG2 o357ZQ2Ct5VQrIgr69Az71UX1GZFLc7thkbh4yPmNYCX1xvrLb/6YaWHcrb3Y9rywY 4FMB1phx4HF96ZM3ewMN7N4w= Received: from localhost (unknown [193.32.127.155]) by wolfsden.cz (Postfix) with ESMTPSA id 49349243FC7; Sat, 6 Jan 2024 14:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1704549600; bh=IjJrWuJgZZ52moZs1cXGqnayNm1my3OLIMvhJDQP8LM=; h=From:To:Cc:Subject:Date; b=mCHGth92ognliwTYk+p4eWbB/mWuWGyQ/meZAgttqdXpcorPH2L7E9sCd3A73Wq19 D5zCICtHtgpRx5NBc1oTbStoIwYrpYj0Ondamic5ulc2xvRWIXVTVbSvPzBogoH7hm WvWMYeSVsjRI0r1zFG/XNfXjs3ecgQWiSHDUP/H8rgKF7rgPSgFY6emgZbJdHdNX2+ 6PCTT+IyoCbPNBkB+G9zk2feTfJatCESFMYelcO9V82u0KQ8BYFDs689RChW4at79v TrxR9D88X1WZ/8GoMzWFu7knOgQGk+VwpGWi1e58ef6gC5Hx9tvu94Tjz4KlImtYpQ c4DCVNXBGlMh3Jn5/w0xbR9NPGZVIyP7Dqv+OkrVW1RLnwITSqGghK8yXcdBcxmwac p9IU31fGvbGwqLo/cMYk9JP1g/OOQsExlX69hgvzFrQkVI4+7y9fshH6NFWWs/2K54 vYX3gkvKNLAI9cbXTzXkzhAEs1e3TG5SLQ98OKBUYR5pFrHKymiE/aftrxV1BB/Zoe SeU1jjx2w7qf6djo2aR2UYv0YvnV+mD9QIBMJ4UEvXn8MJiPH8td4klfo5kGxJy+HD aJs44MgwpO0oNsUrlz2oW3MwCEPVodtQHB+XIC0KxaDyD0BRFGCRyrCTphu+v6emQv NJlD2tNp4jiQwSnvqmt5S0V4= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 6 Jan 2024 14:59:54 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The 1.2.3 release is more than 4 years old, is buggy (for example caching is broken). Both the upstream itself and git.kernel.org seems to be running a newer custom version built from the git. Therefore this commit replaces the old release with a build from the git tree. * gnu/packages/version-control.scm (cgit): Update to 793c420897e18eb3474c751d54cf4e0983f85433. [inputs]: Update git to 2.43.0. Change-Id: I3441e9e2837d22ae208f5cccc53d815cc3e0f042 --- gnu/packages/version-control.scm | 211 ++++++++++++++++--------------- 1 file changed, 107 insertions(+), 104 deletions(-) base-commit: c0e21e523d93081153a2ffc91e5a9f06afe62b91 diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 40d7a00dae..4d5d1a9720 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1072,115 +1072,118 @@ (define-public git-remote-gcrypt (license license:gpl3+))) (define-public cgit - (package - (name "cgit") - ;; Update the ‘git-source’ input as well. - (version "1.2.3") - (source (origin - (method url-fetch) - (uri (string-append - "https://git.zx2c4.com/cgit/snapshot/cgit-" - version ".tar.xz")) - (sha256 - (base32 - "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss")))) - (build-system gnu-build-system) - (arguments - (list - #:tests? #f ; XXX: fail to build the in-source git. - #:test-target "test" - #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) - "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. - (invoke "tar" "--strip-components=1" "-C" "git" "-xf" - (assoc-ref inputs "git-source")))) - (add-after 'unpack 'patch-absolute-file-names - (lambda* (#:key inputs #:allow-other-keys) - (define (quoted-file-name input path) - (string-append "\"" input path "\"")) - (substitute* "ui-snapshot.c" - (("\"gzip\"") - (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip")) - (("\"bzip2\"") - (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2")) - (("\"xz\"") - (quoted-file-name (assoc-ref inputs "xz") "/bin/xz"))) + (let ((commit "793c420897e18eb3474c751d54cf4e0983f85433") + (rev "1")) + (package + (name "cgit") + ;; Update the ‘git-source’ input as well. + (version (git-version "1.2.3" rev commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.zx2c4.com/cgit") + (commit commit))) + (sha256 + (base32 + "1mhrm14wpqvralf9j33ih5ai6naiq3g2jg2z91gnw9dhh8f9ilwz")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ; XXX: fail to build the in-source git. + #:test-target "test" + #:make-flags #~(list (string-append "CC=" #$(cc-for-target)) + "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. + (invoke "tar" "--strip-components=1" "-C" "git" "-xf" + (assoc-ref inputs "git-source")))) + (add-after 'unpack 'patch-absolute-file-names + (lambda* (#:key inputs #:allow-other-keys) + (define (quoted-file-name input path) + (string-append "\"" input path "\"")) + (substitute* "ui-snapshot.c" + (("\"gzip\"") + (quoted-file-name (assoc-ref inputs "gzip") "/bin/gzip")) + (("\"bzip2\"") + (quoted-file-name (assoc-ref inputs "bzip2") "/bin/bzip2")) + (("\"xz\"") + (quoted-file-name (assoc-ref inputs "xz") "/bin/xz"))) - (substitute* "filters/about-formatting.sh" - (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out") - "/lib/cgit/filters")) - (("\\| tr") (string-append "| " (which "tr")))) + (substitute* "filters/about-formatting.sh" + (("$\\(dirname $0\\)") (string-append (assoc-ref outputs "out") + "/lib/cgit/filters")) + (("\\| tr") (string-append "| " (which "tr")))) - (substitute* "filters/html-converters/txt2html" - (("sed") (which "sed"))) + (substitute* "filters/html-converters/txt2html" + (("sed") (which "sed"))) - (substitute* "filters/html-converters/man2html" - (("groff") (which "groff"))) + (substitute* "filters/html-converters/man2html" + (("groff") (which "groff"))) - (substitute* "filters/html-converters/rst2html" - (("rst2html\\.py") (which "rst2html.py"))))) - (delete 'configure) ; no configure script - (add-after 'build 'build-man - (lambda* (#:key make-flags #:allow-other-keys) - (apply invoke "make" "doc-man" make-flags))) - (replace 'install - (lambda* (#:key make-flags outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (apply invoke - "make" "install" "install-man" - (string-append "prefix=" out) - (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit") - make-flags) - ;; 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"))))) - (add-after 'install 'wrap-python-scripts - (lambda* (#:key outputs #:allow-other-keys) - (for-each - (lambda (file) - (wrap-program (string-append (assoc-ref outputs "out") - "/lib/cgit/filters/" file) - `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))) - '("syntax-highlighting.py" - "html-converters/md2html"))))))) - (native-inputs - ;; For building manpage. - (list asciidoc)) - (inputs - `(;; Building cgit requires a Git source tree. - ("git-source" - ,(origin - (method url-fetch) - ;; cgit is tightly bound to git. Use GIT_VER from the Makefile, - ;; which may not match the current (package-version git). - (uri "mirror://kernel.org/software/scm/git/git-2.25.4.tar.xz") - (sha256 - (base32 "11am6s46wmn1yll5614smjhzlghbqq6gysgcs64igjr9y5wzpdxq")))) - ("bash-minimal" ,bash-minimal) - ("openssl" ,openssl) - ("python" ,python) - ("python-docutils" ,python-docutils) - ("python-markdown" ,python-markdown) - ("python-pygments" ,python-pygments) - ("zlib" ,zlib) - ;; bzip2, groff, gzip and xz are inputs (not native inputs) - ;; since they are actually substituted into cgit source and - ;; referenced by the built package output. - ("bzip2" ,bzip2) - ("groff" ,groff) - ("gzip" ,gzip) - ("xz" ,xz))) - (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 + (substitute* "filters/html-converters/rst2html" + (("rst2html\\.py") (which "rst2html.py"))))) + (delete 'configure) ; no configure script + (add-after 'build 'build-man + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "doc-man" make-flags))) + (replace 'install + (lambda* (#:key make-flags outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (apply invoke + "make" "install" "install-man" + (string-append "prefix=" out) + (string-append "CGIT_SCRIPT_PATH=" out "/share/cgit") + make-flags) + ;; 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"))))) + (add-after 'install 'wrap-python-scripts + (lambda* (#:key outputs #:allow-other-keys) + (for-each + (lambda (file) + (wrap-program (string-append (assoc-ref outputs "out") + "/lib/cgit/filters/" file) + `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))) + '("syntax-highlighting.py" + "html-converters/md2html"))))))) + (native-inputs + ;; For building manpage. + (list asciidoc)) + (inputs + `( ;; Building cgit requires a Git source tree. + ("git-source" + ,(origin + (method url-fetch) + ;; cgit is tightly bound to git. Use GIT_VER from the Makefile, + ;; which may not match the current (package-version git). + (uri "mirror://kernel.org/software/scm/git/git-2.43.0.tar.xz") + (sha256 + (base32 "1v3nkfm3gw8wr7595qy86qla8xyjvi85fmly4lfph4frfcz60ijl")))) + ("bash-minimal" ,bash-minimal) + ("openssl" ,openssl) + ("python" ,python) + ("python-docutils" ,python-docutils) + ("python-markdown" ,python-markdown) + ("python-pygments" ,python-pygments) + ("zlib" ,zlib) + ;; bzip2, groff, gzip and xz are inputs (not native inputs) + ;; since they are actually substituted into cgit source and + ;; referenced by the built package output. + ("bzip2" ,bzip2) + ("groff" ,groff) + ("gzip" ,gzip) + ("xz" ,xz))) + (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 license:gpl2))) + (license license:gpl2)))) (define-public cgit-pink (package