From owner-dev-commits-src-all@freebsd.org Tue Mar 16 06:13:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 297D7578068; Tue, 16 Mar 2021 06:13:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F02zD0SXyz3JFT; Tue, 16 Mar 2021 06:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 321271E93B; Tue, 16 Mar 2021 06:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12G6DR87062098; Tue, 16 Mar 2021 06:13:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12G6DRql062097; Tue, 16 Mar 2021 06:13:27 GMT (envelope-from git) Date: Tue, 16 Mar 2021 06:13:27 GMT Message-Id: <202103160613.12G6DRql062097@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: c7e6cb9e08d6 - main - pkgbase: Add an src.conf option for splitting man pages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7e6cb9e08d6b51e677a9f5546b8e36d678687d0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2021 06:13:31 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=c7e6cb9e08d6b51e677a9f5546b8e36d678687d0 commit c7e6cb9e08d6b51e677a9f5546b8e36d678687d0 Author: Emmanuel Vadot AuthorDate: 2021-03-16 06:11:56 +0000 Commit: Emmanuel Vadot CommitDate: 2021-03-16 06:13:09 +0000 pkgbase: Add an src.conf option for splitting man pages Man pages can be big in total, add an options to split man pages in -man packages so we produce smaller packages. This is useful for small jails or mfsroot produced of pkgbase. The option is off by default. Reviewed by: bapt, Mina Galić Differential Revision: https://reviews.freebsd.org/D29169 MFC after: 2 weeks --- release/packages/generate-ucl.sh | 5 +++++ share/man/man5/src.conf.5 | 4 +++- share/mk/bsd.man.mk | 9 +++++++++ share/mk/src.opts.mk | 1 + tools/build/options/WITH_MANSPLITPKG | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index e900f9991912..67c10e485eb7 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -71,6 +71,11 @@ main() { _descr="Debugging Symbols" pkgdeps="${outname}" ;; + *_man) + outname="${outname%%_man}" + _descr="Manual Pages" + pkgdeps="${outname}" + ;; ${origname}) pkgdeps="runtime" ;; diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 5d211bc1cc31..98fcc427d608 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 2, 2021 +.Dd March 16, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1099,6 +1099,8 @@ is set explicitly) .It Va WITHOUT_MANCOMPRESS Set to not to install compressed man pages. Only the uncompressed versions will be installed. +.It Va WITH_MANSPLITPKG +Set to split man pages into their own packages during make package. .It Va WITHOUT_MAN_UTILS Set to not build utilities for manual pages, .Xr apropos 1 , diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 1e67928a2754..21c5fe4f2424 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -50,7 +50,11 @@ .error bsd.man.mk cannot be included directly. .endif +.if ${MK_MANSPLITPKG} == "no" MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.else +MINSTALL?= ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.endif CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat @@ -226,8 +230,13 @@ maninstall: ${MAN} .endif # ${MK_MANCOMPRESS} == "no" .endif .for l t in ${_MANLINKS} +.if ${MK_MANSPLITPKG} == "no" rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.else + rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ + ${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} +.endif .endfor manlint: diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 619aa8f4a1d8..949dfece43e4 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -207,6 +207,7 @@ __DEFAULT_NO_OPTIONS = \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ MALLOC_PRODUCTION \ + MANSPLITPKG \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ diff --git a/tools/build/options/WITH_MANSPLITPKG b/tools/build/options/WITH_MANSPLITPKG new file mode 100644 index 000000000000..122da24e0bb4 --- /dev/null +++ b/tools/build/options/WITH_MANSPLITPKG @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to split man pages into their own packages during make package.