commit:     c9a1b3bb5c4c44afaa7a093a62875251bc92dde2
Author:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
AuthorDate: Mon Mar  8 00:31:07 2021 +0000
Commit:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
CommitDate: Mon Mar  8 00:31:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=c9a1b3bb

Update oidc-agent

Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com>

 net-misc/oidc-agent/Manifest                       |  8 +--
 .../files/oidc-agent-4.0.2_install-perms.patch     | 61 +++++++++++++++++++++
 .../oidc-agent-4.0.2_makefile-toolchain-vars.patch | 38 +++++++++++++
 net-misc/oidc-agent/metadata.xml                   | 12 ++++-
 net-misc/oidc-agent/oidc-agent-3.3.5.ebuild        | 63 ----------------------
 net-misc/oidc-agent/oidc-agent-4.0.2.ebuild        | 62 +++++++++++++++++++++
 net-misc/oidc-agent/oidc-agent-9999.ebuild         |  1 -
 7 files changed, 177 insertions(+), 68 deletions(-)

diff --git a/net-misc/oidc-agent/Manifest b/net-misc/oidc-agent/Manifest
index e049941..0467974 100644
--- a/net-misc/oidc-agent/Manifest
+++ b/net-misc/oidc-agent/Manifest
@@ -1,3 +1,5 @@
-EBUILD oidc-agent-3.3.5.ebuild 1395 BLAKE2B 
06139a6a9746be3feb298049648cded3376f52756cb5d4d590b4e30cb3e2d56500c93cf0eb124de71bae7ee2508d8bf1fc0f02269d1bfd69515f4daad7c6c955
 SHA512 
0877ca52bfbffda643bdc4aff3cfb74786baa76af998019866bcf26d8d4f7cc47625ce45cfd605e8cb101caffb80d1bbaef8f2005188175212f30f6d77968b17
-EBUILD oidc-agent-9999.ebuild 1395 BLAKE2B 
06139a6a9746be3feb298049648cded3376f52756cb5d4d590b4e30cb3e2d56500c93cf0eb124de71bae7ee2508d8bf1fc0f02269d1bfd69515f4daad7c6c955
 SHA512 
0877ca52bfbffda643bdc4aff3cfb74786baa76af998019866bcf26d8d4f7cc47625ce45cfd605e8cb101caffb80d1bbaef8f2005188175212f30f6d77968b17
-MISC metadata.xml 386 BLAKE2B 
7928a64e2da68cf0d9b29beb0b4cd4c72843cd52c537bbf1ac159b273162825258a062b8fcd6cd64ed23d316c212d325a49381d587b5e39ae8fb2b67686b1fba
 SHA512 
2bcc0d450bc459bd5204c81e7f8aec0075a72c1f0781ab4272067ae734f9380f8d55501f883827133d98859ac0a96039a94f48a5805aed558e03c023ff76f74b
+AUX oidc-agent-4.0.2_install-perms.patch 2036 BLAKE2B 
dcc2c95d1eb1b8fc124dc926c0a2eeec1f6bf34b53359927fb0234f18a6dafe31310032fbcdbe36a087ee62cffefa03863af0bd371eff40c2c23bbf317ff80a5
 SHA512 
f4cc766cb9fa3234ead79bb45fec515268107f527d6cba9c212bca71d4c0ee5b35d1a76470ab7e0810b9699e320c5806556cbc3cf21c5fc5c22b65218f3df363
+AUX oidc-agent-4.0.2_makefile-toolchain-vars.patch 1159 BLAKE2B 
9c8e4646cc4889b26cc5ed4ac987e8060731a6831b6c98ac37b65b75361aaa92e2dc34d82a6bf5c6f6b06a4c9c0d5c2f194c8c745d0f81adf858554b5d09ec2e
 SHA512 
a970647a64a743fe2abb5a4246cfe99c52b4394a1ed92ab1fa16859a2a6e6cf3cdee7c287178a450010a7f53c9c0c1975bb8b691df183084fc46aad7419202c7
+DIST oidc-agent-4.0.2.tar.gz 802872 BLAKE2B 
bbee872f0b029f4289a4805d1a5f8fe2fe2b8c297a918cf7821aec6bf4dbe634882425c888cb0e784778b56754af1c8b5a34d5282f84090cccf6315897ccb461
 SHA512 
fef440cd4b72055d8175f9f33c735235bb87bfca38b53bc4e049b1644f74f6a683d312297efa04cbacfe55190c5d6b588fa37475e5a55acff540909865389037
+EBUILD oidc-agent-4.0.2.ebuild 1497 BLAKE2B 
fc89a05e7e6b6d7b028011723bf33e1dbad28b34119d8f7e60fb1f9f02aa9966066a08a8a0be4c296df6a7f6a2219fb71c3ff99366173cebfc5480858a3983cb
 SHA512 
b609f27b02b0b8a23cbe032f608226355b861e593bc863bcbe6d2f0ba0516ccefe3e4a0f5b8fae589e816c8b0b60c69b5392fd10d6a951a1306a19cfd9174367
+MISC metadata.xml 794 BLAKE2B 
60d3d67d26bfe304f168d189d0670eef1b47212bdae51a2b4e11399ee0145fdf268f6dff658a94247a2c710b548d0a017d9a62fb7be5282b4b5b03f2f733dd99
 SHA512 
f09c4fbdd4f514dd6ce9f8aa9f93db06f1461ed49060be589d4b01a7e9db49255ceb39e3f984f1bf6e58ff152d8c295cee397568c85ff0e872dbdece4ba78bfe

