summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2021-07-02 16:21:16 +0100
committerMarek Szuba <marecki@gentoo.org>2021-07-02 16:25:25 +0100
commit691dff29ae86bfd68d1a817676c908a2dcba138f (patch)
tree2233980c3d5203b931411c2c87e45509b8b09a8b /net-misc
parentapp-admin/hcloud: version bump to 1.25.1 - remove old (diff)
downloadgentoo-691dff29ae86bfd68d1a817676c908a2dcba138f.tar.gz
gentoo-691dff29ae86bfd68d1a817676c908a2dcba138f.tar.bz2
gentoo-691dff29ae86bfd68d1a817676c908a2dcba138f.zip
net-misc/oidc-agent: add 4.1.0
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/oidc-agent/Manifest1
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-4.1.0_install-perms.patch60
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-4.1.0_makefile-toolchain-vars.patch52
-rw-r--r--net-misc/oidc-agent/oidc-agent-4.1.0.ebuild82
4 files changed, 195 insertions, 0 deletions
diff --git a/net-misc/oidc-agent/Manifest b/net-misc/oidc-agent/Manifest
index f32866fb26c7..b05c1bd86622 100644
--- a/net-misc/oidc-agent/Manifest
+++ b/net-misc/oidc-agent/Manifest
@@ -1 +1,2 @@
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
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
+}