Message ID | 20230331153226.607420-3-mail@nicolasgoaziou.fr |
---|---|
State | New |
Headers | show |
Series | Fix name and dependencies of a few Texlive packages | expand |
Hi Nicolas, all, Thanks, the series LGTM. In the context of discussion about SWH coverage, see [1,2,3,4], this change is very welcome because it factorize the package ’source’ as more or less we discussed in [4]. 1: https://yhetil.org/guix/87v8j0bqdd.fsf@gnu.org 2: https://sympa.inria.fr/sympa/arc/swh-devel/2023-03/msg00009.html 3: https://issues.guix.gnu.org/issue/43442#20 4: https://issues.guix.gnu.org/62712 Other said, that’s said… The good ol’ svn-fetch, > - (source (origin > - (method svn-fetch) > - (uri (texlive-ref "latex" "bigfoot")) is replaced by ’simple-texlive-package’, > + (let ((template (simple-texlive-package > + "texlive-bigfoot" > + (list "doc/latex/bigfoot/" > + "source/latex/bigfoot/" > + "tex/latex/bigfoot/") > + (base32 > + "140b4bbjcgajd1flznmi3ga6lx5pna2nxybr2dqm9515lny8gwf0")))) > + (package > + (inherit template) However, it goes from this, $ tree -L 6 $(guix build --no-grafts texlive-latex-bigfoot -S) /gnu/store/z9kc9qbg40nl0azivpmfmhrnqb6dnmqm-texlive-latex-bigfoot-59745-checkout ├── bigfoot.drv ├── bigfoot.dtx ├── bigfoot.ins ├── perpage.drv ├── perpage.dtx ├── suffix.drv └── suffix.dtx 0 directories, 7 files to that, $ tree -L 6 $(./pre-inst-env guix build --no-grafts texlive-latex-bigfoot -S) guix build: package 'texlive-latex-bigfoot' has been superseded by 'texlive-bigfoot' /gnu/store/rws86c5hi1r25f14h95hiqzgcw8rbir2-texlive-bigfoot-59745-checkout ├── doc │ └── latex │ └── bigfoot │ ├── bigfoot.pdf │ ├── COPYING │ ├── Makefile │ ├── perpage.pdf │ ├── README │ └── suffix.pdf ├── source │ └── latex │ └── bigfoot │ ├── bigfoot.drv │ ├── bigfoot.dtx │ ├── bigfoot.ins │ ├── perpage.drv │ ├── perpage.dtx │ ├── suffix.drv │ └── suffix.dtx └── tex └── latex └── bigfoot ├── bigfoot.sty ├── perpage.sty └── suffix.sty 9 directories, 16 files Here, I have two questions (unrelated to the patch series ;-)): 1. Does it make sense to keep the PDF and .sty files? 2. Which of the both is the closest of upstream structure? Assuming SWH ingested TUG and other related TeX sources, which is still WIP AFAIK, it would be simpler if we store an identifier (swhid or others) that we can query via SWH API without parsing and rebuild from their content the files we need for the checksum. Cheers, simon
Hello, Simon Tournier <zimon.toutoune@gmail.com> writes: > Thanks, the series LGTM. Thank you for the feedback! > However, it goes from this, > > $ tree -L 6 $(guix build --no-grafts texlive-latex-bigfoot -S) > /gnu/store/z9kc9qbg40nl0azivpmfmhrnqb6dnmqm-texlive-latex-bigfoot-59745-checkout > ├── bigfoot.drv > ├── bigfoot.dtx > ├── bigfoot.ins > ├── perpage.drv > ├── perpage.dtx > ├── suffix.drv > └── suffix.dtx > > 0 directories, 7 files > > to that, > > $ tree -L 6 $(./pre-inst-env guix build --no-grafts texlive-latex-bigfoot -S) > guix build: package 'texlive-latex-bigfoot' has been superseded by 'texlive-bigfoot' > /gnu/store/rws86c5hi1r25f14h95hiqzgcw8rbir2-texlive-bigfoot-59745-checkout > ├── doc > │ └── latex > │ └── bigfoot > │ ├── bigfoot.pdf > │ ├── COPYING > │ ├── Makefile > │ ├── perpage.pdf > │ ├── README > │ └── suffix.pdf > ├── source > │ └── latex > │ └── bigfoot > │ ├── bigfoot.drv > │ ├── bigfoot.dtx > │ ├── bigfoot.ins > │ ├── perpage.drv > │ ├── perpage.dtx > │ ├── suffix.drv > │ └── suffix.dtx > └── tex > └── latex > └── bigfoot > ├── bigfoot.sty > ├── perpage.sty > └── suffix.sty > > 9 directories, 16 files > > > Here, I have two questions (unrelated to the patch series ;-)): > > 1. Does it make sense to keep the PDF and .sty files? PDF files are the documentation. They belong to the "doc" output. It seems useful to allow users to get package definitions, too. The ".sty" files are the actual package, i.e., what gets loaded when you insert \require{bigfoot}. IOW, the previous package definition was utterly broken since it didn't provide any usable code anyway. Unfortunately, there are other old TeXLive packages in this very same sad situation. What might be removed, however, is the "source" part. As it was already suggested on this ML (I cannot find the reference, sorry), you can retrieve source with "guix build -S" already, so it is not terribly useful to also put it in the store. OTOH, I think it doesn't free much space. > 2. Which of the both is the closest of upstream structure? The new package checkout matches exactly the layout of the full TeXLive distribution. Regards, -- Nicolas Goaziou
Hi, Thanks for your explanations. On Fri, 07 Apr 2023 at 20:01, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Unfortunately, there are other old TeXLive packages in this very same > sad situation. Well, one after the other, they will be converted. :-) >> 2. Which of the both is the closest of upstream structure? > > The new package checkout matches exactly the layout of the full TeXLive > distribution. Now, I have to check if this content is registered by Software Heritage. :-) Cheers, simon
Hello, Simon Tournier <zimon.toutoune@gmail.com> writes: > On Fri, 07 Apr 2023 at 20:01, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > >> Unfortunately, there are other old TeXLive packages in this very same >> sad situation. > > Well, one after the other, they will be converted. :-) Sure thing. However, correcting myself, as my words were too strong in this particular case, current "texlive-latex-bigfoot" is not exactly "broken". Running "./pre-inst-env guix build texlive-latex-bigfoot" generates the following layout: /gnu/store/848cbycs3y9gqbc0c6giag1m7a53x32r-texlive-latex-bigfoot-59745 └── share └── texmf-dist └── tex └── latex └── bigfoot ├── bigfoot.drv ├── bigfoot.sty ├── perpage.drv ├── perpage.sty ├── suffix.drv └── suffix.sty 6 directories, 6 files So, ".sty" files are indeed properly installed. There is no documentation, though. Also, source files are not kept in the store. There are two approaches going on here. `simple-texlive-package' tries to provide a tessellation of the full texlive, i.e., if you install (assuming they are defined in Guix) every standalone texlive package, you will get the exact full texlive distribution, whereas `texlive-ref' + `texlive-build-system' tries to generate a minimal (a bit too minimal considering missing documentation) working system. I think the old way is error prone. So, do we (not only the two of us, obviously) agree on the `simple-texlive-package' approach? If so, what should we do about "source"? Regards,
Hello, Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > So, do we (not only the two of us, obviously) agree on the > `simple-texlive-package' approach? If so, what should we do about > "source"? I applied the whole set. The question above is still open, but I'm closing this particular report for now. Thank you for your input. Regards,
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 0f87dc4a77..d78b1672f1 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -4865,40 +4865,54 @@ (define-public texlive-latex-amsrefs conjunction with BibTeX or as a replacement for BibTeX.") (license license:lppl1.3+))) -(define-public texlive-latex-bigfoot - (package - (name "texlive-latex-bigfoot") - (version (number->string %texlive-revision)) - (source (origin - (method svn-fetch) - (uri (texlive-ref "latex" "bigfoot")) - (file-name (string-append name "-" version "-checkout")) - (sha256 - (base32 - "092g8alnsdwlgl1isdnqrr32l161994295kadr1n05d81xgj5wnv")))) - (build-system texlive-build-system) - (arguments - '(#:tex-directory "latex/bigfoot" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'remove-generated-file - (lambda _ - (for-each delete-file (find-files "." "\\.drv$")) - #t))))) - (home-page "https://www.ctan.org/pkg/bigfoot") - (synopsis "Footnotes for critical editions") - (description - "This package aims to provide a one-stop solution to requirements for -footnotes. It offers: Multiple footnote apparatus superior to that of +(define-public texlive-bigfoot + (let ((template (simple-texlive-package + "texlive-bigfoot" + (list "doc/latex/bigfoot/" + "source/latex/bigfoot/" + "tex/latex/bigfoot/") + (base32 + "140b4bbjcgajd1flznmi3ga6lx5pna2nxybr2dqm9515lny8gwf0")))) + (package + (inherit template) + (outputs '("out" "doc")) + (arguments + (substitute-keyword-arguments (package-arguments template) + ((#:tex-directory _ #t) "latex/bigfoot") + ((#:build-targets _ '()) '(list "bigfoot.ins")) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'chdir + (lambda _ (chdir "source/latex/bigfoot/"))) + (add-after 'chdir 'delete-drv-files + (lambda _ + (for-each delete-file (find-files "." "\\.drv$")))) + (replace 'copy-files + (lambda* (#:key inputs #:allow-other-keys) + (let ((origin (assoc-ref inputs "source")) + (source (string-append #$output + "/share/texmf-dist/source")) + (doc (string-append #$output:doc + "/share/texmf-dist/doc"))) + (copy-recursively (string-append origin "/source") source) + (copy-recursively (string-append origin "/doc") doc)))))))) + (propagated-inputs + (list texlive-etex texlive-ncctools)) + (home-page "https://ctan.org/pkg/bigfoot") + (synopsis "Footnotes for critical editions") + (description + "The package aims to provide a one-stop solution to requirements for +footnotes. It offers multiple footnote apparatus superior to that of @code{manyfoot}. Footnotes can be formatted in separate paragraphs, or be run -into a single paragraph (this choice may be selected per footnote series); -Things you might have expected (such as @code{\\verb}-like material in -footnotes, and color selections over page breaks) now work. Note that the -majority of the bigfoot package's interface is identical to that of -@code{manyfoot}; users should seek information from that package's -documentation. The bigfoot bundle also provides the @code{perpage} and -@code{suffix} packages.") - (license license:gpl2+))) +into a single paragraph. Note that the majority of the @code{bigfoot} +package's interface is identical to that of @code{manyfoot}; users should seek +information from that package's documentation. + +The @code{bigfoot} bundle also provides the @code{perpage} and @code{suffix} +packages.") + (license license:gpl2+)))) + +(define-deprecated-package texlive-latex-bigfoot texlive-bigfoot) (define-public texlive-latex-blindtext (package @@ -5342,7 +5356,7 @@ (define-public texlive-pstool "12clzcw2cl7g2chr2phgmmiwxw4859cln1gbx1wgp8bl9iw590nc") #:trivial? #t)) (propagated-inputs - (list texlive-latex-bigfoot ; for suffix + (list texlive-bigfoot ; for suffix texlive-filemod texlive-latex-graphics texlive-latex-ifplatform