diff --git a/net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch 
b/net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch
new file mode 100644
index 0000000..9ad3dc3
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch
@@ -0,0 +1,61 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2020-12-09 13:01:09.000000000 +0000
++++ b/Makefile 2021-03-08 00:00:46.199922804 +0000
+@@ -411,19 +411,19 @@
+ 
+ ## Man pages
+ $(MAN_PATH)/man1/$(AGENT).1: $(MANDIR)/$(AGENT).1 $(MAN_PATH)/man1
+-      @install $< $@
++      @install -m 644 $< $@
+ $(AGENTSERVER_MAN_PATH)/man1/$(AGENTSERVER).1: $(MANDIR)/$(AGENTSERVER).1 
$(AGENTSERVER_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 $< $@
+ $(PROMPT_MAN_PATH)/man1/$(PROMPT).1: $(MANDIR)/$(PROMPT).1 
$(PROMPT_MAN_PATH)/man1
+-      @install $< $@
++      @install -m 644 $< $@
+ 
+ 
+ ## Lib
+@@ -437,24 +437,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.0.2_makefile-toolchain-vars.patch 
b/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch
new file mode 100644
index 0000000..bcdeb01
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch
@@ -0,0 +1,38 @@
+diff -Naur a/Makefile b/Makefile
+--- a/Makefile 2020-12-09 13:01:09.000000000 +0000
++++ b/Makefile 2021-03-07 23:36:19.718141799 +0000
+@@ -74,9 +74,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)
+@@ -87,11 +87,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
+@@ -112,7 +112,7 @@
+ ifdef MAC_OS
+ CLIENT_LFLAGS = -L$(APILIB) -largp -loidc-agent.$(LIBVERSION) -lsodium
+ else
+-CLIENT_LFLAGS = -L$(APILIB) -l:$(SHARED_LIB_NAME_FULL) -lsodium -lseccomp
++CLIENT_LFLAGS = $(LDFLAGS) -L$(APILIB) -l:$(SHARED_LIB_NAME_FULL) -lsodium 
-lseccomp
+ ifndef NODPKG
+       CLIENT_LFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+ endif

diff --git a/net-misc/oidc-agent/metadata.xml b/net-misc/oidc-agent/metadata.xml
index 989d5e5..7540f7b 100644
--- a/net-misc/oidc-agent/metadata.xml
+++ b/net-misc/oidc-agent/metadata.xml
@@ -4,6 +4,16 @@
        <maintainer type="person">
                <email>[email protected]</email>
                <name>Samuel Bernardo</name>
-               <description>A set of tools to manage OpenID Connect tokens and 
make them easily usable from the command line</description>
        </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.5.ebuild 
b/net-misc/oidc-agent/oidc-agent-3.3.5.ebuild
deleted file mode 100644
index 96f1f14..0000000
--- a/net-misc/oidc-agent/oidc-agent-3.3.5.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=7
-
-inherit eutils git-r3
-
-DESCRIPTION="A set of tools to manage OpenID Connect tokens and make them 
easily usable from the command line"
-HOMEPAGE="https://github.com/indigo-dc/oidc-agent";
-RTAG="_so"
-if [[ ${PV} == *9999* ]];then
-       EGIT_REPO_URI="https://github.com/indigo-dc/oidc-agent";
-       KEYWORDS=""
-       #EGIT_SUBMODULES=( '*' )
-       EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
-else
-       EGIT_REPO_URI="https://github.com/LIP-Computing/oidc-agent";
-       EGIT_BRANCH="v${PV}${RTAG}"
-       #EGIT_SUBMODULES=( '*' )
-       EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
-       KEYWORDS="~x86 ~amd64"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-IUSE=""
-
-DEPEND="sys-apps/help2man
-       "
-RDEPEND="${DEPEND}
-       net-libs/libmicrohttpd
-       sys-libs/libseccomp
-       app-crypt/libsecret
-       dev-libs/libsodium
-       net-misc/curl[openssl]
-       "
-
-PATCHES=( )
-
-if [[ ${PV} != *9999* ]];then
-       src_prepare(){
-               if [ -e "${FILESDIR}/${PV}/*.patch" ]; then
-                       EPATCH_OPTS="-p0" epatch "${FILESDIR}/${PV}/*.patch"
-               fi
-               if [ ! -z ${PATCHES} ]; then
-                       epatch ${PATCHES}
-               fi
-               eapply_user
-               default
-       }
-fi
-
-src_compile(){
-       emake -j1 PREFIX="${D}" || die "Failed at compile phase"
-}
-
-src_install(){
-       emake install_lib PREFIX="${D}" || die "Failed in install_lib target"
-       emake install PREFIX="${D}" || die "Failed in install_lib target"
-       insinto usr/share/licenses/${PN}
-       doins LICENSE
-}

diff --git a/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild 
b/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild
new file mode 100644
index 0000000..0887182
--- /dev/null
+++ b/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic 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"
+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}-${PV}_install-perms.patch
+       "${FILESDIR}"/${PN}-${PV}_makefile-toolchain-vars.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
+
+       # 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
+
+       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
+}

diff --git a/net-misc/oidc-agent/oidc-agent-9999.ebuild 
b/net-misc/oidc-agent/oidc-agent-9999.ebuild
deleted file mode 120000
index ba1fd6e..0000000
--- a/net-misc/oidc-agent/oidc-agent-9999.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-oidc-agent-3.3.5.ebuild
\ No newline at end of file

Reply via email to