Skip to content

Commit 8b7664e

Browse files
Fix setting hostname in container in CI
Our venerable hack of setting the hostname on the host doesn't seem to work anymore, so switch to using nss_wrapper. Signed-off-by: Robbie Harwood <[email protected]>
1 parent c827495 commit 8b7664e

File tree

6 files changed

+11
-23
lines changed

6 files changed

+11
-23
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"jobs": {
1212
"linux": {
1313
"runs-on": "ubuntu-latest",
14+
"container": "${{ matrix.distro }}",
1415
"strategy": {
1516
"fail-fast": false,
1617
"matrix": {
@@ -45,9 +46,8 @@
4546
},
4647
{
4748
"name": "Build and test gssapi",
48-
"run": "./ci/run-on-linux.sh ./ci/build.sh",
49+
"run": "./ci/build.sh",
4950
"env": {
50-
"DISTRO": "${{ matrix.distro }}",
5151
"KRB5_VER": "${{ matrix.krb5_ver }}",
5252
"FLAKE": "${{ matrix.flake }}",
5353
},

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"jobs": {
55
"update-pages": {
66
"runs-on": "ubuntu-latest",
7+
"container": "fedora-latest",
78
"steps": [
89
{
910
"name": "Check out code",
1011
"uses": "actions/checkout@v2",
1112
},
1213
{
1314
"name": "Build docs",
14-
"run": "./ci/run-on-linux.sh ./ci/before-docs-deploy.sh",
15-
"env": { "DISTRO": "fedora:latest" },
15+
"run": "./ci/before-docs-deploy.sh",
1616
},
1717
{
1818
"name": "Deploy latest docs",

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"jobs": {
55
"release-linux": {
66
"runs-on": "ubuntu-latest",
7+
"container": "fedora:latest",
78
"steps": [
89
{
910
"name": "Check out code",
1011
"uses": "actions/checkout@v2",
1112
},
1213
{
1314
"name": "Set things up",
14-
"run": "./ci/run-on-linux.sh ./ci/before-deploy.sh",
15-
"env": { "DISTRO": "fedora:latest" },
15+
"run": "./ci/before-deploy.sh",
1616
},
1717
{
1818
"name": "Deploy to PyPI",

ci/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ if [ x"$KRB5_VER" = "xheimdal" ] || [ "$OS_NAME" = "windows" ]; then
4141
exit $?
4242
fi
4343

44+
export NSS_WRAPPER_HOSTNAME=test.box
45+
export LD_PRELOAD=libnss_wrapper.so
4446
python setup.py nosetests --verbosity=3
4547
TEST_RES=$?
4648

ci/lib-setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ setup::debian::install() {
1111
apt-get -y install heimdal-dev
1212
else
1313
apt-get -y install krb5-{user,kdc,admin-server,multidev} libkrb5-dev \
14-
gss-ntlmssp
14+
gss-ntlmssp libnss-wrapper
1515
fi
1616

1717
apt-get -y install gcc virtualenv python3-{virtualenv,dev} cython3
@@ -27,7 +27,7 @@ setup::rh::yuminst() {
2727

2828
setup::centos::install() {
2929
# Cython on el7 is too old - downstream patches
30-
setup::rh::yuminst python3-{virtualenv,devel}
30+
setup::rh::yuminst python3-{virtualenv,devel} nss_wrapper
3131
virtualenv -p $(which python3) .venv
3232
source ./.venv/bin/activate
3333
pip install --upgrade pip # el7 pip doesn't quite work right
@@ -37,7 +37,7 @@ setup::centos::install() {
3737
setup::fedora::install() {
3838
# path to binary here in case Rawhide changes it
3939
setup::rh::yuminst redhat-rpm-config \
40-
/usr/bin/virtualenv python3-{virtualenv,devel}
40+
/usr/bin/virtualenv python3-{virtualenv,devel} nss_wrapper
4141
virtualenv -p $(which python3) .venv
4242
source ./.venv/bin/activate
4343
pip install --install-option='--no-cython-compile' cython

ci/run-on-linux.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)