1- %define downloads_version 1.7
1+ %define downloads_version 1.8
22
33Summary: Get OIDC bearer tokens by interacting with Hashicorp vault
44Name: htgettoken
5- Version: 1.17
5+ Version: 1.18
66Release: 1%{?dist }
77License: BSD
88Group: Applications/System
@@ -19,6 +19,7 @@ BuildRequires: python3-devel
1919# OpenSSL 1.1
2020BuildRequires: swig
2121BuildRequires: openssl-devel
22+ BuildRequires: krb5-devel
2223
2324# Needed by httokendecode
2425Requires: jq
@@ -40,28 +41,28 @@ htgettoken gets OIDC bearer tokens by interacting with Hashicorp vault
4041# starts out in htgettoken-downloads
4142
4243set -e
43- PYDIR= $PWD/.local
44+ PYVERS= "python3$(python3 -V|cut -d. -f2)"
45+ PYDIR= $PWD/$PYVERS/.local
4446PATH= $PYDIR/bin:$PATH
4547
4648# install in reverse order of their download (because dependency downloads
4749# come after requested packages)
48- PKGS= "$(tar tf %{SOURCE1 } |sed 's,^%{name }-downloads-[^/]*/,,'| grep -v "^\.local "| tac)"
50+ PKGS= "$(tar tf %{SOURCE1 } | grep "/$PYVERS/." | sed 's,^%{name }-downloads-[^/]*/,,'| grep -v "^$PYVERS/ \.local "| tac)"
4951# installing wheel separately first eliminates warnings about falling back
5052# to setup.py
51- WHEELPKG= "$(echo "$PKGS"|grep ^wheel)"
52- PKGS= "$(echo "$PKGS"|grep -v ^wheel|paste -sd ' ')"
53+ WHEELPKG= "$(echo "$PKGS"|grep ^$PYVERS/ wheel)"
54+ PKGS= "$(echo "$PKGS"|grep -v ^$PYVERS/ wheel|paste -sd ' ')"
5355# --no-build-isolation is needed for offline build of pyinstaller as per
5456# https://github.com/pyinstaller/pyinstaller/issues/4557
5557# python3 is explicitly invoked here so it comes from $PATH to test
5658# various versions
57- HOME= $PWD python3 $(type -p pip3) install --no-cache-dir --no-build-isolation --user $WHEELPKG
59+ HOME= $PWD/$PYVERS python3 $(type -p pip3) install --no-cache-dir --no-build-isolation --user $WHEELPKG
5860export PYTHONPATH= "`echo $PYDIR/lib*/python*/site-packages|sed 's/ /:/g'`"
59- HOME= $PWD python3 $(type -p pip3) install --no-cache-dir --no-build-isolation --user $PKGS
61+ HOME= $PWD/$PYVERS python3 $(type -p pip3) install --no-cache-dir --no-build-isolation --user $PKGS
6062
6163cd ../%{name }-%{version }
6264
63- PYIOPTS= "--noconsole --log-level= WARN"
64- python3 $PYDIR/bin/pyi-makespec $PYIOPTS --specpath= dist %{name }
65+ python3 $PYDIR/bin/pyi-makespec --noconsole --log-level= WARN --specpath= dist %{name }
6566
6667# Exclude system libraries from the bundle as documented at
6768# https://pyinstaller.readthedocs.io/en/stable/spec-files.html#posix-specific-options
8384 print
8485}' dist/%{name }-lesslibs.spec > dist/%{name }-lesslibsandwarn.spec
8586
86- python3 $PYDIR/bin/pyinstaller $PYIOPTS --noconfirm --clean dist/%{name }-lesslibsandwarn.spec
87+ python3 $PYDIR/bin/pyinstaller --log-level = WARN --noconfirm --clean dist/%{name }-lesslibsandwarn.spec
8788
8889find dist/%{name } -name '*.*' ! -type d|xargs chmod -x
8990
@@ -124,8 +125,10 @@ rm -rf $RPM_BUILD_ROOT
124125
125126
126127%changelog
127- # - Fix crash introduced in 1.17 when using --nobearertoken while the
128- # credkey is not known.
128+ * Wed May 24 2023 Dave Dykstra <dwd@fnal.gov> 1.18-1
129+ - Fix crash introduced in 1.17 when using --nobearertoken while the
130+ credkey is not known.
131+ - Make source rpm buildable on el9.
129132
130133* Wed Mar 15 2023 Dave Dykstra <dwd@fnal.gov> 1.17-1
131134- Fix the usage of getaddrinfo, which caused a fatal error on python3.9
0 commit comments