• Eli Schwartz's avatar
    makepkg: fix bash 5 compatibility when packaging symlinks to a directory · 6911904a
    Eli Schwartz authored and Allan McRae's avatar Allan McRae committed
    In commit b5191ea1 we moved to using
    shell globbing to print package files for a couple of reasons including
    reproducible packaging of .METADATA files.
    Unfortunately, this only works reliably when the glob pattern does not
    resolve to a symlinked directory due to a change in the bash 5.0
    release. Note that the previous, desired behavior was rather to merely
    refuse to recurse into symlinked directories, but due to an unrelated
    issue, the symlink handling for globstar was reworked in a way that had
    this side effect.
    See https://lists.gnu.org/archive/html/bug-bash/2019-04/msg00015.html
    for discussion; this may be fixed at some point, but bash 5.0 is broken
    either way.
    The appropriate way of handling this seems to be to use **/* to match
    instead; this produces the same results on both bash 4 and bash 5, as
    the ** matches any leading directory component (or none), and the *
    matches any file, directory, or symlink to either one.
    Fixes FS#62278
    Signed-off-by: Eli Schwartz's avatarEli Schwartz <eschwartz@archlinux.org>
    Signed-off-by: Allan McRae's avatarAllan McRae <allan@archlinux.org>