Compare commits
172 Commits
test-fix-i
...
pipstrap2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
315206ca1e | ||
|
|
3bbc45de73 | ||
|
|
6c7b99f7e0 | ||
|
|
3673ca77a5 | ||
|
|
bb45c9aa41 | ||
|
|
4c347f5576 | ||
|
|
bf07ec20b0 | ||
|
|
fc864543a7 | ||
|
|
4fa1df3075 | ||
|
|
cfd0a6ff1f | ||
|
|
00ed56afd6 | ||
|
|
b6e3a3ad02 | ||
|
|
f04008cb25 | ||
|
|
a1c3e010e3 | ||
|
|
9289f8b225 | ||
|
|
50ef97bb23 | ||
|
|
ef0c0e89aa | ||
|
|
987648dd10 | ||
|
|
2ad71f0199 | ||
|
|
7d4e9d8e1b | ||
|
|
ae59f44233 | ||
|
|
2e13222004 | ||
|
|
c250957ab0 | ||
|
|
aeb09095c3 | ||
|
|
4eb0b560c5 | ||
|
|
0efc7019a9 | ||
|
|
cb916a0682 | ||
|
|
88386e8c82 | ||
|
|
a64e1f0129 | ||
|
|
fea176449c | ||
|
|
ff03e34c70 | ||
|
|
6fc832677e | ||
|
|
725870d558 | ||
|
|
631c88b209 | ||
|
|
6a093bd35a | ||
|
|
afb07cf50d | ||
|
|
aa61e6ad4e | ||
|
|
8a3aed0476 | ||
|
|
afc5baad4a | ||
|
|
eff761ab1e | ||
|
|
5f040a8e32 | ||
|
|
5173ab6b90 | ||
|
|
448fd9145a | ||
|
|
ac8798e818 | ||
|
|
34694251dd | ||
|
|
cc76906712 | ||
|
|
ef8c481634 | ||
|
|
c12404451d | ||
|
|
e378931eda | ||
|
|
160b209394 | ||
|
|
cac9d8f75e | ||
|
|
7f0fa18c57 | ||
|
|
fca7ec896a | ||
|
|
e066766cc9 | ||
|
|
be6c890874 | ||
|
|
feca125437 | ||
|
|
1be005289a | ||
|
|
79297ef5cb | ||
|
|
5ec29ca60b | ||
|
|
9a72db5b9b | ||
|
|
14cbf67d65 | ||
|
|
b20aaff661 | ||
|
|
a66f4e1150 | ||
|
|
501df0dc4e | ||
|
|
b551b6ee73 | ||
|
|
71d9dfa86e | ||
|
|
6628bc0e9b | ||
|
|
f43fa12fc0 | ||
|
|
2b425110dc | ||
|
|
55d411f1eb | ||
|
|
7ddd327f63 | ||
|
|
3a615176c5 | ||
|
|
e79af1b1de | ||
|
|
c8828dab30 | ||
|
|
f85b738e2f | ||
|
|
95a6b61cdc | ||
|
|
21b320ef42 | ||
|
|
8c81a1aaf8 | ||
|
|
ec147740ee | ||
|
|
b7b0ec321e | ||
|
|
7fe7a965f5 | ||
|
|
9f243c768f | ||
|
|
b841f0f307 | ||
|
|
8e736479f7 | ||
|
|
2ceabadb81 | ||
|
|
a2951b4db1 | ||
|
|
98615564ed | ||
|
|
3ce87d1fcb | ||
|
|
d62d853ea4 | ||
|
|
70731dd75b | ||
|
|
ae7b4a1755 | ||
|
|
f66a592e37 | ||
|
|
e8518bf206 | ||
|
|
2a047eb526 | ||
|
|
bc137103a3 | ||
|
|
085967ad29 | ||
|
|
4e9d3afcc4 | ||
|
|
acb6d34c5f | ||
|
|
63ec74276c | ||
|
|
e8a232297d | ||
|
|
575092d603 | ||
|
|
2d62dec7ec | ||
|
|
f93b90f87a | ||
|
|
f40e5bdefe | ||
|
|
9bbcc0046c | ||
|
|
b3dd2c09ba | ||
|
|
8574313841 | ||
|
|
a677534462 | ||
|
|
22730dc0ac | ||
|
|
086e6c46b6 | ||
|
|
bc0ed3cb01 | ||
|
|
220cc07239 | ||
|
|
271be07267 | ||
|
|
48a0cc0c42 | ||
|
|
5415fc201c | ||
|
|
b08fdc7dfb | ||
|
|
6eb5954f0e | ||
|
|
6ec83d52b5 | ||
|
|
403ded5c58 | ||
|
|
4d3f6c23be | ||
|
|
6d73b21dcf | ||
|
|
072c070c0c | ||
|
|
df1ca726f9 | ||
|
|
086c8b1b3e | ||
|
|
09ab4aea01 | ||
|
|
a6f2061ff7 | ||
|
|
02c1339753 | ||
|
|
a1cd909247 | ||
|
|
9ee4831f78 | ||
|
|
14dfbdbea5 | ||
|
|
270b5535e2 | ||
|
|
74b0340a13 | ||
|
|
b13dfc6437 | ||
|
|
c5bab9b07c | ||
|
|
b6964cae2e | ||
|
|
ebf1349b15 | ||
|
|
9d2e0ac013 | ||
|
|
40a2a5b99f | ||
|
|
1697d66ba7 | ||
|
|
a6a998d11b | ||
|
|
d64bb81864 | ||
|
|
88e183e69e | ||
|
|
8192e3eb85 | ||
|
|
d8e9f558c2 | ||
|
|
3a997a5631 | ||
|
|
361d1f732e | ||
|
|
9483b33ec1 | ||
|
|
bc5b079b2a | ||
|
|
bca73f9932 | ||
|
|
a180d5d5c9 | ||
|
|
78624a2b8c | ||
|
|
695107bc98 | ||
|
|
fb323e083a | ||
|
|
5713decf23 | ||
|
|
c194381f04 | ||
|
|
b92eb6f620 | ||
|
|
ea44834c41 | ||
|
|
a730b00a36 | ||
|
|
5e01467e2c | ||
|
|
e9a9a180bb | ||
|
|
67fddae90d | ||
|
|
7337f64180 | ||
|
|
d296ef2dcd | ||
|
|
f64386c73c | ||
|
|
1666e85118 | ||
|
|
db522aa155 | ||
|
|
d0d7521215 | ||
|
|
2fc6f6e619 | ||
|
|
d8ab321894 | ||
|
|
62b054f265 | ||
|
|
1d1c096067 | ||
|
|
bcffaab602 |
@@ -1,13 +1,14 @@
|
||||
# Advanced pipeline for running our full test suite on demand and for release branches.
|
||||
# Advanced pipeline for running our full test suite on demand.
|
||||
trigger:
|
||||
- '*.x'
|
||||
# When changing these triggers, please ensure the documentation under
|
||||
# "Running tests in CI" is still correct.
|
||||
- test-*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
# We don't publish our Docker images in this pipeline, but when building them
|
||||
# for testing, let's use the nightly tag.
|
||||
dockerTag: nightly
|
||||
|
||||
stages:
|
||||
- template: templates/stages/test-and-package-stage.yml
|
||||
# Notify failures only for release branches.
|
||||
- ${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
|
||||
- template: templates/stages/notify-failure-stage.yml
|
||||
|
||||
@@ -9,6 +9,9 @@ schedules:
|
||||
- master
|
||||
always: true
|
||||
|
||||
variables:
|
||||
dockerTag: nightly
|
||||
|
||||
stages:
|
||||
- template: templates/stages/test-and-package-stage.yml
|
||||
- template: templates/stages/deploy-stage.yml
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
# Release pipeline to build and deploy Certbot for Windows for GitHub release tags
|
||||
# Release pipeline to run our full test suite, build artifacts, and deploy them
|
||||
# for GitHub release tags.
|
||||
trigger:
|
||||
tags:
|
||||
include:
|
||||
- v*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
dockerTag: ${{variables['Build.SourceBranchName']}}
|
||||
|
||||
stages:
|
||||
- template: templates/stages/test-and-package-stage.yml
|
||||
- template: templates/stages/changelog-stage.yml
|
||||
- template: templates/stages/deploy-stage.yml
|
||||
parameters:
|
||||
snapReleaseChannel: beta
|
||||
- template: templates/stages/notify-failure-stage.yml
|
||||
|
||||
@@ -3,6 +3,8 @@ jobs:
|
||||
variables:
|
||||
- name: IMAGE_NAME
|
||||
value: ubuntu-18.04
|
||||
- name: PYTHON_VERSION
|
||||
value: 3.8
|
||||
- group: certbot-common
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -36,14 +38,6 @@ jobs:
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: integration
|
||||
ACME_SERVER: boulder-v2
|
||||
linux-boulder-v1-py35-integration:
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: integration
|
||||
ACME_SERVER: boulder-v1
|
||||
linux-boulder-v2-py35-integration:
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: integration
|
||||
ACME_SERVER: boulder-v2
|
||||
linux-boulder-v1-py36-integration:
|
||||
PYTHON_VERSION: 3.6
|
||||
TOXENV: integration
|
||||
@@ -70,16 +64,15 @@ jobs:
|
||||
ACME_SERVER: boulder-v2
|
||||
nginx-compat:
|
||||
TOXENV: nginx_compat
|
||||
le-auto-jessie:
|
||||
TOXENV: le_auto_jessie
|
||||
le-auto-centos6:
|
||||
TOXENV: le_auto_centos6
|
||||
le-auto-oraclelinux6:
|
||||
TOXENV: le_auto_oraclelinux6
|
||||
docker-dev:
|
||||
TOXENV: docker_dev
|
||||
farmtest-apache2:
|
||||
PYTHON_VERSION: 3.7
|
||||
macos-farmtest-apache2:
|
||||
# We run one of these test farm tests on macOS to help ensure the
|
||||
# tests continue to work on the platform.
|
||||
IMAGE_NAME: macOS-10.15
|
||||
PYTHON_VERSION: 3.8
|
||||
TOXENV: test-farm-apache2
|
||||
farmtest-leauto-upgrades:
|
||||
PYTHON_VERSION: 3.7
|
||||
|
||||
@@ -1,4 +1,55 @@
|
||||
jobs:
|
||||
- job: docker_build
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
amd64:
|
||||
DOCKER_ARCH: amd64
|
||||
# Do not run the heavy non-amd64 builds for test branches
|
||||
${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
|
||||
arm32v6:
|
||||
DOCKER_ARCH: arm32v6
|
||||
arm64v8:
|
||||
DOCKER_ARCH: arm64v8
|
||||
steps:
|
||||
- bash: set -e && tools/docker/build.sh $(dockerTag) $DOCKER_ARCH
|
||||
displayName: Build the Docker images
|
||||
# We don't filter for the Docker Hub organization to continue to allow
|
||||
# easy testing of these scripts on forks.
|
||||
- bash: |
|
||||
set -e
|
||||
DOCKER_IMAGES=$(docker images --filter reference='*/certbot' --filter reference='*/dns-*' --format '{{.Repository}}')
|
||||
docker save --output images.tar $DOCKER_IMAGES
|
||||
displayName: Save the Docker images
|
||||
# If the name of the tar file or artifact changes, the deploy stage will
|
||||
# also need to be updated.
|
||||
- bash: set -e && mv images.tar $(Build.ArtifactStagingDirectory)
|
||||
displayName: Prepare Docker artifact
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
artifact: docker_$(DOCKER_ARCH)
|
||||
displayName: Store Docker artifact
|
||||
- job: docker_run
|
||||
dependsOn: docker_build
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: docker_amd64
|
||||
path: $(Build.SourcesDirectory)
|
||||
displayName: Retrieve Docker images
|
||||
- bash: set -e && docker load --input $(Build.SourcesDirectory)/images.tar
|
||||
displayName: Load Docker images
|
||||
- bash: |
|
||||
set -ex
|
||||
DOCKER_IMAGES=$(docker images --filter reference='*/certbot' --filter reference='*/dns-*' --format '{{.Repository}}:{{.Tag}}')
|
||||
for DOCKER_IMAGE in ${DOCKER_IMAGES}
|
||||
do docker run --rm "${DOCKER_IMAGE}" plugins --prepare
|
||||
done
|
||||
displayName: Run integration tests for Docker images
|
||||
- job: installer_build
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
@@ -18,6 +69,7 @@ jobs:
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
# If we change the artifact's name, it should also be changed in tools/create_github_release.py
|
||||
artifact: windows-installer
|
||||
displayName: Publish Windows installer
|
||||
- job: installer_run
|
||||
@@ -47,8 +99,11 @@ jobs:
|
||||
path: $(Build.SourcesDirectory)/bin
|
||||
displayName: Retrieve Windows installer
|
||||
- script: |
|
||||
py -3 -m venv venv
|
||||
python -m venv venv
|
||||
venv\Scripts\python tools\pipstrap.py
|
||||
venv\Scripts\python tools\pip_install.py -e certbot-ci
|
||||
env:
|
||||
PIP_NO_BUILD_ISOLATION: no
|
||||
displayName: Prepare Certbot-CI
|
||||
- script: |
|
||||
set PATH=%ProgramFiles(x86)%\Certbot\bin;%PATH%
|
||||
@@ -58,81 +113,86 @@ jobs:
|
||||
set PATH=%ProgramFiles(x86)%\Certbot\bin;%PATH%
|
||||
venv\Scripts\python -m pytest certbot-ci\certbot_integration_tests\certbot_tests -n 4
|
||||
displayName: Run certbot integration tests
|
||||
- job: snap_build
|
||||
strategy:
|
||||
matrix:
|
||||
amd64:
|
||||
ARCH: amd64
|
||||
# Do not run the QEMU jobs for test branches
|
||||
${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
|
||||
arm64:
|
||||
ARCH: arm64
|
||||
armhf:
|
||||
ARCH: armhf
|
||||
- job: snaps_build
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
timeoutInMinutes: 0
|
||||
variables:
|
||||
# Do not run the heavy non-amd64 builds for test branches
|
||||
${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
|
||||
ARCHS: amd64 arm64 armhf
|
||||
${{ if startsWith(variables['Build.SourceBranchName'], 'test-') }}:
|
||||
ARCHS: amd64
|
||||
steps:
|
||||
- script: |
|
||||
tools/snap/build.sh ${ARCH}
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends snapd
|
||||
sudo snap install --classic snapcraft
|
||||
displayName: Install dependencies
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: 3.8
|
||||
addToPath: true
|
||||
- task: DownloadSecureFile@1
|
||||
name: credentials
|
||||
inputs:
|
||||
secureFile: launchpad-credentials
|
||||
- script: |
|
||||
set -e
|
||||
git config --global user.email "$(Build.RequestedForEmail)"
|
||||
git config --global user.name "$(Build.RequestedFor)"
|
||||
mkdir -p ~/.local/share/snapcraft/provider/launchpad
|
||||
cp $(credentials.secureFilePath) ~/.local/share/snapcraft/provider/launchpad/credentials
|
||||
python3 tools/snap/build_remote.py ALL --archs ${ARCHS}
|
||||
displayName: Build snaps
|
||||
- script: |
|
||||
set -e
|
||||
mv *.snap $(Build.ArtifactStagingDirectory)
|
||||
displayName: Build Certbot snap
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
artifact: snap-$(arch)
|
||||
displayName: Store snap artifact
|
||||
- job: snap_dns_build
|
||||
strategy:
|
||||
matrix:
|
||||
amd64:
|
||||
ARCH: amd64
|
||||
# Do not run the QEMU jobs for test branches
|
||||
${{ if not(startsWith(variables['Build.SourceBranchName'], 'test-')) }}:
|
||||
arm64:
|
||||
ARCH: arm64
|
||||
armhf:
|
||||
ARCH: armhf
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
steps:
|
||||
- script: |
|
||||
tools/snap/build_dns.sh ${ARCH} ALL
|
||||
mv certbot-dns-*/*.snap $(Build.ArtifactStagingDirectory)
|
||||
displayName: Build Certbot DNS snaps
|
||||
displayName: Prepare artifacts
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
artifact: dns-snap-$(arch)
|
||||
artifact: snaps
|
||||
displayName: Store snaps artifacts
|
||||
- job: snap_run
|
||||
dependsOn: snap_build
|
||||
dependsOn: snaps_build
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: 3.8
|
||||
addToPath: true
|
||||
- script: |
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends nginx-light snapd
|
||||
python tools/pip_install.py -U tox
|
||||
python3 -m venv venv
|
||||
venv/bin/python tools/pipstrap.py
|
||||
venv/bin/python tools/pip_install.py -U tox
|
||||
displayName: Install dependencies
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: snap-amd64
|
||||
artifact: snaps
|
||||
path: $(Build.SourcesDirectory)/snap
|
||||
displayName: Retrieve Certbot snap
|
||||
displayName: Retrieve Certbot snaps
|
||||
- script: |
|
||||
sudo snap install --dangerous --classic snap/*.snap
|
||||
set -e
|
||||
sudo snap install --dangerous --classic snap/certbot_*_amd64.snap
|
||||
displayName: Install Certbot snap
|
||||
- script: |
|
||||
python -m tox -e integration-external,apacheconftest-external-with-pebble
|
||||
set -e
|
||||
venv/bin/python -m tox -e integration-external,apacheconftest-external-with-pebble
|
||||
displayName: Run tox
|
||||
- job: snap_dns_run
|
||||
dependsOn:
|
||||
- snap_build
|
||||
- snap_dns_build
|
||||
dependsOn: snaps_build
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
steps:
|
||||
- script: |
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends snapd
|
||||
displayName: Install dependencies
|
||||
@@ -142,18 +202,16 @@ jobs:
|
||||
addToPath: true
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: snap-amd64
|
||||
artifact: snaps
|
||||
path: $(Build.SourcesDirectory)/snap
|
||||
displayName: Retrieve Certbot snap
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: dns-snap-amd64
|
||||
path: $(Build.SourcesDirectory)/snap
|
||||
displayName: Retrieve Certbot DNS plugins snaps
|
||||
displayName: Retrieve Certbot snaps
|
||||
- script: |
|
||||
set -e
|
||||
python3 -m venv venv
|
||||
venv/bin/python tools/pipstrap.py
|
||||
venv/bin/python tools/pip_install.py -e certbot-ci
|
||||
displayName: Prepare Certbot-CI
|
||||
- script: |
|
||||
sudo -E venv/bin/pytest certbot-ci/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder $(Build.SourcesDirectory)/snap
|
||||
set -e
|
||||
sudo -E venv/bin/pytest certbot-ci/snap_integration_tests/dns_tests --allow-persistent-changes --snap-folder $(Build.SourcesDirectory)/snap --snap-arch amd64
|
||||
displayName: Test DNS plugins snaps
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
jobs:
|
||||
- job: test
|
||||
variables:
|
||||
PYTHON_VERSION: 3.8
|
||||
strategy:
|
||||
matrix:
|
||||
macos-py27:
|
||||
IMAGE_NAME: macOS-10.14
|
||||
IMAGE_NAME: macOS-10.15
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: py27
|
||||
macos-py38:
|
||||
IMAGE_NAME: macOS-10.14
|
||||
IMAGE_NAME: macOS-10.15
|
||||
PYTHON_VERSION: 3.8
|
||||
TOXENV: py38
|
||||
windows-py35:
|
||||
windows-py36:
|
||||
IMAGE_NAME: vs2017-win2016
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: py35
|
||||
PYTHON_VERSION: 3.6
|
||||
TOXENV: py36
|
||||
windows-py37-cover:
|
||||
IMAGE_NAME: vs2017-win2016
|
||||
PYTHON_VERSION: 3.7
|
||||
@@ -32,10 +34,10 @@ jobs:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: py27
|
||||
linux-py35:
|
||||
linux-py36:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: py35
|
||||
PYTHON_VERSION: 3.6
|
||||
TOXENV: py36
|
||||
linux-py38-cover:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.8
|
||||
@@ -44,9 +46,9 @@ jobs:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.7
|
||||
TOXENV: lint
|
||||
linux-py35-mypy:
|
||||
linux-py36-mypy:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.5
|
||||
PYTHON_VERSION: 3.6
|
||||
TOXENV: mypy
|
||||
linux-integration:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
@@ -56,9 +58,9 @@ jobs:
|
||||
apache-compat:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
TOXENV: apache_compat
|
||||
le-auto-xenial:
|
||||
le-auto-centos6:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
TOXENV: le_auto_xenial
|
||||
TOXENV: le_auto_centos6
|
||||
apacheconftest:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 2.7
|
||||
|
||||
@@ -5,12 +5,15 @@ stages:
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
steps:
|
||||
# If we change the output filename from `release_notes.md`, it should also be changed in tools/create_github_release.py
|
||||
- bash: |
|
||||
set -e
|
||||
CERTBOT_VERSION="$(cd certbot && python -c "import certbot; print(certbot.__version__)" && cd ~-)"
|
||||
"${BUILD_REPOSITORY_LOCALPATH}\tools\extract_changelog.py" "${CERTBOT_VERSION}" >> "${BUILD_ARTIFACTSTAGINGDIRECTORY}/release_notes.md"
|
||||
displayName: Prepare changelog
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
# If we change the artifact's name, it should also be changed in tools/create_github_release.py
|
||||
artifact: changelog
|
||||
displayName: Publish changelog
|
||||
|
||||
@@ -1,50 +1,99 @@
|
||||
parameters:
|
||||
- name: snapReleaseChannel
|
||||
type: string
|
||||
default: edge
|
||||
values:
|
||||
- edge
|
||||
- beta
|
||||
|
||||
stages:
|
||||
- stage: Deploy
|
||||
jobs:
|
||||
# This job relies on a snapcraft.cfg preconfigured with credential,
|
||||
# stored as a secure file in Azure Pipeline.
|
||||
# This credential has a maximum lifetime of 1 year and the current
|
||||
# credential will expire on 6/25/2021. The content of snapcraft.cfg
|
||||
# will need to be updated to use a new credential before then to
|
||||
# prevent automated deploys from breaking. Remembering to do this is
|
||||
# also tracked by https://github.com/certbot/certbot/issues/7931.
|
||||
# This job relies on credentials used to publish the Certbot snaps. This
|
||||
# credential file was created by running:
|
||||
#
|
||||
# snapcraft logout
|
||||
# snapcraft login (provide the shared snapcraft credentials when prompted)
|
||||
# snapcraft export-login --channels=beta,edge snapcraft.cfg
|
||||
#
|
||||
# Then the file was added as a secure file in Azure pipelines
|
||||
# with the name snapcraft.cfg by following the instructions at
|
||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/library/secure-files?view=azure-devops
|
||||
# including authorizing the file in all pipelines as described at
|
||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/library/secure-files?view=azure-devops#how-do-i-authorize-a-secure-file-for-use-in-all-pipelines.
|
||||
#
|
||||
# This file has a maximum lifetime of one year and the current
|
||||
# file will expire on 2021-07-28 which is also tracked by
|
||||
# https://github.com/certbot/certbot/issues/7931. The file will
|
||||
# need to be updated before then to prevent automated deploys
|
||||
# from breaking.
|
||||
#
|
||||
# Revoking these credentials can be done by changing the password of the
|
||||
# account used to generate the credentials. See
|
||||
# https://forum.snapcraft.io/t/revoking-exported-credentials/19031 for
|
||||
# more info.
|
||||
- job: publish_snap
|
||||
strategy:
|
||||
matrix:
|
||||
amd64:
|
||||
ARCH: amd64
|
||||
arm64:
|
||||
ARCH: arm64
|
||||
armhf:
|
||||
ARCH: armhf
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
variables:
|
||||
- group: certbot-common
|
||||
steps:
|
||||
- bash: |
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends snapd
|
||||
sudo snap install --classic snapcraft
|
||||
displayName: Install dependencies
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: snap-$(arch)
|
||||
artifact: snaps
|
||||
path: $(Build.SourcesDirectory)/snap
|
||||
displayName: Retrieve Certbot snap
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: dns-snap-$(arch)
|
||||
path: $(Build.SourcesDirectory)/snap
|
||||
displayName: Retrieve DNS plugins snaps
|
||||
displayName: Retrieve Certbot snaps
|
||||
- task: DownloadSecureFile@1
|
||||
name: snapcraftCfg
|
||||
inputs:
|
||||
secureFile: snapcraft.cfg
|
||||
- bash: |
|
||||
set -e
|
||||
mkdir -p .snapcraft
|
||||
ln -s $(snapcraftCfg.secureFilePath) .snapcraft/snapcraft.cfg
|
||||
for SNAP_FILE in snap/*.snap; do
|
||||
snapcraft upload --release=edge "${SNAP_FILE}"
|
||||
tools/retry.sh eval snapcraft upload --release=${{ parameters.snapReleaseChannel }} "${SNAP_FILE}"
|
||||
done
|
||||
displayName: Publish to Snap store
|
||||
- job: publish_docker
|
||||
pool:
|
||||
vmImage: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
amd64:
|
||||
DOCKER_ARCH: amd64
|
||||
arm32v6:
|
||||
DOCKER_ARCH: arm32v6
|
||||
arm64v8:
|
||||
DOCKER_ARCH: arm64v8
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
artifact: docker_$(DOCKER_ARCH)
|
||||
path: $(Build.SourcesDirectory)
|
||||
displayName: Retrieve Docker images
|
||||
- bash: set -e && docker load --input $(Build.SourcesDirectory)/images.tar
|
||||
displayName: Load Docker images
|
||||
- task: Docker@2
|
||||
inputs:
|
||||
command: login
|
||||
# The credentials used here are for the shared certbotbot account
|
||||
# on Docker Hub. The credentials are stored in a service account
|
||||
# which was created by following the instructions at
|
||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#sep-docreg.
|
||||
# The name given to this service account must match the value
|
||||
# given to containerRegistry below. "Grant access to all
|
||||
# pipelines" should also be checked. To revoke these
|
||||
# credentials, we can change the password on the certbotbot
|
||||
# Docker Hub account or remove the account from the
|
||||
# Certbot organization on Docker Hub.
|
||||
containerRegistry: docker-hub
|
||||
displayName: Login to Docker Hub
|
||||
- bash: set -e && tools/docker/deploy.sh $(dockerTag) $DOCKER_ARCH
|
||||
displayName: Deploy the Docker images
|
||||
|
||||
@@ -8,6 +8,7 @@ stages:
|
||||
vmImage: ubuntu-latest
|
||||
steps:
|
||||
- bash: |
|
||||
set -e
|
||||
MESSAGE="\
|
||||
---\n\
|
||||
##### Azure Pipeline
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
steps:
|
||||
- bash: |
|
||||
set -e
|
||||
brew install augeas
|
||||
condition: startswith(variables['IMAGE_NAME'], 'macOS')
|
||||
displayName: Install MacOS dependencies
|
||||
- bash: |
|
||||
set -e
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
python-dev \
|
||||
@@ -21,7 +23,6 @@ steps:
|
||||
inputs:
|
||||
versionSpec: $(PYTHON_VERSION)
|
||||
addToPath: true
|
||||
condition: ne(variables['PYTHON_VERSION'], '')
|
||||
# tools/pip_install.py is used to pin packages to a known working version
|
||||
# except in tests where the environment variable CERTBOT_NO_PIN is set.
|
||||
# virtualenv is listed here explicitly to make sure it is upgraded when
|
||||
@@ -30,6 +31,8 @@ steps:
|
||||
# set, pip updates dependencies it thinks are already satisfied to avoid some
|
||||
# problems with its lack of real dependency resolution.
|
||||
- bash: |
|
||||
set -e
|
||||
python tools/pipstrap.py
|
||||
python tools/pip_install.py -I tox virtualenv
|
||||
displayName: Install runtime dependencies
|
||||
- task: DownloadSecureFile@1
|
||||
@@ -38,6 +41,7 @@ steps:
|
||||
secureFile: azure-test-farm.pem
|
||||
condition: contains(variables['TOXENV'], 'test-farm')
|
||||
- bash: |
|
||||
set -e
|
||||
export TARGET_BRANCH="`echo "${BUILD_SOURCEBRANCH}" | sed -E 's!refs/(heads|tags)/!!g'`"
|
||||
[ -z "${SYSTEM_PULLREQUEST_TARGETBRANCH}" ] || export TARGET_BRANCH="${SYSTEM_PULLREQUEST_TARGETBRANCH}"
|
||||
env
|
||||
|
||||
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
end_of_line = lf
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
max_line_length = 100
|
||||
|
||||
[*.yaml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
12
.envrc
Normal file
12
.envrc
Normal file
@@ -0,0 +1,12 @@
|
||||
# This file is just a nicety for developers who use direnv. When you cd under
|
||||
# the Certbot repo, Certbot's virtual environment will be automatically
|
||||
# activated and then deactivated when you cd elsewhere. Developers have to have
|
||||
# direnv set up and run `direnv allow` to allow this file to execute on their
|
||||
# system. You can find more information at https://direnv.net/.
|
||||
. venv3/bin/activate
|
||||
# direnv doesn't support modifying PS1 so we unset it to squelch the error
|
||||
# it'll otherwise print about this being done in the activate script. See
|
||||
# https://github.com/direnv/direnv/wiki/PS1. If you would like your shell
|
||||
# prompt to change like it normally does, see
|
||||
# https://github.com/direnv/direnv/wiki/Python#restoring-the-ps1.
|
||||
unset PS1
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -60,3 +60,7 @@ stage
|
||||
*.snap
|
||||
snap-constraints.txt
|
||||
qemu-*
|
||||
certbot-dns*/certbot-dns*_amd64*.txt
|
||||
certbot-dns*/certbot-dns*_arm*.txt
|
||||
/certbot_amd64*.txt
|
||||
/certbot_arm*.txt
|
||||
|
||||
@@ -61,6 +61,7 @@ Authors
|
||||
* [Daniel Albers](https://github.com/AID)
|
||||
* [Daniel Aleksandersen](https://github.com/da2x)
|
||||
* [Daniel Convissor](https://github.com/convissor)
|
||||
* [Daniel "Drex" Drexler](https://github.com/aeturnum)
|
||||
* [Daniel Huang](https://github.com/dhuang)
|
||||
* [Dave Guarino](https://github.com/daguar)
|
||||
* [David cz](https://github.com/dave-cz)
|
||||
@@ -237,6 +238,7 @@ Authors
|
||||
* [Spencer Bliven](https://github.com/sbliven)
|
||||
* [Stacey Sheldon](https://github.com/solidgoldbomb)
|
||||
* [Stavros Korokithakis](https://github.com/skorokithakis)
|
||||
* [Ștefan Talpalaru](https://github.com/stefantalpalaru)
|
||||
* [Stefan Weil](https://github.com/stweil)
|
||||
* [Steve Desmond](https://github.com/stevedesmond-ca)
|
||||
* [sydneyli](https://github.com/sydneyli)
|
||||
|
||||
@@ -11,7 +11,7 @@ to the Sphinx generated docs is provided below.
|
||||
|
||||
|
||||
[1] https://github.com/blog/1184-contributing-guidelines
|
||||
[2] http://docutils.sourceforge.net/docs/user/rst/quickref.html#hyperlink-targets
|
||||
[2] https://docutils.sourceforge.io/docs/user/rst/quickref.html#hyperlink-targets
|
||||
|
||||
-->
|
||||
|
||||
|
||||
@@ -448,7 +448,7 @@ class Client(ClientBase):
|
||||
heapq.heapify(waiting)
|
||||
# mapping between original Authorization Resource and the most
|
||||
# recently updated one
|
||||
updated = dict((authzr, authzr) for authzr in authzrs)
|
||||
updated = {authzr: authzr for authzr in authzrs}
|
||||
|
||||
while waiting:
|
||||
# find the smallest Retry-After, and sleep if necessary
|
||||
@@ -801,7 +801,7 @@ class ClientV2(ClientBase):
|
||||
"""
|
||||
# Can't use response.links directly because it drops multiple links
|
||||
# of the same relation type, which is possible in RFC8555 responses.
|
||||
if not 'Link' in response.headers:
|
||||
if 'Link' not in response.headers:
|
||||
return []
|
||||
links = parse_header_links(response.headers['Link'])
|
||||
return [l['url'] for l in links
|
||||
|
||||
@@ -206,7 +206,7 @@ class Directory(jose.JSONDeSerializable):
|
||||
external_account_required = jose.Field('externalAccountRequired', omitempty=True)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
kwargs = dict((self._internal_name(k), v) for k, v in kwargs.items())
|
||||
kwargs = {self._internal_name(k): v for k, v in kwargs.items()}
|
||||
super(Directory.Meta, self).__init__(**kwargs)
|
||||
|
||||
@property
|
||||
@@ -315,6 +315,9 @@ class Registration(ResourceBody):
|
||||
# on new-reg key server ignores 'key' and populates it based on
|
||||
# JWS.signature.combined.jwk
|
||||
key = jose.Field('key', omitempty=True, decoder=jose.JWK.from_json)
|
||||
# Contact field implements special behavior to allow messages that clear existing
|
||||
# contacts while not expecting the `contact` field when loading from json.
|
||||
# This is implemented in the constructor and *_json methods.
|
||||
contact = jose.Field('contact', omitempty=True, default=())
|
||||
agreement = jose.Field('agreement', omitempty=True)
|
||||
status = jose.Field('status', omitempty=True)
|
||||
@@ -327,24 +330,73 @@ class Registration(ResourceBody):
|
||||
|
||||
@classmethod
|
||||
def from_data(cls, phone=None, email=None, external_account_binding=None, **kwargs):
|
||||
"""Create registration resource from contact details."""
|
||||
"""
|
||||
Create registration resource from contact details.
|
||||
|
||||
The `contact` keyword being passed to a Registration object is meaningful, so
|
||||
this function represents empty iterables in its kwargs by passing on an empty
|
||||
`tuple`.
|
||||
"""
|
||||
|
||||
# Note if `contact` was in kwargs.
|
||||
contact_provided = 'contact' in kwargs
|
||||
|
||||
# Pop `contact` from kwargs and add formatted email or phone numbers
|
||||
details = list(kwargs.pop('contact', ()))
|
||||
if phone is not None:
|
||||
details.append(cls.phone_prefix + phone)
|
||||
if email is not None:
|
||||
details.extend([cls.email_prefix + mail for mail in email.split(',')])
|
||||
kwargs['contact'] = tuple(details)
|
||||
|
||||
# Insert formatted contact information back into kwargs
|
||||
# or insert an empty tuple if `contact` provided.
|
||||
if details or contact_provided:
|
||||
kwargs['contact'] = tuple(details)
|
||||
|
||||
if external_account_binding:
|
||||
kwargs['external_account_binding'] = external_account_binding
|
||||
|
||||
return cls(**kwargs)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
"""Note if the user provides a value for the `contact` member."""
|
||||
if 'contact' in kwargs:
|
||||
# Avoid the __setattr__ used by jose.TypedJSONObjectWithFields
|
||||
object.__setattr__(self, '_add_contact', True)
|
||||
super(Registration, self).__init__(**kwargs)
|
||||
|
||||
def _filter_contact(self, prefix):
|
||||
return tuple(
|
||||
detail[len(prefix):] for detail in self.contact # pylint: disable=not-an-iterable
|
||||
if detail.startswith(prefix))
|
||||
|
||||
def _add_contact_if_appropriate(self, jobj):
|
||||
"""
|
||||
The `contact` member of Registration objects should not be required when
|
||||
de-serializing (as it would be if the Fields' `omitempty` flag were `False`), but
|
||||
it should be included in serializations if it was provided.
|
||||
|
||||
:param jobj: Dictionary containing this Registrations' data
|
||||
:type jobj: dict
|
||||
|
||||
:returns: Dictionary containing Registrations data to transmit to the server
|
||||
:rtype: dict
|
||||
"""
|
||||
if getattr(self, '_add_contact', False):
|
||||
jobj['contact'] = self.encode('contact')
|
||||
|
||||
return jobj
|
||||
|
||||
def to_partial_json(self):
|
||||
"""Modify josepy.JSONDeserializable.to_partial_json()"""
|
||||
jobj = super(Registration, self).to_partial_json()
|
||||
return self._add_contact_if_appropriate(jobj)
|
||||
|
||||
def fields_to_partial_json(self):
|
||||
"""Modify josepy.JSONObjectWithFields.fields_to_partial_json()"""
|
||||
jobj = super(Registration, self).fields_to_partial_json()
|
||||
return self._add_contact_if_appropriate(jobj)
|
||||
|
||||
@property
|
||||
def phones(self):
|
||||
"""All phones found in the ``contact`` field."""
|
||||
@@ -413,7 +465,7 @@ class ChallengeBody(ResourceBody):
|
||||
omitempty=True, default=None)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
kwargs = dict((self._internal_name(k), v) for k, v in kwargs.items())
|
||||
kwargs = {self._internal_name(k): v for k, v in kwargs.items()}
|
||||
super(ChallengeBody, self).__init__(**kwargs)
|
||||
|
||||
def encode(self, name):
|
||||
|
||||
@@ -4,4 +4,4 @@ import six
|
||||
|
||||
def map_keys(dikt, func):
|
||||
"""Map dictionary keys."""
|
||||
return dict((func(key), value) for key, value in six.iteritems(dikt))
|
||||
return {func(key): value for key, value in six.iteritems(dikt)}
|
||||
|
||||
@@ -9,7 +9,7 @@ BUILDDIR = _build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
|
||||
@@ -120,7 +120,7 @@ todo_include_todos = False
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -65,7 +65,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -4,9 +4,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -47,22 +46,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
|
||||
setup(
|
||||
name='acme',
|
||||
version=version,
|
||||
@@ -71,7 +54,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
@@ -80,7 +63,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -95,7 +77,4 @@ setup(
|
||||
'dev': dev_extras,
|
||||
'docs': docs_extras,
|
||||
},
|
||||
test_suite='acme',
|
||||
tests_require=["pytest"],
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
@@ -853,7 +853,7 @@ class ClientV2Test(ClientTestBase):
|
||||
self.response.json.return_value = updated_order.to_json()
|
||||
self.response.text = CERT_SAN_PEM
|
||||
self.response.headers['Link'] ='<https://example.com/acme/cert/1>;rel="alternate", ' + \
|
||||
'<https://exaple.com/dir>;rel="index", ' + \
|
||||
'<https://example.com/dir>;rel="index", ' + \
|
||||
'<https://example.com/acme/cert/2>;title="foo";rel="alternate"'
|
||||
|
||||
deadline = datetime.datetime(9999, 9, 9)
|
||||
@@ -1342,7 +1342,7 @@ class ClientNetworkSourceAddressBindingTest(unittest.TestCase):
|
||||
# test should fail if the default adapter type is changed by requests
|
||||
net = ClientNetwork(key=None, alg=None)
|
||||
session = requests.Session()
|
||||
for scheme in session.adapters.keys():
|
||||
for scheme in session.adapters:
|
||||
client_network_adapter = net.session.adapters.get(scheme)
|
||||
default_adapter = session.adapters.get(scheme)
|
||||
self.assertEqual(client_network_adapter.__class__, default_adapter.__class__)
|
||||
|
||||
@@ -254,6 +254,19 @@ class RegistrationTest(unittest.TestCase):
|
||||
from acme.messages import Registration
|
||||
hash(Registration.from_json(self.jobj_from))
|
||||
|
||||
def test_default_not_transmitted(self):
|
||||
from acme.messages import NewRegistration
|
||||
empty_new_reg = NewRegistration()
|
||||
new_reg_with_contact = NewRegistration(contact=())
|
||||
|
||||
self.assertEqual(empty_new_reg.contact, ())
|
||||
self.assertEqual(new_reg_with_contact.contact, ())
|
||||
|
||||
self.assertTrue('contact' not in empty_new_reg.to_partial_json())
|
||||
self.assertTrue('contact' not in empty_new_reg.fields_to_partial_json())
|
||||
self.assertTrue('contact' in new_reg_with_contact.to_partial_json())
|
||||
self.assertTrue('contact' in new_reg_with_contact.fields_to_partial_json())
|
||||
|
||||
|
||||
class UpdateRegistrationTest(unittest.TestCase):
|
||||
"""Tests for acme.messages.UpdateRegistration."""
|
||||
|
||||
@@ -6,7 +6,7 @@ Authors:
|
||||
Raphael Pinson <raphink@gmail.com>
|
||||
|
||||
About: Reference
|
||||
Online Apache configuration manual: http://httpd.apache.org/docs/trunk/
|
||||
Online Apache configuration manual: https://httpd.apache.org/docs/trunk/
|
||||
|
||||
About: License
|
||||
This file is licensed under the LGPL v2+.
|
||||
|
||||
@@ -1462,7 +1462,7 @@ class ApacheConfigurator(common.Installer):
|
||||
if not line.lower().lstrip().startswith("rewriterule"):
|
||||
return False
|
||||
|
||||
# According to: http://httpd.apache.org/docs/2.4/rewrite/flags.html
|
||||
# According to: https://httpd.apache.org/docs/2.4/rewrite/flags.html
|
||||
# The syntax of a RewriteRule is:
|
||||
# RewriteRule pattern target [Flag1,Flag2,Flag3]
|
||||
# i.e. target is required, so it must exist.
|
||||
|
||||
@@ -731,7 +731,6 @@ class ApacheParser(object):
|
||||
privileged users.
|
||||
|
||||
https://apr.apache.org/docs/apr/2.0/apr__fnmatch_8h_source.html
|
||||
http://apache2.sourcearchive.com/documentation/2.2.16-6/apr__fnmatch_8h_source.html
|
||||
|
||||
:param str clean_fn_match: Apache style filename match, like globs
|
||||
|
||||
@@ -799,7 +798,7 @@ class ApacheParser(object):
|
||||
def _parsed_by_parser_paths(self, filep, paths):
|
||||
"""Helper function that searches through provided paths and returns
|
||||
True if file path is found in the set"""
|
||||
for directory in paths.keys():
|
||||
for directory in paths:
|
||||
for filename in paths[directory]:
|
||||
if fnmatch.fnmatch(filep, os.path.join(directory, filename)):
|
||||
return True
|
||||
|
||||
@@ -4,9 +4,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -32,21 +31,6 @@ dev_extras = [
|
||||
'apacheconfig>=0.3.2',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
|
||||
setup(
|
||||
name='certbot-apache',
|
||||
version=version,
|
||||
@@ -55,7 +39,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -66,7 +50,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -89,7 +72,4 @@ setup(
|
||||
'apache = certbot_apache._internal.entrypoint:ENTRYPOINT',
|
||||
],
|
||||
},
|
||||
test_suite='certbot_apache',
|
||||
tests_require=["pytest"],
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
@@ -52,7 +52,7 @@ function Cleanup() {
|
||||
# if our environment asks us to enable modules, do our best!
|
||||
if [ "$1" = --debian-modules ] ; then
|
||||
sudo apt-get install -y apache2
|
||||
sudo apt-get install -y libapache2-mod-wsgi
|
||||
sudo apt-get install -y libapache2-mod-wsgi-py3
|
||||
sudo apt-get install -y libapache2-mod-macro
|
||||
|
||||
for mod in ssl rewrite macro wsgi deflate userdir version mime setenvif ; do
|
||||
|
||||
@@ -140,7 +140,7 @@ class MultipleVhostsTestCentOS(util.ApacheTest):
|
||||
self.assertEqual(mock_get.call_count, 3)
|
||||
self.assertEqual(len(self.config.parser.modules), 4)
|
||||
self.assertEqual(len(self.config.parser.variables), 2)
|
||||
self.assertTrue("TEST2" in self.config.parser.variables.keys())
|
||||
self.assertTrue("TEST2" in self.config.parser.variables)
|
||||
self.assertTrue("mod_another.c" in self.config.parser.modules)
|
||||
|
||||
def test_get_virtual_hosts(self):
|
||||
@@ -172,11 +172,11 @@ class MultipleVhostsTestCentOS(util.ApacheTest):
|
||||
mock_osi.return_value = ("centos", "7")
|
||||
self.config.parser.update_runtime_variables()
|
||||
|
||||
self.assertTrue("mock_define" in self.config.parser.variables.keys())
|
||||
self.assertTrue("mock_define_too" in self.config.parser.variables.keys())
|
||||
self.assertTrue("mock_value" in self.config.parser.variables.keys())
|
||||
self.assertTrue("mock_define" in self.config.parser.variables)
|
||||
self.assertTrue("mock_define_too" in self.config.parser.variables)
|
||||
self.assertTrue("mock_value" in self.config.parser.variables)
|
||||
self.assertEqual("TRUE", self.config.parser.variables["mock_value"])
|
||||
self.assertTrue("MOCK_NOSEP" in self.config.parser.variables.keys())
|
||||
self.assertTrue("MOCK_NOSEP" in self.config.parser.variables)
|
||||
self.assertEqual("NOSEP_VAL", self.config.parser.variables["NOSEP_TWO"])
|
||||
|
||||
@mock.patch("certbot_apache._internal.configurator.util.run_script")
|
||||
|
||||
@@ -134,7 +134,7 @@ class MultipleVhostsTestFedora(util.ApacheTest):
|
||||
self.assertEqual(mock_get.call_count, 3)
|
||||
self.assertEqual(len(self.config.parser.modules), 4)
|
||||
self.assertEqual(len(self.config.parser.variables), 2)
|
||||
self.assertTrue("TEST2" in self.config.parser.variables.keys())
|
||||
self.assertTrue("TEST2" in self.config.parser.variables)
|
||||
self.assertTrue("mod_another.c" in self.config.parser.modules)
|
||||
|
||||
@mock.patch("certbot_apache._internal.configurator.util.run_script")
|
||||
@@ -172,11 +172,11 @@ class MultipleVhostsTestFedora(util.ApacheTest):
|
||||
mock_osi.return_value = ("fedora", "29")
|
||||
self.config.parser.update_runtime_variables()
|
||||
|
||||
self.assertTrue("mock_define" in self.config.parser.variables.keys())
|
||||
self.assertTrue("mock_define_too" in self.config.parser.variables.keys())
|
||||
self.assertTrue("mock_value" in self.config.parser.variables.keys())
|
||||
self.assertTrue("mock_define" in self.config.parser.variables)
|
||||
self.assertTrue("mock_define_too" in self.config.parser.variables)
|
||||
self.assertTrue("mock_value" in self.config.parser.variables)
|
||||
self.assertEqual("TRUE", self.config.parser.variables["mock_value"])
|
||||
self.assertTrue("MOCK_NOSEP" in self.config.parser.variables.keys())
|
||||
self.assertTrue("MOCK_NOSEP" in self.config.parser.variables)
|
||||
self.assertEqual("NOSEP_VAL", self.config.parser.variables["NOSEP_TWO"])
|
||||
|
||||
@mock.patch("certbot_apache._internal.configurator.util.run_script")
|
||||
|
||||
@@ -91,7 +91,7 @@ class MultipleVhostsTestGentoo(util.ApacheTest):
|
||||
with mock.patch("certbot_apache._internal.override_gentoo.GentooParser.update_modules"):
|
||||
self.config.parser.update_runtime_variables()
|
||||
for define in defines:
|
||||
self.assertTrue(define in self.config.parser.variables.keys())
|
||||
self.assertTrue(define in self.config.parser.variables)
|
||||
|
||||
@mock.patch("certbot_apache._internal.apache_util.parse_from_subprocess")
|
||||
def test_no_binary_configdump(self, mock_subprocess):
|
||||
|
||||
@@ -26,8 +26,6 @@ class ApacheTest(unittest.TestCase):
|
||||
config_root="debian_apache_2_4/multiple_vhosts/apache2",
|
||||
vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available"):
|
||||
# pylint: disable=arguments-differ
|
||||
super(ApacheTest, self).setUp()
|
||||
|
||||
self.temp_dir, self.config_dir, self.work_dir = common.dir_setup(
|
||||
test_dir=test_dir,
|
||||
pkg=__name__)
|
||||
|
||||
78
certbot-auto
78
certbot-auto
@@ -31,7 +31,7 @@ if [ -z "$VENV_PATH" ]; then
|
||||
fi
|
||||
VENV_BIN="$VENV_PATH/bin"
|
||||
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
||||
LE_AUTO_VERSION="1.6.0"
|
||||
LE_AUTO_VERSION="1.9.0"
|
||||
BASENAME=$(basename $0)
|
||||
USAGE="Usage: $BASENAME [OPTIONS]
|
||||
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
||||
@@ -258,7 +258,7 @@ DeprecationBootstrap() {
|
||||
|
||||
MIN_PYTHON_2_VERSION="2.7"
|
||||
MIN_PYVER2=$(echo "$MIN_PYTHON_2_VERSION" | sed 's/\.//')
|
||||
MIN_PYTHON_3_VERSION="3.5"
|
||||
MIN_PYTHON_3_VERSION="3.6"
|
||||
MIN_PYVER3=$(echo "$MIN_PYTHON_3_VERSION" | sed 's/\.//')
|
||||
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
||||
# digits of the python version.
|
||||
@@ -806,10 +806,7 @@ if [ -f /etc/debian_version ]; then
|
||||
BOOTSTRAP_VERSION="BootstrapDebCommon $BOOTSTRAP_DEB_COMMON_VERSION"
|
||||
elif [ -f /etc/mageia-release ]; then
|
||||
# Mageia has both /etc/mageia-release and /etc/redhat-release
|
||||
Bootstrap() {
|
||||
ExperimentalBootstrap "Mageia" BootstrapMageiaCommon
|
||||
}
|
||||
BOOTSTRAP_VERSION="BootstrapMageiaCommon $BOOTSTRAP_MAGEIA_COMMON_VERSION"
|
||||
DEPRECATED_OS=1
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
# Run DeterminePythonVersion to decide on the basis of available Python versions
|
||||
# whether to use 2.x or 3.x on RedHat-like systems.
|
||||
@@ -884,31 +881,11 @@ elif [ -f /etc/redhat-release ]; then
|
||||
|
||||
LE_PYTHON="$prev_le_python"
|
||||
elif [ -f /etc/os-release ] && `grep -q openSUSE /etc/os-release` ; then
|
||||
Bootstrap() {
|
||||
BootstrapMessage "openSUSE-based OSes"
|
||||
BootstrapSuseCommon
|
||||
}
|
||||
BOOTSTRAP_VERSION="BootstrapSuseCommon $BOOTSTRAP_SUSE_COMMON_VERSION"
|
||||
DEPRECATED_OS=1
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
Bootstrap() {
|
||||
if [ "$DEBUG" = 1 ]; then
|
||||
BootstrapMessage "Archlinux"
|
||||
BootstrapArchCommon
|
||||
else
|
||||
error "Please use pacman to install letsencrypt packages:"
|
||||
error "# pacman -S certbot certbot-apache"
|
||||
error
|
||||
error "If you would like to use the virtualenv way, please run the script again with the"
|
||||
error "--debug flag."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
BOOTSTRAP_VERSION="BootstrapArchCommon $BOOTSTRAP_ARCH_COMMON_VERSION"
|
||||
DEPRECATED_OS=1
|
||||
elif [ -f /etc/manjaro-release ]; then
|
||||
Bootstrap() {
|
||||
ExperimentalBootstrap "Manjaro Linux" BootstrapArchCommon
|
||||
}
|
||||
BOOTSTRAP_VERSION="BootstrapArchCommon $BOOTSTRAP_ARCH_COMMON_VERSION"
|
||||
DEPRECATED_OS=1
|
||||
elif [ -f /etc/gentoo-release ]; then
|
||||
DEPRECATED_OS=1
|
||||
elif uname | grep -iq FreeBSD ; then
|
||||
@@ -921,19 +898,9 @@ elif [ -f /etc/issue ] && grep -iq "Amazon Linux" /etc/issue ; then
|
||||
}
|
||||
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
||||
elif [ -f /etc/product ] && grep -q "Joyent Instance" /etc/product ; then
|
||||
Bootstrap() {
|
||||
ExperimentalBootstrap "Joyent SmartOS Zone" BootstrapSmartOS
|
||||
}
|
||||
BOOTSTRAP_VERSION="BootstrapSmartOS $BOOTSTRAP_SMARTOS_VERSION"
|
||||
DEPRECATED_OS=1
|
||||
else
|
||||
Bootstrap() {
|
||||
error "Sorry, I don't know how to bootstrap Certbot on your operating system!"
|
||||
error
|
||||
error "You will need to install OS dependencies, configure virtualenv, and run pip install manually."
|
||||
error "Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites"
|
||||
error "for more info."
|
||||
exit 1
|
||||
}
|
||||
DEPRECATED_OS=1
|
||||
fi
|
||||
|
||||
# We handle this case after determining the normal bootstrap version to allow
|
||||
@@ -1530,18 +1497,18 @@ letsencrypt==0.7.0 \
|
||||
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
||||
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
||||
|
||||
certbot==1.6.0 \
|
||||
--hash=sha256:7237ac851ef7f3ff2d5ddb49e692e4bd5346273734cbc531531e4ad56d14d460 \
|
||||
--hash=sha256:d373ee0f24ab06f561efa2b00f68cff43521b003d87fbf4d9e869e7cc7395481
|
||||
acme==1.6.0 \
|
||||
--hash=sha256:dc532fee475dde07a843232f69f54b185ba23af6cce9d2e1a1dc132ce2e34f64 \
|
||||
--hash=sha256:fe76e06ae1e9b12304f9e9691ff901da6d2fd588fea2765f891b8cd15d6b3f2b
|
||||
certbot-apache==1.6.0 \
|
||||
--hash=sha256:d6080664fe24fc5dc1e519382ebe5a5215f3b886ceaa335336a1db2c1b1ed95e \
|
||||
--hash=sha256:e0232a1f1c5513701de06bccb88b57b7d76d9db28c6559fba8539f88293c85ea
|
||||
certbot-nginx==1.6.0 \
|
||||
--hash=sha256:6ef97185d9c07ea97656e7b439e7ccfa8e5090f6802e9162e8f5a79080bc5a76 \
|
||||
--hash=sha256:facc59e066d7e5623fbc068fe2fcc5e1f802c2441d148e37ff96ad90b893600a
|
||||
certbot==1.9.0 \
|
||||
--hash=sha256:d5a804d32e471050921f7b39ed9859e2e9de02824176ed78f57266222036b53a \
|
||||
--hash=sha256:2ff9bf7d9af381c7efee22dec2dd6938d9d8fddcc9e11682b86e734164a30b57
|
||||
acme==1.9.0 \
|
||||
--hash=sha256:d8061b396a22b21782c9b23ff9a945b23e50fca2573909a42f845e11d5658ac5 \
|
||||
--hash=sha256:38a1630c98e144136c62eec4d2c545a1bdb1a3cd4eca82214be6b83a1f5a161f
|
||||
certbot-apache==1.9.0 \
|
||||
--hash=sha256:09528a820d57e54984d490100644cd8a6603db97bf5776f86e95795ecfacf23d \
|
||||
--hash=sha256:f47fb3f4a9bd927f4812121a0beefe56b163475a28f4db34c64dc838688d9e9e
|
||||
certbot-nginx==1.9.0 \
|
||||
--hash=sha256:bb2e3f7fe17f071f350a3efa48571b8ef40a8e4b6db9c6da72539206a20b70be \
|
||||
--hash=sha256:ab26a4f49d53b0e8bf0f903e58e2a840cda233fe1cbbc54c36ff17f973e57d65
|
||||
|
||||
UNLIKELY_EOF
|
||||
# -------------------------------------------------------------------------
|
||||
@@ -1615,6 +1582,11 @@ maybe_argparse = (
|
||||
if sys.version_info < (2, 7, 0) else [])
|
||||
|
||||
|
||||
# Be careful when updating the pinned versions here, in particular for pip.
|
||||
# Indeed starting from 10.0, pip will build dependencies in isolation if the
|
||||
# related projects are compliant with PEP 517. This is not something we want
|
||||
# as of now, so the isolation build will need to be disabled wherever
|
||||
# pipstrap is used (see https://github.com/certbot/certbot/issues/8256).
|
||||
PACKAGES = maybe_argparse + [
|
||||
# Pip has no dependencies, as it vendors everything:
|
||||
('11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/'
|
||||
|
||||
@@ -92,7 +92,6 @@ def _prepare_args_env(certbot_args, directory_url, http_01_port, tls_alpn_01_por
|
||||
'--no-verify-ssl',
|
||||
'--http-01-port', str(http_01_port),
|
||||
'--https-port', str(tls_alpn_01_port),
|
||||
'--manual-public-ip-logging-ok',
|
||||
'--config-dir', config_dir,
|
||||
'--work-dir', os.path.join(workspace, 'work'),
|
||||
'--logs-dir', os.path.join(workspace, 'logs'),
|
||||
|
||||
@@ -279,16 +279,17 @@ def load_sample_data_path(workspace):
|
||||
shutil.copytree(original, copied, symlinks=True)
|
||||
|
||||
if os.name == 'nt':
|
||||
# Fix the symlinks on Windows since GIT is not creating them upon checkout
|
||||
# Fix the symlinks on Windows if GIT is not configured to create them upon checkout
|
||||
for lineage in ['a.encryption-example.com', 'b.encryption-example.com']:
|
||||
current_live = os.path.join(copied, 'live', lineage)
|
||||
for name in os.listdir(current_live):
|
||||
if name != 'README':
|
||||
current_file = os.path.join(current_live, name)
|
||||
with open(current_file) as file_h:
|
||||
src = file_h.read()
|
||||
os.unlink(current_file)
|
||||
os.symlink(os.path.join(current_live, src), current_file)
|
||||
if not os.path.islink(current_file):
|
||||
with open(current_file) as file_h:
|
||||
src = file_h.read()
|
||||
os.unlink(current_file)
|
||||
os.symlink(os.path.join(current_live, src), current_file)
|
||||
|
||||
return copied
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
'Intended Audience :: Developers',
|
||||
@@ -49,7 +49,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
|
||||
@@ -17,6 +17,8 @@ def pytest_addoption(parser):
|
||||
"""
|
||||
parser.addoption('--snap-folder', required=True,
|
||||
help='set the folder path where snaps to test are located')
|
||||
parser.addoption('--snap-arch', default='amd64',
|
||||
help='set the architecture do test (default: amd64)')
|
||||
parser.addoption('--allow-persistent-changes', action='store_true',
|
||||
help='needs to be set, and confirm that the test will make persistent changes on this machine')
|
||||
|
||||
@@ -36,5 +38,8 @@ def pytest_generate_tests(metafunc):
|
||||
Generate (multiple) parametrized calls to a test function.
|
||||
"""
|
||||
if "dns_snap_path" in metafunc.fixturenames:
|
||||
snap_dns_path_list = glob.glob(os.path.join(metafunc.config.getoption('snap_folder'), 'certbot-dns-*_*.snap'))
|
||||
snap_arch = metafunc.config.getoption('snap_arch')
|
||||
snap_folder = metafunc.config.getoption('snap_folder')
|
||||
snap_dns_path_list = glob.glob(os.path.join(snap_folder,
|
||||
'certbot-dns-*_{0}.snap'.format(snap_arch)))
|
||||
metafunc.parametrize("dns_snap_path", snap_dns_path_list)
|
||||
|
||||
@@ -11,8 +11,9 @@ def install_certbot_snap(request):
|
||||
with pytest.raises(Exception):
|
||||
subprocess.check_call(['certbot', '--version'])
|
||||
try:
|
||||
snap_path = glob.glob(os.path.join(request.config.getoption("snap_folder"),
|
||||
'certbot_*.snap'))[0]
|
||||
snap_folder = request.config.getoption("snap_folder")
|
||||
snap_arch = request.config.getoption("snap_arch")
|
||||
snap_path = glob.glob(os.path.join(snap_folder, 'certbot_*_{0}.snap'.format(snap_arch)))[0]
|
||||
subprocess.check_call(['snap', 'install', '--classic', '--dangerous', snap_path])
|
||||
subprocess.check_call(['certbot', '--version'])
|
||||
yield
|
||||
@@ -38,5 +39,8 @@ def test_dns_plugin_install(dns_snap_path):
|
||||
|
||||
assert plugin_name in subprocess.check_output(['certbot', 'plugins', '--prepare'],
|
||||
universal_newlines=True)
|
||||
subprocess.check_call(['snap', 'connect', snap_name + ':certbot-metadata',
|
||||
'certbot:certbot-metadata'])
|
||||
subprocess.check_call(['snap', 'install', '--dangerous', dns_snap_path])
|
||||
finally:
|
||||
subprocess.call(['snap', 'remove', 'plugin_name'])
|
||||
|
||||
@@ -1,47 +1,18 @@
|
||||
FROM debian:stretch
|
||||
FROM debian:buster
|
||||
MAINTAINER Brad Warren <bmw@eff.org>
|
||||
|
||||
# no need to mkdir anything:
|
||||
# https://docs.docker.com/reference/builder/#copy
|
||||
# If <dest> doesn't exist, it is created along with all missing
|
||||
# directories in its path.
|
||||
RUN apt-get update && \
|
||||
apt install python3-dev python3-venv gcc libaugeas0 libssl-dev \
|
||||
libffi-dev ca-certificates openssl -y
|
||||
|
||||
# TODO: Install non-default Python versions for tox.
|
||||
# TODO: Install Apache/Nginx for plugin development.
|
||||
COPY letsencrypt-auto-source /opt/certbot/src/letsencrypt-auto-source
|
||||
RUN /opt/certbot/src/letsencrypt-auto-source/letsencrypt-auto --os-packages-only
|
||||
WORKDIR /opt/certbot/src
|
||||
|
||||
# the above is not likely to change, so by putting it further up the
|
||||
# Dockerfile we make sure we cache as much as possible
|
||||
# We copy all contents of the build directory to allow us to easily use
|
||||
# things like tools/venv3.py which expects all of our packages to be available.
|
||||
COPY . .
|
||||
|
||||
COPY certbot/setup.py certbot/README.rst certbot/CHANGELOG.md certbot/MANIFEST.in linter_plugin.py tox.cover.py tox.ini .pylintrc /opt/certbot/src/
|
||||
|
||||
# all above files are necessary for setup.py, however, package source
|
||||
# code directory has to be copied separately to a subdirectory...
|
||||
# https://docs.docker.com/reference/builder/#copy: "If <src> is a
|
||||
# directory, the entire contents of the directory are copied,
|
||||
# including filesystem metadata. Note: The directory itself is not
|
||||
# copied, just its contents." Order again matters, three files are far
|
||||
# more likely to be cached than the whole project directory
|
||||
|
||||
COPY certbot /opt/certbot/src/certbot/
|
||||
COPY acme /opt/certbot/src/acme/
|
||||
COPY certbot-apache /opt/certbot/src/certbot-apache/
|
||||
COPY certbot-nginx /opt/certbot/src/certbot-nginx/
|
||||
COPY certbot-compatibility-test /opt/certbot/src/certbot-compatibility-test/
|
||||
COPY tools /opt/certbot/src/tools
|
||||
|
||||
RUN VIRTUALENV_NO_DOWNLOAD=1 virtualenv -p python2 /opt/certbot/venv && \
|
||||
/opt/certbot/venv/bin/pip install -U setuptools && \
|
||||
/opt/certbot/venv/bin/pip install -U pip
|
||||
ENV PATH /opt/certbot/venv/bin:$PATH
|
||||
RUN /opt/certbot/venv/bin/python \
|
||||
/opt/certbot/src/tools/pip_install_editable.py \
|
||||
/opt/certbot/src/acme \
|
||||
/opt/certbot/src/certbot \
|
||||
/opt/certbot/src/certbot-apache \
|
||||
/opt/certbot/src/certbot-nginx \
|
||||
/opt/certbot/src/certbot-compatibility-test
|
||||
RUN tools/venv3.py
|
||||
ENV PATH /opt/certbot/src/venv3/bin:$PATH
|
||||
|
||||
# install in editable mode (-e) to save space: it's not possible to
|
||||
# "rm -rf /opt/certbot/src" (it's stays in the underlaying image);
|
||||
|
||||
@@ -57,7 +57,7 @@ class Proxy(configurators_common.Proxy):
|
||||
|
||||
def _prepare_configurator(self):
|
||||
"""Prepares the Apache plugin for testing"""
|
||||
for k in entrypoint.ENTRYPOINT.OS_DEFAULTS.keys():
|
||||
for k in entrypoint.ENTRYPOINT.OS_DEFAULTS:
|
||||
setattr(self.le_config, "apache_" + k,
|
||||
entrypoint.ENTRYPOINT.OS_DEFAULTS[k])
|
||||
|
||||
|
||||
@@ -102,8 +102,10 @@ def _create_achalls(plugin):
|
||||
prefs = plugin.get_chall_pref(domain)
|
||||
for chall_type in prefs:
|
||||
if chall_type == challenges.HTTP01:
|
||||
# challenges.HTTP01.TOKEN_SIZE is a float but os.urandom
|
||||
# expects an integer.
|
||||
chall = challenges.HTTP01(
|
||||
token=os.urandom(challenges.HTTP01.TOKEN_SIZE))
|
||||
token=os.urandom(int(challenges.HTTP01.TOKEN_SIZE)))
|
||||
challb = acme_util.chall_to_challb(
|
||||
chall, messages.STATUS_PENDING)
|
||||
achall = achallenges.KeyAuthorizationAnnotatedChallenge(
|
||||
@@ -137,7 +139,7 @@ def test_deploy_cert(plugin, temp_dir, domains):
|
||||
"""Tests deploy_cert returning True if the tests are successful"""
|
||||
cert = crypto_util.gen_ss_cert(util.KEY, domains)
|
||||
cert_path = os.path.join(temp_dir, "cert.pem")
|
||||
with open(cert_path, "w") as f:
|
||||
with open(cert_path, "wb") as f:
|
||||
f.write(OpenSSL.crypto.dump_certificate(
|
||||
OpenSSL.crypto.FILETYPE_PEM, cert))
|
||||
|
||||
@@ -273,7 +275,7 @@ def _dirs_are_unequal(dir1, dir2):
|
||||
logger.error(str(dircmp.diff_files))
|
||||
return True
|
||||
|
||||
for subdir in dircmp.subdirs.itervalues():
|
||||
for subdir in dircmp.subdirs.values():
|
||||
dircmps.append(subdir)
|
||||
|
||||
return False
|
||||
|
||||
@@ -1,13 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICATCCAWoCCQCvMbKu4FHZ6zANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJB
|
||||
VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
|
||||
cyBQdHkgTHRkMB4XDTE1MDcyMzIzMjc1MFoXDTE2MDcyMjIzMjc1MFowRTELMAkG
|
||||
A1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0
|
||||
IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAws3o
|
||||
y46PMLM9Gr68pbex0MhdPr7Cq4rRe9BBpnOuHFdF35Ak0aPrzFwVzLlGOir94U11
|
||||
e5JYJDWJi+4FwLBRkOAfanjJ5GJ9BnEHSOdbtO+sv9uhbt+7iYOOUOngKSiJyUrM
|
||||
i1THAE+B1CenxZ1KHRQCke708zkK8jVuxLeIAOMCAwEAATANBgkqhkiG9w0BAQsF
|
||||
AAOBgQCC3LUP3MHk+IBmwHHZAZCX+6p4lop9SP6y6rDpWgnqEEeb9oFleHi2Rvzq
|
||||
7gxl6nS5AsaSzfAygJ3zWKTwVAZyU4GOQ8QTK+nHk3+LO1X4cDbUlQfm5+YuwKDa
|
||||
4LFKeovmrK6BiMLIc1J+MxUjLfCeVHYSdkZULTVXue0zif0BUA==
|
||||
MIICqDCCAZACCQCRC1UKg2WfRTANBgkqhkiG9w0BAQsFADAWMRQwEgYDVQQDDAtl
|
||||
eGFtcGxlLmNvbTAeFw0yMDA4MTkyMzM5MjdaFw0yMDA5MTgyMzM5MjdaMBYxFDAS
|
||||
BgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
|
||||
AQEA5tViHnJx4y+BbCb8Qz9uxsnqp1ynONR7ET/XL+M/jQ4xPeJg4L2uZ3YnogPc
|
||||
WdEoey17WXBg3KRqKfg+7PqIdGqVeonSCfXhD1HoGJRsThSUJ2fK3uoQ+zGgJTWR
|
||||
FYWa8Cb6xsuq0xaYtw2jaJBp+697Np60PWs4pY5FkadT50wZ0TYDnYt3NSAdn+Pt
|
||||
j3cpI4ocZZ2FLiOFn+UFOaRcetGtpnU1QwvmygD9tiL7kJ55B4CWGEv6DMRQk/UE
|
||||
eMUETzse1NkVlaxQ1TCd5iAfBTluiV30EpmmWa+OsXJWxCK+EEOkXD1r3CdXAldY
|
||||
nRYxJrn4udrFe69QX95wiRZNXwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCJvtDC
|
||||
875CK7SKNf006gSciXsNPNSVORGPjc/5OQ23baK4iPhxftI4LGZN8773N14jWp3E
|
||||
QnQLL1gZ9/G+98SlI5lm97a4m4XZyNaULbmQwRKgI22H0F1AWbvsG0SppjnhVlJ+
|
||||
93ZUqSQBXgbXelFHSsNfk1AB6Kvo6+UvS8s0vkz7SfkPOZGx0b+3RJSJZnZHvYih
|
||||
ggudN/jJggSgRrb+F6lpaelJE9pZsznJFb9R7mFI33AGBpQWV4r3p1ZbM1vGMqGc
|
||||
4PGBzDzi28BhLBplSOPZZxqRiINQzGiQ5T2SfN06usr7EafFr6+7YKNhgrCdlVjU
|
||||
thzJ5MgHZgALNXsh
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
Binary file not shown.
@@ -61,7 +61,6 @@ server {
|
||||
server {
|
||||
listen 80;
|
||||
server_name random1413.example.org www.random1413.example.org;
|
||||
server_name random28524.example.org www.random28524.example.org;
|
||||
server_name random25266.example.org www.random25266.example.org;
|
||||
server_name random26791.example.org www.random26791.example.org;
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ server {
|
||||
server_name www.random3140.example.org;
|
||||
server_name random28398.example.org;
|
||||
server_name random23689.example.org www.random23689.example.org;
|
||||
server_name random25863.example.org www.random25863.example.org;
|
||||
|
||||
rewrite ^ http://random3140.example.org$request_uri permanent;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,5 @@ server {
|
||||
|
||||
server {
|
||||
server_name www.random1413.example.org;
|
||||
server_name random28524.example.org www.random28524.example.org;
|
||||
rewrite ^ http://random1413.example.org$request_uri permanent;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
install_requires = [
|
||||
'certbot',
|
||||
@@ -38,7 +38,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 3 - Alpha',
|
||||
'Intended Audience :: Developers',
|
||||
@@ -47,7 +47,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,14 +16,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.29.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -40,20 +41,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-cloudflare',
|
||||
version=version,
|
||||
@@ -62,7 +49,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -73,7 +60,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -96,7 +82,4 @@ setup(
|
||||
'dns-cloudflare = certbot_dns_cloudflare._internal.dns_cloudflare:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_cloudflare',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-cloudflare/snap/hooks/post-refresh
Normal file
21
certbot-dns-cloudflare/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-cloudflare
|
||||
summary: Cloudflare DNS Authenticator plugin for Certbot
|
||||
description: Cloudflare DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-cloudflare
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,14 +16,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -40,20 +41,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-cloudxns',
|
||||
version=version,
|
||||
@@ -62,7 +49,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -73,7 +60,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -96,7 +82,4 @@ setup(
|
||||
'dns-cloudxns = certbot_dns_cloudxns._internal.dns_cloudxns:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_cloudxns',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-cloudxns/snap/hooks/post-refresh
Normal file
21
certbot-dns-cloudxns/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-cloudxns
|
||||
summary: CloudXNS DNS Authenticator plugin for Certbot
|
||||
description: CloudXNS DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-cloudxns
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -18,14 +17,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.29.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -41,20 +42,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-digitalocean',
|
||||
version=version,
|
||||
@@ -63,7 +50,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -74,7 +61,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -97,7 +83,4 @@ setup(
|
||||
'dns-digitalocean = certbot_dns_digitalocean._internal.dns_digitalocean:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_digitalocean',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-digitalocean/snap/hooks/post-refresh
Normal file
21
certbot-dns-digitalocean/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-digitalocean
|
||||
summary: DigitalOcean DNS Authenticator plugin for Certbot
|
||||
description: DigitalOcean DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-digitalocean
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -16,14 +15,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -51,20 +52,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-dnsimple',
|
||||
version=version,
|
||||
@@ -73,7 +60,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -84,7 +71,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -107,7 +93,4 @@ setup(
|
||||
'dns-dnsimple = certbot_dns_dnsimple._internal.dns_dnsimple:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_dnsimple',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-dnsimple/snap/hooks/post-refresh
Normal file
21
certbot-dns-dnsimple/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-dnsimple
|
||||
summary: DNSimple DNS Authenticator plugin for Certbot
|
||||
description: DNSimple DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-dnsimple
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,14 +16,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -40,20 +41,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-dnsmadeeasy',
|
||||
version=version,
|
||||
@@ -62,7 +49,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -73,7 +60,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -96,7 +82,4 @@ setup(
|
||||
'dns-dnsmadeeasy = certbot_dns_dnsmadeeasy._internal.dns_dnsmadeeasy:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_dnsmadeeasy',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-dnsmadeeasy/snap/hooks/post-refresh
Normal file
21
certbot-dns-dnsmadeeasy/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-dnsmadeeasy
|
||||
summary: DNS Made Easy DNS Authenticator plugin for Certbot
|
||||
description: DNS Made Easy DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-dnsmadeeasy
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -16,14 +15,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -39,20 +40,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-gehirn',
|
||||
version=version,
|
||||
@@ -61,7 +48,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -72,7 +59,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -95,7 +81,4 @@ setup(
|
||||
'dns-gehirn = certbot_dns_gehirn._internal.dns_gehirn:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_gehirn',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-gehirn/snap/hooks/post-refresh
Normal file
21
certbot-dns-gehirn/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-gehirn
|
||||
summary: Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
|
||||
description: Gehirn Infrastructure Service DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-gehirn
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -94,7 +94,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -20,14 +19,16 @@ install_requires = [
|
||||
'httplib2'
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.29.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -43,20 +44,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-google',
|
||||
version=version,
|
||||
@@ -65,7 +52,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -76,7 +63,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -99,7 +85,4 @@ setup(
|
||||
'dns-google = certbot_dns_google._internal.dns_google:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_google',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-google/snap/hooks/post-refresh
Normal file
21
certbot-dns-google/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-google
|
||||
summary: Google Cloud DNS Authenticator plugin for Certbot
|
||||
description: Google Cloud DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-google
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -14,10 +14,10 @@ Named Arguments
|
||||
DNS to propagate before asking the
|
||||
ACME server to verify the DNS
|
||||
record.
|
||||
(Default: 1200 because Linode
|
||||
updates its first DNS every 15
|
||||
minutes and we allow 5 more minutes
|
||||
for the update to reach the other 5
|
||||
(Default: 120 because Linode
|
||||
updates its first DNS every 60
|
||||
seconds and we allow 60 more seconds
|
||||
for the update to reach other 5
|
||||
servers)
|
||||
========================================== ===================================
|
||||
|
||||
@@ -80,15 +80,15 @@ Examples
|
||||
-d www.example.com
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: To acquire a certificate for ``example.com``, waiting 1000 seconds
|
||||
for DNS propagation (Linode updates its first DNS every 15 minutes
|
||||
and we allow some extra time for the update to reach the other 5
|
||||
:caption: To acquire a certificate for ``example.com``, waiting 120 seconds
|
||||
for DNS propagation (Linode updates its first DNS every minute
|
||||
and we allow some extra time for the update to reach other 5
|
||||
servers)
|
||||
|
||||
certbot certonly \\
|
||||
--dns-linode \\
|
||||
--dns-linode-credentials ~/.secrets/certbot/linode.ini \\
|
||||
--dns-linode-propagation-seconds 1000 \\
|
||||
--dns-linode-propagation-seconds 120 \\
|
||||
-d example.com
|
||||
|
||||
"""
|
||||
|
||||
@@ -32,7 +32,7 @@ class Authenticator(dns_common.DNSAuthenticator):
|
||||
|
||||
@classmethod
|
||||
def add_parser_arguments(cls, add): # pylint: disable=arguments-differ
|
||||
super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=1200)
|
||||
super(Authenticator, cls).add_parser_arguments(add, default_propagation_seconds=120)
|
||||
add('credentials', help='Linode credentials INI file.')
|
||||
|
||||
def more_info(self): # pylint: disable=missing-function-docstring
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -16,14 +15,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -39,20 +40,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-linode',
|
||||
version=version,
|
||||
@@ -61,7 +48,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -72,7 +59,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -95,7 +81,4 @@ setup(
|
||||
'dns-linode = certbot_dns_linode._internal.dns_linode:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_linode',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-linode/snap/hooks/post-refresh
Normal file
21
certbot-dns-linode/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-linode
|
||||
summary: Linode DNS Authenticator plugin for Certbot
|
||||
description: Linode DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-linode
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,14 +16,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -40,20 +41,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-luadns',
|
||||
version=version,
|
||||
@@ -62,7 +49,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -73,7 +60,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -96,7 +82,4 @@ setup(
|
||||
'dns-luadns = certbot_dns_luadns._internal.dns_luadns:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_luadns',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-luadns/snap/hooks/post-refresh
Normal file
21
certbot-dns-luadns/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-luadns
|
||||
summary: LuaDNS Authenticator plugin for Certbot
|
||||
description: LuaDNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-luadns
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
@@ -93,7 +93,7 @@ todo_include_todos = False
|
||||
# a list of builtin themes.
|
||||
#
|
||||
|
||||
# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs
|
||||
# https://docs.readthedocs.io/en/stable/faq.html#i-want-to-use-the-read-the-docs-theme-locally
|
||||
# on_rtd is whether we are on readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
|
||||
@@ -22,7 +22,7 @@ if errorlevel 9009 (
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ import sys
|
||||
from setuptools import __version__ as setuptools_version
|
||||
from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.10.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,14 +16,16 @@ install_requires = [
|
||||
'zope.interface',
|
||||
]
|
||||
|
||||
if not os.environ.get('EXCLUDE_CERTBOT_DEPS'):
|
||||
if not os.environ.get('SNAP_BUILD'):
|
||||
install_requires.extend([
|
||||
'acme>=0.31.0',
|
||||
'certbot>=1.1.0',
|
||||
])
|
||||
elif 'bdist_wheel' in sys.argv[1:]:
|
||||
raise RuntimeError('Unset EXCLUDE_CERTBOT_DEPS when building wheels '
|
||||
raise RuntimeError('Unset SNAP_BUILD when building wheels '
|
||||
'to include certbot dependencies.')
|
||||
if os.environ.get('SNAP_BUILD'):
|
||||
install_requires.append('packaging')
|
||||
|
||||
setuptools_known_environment_markers = (LooseVersion(setuptools_version) >= LooseVersion('36.2'))
|
||||
if setuptools_known_environment_markers:
|
||||
@@ -40,20 +41,6 @@ docs_extras = [
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
class PyTest(TestCommand):
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
TestCommand.initialize_options(self)
|
||||
self.pytest_args = ''
|
||||
|
||||
def run_tests(self):
|
||||
import shlex
|
||||
# import here, cause outside the eggs aren't loaded
|
||||
import pytest
|
||||
errno = pytest.main(shlex.split(self.pytest_args))
|
||||
sys.exit(errno)
|
||||
|
||||
setup(
|
||||
name='certbot-dns-nsone',
|
||||
version=version,
|
||||
@@ -62,7 +49,7 @@ setup(
|
||||
author="Certbot Project",
|
||||
author_email='client-dev@letsencrypt.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: Plugins',
|
||||
@@ -73,7 +60,6 @@ setup(
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
@@ -96,7 +82,4 @@ setup(
|
||||
'dns-nsone = certbot_dns_nsone._internal.dns_nsone:Authenticator',
|
||||
],
|
||||
},
|
||||
tests_require=["pytest"],
|
||||
test_suite='certbot_dns_nsone',
|
||||
cmdclass={"test": PyTest},
|
||||
)
|
||||
|
||||
21
certbot-dns-nsone/snap/hooks/post-refresh
Normal file
21
certbot-dns-nsone/snap/hooks/post-refresh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh -e
|
||||
# This file is generated by tools/generate_dnsplugins_postrefreshhook.sh and should not be edited manually.
|
||||
|
||||
# get certbot version
|
||||
if [ ! -f "$SNAP/certbot-shared/certbot-version.txt" ]; then
|
||||
echo "No certbot version available; not doing version comparison check" >> "$SNAP_DATA/debuglog"
|
||||
exit 0
|
||||
fi
|
||||
cb_installed=$(cat $SNAP/certbot-shared/certbot-version.txt)
|
||||
|
||||
# get required certbot version for plugin. certbot version must be at least the plugin's
|
||||
# version. note that this is not the required version in setup.py, but the version number itself.
|
||||
cb_required=$(grep -oP "version = '\K.*(?=')" $SNAP/setup.py)
|
||||
|
||||
|
||||
$SNAP/bin/python3 -c "import sys; from packaging import version; sys.exit(1) if version.parse('$cb_installed') < version.parse('$cb_required') else sys.exit(0)" || exit_code=$?
|
||||
if [ "$exit_code" -eq 1 ]; then
|
||||
echo "Certbot is version $cb_installed but needs to be at least $cb_required before" \
|
||||
"this plugin can be updated; will try again on next refresh."
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,8 +1,9 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-nsone
|
||||
summary: NS1 DNS Authenticator plugin for Certbot
|
||||
description: NS1 DNS Authenticator plugin for Certbot
|
||||
confinement: strict
|
||||
grade: devel
|
||||
grade: stable
|
||||
base: core20
|
||||
adopt-info: certbot-dns-nsone
|
||||
|
||||
@@ -15,7 +16,16 @@ parts:
|
||||
snapcraftctl pull
|
||||
snapcraftctl set-version `grep ^version $SNAPCRAFT_PART_SRC/setup.py | cut -f2 -d= | tr -d "'[:space:]"`
|
||||
build-environment:
|
||||
- EXCLUDE_CERTBOT_DEPS: "True"
|
||||
- SNAP_BUILD: "True"
|
||||
# To build cryptography and cffi if needed
|
||||
build-packages: [gcc, libffi-dev, libssl-dev, python3-dev]
|
||||
certbot-metadata:
|
||||
plugin: dump
|
||||
source: .
|
||||
stage: [setup.py, certbot-shared]
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
mkdir -p $SNAPCRAFT_PART_SRC/certbot-shared
|
||||
|
||||
slots:
|
||||
certbot:
|
||||
@@ -23,3 +33,9 @@ slots:
|
||||
content: certbot-1
|
||||
read:
|
||||
- $SNAP/lib/python3.8/site-packages
|
||||
|
||||
plugs:
|
||||
certbot-metadata:
|
||||
interface: content
|
||||
content: metadata-1
|
||||
target: $SNAP/certbot-shared
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user