Commit graph

861 commits

Author SHA1 Message Date
Santiago Torres
f26cb61cb6 Make makepkg compute sizes properly
Makepkg used to use du --apparent-size to compute the size of the
package. Unfortunately, this would result in different sizes depending
on the filesystem used (e.g., btrfs vs ext4), which would affect
reproducible builds. Use a wc-based approach to compute sizes

Signed-off-by: Santiago Torres <santiago@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-03-19 11:54:50 +10:00
Eli Schwartz
e03752e6ad makepkg: add new checksum algorithm via coreutils b2sum
coreutils 8.26 in December 2016 added this new hashing method which is
compatible with the existing md5sum and sha*sum tool usage, while using
the blake2 hash algorithm.

makepkg uses coreutils to provide source file integrity checks via
${integ}sum binaries and it makes sense to offer this as an additional
option.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-03-07 11:12:12 +10:00
Eli Schwartz
656e851f0a makepkg: simplify run_pacman logic
We don't need to check the options twice, since it is the same check
both times. Instead, merge the conditionals.

As far as I can tell, the only reason the checks for:

- PACMAN_OPTS and
- whether to use sudo

were ever separated is due to the historic existence of --asroot, since
the second check included a check for (( ! ASROOT )) until it was
cleaned up in commit 61ba5c961e.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-02-21 14:18:25 +10:00
Eli Schwartz
4b83bcfcee makepkg: implement locking for pacman commands
When pacman is run as root to do -S, -U, or -R, it would immediately
abort if pacman is not ready for use. Instead, poll the lockfile and
wait until it becomes available.

Implements FS#28840

Original-patch-by: Georges Dubus <georges.dubus@compiletoi.net>
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-02-21 14:16:16 +10:00
morganamilo
75aae126c4 libmakepkg: centralise random arrays of pkgbuild variables
Refactor many of the different arrays of pkgbuild variables
into scripts/libmakepkg/util/schema.sh.in.

Signed-off-by: morganamilo <morganamilo@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-31 10:02:37 +10:00
Allan McRae
6cf0548128 makepkg: use --unneeded for pacman call in remove_deps()
This patch was inspired by FS#32723 which asks makepkg to install makedepends
before depends.  The use case is to build a package depending on a virtual
package that is only provided by other packages (e.g. java-runtime in Arch
Linux), but wanting to build against a specific version.  Installing makedepends
first (but not at the same time as depends) would allow specifying the version
to build against, instead of pacman resolving to the default version when
installing depends.

It turns out, we can already achieve installing makedepends first by specifying
dependencies only in the package function (and making sure makedepends includes
everything needed). The only issue is that if we use makepkg to install the
built package with the --install flag and along with the --rmdeps flag, we will
try to remove any installed dependencies that are specified in the depends
array in the package function.  To counter this, we need to use the --unneeded
flag for the pacman call.

Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-30 13:39:35 +10:00
Eli Schwartz
ce040514c4 makepkg: return E_PKGBUILD_ERROR for nonexistent PKGBUILD
This is not really an error with a "user function".

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10 17:07:23 +10:00
Eli Schwartz
10fe71e5f3 makepkg: fix unguarded use of printf
paths can contain printf-unsafe chars, and printf -v is not somehow immune to this

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10 17:00:05 +10:00
Eli Schwartz
268b0255fa makepkg: add internal variable to track when we're building a package
There are state variables for everything else, and we use them to do
conditional checks on things, but it's currently a bit difficult to test
whether a package is being built, as it's the default action if *no*
options are specified.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-10 13:25:12 +10:00
Jan Alexander Steffens (heftig)
c5c7fc7f4a makepkg: Make pkgdir a local
Causes it to be reset (to $pkgdirbase/$pkgbase) between subpackages.
This shouldn't be visible.

Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04 15:43:41 +10:00
Jan Alexander Steffens (heftig)
2f15921230 makepkg: Create a single-package packaging function
Merge the similar code handling unsplit PKGBUILDs and individual
packages in a split PKGBUILD and make it a new function.

Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04 15:43:41 +10:00
Jan Alexander Steffens (heftig)
7c5958e0eb makepkg: Only backup package variables once
We don't need to re-backup the variables we restored on the previous
iteration.

