summaryrefslogtreecommitdiff
path: root/net-misc/oidc-agent
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/oidc-agent')
-rw-r--r--net-misc/oidc-agent/Manifest7
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-3.3.1_desktop-category.patch9
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-3.3.1_install-perms.patch58
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch30
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch51
-rw-r--r--net-misc/oidc-agent/metadata.xml19
-rw-r--r--net-misc/oidc-agent/oidc-agent-3.3.1.ebuild59
7 files changed, 233 insertions, 0 deletions
diff --git a/net-misc/oidc-agent/Manifest b/net-misc/oidc-agent/Manifest
new file mode 100644
index 000000000000..21f6cac5c3a1
--- /dev/null
+++ b/net-misc/oidc-agent/Manifest
@@ -0,0 +1,7 @@
+AUX oidc-agent-3.3.1_desktop-category.patch 270 BLAKE2B ab841626749f19ecfb6f27d79224a2954633e623f306d66698d6f2d9a53047a29411c12bf572d76e273315a8d99b0f2b664604e6b0aa60efe43f74ff68261d60 SHA512 249d1a50da20e4bc37eb1c8d894bd87dc7f165b85af340ee862c72a926db521819796540fe95bb58c8494c2c8bc13ffd1c8a864ec455b81f878e9cc079872cdb
+AUX oidc-agent-3.3.1_install-perms.patch 1773 BLAKE2B 8fad809127230af52849da4d496cb71a26efbd8529c67c631eeb153472c60f83a96d46e12bd263d3582c8a5c4f4bbd9841a37b3d5e750f7b24c5a205d8b6aa63 SHA512 94631b5c13d9d41dd9377740e4559f65175e6f6438d2cd108a7d3e445005443791b18cd2926e2e925a4774e6d51d1288f665461c12cc390ee60300c192972d3b
+AUX oidc-agent-3.3.1_makefile-toolchain-vars.patch 722 BLAKE2B b2e00b8b5ef2e70df4878228bc5e690e764052cb34bd8d0db74fc34374e7da4a2924ea3b1d0e422204da2e27a0bbe0baf3b8f1ff683f9b1be2df87ec2efbfc28 SHA512 04975fa76b56b998bdaf9dd1f9f2586a3df5690a318cd7741f3c542f2d9b5dc675e446770de53fb36cce0348d8f57d07618375384dcf11b8712a0608e48c3818
+AUX oidc-agent-3.3.1_test-suite-buffer-overflows.patch 1526 BLAKE2B ec623853da106f60a58814181c80786bea8ec8c02bafbcf7d1ac840723ddbf77aaf810ea5b06a62aaa4268aafd3c6c5a821d25eeb656e66393012c6b338afa18 SHA512 a9f4f50eaff99e077ac3cd1290ba45e59f6a538694919f87b3c2467b498a95fac76b84f875f92d9575516d5581cd2dfbcc9602c978ac2fd591d8dc8aabb7499f
+DIST oidc-agent-3.3.1.tar.gz 764721 BLAKE2B eea09b3b140ca81be0f3dc8f200120287682ddb328275be35bd736249b72eabb40c87ebd168e51c992ccd4b4a02138e17d3e20f3cebfb4d42bde01351aacead1 SHA512 75428bb52c0cf43256fddd3b33895d7c882ced367543763c68a385448dbe29805ee1fc035f3727e743a607ed4af851ae5db24b40cc6801fc31e45b6fec16bd66
+EBUILD oidc-agent-3.3.1.ebuild 1407 BLAKE2B e2cc4ea9c139189da68f908ed87209cb34458cbe188c5acaab5a0de8c4d3def90118ad96fb3438a52abdfc61da98ea248219f943cb8d1702593077b7d3e39a8c SHA512 35ffd6d176f5a6c9c9471e5c226cfe107edfd17b8a64cc6a7f7f9875b2e8c050c8215c1471e41feba49078f560d77f311fe84b654c8ba995f9d19384098bfca5
+MISC metadata.xml 779 BLAKE2B ef7a040559363a8012380b3f8568f963a612078c2d5e5129f54db724d414d6c7864e79e480eba5574fd36847caa13a09a7ac7013f5ceb406d83e3be5ebdb47e9 SHA512 f9465b4e88418ec276071683b5abbe8f7601e54daf0cb74da2d24d142e2307b1bb994ee4191eee48ed1b3fef724ad49b548cef12cc4c77088c2f2d07e1b8a776
diff --git a/net-misc/oidc-agent/files/oidc-agent-3.3.1_desktop-category.patch b/net-misc/oidc-agent/files/oidc-agent-3.3.1_desktop-category.patch
new file mode 100644
index 000000000000..49bfcfdb70b3
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-3.3.1_desktop-category.patch
@@ -0,0 +1,9 @@
+--- a/config/scheme_handler/oidc-gen.desktop
++++ b/config/scheme_handler/oidc-gen.desktop
+@@ -5,5 +5,5 @@
+ Icon=utilities-terminal
+ Terminal=true
+ Type=Application
+-Categories=Application;Network;
++Categories=Network;
+ MimeType=x-scheme-handler/edu.kit.data.oidc-agent;
diff --git a/net-misc/oidc-agent/files/oidc-agent-3.3.1_install-perms.patch b/net-misc/oidc-agent/files/oidc-agent-3.3.1_install-perms.patch
new file mode 100644
index 000000000000..1992ee0ef31f
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-3.3.1_install-perms.patch
@@ -0,0 +1,58 @@
+--- a/Makefile
++++ b/Makefile
+@@ -316,7 +316,7 @@
+
+ ## Bash completion
+ $(BASH_COMPLETION_PATH)/$(AGENT): $(CONFDIR)/bash-completion/oidc-agent $(BASH_COMPLETION_PATH)
+- @install -m 744 $< $@
++ @install -m 644 $< $@
+
+ $(BASH_COMPLETION_PATH)/$(GEN): $(BASH_COMPLETION_PATH)
+ @ln -s $(AGENT) $@
+@@ -332,15 +332,15 @@
+
+ ## 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/$(KEYCHAIN).1: $(MANDIR)/$(KEYCHAIN).1 $(MAN_PATH)/man1
+- @install $< $@
++ @install -m 644 $< $@
+
+
+ ## Lib
+@@ -354,20 +354,20 @@
+ @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 $< $@
+
+ ## 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-3.3.1_makefile-toolchain-vars.patch b/net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch
new file mode 100644
index 000000000000..0cdf44fba8c2
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch
@@ -0,0 +1,30 @@
+1. Support user-provided values of CC, CFLAGS and LDFLAGS
+2. Do not force the use of a static version of libsodium
+
+--- a/Makefile
++++ b/Makefile
+@@ -54,20 +54,20 @@
+ endif
+
+ # Compiler options
+-CC = gcc
++CC := $(CC)
+ # compiling flags here
+-CFLAGS = -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra
++CFLAGS := $(CFLAGS) -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra
+ ifndef MAC_OS
+ CFLAGS += $(shell pkg-config --cflags libsecret-1)
+ endif
+ TEST_CFLAGS = $(CFLAGS) -I.
+
+ # Linker options
+-LINKER = gcc
++LINKER := $(CC)
+ ifdef MAC_OS
+ LFLAGS = -lsodium -largp
+ else
+-LFLAGS = -l:libsodium.a -lseccomp
++LFLAGS := $(LDFLAGS) -lsodium -lseccomp
+ endif
+ ifdef HAS_CJSON
+ LFLAGS += -lcjson
diff --git a/net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch b/net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch
new file mode 100644
index 000000000000..b43f20c06860
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch
@@ -0,0 +1,51 @@
+--- a/test/src/utils/stringUtils/tc_strelim.c
++++ b/test/src/utils/stringUtils/tc_strelim.c
+@@ -7,7 +7,7 @@
+
+ START_TEST(test_noFound) {
+ const char* const str = "abcdeffedcba";
+- char s[strlen(str)];
++ char s[strlen(str) + 1];
+ strcpy(s, str);
+ ck_assert_str_eq(strelim(s, 'x'), str);
+ }
+--- a/test/src/utils/stringUtils/tc_strelimIfAfter.c
++++ b/test/src/utils/stringUtils/tc_strelimIfAfter.c
+@@ -7,7 +7,7 @@
+
+ START_TEST(test_noElim) {
+ const char* const str = "abcdeffedcba";
+- char s[strlen(str)];
++ char s[strlen(str) + 1];
+ strcpy(s, str);
+ ck_assert_str_eq(strelimIfAfter(s, 'b', 'x'), str);
+ }
+@@ -15,7 +15,7 @@
+
+ START_TEST(test_noFound) {
+ const char* const str = "abcdeffedcba";
+- char s[strlen(str)];
++ char s[strlen(str) + 1];
+ strcpy(s, str);
+ ck_assert_str_eq(strelimIfAfter(s, 'x', 'a'), str);
+ }
+--- a/test/src/utils/stringUtils/tc_strelimIfFollowed.c
++++ b/test/src/utils/stringUtils/tc_strelimIfFollowed.c
+@@ -7,7 +7,7 @@
+
+ START_TEST(test_noElim) {
+ const char* const str = "abcdeffedcba";
+- char s[strlen(str)];
++ char s[strlen(str) + 1];
+ strcpy(s, str);
+ ck_assert_str_eq(strelimIfFollowed(s, 'b', 'x'), str);
+ }
+@@ -15,7 +15,7 @@
+
+ START_TEST(test_noFound) {
+ const char* const str = "abcdeffedcba";
+- char s[strlen(str)];
++ char s[strlen(str) + 1];
+ strcpy(s, str);
+ ck_assert_str_eq(strelimIfFollowed(s, 'x', 'a'), str);
+ }
diff --git a/net-misc/oidc-agent/metadata.xml b/net-misc/oidc-agent/metadata.xml
new file mode 100644
index 000000000000..befedd639221
--- /dev/null
+++ b/net-misc/oidc-agent/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marecki@gentoo.org</email>
+ <name>Marek Szuba</name>
+ </maintainer>
+ <longdescription>
+ oidc-agent is a set of tools to manage OpenID Connect tokens and make them
+ easily usable from the command line. We followed the ssh-agent design, so users
+ can handle OIDC tokens in a similar way as they do with ssh keys.
+ oidc-agent is usually started in the beginning of an X-session or a login
+ session. Through use of environment variables the agent can be located and
+ used to handle OIDC tokens.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">indigo-dc/oidc-agent</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/oidc-agent/oidc-agent-3.3.1.ebuild b/net-misc/oidc-agent/oidc-agent-3.3.1.ebuild
new file mode 100644
index 000000000000..12161b8e9044
--- /dev/null
+++ b/net-misc/oidc-agent/oidc-agent-3.3.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit xdg-utils
+
+DESCRIPTION="oidc-agent 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"
+IUSE="test"
+
+DEPEND="app-crypt/libsecret
+ dev-libs/libsodium
+ net-libs/libmicrohttpd"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-libs/check )"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.3.1_desktop-category.patch
+ "${FILESDIR}"/${PN}-3.3.1_install-perms.patch
+ "${FILESDIR}"/${PN}-3.3.1_makefile-toolchain-vars.patch
+ "${FILESDIR}"/${PN}-3.3.1_test-suite-buffer-overflows.patch
+)
+
+src_compile() {
+ # Parallel building 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
+}
+
+pkg_postinst() {
+ xdg_desktop_database_update
+
+ 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
+}
+
+pkg_postrm() {
+ xdg_desktop_database_update
+}