Skip to contentSkip to conversation

Eliminate dependency on pandoc

PATCH New Eric Biggers 1 participant 1 message Mar 20, 2024

Subsystems (2)
lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 Eliminate dependency on pandoc

From: Eric Biggers <[email protected]>

It's causing problems for Debian that fsverity-utils uses pandoc to convert the fsverity.1 man page from markdown to a native Linux man page
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066832). Therefore, just keep the fsverity.1 man page in native Linux man format. Since no processing of the page is needed anymore, just install it in 'make install', so that 'make install-man' is no longer needed.

---
 .gitignore            |   1 -
 Makefile              |  16 +--
 README.md             |  12 +-
 man/fsverity.1        | 267 ++++++++++++++++++++++++++++++++++++++++++
 man/fsverity.1.md     | 220 ----------------------------------
 scripts/do-release.sh |   2 +-
 6 files changed, 277 insertions(+), 241 deletions(-)
 create mode 100644 man/fsverity.1
 delete mode 100644 man/fsverity.1.md
.gitignore +0 -1
index 3ea5ca6..35d3206 100644
@@ -1,6 +1,5 @@
-*.[1-9]
 *.a
 *.exe
 *.o
 *.patch
 *.so
Makefile +5 -11
index 2304a21..c3de571 100644
@@ -68,11 +68,10 @@ ifneq ($(V),1)
 QUIET_CC        = @echo '  CC      ' $@;
 QUIET_CCLD      = @echo '  CCLD    ' $@;
 QUIET_AR        = @echo '  AR      ' $@;
 QUIET_LN        = @echo '  LN      ' $@;
 QUIET_GEN       = @echo '  GEN     ' $@;
-QUIET_PANDOC    = @echo '  PANDOC  ' $@;
 endif
 USE_SHARED_LIB  ?=
 PREFIX          ?= /usr/local
 BINDIR          ?= $(PREFIX)/bin
 INCDIR          ?= $(PREFIX)/include
@@ -203,15 +202,11 @@ EXTRA_TARGETS += $(TEST_PROGRAMS)
 
 ##############################################################################
 
 #### Manual pages
 
-man/fsverity.1:man/fsverity.1.md
-	$(QUIET_PANDOC) pandoc $+ -s -t man > $@
-
-MAN_PAGES := man/fsverity.1
-EXTRA_TARGETS += $(MAN_PAGES)
+MAN_PAGES := $(wildcard man/*.[1-9])
 
 ##############################################################################
 
 # Support for downloading and building BoringSSL.  The purpose of this is to
 # allow testing builds of fsverity-utils that link to BoringSSL instead of
@@ -226,12 +221,11 @@ boringssl:
 	cmake -B boringssl/build boringssl
 	$(MAKE) -C boringssl/build $(MAKEFLAGS)
 
 ##############################################################################
 
-SPECIAL_TARGETS := all test_programs check install install-man uninstall \
-		   help clean
+SPECIAL_TARGETS := all test_programs check install uninstall help clean
 
 FORCE:
 
 .PHONY: $(SPECIAL_TARGETS) FORCE
 
@@ -270,14 +264,14 @@ install:all
 		-e "s|@LIBDIR@|$(LIBDIR)|" \
 		-e "s|@INCDIR@|$(INCDIR)|" \
 		lib/libfsverity.pc.in \
 		> $(DESTDIR)$(LIBDIR)/pkgconfig/libfsverity.pc
 	chmod 644 $(DESTDIR)$(LIBDIR)/pkgconfig/libfsverity.pc
-
-install-man:$(MAN_PAGES)
 	install -d $(DESTDIR)$(MANDIR)/man1
-	install -m644 $+ $(DESTDIR)$(MANDIR)/man1/
+	for page in $(MAN_PAGES); do \
+		install -m644 $$page $(DESTDIR)$(MANDIR)/man1/; \
+	done
 
 uninstall:
 	rm -f $(DESTDIR)$(BINDIR)/$(FSVERITY)
 	rm -f $(DESTDIR)$(LIBDIR)/libfsverity.a
 	rm -f $(DESTDIR)$(LIBDIR)/libfsverity.so.$(SOVERSION)
README.md +4 -8
index 2019592..2080fb1 100644
@@ -23,30 +23,26 @@ See `libfsverity.h` for the API of this library.
 To build fsverity-utils, first install the needed build dependencies.  For
 example, on Debian-based systems, run:
 
 ```bash
     sudo apt-get install libssl-dev
-    sudo apt-get install pandoc  # optional
 ```
 
 OpenSSL must be version 1.0.0 or later.  This is the only runtime dependency.
 
 Then, to build and install fsverity-utils:
 
 ```bash
     make
     sudo make install
-    sudo make install-man  # optional
 ```
 
 By default, the following targets are built and installed: the program
-`fsverity`, the static library `libfsverity.a`, and the shared library
-`libfsverity.so`.  You can also run `make check` to build and run the
-tests, or `make help` to display all available build targets.
-
-`make install-man` installs the `fsverity.1` manual page.  This step requires
-that `pandoc` be installed.
+`fsverity`, the static library `libfsverity.a`, the shared library
+`libfsverity.so`, and the manual page `fsverity.1`.  You can also run
+`make check` to build and run the tests, or `make help` to display all
+available build targets.
 
 By default, `fsverity` is statically linked to `libfsverity`.  You can
 use `make USE_SHARED_LIB=1` to use dynamic linking instead.
 
 See the `Makefile` for other supported build and installation options.
man/fsverity.1 new file +267 -0

267 lines not on this page · raw message

man/fsverity.1.md deleted +0 -220

220 lines not on this page · raw message

scripts/do-release.sh +1 -1
index 3f68497..5339110 100755
@@ -52,11 +52,11 @@ prepare_release()
 		  include/libfsverity.h
 	sed -E -i "/Version:/s/[0-9]+\.[0-9]+/$VERS/" \
 		  lib/libfsverity.pc.in
 	sed -E -i -e "/^% /s/fsverity-utils v[0-9]+(\.[0-9]+)+/fsverity-utils v$VERS/" \
 		  -e "/^% /s/[a-zA-Z]+ 2[0-9]{3}/$month $year/" \
-		  man/*.[1-9].md
+		  man/*.[1-9]
 	git commit -a --signoff --message="v$VERS"
 	git tag --sign "v$VERS" --message="$PKG"
 
 	git archive "v$VERS" --prefix="$PKG/" > "$PKG.tar"
 	tar xf "$PKG.tar"

base-commit: 4ba79698b0381fe953f2d74b622b3b9586969e2b

Signature · 1 line
2.44.0.291.gc1ea87d7ee-goog