indigo-dc / oidc-agent

oidc-agent for managing OpenID Connect tokens on the command line
MIT License
111 stars 30 forks source link

`oidc-agent` RPM does not depend on anything since version 5.2.0 #598

Open olifre opened 1 month ago

olifre commented 1 month ago

Not sure if this repo is the correct place, as the packaging branches are not mirrored to GitHub, but reporting here for now:

Starting from this commit: https://codebase.helmholtz.cloud/m-team/oidc/oidc-agent/-/commit/bf8da39475e49915bac9a014317dc194c559c7c4 it seems that the oidc-agent package itself has no Require on anything, see for example:

$ rpm -qp oidc-agent-5.2.1-1.el8.x86_64.rpm --requires                              
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

vs.

$ rpm -qp oidc-agent-5.1.0-1.el8.x86_64.rpm --requires                            
oidc-agent-desktop(x86-64) = 5.1.0-1.el8
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

(i.e. versions before 5.2.0 depended on the oidc-agent-desktop package).

Since the install instructions advice to install the oidc-agent package: https://indigo-dc.gitbook.io/oidc-agent/intro/install one of my collaborators was confused as on a RedHat-based distro, the intuitive approach matching the docs fails:

dnf install oidc-agent
eval `oidc-agent`
-bash: oidc-agent: command not found

Is this change on purpose (and documentation should be adapted), or is it a bug?

Panos512 commented 6 days ago

I'm not sure if that's related (if not, apologies, I will open a new issue) but I get similar issues after installing through YUM in an Alma linux 9 based docker image:

[root@bcd43357113b src]# oidc-agent
bash: oidc-agent: command not found
[root@bcd43357113b src]# yum list installed | grep oidc-agent
oidc-agent.x86_64                     5.2.2-1.el9                   @repo-data-kit-edu
[root@bcd43357113b src]# find / -name oidc-agent
/usr/share/licenses/oidc-agent
[root@bcd43357113b src]# ls -laht /usr/share/licenses/oidc-agent
LICENSE

It looks like the binary is not available.

For the shake of completion here is the relevant part of the dockerfile:

FROM gitlab-registry.cern.ch/linuxsupport/alma9-base

RUN cd /etc/yum.repos.d; curl -O https://repo.data.kit.edu//data-kit-edu-almalinux9.repo

RUN yum install epel-release -y

RUN yum upgrade -y \
    && yum clean all \
    && rm -rf /var/cache/yum

RUN yum -y install epel-release oidc-agent openssl python3-pip CERN-CA-certs s-nail
marcvs commented 6 days ago

Upps; Yes, it is related. oidc-agent is our metapackage, which depends on the actual binaries. I shall fix this soon.

The workaround is to install the dependent packages explicitly. Those are:

oidc-agent-cli oidc-agent-desktop oidc-agent-libs

The lib and lib-devel packages are currently being renamed:

from liboidc-agent5 liboidc-agent-devel

to

oidc-agent-libs oidc-agent-devel

to conform rpm package naming schemes better.

Panos512 commented 4 days ago

Thank you very much @marcvs ! I'll give it a shot :-)