lists.arthurdejong.org
RSS feed

nss-pam-ldapd branch master updated. 0.9.11-12-g5226a6f

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd branch master updated. 0.9.11-12-g5226a6f



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nss-pam-ldapd".

The branch, master has been updated
       via  5226a6f56bdf64502bc86d8892d9d59ed5c6bc5a (commit)
      from  d9710a242d5997c0f4abac5251a4ded44381c44b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=5226a6f56bdf64502bc86d8892d9d59ed5c6bc5a

commit 5226a6f56bdf64502bc86d8892d9d59ed5c6bc5a
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Wed May 26 21:47:05 2021 +0200

    Replace Travis with GitHub actions
    
    This includes a few tweaks to the test scripts to make debugging easier
    and to avoid issues on Github action runners.

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..97df4bd
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,70 @@
+---
+
+name: Test
+
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron: '9 0 * * 1'
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Install dependencies
+        run: sudo apt-get update && sudo apt-get -y install
+             apparmor-utils
+             docbook-xml
+             docbook2x
+             expect
+             ldap-utils
+             libkrb5-dev
+             libldap2-dev
+             libpam0g-dev
+             libsasl2-dev
+             pylint
+             python3
+             python3-daemon
+             python3-ldap
+             python3-pyasn1
+             python3-pyasn1-modules
+             python3-setproctitle
+             slapd
+             xmlto
+      - name: autogen.sh
+        run: ./autogen.sh
+      - name: configure
+        run: ./configure
+             --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
+             --libdir=/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`
+             --with-pam-seclib-dir=/lib/`dpkg-architecture 
-qDEB_HOST_MULTIARCH`/security
+             --enable-warnings --enable-pynslcd
+      - name: make
+        run: make
+      - name: make distcheck
+        run: make distcheck || ( cat 
nss-pam-ldapd-*/_build/sub/tests/test-suite.log 2> /dev/null; exit 1 )
+      # Set up a custom LDAP server
+      - name: service slapd stop
+        run: sudo service slapd stop || true
+      - name: aa-disable slapd
+        run: sudo aa-disable slapd
+      - name: start custom LDAP server
+        run: tmpslapd="$(sudo mktemp -d -t slapd.XXXXXX)" && sudo 
tests/setup_slapd.sh "$tmpslapd" setup && sudo tests/setup_slapd.sh "$tmpslapd" 
start || sudo tests/setup_slapd.sh "$tmpslapd" start -d 320
+      # Set up the system to use LDAP for authentication
+      - name: make install
+        run: sudo make install
+      - name: testenv.sh enable_nss
+        run: sudo tests/testenv.sh enable_nss passwd group shadow networks 
protocols services ethers rpc netgroup aliases
+      - name: testenv.sh enable_pam
+        run: sudo tests/testenv.sh enable_pam
+      - name: configure /etc/nslcd.conf
+        run: sudo su -c "cat tests/nslcd-test.conf > /etc/nslcd.conf && chmod 
640 /etc/nslcd.conf && chown root:$(id -g -n) /etc/nslcd.conf"
+      # Run nslcd and run the tests
+      - name: start nslcd
+        run: sudo nslcd/nslcd
+      - name: check test set-up
+        run: sudo tests/testenv.sh check && sudo tests/testenv.sh check_nss 
passwd group shadow networks protocols services ethers rpc netgroup aliases
+      - name: make check
+        run: sudo rm -f /tmp/pynslcd_cache.sqlite; sudo make check || ( cat 
tests/test-suite.log 2> /dev/null; exit 1 )
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 3906760..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-language: c
-sudo: required
-os:
-  - linux
-compiler:
-  - gcc
-addons:
-  apt:
-    packages:
-      - docbook-xml
-      - docbook2x
-      - expect
-      - ldap-utils
-      - libkrb5-dev
-      - libldap2-dev
-      - libpam0g-dev
-      - libsasl2-dev
-      - python
-      - python-daemon
-      - python-ldap
-      - python-pyasn1
-      - python-pyasn1-modules
-      - slapd
-      - xmlto
-      - pylint
-script:
-  # Build the package
-  - ./autogen.sh
-  - ./configure
-      --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
-      --libdir=/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`
-      --with-pam-seclib-dir=/lib/`dpkg-architecture 
-qDEB_HOST_MULTIARCH`/security
-      --enable-warnings --enable-pynslcd
-  - make
-  - make distcheck
-  - cat nss-pam-ldapd-*/_build/sub/tests/test-suite.log 2> /dev/null || true
-  # Set up a custom LDAP server
-  - sudo service slapd stop || true
-  - tmpslapd=`mktemp -d -t slapd.XXXXXX` && sudo tests/setup_slapd.sh 
"$tmpslapd" setup && sudo tests/setup_slapd.sh "$tmpslapd" start
-  # Set up the system to use LDAP for authentication
-  - sudo make install
-  - sudo tests/testenv.sh enable_nss passwd group shadow networks protocols 
services ethers rpc netgroup aliases
-  - sudo tests/testenv.sh enable_pam
-  - sudo su -c 'cat tests/nslcd-test.conf > /etc/nslcd.conf && chmod 640 
/etc/nslcd.conf && chown root:travis /etc/nslcd.conf'
-  # Run nslcd and run the tests
-  - sudo nslcd/nslcd
-  - sudo tests/testenv.sh check && sudo tests/testenv.sh check_nss passwd 
group shadow networks protocols services ethers rpc netgroup aliases
-  - sudo make check
-  - cat tests/test-suite.log
diff --git a/tests/setup_slapd.sh b/tests/setup_slapd.sh
index 8f8874f..21cc6e7 100755
--- a/tests/setup_slapd.sh
+++ b/tests/setup_slapd.sh
@@ -2,7 +2,7 @@
 
 # run_slapd.sh - configure and run a slapd instance
 #
