This is a Homebrew Tap for the GlobalPlatform C library and GPShell command line shell.
Please read also the manual of GPShell if you are interested in the command line
or use the installed man page with man gpshell under Unix like systems.
There are several script examples available. See the .txt files or look into the local file systems
under (/usr/ | /home/linuxbrew/.linuxbrew/) share/doc/gpshell1/.
Consult the API documentation if you are planning to use this as a library.
brew install kaoh/globalplatform/globalplatform
Or brew tap kaoh/globalplatform and then brew install globalplatform.
For Linux also look at the instructions at Homebrew on Linux
The Homebrew version of pcsc-lite is not a fully functional version. It is missing the USB drivers and is also not started as a system service.
The distribution's version of pcscd should be installed:
Ubuntu/Debian:
apt-get install pcscdFedora:
sudo dnf install ccid pcsc-lite
sudo systemctl enable pcscd
sudo systemctl start pcscdRedHat:
yum install pcsc-lite pcsc-lite-ccid pcsc-lite-libsArch Linux:
pacman -S ccid
systemctl enable pcsclite
systemctl start pcscliteConsult your distribution for any other steps, e.g., to enable pcsc-lite as a service if this was forgotten by the package maintainer and is not included here already.
If the version of pcsc-lite does not match the version of your system you might
get:
establish_context failed with error 0x8010001D (Service not available.)
In this case the Homebrew's version must be unlinked if there is no chance to upgrade your distribution's version. The background of this error is a change in the internal protocol version e.g. between versions 1.9.0 and 1.8.x.
To check the version compare the versions with:
sudo $(brew --prefix pcsc-lite)/sbin/pcscd --version
sudo pcscd --versionUnder Linux the Homebrew version of pcsc-lite must be unlinked:
brew remove --ignore-dependencies pcsc-liteNOTE: This will remove the version, in case other package are requiring it they will also fallback to the distribution's version. If pcsc-lite is reinstalled this step must be repeated if there still is an internal protocol version mismatch.
The upstream source tag is still set manually in the formula. Update the url ... tag: value in Formula/globalplatform.rb to the already existing tag from the kaoh/globalplatform repository and commit that change.
Example:
url "https://github.com/kaoh/globalplatform.git", tag: "2.4.2"If the Homebrew package should supersede an earlier package without changing the upstream source tag, use a Homebrew package revision when starting the workflow, e.g. 2.4.2_1.
The release workflow is run manually in GitHub Actions from a branch of this repository. It builds bottles on Linux and Apple Silicon macOS, validates source builds on Intel macOS, merges the bottle hashes into the formula, commits the updated formula, creates the tag and creates a GitHub release.
Open the release bottles workflow in GitHub Actions and start it with:
package_version:2.4.2for a normal release or2.4.2_1forrevision 1release_tag: optional GitHub tag/release name and bottleroot_urltag; defaults topackage_versionprerelease: keep the defaulttruefor the first run
The workflow validates that the base part of package_version matches the manually set upstream tag in Formula/globalplatform.rb. For example, package_version: 2.4.2_1 requires tag: "2.4.2" in the formula.
If you want to test bottling without changing the Homebrew package version, keep package_version at the real package version and use a different release_tag, e.g.:
package_version:2.4.2release_tag:2.4.2-b1prerelease:true
This creates a separate GitHub prerelease and bottle root_url while keeping the Homebrew package version at 2.4.2.
For this kind of bottling smoke test, run the workflow from a temporary branch. The workflow commits the resulting bottle root_url back into the branch it was started from.
After the workflow has completed successfully:
- Review the created GitHub release and the generated bottle assets.
- If everything is correct, edit the GitHub release and remove the pre-release flag.
There are GitHub runners for macOS and Linux that are building the bottles. The Intel macOS runners are kept for source-build validation only. Homebrew test-bot currently skips Intel Sequoia/Tahoe bottle creation when dependencies are not bottled on those exact platforms.
In case the compilation with brew test-bot gives errors in can be helpful to get an interactive shell where the
created build directory under /tmp is not deleted. Use the interactive mode in this case, analyze the error and try to fix the sources or build configuration.
brew install --verbose --build-bottle kaoh/globalplatform/globalplatform --interactive