From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GHFeNkdIe2T7JwEASxT56A (envelope-from ) for ; Sat, 03 Jun 2023 16:03:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aBFWNUdIe2QI8AAAG6o9tA (envelope-from ) for ; Sat, 03 Jun 2023 16:03:51 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 46AB81479F for ; Sat, 3 Jun 2023 16:03:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5RqU-0002lQ-H5; Sat, 03 Jun 2023 10:03:06 -0400 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 1q5RqR-0002kT-7q for guix-patches@gnu.org; Sat, 03 Jun 2023 10:03:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q5RqQ-0004DL-Vo for guix-patches@gnu.org; Sat, 03 Jun 2023 10:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5RqQ-00040L-Qg for guix-patches@gnu.org; Sat, 03 Jun 2023 10:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Jun 2023 14:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63874 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63874@debbugs.gnu.org Cc: Josselin Poiret X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168580095715334 (code B ref -1); Sat, 03 Jun 2023 14:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jun 2023 14:02:37 +0000 Received: from localhost ([127.0.0.1]:44004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rq0-0003zF-Lb for submit@debbugs.gnu.org; Sat, 03 Jun 2023 10:02:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:56340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5Rpt-0003ym-0t for submit@debbugs.gnu.org; Sat, 03 Jun 2023 10:02:35 -0400 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 1q5Rpp-0002ag-Iq for guix-patches@gnu.org; Sat, 03 Jun 2023 10:02:27 -0400 Received: from jpoiret.xyz ([206.189.101.64]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q5Rpl-00045L-Mc for guix-patches@gnu.org; Sat, 03 Jun 2023 10:02:24 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 5A0E5185300; Sat, 3 Jun 2023 14:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1685800931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tAVLIrQ6cMN47OHzEnDQwsPVl3NuX1SHf5qvr81FZqw=; b=I5vlo3jiZAXsIa82Iuiz6kVnZ5VT24QHa+5hp9wcd8MIgT/oaagiQoDcmoOvItH3hOB/dC o9QBpdS0c+GwNl73GUrRFWg5WzGQAmu9JQ4DJGduluvve9eLITZKPjKmGKhu74HM1j2gIs VBdEOLvM+FD0pe5oKXyq4ziLndcJegoJ48pQtCft+S4Pd4s8kfw0tXedmW2ofXI97MPFi0 eDnQiDe/LEI8msXNintqp7H7VShEgeoFxKEHkfnZP33ryHwpa1prKuXbJG8nSNn1Qjch6Z zj4U0scvcqJMqBzqbiFQezJlOkeaVp26XEHqDGgD8QbrNj/8E3zowlHKBNRqwg== Date: Sat, 3 Jun 2023 16:02:06 +0200 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / Received-SPF: pass client-ip=206.189.101.64; envelope-from=dev@jpoiret.xyz; helo=jpoiret.xyz 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: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685801031; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tAVLIrQ6cMN47OHzEnDQwsPVl3NuX1SHf5qvr81FZqw=; b=tkBVh+JG8qICfn02GcXWS4ldW8Dy+fFxLefAzehmbtYUKGn4Nu0tC3WGr6Y4UqFMIh6tde FARFJyIFBTabqE3G1u0nLgHp3kqbrpwJnnCQwHwG6oG82+RtX20DNH7vl8nwWrjyj/MQgS q94NVuVDzhwwqjwOtQiyLJsYZlz/tZO/rXwWY+eFtGguXXYqPnLUkjUZkVyo93s8kIjTfh /Jr6ugxzpdr1vTJrbmwgsksVdujzwBjf4LqfmlCVXah2cIuuZBw/RmqnRIP7jvgLXzl71X 0szfUlqinktkJNjt36uYZn56wxpjNQ9eY9EY3E8nsbB5dGyReq05KDHAM9FTNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=I5vlo3ji; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685801031; a=rsa-sha256; cv=none; b=rn3JnFBiIPM15o+ruRKTBofwMGzy6FXVsqIYy57CXzC2NiRW2V4Ubvmap9/xYG/GrdQnq4 mJp7bzUXaRY461+GeRvytKBPSae6UZIW+83aQlU5O2u0qxmVAZ2UFjZ3SIzUAPbMIC21dE OD+19rJgyOSAyH0Y/ThdyOMf3xCZVrR/F0pIVGGI1YiXwLZ9uNYnEXpipZATBv7jL4MCwQ 2p5jrGQ0tBqQyGUvqVmqFyvpQDXqAdnocgAUe8MNHH9eWw+rrpO0UhH4ZH1GixmarW0vJY K4w/KCdeDN+K1ClgM+l7zy81vKFnt0gGzVg2THoQYGIBoC1BJWrR2yZBKv7+IA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.88 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=I5vlo3ji; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 46AB81479F X-Spam-Score: -3.88 X-TUID: eRhOr3Tp0rdO From: Josselin Poiret * gnu/packages/patches/git-filter-repo-generate-doc.patch: * gnu/local.mk (dist_patch_DATA): * gnu/packages/version-control.scm (git-filter-repo): Update to 2.38.0, use git-fetch, use patch and switch to gnu-build-system and G-Exps. --- gnu/local.mk | 1 + .../git-filter-repo-generate-doc.patch | 289 ++++++++++++++++++ gnu/packages/version-control.scm | 48 ++- 3 files changed, 324 insertions(+), 14 deletions(-) create mode 100644 gnu/packages/patches/git-filter-repo-generate-doc.patch diff --git a/gnu/local.mk b/gnu/local.mk index 09a4617daf..bc20a69949 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1217,6 +1217,7 @@ dist_patch_DATA = \ %D%/packages/patches/genimage-mke2fs-test.patch \ %D%/packages/patches/geoclue-config.patch \ %D%/packages/patches/gettext-libunicode-update.patch \ + %D%/packages/patches/git-filter-repo-generate-doc.patch \ %D%/packages/patches/git-header-cmd.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-9.2-glibc-2.33-link-order.patch \ diff --git a/gnu/packages/patches/git-filter-repo-generate-doc.patch b/gnu/packages/patches/git-filter-repo-generate-doc.patch new file mode 100644 index 0000000000..12b9d42ef2 --- /dev/null +++ b/gnu/packages/patches/git-filter-repo-generate-doc.patch @@ -0,0 +1,289 @@ +From 7c66e1d4a8076f5b0cc29e5c05637ba1363a6bd7 Mon Sep 17 00:00:00 2001 +Message-Id: <7c66e1d4a8076f5b0cc29e5c05637ba1363a6bd7.1685797909.git.dev@jpoiret.xyz> +From: Josselin Poiret +Date: Sat, 3 Jun 2023 13:07:07 +0200 +Subject: [PATCH] Add documentation generation. + +From: Josselin Poiret + +This uses the manpage XSL and asciidoc config files from git 2.40.1. +--- + .gitignore | 1 + + Documentation/Makefile | 38 +++++++++++++ + Documentation/asciidoc.conf | 78 ++++++++++++++++++++++++++ + Documentation/manpage-base-url.xsl.in | 10 ++++ + Documentation/manpage-bold-literal.xsl | 16 ++++++ + Documentation/manpage-normal.xsl | 26 +++++++++ + Documentation/manpage-quote-apos.xsl | 16 ++++++ + Makefile | 17 +----- + 8 files changed, 188 insertions(+), 14 deletions(-) + create mode 100644 Documentation/Makefile + create mode 100644 Documentation/asciidoc.conf + create mode 100644 Documentation/manpage-base-url.xsl.in + create mode 100644 Documentation/manpage-bold-literal.xsl + create mode 100644 Documentation/manpage-normal.xsl + create mode 100644 Documentation/manpage-quote-apos.xsl + +diff --git a/.gitignore b/.gitignore +index cd5ded4..e167ef7 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,5 +1,6 @@ + /Documentation/html/ + /Documentation/man1/ ++/Documentation/manpage-base-url.xsl + /t/test-results + /t/trash directory* + /__pycache__/ +diff --git a/Documentation/Makefile b/Documentation/Makefile +new file mode 100644 +index 0000000..d4cd939 +--- /dev/null ++++ b/Documentation/Makefile +@@ -0,0 +1,38 @@ ++MAN_BASE_URL := /usr/share/doc/git-doc/ ++VERSION := $(git log --pretty="%H" -n 1) ++ ++ASCIIDOC := asciidoc ++ASCIIDOC_EXTRA := ++ASCIIDOC_HTML := xhtml11 ++ASCIIDOC_DOCBOOK := docbook ++ASCIIDOC_CONF := -f asciidoc.conf ++ASCIIDOC_COMMON := $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \ ++ -amanversion='$(VERSION)' \ ++ -amanmanual='git-filter-repo Manual' -amansource='git-filter-repo' ++ASCIIDOC_DEPS := asciidoc.conf ++TXT_TO_HTML := $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML) ++TXT_TO_XML := $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK) ++MANPAGE_XSL := manpage-normal.xsl ++XMLTO := xmlto ++XMLTO_EXTRA := -m manpage-bold-literal.xsl -m manpage-base-url.xsl -m manpage-quote-apos.xsl ++XMLTO_DEPS := manpage-bold-literal.xsl manpage-base-url.xsl manpage-quote-apos.xsl ++ ++manpage-deps := $(XMLTO_DEPS) ++manpage-cmd := $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man ++ ++manpage-base-url.xsl: manpage-base-url.xsl.in ++ sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@ ++ ++%.xml : %.txt $(ASCIIDOC_DEPS) ++ $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $< ++ ++man1/%.1 : %.xml $(manpage-deps) ++ mkdir -p man1 ++ $(manpage-cmd) -o man1 $< ++ ++html/%.html : %.txt $(ASCIIDOC_DEPS) ++ mkdir -p html ++ $(TXT_TO_HTML) -d manpage -o $@ $< ++ ++man: man1/git-filter-repo.1 ++html: html/git-filter-repo.html +diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf +new file mode 100644 +index 0000000..3e4c139 +--- /dev/null ++++ b/Documentation/asciidoc.conf +@@ -0,0 +1,78 @@ ++## linkgit: macro ++# ++# Usage: linkgit:command[manpage-section] ++# ++# Note, {0} is the manpage section, while {target} is the command. ++# ++# Show Git link as: (
); if section is defined, else just show ++# the command. ++ ++[macros] ++(?su)[\\]?(?Plinkgit):(?P\S*?)\[(?P.*?)\]= ++ ++[attributes] ++asterisk=* ++plus=+ ++caret=^ ++startsb=[ ++endsb=] ++backslash=\ ++tilde=~ ++apostrophe=' ++backtick=` ++litdd=-- ++ ++ifdef::backend-docbook[] ++[linkgit-inlinemacro] ++{0%{target}} ++{0#} ++{0#{target}{0}} ++{0#} ++endif::backend-docbook[] ++ ++ifdef::backend-docbook[] ++ifdef::doctype-manpage[] ++# The following two small workarounds insert a simple paragraph after screen ++[listingblock] ++{title} ++ ++| ++ ++{title#} ++ ++[verseblock] ++{title} ++{title%} ++{title#} ++| ++ ++{title#} ++{title%} ++endif::doctype-manpage[] ++endif::backend-docbook[] ++ ++ifdef::doctype-manpage[] ++ifdef::backend-docbook[] ++[header] ++template::[header-declarations] ++ ++ ++{mantitle} ++{manvolnum} ++{mansource} ++{manversion} ++{manmanual} ++ ++ ++ {manname} ++ {manpurpose} ++ ++endif::backend-docbook[] ++endif::doctype-manpage[] ++ ++ifdef::backend-xhtml11[] ++[attributes] ++git-relative-html-prefix= ++[linkgit-inlinemacro] ++{target}{0?({0})} ++endif::backend-xhtml11[] +diff --git a/Documentation/manpage-base-url.xsl.in b/Documentation/manpage-base-url.xsl.in +new file mode 100644 +index 0000000..e800904 +--- /dev/null ++++ b/Documentation/manpage-base-url.xsl.in +@@ -0,0 +1,10 @@ ++ ++ ++ ++ ++@@MAN_BASE_URL@@ ++ ++ +diff --git a/Documentation/manpage-bold-literal.xsl b/Documentation/manpage-bold-literal.xsl +new file mode 100644 +index 0000000..e13db85 +--- /dev/null ++++ b/Documentation/manpage-bold-literal.xsl +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ \fB ++ ++ \fR ++ ++ ++ +diff --git a/Documentation/manpage-normal.xsl b/Documentation/manpage-normal.xsl +new file mode 100644 +index 0000000..a9c7ec6 +--- /dev/null ++++ b/Documentation/manpage-normal.xsl +@@ -0,0 +1,26 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ .sp ++ ++ ++ ++ ++ ++ ++ .br ++ ++ ++ +diff --git a/Documentation/manpage-quote-apos.xsl b/Documentation/manpage-quote-apos.xsl +new file mode 100644 +index 0000000..aeb8839 +--- /dev/null ++++ b/Documentation/manpage-quote-apos.xsl +@@ -0,0 +1,16 @@ ++ ++ ++ ++ ++ ++ ++ ++ ' ++ \(aq ++ ++ ++ ++ +diff --git a/Makefile b/Makefile +index a443450..d965ae5 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,21 +20,10 @@ test: + fixup_locale: + sed -ie s%@@LOCALEDIR@@%$(localedir)% git-filter-repo + +-# People installing from tarball will already have man1/git-filter-repo.1 and +-# html/git-filter-repo.html. But let's support people installing from a git +-# clone too; for them, just cheat and snag a copy of the built docs that I +-# record in a different branch. +-snag_docs: Documentation/man1/git-filter-repo.1 Documentation/html/git-filter-repo.html ++doc: ++ $(MAKE) -C Documentation man html + +-Documentation/man1/git-filter-repo.1: +- mkdir -p Documentation/man1 +- git show origin/docs:man1/git-filter-repo.1 >Documentation/man1/git-filter-repo.1 +- +-Documentation/html/git-filter-repo.html: +- mkdir -p Documentation/html +- git show origin/docs:html/git-filter-repo.html >Documentation/html/git-filter-repo.html +- +-install: snag_docs #fixup_locale ++install: doc #fixup_locale + install -Dm0755 git-filter-repo "$(DESTDIR)/$(bindir)/git-filter-repo" + install -dm0755 "$(DESTDIR)/$(pythondir)" + ln -sf "$(bindir)/git-filter-repo" "$(DESTDIR)/$(pythondir)/git_filter_repo.py" +-- +2.40.1 + diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 1db0931ac3..083d4edf84 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -48,6 +48,7 @@ ;;; Copyright © 2022 Dhruvin Gandhi ;;; Copyright © 2015, 2022 David Thompson ;;; Copyright © 2023 Nicolas Graves +;;; Copyright © 2023 Josselin Poiret ;;; ;;; This file is part of GNU Guix. ;;; @@ -3492,26 +3493,45 @@ (define-public tkrev (define-public git-filter-repo (package (name "git-filter-repo") - (version "2.29.0") + (version "2.38.0") (source (origin - ;; Use a release tarball instead of 'git-fetch' because it contains - ;; pre-compiled man-pages which are too hard to build in this context - ;; as it depends on Git's Makefile. - (method url-fetch) - (uri (string-append "https://github.com/newren/git-filter-repo/releases/" - "download/v" version - "/git-filter-repo-" version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/newren/git-filter-repo") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb")))) - (build-system copy-build-system) + "1al43zpw1mdfy9i05w4xw178abypjwnkk52lqvmbl19lr1l47r4i")) + ;; Sent upstream as PR #477. + (patches (search-patches "git-filter-repo-generate-doc.patch")))) + (build-system gnu-build-system) (arguments - `(#:install-plan - '(("git-filter-repo" "libexec/git-core/") - ("Documentation/man1/" "share/man/man1") - ("/" "" #:include ())))) + (list + #:tests? #f ; No tests + #:phases + (with-imported-modules '((guix build python-build-system)) + #~(begin + (use-modules ((guix build python-build-system) #:select (site-packages))) + (modify-phases %standard-phases + (add-after 'unpack 'fix-dirs + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Makefile" + (("prefix = \\$\\(HOME\\)") + (string-append "prefix = " #$output)) + (("pythondir = .*") + (string-append "pythondir = " (site-packages inputs outputs)))))) + (delete 'configure) + (replace 'build + (lambda _ + (invoke "make" "doc" #$(string-append "VERSION=" version))))))))) (inputs (list python)) ;for the shebang + (native-inputs + (list asciidoc + docbook-xsl + libxml2 ;for XML_CATALOG_FILES + xmlto)) (home-page "https://github.com/newren/git-filter-repo") (synopsis "Quickly rewrite Git repository history") (description base-commit: da71721db152a338f5d2c35ca3a703fe5df12b27 -- 2.40.1