Skip to content

Commit

Permalink
Fix setting hostname in container in CI
Browse files Browse the repository at this point in the history
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 <rharwood@redhat.com>
  • Loading branch information
frozencemetery committed Nov 13, 2020
1 parent c827495 commit 8b7664e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"jobs": {
"linux": {
"runs-on": "ubuntu-latest",
"container": "${{ matrix.distro }}",
"strategy": {
"fail-fast": false,
"matrix": {
Expand Down Expand Up @@ -45,9 +46,8 @@
},
{
"name": "Build and test gssapi",
"run": "./ci/run-on-linux.sh ./ci/build.sh",
"run": "./ci/build.sh",
"env": {
"DISTRO": "${{ matrix.distro }}",
"KRB5_VER": "${{ matrix.krb5_ver }}",
"FLAKE": "${{ matrix.flake }}",
},
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"jobs": {
"update-pages": {
"runs-on": "ubuntu-latest",
"container": "fedora-latest",
"steps": [
{
"name": "Check out code",
"uses": "actions/checkout@v2",
},
{
"name": "Build docs",
"run": "./ci/run-on-linux.sh ./ci/before-docs-deploy.sh",
"env": { "DISTRO": "fedora:latest" },
"run": "./ci/before-docs-deploy.sh",
},
{
"name": "Deploy latest docs",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"jobs": {
"release-linux": {
"runs-on": "ubuntu-latest",
"container": "fedora:latest",
"steps": [
{
"name": "Check out code",
"uses": "actions/checkout@v2",
},
{
"name": "Set things up",
"run": "./ci/run-on-linux.sh ./ci/before-deploy.sh",
"env": { "DISTRO": "fedora:latest" },
"run": "./ci/before-deploy.sh",
},
{
"name": "Deploy to PyPI",
Expand Down
2 changes: 2 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ if [ x"$KRB5_VER" = "xheimdal" ] || [ "$OS_NAME" = "windows" ]; then
exit $?
fi

export NSS_WRAPPER_HOSTNAME=test.box
export LD_PRELOAD=libnss_wrapper.so
python setup.py nosetests --verbosity=3
TEST_RES=$?

Expand Down
6 changes: 3 additions & 3 deletions ci/lib-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ setup::debian::install() {
apt-get -y install heimdal-dev
else
apt-get -y install krb5-{user,kdc,admin-server,multidev} libkrb5-dev \
gss-ntlmssp
gss-ntlmssp libnss-wrapper
fi

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

setup::centos::install() {
# Cython on el7 is too old - downstream patches
setup::rh::yuminst python3-{virtualenv,devel}
setup::rh::yuminst python3-{virtualenv,devel} nss_wrapper
virtualenv -p $(which python3) .venv
source ./.venv/bin/activate
pip install --upgrade pip # el7 pip doesn't quite work right
Expand All @@ -37,7 +37,7 @@ setup::centos::install() {
setup::fedora::install() {
# path to binary here in case Rawhide changes it
setup::rh::yuminst redhat-rpm-config \
/usr/bin/virtualenv python3-{virtualenv,devel}
/usr/bin/virtualenv python3-{virtualenv,devel} nss_wrapper
virtualenv -p $(which python3) .venv
source ./.venv/bin/activate
pip install --install-option='--no-cython-compile' cython
Expand Down
14 changes: 0 additions & 14 deletions ci/run-on-linux.sh

This file was deleted.

0 comments on commit 8b7664e

Please sign in to comment.