testing/shflags: new aport
shFlags is a port of the Google gflags library for Unix shell.
Merge request reports
Activity
added aports:add label
- testing/shflags/APKBUILD 0 → 100644
2 # Maintainer: Sodface <sod@sodface.com> 3 pkgname=shflags 4 pkgver=1.2.3 5 pkgrel=0 6 pkgdesc="Command-line flags module for Unix shell scripts" 7 url="https://github.com/kward/shflags" 8 arch="noarch" 9 license="Apache-2.0" 10 source="$pkgname-$pkgver.tar.gz::https://github.com/kward/shflags/archive/refs/tags/v$pkgver.tar.gz" 11 12 check() { 13 sh test_runner 14 } 15 16 package() { 17 install -D -m 755 -t "$pkgdir/usr/share/misc" "shflags" /usr/bin/set_gbb_flags.sh is a helper script packaged with community/vboot-utils however the script throws an error for missing shflags library. It's checked for in the function load_shflags() from /usr/bin/common_minimal.sh also installed by vboot-utils. That function is:
# Finds and loads the 'shflags' library, or return as failed. load_shflags() { # Load shflags if [ -f /usr/share/misc/shflags ]; then . /usr/share/misc/shflags elif [ -f "${SCRIPT_DIR}/lib/shflags/shflags" ]; then . "${SCRIPT_DIR}/lib/shflags/shflags" else echo "ERROR: Cannot find the required shflags library." return 1 fi
The set_gbb_flags.sh script seems to be just a wrapper around gbb_utility (also from vboot-utils) and flashrom so one could just use those utilities directly and the script, along with shflags, would not be needed, making this aport not needed - at least for this case. I'm not sure what the general policy is though for having a package (vboot-utils) install a script (set_gbb_flags.sh) that doesn't work?
If this aport is merged, would I then need to submit an MR for vboot-utils to include shflags and flashrom (which is in main) as dependencies? That was sort of my plan (though I'd need to get shflags up to community first and flashrom moved from main). We could forget the whole thing and accept that the set_gbb_flags.sh script is broken without shflags, or maybe change the package function of vboot-utils to not include that script. @mps is the maintainer for vboot-utils, maybe he has a suggestion?
Edited by Carl Chave@Cogitri good catch. I think it is not essentially needed for vboot-utils so maybe could be removed
Looks like 3 scripts in vboot-utils require shflags:
/usr/bin/set_gbb_flags.sh:load_shflags || exit 1 /usr/bin/make_dev_ssd.sh:load_shflags || exit 1 /usr/bin/make_dev_firmware.sh:load_shflags || exit 1
Edited by Carl Chave@Cogitri @mps should I just close this merge request? I've already met my own needs with a local package and don't anticipate much if any future use, so I'm not really bothered, just thought I would submit the package and point out the script issues with vboot-utils while I was working on it and it was fresh on my mind. Let me know, thanks.