Skip to content

Commit b78bc18

Browse files
authored
Merge pull request #105 from DrDaveD/update-2.0
Update to 2.0
2 parents f71d970 + 095386d commit b78bc18

File tree

7 files changed

+35
-40
lines changed

7 files changed

+35
-40
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
# Build for CentOS 7, and Rockylinux >=8
31+
# Build for Rockylinux >=8
3232
include:
33-
- distro: centos
34-
version: 7
3533
- distro: rockylinux
3634
version: 8
3735
- distro: rockylinux
@@ -76,10 +74,8 @@ jobs:
7674
strategy:
7775
fail-fast: false
7876
matrix:
79-
# Build for CentOS 7, and Rockylinux >=8
77+
# Build for Rockylinux >=8
8078
include:
81-
- distro: centos
82-
version: 7
8379
- distro: rockylinux
8480
version: 8
8581
- distro: rockylinux
@@ -153,10 +149,8 @@ jobs:
153149
strategy:
154150
fail-fast: false
155151
matrix:
156-
# Build for CentOS 7, and Rockylinux >=8
152+
# Build for Rockylinux >=8
157153
include:
158-
- distro: centos
159-
version: 7
160154
- distro: rockylinux
161155
version: 8
162156
- distro: rockylinux

RELEASE_PROCEDURE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1. Update the version in htgettoken.
1+
1. Update the version in htgettoken and setup.cfg.
22
2. Update the version in htgettoken.spec and add a changelog entry.
33
3. Run 'make' to update html version of man page if the man page source
44
has changed.

htgettoken.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import print_function
1616

1717
prog = "htgettoken"
18-
version = "1.20"
18+
version = "2.0"
1919

2020
import os
2121
import sys

htgettoken.spec

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
%define downloads_version 1.8
2-
31
Summary: Get OIDC bearer tokens by interacting with Hashicorp vault
42
Name: htgettoken
5-
Version: 1.20
3+
Version: 2.0
64
Release: 1%{?dist}
75

86
License: BSD-3-Clause
@@ -12,8 +10,8 @@ BuildArch: noarch
1210
Prefix: %{_prefix}
1311

1412
# download with:
15-
# $ curl -o htgettoken-%{version}.tar.gz \
16-
# https://codeload.github.com/fermitools/htgettoken/tar.gz/%{version}
13+
# $ curl -o htgettoken-%%{version}.tar.gz \
14+
# https://codeload.github.com/fermitools/htgettoken/tar.gz/%%{version}
1715
Source0: %{name}-%{version}.tar.gz
1816

1917
# rpmbuild dependencies
@@ -54,11 +52,11 @@ htgettoken gets OIDC bearer tokens by interacting with Hashicorp vault
5452
%autosetup -n %{name}-%{version}
5553

5654
%build
57-
%py3_build_wheel
55+
%py3_build
5856

5957
%install
6058
# install the Python project
61-
%py3_install_wheel %{name}-%{version}-*.whl
59+
%py3_install
6260
# link httokendecode to htdecodetoken
6361
(cd %{buildroot}%{_bindir}/; ln -s htdecode httokendecode)
6462
# install man pages
@@ -75,26 +73,25 @@ rm -rf $RPM_BUILD_ROOT
7573
# -- changelog
7674

7775
%changelog
78-
# - Replace use of m2crypto and pyOpenSSL with urllib3
79-
# - Replace use of pykerberos with gssapi
80-
# - Use standard Requires for Python modules instead of PyInstaller
81-
# - Add --vaultcertname option to specify an alternative certificate name.
82-
# That used to be an additional optional meaning of the --vaultalias option,
83-
# but urllib3 requires only one name to match.
84-
# - Add setuptools build infrastructure
85-
# - Refactor htgettoken script into module with entry point.
86-
# This enables invoking htgettoken as `htgettoken.main()` from Python.
87-
# - Use wheels to build/install Python package, which simplified the entry
88-
# points and improves (slightly) the metadata
89-
90-
91-
#- Fix the httokensh background process's check for its parent process.
92-
# That is only a backup in case only the parent process is hard-killed,
93-
# because normally the parent process kills the background process when
94-
# the parent exits.
95-
#- Use newer `sts` secrets API for token exchanges.
96-
#- Fix the `-o`/`--outfile` option to work with relative paths.
97-
#- Change the `--nobearertoken` option to always get and save a vault token.
76+
* Wed Jul 24 2024 Dave Dykstra <dwd@fnal.gov> 2.0-1
77+
- Replace use of m2crypto and pyOpenSSL with urllib3
78+
- Replace use of pykerberos with gssapi
79+
- Use standard Requires for Python modules instead of PyInstaller
80+
- Add --vaultcertname option to specify an alternative certificate name.
81+
That used to be an additional optional meaning of the --vaultalias option,
82+
but urllib3 requires only one name to match.
83+
- Add setuptools build infrastructure
84+
- Refactor htgettoken script into module with entry point.
85+
This enables invoking htgettoken as `htgettoken.main()` from Python.
86+
- Use wheels to build/install Python package, which simplified the entry
87+
points and improves (slightly) the metadata
88+
- Fix the httokensh background process's check for its parent process.
89+
That is only a backup in case only the parent process is hard-killed,
90+
because normally the parent process kills the background process when
91+
the parent exits.
92+
- Use newer `sts` secrets API for token exchanges.
93+
- Fix the `-o`/`--outfile` option to work with relative paths.
94+
- Change the `--nobearertoken` option to always get and save a vault token.
9895

9996
* Thu Aug 17 2023 Dave Dykstra <dwd@fnal.gov> 1.20-1
10097
- Update httokensh to by default set the minimum vault token time to live to

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = htgettoken
3-
version = 1.20
3+
version = 2.0
44
author = Dave Dykstra
55
author_email = dwd@fnal.gov
66
license = BSD-3-Clause

tests/010-kerbprincipal/main

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ALTPRINCIPAL="$(echo "$PRINCIPALS"|tail -n +2|head -1)"
1111

1212
set -e
1313
htdestroytoken
14+
set -x
1415
kswitch -p $ALTPRINCIPAL
15-
trap "kswitch -p $MAINPRINCIPAL" 0
16+
trap "set -x; kswitch -p $MAINPRINCIPAL" 0
1617
htgettoken --nooidc --nossh --kerbprincipal=$MAINPRINCIPAL -a $VAULTSERVER -i $ISSUER

tests/011-credkey/main

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#WARNING: kcron credentials interfere badly with access to /nashome!
2+
#See SNOW tickets TASK0319666 and RITM2125276
3+
14
if [ "$HASKERBEROS" != true ]; then
25
exit $SKIPCODE
36
fi

0 commit comments

Comments
 (0)