-# Copyright (C) 2013 Arthur de Jong
+# Copyright (C) 2013-2021 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -63,7 +63,7 @@ our_slapd_is_running() {
 }
 
 # the directory where to construct the environment
-if test $# -ne 2
+if test $# -lt 2
 then
   usage
   exit 1
@@ -118,8 +118,10 @@ case "$2" in
       echo " already running."
       exit 0
     fi
+    shift
+    shift
     slapd -F "$basedir/slapd.d" -u "$user" -g "$group" \
-      -h "ldap:/// ldaps:/// ldapi:///" || (echo " FAILED"; exit 1)
+      -h "ldap:/// ldaps:/// ldapi:///" "$@" || (echo " FAILED"; exit 1)
     echo "."
     ;;
   stop)
diff --git a/tests/test_nsscmds.sh b/tests/test_nsscmds.sh
index ec86279..aaeb256 100755
--- a/tests/test_nsscmds.sh
+++ b/tests/test_nsscmds.sh
@@ -2,7 +2,7 @@
 
 # test_nsscmds.sh - simple test script to check output of name lookup commands
 #
-# Copyright (C) 2007-2017 Arthur de Jong
+# Copyright (C) 2007-2021 Arthur de Jong
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -166,7 +166,7 @@ check "getent group 6100 | sortgroup" << EOM
 testgroup:*:6100:arthur,test,testuser4
 EOM
 
-check "groups arthur | sed 's/^.* *: *//' | sed 's/ debci//'" << EOM
+check "groups arthur | sed 's/^.* *: *//' | sed 's/ debci//;s/ runneradmin//'" 
<< EOM
 users testgroup testgroup2 grp4 grp5 grp6 grp7 grp8 grp9 grp10 grp11 grp12 
grp13 grp14 grp15 grp16 grp17 grp18
 EOM
 

-----------------------------------------------------------------------

Summary of changes:
 .github/workflows/test.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++++
 .travis.yml                | 49 --------------------------------
 tests/setup_slapd.sh       |  8 ++++--
 tests/test_nsscmds.sh      |  4 +--
 4 files changed, 77 insertions(+), 54 deletions(-)
 create mode 100644 .github/workflows/test.yml
 delete mode 100644 .travis.yml


hooks/post-receive
-- 
nss-pam-ldapd