Signed-off-by: Allan McRae <allan@archlinux.org>
2019-01-04 15:43:41 +10:00
Que Quotion
508b4e3ec0 Split prepare_buildenv() to libmakepkg
This opens the door for third parties to provide libmakepkg
extentions for the purpose of altering the build environment.

Signed-off-by: Que Quotion <quequotion@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27 22:48:43 +10:00
Que Quotion
0bb04fa16a Split check_software() to libmakepkg
This opens the door for third parties who provide extensions to
libmakepkg to supply scripts that confirm the presence of their
dependant executables.

Signed-off-by: Que Quotion <quequotion@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27 22:48:43 +10:00
Eli Schwartz
1aaf95089a makepkg: if "!buildflags" and "debug" coincide, unset the debug buildflags too
If a user has a makepkg.conf policy to enable debug builds, but a
PKGBUILD has disabled buildflags, we would unset the *FLAGS but then
later append the debug *FLAGS anyway, which would result in some *FLAGS
being used, against the wishes of the PKGBUILD author.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-27 22:48:43 +10:00
Eli Schwartz
3dfec574a3 makepkg: fix .PKGINFO/.BUILDINFO files swallowing status printing
The respective write_* functions are low-level and shouldn't be
outputting statuses; move these to the logic flow where they are used.
This ensures the functions can be used in the future wherever, and also
solves an issue where, as fallout from the message.sh retrofitting in
commit 882e707e40, the statuses got
redirected to the actual files.

The resulting package was technically correct, except that it contained
useless lines which pacman ignored, and repo-add also ignored but at the
same time generated an error message:

/usr/bin/repo-add: line 335: declare: `=-> Generating .PKGINFO file...': not a valid identifier

Thirdparty package tools with stricter parsers may abort with errors,
and "repose" is known to do so.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-11-03 21:56:40 +10:00
Eli Schwartz
882e707e40 makepkg: send messages to stdout rather than stderr
This behavior is confusing, since it means absolutely everything goes to
stderr and makepkg itself is a quiet program that produces no expected
output???

The only situation where messages should go to stderr rather than
stdout, is with --geninteg which is meant to return the checksums on
stdout (but we don't want to totally get rid of status messages when
redirecting the results elsewhere, or, worse, redirect status messages
to a PKGBUILD). For this specific case, redirect message output to
stderr in the --geninteg callers directly.

Implements FS#17173

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-10-21 20:20:17 +10:00
Eli Schwartz
b5191ea140 makepkg: use builtin globbing to print files in package
- it comes with free collation when moving the LC_ALL declaration up a bit;
  this fixes a bug where the .FILES were not being properly sorted and
  their order depended on directory creation order, which broke
  reproducible builds in the wild.
- it handles sorting null-delimited output everywhere, without sort -z;
  this lets us get rid of sed hacks
- it is faster than invoking multiple find subprocesses
- dotfiles can be automatically printed *and the C locale sorts them first*
  with a single ** glob

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-10-21 20:09:04 +10:00
Eli Schwartz
e12d032174 makepkg: use bash 4.4 to localize set without explicitly saving/restoring
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-10-21 20:03:41 +10:00
Eli Schwartz
58c76daf5e scripts: deduplicate localized copyright messages
We don't need to translate the "Copyright YEAR AUTHOR" part, no part of
it should probably be translated and it definitely shouldn't turn every
single license terms notice into a separate translation just because the
author/year is different.

Fixes FS#58452
Also consistently add a blank line after the copyright and before the
license terms.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-09-19 00:13:29 +10:00
Eli Schwartz
d03409ccde Revert "makepkg: add whirlpool to the list of hashing algorithms"
This reverts commit 9cdfd18739.

We've never documented whirlpoolsums support in the manpage and no one
really seems to have realized we support it, let alone use it -- except
for a few parabola packages, being the contributor's motivation for
adding support.

The problem is that for two years the code has been broken. In commit
577701250d we moved to coreutils to
provide checksum commands, rather than openssl, but there is no
whirlpoolsums binary.

Properly fixing this would require re-adding a dependency on openssl,
independent of the libalpm crypto backend -- which defeats the purpose
of moving to coreutils in the general case. nettle-hash does not provide
a whirlpool algorithm any more than it does base64 (the original reason
for moving to coreutils).

Therefore, we should just drop support for this again.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-09-18 21:53:21 +10:00
Eli Schwartz
5b2ff51c39 makepkg: don't print status for run_function when in a subshell
It's most likely a case where output is being captured, so we shouldn't
be interleaving status messages with function output regardless. Setting
the pkgver() status message (the one time we use it in a subshell)
separately also makes it safe to change whether message.sh functions write
to stdout or stderr.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-29 16:00:01 +10:00
Eli Schwartz
16f6aae330 makepkg: fix pkgver() function not aborting on errors
`run_function_safe pkgver` is evaluated in a subshell and therefore does
not abort when it should. Explicitly check the return outside of the
subshell and abort if necessary.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-29 14:58:32 +10:00
Eli Schwartz
48c8f9f2a2 makepkg: don't save the same shopts twice
Both run_function and run_function_safe will save and restore `shopt -p`
but the former is only called from the latter. It makes sense to save
this as part of a "safe" runner, so let's just do it in one place, there
where we save and restore everything else too.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-29 14:56:20 +10:00
Eli Schwartz
2d8d8af915 scripts: pass on options such as set -x to child processes
When re-running makepkg for fakeroot, if `bash -x makepkg` was used this
is lost. Fix by encoding the current set of options explicitly in the
invocation, both for makepkg and for the wrapper used to test scripts
inside the source tree.

Also change to use ${BASH_SOURCE[0]} instead of $0 as the latter can be
anything the parent process wants, while the former is explicitly set by
bash itself to the filepath of the script.

See http://mywiki.wooledge.org/BashFAQ/028

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-10 15:20:40 +10:00
Jan Alexander Steffens (heftig)
e4be26b732 scripts: Remove trailing semicolons
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-10 12:37:20 +10:00
Jan Alexander Steffens (heftig)
7edbbd9a63 makepkg: Simplify run_package
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-10 12:37:19 +10:00
Jan Alexander Steffens (heftig)
f2788244d3 makepkg: Simplify SPLITPKG check
This causes package_$pkgname() to be preferred over package() in the
non-split case, but the behavior if both functions exist was
undocumented anyway.

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-10 12:37:19 +10:00
Eli Schwartz
1a5f308d52 makepkg: optimize and fix BUILDINFO generation's use of awk
The biggest issue is directly supplying the data within the format
string which can result in misinterpreting formatter sequences if a
printed variable contains an "%" in it. This character is currently
permitted in the pkgver field, though not in the pkgname. Also
pacman/libalpm itself has much looser limitations and this can appear
anywhere at all if a package was created by some other program.

For the package "iambroke-1%s-1-any.pkg.tar.xz", installed in the build
environment, the result is:

  -> Generating .BUILDINFO file...
awk: cmd. line:3: (FILENAME=- FNR=1085) fatal: not enough arguments to satisfy format string
	`-1%s-1'
	   ^ ran out for this one

Followed by a .BUILDINFO which contains an LC_ALL=C sorted list of
$pkgname-${epoch:+$epoch:}$pkgver-$pkgrel-$arch ending in:

installed = iambroke

Which is cut short, then fails to list the succeeding packages. The
package itself successfully builds.

It's also unnecessary to save the output of pacman -Qq in order to get the
information for pacman -Qi, since the latter will, just like the former,
return information for all installed packages if not given a package
name(s).

