Re: [Freeipa-devel] [DISCUSSION] checking *lint at configure time
Lukas Slebodnik wrote: > On (03/03/17 17:07), Lukas Slebodnik wrote: >> ehlo, >> >> This is a small continuation fo discussin from pull request >> "Make pylint and jsl optional" #502[1] >> >> Pylint and jslint are already optional because some downstream distributions >> does not have such packages. This is a reason why desing document[2] >> mention configuration options for disabling them. >> --disable-pylint --without-jslint >> >> Previusly (4.4) "pylint was executed" before building rpm packages. >> This strict requirement was changed because "make lint" is executed >> with each pull request in travis. >> >> It was changed in commits >> master: >> >> * 5c18feaa206bbaee692fc3640b7b79c8d9d6a638 CONFIGURE: Fix detection of pylint >> * 3f91469f327d8d9f3b27e0b67c54a4f47ad845c1 CONFIGURE: Update help message >> for jslint >> * b82d285a4a75e11cc9291ecca12d2fcc26f43ed1 SPEC: Fix build in mock >> >> The main intention of PR#502 [1] is to make it even more optional >> and do not fail if pylint is not installed on machine. >> In another words, changing default value from "yes" to "autodetect". >> I think the main reason is that it is not obvious that it is an optional >> dependency if you run just "./configure". But that can be improved with >> better error message. @see attachments. I was going to go into a history of why it was required (we pushed broken changes into master) but in retrospect that doesn't really matter. I've been out of mainline development for some time so don't know your current processes, but I do have a question: Is it expected that ./configure && make && make install will result in the bits in all the right places? We never had that expectation before though I know Christian has been moving in that direction. Is that an end goal? It would be nice for developing in-tree and pushing out micro changes onto the current, live development system. If so, does it have checks for all the runtime dependencies or will you still have to do a bunch of work afterward the make install? I've seen discussions about making freeIPA more accessible to the average developer, which is good, but it is just so more complex than the typical software because it is more about integration than most big projects. So I don't know that this is every going to really be true. Will it help the average dev install it? Sure, but then what? Will you support such an install? If you want to disable the checks for *lint that is certainly your prerogative but I see some downsides: - I used to setup new dev systems all the time and this is definitely something I'd forget to do with some frequency - As I understand it the checks will be executed by upstream before a change is accepted so that's good but it adds a huge delay and the requirement of a roundtrip to fix simple mistakes (happens all the time in OpenStack). I think my question boils down to how many people will this actually benefit vs how much time will be lost resubmitting patches? I don't think there is an easy answer for the first part but from my own experience I'd expect fairly regularly for lint and pep8 errors. On the other hand I guess this also will have the additional advantage that make rpms will be significantly faster if you don't enable them. The --disable vs --without is what bugs me most about the current situation :-) So in closing I'd just say that we made those checks mandatory for a reason. Maybe that reason is no longer applicable with all the current automation but I'd personally prefer Lukas's suggestion of requiring them by default but providing clear output on how to disable them if desired. This way the average user can easily work around it and it won't impact current developers (unless they want it to). Is that as simple as configure; make; make install? No, but it isn't a huge leap either. rob -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#532][+ack] Fix cookie with Max-Age processing
URL: https://github.com/freeipa/freeipa/pull/532 Title: #532: Fix cookie with Max-Age processing Label: +ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#532][comment] Fix cookie with Max-Age processing
URL: https://github.com/freeipa/freeipa/pull/532 Title: #532: Fix cookie with Max-Age processing simo5 commented: """ LGTM, please merge """ See the full comment at https://github.com/freeipa/freeipa/pull/532#issuecomment-284055799 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#538][synchronized] Run test_ipaclient test suite
URL: https://github.com/freeipa/freeipa/pull/538 Author: tiran Title: #538: Run test_ipaclient test suite Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/538/head:pr538 git checkout pr538 From 5dfb17168972e480c1880e688a60fd2eb7de1dfe Mon Sep 17 00:00:00 2001 From: Michal ReznikDate: Fri, 3 Mar 2017 11:17:17 +0100 Subject: [PATCH 1/2] test_csrgen: adjusted comparison test scripts for CSRGenerator Commit ada91c2 introduced changes in "csrgen/templates/openssl_base.tmpl" which broke the following 2 tests: test_CSRGenerator.test_userCert_OpenSSL test_CSRGenerator.test_caIPAserviceCert_OpenSSL The tests use files caIPAserviceCert_openssl.sh and userCert_openssl.sh as expected scripts in order to compare scripts generated by CSRGenerator. E.g. as other parameter was introduced we are now not checking with "if [[ $# -ne 2 ]]" but rather with if "[[ $# -lt 2 ]]". https://pagure.io/freeipa/issue/6724 --- .../data/test_csrgen/scripts/caIPAserviceCert_openssl.sh | 11 ++- .../data/test_csrgen/scripts/userCert_openssl.sh | 9 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh index c621a69..b59b9e6 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ DNS = machine.example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 -rm "$CONFIG" +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" +rm "$CONFIG" \ No newline at end of file diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh index cdbe8a1..2edf067 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ email = testu...@example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" rm "$CONFIG" From 3850b57fbad8e87f216d80f07f79960b1e241e58 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 3 Mar 2017 12:57:21 +0100 Subject: [PATCH 2/2] Run test_ipaclient test suite Signed-off-by: Christian Heimes --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 04b766b..1a8f1b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - TASK_TO_RUN="run-tests" TESTS_TO_RUN="test_cmdline test_install +test_ipaclient test_ipalib test_ipapython test_ipaserver -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#537][comment] test_csrgen: adjusted comparison test scripts for CSRGenerator
URL: https://github.com/freeipa/freeipa/pull/537 Title: #537: test_csrgen: adjusted comparison test scripts for CSRGenerator apophys commented: """ Ack. """ See the full comment at https://github.com/freeipa/freeipa/pull/537#issuecomment-284012793 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#537][+ack] test_csrgen: adjusted comparison test scripts for CSRGenerator
URL: https://github.com/freeipa/freeipa/pull/537 Title: #537: test_csrgen: adjusted comparison test scripts for CSRGenerator Label: +ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#537][comment] test_csrgen: adjusted comparison test scripts for CSRGenerator
URL: https://github.com/freeipa/freeipa/pull/537 Title: #537: test_csrgen: adjusted comparison test scripts for CSRGenerator apophys commented: """ Ack. """ See the full comment at https://github.com/freeipa/freeipa/pull/537#issuecomment-284012793 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#537][synchronized] test_csrgen: adjusted comparison test scripts for CSRGenerator
URL: https://github.com/freeipa/freeipa/pull/537 Author: Rezney Title: #537: test_csrgen: adjusted comparison test scripts for CSRGenerator Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/537/head:pr537 git checkout pr537 From fd97f19179c59081936a1dfaefa9c3bbccffa36b Mon Sep 17 00:00:00 2001 From: Michal ReznikDate: Fri, 3 Mar 2017 11:17:17 +0100 Subject: [PATCH] test_csrgen: adjusted comparison test scripts for CSRGenerator Commit ada91c2 introduced changes in "csrgen/templates/openssl_base.tmpl" which broke the following 2 tests: test_CSRGenerator.test_userCert_OpenSSL test_CSRGenerator.test_caIPAserviceCert_OpenSSL The tests use files caIPAserviceCert_openssl.sh and userCert_openssl.sh as expected scripts in order to compare scripts generated by CSRGenerator. E.g. as other parameter was introduced we are now not checking with "if [[ $# -ne 2 ]]" but rather with if "[[ $# -lt 2 ]]". https://pagure.io/freeipa/issue/6724 --- .../data/test_csrgen/scripts/caIPAserviceCert_openssl.sh | 9 + .../test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh | 9 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh index c621a69..811bfd7 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ DNS = machine.example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" rm "$CONFIG" diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh index cdbe8a1..2edf067 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ email = testu...@example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" rm "$CONFIG" -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#532][comment] Fix cookie with Max-Age processing
URL: https://github.com/freeipa/freeipa/pull/532 Title: #532: Fix cookie with Max-Age processing apophys commented: """ Hi, can this PR get little more attention? The issue seems to be a cause for a lot of failures in our integration tests. (I'm not 100% sure though) """ See the full comment at https://github.com/freeipa/freeipa/pull/532#issuecomment-283999510 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#537][synchronized] test_csrgen: adjusted comparison test scripts for CSRGenerator
URL: https://github.com/freeipa/freeipa/pull/537 Author: Rezney Title: #537: test_csrgen: adjusted comparison test scripts for CSRGenerator Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/537/head:pr537 git checkout pr537 From db8ee676d40fb098b0f9db67048ca0e8eb4b3c27 Mon Sep 17 00:00:00 2001 From: Michal ReznikDate: Fri, 3 Mar 2017 11:17:17 +0100 Subject: [PATCH] test_csrgen: adjusted comparison test scripts for CSRGenerator Commit ada91c2 introduced changes in "csrgen/templates/openssl_base.tmpl" which broke the following 2 tests: test_CSRGenerator.test_userCert_OpenSSL test_CSRGenerator.test_caIPAserviceCert_OpenSSL The tests use files caIPAserviceCert_openssl.sh and userCert_openssl.sh as expected scripts in order to compare scripts generated by CSRGenerator. E.g. as other parameter was introduced we are now not checking with "if [[ $# -ne 2 ]]" but rather with if "[[ $# -lt 2 ]]". https://pagure.io/freeipa/issue/6724 --- .../data/test_csrgen/scripts/caIPAserviceCert_openssl.sh | 10 ++ .../data/test_csrgen/scripts/userCert_openssl.sh | 9 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh index c621a69..6341b0f 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,6 @@ DNS = machine.example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" rm "$CONFIG" + diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh index cdbe8a1..2edf067 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ email = testu...@example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" rm "$CONFIG" -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
Re: [Freeipa-devel] [DISCUSSION] checking *lint at configure time
On (03/03/17 17:07), Lukas Slebodnik wrote: >ehlo, > >This is a small continuation fo discussin from pull request >"Make pylint and jsl optional" #502[1] > >Pylint and jslint are already optional because some downstream distributions >does not have such packages. This is a reason why desing document[2] >mention configuration options for disabling them. > --disable-pylint --without-jslint > >Previusly (4.4) "pylint was executed" before building rpm packages. >This strict requirement was changed because "make lint" is executed >with each pull request in travis. > >It was changed in commits >master: > >* 5c18feaa206bbaee692fc3640b7b79c8d9d6a638 CONFIGURE: Fix detection of pylint >* 3f91469f327d8d9f3b27e0b67c54a4f47ad845c1 CONFIGURE: Update help message for >jslint >* b82d285a4a75e11cc9291ecca12d2fcc26f43ed1 SPEC: Fix build in mock > >The main intention of PR#502 [1] is to make it even more optional >and do not fail if pylint is not installed on machine. >In another words, changing default value from "yes" to "autodetect". >I think the main reason is that it is not obvious that it is an optional >dependency if you run just "./configure". But that can be improved with >better error message. @see attachments. > And with missing attachment :-) LS diff --git a/configure.ac b/configure.ac index 31bfa8aaf..fee39fe4f 100644 --- a/configure.ac +++ b/configure.ac @@ -384,7 +384,10 @@ if test x$PYLINT != xno; then AC_MSG_CHECKING([for Pylint]) $PYTHON -m pylint --version > /dev/null if test "$?" != "0"; then -AC_MSG_ERROR([cannot find pylint for $PYTHON]) +AC_MSG_ERROR([cannot find pylint for $PYTHON +This feature is optional and aimed for checking issues in python code. +You can skip this check wich configure time option --disable-pylint. +]) else AC_MSG_RESULT([yes]) fi @@ -402,7 +405,10 @@ dnl --without-jslint will set JSLINT=no [AC_PATH_PROG([JSLINT], [jsl])] ) if test "x${JSLINT}" == "x"; then - AC_MSG_ERROR([cannot find JS lint]) +AC_MSG_ERROR([cannot find JS lint +This feature is optional and aimed for web ui developers. +You can skip this check wich configure time option --without-jslint +]) fi AC_SUBST([JSLINT]) AM_CONDITIONAL([WITH_JSLINT], [test "x${JSLINT}" != "xno"]) -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [DISCUSSION] checking *lint at configure time
ehlo, This is a small continuation fo discussin from pull request "Make pylint and jsl optional" #502[1] Pylint and jslint are already optional because some downstream distributions does not have such packages. This is a reason why desing document[2] mention configuration options for disabling them. --disable-pylint --without-jslint Previusly (4.4) "pylint was executed" before building rpm packages. This strict requirement was changed because "make lint" is executed with each pull request in travis. It was changed in commits master: * 5c18feaa206bbaee692fc3640b7b79c8d9d6a638 CONFIGURE: Fix detection of pylint * 3f91469f327d8d9f3b27e0b67c54a4f47ad845c1 CONFIGURE: Update help message for jslint * b82d285a4a75e11cc9291ecca12d2fcc26f43ed1 SPEC: Fix build in mock The main intention of PR#502 [1] is to make it even more optional and do not fail if pylint is not installed on machine. In another words, changing default value from "yes" to "autodetect". I think the main reason is that it is not obvious that it is an optional dependency if you run just "./configure". But that can be improved with better error message. @see attachments. checking if source directory is a Git reposistory... yes checking for more warnings... no checking for Pylint... /usr/bin/python: No module named pylint configure: error: cannot find pylint for /usr/bin/python Cristian wrote some explanation in pull request: Rational: pylint and jsl are not required to build FreeIPA. Both are useful developer tools. It's more user friendly to make both components optionally with default config arguments. There is no reason to fail building on a build system without development tools. But there is also another opinion. pylint/jslint is not usefull just for developers but also for packagers. I would personally encourage packagers to run pylint as part of build. (it took just 2 minutes on my laptop 8 CPUs) Pylint/jslint should check typical issues in downstream only patches or with backported patches. My experience with optional dependencies for unit tests is that packagers tend to remove them in case of failure in tests and then forget to return back with next release because it is optional. This is a reason why explicit ./configure --disable-pylint will be a reminder for them to try run "make lint" with next release. Cristian's version will not affect fedora developers because there is recommendation to install all required dependencies for running "make lint" dnf builddep -b -D "with_lint 1" --spec freeipa.spec.in However, there is not such simple way for other distributions debian unstable[3]/ubuntu 16.04/openSUSE[4]. This is a reason why I would prefer to keep default vaue to "yes" and just improve error message. It will remind packagers/developers to run lint. It does not force them to run it. So the main question is whether we want to change default for configure time options --enable-pylint --enable-jslint. LS [1] https://github.com/freeipa/freeipa/pull/502 [2] http://www.freeipa.org/page/V4/Build_system_refactoring [3] https://anonscm.debian.org/cgit/pkg-freeipa/freeipa.git [4] https://en.opensuse.org/Portal:FreeIPA -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#475][comment] Add options to run only ipaclient unittests
URL: https://github.com/freeipa/freeipa/pull/475 Title: #475: Add options to run only ipaclient unittests martbab commented: """ I like the second approach better. If you squash the commits I will Ack the PR. I still think we need a substantial reorganization of the test suites but that needs more consideration and time. """ See the full comment at https://github.com/freeipa/freeipa/pull/475#issuecomment-283978683 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#538][synchronized] Run test_ipaclient test suite
URL: https://github.com/freeipa/freeipa/pull/538 Author: tiran Title: #538: Run test_ipaclient test suite Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/538/head:pr538 git checkout pr538 From 4dc1dabc4fc687e8d21c5dc29e28a2718a9156dd Mon Sep 17 00:00:00 2001 From: Michal ReznikDate: Fri, 3 Mar 2017 11:17:17 +0100 Subject: [PATCH 1/2] test_csrgen: adjusted comparison test scripts for CSRGenerator Commit ada91c2 introduced changes in "csrgen/templates/openssl_base.tmpl" which broke the following 2 tests: test_CSRGenerator.test_userCert_OpenSSL test_CSRGenerator.test_caIPAserviceCert_OpenSSL The tests use files caIPAserviceCert_openssl.sh and userCert_openssl.sh as expected scripts in order to compare scripts generated by CSRGenerator. E.g. as other parameter was introduced we are now not checking with "if [[ $# -ne 2 ]]" but rather with if "[[ $# -lt 2 ]]". https://pagure.io/freeipa/issue/6724 --- .../data/test_csrgen/scripts/caIPAserviceCert_openssl.sh | 11 ++- .../data/test_csrgen/scripts/userCert_openssl.sh | 9 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh index c621a69..b59b9e6 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/caIPAserviceCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ DNS = machine.example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 -rm "$CONFIG" +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" +rm "$CONFIG" \ No newline at end of file diff --git a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh index cdbe8a1..2edf067 100644 --- a/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh +++ b/ipatests/test_ipaclient/data/test_csrgen/scripts/userCert_openssl.sh @@ -1,14 +1,15 @@ #!/bin/bash -e -if [[ $# -ne 2 ]]; then -echo "Usage: $0 " +if [[ $# -lt 2 ]]; then +echo "Usage: $0 " echo "Called as: $0 $@" exit 1 fi CONFIG="$(mktemp)" CSR="$1" -shift +KEYFILE="$2" +shift; shift echo \ '[ req ] @@ -29,5 +30,5 @@ email = testu...@example.com subjectAltName = @sec1 ' > "$CONFIG" -openssl req -new -config "$CONFIG" -out "$CSR" -key $1 +openssl req -new -config "$CONFIG" -out "$CSR" -key "$KEYFILE" "$@" rm "$CONFIG" From e76000825a599b251fabc58c20e4f5184d9464e3 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 3 Mar 2017 12:57:21 +0100 Subject: [PATCH 2/2] Run test_ipaclient test suite Signed-off-by: Christian Heimes --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 04b766b..1a8f1b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - TASK_TO_RUN="run-tests" TESTS_TO_RUN="test_cmdline test_install +test_ipaclient test_ipalib test_ipapython test_ipaserver -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#519][+ack] WebUI: add sizelimit:0 to cert-find
URL: https://github.com/freeipa/freeipa/pull/519 Title: #519: WebUI: add sizelimit:0 to cert-find Label: +ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#519][comment] WebUI: add sizelimit:0 to cert-find
URL: https://github.com/freeipa/freeipa/pull/519 Title: #519: WebUI: add sizelimit:0 to cert-find flo-renaud commented: """ Hi @pvomacka , thank you, the fix works as expected. """ See the full comment at https://github.com/freeipa/freeipa/pull/519#issuecomment-283949286 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#507][comment] Use https to get security domain from Dogtag
URL: https://github.com/freeipa/freeipa/pull/507 Title: #507: Use https to get security domain from Dogtag tomaskrizek commented: """ If backport for 4.4 is needed, please open another PR against `ipa-4-4`. Thanks. """ See the full comment at https://github.com/freeipa/freeipa/pull/507#issuecomment-283944069 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#516][comment] IdM Server: list all Employees with matching Smart Card
URL: https://github.com/freeipa/freeipa/pull/516 Title: #516: IdM Server: list all Employees with matching Smart Card flo-renaud commented: """ @abbra , Thanks for your comment. Running in permissive mode I did not see any AVC logged in the journal. @HonzaCholasta thanks for the tips re. writing API. I have followed your advice and made certificate a positional argument. The output will look like this: ``` --- 2 users matched --- Domain: DOM-076.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM Usernames: user1, user2 Number of entries returned 2 ``` """ See the full comment at https://github.com/freeipa/freeipa/pull/516#issuecomment-283642083 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#507][comment] Use https to get security domain from Dogtag
URL: https://github.com/freeipa/freeipa/pull/507 Title: #507: Use https to get security domain from Dogtag tomaskrizek commented: """ master: * d1c5d92897d3e262edd2e43295c1270590aebd3d Use https to get security domain from Dogtag """ See the full comment at https://github.com/freeipa/freeipa/pull/507#issuecomment-283942370 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#507][+pushed] Use https to get security domain from Dogtag
URL: https://github.com/freeipa/freeipa/pull/507 Title: #507: Use https to get security domain from Dogtag Label: +pushed -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#507][closed] Use https to get security domain from Dogtag
URL: https://github.com/freeipa/freeipa/pull/507 Author: tiran Title: #507: Use https to get security domain from Dogtag Action: closed To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/507/head:pr507 git checkout pr507 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#507][+ack] Use https to get security domain from Dogtag
URL: https://github.com/freeipa/freeipa/pull/507 Title: #507: Use https to get security domain from Dogtag Label: +ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#502][-ack] Make pylint and jsl optional
URL: https://github.com/freeipa/freeipa/pull/502 Title: #502: Make pylint and jsl optional Label: -ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#502][comment] Make pylint and jsl optional
URL: https://github.com/freeipa/freeipa/pull/502 Title: #502: Make pylint and jsl optional lslebodn commented: """ I am still expect some comment from @rcritten LS """ See the full comment at https://github.com/freeipa/freeipa/pull/502#issuecomment-283938711 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#538][opened] Run test_ipaclient test suite
URL: https://github.com/freeipa/freeipa/pull/538 Author: tiran Title: #538: Run test_ipaclient test suite Action: opened PR body: """ Depends on PR #537 to fix the test suite first. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/538/head:pr538 git checkout pr538 From a4e18207f60703f029718726f848a844a6f519d2 Mon Sep 17 00:00:00 2001 From: Christian HeimesDate: Fri, 3 Mar 2017 12:57:21 +0100 Subject: [PATCH] Run test_ipaclient test suite Signed-off-by: Christian Heimes --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 04b766b..1a8f1b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ env: - TASK_TO_RUN="run-tests" TESTS_TO_RUN="test_cmdline test_install +test_ipaclient test_ipalib test_ipapython test_ipaserver -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#502][synchronized] Make pylint and jsl optional
URL: https://github.com/freeipa/freeipa/pull/502 Author: tiran Title: #502: Make pylint and jsl optional Action: synchronized To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/502/head:pr502 git checkout pr502 From 4a642a9366acc4d883f2857e8482b7a406e5b07e Mon Sep 17 00:00:00 2001 From: Christian HeimesDate: Wed, 22 Feb 2017 19:19:35 +0100 Subject: [PATCH] Make pylint and jsl optional ./configure no longer fails when pylint or jsl are not available. The make targets for pylint and jsl are no longer defined without the tools. Rational: pylint and jsl are not required to build FreeIPA. Both are useful developer tools. It's more user friendly to make both components optionally with default config arguments. There is no reason to fail building on a build system without development tools. It's still possible to enforce dependency checks with --with-jslint and --enable-pylint. https://fedorahosted.org/freeipa/ticket/6604 Signed-off-by: Christian Heimes --- Makefile.am | 14 +++--- configure.ac| 47 --- freeipa.spec.in | 11 --- 3 files changed, 51 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0c8f32a..844c29b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -146,6 +146,10 @@ JSLINT_TARGET = jslint endif WITH_JSLINT lint: acilint apilint $(POLINT_TARGET) $(PYLINT_TARGET) $(JSLINT_TARGET) +.PHONY: $(top_builddir)/ipapython/version.py +$(top_builddir)/ipapython/version.py: + (cd $(top_builddir)/ipapython && make version.py) + .PHONY: acilint acilint: $(top_builddir)/ipapython/version.py cd $(srcdir); ./makeaci --validate @@ -162,10 +166,10 @@ polint: # folders rpmbuild, freeipa-* and dist. Skip (match, but don't print) .*, # *.in, *~. Finally print all python files, including scripts that do not # have python extension. -.PHONY: pylint $(top_builddir)/ipapython/version.py -$(top_builddir)/ipapython/version.py: - (cd $(top_builddir)/ipapython && make version.py) +.PHONY: pylint + +if WITH_PYLINT pylint: $(top_builddir)/ipapython/version.py ipasetup.py FILES=`find $(top_srcdir) \ -type d -exec test -e '{}/__init__.py' \; -print -prune -o \ @@ -181,9 +185,12 @@ pylint: $(top_builddir)/ipapython/version.py ipasetup.py echo "Pylint is running, please wait ..."; \ PYTHONPATH=$(top_srcdir) $(PYTHON) -m pylint \ --rcfile=$(top_srcdir)/pylintrc $${FILES} +endif # WITH_PYLINT .PHONY: jslint jslint-ui jslint-ui-test jslint-html \ $(top_builddir)/install/ui/src/libs/loader.js + +if WITH_JSLINT jslint: jslint-ui jslint-ui-test jslint-html $(top_builddir)/install/ui/src/libs/loader.js: @@ -206,6 +213,7 @@ jslint-ui-test: jslint-html: cd $(top_srcdir)/install/html; \ jsl -nologo -nosummary -nofilelisting -conf jsl.conf +endif # WITH_JSLINT .PHONY: bdist_wheel wheel_bundle wheel_placeholder pypi_packages WHEELDISTDIR = $(top_builddir)/dist/wheels diff --git a/configure.ac b/configure.ac index 31bfa8a..afce75c 100644 --- a/configure.ac +++ b/configure.ac @@ -375,17 +375,25 @@ AC_SUBST([i18ntests]) AM_CONDITIONAL([WITH_POLINT], [test "x${enable_i18ntests}" == "xyes"]) AC_ARG_ENABLE([pylint], - AS_HELP_STRING([--disable-pylint], - [skip Pylint in make lint target]), + AS_HELP_STRING([--enable-pylint], + [Require pylint. Default is autodetection with + "python -m pylint".]), [PYLINT=$enableval], - [PYLINT=yes] + [PYLINT=check] ) + if test x$PYLINT != xno; then AC_MSG_CHECKING([for Pylint]) -$PYTHON -m pylint --version > /dev/null +$PYTHON -m pylint --version >/dev/null 2>&1 if test "$?" != "0"; then -AC_MSG_ERROR([cannot find pylint for $PYTHON]) +if test x$PYLINT = xcheck; then +PYLINT=no +AC_MSG_NOTICE([cannot find optional pylint for $PYTHON]) +else +AC_MSG_ERROR([cannot find pylint for $PYTHON]) +fi else +PYLINT=yes AC_MSG_RESULT([yes]) fi fi @@ -397,13 +405,27 @@ AC_ARG_WITH([jslint], AS_HELP_STRING([--with-jslint=[FILE]], [path to JavaScript linter. Default is autodetection of utility "jsl" ]), -dnl --without-jslint will set JSLINT=no -[JSLINT=$with_jslint], -[AC_PATH_PROG([JSLINT], [jsl])] +[JSLINT="$withval"], +[JSLINT=check] +) + +AS_CASE([$JSLINT], +[yes], [AC_PATH_PROG([JSLINT], [jsl], [missing]) +if test $JSLINT = missing; then +AC_MSG_FAILURE([jsl is missing]) +fi], +[no], [], +[check], [AC_PATH_PROG([JSLINT], [jsl], [no])], +dnl user setting +[if ! test -f "$JSLINT"; then +AC_MSG_RESULT([$JSLINT non-existing]) +AC_MSG_FAILURE([invalid value $JSLINT for jsl]) + fi + if ! test -x "$JSLINT"; then +AC_MSG_RESULT([$JSLINT
[Freeipa-devel] [freeipa PR#502][comment] Make pylint and jsl optional
URL: https://github.com/freeipa/freeipa/pull/502 Title: #502: Make pylint and jsl optional tomaskrizek commented: """ @tiran Needs rebase. """ See the full comment at https://github.com/freeipa/freeipa/pull/502#issuecomment-283931719 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#502][+ack] Make pylint and jsl optional
URL: https://github.com/freeipa/freeipa/pull/502 Title: #502: Make pylint and jsl optional Label: +ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#502][comment] Make pylint and jsl optional
URL: https://github.com/freeipa/freeipa/pull/502 Title: #502: Make pylint and jsl optional tomaskrizek commented: """ Issues found by @HonzaCholasta were addressed and no one has raised any serious concern that this patch should not be accepted. """ See the full comment at https://github.com/freeipa/freeipa/pull/502#issuecomment-283930193 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#523][+pushed] cert-request: minor refactors
URL: https://github.com/freeipa/freeipa/pull/523 Title: #523: cert-request: minor refactors Label: +pushed -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#523][closed] cert-request: minor refactors
URL: https://github.com/freeipa/freeipa/pull/523 Author: frasertweedale Title: #523: cert-request: minor refactors Action: closed To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/523/head:pr523 git checkout pr523 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#523][comment] cert-request: minor refactors
URL: https://github.com/freeipa/freeipa/pull/523 Title: #523: cert-request: minor refactors tomaskrizek commented: """ master: * 2066a80be21258d9311ae374fe124d9ac3b79acd Remove redundant principal_type argument * 11c9df25774fbc8ed24b30f75c205d12ca3c5b90 Extract method to map principal to princpal type """ See the full comment at https://github.com/freeipa/freeipa/pull/523#issuecomment-283928618 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#523][+ack] cert-request: minor refactors
URL: https://github.com/freeipa/freeipa/pull/523 Title: #523: cert-request: minor refactors Label: +ack -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#400][comment] WebUI: Certificate Mapping
URL: https://github.com/freeipa/freeipa/pull/400 Title: #400: WebUI: Certificate Mapping flo-renaud commented: """ Hi @pvomacka thank you, LGTM. """ See the full comment at https://github.com/freeipa/freeipa/pull/400#issuecomment-283923415 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#536][opened] ipa systemd unit should define Wants=network instead of Requires=network
URL: https://github.com/freeipa/freeipa/pull/536 Author: flo-renaud Title: #536: ipa systemd unit should define Wants=network instead of Requires=network Action: opened PR body: """ The file ipa.service defines Requires=network.target which means that ipa stack will be restarted each time the network stack is restarted. This is not needed, and Wants=network.target will be sufficient. https://fedorahosted.org/freeipa/ticket/6723 """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/536/head:pr536 git checkout pr536 From 28c3604dc5715d72f5dbd7e751db4a264ae261dd Mon Sep 17 00:00:00 2001 From: Florence Blanc-RenaudDate: Fri, 3 Mar 2017 09:33:39 +0100 Subject: [PATCH] ipa systemd unit should define Wants=network instead of Requires=network The file ipa.service defines Requires=network.target which means that ipa stack will be restarted each time the network stack is restarted. This is not needed, and Wants=network.target will be sufficient. https://fedorahosted.org/freeipa/ticket/6723 --- init/systemd/ipa.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/systemd/ipa.service.in b/init/systemd/ipa.service.in index ceb360c..a872ad1 100644 --- a/init/systemd/ipa.service.in +++ b/init/systemd/ipa.service.in @@ -1,6 +1,6 @@ [Unit] Description=Identity, Policy, Audit -Requires=network.target +Wants=network.target Wants=gssproxy.service After=network.target -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code