[Git][NTPsec/ntpsec][21C05-GCP-Dock] 19 commits: CI: shuffle asciidoc classic and py3 jobs to where they will run right ...
James Browning (@jamesb_fe80)
gitlab at mg.gitlab.com
Sat May 15 14:17:26 UTC 2021
James Browning pushed to branch 21C05-GCP-Dock at NTPsec / ntpsec
Commits:
ea8b172e by James Browning at 2021-03-02T11:48:57-08:00
CI: shuffle asciidoc classic and py3 jobs to where they will run right ....
The job that was used to run the asciidoc py3 test got stuck installing
tex of all things and the jobs that were used to run asciidoc classic
tests had silently shifted to py3.
Move the classic jobs to Debian oldstable where the will run for a
while correctly and move the py3 job to AlpineLinux where it does
not have to worry about tex. Also, exploit our docker images for a
small speed boost.
- - - - -
cce9e9a3 by James Browning at 2021-03-23T17:31:39+00:00
ntpq: -c rv should return associd only when variable(s) not passed.
- - - - -
e47ea601 by James Browning at 2021-03-23T11:09:13-07:00
Remove redundant Asciidoc classic job which migrated to Asciidoc py3
- - - - -
4490b839 by James Browning at 2021-03-23T11:11:40-07:00
Ignore scheduled failing 'shell not found' job on Tumbleweed.
- - - - -
f673320a by Richard Laager at 2021-03-24T01:03:51-05:00
Fix a comment
This function clearly runs both python and non-python tests, so
"non-python" is incorrect.
- - - - -
b9a12069 by Matt Selsky at 2021-03-26T02:32:43-04:00
Remove CI targets for development versions of Ubuntu and openSUSE
The development versions of the distributions fail frequently (by design), and
we want to focus our energy on supporting stable distribution releases.
See NTPsec/ntpsec#698
- - - - -
01c29ffa by Richard Laager at 2021-03-28T00:14:42+00:00
jigs.py: Remove unnecessary shebang
This file is not designed to be directly executed.
Refs #670
- - - - -
b566e38a by Richard Laager at 2021-03-28T00:14:42+00:00
Remove shebangs from test/pylib/*
These are not executed directly, but are instead run explicitly under
the target Python.
Refs #670
- - - - -
9b2e1ce2 by Richard Laager at 2021-03-28T00:14:42+00:00
bin_test: Refactor version
This is a pure refactoring step to simplify the upcoming commit.
Refs #670
- - - - -
caa4aba1 by Richard Laager at 2021-03-28T00:14:42+00:00
bin_test: Run Python tests under the target Python
In a Python cross scenario, the tests need to run under the target
Python, not the waf Python in order to be able to load the module (which
was compiled for the target Python).
Fixes #670
- - - - -
1f185940 by Matt Selsky at 2021-03-30T22:16:59+00:00
Switch macOS CI targets to open-beta images
gitlab-com/macos-buildcloud-runners-beta#2
- - - - -
7a940ebb by Matt Selsky at 2021-05-10T03:08:25+00:00
ubuntu-rolling needs gpgv explicitly installed in order to be able to verify packages
- - - - -
212a56e3 by Matt Selsky at 2021-05-10T03:32:39+00:00
We need gpgv before any updating can be done
- - - - -
fc50a701 by Eric S. Raymond at 2021-05-11T08:10:10-04:00
Don't generate # into ASCIIfied keys.
- - - - -
1a8e2da3 by James Browning at 2021-05-12T09:10:12-07:00
CI: apply gitlab-runner #27614 fix, mostly addresses #687 r3 ...
Fix two and attempt third of fedora:latest runners
restore opensuse:tumbleweed, ubuntu:devel
fix an ubuntu:rolling job, the other is key related
- - - - -
4fd93e49 by James Browning at 2021-05-13T12:15:12-07:00
contrib: fix unlikely comment initiator in keygone.py
- - - - -
0d0ac7a9 by James Browning at 2021-05-13T12:15:12-07:00
docs: remove -M from keygen options mention
- - - - -
c769a19d by James Browning at 2021-05-13T12:38:35-07:00
docs: replace old sx5.gif with newer one w/o background
- - - - -
fb551768 by James Browning at 2021-05-15T07:16:45-07:00
CI: Wildly weild almighty system crush power to form tar ball. -r5
- - - - -
19 changed files:
- − .dockerfiles/opensuse-tumbleweed
- − .dockerfiles/ubuntu-devel
- .dockerfiles/ubuntu-rolling
- .gitlab-ci-docker-images.yml
- .gitlab-ci.yml
- .gitlab-opttest-ci.yml
- contrib/keygone.py
- docs/includes/ntpkeygen-body.adoc
- docs/pic/sx5.gif
- ntpclients/ntpkeygen.py
- ntpclients/ntpq.py
- tests/pylib/jigs.py
- tests/pylib/test_agentx.py
- tests/pylib/test_agentx_packet.py
- tests/pylib/test_ntpc.py
- tests/pylib/test_packet.py
- tests/pylib/test_statfiles.py
- tests/pylib/test_util.py
- wafhelpers/bin_test.py
Changes:
=====================================
.dockerfiles/opensuse-tumbleweed deleted
=====================================
@@ -1,3 +0,0 @@
-FROM opensuse/tumbleweed
-
-RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses libbsd-devel
=====================================
.dockerfiles/ubuntu-devel deleted
=====================================
@@ -1,4 +0,0 @@
-FROM ubuntu:devel
-
-RUN apt-get update
-RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev
=====================================
.dockerfiles/ubuntu-rolling
=====================================
@@ -1,4 +1,5 @@
FROM ubuntu:rolling
+RUN apt install gpgv
RUN apt-get update
RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev libbsd-dev
=====================================
.gitlab-ci-docker-images.yml
=====================================
@@ -74,9 +74,6 @@ build-gentoo-hardened:
build-opensuse-leap:
<<: *build_definition
-build-opensuse-tumbleweed:
- <<: *build_definition
-
build-python3-rc:
<<: *build_definition
@@ -85,6 +82,3 @@ build-ubuntu-latest:
build-ubuntu-rolling:
<<: *build_definition
-
-build-ubuntu-devel:
- <<: *build_definition
=====================================
.gitlab-ci.yml
=====================================
@@ -1,493 +1,9 @@
-pages:
- stage: build
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine-pages
- rules:
- - if: '$CI_PIPELINE_SOURCE == "schedule"'
+build-cross:
script:
- - python3 ./waf configure --prefix=/tmp/docbot-local --htmldir=`pwd`/public/latest/ --enable-doc --disable-manpage build install
- - cp www/favicon.ico public
- - cp docs/top.html.in public/index.html
- - cp docs/top-asciidoc.css public/asciidoc.css
- - mv public/latest/404.html public/404.html
- - sed -i -E -e 's!\./(asciidoc\.(js|css))!\./latest/\1!g' public/404.html
- - find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
- allow_failure: true
+ - sudo -n tar -zcpvf blob.tar.gz --exclude=blob.tar.gz /*
+ tags:
+ - ubuntu-1604-lts
artifacts:
paths:
- - public
- tags:
- - gitlab-org
-
-include:
- - template: Code-Quality.gitlab-ci.yml
- - template: SAST.gitlab-ci.yml
- - template: License-Scanning.gitlab-ci.yml
- - local: '.gitlab-opttest-ci.yml'
- - local: '.gitlab-ci-docker-images.yml'
-
-.job_template: &job_definition
+ - blob.tar.gz
stage: build
- rules:
- - if: '$CI_PIPELINE_SOURCE != "schedule"'
- tags:
- - gitlab-org
-
-.job_template_allow_failure: &job_definition_allow_failure
- <<: *job_definition
- allow_failure: true
-
-alpine-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-alpine-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-alpine-edge-basic:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-alpine-edge-refclocks:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine-edge
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-AsciiDoc-3-Fedora:
- <<: *job_definition_allow_failure
- image: fedora
- script:
- - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel wget unzip libxslt docbook-style-xsl
- - wget https://asciidoc3.org/asciidoc3-3.2.0.zip
- - unzip asciidoc3-3.2.0.zip -d asciidoc3
- - ln -sv a2x3.py asciidoc3/a2x3
- - ln -sv asciidoc3.py asciidoc3/asciidoc3
- - asciidoc3/asciidoc3 --version || echo -n
- - PATH="$PWD/asciidoc3:$PATH" python3 ./waf configure --enable-doc --enable-manpage build
-
-AsciiDoc-classic2-Alpine:
- <<: *job_definition
- image: alpine
- script:
- - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev asciidoc
- - python ./waf configure --enable-doc --enable-manpage build
-
-AsciiDoc-classic3-Alpine:
- <<: *job_definition
- image: alpine
- script:
- - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoc
- - python3 ./waf configure --enable-doc --enable-manpage build
-
-AsciiDoc-no:
- <<: *job_definition
- image: alpine
- script:
- - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev
- - python ./waf configure --disable-doc --disable-manpage build
-
-AsciiDoc-py3-Ubuntu:
- <<: *job_definition
- image: ubuntu:devel
- script:
- - apt-get update
- - DEBIAN_FRONTEND="noninteractive" apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev asciidoc-base
- - python3 ./waf configure --enable-doc --enable-manpage build
-
-debian-oldstable-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-debian-oldstable-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-oldstable
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
-
-debian-stable-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-debian-stable-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-debian-testing-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-debian-testing-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-testing
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-debian-unstable-basic:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-debian-unstable-refclocks:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-unstable
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-ubuntu-latest-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-ubuntu-latest-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-latest
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-ubuntu-rolling-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-ubuntu-rolling-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-rolling
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-ubuntu-devel-basic:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-ubuntu-devel-refclocks:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/ubuntu-devel
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-freebsd-11-basic:
- <<: *job_definition
- script:
- - python ./waf configure --disable-doc --disable-manpage --disable-nts build
- - DESTDIR=build/prison python ./waf install
- - DESTDIR=./prison python ./waf install
- - DESTDIR=../prison python ./waf install
- - rm -rvf build/prison ./prison ../prison
- tags:
- - freebsd-11
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-freebsd-11-refclocks:
- <<: *job_definition
- script:
- - python ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
- tags:
- - freebsd-11
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-freebsd-12-basic:
- <<: *job_definition
- script:
- - python ./waf configure --disable-doc --disable-manpage build
- - DESTDIR=build/prison python ./waf install
- - DESTDIR=./prison python ./waf install
- - DESTDIR=../prison python ./waf install
- - rm -rvf build/prison ./prison ../prison
- tags:
- - freebsd-12
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-freebsd-12-refclocks:
- <<: *job_definition
- script:
- - python ./waf configure --disable-doc --disable-manpage --refclock=all build
- tags:
- - freebsd-12
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-centos-latest-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-centos-latest-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/centos-latest
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-fedora-latest-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-fedora-latest-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/fedora-latest
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-python3-rc:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/python3-rc
- script:
- - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-python-coverage:
- <<: *job_definition
- script:
- - apt-get update -qq && apt-get install -y -qq netbase bison python-dev python-coverage
- - python ./waf configure --disable-doc --disable-manpage build
- - for i in build/main/tests/pylib/test_*; do python-coverage run -a --source build/main/pylib "$i"; done
- - python-coverage report
-
-clang-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/clang
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-clang-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/clang
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang --refclock=all build
-
-openSUSE-leap-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --disable-nts build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-openSUSE-leap-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-leap
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --disable-nts --refclock=all build
-
-openSUSE-tumbleweed-basic:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-tumbleweed
- script:
- - python3 ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - python3 ./waf install
- - python3 ./waf uninstall
-
-openSUSE-tumbleweed-refclocks:
- <<: *job_definition_allow_failure
- image: $CI_REGISTRY/ntpsec/ntpsec/opensuse-tumbleweed
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-debian-stable-basic-32bit:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-i386
- script:
- - python ./waf configure --disable-doc --disable-manpage build
-
-debian-stable-refclocks-32bit:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-i386
- script:
- - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-debian-stable-mDNS-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
- script:
- - python ./waf configure --disable-doc --disable-manpage build
-
-debian-stable-mDNS-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/debian-stable-mdns
- script:
- - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-cross-build:
- <<: *job_definition_allow_failure
- script:
- - PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-manpage --disable-nts --cross-compiler=arm-linux-gnueabihf-gcc-5 --cross-cflags '-I/srv/arm-local/include -I/srv/arm-local/include/python2.7' --cross-ldflags '-L/srv/arm-local/lib' --pythondir=/srv/arm-local/lib/python2.7/dist-packages --pythonarchdir=/srv/arm-local/lib/python2.7/dist-packages build
- tags:
- - ubuntu-1604-lts
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-gentoo-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
- script:
- - python ./waf configure --disable-doc --disable-manpage build
- - DESTDIR=build/prison python ./waf install
- - DESTDIR=./prison python ./waf install
- - DESTDIR=../prison python ./waf install
- - python ./waf install
- - python ./waf uninstall
- - rm -rvf build/prison ./prison ../prison
-
-gentoo-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/gentoo
- script:
- - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-gentoo-hardened-basic:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/gentoo-hardened
- script:
- - python ./waf configure --disable-doc --disable-manpage build
- - DESTDIR=build/prison python ./waf install
- - DESTDIR=./prison python ./waf install
- - DESTDIR=../prison python ./waf install
- - python ./waf install
- - python ./waf uninstall
- - rm -rvf build/prison ./prison ../prison
-
-gentoo-hardened-refclocks:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/gentoo-hardened
- script:
- - python ./waf configure --disable-doc --disable-manpage --refclock=all build
-
-coverity-scan:
- image: $CI_REGISTRY/ntpsec/ntpsec/coverity
- script:
- - curl -o /tmp/cov-analysis-linux64.tgz --form project=ntpsec --form token="${COVERITY_TOKEN}" https://scan.coverity.com/download/linux64
- - tar zxf /tmp/cov-analysis-linux64.tgz
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all
- - cov-analysis-linux64-*/bin/cov-build --dir cov-int python3 ./waf build
- - tar czf ntpsec_coverity.tgz cov-int
- - curl --form token="${COVERITY_TOKEN}" --form email=security at ntpsec.org --form file=@ntpsec_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=ntpsec
- tags:
- - gitlab-org
- rules:
- - if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-macos-basic:
- <<: *job_definition
- script:
- - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage build --pyshebang "/usr/bin/env python3"
- - DESTDIR=build/prison python ./waf install
- - DESTDIR=./prison python ./waf install
- - DESTDIR=../prison python ./waf install
- - python ./waf install
- - python ./waf uninstall
- - rm -rvf build/prison ./prison ../prison
- tags:
- - macos
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-macos-refclocks:
- <<: *job_definition
- script:
- - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build
- tags:
- - macos
- rules:
- - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
-
-feature-classic-mode:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-classic-mode build
-
-feature-seccomp:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine-seccomp
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-seccomp build
-
-feature-debug:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
-
-feature-debug-gdb:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-gdb build
-
-feature-debug-timing:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-timing build
-
-feature-disable-droproot:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-droproot build
-
-feature-early-droproot:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-early-droproot build
-
-feature-leap-smear:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-leap-smear build
-
-feature-mssntp:
- <<: *job_definition
- image: $CI_REGISTRY/ntpsec/ntpsec/alpine
- script:
- - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-mssntp build
=====================================
.gitlab-opttest-ci.yml
=====================================
@@ -28,7 +28,9 @@ centos-options-tester:
- dnf -y --enablerepo=powertools install bison gcc openssl-devel libcap-devel python3-devel python2-devel pps-tools-devel libseccomp-devel bash
fedora-latest-options-tester:
- image: fedora:latest
+ image:
+ name: fedora:latest
+ entrypoint: [ '/bin/bash', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0' ]
script:
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel python2-devel libseccomp-devel bash
<<: *option_tester
@@ -39,12 +41,6 @@ opensuse-leap-options-tester:
script:
- zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses libseccomp-devel python3-devel python3-curses bash
-opensuse-tumbleweed-options-tester:
- <<: *option_tester
- image: opensuse/tumbleweed
- script:
- - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses libseccomp-devel python3-devel python3-curses bash
-
gentoo-options-tester:
<<: *option_tester
image: gentoo/stage3-amd64
@@ -62,11 +58,12 @@ gentoo-hardened-options-tester:
macos-options-tester:
stage: test
needs: []
+ image: macos-11-xcode-12
script:
- PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig PYTHON=python2.7 tests/option-tester.sh||true
- PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig PYTHON=python3 tests/option-tester.sh
tags:
- - macos
+ - shared-macos-amd64
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH && $CI_PROJECT_PATH == "NTPsec/ntpsec"'
@@ -142,14 +139,18 @@ debian-unstable-options-tester:
image: debian:unstable-slim
<<: *deb_option_tester
-ubuntu-devel-options-tester:
- image: ubuntu:devel
- <<: *deb_option_tester
-
ubuntu-latest-options-tester:
image: ubuntu:latest
<<: *deb_option_tester
+ubuntu-devel-options-tester:
+ image:
+ name: ubuntu:devel
+ entrypoint: [ '/bin/sh', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0']
+ <<: *deb_option_tester
+
ubuntu-rolling-options-tester:
- image: ubuntu:rolling
+ image:
+ name: ubuntu:rolling
+ entrypoint: [ '/bin/sh', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0']
<<: *deb_option_tester
=====================================
contrib/keygone.py
=====================================
@@ -106,7 +106,7 @@ class KeyGone():
return secrets.token_hex(length)
result = ''
for _ in range(length):
- result += chr(0x21 + secrets.randbelow(0x5d))
+ result += chr(0x24 + secrets.randbelow(0x5a))
return result
=====================================
docs/includes/ntpkeygen-body.adoc
=====================================
@@ -4,7 +4,7 @@
== Synopsis
[verse]
-+ntpkeygen+ [+-MV+]
++ntpkeygen+ [+-V+]
== Description
=====================================
docs/pic/sx5.gif
=====================================
Binary files a/docs/pic/sx5.gif and b/docs/pic/sx5.gif differ
=====================================
ntpclients/ntpkeygen.py
=====================================
@@ -33,7 +33,8 @@ try:
if asciified:
result = ''
for index in range(bytes):
- result += chr(0x21 + secrets.randbelow(0x5d))
+ # Start ASCII characters with 0x24 so as not to include comment-beginning #
+ result += chr(0x24 + secrets.randbelow(0x5a))
return result
else:
return secrets.token_hex(bytes)
@@ -43,7 +44,8 @@ except ImportError:
result = ''
if asciified:
for index in range(bytes):
- result += chr(random.randint(0x21, 0x7e))
+ # Start ASCII characters with 0x24 so as not to include comment-beginning #
+ result += chr(random.randint(0x24, 0x7e))
else:
for index in range(bytes):
result += "%02x" % random.randint(0x0, 0xff)
=====================================
ntpclients/ntpq.py
=====================================
@@ -981,9 +981,10 @@ usage: writelist [ assocID ]
associd = self.__assoc_valid(line)
if associd >= 0:
qtype = ntp.ntpc.TYPE_SYS if associd == 0 else ntp.ntpc.TYPE_PEER
+ silence = bool(len(line.split()) >= 2)
# Some scripts written for C ntpq need associd printed here
self.__dolist(line.split()[1:], associd,
- ntp.control.CTL_OP_READVAR, qtype)
+ ntp.control.CTL_OP_READVAR, qtype, quiet=silence)
def help_readvar(self):
self.say("""\
=====================================
tests/pylib/jigs.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division
=====================================
tests/pylib/test_agentx.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
import ntp.agentx as AX
=====================================
tests/pylib/test_agentx_packet.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
=====================================
tests/pylib/test_ntpc.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: BSD-2-Clause
import unittest
=====================================
tests/pylib/test_packet.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division
=====================================
tests/pylib/test_statfiles.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
=====================================
tests/pylib/test_util.py
=====================================
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
=====================================
wafhelpers/bin_test.py
=====================================
@@ -6,36 +6,32 @@ import sys
import waflib.Context
import waflib.Logs
import waflib.Utils
-sys.path.insert(0, "%s/main/tests/pylib" % waflib.Context.out_dir)
-import ntp.util
-version = ntp.util.stdversion()
Popen = waflib.Utils.subprocess.Popen
cmd_map = {
- ("main/ntpclients/ntpleapfetch", "--version"): "ntpleapfetch %s\n"
- % version,
- ("main/ntpd/ntpd", "--version"): "ntpd %s\n" % version,
- ("main/ntpfrob/ntpfrob", "-V"): "ntpfrob %s\n" % version,
- ("main/ntptime/ntptime", "-V"): "ntptime %s\n" % version
+ ("main/ntpclients/ntpleapfetch", "--version"): "ntpleapfetch %s\n",
+ ("main/ntpd/ntpd", "--version"): "ntpd %s\n",
+ ("main/ntpfrob/ntpfrob", "-V"): "ntpfrob %s\n",
+ ("main/ntptime/ntptime", "-V"): "ntptime %s\n"
}
cmd_map_python = {
- ("main/ntpclients/ntpdig", "--version"): "ntpdig %s\n" % version,
- ("main/ntpclients/ntpkeygen", "--version"): "ntpkeygen %s\n" % version,
- ("main/ntpclients/ntpq", "--version"): "ntpq %s\n" % version,
- ("main/ntpclients/ntpsnmpd", "--version"): "ntpsnmpd %s\n" % version,
- ("main/ntpclients/ntpsweep", "--version"): "ntpsweep %s\n" % version,
- ("main/ntpclients/ntptrace", "--version"): "ntptrace %s\n" % version,
- ("main/ntpclients/ntpwait", "--version"): "ntpwait %s\n" % version
+ ("main/ntpclients/ntpdig", "--version"): "ntpdig %s\n",
+ ("main/ntpclients/ntpkeygen", "--version"): "ntpkeygen %s\n",
+ ("main/ntpclients/ntpq", "--version"): "ntpq %s\n",
+ ("main/ntpclients/ntpsnmpd", "--version"): "ntpsnmpd %s\n",
+ ("main/ntpclients/ntpsweep", "--version"): "ntpsweep %s\n",
+ ("main/ntpclients/ntptrace", "--version"): "ntptrace %s\n",
+ ("main/ntpclients/ntpwait", "--version"): "ntpwait %s\n"
}
# Need argparse
cmd_map_python_argparse = {
- ("main/ntpclients/ntplogtemp", "--version"): "ntplogtemp %s\n" % version,
- ("main/ntpclients/ntpviz", "--version"): "ntpviz %s\n" % version,
+ ("main/ntpclients/ntplogtemp", "--version"): "ntplogtemp %s\n",
+ ("main/ntpclients/ntpviz", "--version"): "ntpviz %s\n",
}
# Need python curses
cmd_map_python_curses = {
- ("main/ntpclients/ntpmon", "--version"): "ntpmon %s\n" % version,
+ ("main/ntpclients/ntpmon", "--version"): "ntpmon %s\n",
}
test_logs = []
@@ -52,16 +48,17 @@ def bin_test_summary(ctx):
waflib.Logs.pprint(i[0], i[1])
-def run(cmd, expected, pythonic):
- """Run an individual non-python test."""
+def run(cmd, expected, python=None):
+ """Run an individual test."""
+
prefix = "running: " + " ".join(cmd)
if not os.path.exists("%s/%s" % (waflib.Context.out_dir, cmd[0])):
addLog("YELLOW", prefix + " SKIPPING (does not exist)")
return False
- if pythonic:
- cmd = [sys.executable] + list(cmd)
+ if python:
+ cmd = python + list(cmd)
p = Popen(cmd, env={'PYTHONPATH': '%s/main/tests/pylib' %
waflib.Context.out_dir},
universal_newlines=True,
@@ -88,6 +85,18 @@ def cmd_bin_test(ctx):
"""Run a suite of binary tests."""
fails = 0
+ cmd = ctx.env['PYTHON'] + ['-c',
+ 'from __future__ import print_function;'
+ 'import ntp.util;'
+ 'print(ntp.util.stdversion())']
+ p = waflib.Utils.subprocess.Popen(cmd, env={'PYTHONPATH': '%s/main/tests/pylib' %
+ waflib.Context.out_dir},
+ universal_newlines=True,
+ stdin=waflib.Utils.subprocess.PIPE,
+ stdout=waflib.Utils.subprocess.PIPE,
+ stderr=waflib.Utils.subprocess.PIPE, cwd=waflib.Context.out_dir)
+ version = p.communicate()[0].rstrip()
+
if ctx.env['PYTHON_ARGPARSE']:
cmd_map_python.update(cmd_map_python_argparse)
@@ -95,11 +104,11 @@ def cmd_bin_test(ctx):
cmd_map_python.update(cmd_map_python_curses)
for cmd in sorted(cmd_map):
- if not run(cmd, cmd_map[cmd], False):
+ if not run(cmd, cmd_map[cmd] % version):
fails += 1
for cmd in sorted(cmd_map_python):
- if not run(cmd, cmd_map_python[cmd], True):
+ if not run(cmd, cmd_map_python[cmd] % version, ctx.env['PYTHON']):
fails += 1
if 1 == fails:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/232898d7aa2ffdb6422423dad6de265c4c72d948...fb5517688c38c1731da247c63d9971c1c03bedd1
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/232898d7aa2ffdb6422423dad6de265c4c72d948...fb5517688c38c1731da247c63d9971c1c03bedd1
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20210515/8ed11c5e/attachment-0001.htm>
More information about the vc
mailing list