While I am at it, pipe this directly to awk rather than keeping a copy
in an unnecessary local variable. This is slightly more efficient in
addition to preventing the <<< herestring from re-interpreting the
content of "$pkginfos" in ways that don't really matter for our usage.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-07-27 11:43:39 +10:00
Allan McRae
9a8c7154b1 Revert "makepkg: use the declare builtin when backing up variables to eval"
This reverts commit 9e52a36794.

The change to use declare for the split package metadata backup/restore
resulted in variables being declared at a local scope. When these variables
were unset (mostly noticed with debug packaging) this left the variable at
global scope defined. Revert back to the known good state.

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-07-19 12:23:25 +10:00
Eli Schwartz
793202344b makepkg: fix erroneous $BUILDDIR when $startdir is not an absolute path
When comparing the $BUILDDIR to the $startdir, we used string equality
instead of testing whether they are the same location, and ended up
appending $pkgbase even though there's no reason to use it here.

In some cases, this could result in makepkg erroring when trying to
create $srcdir/$pkgdir, if a file with the same name as the $pkgbase
exists. This is expected behavior if a file "src" or "pkg" exists, but
decidedly less so for $pkgbase.

This could be fixed either by setting $startdir to an absolute path, or
by ensuring the test checks this directly; I've chosen to do both, since
the test should really be correctly checking the thing it actually cares
about, but since we ensure absolute paths are used everywhere else, this
might bite us elsewhere someday. It's also more consistent.

Fixes FS#58865

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Jan Alexander Steffens (heftig)
05a3641c76 makepkg: Don't use parameterless return
It's especially dangerous in trap handlers since the return value of the
function becomes the return value of the last command before the trap,
not the last command in the current function. This applies to any
function executed in a trap handler, nested functions included.

In one case, install_packages failed (via return 14), which was inside a
conditional that then ran exit 14, which triggered the EXIT handler,
which called clean_up, which called remove_deps, which had !RMDEPS and
thus returned. The return value of remove_deps became the return value
of install_packages, triggering the ERR handler, which (due to another
problem) was still the user function handler, which then printed a
misleading error message and overrode the exit code with 4.

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Eli Schwartz
ab1e92860b makepkg: fix the --nocolor option being broken when passed to pacman -U
In commit 8ff03868a3 PACMAN_OPTS was
turned into an array. Unfortunately, that array was generated by
treating the "--color never" option as one string, instead of an
array of two strings...

Fixes FS#58820

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Jan Alexander Steffens (heftig)
f78914cc6e makepkg: Clear ERR trap before trying to restore it
$restoretrap is empty if the trap was not set. This caused the trap
handler to remain and override later exit codes.

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Eli Schwartz
737596f038 makepkg: do not chmod $BUILDDIR itself after checking for its existence
In commit d8717a6a96 the write permission
checks were refactored. Initially we intended to drop this chmod in the
process, but due to some confusion about whether it was needed, I ended
up submitting patches both to preserve and to remove it... but it's not
needed after all. We do it on the individual $srcdir/$pkgdir, later on.

Then, we used the wrong version, which causes unnecessary restrictions.

See FS#58790

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Eli Schwartz
9eb3695a3f makepkg: remove unused variable forgotten when moving to parseopts
Reported-by: Rafael Ascensão <rafa.almas@gmail.com>
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Eli Schwartz
3a66b93be0 makepkg: update help text to describe --packagelist's new behavior
In commit d8591dd341 when teaching
--packagelist to print the full filepath for built arches only, I forgot
to update the helptext at the same time as I updated the manpage.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-06-18 13:15:51 +10:00
Eli Schwartz
6341e5ce23 Fix using run_pacman to invoke -Qi with sudo
In commit 5698d7b66d a new non-root use of
pacman was added -- previously we used -T or -Qq, and run_pacman did not
know how to special-case -Qi to skip being prepended with sudo.

The result is:

  -> Generating .BUILDINFO file...
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[sudo] password for eschwartz:
  -> Adding changelog file...

