227.3. signon-plugin-oauth2-0.25
OAuth 1.0 and 2.0 authentication plugin for signond
| Version | 0.25, release 1 |
| Shelf | auth — Authentication, authorisation, accounts and directory services |
| Phase | 43_toolkits (Toolkits), 18 of 344 in build order |
| Licence | LGPL-2.1-only |
| Homepage | https://gitlab.com/accounts-sso/signon-plugin-oauth2 |
| Build time | 0.3 SBU |
| Installed size | 261.6 KiB in 5 files |
| Recipe | ports/core/auth/signon-plugin-oauth2/kpkgbuild |
About
signon-plugin-oauth2 is the OAuth 1.0a and OAuth 2.0 authentication plugin for signond. signond loads liboauth2plugin.so from /usr/lib/signon when a client asks for the oauth2 method, and the plugin runs the browser authorisation, token exchange and token refresh. KDE’s kaccounts-providers set up their accounts through it.
Sources
signon-plugin-oauth2-0.25.tar.gz(40.1 KiB)
sha25648a5bb61bf74fca458c870c1a27eedfe058b20f016c19a72aad2f5b151516447
upstream: https://gitlab.com/accounts-sso/signon-plugin-oauth2/-/archive/VERSION_0.25/signon-plugin-oauth2-VERSION_0.25.tar.gz
archive copy: sources-1/auth--signon-plugin-oauth2-0.25.tar.gz
Dependencies
Depends on: pkgconf, qt6-qtbase, signond.
Required by (2): kaccounts-integration, kaccounts-providers.
Patches
build.sh applies these; kpkg applies nothing by itself.
qt6.patch— Build the OAuth plugin against Qt 6 and libsignon-qt6The 0.25 release links libsignon-qt5 whatever Qt builds it. This takes the pkg-config name from QT_MAJOR_VERSION, builds with C++17 and without -Werror, and ports the uses of QRegExp, qrand, QString::SplitBehavior, QList::toSet and string concatenation that Qt 6 removed or changed. It is the difference from the VERSION_0.25 tag to the head of upstream merge request !28 ("Add Qt6 support", commit fab69886), which Alpine's signon-plugin-oauth2 builds from, including the deprecation ports and the -Werror removal merged after the tag.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install signon-plugin-oauth2'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/auth/signon-plugin-oauth2.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/auth/signon-plugin-oauth2
echo '48a5bb61bf74fca458c870c1a27eedfe058b20f016c19a72aad2f5b151516447 signon-plugin-oauth2-0.25.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/signon-plugin-oauth2
SRC=$SRC_ROOT/signon-plugin-oauth2-0.25
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf signon-plugin-oauth2-0.25.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/qt6.patch"
qmake6 CONFIG+=release QMAKE_CFLAGS_RELEASE="$CFLAGS" QMAKE_CXXFLAGS_RELEASE="$CXXFLAGS" \
QMAKE_LFLAGS_RELEASE="$LDFLAGS" PREFIX=/usr LIBDIR=/usr/lib CONFIG+=nomake_tests
make
make INSTALL_ROOT=$PKG install
The switches, and why each is set:
CONFIG+=nomake_tests— upstream’s switch that drops thetestssubdirectory, whose test program would otherwise be built and installed.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/signon-plugin-oauth2, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf signon-plugin-oauth2-0.25-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/signon-plugin-oauth2, and runs the triggers its paths call for.
Contents
Installed directories: /usr/share/licenses/signon-plugin-oauth2.
Short descriptions
signon-oauth2plugin.pc |
Signon OAuth 2.0 plugin |