From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EGQaNS9MzmVTjwAAe85BDQ:P1 (envelope-from ) for ; Thu, 15 Feb 2024 18:38:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EGQaNS9MzmVTjwAAe85BDQ (envelope-from ) for ; Thu, 15 Feb 2024 18:38:55 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=PLMnf5Jp; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708018735; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4ff9Ql6nKqU7Z878pFKPwzsVTlME//ousI7vnsotXCs=; b=eV9ZPB6STsRNKERa7lXri2jb/RePszfUW+NXPUz+a91AwZTWnKvPFR3qm4emt40ycLe9pQ 7LKApPLWmdkB5u/UL/W3i3wiJ7N2UTkzF39KW6cWevYYGVBxrcHE8rQfRzTeS8+tGl9DX5 EI+HWxLxT/f7+AWKJTQ5JqWp962hUxskBKDUkfG9nfPhVJTTca50OvpaEyjJkH05GS5HMu fZxvapcV4/yanUYJWE8z97WZCPD3eBU8yCVO1hYbSKulZPsn+68LTVkj1pJomd/1wCMI7p KDQ2aM1FeJIBDp3NS/GAFYJvjoWbcIJrKA/x1YLbFsD+wznDaZBR3mn/EIOxGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=PLMnf5Jp; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708018735; a=rsa-sha256; cv=none; b=FN7DH2LWSFDOHy0su2VrMsCBZ941T/DwWijP1VgI9XPEwMMfx+B0F4ujvTyg1suGN0+4aT wtErOgYEMYI7CIZiTEaeFAzVPFMjC4gA7jxtKoLXFx1fZ4euhf6ncDnZ8G3hW9nS8MGMW/ ALgW/jp/epIRUcZlEPipD0gXCyqICD8YHmsiwrcvPVVtkkU0B8yHrRBqKIghqG5AXUZN2v +9PDM13RO2nSUm0HctIJWx/GS2DlG0fw4OfNsahH1M4LPl4PMjxv/EV+9FKfuDhiCC6Uhf 0m1yGkzK2keUKoc5bMzHVp6XWUIJr92lJ2TGpI5gdyHNMSmo4PwPn4QNGNAzuQ== 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 AC9F7A51A for ; Thu, 15 Feb 2024 18:38:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raffJ-0002ED-Qt; Thu, 15 Feb 2024 12:36:54 -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 1raffC-0001Xw-4g for guix-patches@gnu.org; Thu, 15 Feb 2024 12:36:47 -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 1raff9-0004RB-G3; Thu, 15 Feb 2024 12:36:43 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raffS-0007V0-1C; Thu, 15 Feb 2024 12:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#63874] [PATCH v2] gnu: git-filter-repo: Update to 2.38.0. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: dev@jpoiret.xyz, ludo@gnu.org, guix-patches@gnu.org Resent-Date: Thu, 15 Feb 2024 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63874 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63874@debbugs.gnu.org Cc: Hilton Chain , Josselin Poiret , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-Xcc: Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 63874-submit@debbugs.gnu.org id=B63874.170801859428786 (code B ref 63874); Thu, 15 Feb 2024 17:37:01 +0000 Received: (at 63874) by debbugs.gnu.org; 15 Feb 2024 17:36:34 +0000 Received: from localhost ([127.0.0.1]:56907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rafez-0007UD-T1 for submit@debbugs.gnu.org; Thu, 15 Feb 2024 12:36:34 -0500 Received: from mail.boiledscript.com ([144.168.59.46]:48496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rafew-0007U4-VX for 63874@debbugs.gnu.org; Thu, 15 Feb 2024 12:36:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1708018471; 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: in-reply-to:in-reply-to:references:references; bh=4ff9Ql6nKqU7Z878pFKPwzsVTlME//ousI7vnsotXCs=; b=PLMnf5Jpjg7EjwONvQZZmvHSedrG0V0iXSOhQosc3H4CBi8YWJhl0AuSUI5Zt4S5foeKyY f4dX/xyDBwz+LRbRs5N1GrOQ2IX0Hu4ke9bC2zcibo4YnBvJgHIw/Cs49wPhtv3/4SU1+n 3TVOshJEzLWCpE/WhcB6qYptbQEVQNjqZTEalcdXLPrrJScv9XxxNQjQdrWPp9ErdfBJsO +Nxu4ugR7h4rc+VXAHATmXTdkixiKFrR3fXnzlTVYILRxxQrrIka9HWTuOg9m5M6NbRPa0 TO04lubtqNszvsSMmpEIqcBjcto4uJzjKERv2r9xDbhaUi0H3SO20SuScFDIIg== Date: Fri, 16 Feb 2024 01:34:59 +0800 Message-ID: <079d9634c8b4f12f91a51f15a0ed2042e939b3ba.1708017486.git.hako@ultrarare.space> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / 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: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.11 X-Spam-Score: -5.11 X-Migadu-Queue-Id: AC9F7A51A X-TUID: kfZmTDtPJqTZ From: Josselin Poiret * 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 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 +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 +--- + 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 ;;; Copyright © 2023 Kjartan Oli Agustsson ;;; Copyright © 2023 Steve George +;;; Copyright © 2023 Josselin Poiret +;;; Copyright © 2024 Hilton Chain ;;; ;;; 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 . + ;; 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