Fix this by using a more generic glob since neither -Q nor -T will ever
need sudo or PACMAN_OPTS

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-16 14:44:16 +10:00
Eli Schwartz
860e4c4943 Remove all modelines from the project
Many of these are pointless (e.g. there is no need to explicitly turn on
spellchecking and language dictionaries for the manpages by default).

The only useful modelines are the ones enforcing the project coding
standards for indentation style (and "maybe" filetype/syntax, but
everything except the asciidoc manpages and makepkg.conf is already
autodetected), and indent style can be applied more easily with
.editorconfig

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-14 09:59:15 +10:00
Robin Broda
5698d7b66d Append architecture information to 'installed' elements in .BUILDINFO
Adding the architecture to the 'installed' elements of the .BUILDINFO
file makes it easier to retrieve the packages needed to reconstruct
the build environment.

Signed-off-by: Robin Broda <robin@broda.me>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-12 21:25:51 +10:00
Robin Broda
f173f6d0da Add pkgarch to .BUILDINFO
Architecture information is required for repro tooling

This is a revised version of https://patchwork.archlinux.org/patch/475/

Signed-off-by: Robin Broda <robin@broda.me>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-12 21:22:46 +10:00
Eli Schwartz
542c3cf812 libmakepkg: only save the shellopts we need
micro-optimization: We only care about temporarily enforcing extglob, so
that is the only one we need to explicitly restore.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-12 21:11:52 +10:00
Rafael Ascensão
fa8b99189e remove unneeded break argument from option parsing
Some scripts are using `break 2` to break out of the option parsing
loop.

Since a single `break` is sufficient in these cases, remove the extra
argument.

Signed-off-by: Rafael Ascensão <rafa.almas@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-12 21:09:37 +10:00
Allan McRae
77986af9b7 makepkg: Fix listing of uninstalled deps
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-04-30 00:46:02 +10:00
Eli Schwartz
9e52a36794 makepkg: use the declare builtin when backing up variables to eval
Rather than manually crafting foo_backup in a loop and eval'ing them
with a complicated escape pattern, store every splitpkg_overrides
element into a single variable via the eval-friendly `declare` builtin.

An alternative to eval would be using `printf -v` but this does not work
for arrays.

This has the additional benefit of reducing the number of
variables/arrays floating around in the environment.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-15 14:39:31 +10:00
Eli Schwartz
f054351e52 libmakepkg: Add basic rules to lint makepkg.conf variables
Currently the only things we check are:

- Things that should be arrays, are not strings, and vice versa (this
  was mostly copy-pasted from the similar code in lint_pkgbuild).
- Variables that are meant to contain pathname components cannot contain
  a newline character, because newline characters in pathnames are weird
  and also don't play well with future changes intended for the
  --packagelist option.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-15 14:34:13 +10:00
Eli Schwartz
c54621d819 makepkg: avoid false "Signing package(s)" msg when signing is disabled
Followup on c6b04c0465 which refactored
the signing function to run outside of fakeroot, and in the process
moved the status message to outside the $SIGNPKG check.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-15 11:16:00 +10:00
Eli Schwartz
d8717a6a96 makepkg: refactor checking for write permissions into a utility function
Additionally provide a separate error for failure to create the
directory vs lack of write permissions on a pre-existing directory.

This also means we now consistently try to create any nonexistent *DEST
directories as needed before aborting with E_FS_PERMISSIONS. Previously
only $BUILDDIR received that kindness.

Fixes FS#43537

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-14 17:47:51 +10:00
Allan McRae
b6bb8cb7dc Update coyrights for 2018
make update-copyright OLD=2017 NEW=201

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-14 13:31:31 +10:00
Felix Glaser
a5dd5d4141 makepkg: set umask 0022 again after syncing deps
makepkg configures the umask 0022 as a sane default for building
packages. After installing dependencies, it sources `/etc/profile`
again. If the user configured a umask other than Arch's default of
0022 (or 022) in `/etc/profile`, this sane default is now gone and
needs to be set again.

Signed-off-by: Allan McRae <allan@archlinux.org>
2018-03-14 12:52:09 +10:00