diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-06-22 03:45:57 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2022-08-14 02:17:39 -0300 |
commit | 7bbcf7eab290c8b9f683f71838009933df2295b5 (patch) | |
tree | 2a26d88a002cb0815aa4342eb6aa413ee67397e9 /mkdeb.sh | |
parent | build: add new TARNAME variable (diff) | |
download | firejail-7bbcf7eab290c8b9f683f71838009933df2295b5.tar.gz firejail-7bbcf7eab290c8b9f683f71838009933df2295b5.tar.zst firejail-7bbcf7eab290c8b9f683f71838009933df2295b5.zip |
build: use TARNAME instead of NAME for paths
PACKAGE_TARNAME is the same as PACKAGE_NAME but normalized, so it should
be safer to use in paths. For example, on a downstream project, if
spaces or shell metacharacters are added to the package name, a path
that uses PACKAGE_TARNAME should keep working.
From the manual of GNU Autoconf (version 2.69):
> -- Macro: AC_INIT (PACKAGE, VERSION, [BUG-REPORT], [TARNAME], [URL])
> Process any command-line arguments and perform initialization and
> verification.
>
> Set the name of the PACKAGE and its VERSION. These are typically
> used in '--version' support, including that of 'configure'. The
> optional argument BUG-REPORT should be the email to which users
> should send bug reports. The package TARNAME differs from
> PACKAGE: the latter designates the full package name (e.g., 'GNU
> Autoconf'), while the former is meant for distribution tar ball
> names (e.g., 'autoconf'). It defaults to PACKAGE with 'GNU '
> stripped, lower-cased, and all characters other than
> alphanumerics and underscores are changed to '-'.
Note also that by default (on autoconf v2.69), `docdir=@docdir@` in
config.mk.in expands to the following in config.mk:
docdir=${datarootdir}/doc/${PACKAGE_TARNAME}
Diffstat (limited to 'mkdeb.sh')
-rwxr-xr-x | mkdeb.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -14,8 +14,8 @@ EXTRA_VERSION=$1 | |||
14 | 14 | ||
15 | test "$#" -gt 0 && shift | 15 | test "$#" -gt 0 && shift |
16 | 16 | ||
17 | CODE_ARCHIVE="$NAME-$VERSION.tar.xz" | 17 | CODE_ARCHIVE="$TARNAME-$VERSION.tar.xz" |
18 | CODE_DIR="$NAME-$VERSION" | 18 | CODE_DIR="$TARNAME-$VERSION" |
19 | INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian" | 19 | INSTALL_DIR="${INSTALL_DIR}${CODE_DIR}/debian" |
20 | DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN" | 20 | DEBIAN_CTRL_DIR="${DEBIAN_CTRL_DIR}${CODE_DIR}/debian/DEBIAN" |
21 | 21 | ||