Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#76035 - bash 5.2 globskipdots option will break check_dotfiles
Attached to Project:
Pacman
Opened by Christoph Trassl (trassl) - Tuesday, 27 September 2022, 19:18 GMT
Last edited by Allan McRae (Allan) - Sunday, 02 October 2022, 01:46 GMT
Opened by Christoph Trassl (trassl) - Tuesday, 27 September 2022, 19:18 GMT
Last edited by Allan McRae (Allan) - Sunday, 02 October 2022, 01:46 GMT
|
DetailsSummary and Info:
Bash 5.2 has a new globskipdots option, which is enabled by default. This will break the check in scripts/libmakepkg/lint_package/dotfiles.sh, ie. will always return an error and building packages will fail. --- a/scripts/libmakepkg/lint_package/dotfiles.sh.in +++ b/scripts/libmakepkg/lint_package/dotfiles.sh.in @@ -29,6 +29,7 @@ lint_package_functions+=('check_dotfiles') check_dotfiles() { local ret=0 + shopt -u globskipdots for f in "$pkgdir"/.*; do [[ ${f##*/} == . || ${f##*/} == .. ]] && continue error "$(gettext "Dotfile found in package root '%s'")" "$f" References: * https://lwn.net/Articles/909596/ Steps to Reproduce: Use makepkg under bash 5.2. |
This task depends upon
Closed by Allan McRae (Allan)
Sunday, 02 October 2022, 01:46 GMT
Reason for closing: Fixed
Additional comments about closing: git commit a6b06a5b17e19db8700597ee06bae42b2cfe7b5a
Sunday, 02 October 2022, 01:46 GMT
Reason for closing: Fixed
Additional comments about closing: git commit a6b06a5b17e19db8700597ee06bae42b2cfe7b5a
$ shopt -u globskipdots
bash: shopt: globskipdots: invalid shell option name
I'll figure this out.
What is the error you are seeing?
$ bash --noprofile --norc
$ cat ~/test.sh
find /tmp/pkgdir
echo "Showing default for globskipdots"
shopt globskipdots
echo "Enable globskipdots"
shopt -s globskipdots
for f in "/tmp/pkgdir/".*; do echo "#${f}#"; done
echo "Disable globskipdots"
shopt -u globskipdots
for f in "/tmp/pkgdir/".*; do echo "#${f}#"; done
$ bash ~/test.sh
/tmp/pkgdir
/tmp/pkgdir/path
/tmp/pkgdir/path/file
/tmp/pkgdir/file
Showing default for globskipdots
globskipdots on
Enable globskipdots
#/tmp/pkgdir/.*#
Disable globskipdots
#/tmp/pkgdir/.#
#/tmp/pkgdir/..#
$
Edited: Removed the patch, it was just a wrong copy and paste. I will test my suggestion.
local shellopts=$(shopt -p nullglob)
shopt -s nullglob
...
eval "$shellopts"