diff options
Diffstat (limited to 'net-misc/oidc-agent')
4 files changed, 198 insertions, 0 deletions
diff --git a/net-misc/oidc-agent/Manifest b/net-misc/oidc-agent/Manifest index b43cff54f8b6..3b481e656bc9 100644 --- a/net-misc/oidc-agent/Manifest +++ b/net-misc/oidc-agent/Manifest @@ -1,6 +1,10 @@ AUX oidc-agent-4.0.2_install-perms.patch 1931 BLAKE2B 9061a41dc805f98c4813f967f2e0280ed519c143551c9232bd1a3786f6e4569407744d3821845b5245751fb6bd91462d45fa6f12dcae92fcac1abd6fb5bf2f51 SHA512 f924f3e3bbcb0e427036fb2c13e9272641b340d829d19389c072faef5da6381f1470858033c78bc356bbba75b622bc0283cc4e1fba3255f80788b2d09fab5106 AUX oidc-agent-4.0.2_makefile-liblist-automagic.patch 448 BLAKE2B df7716192364c71619af14cdd88323a2b6ac7b382d76326aacafa0814dc141416fdda87fc3a11eae8c333e0ac4fcad4386d2e902e13a300a12bd5cbe25df11d7 SHA512 b1145a26fe837a06291067c62bb939b76993e10194a0fc155cfc892677e4f432e0744410dee23eaf14f3a04a9a0c5d8629abaa7c40e3e1abe28ccb2868a41ceb AUX oidc-agent-4.0.2_makefile-toolchain-vars.patch 1214 BLAKE2B 2e2c78973049160a9b6210d2180bb851c11a31ce90c8c1af5f05b0d86cd7cdce572c564c4117ec23f286c72a4d701b52ec815f6f30e68c58353fe5394bd210e6 SHA512 22c561c057be1de9ba1747a0234225954ec953f2bdecb0cc05149891e6fc43fede14808dbf59e9e27e5e5e8041d22b16ba4d46e366bd5b96a2b567b2d26a0f8d +AUX oidc-agent-4.1.0_install-perms.patch 1911 BLAKE2B a74915c1ea19c4d8fcfc09b30c60259e361776c458d0f52885ba4399f0599a8094caced14f59cd024331a4d09efe9298061b914faf4e74a700975e2afb7890df SHA512 9390b4ee8a5baccd8de0f5b22c18ea6d2c0a3c83e70b3e3f44af87cf563ec332ce40c6f5cb4f0f7065cb6b17317442daa22de125139823b4b99428c0624fa08d +AUX oidc-agent-4.1.0_makefile-toolchain-vars.patch 1439 BLAKE2B 9e3477c1eb3303cfbf66f99f8a3fb71966c78c2af2922219efe6684c2fc572fafd8c5d9e93c70cc05aabeed3a53d97a592f3e22d9a0aa6931ce436946fc194c7 SHA512 e96d88784bc55095308fc40da8c969da1068ec6c2ca62ed34fa455785c28f1e4373c49a8023f2ca77fa64cacdb27481972eae014e66315b30c9de2a76651749f DIST oidc-agent-4.0.2.tar.gz 802872 BLAKE2B bbee872f0b029f4289a4805d1a5f8fe2fe2b8c297a918cf7821aec6bf4dbe634882425c888cb0e784778b56754af1c8b5a34d5282f84090cccf6315897ccb461 SHA512 fef440cd4b72055d8175f9f33c735235bb87bfca38b53bc4e049b1644f74f6a683d312297efa04cbacfe55190c5d6b588fa37475e5a55acff540909865389037 +DIST oidc-agent-4.1.0.tar.gz 800972 BLAKE2B b3dd30e886dea9bf1731fc770047904f6f8e1a67b723fba496e69c55c7d5d1e18bbfd3f0f3ba4c1a42fe3d8cfadc79c2bd64183afc2eb9cdd6ee1446b62a2486 SHA512 81e5dbac389da342db788aa65f8c10d97f1179322259de2dc379cee38e2f6ac1317ef48ee4c91cbabe363ae54cc9596ddf260591526c7524c78ba02b5d3961cc EBUILD oidc-agent-4.0.2.ebuild 2130 BLAKE2B 32d3eb8dfca12421f40b086dd79cce36ccf3c2b45c003a4642369245e28270cf1df8d9e7b8f870d6c606e11a19a59d1f0d78e111cc6f9e458289808ebbe6f314 SHA512 5915027ae1d15ee1394af98780133b18a0b20a0c9a6f372a138c4aea1083596d807b3426c5b42932c5ecfbd0a35f0b6cf4ebc9f8c15cf1d6a666654ab572f2b4 +EBUILD oidc-agent-4.1.0.ebuild 2134 BLAKE2B 7fa9b7d1a62c7ca9ac148895f7a98e5ae0fa1e788c858ac5f65e30e434ef7f77affcf16626298c003f5c56984907def89904b4cc92c819afc547b0952327e1f5 SHA512 e26b7ce146a929498fcae4a75d95e5ac12277cf665ea3ccf0ecfc453a9ec31f7f4811ba4faf8defa4e704e60cdc25f8be54af5a59eaa9b09b2aac43187ff9226 MISC metadata.xml 779 BLAKE2B ef7a040559363a8012380b3f8568f963a612078c2d5e5129f54db724d414d6c7864e79e480eba5574fd36847caa13a09a7ac7013f5ceb406d83e3be5ebdb47e9 SHA512 f9465b4e88418ec276071683b5abbe8f7601e54daf0cb74da2d24d142e2307b1bb994ee4191eee48ed1b3fef724ad49b548cef12cc4c77088c2f2d07e1b8a776 diff --git a/net-misc/oidc-agent/files/oidc-agent-4.1.0_install-perms.patch b/net-misc/oidc-agent/files/oidc-agent-4.1.0_install-perms.patch new file mode 100644 index 000000000000..e0ee26cfa6f2 --- /dev/null +++ b/net-misc/oidc-agent/files/oidc-agent-4.1.0_install-perms.patch @@ -0,0 +1,60 @@ +--- a/Makefile ++++ b/Makefile +@@ -426,19 +426,19 @@ + + ## Man pages + $(MAN_PATH)/man1/$(AGENT).1: $(MANDIR)/$(AGENT).1 $(MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + $(MAN_PATH)/man1/$(GEN).1: $(MANDIR)/$(GEN).1 $(MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + $(MAN_PATH)/man1/$(ADD).1: $(MANDIR)/$(ADD).1 $(MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + $(MAN_PATH)/man1/$(CLIENT).1: $(MANDIR)/$(CLIENT).1 $(MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + $(MAN_PATH)/man1/$(AGENT_SERVICE).1: $(MANDIR)/$(AGENT_SERVICE).1 $(MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + $(MAN_PATH)/man1/$(KEYCHAIN).1: $(MANDIR)/$(KEYCHAIN).1 $(MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + $(PROMPT_MAN_PATH)/man1/$(PROMPT).1: $(MANDIR)/$(PROMPT).1 $(PROMPT_MAN_PATH)/man1 +- @install $< $@ ++ @install -m 644 $< $@ + + + ## Lib +@@ -452,24 +452,24 @@ + @ln -sf $(SHARED_LIB_NAME_SO) $@ + + $(INCLUDE_PATH)/oidc-agent/api.h: $(SRCDIR)/$(CLIENT)/api.h $(INCLUDE_PATH)/oidc-agent +- @install $< $@ ++ @install -m 644 $< $@ + + $(INCLUDE_PATH)/oidc-agent/ipc_values.h: $(SRCDIR)/defines/ipc_values.h $(INCLUDE_PATH)/oidc-agent +- @install $< $@ ++ @install -m 644 $< $@ + + $(INCLUDE_PATH)/oidc-agent/oidc_error.h: $(SRCDIR)/utils/oidc_error.h $(INCLUDE_PATH)/oidc-agent +- @install $< $@ ++ @install -m 644 $< $@ + + $(LIBDEV_PATH)/liboidc-agent.a: $(APILIB)/liboidc-agent.a $(LIBDEV_PATH) +- @install $< $@ ++ @install -m 644 $< $@ + + $(INCLUDE_PATH)/oidc-agent/export_symbols.h: $(SRCDIR)/$(CLIENT)/export_symbols.h $(INCLUDE_PATH)/oidc-agent +- @install $< $@ ++ @install -m 644 $< $@ + + + ## scheme handler + $(DESKTOP_APPLICATION_PATH)/oidc-gen.desktop: $(CONFDIR)/scheme_handler/oidc-gen.desktop +- @install -D $< $@ ++ @install -m 644 -D $< $@ + @echo "Exec=x-terminal-emulator -e bash -c \"$(BIN_AFTER_INST_PATH)/bin/$(GEN) --codeExchange=%u; exec bash\"" >> $@ + + ## Xsession diff --git a/net-misc/oidc-agent/files/oidc-agent-4.1.0_makefile-toolchain-vars.patch b/net-misc/oidc-agent/files/oidc-agent-4.1.0_makefile-toolchain-vars.patch new file mode 100644 index 000000000000..2f42a21afbd6 --- /dev/null +++ b/net-misc/oidc-agent/files/oidc-agent-4.1.0_makefile-toolchain-vars.patch @@ -0,0 +1,52 @@ +--- a/Makefile ++++ b/Makefile +@@ -89,9 +89,9 @@ + endif + + # Compiler options +-CC = gcc ++CC := $(CC) + # compiling flags here +-CFLAGS = -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra -fno-common ++CFLAGS := $(CFLAGS) -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra -fno-common + ifndef MAC_OS + ifndef NODPKG + CFLAGS +=$(shell dpkg-buildflags --get CPPFLAGS) +@@ -102,11 +102,11 @@ + TEST_CFLAGS = $(CFLAGS) -I. + + # Linker options +-LINKER = gcc ++LINKER := $(CC) + ifdef MAC_OS + LFLAGS = $(LSODIUM) $(LARGP) + else +-LFLAGS = $(LSODIUM) $(LSECCOMP) -fno-common ++LFLAGS := $(LDFLAGS) $(LSODIUM) $(LSECCOMP) -fno-common + ifndef NODPKG + LFLAGS +=$(shell dpkg-buildflags --get LDFLAGS) + endif +@@ -117,7 +117,7 @@ + ifeq ($(USE_LIST_SO),1) + LFLAGS += $(LLIST) + endif +-AGENT_LFLAGS = $(LCURL) $(LMICROHTTPD) $(LFLAGS) ++AGENT_LFLAGS := $(LDFLAGS) $(LCURL) $(LMICROHTTPD) $(LFLAGS) + ifndef MAC_OS + AGENT_LFLAGS += $(LSECRET) $(LGLIB) + endif +@@ -126,12 +126,12 @@ + ifdef MAC_OS + CLIENT_LFLAGS = -L$(APILIB) $(LARGP) $(LAGENT) $(LSODIUM) + else +-CLIENT_LFLAGS = -L$(APILIB) $(LAGENT) $(LSODIUM) $(LSECCOMP) ++CLIENT_LFLAGS := $(LDFLAGS) -L$(APILIB) $(LAGENT) $(LSODIUM) $(LSECCOMP) + ifndef NODPKG + CLIENT_LFLAGS += $(shell dpkg-buildflags --get LDFLAGS) + endif + endif +-LIB_LFLAGS = -lc $(LSODIUM) ++LIB_LFLAGS := $(LDFLAGS) -lc $(LSODIUM) + ifndef MAC_OS + ifndef NODPKG + LIB_LFLAGS += $(shell dpkg-buildflags --get LDFLAGS) diff --git a/net-misc/oidc-agent/oidc-agent-4.1.0.ebuild b/net-misc/oidc-agent/oidc-agent-4.1.0.ebuild new file mode 100644 index 000000000000..e433d2b45353 --- /dev/null +++ b/net-misc/oidc-agent/oidc-agent-4.1.0.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit xdg-utils + +DESCRIPTION="Agent and tools for managing OpenID Connect tokens on the command line" +HOMEPAGE="https://github.com/indigo-dc/oidc-agent" +SRC_URI="https://github.com/indigo-dc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~riscv" +IUSE="test" + +DEPEND="app-crypt/libsecret + dev-libs/libsodium + net-libs/libmicrohttpd + sys-libs/libseccomp" +RDEPEND="${DEPEND}" +BDEPEND="test? ( dev-libs/check )" + +RESTRICT="!test? ( test )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.0.2_makefile-liblist-automagic.patch + "${FILESDIR}"/${PN}-4.1.0_install-perms.patch + "${FILESDIR}"/${PN}-4.1.0_makefile-toolchain-vars.patch +) + +src_prepare() { + default + sed -i -e 's|^\(\s\+\)@|\1|' Makefile || die "Failed to increase verbosity in Makefile" +} + +#src_compile() { + # As of 4.0.2 parallel building still doesn't work +# emake -j1 +#} + +src_install() { + emake \ + PREFIX="${ED}" \ + BIN_AFTER_INST_PATH="/usr" \ + INCLUDE_PATH="${ED}"/usr/include \ + LIB_PATH="${ED}"/usr/$(get_libdir) \ + install + + # This file is not compatible with Gentoo and in any case, we generally + # let the users load such agents themselves. + rm -f "${ED}"/etc/X11/Xsession.d/91${PN} +} + +pkg_postinst() { + xdg_desktop_database_update + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog + elog "You should use oidc-gen to initially generate your account configuration" + elog "before it can be loaded into oidc-agent using oidc-add. For details, please" + elog "consult the man page of oidc-gen, or full documentation at" + elog " https://indigo-dc.gitbooks.io/oidc-agent/" + elog + else + local new_major_ver old_ver + new_major_ver=$(ver_cut 1) + for old_ver in ${REPLACING_VERSIONS}; do + if [[ $(ver_cut 1 ${old_ver}) != ${new_major_ver} ]]; then + ewarn + ewarn "You are upgrading from a different major version. Please restart any running instances of ${PN}" + ewarn "to make sure they are compatible with the updated clients." + ewarn + break + fi + done + fi +} + +pkg_postrm() { + xdg_desktop_database_update +} |