From e1796071daad7a739d0f3297ed78134a46924ea0 Mon Sep 17 00:00:00 2001 From: Zeckmathederg Date: Thu, 20 Mar 2025 00:52:50 -0600 Subject: [PATCH] Internal: Removed PDF and nochunks capability. This is done for multiple reasons, and most of them stem from the fact that GLFS does things in a way that struggles to reconcile with the pdf and nochunks targets. For example, CSS and images is a massive sore spot. Since they don't get maintained anymore, dragging them behind the barn and putting them down. Apologies to those that use these targets. --- Makefile | 67 +-- README.md | 8 - pdf-fixups.sh | 19 - stylesheets/glfs-nochunks.xsl | 20 - stylesheets/glfs-pdf.xsl | 20 - stylesheets/lfs-xsl/nochunks.xsl | 635 ---------------------- stylesheets/lfs-xsl/pdf.xsl | 104 ---- stylesheets/lfs-xsl/pdf/lfs-admon.xsl | 76 --- stylesheets/lfs-xsl/pdf/lfs-index.xsl | 135 ----- stylesheets/lfs-xsl/pdf/lfs-lists.xsl | 169 ------ stylesheets/lfs-xsl/pdf/lfs-mixed.xsl | 355 ------------ stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl | 244 --------- stylesheets/lfs-xsl/pdf/lfs-xref.xsl | 152 ------ 13 files changed, 3 insertions(+), 2001 deletions(-) delete mode 100755 pdf-fixups.sh delete mode 100644 stylesheets/glfs-nochunks.xsl delete mode 100644 stylesheets/glfs-pdf.xsl delete mode 100644 stylesheets/lfs-xsl/nochunks.xsl delete mode 100644 stylesheets/lfs-xsl/pdf.xsl delete mode 100644 stylesheets/lfs-xsl/pdf/lfs-admon.xsl delete mode 100644 stylesheets/lfs-xsl/pdf/lfs-index.xsl delete mode 100644 stylesheets/lfs-xsl/pdf/lfs-lists.xsl delete mode 100644 stylesheets/lfs-xsl/pdf/lfs-mixed.xsl delete mode 100644 stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl delete mode 100644 stylesheets/lfs-xsl/pdf/lfs-xref.xsl diff --git a/Makefile b/Makefile index 426d59cd42..2662ca1756 100644 --- a/Makefile +++ b/Makefile @@ -54,16 +54,12 @@ endif ifeq ($(REV), sysv) BASEDIR ?= $(HTML_ROOT)/glfs - PDF_OUTPUT ?= glfs.pdf - NOCHUNKS_OUTPUT ?= glfs.html DUMPDIR ?= $(DUMP_ROOT)/glfs-commands GLFSHTML ?= glfs-html.xml GLFSHTML2 ?= glfs-html2.xml GLFSFULL ?= glfs-full.xml else BASEDIR ?= $(HTML_ROOT)/glfs-systemd - PDF_OUTPUT ?= glfs-sysd.pdf - NOCHUNKS_OUTPUT ?= glfs-sysd.html DUMPDIR ?= $(DUMP_ROOT)/glfs-sysd-commands GLFSHTML ?= glfs-systemd-html.xml GLFSHTML2 ?= glfs-systemd-html2.xml @@ -107,18 +103,9 @@ help: @echo "" @echo " html Builds the HTML pages of the book." @echo "" - @echo " pdf Builds the book as a PDF file." - @echo "" @echo " wget-list Produces a list of all packages to download." @echo " Output is BASEDIR/wget-list" @echo "" - @echo " nochunks Builds the book as a one-pager. The output" - @echo " is a large single HTML page containing the" - @echo " whole book." - @echo "" - @echo " Parameter NOCHUNKS_OUTPUT= controls" - @echo " the name of the HTML file." - @echo "" @echo " validate Runs validation checks on the XML files." @echo "" @echo " test-links Runs validation checks on URLs in the book." @@ -127,7 +114,7 @@ help: @echo " containing all valid URLs." @echo "" -all: glfs nochunks +all: glfs world: all dump-commands test-links html: $(BASEDIR)/index.html @@ -172,53 +159,6 @@ $(BASEDIR)/index.html: $(RENDERTMP)/$(GLFSHTML) version wget-list $(Q)rm -rf $(RENDERTMP) -pdf: validate wget-list - @echo "Generating profiled XML for PDF..." - $(Q)xsltproc --nonet \ - --stringparam profile.condition pdf \ - --output $(RENDERTMP)/glfs-pdf.xml \ - stylesheets/lfs-xsl/profile.xsl \ - $(RENDERTMP)/$(GLFSFULL) - - @echo "Generating FO file..." - $(Q)xsltproc --nonet \ - --stringparam rootid "$(ROOT_ID)" \ - --output $(RENDERTMP)/glfs-pdf.fo \ - stylesheets/glfs-pdf.xsl \ - $(RENDERTMP)/glfs-pdf.xml - - $(Q)sed -i -e 's/span="inherit"/span="all"/' $(RENDERTMP)/glfs-pdf.fo - $(Q)bash pdf-fixups.sh $(RENDERTMP)/glfs-pdf.fo - - @echo "Generating PDF file..." - $(Q)mkdir -p $(RENDERTMP)/images - $(Q)cp -R images/* $(RENDERTMP)/images - - $(Q)mkdir -p $(BASEDIR) - - $(Q)fop -q $(RENDERTMP)/glfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT) 2>fop.log - @echo "$(BASEDIR)/$(PDF_OUTPUT) created" - @echo "fop.log created" - $(Q)rm fop.log - @echo "fop.log destroyed" - $(Q)rm -rf $(RENDERTMP) - -nochunks: $(BASEDIR)/$(NOCHUNKS_OUTPUT) -$(BASEDIR)/$(NOCHUNKS_OUTPUT): $(RENDERTMP)/$(GLFSHTML) version - @echo "Generating non-chunked XHTML file..." - $(Q)xsltproc --nonet \ - --stringparam rootid "$(ROOT_ID)" \ - --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ - stylesheets/glfs-nochunks.xsl \ - $(RENDERTMP)/$(GLFSHTML) - - @echo "Running Tidy and obfuscate.sh on non-chunked XHTML..." - $(Q)tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true - $(Q)bash obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) - $(Q)sed -i -e "1,20s@text/html@application/xhtml+xml@g" $(BASEDIR)/$(NOCHUNKS_OUTPUT) - @echo "Removing $(RENDERTMP)..." - $(Q)rm -rf $(RENDERTMP) - validate: $(RENDERTMP)/$(GLFSFULL) $(RENDERTMP)/$(GLFSFULL): general.ent packages.ent $(ALLXML) $(ALLXSL) version $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP) @@ -320,9 +260,8 @@ $(DUMPDIR): $(RENDERTMP)/$(GLFSFULL) version $(Q)touch $(DUMPDIR) $(Q)rm -rf $(RENDERTMP) -.PHONY: glfs all world html nochunks pdf clean validate profile-html \ - wget-list test-links dump-commands bootscripts systemd-units version \ - test-options +.PHONY: glfs all world html clean validate profile-html wget-list test-links \ + dump-commands bootscripts systemd-units version test-options version: $(Q)REV=$(REV) STAB=$(STAB) ./git-version.sh diff --git a/README.md b/README.md index c12efea58d..13e2b54c2e 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,3 @@ that are in that path. Defaults can be changed in a file that isn't tracked (`local.mk`) by declaring variables found in `Makefile` in `local.mk`, such as `REV` and `GLFS_THEME`. This file must be created manually. - -Makefile targets are: `pdf`, `nochunks`, and `validate`. - -`pdf`: builds GLFS as a PDF file. - -`nochunks`: builds GLFS in one huge file. - -`validate`: does an extensive check for XML errors in the book. diff --git a/pdf-fixups.sh b/pdf-fixups.sh deleted file mode 100755 index d39d3f10f8..0000000000 --- a/pdf-fixups.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -if [ $# -lt 1 ] ; then - echo "This script needs the location of the fo file to update" - exit 1 -fi - - -FILE=$1 - -LINE=$( grep -n "DO NOT EDIT" $FILE | cut -f1 -d: ) -LINE=$(( LINE - 1 )) - -# Not needed -#sed -i -e "$LINE s/monospace/&\" font-size=\"9pt/" $FILE -sed -i -e "s/monospace/&\" font-size=\"9pt/g" $FILE - -# Break a block of code at the right place -sed -i -e 's@gcc --version@&@' $FILE diff --git a/stylesheets/glfs-nochunks.xsl b/stylesheets/glfs-nochunks.xsl deleted file mode 100644 index 7eb325a40b..0000000000 --- a/stylesheets/glfs-nochunks.xsl +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - blfs - - - - - - - - diff --git a/stylesheets/glfs-pdf.xsl b/stylesheets/glfs-pdf.xsl deleted file mode 100644 index 5145ca082e..0000000000 --- a/stylesheets/glfs-pdf.xsl +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - blfs - - - - - - - - diff --git a/stylesheets/lfs-xsl/nochunks.xsl b/stylesheets/lfs-xsl/nochunks.xsl deleted file mode 100644 index ba2de26436..0000000000 --- a/stylesheets/lfs-xsl/nochunks.xsl +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - - - - - - - - - - - - - - - book toc,title - preface nop - part nop - chapter nop - appendix nop - sect1 nop - sect2 nop - sect3 nop - sect4 nop - sect5 nop - section nop - - - - 1 - - - 3 - - - - - - - - - - - -
-

- -

- -
-
- - - - - - - -

- - - - - - . - - -

-
-
-
- - - - - - - -
diff --git a/stylesheets/lfs-xsl/pdf.xsl b/stylesheets/lfs-xsl/pdf.xsl deleted file mode 100644 index 7b01830570..0000000000 --- a/stylesheets/lfs-xsl/pdf.xsl +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - false - - - - - - - - - justify - - - 9 - - - 12pt - - - - book toc,title - part nop - - - - 1 - - - - - - no - - - - - - - - - - - diff --git a/stylesheets/lfs-xsl/pdf/lfs-admon.xsl b/stylesheets/lfs-xsl/pdf/lfs-admon.xsl deleted file mode 100644 index cc264ea384..0000000000 --- a/stylesheets/lfs-xsl/pdf/lfs-admon.xsl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - always - - - 0.6em - 0.4em - 0.8em - 0.6em - 0.4em - 0.8em - 5pt - 5pt - 5pt - solid - 0.5pt - #FFFFE6 - - - #E0E0E0 - #DCC - - - - - - - 14pt - bold - false - always - - - #500 - #000 - - - - - - - 5pt - - - - - - - 24pt - - - diff --git a/stylesheets/lfs-xsl/pdf/lfs-index.xsl b/stylesheets/lfs-xsl/pdf/lfs-index.xsl deleted file mode 100644 index 1fe86b1865..0000000000 --- a/stylesheets/lfs-xsl/pdf/lfs-index.xsl +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - -]> - - - - - - - - - - - 0pt - 14.4pt - - - - bold - always - 1em - 0.8em - 1.2em - 0.5em - 0.3em - 0.7em - 0pt - - - - - 0.5pc - - - - - - - - - - - - - - - - - - - Packages - - - - - Programs - - - - - Libraries - - - - - - - Kernel Configuration - - - - - Scripts - - - - - - - - - Configuration Files - - - - - Others - - - - - - - Bootscripts - - - - - Others - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylesheets/lfs-xsl/pdf/lfs-lists.xsl b/stylesheets/lfs-xsl/pdf/lfs-lists.xsl deleted file mode 100644 index c3abb960ed..0000000000 --- a/stylesheets/lfs-xsl/pdf/lfs-lists.xsl +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - 0.6em - 0.4em - 0.8em - 0.6em - 0.4em - 0.8em - - - - - 0.4em - 0.2em - 0.6em - - - - - left - - - - - - - 35 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.2em - 0em - 0.4em - 0.2em - 0em - 0.4em - always - - - 0.4em - 0.2em - 0.6em - 0.4em - 0.2em - 0.6em - - - - - - - - - - - - - - - - - - - - : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - always - 0em - 0em - 0.2em - - - diff --git a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl b/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl deleted file mode 100644 index 6e078e09c2..0000000000 --- a/stylesheets/lfs-xsl/pdf/lfs-mixed.xsl +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - - - 0.6em - 0.4em - 0.8em - 3 - 3 - - - - - always - 0.6em - 0.4em - 0.8em - 0.6em - 0.4em - 0.8em - false - no-wrap - false - preserve - preserve - start - - - - - - - - #E9E9E9 - solid - 0.5pt - #888 - 5pt - 2pt - 2pt - - - - - - - - - - - - - - - - 0.1em - 0em - 0.2em - - - - - - - - - - - - - - - - - - - - - - - - - always - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ltr - rtl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ltr - rtl - - - - - - - - - - - - italic - inherit - - - - - - - - - center - left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - center - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl b/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl deleted file mode 100644 index e36fafe5a8..0000000000 --- a/stylesheets/lfs-xsl/pdf/lfs-pagesetup.xsl +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0.8pc - - - - - - - always - - - - - - - - - - false - - - center - left - - - - - - - - - - - - - - - - - - - - - - page - - auto - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - right - left - - - - - - - - - - diff --git a/stylesheets/lfs-xsl/pdf/lfs-xref.xsl b/stylesheets/lfs-xsl/pdf/lfs-xref.xsl deleted file mode 100644 index 58dba607e0..0000000000 --- a/stylesheets/lfs-xsl/pdf/lfs-xref.xsl +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Endterm points to nonexistent ID: - - - ??? - - - - - - - - - - - - - - - - - - - - - - - - - - - - ERROR: xref linking to - - has no generated link text. - - ??? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -