[pacman-dev] [PATCH 2/2] doc: update SRCEXT/PKGEXT to reduce needlessly scary warnings

Eli Schwartz eschwartz at archlinux.org
Tue May 21 22:41:17 UTC 2019


Currently this tells people that the settings should not be touched, but
we should just rely on the description of what it should be set to, and
leave it up to the user.
Also, the previous patch allows makepkg to abort if an invalid value is
set, greatly reducing the danger of it being badly configured anyway.

Also make this clearer by indicating when it would be useful to change
the settings -- i.e. disable compression -- and ensure their described
defaults are based on the ones established during ./configure or meson
setup.

Reported-by: Jouke Witteveen <j.witteveen at gmail.com>
Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 doc/Makefile.am             | 2 ++
 doc/makepkg.conf.5.asciidoc | 9 +++++----
 doc/meson.build             | 2 ++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 3c4a329f..5c575832 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -108,6 +108,8 @@ ASCIIDOC_OPTS = \
 	-f $(srcdir)/asciidoc.conf \
 	-a pacman_version="$(REAL_PACKAGE_VERSION)" \
 	-a pacman_date="`date +%Y-%m-%d`" \
+	-a srcext="$(SRCEXT)" \
+	-a pkgext="$(PKGEXT)" \
 	-a pkgdatadir=$(pkgdatadir) \
 	-a localstatedir=$(localstatedir) \
 	-a sysconfdir=$(sysconfdir) \
diff --git a/doc/makepkg.conf.5.asciidoc b/doc/makepkg.conf.5.asciidoc
index 34810f51..9292b2a6 100644
--- a/doc/makepkg.conf.5.asciidoc
+++ b/doc/makepkg.conf.5.asciidoc
@@ -258,11 +258,12 @@ Options
 	Sets the command and options used when compressing compiled or source
 	packages in the named format.
 
-**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
+**PKGEXT=**"{pkgext}", **SRCEXT=**"{srcext}"::
 	Sets the compression used when making compiled or source packages.
-	Valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.zst`,
-	`.tar.lzo`, `.tar.lrz`, `.tar.lz4`, `.tar.lz` and `.tar.Z`.
-	Do not touch these unless you know what you are doing.
+	Valid suffixes are `.tar.gz`, `.tar.bz2`, `.tar.xz`, `.tar.zst`,
+	`.tar.lzo`, `.tar.lrz`, `.tar.lz4`, `.tar.lz` and `.tar.Z`, or
+	simply `.tar` to disable compression entirely.
+
 
 
 See Also
diff --git a/doc/meson.build b/doc/meson.build
index 85b95c80..6e74377d 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -27,6 +27,8 @@ asciidoc_opts = [
  '-f', asciidoc_conf,
  '-a', 'pacman_version="@0@"'.format(PACKAGE_VERSION),
  '-a', 'pacman_date=@0@'.format(run_command('date', '+%Y-%m-%d').stdout().strip()),
+ '-a', 'srcext=@0@'.format(get_option('src-ext')),
+ '-a', 'pkgext=@0@'.format(get_option('pkg-ext')),
  '-a', 'pkgdatadir=@0@'.format(PKGDATADIR),
  '-a', 'localstatedir=@0@'.format(LOCALSTATEDIR),
  '-a', 'sysconfdir=@0@'.format(SYSCONFDIR),
-- 
2.21.0


More information about the pacman-dev mailing list