indigo-dc / oidc-agent

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

Possible bug in the AlmaLinux 9 package #579

Closed daknuett closed 1 month ago

daknuett commented 2 months ago

I am currently building a docker image containing oidc-agent deriving from AlmaLinux 9:

From almalinux:9

RUN dnf update -y
RUN dnf install epel-release wget -y

RUN (cd /etc/yum.repos.d && wget https://repo.data.kit.edu//data-kit-edu-almalinux9.repo)

RUN dnf install oidc-agent -y

RUN cat /usr/bin/oidc-agent-service | sed "s/\/usr\/bin\/bin\/oidc-agent/\/usr\/bin\/oidc-agent/g" > /usr/bin/oidc-agent-service

ENTRYPOINT /bin/bash

Note the patch that changes /usr/bin/bin/oidc-agent to /usr/bin/oidc-agent. If it is removed, oidc-agent-service is broken.

I could not find this bug in the repository, but http://repo.data.kit.edu/ does not provide a way to contact the maintainers. This is why I opened an issue here.

marcvs commented 2 months ago

Many thanks. You found the right place.

/usr/bin/bin/ is an older bug that I thought I fixed, but it went deep into rpm packaging. How urgent is this for you?

daknuett commented 2 months ago

I have the fix above that should be compatible with newer versions of oidc-agent. Therefore, I consider this to be very low priority for me.

marcvs commented 2 months ago

Hi There, I've re-checked all packages on repo.data.kit.edu but I cannot find any one that still contains a "usr/bin/bin" path. Could you re-check, and/or tell me the package name and version that has that "usr/bin/bin" path?

Best, Marcus.

daknuett commented 2 months ago

I just re-built the container to verify the issue persists.

$  dnf list --installed oidc*
Installed Packages
oidc-agent.x86_64                       5.1.0-1.el9                @repo-data-kit-edu
oidc-agent-cli.x86_64                   5.1.0-1.el9                @repo-data-kit-edu
oidc-agent-desktop.x86_64               5.1.0-1.el9                @repo-data-kit-edu

$  cat /usr/bin/oidc-agent-service | grep  "bin/bin" -n
56:OIDC_AGENT="${OIDC_AGENT:-/usr/bin/bin/oidc-agent}"
zachmann commented 1 month ago

This should be fixed now, can you please try again the package from prerel to verify that.

daknuett commented 1 month ago

I can confirm that the bug is gone after building using docker-compose build --no-cache

Thank you for your efforts!

marcvs commented 1 month ago

Thanks!