all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation.
@ 2023-06-03 14:02 Josselin Poiret via Guix-patches via
  2023-06-03 14:02 ` [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2 Josselin Poiret via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-06-03 14:02 UTC (permalink / raw)
  To: 63874; +Cc: Josselin Poiret

From: Josselin Poiret <dev@jpoiret.xyz>

* 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 <dev@jpoiret.xyz>
+Date: Sat, 3 Jun 2023 13:07:07 +0200
+Subject: [PATCH] Add documentation generation.
+
+From: Josselin Poiret <dev@jpoiret.xyz>
+
+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: <command>(<section>); if section is defined, else just show
++# the command.
++
++[macros]
++(?su)[\\]?(?P<name>linkgit):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
++
++[attributes]
++asterisk=&#42;
++plus=&#43;
++caret=&#94;
++startsb=&#91;
++endsb=&#93;
++backslash=&#92;
++tilde=&#126;
++apostrophe=&#39;
++backtick=&#96;
++litdd=&#45;&#45;
++
++ifdef::backend-docbook[]
++[linkgit-inlinemacro]
++{0%{target}}
++{0#<citerefentry>}
++{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
++{0#</citerefentry>}
++endif::backend-docbook[]
++
++ifdef::backend-docbook[]
++ifdef::doctype-manpage[]
++# The following two small workarounds insert a simple paragraph after screen
++[listingblock]
++<example><title>{title}</title>
++<literallayout class="monospaced">
++|
++</literallayout><simpara></simpara>
++{title#}</example>
++
++[verseblock]
++<formalpara{id? id="{id}"}><title>{title}</title><para>
++{title%}<literallayout{id? id="{id}"}>
++{title#}<literallayout>
++|
++</literallayout>
++{title#}</para></formalpara>
++{title%}<simpara></simpara>
++endif::doctype-manpage[]
++endif::backend-docbook[]
++
++ifdef::doctype-manpage[]
++ifdef::backend-docbook[]
++[header]
++template::[header-declarations]
++<refentry>
++<refmeta>
++<refentrytitle>{mantitle}</refentrytitle>
++<manvolnum>{manvolnum}</manvolnum>
++<refmiscinfo class="source">{mansource}</refmiscinfo>
++<refmiscinfo class="version">{manversion}</refmiscinfo>
++<refmiscinfo class="manual">{manmanual}</refmiscinfo>
++</refmeta>
++<refnamediv>
++  <refname>{manname}</refname>
++  <refpurpose>{manpurpose}</refpurpose>
++</refnamediv>
++endif::backend-docbook[]
++endif::doctype-manpage[]
++
++ifdef::backend-xhtml11[]
++[attributes]
++git-relative-html-prefix=
++[linkgit-inlinemacro]
++<a href="{git-relative-html-prefix}{target}.html">{target}{0?({0})}</a>
++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 @@
++<!-- manpage-base-url.xsl:
++     special settings for manpages rendered from newer docbook -->
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++		version="1.0">
++
++<!-- set a base URL for relative links -->
++<xsl:param name="man.base.url.for.relative.links"
++	>@@MAN_BASE_URL@@</xsl:param>
++
++</xsl:stylesheet>
+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 @@
++<!-- manpage-bold-literal.xsl:
++     special formatting for manpages rendered from asciidoc+docbook -->
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++		xmlns:d="http://docbook.org/ns/docbook"
++		version="1.0">
++
++<!-- render literal text as bold (instead of plain or monospace);
++     this makes literal text easier to distinguish in manpages
++     viewed on a tty -->
++<xsl:template match="literal|d:literal">
++	<xsl:text>\fB</xsl:text>
++	<xsl:apply-templates/>
++	<xsl:text>\fR</xsl:text>
++</xsl:template>
++
++</xsl:stylesheet>
+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 @@
++<!-- manpage-normal.xsl:
++     special settings for manpages rendered from asciidoc+docbook -->
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++		version="1.0">
++
++
++<!-- these params silence some output from xmlto -->
++<xsl:param name="man.output.quietly" select="1"/>
++<xsl:param name="refentry.meta.get.quietly" select="1"/>
++
++<!-- convert asciidoc callouts to man page format -->
++<xsl:template match="co">
++	<xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
++</xsl:template>
++<xsl:template match="calloutlist">
++	<xsl:text>.sp&#10;</xsl:text>
++	<xsl:apply-templates/>
++	<xsl:text>&#10;</xsl:text>
++</xsl:template>
++<xsl:template match="callout">
++	<xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
++	<xsl:apply-templates/>
++	<xsl:text>.br&#10;</xsl:text>
++</xsl:template>
++
++</xsl:stylesheet>
+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 @@
++<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
++		version="1.0">
++
++<!-- work around newer groff/man setups using a prettier apostrophe
++     that unfortunately does not quote anything when cut&pasting
++     examples to the shell -->
++<xsl:template name="escape.apostrophe">
++  <xsl:param name="content"/>
++  <xsl:call-template name="string.subst">
++    <xsl:with-param name="string" select="$content"/>
++    <xsl:with-param name="target">'</xsl:with-param>
++    <xsl:with-param name="replacement">\(aq</xsl:with-param>
++  </xsl:call-template>
++</xsl:template>
++
++</xsl:stylesheet>
+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 <contact@dhruvin.dev>
 ;;; Copyright © 2015, 2022 David Thompson <davet@gnu.org>
 ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
 ;;;
 ;;; 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





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2.
  2023-06-03 14:02 [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Josselin Poiret via Guix-patches via
@ 2023-06-03 14:02 ` Josselin Poiret via Guix-patches via
  2023-06-03 14:06   ` [bug#63874] mumi send-email doesn't support complex refs (was: [PATCH 2/2] gnu: b4: Update to 0.12.2.) Josselin Poiret via Guix-patches via
  2023-07-01 14:38   ` [bug#63873] bug#63874: [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Ludovic Courtès
  2023-07-01 14:38 ` [bug#63874] " Ludovic Courtès
  2024-02-15 17:34 ` [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0 Hilton Chain via Guix-patches via
  2 siblings, 2 replies; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-06-03 14:02 UTC (permalink / raw)
  To: 63873; +Cc: Josselin Poiret

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/version-control.scm (b4): Update to 0.12.2.
---
 gnu/packages/version-control.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 083d4edf84..1229ae1f77 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2612,13 +2612,13 @@ (define-public patatt
 (define-public b4
   (package
     (name "b4")
-    (version "0.8.0")
+    (version "0.12.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "b4" version))
        (sha256
-        (base32 "115ysciq15sxc8fd9hf7p0f4wnd5xapcfkmq8g33y1c8nbdxclbx"))))
+        (base32 "0vmyma13dnpv3vbzamrmzc2ph71bg44hk7rqbc2ji2ppigbszx5n"))))
     (build-system python-build-system)
     (arguments
      (list #:tests? #f                  ;no tests
@@ -2631,7 +2631,7 @@ (define-public b4
     (inputs
      (list python-dkimpy python-dnspython python-requests))
     (propagated-inputs
-     (list patatt))
+     (list git-filter-repo patatt))
     (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
     (synopsis "Tool for working with patches in public-inbox archives")
     (description
-- 
2.40.1





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#63874] mumi send-email doesn't support complex refs (was: [PATCH 2/2] gnu: b4: Update to 0.12.2.)
  2023-06-03 14:02 ` [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2 Josselin Poiret via Guix-patches via
@ 2023-06-03 14:06   ` Josselin Poiret via Guix-patches via
  2023-06-05 22:59     ` [bug#63873] " Arun Isaac
  2023-07-01 14:38   ` [bug#63873] bug#63874: [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-06-03 14:06 UTC (permalink / raw)
  To: 63873, 63874, control; +Cc: Ricardo Wurmus, Arun Isaac

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

merge 63873 63874
thankyou

Well, sent with `mumi send-email origin/master`, didn't go too well (I
guess mumi thought this would only be one mail?).

Josselin Poiret <dev@jpoiret.xyz> writes:

> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * gnu/packages/version-control.scm (b4): Update to 0.12.2.
> ---
>  gnu/packages/version-control.scm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index 083d4edf84..1229ae1f77 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -2612,13 +2612,13 @@ (define-public patatt
>  (define-public b4
>    (package
>      (name "b4")
> -    (version "0.8.0")
> +    (version "0.12.2")
>      (source
>       (origin
>         (method url-fetch)
>         (uri (pypi-uri "b4" version))
>         (sha256
> -        (base32 "115ysciq15sxc8fd9hf7p0f4wnd5xapcfkmq8g33y1c8nbdxclbx"))))
> +        (base32 "0vmyma13dnpv3vbzamrmzc2ph71bg44hk7rqbc2ji2ppigbszx5n"))))
>      (build-system python-build-system)
>      (arguments
>       (list #:tests? #f                  ;no tests
> @@ -2631,7 +2631,7 @@ (define-public b4
>      (inputs
>       (list python-dkimpy python-dnspython python-requests))
>      (propagated-inputs
> -     (list patatt))
> +     (list git-filter-repo patatt))
>      (home-page "https://git.kernel.org/pub/scm/utils/b4/b4.git")
>      (synopsis "Tool for working with patches in public-inbox archives")
>      (description
> -- 
> 2.40.1
>

-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#63873] mumi send-email doesn't support complex refs (was: [PATCH 2/2] gnu: b4: Update to 0.12.2.)
  2023-06-03 14:06   ` [bug#63874] mumi send-email doesn't support complex refs (was: [PATCH 2/2] gnu: b4: Update to 0.12.2.) Josselin Poiret via Guix-patches via
@ 2023-06-05 22:59     ` Arun Isaac
  0 siblings, 0 replies; 9+ messages in thread
From: Arun Isaac @ 2023-06-05 22:59 UTC (permalink / raw)
  To: Josselin Poiret, 63873, 63874; +Cc: Ricardo Wurmus


> Well, sent with `mumi send-email origin/master`, didn't go too well (I
> guess mumi thought this would only be one mail?).

Indeed, `mumi send-email' doesn't know anything about refs. I'll hack on
this in the coming week.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation.
  2023-06-03 14:02 [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Josselin Poiret via Guix-patches via
  2023-06-03 14:02 ` [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2 Josselin Poiret via Guix-patches via
@ 2023-07-01 14:38 ` Ludovic Courtès
  2024-02-15 17:34 ` [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0 Hilton Chain via Guix-patches via
  2 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2023-07-01 14:38 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 63874

Hello!

Josselin Poiret <dev@jpoiret.xyz> skribis:

> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * 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.

[...]

> +++ 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 <dev@jpoiret.xyz>
> +Date: Sat, 3 Jun 2023 13:07:07 +0200
> +Subject: [PATCH] Add documentation generation.
> +
> +From: Josselin Poiret <dev@jpoiret.xyz>
> +
> +This uses the manpage XSL and asciidoc config files from git 2.40.1.

Could you specify the upstream status in the header?

It’s a rather big patch so the sooner we can get rid of it, the better!

Apart from that, it LGTM!

Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#63873] bug#63874: [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation.
  2023-06-03 14:02 ` [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2 Josselin Poiret via Guix-patches via
  2023-06-03 14:06   ` [bug#63874] mumi send-email doesn't support complex refs (was: [PATCH 2/2] gnu: b4: Update to 0.12.2.) Josselin Poiret via Guix-patches via
@ 2023-07-01 14:38   ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2023-07-01 14:38 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 63874, 63873

Josselin Poiret <dev@jpoiret.xyz> skribis:

> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * gnu/packages/version-control.scm (b4): Update to 0.12.2.

LGTM!




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0.
  2023-06-03 14:02 [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Josselin Poiret via Guix-patches via
  2023-06-03 14:02 ` [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2 Josselin Poiret via Guix-patches via
  2023-07-01 14:38 ` [bug#63874] " Ludovic Courtès
@ 2024-02-15 17:34 ` Hilton Chain via Guix-patches via
  2024-02-18 22:37   ` Ludovic Courtès
  2 siblings, 1 reply; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-02-15 17:34 UTC (permalink / raw)
  To: 63874; +Cc: Hilton Chain, Josselin Poiret, Josselin Poiret,
	Ludovic Courtès

From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/patches/git-filter-repo-generate-doc.patch: New file.
* gnu/local.mk (dist_patch_DATA): Regisiter it.
* gnu/packages/version-control.scm (git-filter-repo): Update to 2.38.0.
[source]: Switch to git-fetch.
Use the patch.
[build-system]: Switch to gnu-build-system.
[native-inputs]: Add asciidoc, docbook-xsl, libxml2, xmlto.

Modified-by: Hilton Chain <hako@ultrarare.space>
Change-Id: I7b15975ea56c44ae580d19cfe5a9e3eb75c6db0d
---

Hi Josselin, Ludo,

I adjusted the patch a bit, and added a phase to unpack git's source.  So that
the shipped patch only includes Makefiles now.

 gnu/local.mk                                  |  1 +
 .../git-filter-repo-generate-doc.patch        | 88 +++++++++++++++++++
 gnu/packages/version-control.scm              | 69 ++++++++++++---
 3 files changed, 144 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 4bd8e6ec6a..d9a4c8f204 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1308,6 +1308,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ghostscript-no-header-id.patch		\
   %D%/packages/patches/ghostscript-no-header-uuid.patch		\
   %D%/packages/patches/ghostscript-no-header-creationdate.patch \
+  %D%/packages/patches/git-filter-repo-generate-doc.patch	\
   %D%/packages/patches/gitg-fix-positional-argument.patch	\
   %D%/packages/patches/gklib-suitesparse.patch			\
   %D%/packages/patches/glib-appinfo-watch.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..e0bbc7831c
--- /dev/null
+++ b/gnu/packages/patches/git-filter-repo-generate-doc.patch
@@ -0,0 +1,88 @@
+From 56e6857e71d2b2a2236625f3c8b112bd40a8b164 Mon Sep 17 00:00:00 2001
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Fri, 16 Feb 2024 00:21:06 +0800
+Subject: [PATCH] Add documentation generation.
+
+This requires the manpage XSL and asciidoc config files from git 2.41.0.
+
+Modified-by: Hilton Chain <hako@ultrarare.space>
+---
+ Documentation/Makefile | 34 ++++++++++++++++++++++++++++++++++
+ Makefile               | 17 +++--------------
+ 2 files changed, 37 insertions(+), 14 deletions(-)
+ create mode 100644 Documentation/Makefile
+
+diff --git a/Documentation/Makefile b/Documentation/Makefile
+new file mode 100644
+index 0000000..d81ffbe
+--- /dev/null
++++ b/Documentation/Makefile
+@@ -0,0 +1,34 @@
++MAN_BASE_URL := $(prefix)/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) \
++		-amanmanual='git-filter-repo Manual' -amansource='git-filter-repo $(VERSION)'
++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 \
++		--stringparam man.base.url.for.relative.links='$(MAN_BASE_URL)'
++
++manpage-prereqs := $(wildcard manpage*.xsl)
++manpage-cmd := $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man
++
++%.xml : %.txt $(ASCIIDOC_DEPS)
++	$(TXT_TO_XML) -d manpage -o $@ $<
++
++man1/%.1 : %.xml $(manpage-prereqs)
++	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/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"
+
+base-commit: cbc6535694380d3a3bf3e5c96410d4ce7e8de94f
+--
+2.41.0
+
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 242e6dae2e..148349cb49 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -50,6 +50,8 @@
 ;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
 ;;; Copyright © 2023 Kjartan Oli Agustsson <kjartanoli@disroot.org>
 ;;; Copyright © 2023 Steve George <steve@futurile.net>
+;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
+;;; Copyright © 2024 Hilton Chain <hako@ultrarare.space>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3844,25 +3846,64 @@ (define-public qgit
 (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"))
+       ;; Modified from <https://github.com/newren/git-filter-repo/pull/477>.
+       ;; Used with 'unpack-git-source phase.
+       (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.
+      #:imported-modules
+      `(,@%gnu-build-system-modules
+        (guix build python-build-system))
+      #:modules
+      '((guix build gnu-build-system)
+        ((guix build python-build-system) #:select (site-packages))
+        (guix build utils)
+        (srfi srfi-26))
+      #:make-flags
+      #~(list (string-append "prefix=" #$output)
+              (string-append "VERSION=" #$(package-version this-package)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (add-after 'unpack 'unpack-git-source
+            (lambda _
+              (let* ((old-path (getcwd))
+                     (doc-source (string-append old-path "/Documentation")))
+                (mkdir-p "git-source")
+                (chdir "git-source")
+                ((assoc-ref %standard-phases 'unpack)
+                 #:source #+(package-source git))
+                (for-each
+                 (cut install-file <> doc-source)
+                 (find-files "." "asciidoc\\.conf$|manpage.*\\.xsl$"))
+                (chdir old-path)
+                (delete-file-recursively "git-source"))))
+          (add-before 'build 'set-pythondir
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (substitute* "Makefile"
+                (("(pythondir = ).*" _ pre)
+                 (string-append pre (site-packages inputs outputs))))))
+          (replace 'build
+            (lambda* (#:key make-flags #:allow-other-keys)
+              (apply invoke "make" "doc" make-flags))))))
+    (native-inputs
+     (list asciidoc
+           docbook-xsl
+           libxml2                        ;for XML_CATALOG_FILES
+           xmlto))
     (inputs (list python))                ;for the shebang
     (home-page "https://github.com/newren/git-filter-repo")
     (synopsis "Quickly rewrite Git repository history")

base-commit: 203344cc37c8a7df1ec1454381b5069d53ce7f9e
prerequisite-patch-id: bc542897db0e11da4c0f8da09ec31dd533cf2825
prerequisite-patch-id: fd7da036342f36a8c698f5c8975f9e48d3ade435
prerequisite-patch-id: a2c81c14423bb9858f33d7d26976e8eea61982b7
prerequisite-patch-id: e30fd25b1dc4aaaff76474153836cd48e8565eb9
prerequisite-patch-id: 1d070b26dc64ee2ec95f14c4f5fc23419f766810
prerequisite-patch-id: 03de992f0312d5f0ee3368ebc3c1fad7c955d095
prerequisite-patch-id: 82a04291e3a1bb33ced83672956934fbe98d31dc
--
2.41.0




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0.
  2024-02-15 17:34 ` [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0 Hilton Chain via Guix-patches via
@ 2024-02-18 22:37   ` Ludovic Courtès
  2024-02-24 16:46     ` bug#63874: " Hilton Chain via Guix-patches via
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2024-02-18 22:37 UTC (permalink / raw)
  To: Hilton Chain; +Cc: 63874, Josselin Poiret

Hilton Chain <hako@ultrarare.space> skribis:

> From: Josselin Poiret <dev@jpoiret.xyz>
>
> * gnu/packages/patches/git-filter-repo-generate-doc.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Regisiter it.
> * gnu/packages/version-control.scm (git-filter-repo): Update to 2.38.0.
> [source]: Switch to git-fetch.
> Use the patch.
> [build-system]: Switch to gnu-build-system.
> [native-inputs]: Add asciidoc, docbook-xsl, libxml2, xmlto.
>
> Modified-by: Hilton Chain <hako@ultrarare.space>
> Change-Id: I7b15975ea56c44ae580d19cfe5a9e3eb75c6db0d
> ---
>
> Hi Josselin, Ludo,
>
> I adjusted the patch a bit, and added a phase to unpack git's source.  So that
> the shipped patch only includes Makefiles now.

Hi!  LGTM.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#63874: [PATCH v2] gnu: git-filter-repo: Update to 2.38.0.
  2024-02-18 22:37   ` Ludovic Courtès
@ 2024-02-24 16:46     ` Hilton Chain via Guix-patches via
  0 siblings, 0 replies; 9+ messages in thread
From: Hilton Chain via Guix-patches via @ 2024-02-24 16:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Josselin Poiret, 63874-done

On Mon, 19 Feb 2024 06:37:18 +0800,
Ludovic Courtès wrote:
>
> Hilton Chain <hako@ultrarare.space> skribis:
>
> > From: Josselin Poiret <dev@jpoiret.xyz>
> >
> > * gnu/packages/patches/git-filter-repo-generate-doc.patch: New file.
> > * gnu/local.mk (dist_patch_DATA): Regisiter it.
> > * gnu/packages/version-control.scm (git-filter-repo): Update to 2.38.0.
> > [source]: Switch to git-fetch.
> > Use the patch.
> > [build-system]: Switch to gnu-build-system.
> > [native-inputs]: Add asciidoc, docbook-xsl, libxml2, xmlto.
> >
> > Modified-by: Hilton Chain <hako@ultrarare.space>
> > Change-Id: I7b15975ea56c44ae580d19cfe5a9e3eb75c6db0d
> > ---
> >
> > Hi Josselin, Ludo,
> >
> > I adjusted the patch a bit, and added a phase to unpack git's source.  So that
> > the shipped patch only includes Makefiles now.
>
> Hi!  LGTM.

Thank you!  I have applied the patch as 313458c58c3fd89705081e1721e7c6fe7818d813.




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-24 16:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-03 14:02 [bug#63874] [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Josselin Poiret via Guix-patches via
2023-06-03 14:02 ` [bug#63873] [PATCH 2/2] gnu: b4: Update to 0.12.2 Josselin Poiret via Guix-patches via
2023-06-03 14:06   ` [bug#63874] mumi send-email doesn't support complex refs (was: [PATCH 2/2] gnu: b4: Update to 0.12.2.) Josselin Poiret via Guix-patches via
2023-06-05 22:59     ` [bug#63873] " Arun Isaac
2023-07-01 14:38   ` [bug#63873] bug#63874: [PATCH 1/2] gnu: git-filter-repo: Update to 2.38.0 and generate documentation Ludovic Courtès
2023-07-01 14:38 ` [bug#63874] " Ludovic Courtès
2024-02-15 17:34 ` [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0 Hilton Chain via Guix-patches via
2024-02-18 22:37   ` Ludovic Courtès
2024-02-24 16:46     ` bug#63874: " Hilton Chain via Guix-patches via

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.