Compare commits
101 Commits
test-fix-i
...
test-bash
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80daaa9202 | ||
|
|
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
|
||||
|
||||
@@ -36,14 +36,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 +62,17 @@ 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,35 @@
|
||||
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: 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: |
|
||||
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: 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: installer_build
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
@@ -18,6 +49,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
|
||||
@@ -58,54 +90,48 @@ 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}
|
||||
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: |
|
||||
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: |
|
||||
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:
|
||||
@@ -116,19 +142,17 @@ jobs:
|
||||
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
|
||||
sudo snap install --dangerous --classic snap/certbot_*_amd64.snap
|
||||
displayName: Install Certbot snap
|
||||
- script: |
|
||||
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:
|
||||
@@ -142,18 +166,13 @@ 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: |
|
||||
python3 -m venv venv
|
||||
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
|
||||
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
|
||||
|
||||
@@ -2,71 +2,10 @@ jobs:
|
||||
- job: test
|
||||
strategy:
|
||||
matrix:
|
||||
macos-py27:
|
||||
IMAGE_NAME: macOS-10.14
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: py27
|
||||
macos-py38:
|
||||
IMAGE_NAME: macOS-10.14
|
||||
PYTHON_VERSION: 3.8
|
||||
TOXENV: py38
|
||||
windows-py35:
|
||||
IMAGE_NAME: vs2017-win2016
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: py35
|
||||
windows-py37-cover:
|
||||
IMAGE_NAME: vs2017-win2016
|
||||
PYTHON_VERSION: 3.7
|
||||
TOXENV: py37-cover
|
||||
windows-integration-certbot:
|
||||
IMAGE_NAME: vs2017-win2016
|
||||
PYTHON_VERSION: 3.7
|
||||
TOXENV: integration-certbot
|
||||
linux-oldest-tests-1:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
TOXENV: py27-{acme,apache,apache-v2,certbot}-oldest
|
||||
linux-oldest-tests-2:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
TOXENV: py27-{dns,nginx}-oldest
|
||||
linux-py27:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: py27
|
||||
linux-py35:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: py35
|
||||
linux-py38-cover:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.8
|
||||
TOXENV: py38-cover
|
||||
linux-py37-lint:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.7
|
||||
TOXENV: lint
|
||||
linux-py35-mypy:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 3.5
|
||||
TOXENV: mypy
|
||||
linux-integration:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: integration
|
||||
ACME_SERVER: pebble
|
||||
apache-compat:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
TOXENV: apache_compat
|
||||
le-auto-xenial:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
TOXENV: le_auto_xenial
|
||||
apacheconftest:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: apacheconftest-with-pebble
|
||||
nginxroundtrip:
|
||||
IMAGE_NAME: ubuntu-18.04
|
||||
PYTHON_VERSION: 2.7
|
||||
TOXENV: nginxroundtrip
|
||||
pool:
|
||||
vmImage: $(IMAGE_NAME)
|
||||
steps:
|
||||
|
||||
@@ -5,6 +5,7 @@ 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: |
|
||||
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"
|
||||
@@ -12,5 +13,6 @@ stages:
|
||||
- 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,22 +1,38 @@
|
||||
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:
|
||||
@@ -29,14 +45,9 @@ stages:
|
||||
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:
|
||||
@@ -45,6 +56,42 @@ stages:
|
||||
mkdir -p .snapcraft
|
||||
ln -s $(snapcraftCfg.secureFilePath) .snapcraft/snapcraft.cfg
|
||||
for SNAP_FILE in snap/*.snap; do
|
||||
snapcraft upload --release=edge "${SNAP_FILE}"
|
||||
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: 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: tools/docker/deploy.sh $(dockerTag) $DOCKER_ARCH
|
||||
displayName: Deploy the Docker images
|
||||
|
||||
@@ -2,5 +2,3 @@ stages:
|
||||
- stage: TestAndPackage
|
||||
jobs:
|
||||
- template: ../jobs/standard-tests-jobs.yml
|
||||
- template: ../jobs/extended-tests-jobs.yml
|
||||
- template: ../jobs/packaging-jobs.yml
|
||||
|
||||
@@ -14,6 +14,7 @@ steps:
|
||||
ca-certificates \
|
||||
nginx-light \
|
||||
openssl
|
||||
geoiqgheoqigjeq
|
||||
sudo systemctl stop nginx
|
||||
condition: startswith(variables['IMAGE_NAME'], 'ubuntu')
|
||||
displayName: Install Linux dependencies
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -6,7 +6,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -71,7 +71,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 +80,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',
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -55,7 +55,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 +66,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',
|
||||
|
||||
30
certbot-auto
30
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.8.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.
|
||||
@@ -930,7 +930,7 @@ else
|
||||
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 "Please see https://certbot.eff.org/docs/contributing.html#prerequisites"
|
||||
error "for more info."
|
||||
exit 1
|
||||
}
|
||||
@@ -1530,18 +1530,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.8.0 \
|
||||
--hash=sha256:4bde86c53e30dc5bc0e78a0862045b053971703af727ac20c6a7da06596c7549 \
|
||||
--hash=sha256:4837c516af6543ccd10d70f1498a2113bbdf9ef9a05d3a18b1558b291a2953e4
|
||||
acme==1.8.0 \
|
||||
--hash=sha256:465033830a75f98042236f50f751f6e316735473ccb4edec0c718263f6c9ba8b \
|
||||
--hash=sha256:ad8d067d14258d73ad2643439d9365913362308c04e66cc3010e39c868c5002d
|
||||
certbot-apache==1.8.0 \
|
||||
--hash=sha256:8c9d981803e1156725fcfcf228afcb754b245c9d506e5b9f4fca948d6ae89aef \
|
||||
--hash=sha256:a93c3a7ad929fe0ba5e0868e29ee2d0fe10aea2d4c638a902c4613a5c12c59b6
|
||||
certbot-nginx==1.8.0 \
|
||||
--hash=sha256:e98e883b5ea7b29dd2e6a8ff286c7550a2d7af2fc859f47067303e510ad4fb52 \
|
||||
--hash=sha256:fdb96c74fe42d90bbaf11a00314444ac5544ba87292a1b8b1d707f7561a3eacc
|
||||
|
||||
UNLIKELY_EOF
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
@@ -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.9.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',
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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.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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -18,14 +18,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:
|
||||
@@ -63,7 +65,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 +76,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -16,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:
|
||||
@@ -73,7 +75,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 +86,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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.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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -16,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:
|
||||
@@ -61,7 +63,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 +74,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -20,14 +20,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:
|
||||
@@ -65,7 +67,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 +78,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -16,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:
|
||||
@@ -61,7 +63,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 +74,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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.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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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.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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
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,3 +1,4 @@
|
||||
# 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
|
||||
@@ -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
|
||||
|
||||
@@ -72,7 +72,7 @@ Examples
|
||||
|
||||
certbot certonly \\
|
||||
--dns-ovh \\
|
||||
--dns-ovh-credentials ~/.secrets/certbot/ohv.ini \\
|
||||
--dns-ovh-credentials ~/.secrets/certbot/ovh.ini \\
|
||||
-d example.com
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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.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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
21
certbot-dns-ovh/snap/hooks/post-refresh
Normal file
21
certbot-dns-ovh/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,3 +1,4 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-ovh
|
||||
summary: OVH DNS Authenticator plugin for Certbot
|
||||
description: OVH DNS Authenticator plugin for Certbot
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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:
|
||||
@@ -62,7 +64,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 +75,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',
|
||||
|
||||
21
certbot-dns-rfc2136/snap/hooks/post-refresh
Normal file
21
certbot-dns-rfc2136/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,3 +1,4 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-rfc2136
|
||||
summary: RFC 2136 DNS Authenticator plugin for Certbot
|
||||
description: RFC 2136 DNS Authenticator plugin for Certbot
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -17,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:
|
||||
@@ -57,7 +59,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',
|
||||
@@ -68,7 +70,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',
|
||||
|
||||
21
certbot-dns-route53/snap/hooks/post-refresh
Normal file
21
certbot-dns-route53/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,3 +1,4 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-route53
|
||||
summary: Route53 DNS Authenticator plugin for Certbot
|
||||
description: Route53 DNS Authenticator plugin for Certbot
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Please update tox.ini when modifying dependency version requirements
|
||||
install_requires = [
|
||||
@@ -16,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:
|
||||
@@ -61,7 +63,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 +74,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',
|
||||
|
||||
21
certbot-dns-sakuracloud/snap/hooks/post-refresh
Normal file
21
certbot-dns-sakuracloud/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,3 +1,4 @@
|
||||
# This file is generated by tools/generate_dnsplugins_snapcraft.sh and should not be edited manually.
|
||||
name: certbot-dns-sakuracloud
|
||||
summary: Sakura Cloud DNS Authenticator plugin for Certbot
|
||||
description: Sakura Cloud DNS Authenticator plugin for Certbot
|
||||
@@ -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
|
||||
|
||||
@@ -77,6 +77,9 @@ class NginxConfigurator(common.Installer):
|
||||
add("ctl", default=constants.CLI_DEFAULTS["ctl"], help="Path to the "
|
||||
"'nginx' binary, used for 'configtest' and retrieving nginx "
|
||||
"version number.")
|
||||
add("sleep-seconds", default=constants.CLI_DEFAULTS["sleep_seconds"], type=int,
|
||||
help="Number of seconds to wait for nginx configuration changes "
|
||||
"to apply when reloading.")
|
||||
|
||||
@property
|
||||
def nginx_conf(self):
|
||||
@@ -912,7 +915,7 @@ class NginxConfigurator(common.Installer):
|
||||
:raises .errors.MisconfigurationError: If either the reload fails.
|
||||
|
||||
"""
|
||||
nginx_restart(self.conf('ctl'), self.nginx_conf)
|
||||
nginx_restart(self.conf('ctl'), self.nginx_conf, self.conf('sleep-seconds'))
|
||||
|
||||
def config_test(self):
|
||||
"""Check the configuration of Nginx for errors.
|
||||
@@ -1159,7 +1162,7 @@ def _redirect_block_for_domain(domain):
|
||||
return redirect_block
|
||||
|
||||
|
||||
def nginx_restart(nginx_ctl, nginx_conf):
|
||||
def nginx_restart(nginx_ctl, nginx_conf, sleep_duration):
|
||||
"""Restarts the Nginx Server.
|
||||
|
||||
.. todo:: Nginx restart is fatal if the configuration references
|
||||
@@ -1167,6 +1170,8 @@ def nginx_restart(nginx_ctl, nginx_conf):
|
||||
before restart.
|
||||
|
||||
:param str nginx_ctl: Path to the Nginx binary.
|
||||
:param str nginx_conf: Path to the Nginx configuration file.
|
||||
:param int sleep_duration: How long to sleep after sending the reload signal.
|
||||
|
||||
"""
|
||||
try:
|
||||
@@ -1190,10 +1195,12 @@ def nginx_restart(nginx_ctl, nginx_conf):
|
||||
|
||||
except (OSError, ValueError):
|
||||
raise errors.MisconfigurationError("nginx restart failed")
|
||||
# Nginx can take a moment to recognize a newly added TLS SNI servername, so sleep
|
||||
# for a second. TODO: Check for expected servername and loop until it
|
||||
# appears or return an error if looping too long.
|
||||
time.sleep(1)
|
||||
# Nginx can take a significant duration of time to fully apply a new config, depending
|
||||
# on size and contents (https://github.com/certbot/certbot/issues/7422). Lacking a way
|
||||
# to reliably identify when this process is complete, we provide the user with control
|
||||
# over how long Certbot will sleep after reloading the configuration.
|
||||
if sleep_duration > 0:
|
||||
time.sleep(sleep_duration)
|
||||
|
||||
|
||||
def _determine_default_server_root():
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
"""nginx plugin constants."""
|
||||
import platform
|
||||
|
||||
from acme.magic_typing import Any
|
||||
from acme.magic_typing import Dict
|
||||
|
||||
FREEBSD_DARWIN_SERVER_ROOT = "/usr/local/etc/nginx"
|
||||
LINUX_SERVER_ROOT = "/etc/nginx"
|
||||
PKGSRC_SERVER_ROOT = "/usr/pkg/etc/nginx"
|
||||
@@ -15,7 +18,8 @@ else:
|
||||
CLI_DEFAULTS = dict(
|
||||
server_root=server_root_tmp,
|
||||
ctl="nginx",
|
||||
)
|
||||
sleep_seconds=1
|
||||
) # type: Dict[str, Any]
|
||||
"""CLI defaults."""
|
||||
|
||||
|
||||
|
||||
@@ -496,7 +496,8 @@ def get_best_match(target_name, names):
|
||||
|
||||
|
||||
def _exact_match(target_name, name):
|
||||
return name in (target_name, '.' + target_name)
|
||||
target_lower = target_name.lower()
|
||||
return name.lower() in (target_lower, '.' + target_lower)
|
||||
|
||||
|
||||
def _wildcard_match(target_name, name, start):
|
||||
@@ -517,11 +518,11 @@ def _wildcard_match(target_name, name, start):
|
||||
if first not in ('*', ''):
|
||||
return False
|
||||
|
||||
target_name = '.'.join(parts)
|
||||
name = '.'.join(match_parts)
|
||||
target_name_lower = '.'.join(parts).lower()
|
||||
name_lower = '.'.join(match_parts).lower()
|
||||
|
||||
# Ex: www.eff.org matches *.eff.org, eff.org does not match *.eff.org
|
||||
return target_name.endswith('.' + name)
|
||||
return target_name_lower.endswith('.' + name_lower)
|
||||
|
||||
|
||||
def _regex_match(target_name, name):
|
||||
|
||||
@@ -6,7 +6,7 @@ from setuptools import find_packages
|
||||
from setuptools import setup
|
||||
from setuptools.command.test import test as TestCommand
|
||||
|
||||
version = '1.7.0.dev0'
|
||||
version = '1.9.0.dev0'
|
||||
|
||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||
# acme/certbot version.
|
||||
@@ -52,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',
|
||||
@@ -63,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',
|
||||
|
||||
@@ -460,11 +460,13 @@ class NginxConfiguratorTest(util.NginxTest):
|
||||
self.assertEqual(self.config._get_openssl_version(), "")
|
||||
|
||||
@mock.patch("certbot_nginx._internal.configurator.subprocess.Popen")
|
||||
def test_nginx_restart(self, mock_popen):
|
||||
@mock.patch("certbot_nginx._internal.configurator.time")
|
||||
def test_nginx_restart(self, mock_time, mock_popen):
|
||||
mocked = mock_popen()
|
||||
mocked.communicate.return_value = ('', '')
|
||||
mocked.returncode = 0
|
||||
self.config.restart()
|
||||
mock_time.sleep.assert_called_once_with(0.1234)
|
||||
|
||||
@mock.patch("certbot_nginx._internal.configurator.subprocess.Popen")
|
||||
def test_nginx_restart_fail(self, mock_popen):
|
||||
|
||||
@@ -340,7 +340,9 @@ class NginxParserTest(util.NginxTest):
|
||||
{'*.www.eff.org', 'www.*'},
|
||||
{'*.org'},
|
||||
set(),
|
||||
{'example.com'}]
|
||||
{'example.com'},
|
||||
{'www.Eff.org'},
|
||||
{'.efF.org'}]
|
||||
winners = [('exact', 'www.eff.org'),
|
||||
(None, None),
|
||||
('exact', '.www.eff.org'),
|
||||
@@ -353,7 +355,9 @@ class NginxParserTest(util.NginxTest):
|
||||
('wildcard_end', 'www.*'),
|
||||
('wildcard_start', '*.org'),
|
||||
(None, None),
|
||||
(None, None)]
|
||||
(None, None),
|
||||
('exact', 'www.Eff.org'),
|
||||
('wildcard_start', '.efF.org')]
|
||||
|
||||
for i, winner in enumerate(winners):
|
||||
self.assertEqual(winner,
|
||||
|
||||
@@ -56,6 +56,7 @@ class NginxTest(test_log_util.AssertLogsMixin, test_util.ConfigTestCase):
|
||||
backups = os.path.join(work_dir, "backups")
|
||||
|
||||
self.configuration.nginx_server_root = config_path
|
||||
self.configuration.nginx_sleep_seconds = 0.1234
|
||||
self.configuration.le_vhost_ext = "-le-ssl.conf"
|
||||
self.configuration.config_dir = config_dir
|
||||
self.configuration.work_dir = work_dir
|
||||
|
||||
@@ -1,16 +1,38 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# TODO: We may want to consider rewriting this script in Python. See
|
||||
# https://github.com/certbot/certbot/issues/8251 for more info.
|
||||
set -e
|
||||
join() {
|
||||
sep=$1
|
||||
first=$2
|
||||
if [ "$first" != "" ]; then
|
||||
shift 2
|
||||
echo -n "${first}"
|
||||
for item in "$@"; do echo -n "${sep}${item}"; done
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
paths=$(for plugin_snap in $(snap connections certbot|sed -n '2,$p'|awk '$1=="content[certbot-1]"{print $3}'|cut -d: -f1); do echo /snap/$plugin_snap/current/lib/python3.8/site-packages; done)
|
||||
export CERTBOT_PLUGIN_PATH=$(join : $paths)
|
||||
# This code is based on snapcraft's own patch to work around this problem at
|
||||
# https://github.com/snapcore/snapcraft/blob/a97fb5c7ea553a1bd20f4887a7c3393e75761890/patches/ctypes_init.diff.
|
||||
# We may not build the Certbot snap for all of these architectures (and as of
|
||||
# writing this we do not), but we keep the code for them to avoid having to
|
||||
# solve this problem again in the future if we add support for new
|
||||
# architectures.
|
||||
case "${SNAP_ARCH}" in
|
||||
'arm64')
|
||||
ARCH_TRIPLET='aarch64-linux-gnu';;
|
||||
'armhf')
|
||||
ARCH_TRIPLET='arm-linux-gnueabihf';;
|
||||
'i386')
|
||||
ARCH_TRIPLET='i386-linux-gnu';;
|
||||
'ppc64el')
|
||||
ARCH_TRIPLET='powerpc64le-linux-gnu';;
|
||||
'powerpc')
|
||||
ARCH_TRIPLET='powerpc-linux-gnu';;
|
||||
'amd64')
|
||||
ARCH_TRIPLET='x86_64-linux-gnu';;
|
||||
's390x')
|
||||
ARCH_TRIPLET='s390x-linux-gnu';;
|
||||
*)
|
||||
echo "Unrecongized value of SNAP_ARCH: ${SNAP_ARCH}" >&2
|
||||
exit 1
|
||||
esac
|
||||
|
||||
export CERTBOT_AUGEAS_PATH="${SNAP}/usr/lib/${ARCH_TRIPLET}/libaugeas.so.0"
|
||||
|
||||
CERTBOT_PLUGIN_PATH="$(curl -s --unix-socket /run/snapd.socket "http://localhost/v2/connections?snap=certbot&interface=content" | jq -r '.result.established | map(select(.plug.plug == "plugin" and ."plug-attrs".content == "certbot-1") | "/snap/"+.slot.snap+"/current/lib/python3.8/site-packages/" ) | join(":")')"
|
||||
export CERTBOT_PLUGIN_PATH
|
||||
|
||||
exec certbot "$@"
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## 1.7.0 - master
|
||||
## 1.9.0 - master
|
||||
|
||||
### Added
|
||||
|
||||
* Third-party plugins can be used without prefix (`plugin_name` instead of `dist_name:plugin_name`):
|
||||
this concerns the plugin name, CLI flags, and keys in credential files.
|
||||
The prefixed form is still supported but is deprecated, and will be removed in a future release.
|
||||
*
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -16,7 +14,49 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
### Fixed
|
||||
|
||||
*
|
||||
* Fixed `server_name` case-sensitivity in the nginx plugin.
|
||||
|
||||
More details about these changes can be found on our GitHub repo.
|
||||
|
||||
## 1.8.0 - 2020-09-08
|
||||
|
||||
### Added
|
||||
|
||||
* Added the ability to remove email and phone contact information from an account
|
||||
using `update_account --register-unsafely-without-email`
|
||||
|
||||
### Changed
|
||||
|
||||
* Support for Python 3.5 has been removed.
|
||||
|
||||
### Fixed
|
||||
|
||||
* The problem causing the Apache plugin in the Certbot snap on ARM systems to
|
||||
fail to load the Augeas library it depends on has been fixed.
|
||||
* The `acme` library can now tell the ACME server to clear contact information by passing an empty
|
||||
`tuple` to the `contact` field of a `Registration` message.
|
||||
* Fixed the `*** stack smashing detected ***` error in the Certbot snap on some systems.
|
||||
|
||||
More details about these changes can be found on our GitHub repo.
|
||||
|
||||
## 1.7.0 - 2020-08-04
|
||||
|
||||
### Added
|
||||
|
||||
* Third-party plugins can be used without prefix (`plugin_name` instead of `dist_name:plugin_name`):
|
||||
this concerns the plugin name, CLI flags, and keys in credential files.
|
||||
The prefixed form is still supported but is deprecated, and will be removed in a future release.
|
||||
* Added `--nginx-sleep-seconds` (default `1`) for environments where nginx takes a long time to reload.
|
||||
|
||||
### Changed
|
||||
|
||||
* The Linode DNS plugin now waits 120 seconds for DNS propagation, instead of 1200,
|
||||
due to https://www.linode.com/blog/linode/linode-turns-17/
|
||||
* We deprecated support for Python 3.5 in Certbot and its ACME library.
|
||||
Support for Python 3.5 will be removed in the next major release of Certbot.
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
More details about these changes can be found on our GitHub repo.
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ Let's Encrypt Website: https://letsencrypt.org
|
||||
|
||||
Community: https://community.letsencrypt.org
|
||||
|
||||
ACME spec: http://ietf-wg-acme.github.io/acme/
|
||||
ACME spec: `RFC 8555 <https://tools.ietf.org/html/rfc8555>`_
|
||||
|
||||
ACME working area in github: https://github.com/ietf-wg-acme/acme
|
||||
ACME working area in github (archived): https://github.com/ietf-wg-acme/acme
|
||||
|
||||
|build-status|
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Certbot client."""
|
||||
|
||||
# version number like 1.2.3a0, must have at least 2 parts, like 1.2
|
||||
__version__ = '1.7.0.dev0'
|
||||
__version__ = '1.9.0.dev0'
|
||||
|
||||
@@ -171,13 +171,10 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False):
|
||||
["register", "automation"], "--register-unsafely-without-email", action="store_true",
|
||||
default=flag_default("register_unsafely_without_email"),
|
||||
help="Specifying this flag enables registering an account with no "
|
||||
"email address. This is strongly discouraged, because in the "
|
||||
"event of key loss or account compromise you will irrevocably "
|
||||
"lose access to your account. You will also be unable to receive "
|
||||
"notice about impending expiration or revocation of your "
|
||||
"certificates. Updates to the Subscriber Agreement will still "
|
||||
"affect you, and will be effective 14 days after posting an "
|
||||
"update to the web site.")
|
||||
"email address. This is strongly discouraged, because you will be "
|
||||
"unable to receive notice about impending expiration or "
|
||||
"revocation of your certificates or problems with your Certbot "
|
||||
"installation that will lead to failure to renew.")
|
||||
helpful.add(
|
||||
["register", "update_account", "unregister", "automation"], "-m", "--email",
|
||||
default=flag_default("email"),
|
||||
|
||||
@@ -319,6 +319,9 @@ def post_arg_parse_except_hook(exc_type, exc_value, trace, debug, log_path):
|
||||
# logger.DEBUG should be used
|
||||
if debug or not issubclass(exc_type, Exception):
|
||||
assert constants.QUIET_LOGGING_LEVEL <= logging.ERROR
|
||||
if exc_type is KeyboardInterrupt:
|
||||
logger.error('Exiting due to user request.')
|
||||
sys.exit(1)
|
||||
logger.error('Exiting abnormally:', exc_info=exc_info)
|
||||
else:
|
||||
logger.debug('Exiting abnormally:', exc_info=exc_info)
|
||||
|
||||
@@ -11,7 +11,7 @@ import josepy as jose
|
||||
import zope.component
|
||||
|
||||
from acme import errors as acme_errors
|
||||
from acme.magic_typing import Union
|
||||
from acme.magic_typing import Union, Iterable, Optional # pylint: disable=unused-import
|
||||
import certbot
|
||||
from certbot import crypto_util
|
||||
from certbot import errors
|
||||
@@ -590,7 +590,7 @@ def _init_le_client(config, authenticator, installer):
|
||||
:type config: interfaces.IConfig
|
||||
|
||||
:param authenticator: Acme authentication handler
|
||||
:type authenticator: interfaces.IAuthenticator
|
||||
:type authenticator: Optional[interfaces.IAuthenticator]
|
||||
:param installer: Installer object
|
||||
:type installer: interfaces.IInstaller
|
||||
|
||||
@@ -703,17 +703,17 @@ def update_account(config, unused_plugins):
|
||||
|
||||
if not accounts:
|
||||
return "Could not find an existing account to update."
|
||||
if config.email is None:
|
||||
if config.register_unsafely_without_email:
|
||||
return ("--register-unsafely-without-email provided, however, a "
|
||||
"new e-mail address must\ncurrently be provided when "
|
||||
"updating a registration.")
|
||||
if config.email is None and not config.register_unsafely_without_email:
|
||||
config.email = display_ops.get_email(optional=False)
|
||||
|
||||
acc, acme = _determine_account(config)
|
||||
cb_client = client.Client(config, acc, None, None, acme=acme)
|
||||
# Empty list of contacts in case the user is removing all emails
|
||||
|
||||
acc_contacts = () # type: Iterable[str]
|
||||
if config.email:
|
||||
acc_contacts = ['mailto:' + email for email in config.email.split(',')]
|
||||
# We rely on an exception to interrupt this process if it didn't work.
|
||||
acc_contacts = ['mailto:' + email for email in config.email.split(',')]
|
||||
prev_regr_uri = acc.regr.uri
|
||||
acc.regr = cb_client.acme.update_registration(acc.regr.update(
|
||||
body=acc.regr.body.update(contact=acc_contacts)))
|
||||
@@ -722,8 +722,13 @@ def update_account(config, unused_plugins):
|
||||
# so that we can also continue to use the account object with acmev1.
|
||||
acc.regr = acc.regr.update(uri=prev_regr_uri)
|
||||
account_storage.update_regr(acc, cb_client.acme)
|
||||
eff.prepare_subscription(config, acc)
|
||||
add_msg("Your e-mail address was updated to {0}.".format(config.email))
|
||||
|
||||
if config.email is None:
|
||||
add_msg("Any contact information associated with this account has been removed.")
|
||||
else:
|
||||
eff.prepare_subscription(config, acc)
|
||||
add_msg("Your e-mail address was updated to {0}.".format(config.email))
|
||||
|
||||
return None
|
||||
|
||||
|
||||
|
||||
@@ -340,8 +340,9 @@ def replace(src, dst):
|
||||
:param str dst: The new file path.
|
||||
"""
|
||||
if hasattr(os, 'replace'):
|
||||
# Use replace if possible. On Windows, only Python >= 3.5 is supported
|
||||
# so we can assume that os.replace() is always available for this platform.
|
||||
# Use replace if possible. Since we don't support Python 2 on Windows
|
||||
# and os.replace() was added in Python 3.3, we can assume that
|
||||
# os.replace() is always available on Windows.
|
||||
getattr(os, 'replace')(src, dst)
|
||||
else:
|
||||
# Otherwise, use os.rename() that behaves like os.replace() on Linux.
|
||||
|
||||
@@ -3,8 +3,11 @@ This compat modules is a wrapper of the core os module that forbids usage of spe
|
||||
(e.g. chown, chmod, getuid) that would be harmful to the Windows file security model of Certbot.
|
||||
This module is intended to replace standard os module throughout certbot projects (except acme).
|
||||
|
||||
isort:skip_file
|
||||
This module has the same API as the os module in the Python standard library
|
||||
except for the functions defined below.
|
||||
|
||||
"""
|
||||
# isort:skip_file
|
||||
# pylint: disable=function-redefined
|
||||
from __future__ import absolute_import
|
||||
|
||||
@@ -21,12 +24,15 @@ import os as std_os # pylint: disable=os-module-forbidden
|
||||
import sys as std_sys
|
||||
|
||||
ourselves = std_sys.modules[__name__]
|
||||
for attribute in dir(std_os):
|
||||
# Check if the attribute does not already exist in our module. It could be internal attributes
|
||||
# of the module (__name__, __doc__), or attributes from standard os already imported with
|
||||
# `from os import *`.
|
||||
if not hasattr(ourselves, attribute):
|
||||
setattr(ourselves, attribute, getattr(std_os, attribute))
|
||||
# Adding all of stdlib os to this module confuses Sphinx so we skip this when
|
||||
# building the documentation.
|
||||
if not std_os.environ.get("CERTBOT_DOCS") == "1":
|
||||
for attribute in dir(std_os):
|
||||
# Check if the attribute does not already exist in our module. It could
|
||||
# be internal attributes of the module (__name__, __doc__), or
|
||||
# attributes from standard os already imported with `from os import *`.
|
||||
if not hasattr(ourselves, attribute):
|
||||
setattr(ourselves, attribute, getattr(std_os, attribute))
|
||||
|
||||
# Import our internal path module, then allow certbot.compat.os.path
|
||||
# to behave as a module (similarly to os.path).
|
||||
|
||||
@@ -6,7 +6,6 @@ import zope.component
|
||||
from certbot import errors
|
||||
from certbot import interfaces
|
||||
from certbot import util
|
||||
from certbot.compat import misc
|
||||
from certbot.compat import os
|
||||
from certbot.display import util as display_util
|
||||
|
||||
@@ -33,9 +32,10 @@ def get_email(invalid=False, optional=True):
|
||||
msg = "Enter email address (used for urgent renewal and security notices)\n"
|
||||
unsafe_suggestion = ("\n\nIf you really want to skip this, you can run "
|
||||
"the client with --register-unsafely-without-email "
|
||||
"but make sure you then backup your account key from "
|
||||
"{0}\n\n".format(os.path.join(
|
||||
misc.get_default_folder('config'), 'accounts')))
|
||||
"but you will then be unable to receive notice about "
|
||||
"impending expiration or revocation of your "
|
||||
"certificates or problems with your Certbot "
|
||||
"installation that will lead to failure to renew.\n\n")
|
||||
if optional:
|
||||
if invalid:
|
||||
msg += unsafe_suggestion
|
||||
|
||||
@@ -118,7 +118,7 @@ optional arguments:
|
||||
case, and to know when to deprecate support for past
|
||||
Python versions and flags. If you wish to hide this
|
||||
information from the Let's Encrypt server, set this to
|
||||
"". (default: CertbotACMEClient/1.6.0 (certbot(-auto);
|
||||
"". (default: CertbotACMEClient/1.8.0 (certbot(-auto);
|
||||
OS_NAME OS_VERSION) Authenticator/XXX Installer/YYY
|
||||
(SUBCOMMAND; flags: FLAGS) Py/major.minor.patchlevel).
|
||||
The flags encoded in the user agent are: --duplicate,
|
||||
@@ -373,13 +373,11 @@ register:
|
||||
--register-unsafely-without-email
|
||||
Specifying this flag enables registering an account
|
||||
with no email address. This is strongly discouraged,
|
||||
because in the event of key loss or account compromise
|
||||
you will irrevocably lose access to your account. You
|
||||
will also be unable to receive notice about impending
|
||||
expiration or revocation of your certificates. Updates
|
||||
to the Subscriber Agreement will still affect you, and
|
||||
will be effective 14 days after posting an update to
|
||||
the web site. (default: False)
|
||||
because you will be unable to receive notice about
|
||||
impending expiration or revocation of your
|
||||
certificates or problems with your Certbot
|
||||
installation that will lead to failure to renew.
|
||||
(default: False)
|
||||
-m EMAIL, --email EMAIL
|
||||
Email used for registration and recovery contact. Use
|
||||
comma to register multiple emails, ex:
|
||||
@@ -602,7 +600,7 @@ dns-linode:
|
||||
--dns-linode-propagation-seconds DNS_LINODE_PROPAGATION_SECONDS
|
||||
The number of seconds to wait for DNS to propagate
|
||||
before asking the ACME server to verify the DNS
|
||||
record. (default: 1200)
|
||||
record. (default: 120)
|
||||
--dns-linode-credentials DNS_LINODE_CREDENTIALS
|
||||
Linode credentials INI file. (default: None)
|
||||
|
||||
@@ -702,6 +700,9 @@ nginx:
|
||||
--nginx-ctl NGINX_CTL
|
||||
Path to the 'nginx' binary, used for 'configtest' and
|
||||
retrieving nginx version number. (default: nginx)
|
||||
--nginx-sleep-seconds NGINX_SLEEP_SECONDS
|
||||
Number of seconds to wait for nginx configuration
|
||||
changes to apply when reloading. (default: 1)
|
||||
|
||||
null:
|
||||
Null Installer
|
||||
|
||||
@@ -18,6 +18,7 @@ Windows, you'll need to set up a (virtual) machine running an OS such as Linux
|
||||
and continue with these instructions on that UNIX-like OS.
|
||||
|
||||
.. _local copy:
|
||||
.. _prerequisites:
|
||||
|
||||
Running a local copy of the client
|
||||
----------------------------------
|
||||
@@ -340,7 +341,10 @@ only work for users who have Certbot installed from OS packages or via
|
||||
pip. Users who run `certbot-auto` are currently unable to use third-party
|
||||
plugins. It's technically possible to install third-party plugins into
|
||||
the virtualenv used by `certbot-auto`, but they will be wiped away when
|
||||
`certbot-auto` upgrades.
|
||||
`certbot-auto` upgrades. If you'd like your plugin to be used alongside
|
||||
the Certbot snap, you will also have to publish your plugin as a snap.
|
||||
Certbot's DNS plugins and the README file in ``tools/snap/`` provide a
|
||||
starting reference for how to do this.
|
||||
|
||||
.. _`setuptools entry points`:
|
||||
http://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
|
||||
@@ -575,33 +579,3 @@ effect. To do this, run::
|
||||
Now running the check for linting errors described above is as easy as::
|
||||
|
||||
tox -e lint
|
||||
|
||||
.. _prerequisites:
|
||||
|
||||
Notes on OS dependencies
|
||||
========================
|
||||
|
||||
OS-level dependencies can be installed like so:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
./certbot-auto --debug --os-packages-only
|
||||
|
||||
In general...
|
||||
|
||||
* ``sudo`` is required as a suggested way of running privileged process
|
||||
* `Python`_ 2.7 or 3.5+ is required
|
||||
* `Augeas`_ is required for the Python bindings
|
||||
* ``virtualenv`` is used for managing other Python library dependencies
|
||||
|
||||
.. _Python: https://wiki.python.org/moin/BeginnersGuide/Download
|
||||
.. _Augeas: http://augeas.net/
|
||||
.. _Virtualenv: https://virtualenv.pypa.io
|
||||
|
||||
|
||||
FreeBSD
|
||||
-------
|
||||
|
||||
FreeBSD by default uses ``tcsh``. In order to activate virtualenv (see
|
||||
above), you will need a compatible shell, e.g. ``pkg install bash &&
|
||||
bash``.
|
||||
|
||||
@@ -18,7 +18,7 @@ Certbot is packaged for many common operating systems and web servers. Check whe
|
||||
certbot.eff.org_, where you will also find the correct installation instructions for
|
||||
your system.
|
||||
|
||||
.. Note:: Unless you have very specific requirements, we kindly suggest that you use the Certbot packages provided by your package manager (see certbot.eff.org_). If such packages are not available, we recommend using ``certbot-auto``, which automates the process of installing Certbot on your system.
|
||||
.. Note:: Unless you have very specific requirements, we kindly suggest that you use the installation instructions for your system found at certbot.eff.org_.
|
||||
|
||||
.. _certbot.eff.org: https://certbot.eff.org
|
||||
|
||||
@@ -28,7 +28,7 @@ your system.
|
||||
System Requirements
|
||||
===================
|
||||
|
||||
Certbot currently requires Python 2.7 or 3.5+ running on a UNIX-like operating
|
||||
Certbot currently requires Python 2.7 or 3.6+ running on a UNIX-like operating
|
||||
system. By default, it requires root access in order to write to
|
||||
``/etc/letsencrypt``, ``/var/log/letsencrypt``, ``/var/lib/letsencrypt``; to
|
||||
bind to port 80 (if you use the ``standalone`` plugin) and to read and
|
||||
@@ -67,10 +67,10 @@ Snap
|
||||
----
|
||||
|
||||
Most modern Linux distributions (basically any that use systemd) can install
|
||||
Certbot packaged as a snap. Support for the Certbot snap is currently in its
|
||||
beta phase and limited to the x86_64 architecture, but it provides an easy way
|
||||
to ensure you have the latest version of Certbot with features like automated
|
||||
certificate renewal preconfigured.
|
||||
Certbot packaged as a snap. Snaps are available for x86_64, ARMv7 and ARMv8
|
||||
architectures. The Certbot snap provides an easy way to ensure you have the
|
||||
latest version of Certbot with features like automated certificate renewal
|
||||
preconfigured.
|
||||
|
||||
You can find instructions for installing the Certbot snap at
|
||||
https://certbot.eff.org/instructions by selecting your server software and then
|
||||
@@ -156,18 +156,17 @@ certificate. However, this mode of operation is unable to install
|
||||
certificates or configure your webserver, because our installer
|
||||
plugins cannot reach your webserver from inside the Docker container.
|
||||
|
||||
Most users should use the operating system packages (see instructions at
|
||||
certbot.eff.org_) or, as a fallback, ``certbot-auto``. You should only
|
||||
use Docker if you are sure you know what you are doing and have a
|
||||
good reason to do so.
|
||||
Most users should use the instructions at certbot.eff.org_. You should only use
|
||||
Docker if you are sure you know what you are doing and have a good reason to do
|
||||
so.
|
||||
|
||||
You should definitely read the :ref:`where-certs` section, in order to
|
||||
know how to manage the certs
|
||||
manually. `Our ciphersuites page <ciphers.html>`__
|
||||
provides some information about recommended ciphersuites. If none of
|
||||
these make much sense to you, you should definitely use the
|
||||
certbot-auto_ method, which enables you to use installer plugins
|
||||
that cover both of those hard topics.
|
||||
these make much sense to you, you should definitely use the installation method
|
||||
recommended for your system at certbot.eff.org_, which enables you to use
|
||||
installer plugins that cover both of those hard topics.
|
||||
|
||||
If you're still not convinced and have decided to use this method, from
|
||||
the server that the domain you're requesting a certficate for resolves
|
||||
@@ -197,10 +196,7 @@ want to use. For example, to use Certbot's plugin for Amazon Route 53,
|
||||
you'd use ``certbot/dns-route53``. You may also need to add flags to
|
||||
Certbot and/or mount additional directories to provide access to your
|
||||
DNS API credentials as specified in the :ref:`DNS plugin documentation
|
||||
<dns_plugins>`. If you would like to obtain a wildcard certificate from
|
||||
Let's Encrypt's ACMEv2 server, you'll need to include ``--server
|
||||
https://acme-v02.api.letsencrypt.org/directory`` on the command line as
|
||||
well.
|
||||
<dns_plugins>`.
|
||||
|
||||
For more information about the layout
|
||||
of the ``/etc/letsencrypt`` directory, see :ref:`where-certs`.
|
||||
@@ -250,9 +246,6 @@ through a command like:
|
||||
They can be installed by running the same installation command above but
|
||||
replacing ``certbot`` with the name of the desired package.
|
||||
|
||||
There are no Certbot packages available for Debian Jessie and Jessie users
|
||||
should instead use certbot-auto_.
|
||||
|
||||
**Ubuntu**
|
||||
|
||||
If you run Ubuntu Trusty, Xenial, or Bionic, certbot is available through the official PPA,
|
||||
@@ -291,39 +284,19 @@ Optionally to install the Certbot Apache plugin, you can use:
|
||||
|
||||
**Gentoo**
|
||||
|
||||
The official Certbot client is available in Gentoo Portage. If you
|
||||
want to use the Apache plugin, it has to be installed separately:
|
||||
The official Certbot client is available in Gentoo Portage. From the
|
||||
official Certbot plugins, three of them are also available in Portage.
|
||||
They need to be installed separately if you require their functionality.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
emerge -av app-crypt/certbot
|
||||
emerge -av app-crypt/certbot-apache
|
||||
emerge -av app-crypt/certbot-nginx
|
||||
emerge -av app-crypt/certbot-dns-nsone
|
||||
|
||||
When using the Apache plugin, you will run into a "cannot find an
|
||||
SSLCertificateFile directive" or "cannot find an SSLCertificateKeyFile
|
||||
directive for certificate" error if you're sporting the default Gentoo
|
||||
``httpd.conf``. You can fix this by commenting out two lines in
|
||||
``/etc/apache2/httpd.conf`` as follows:
|
||||
|
||||
Change
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
<IfDefine SSL>
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
</IfDefine>
|
||||
|
||||
to
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
#<IfDefine SSL>
|
||||
LoadModule ssl_module modules/mod_ssl.so
|
||||
#</IfDefine>
|
||||
|
||||
For the time being, this is the only way for the Apache plugin to recognise
|
||||
the appropriate directives when installing the certificate.
|
||||
Note: this change is not required for the other plugins.
|
||||
.. Note:: The ``app-crypt/certbot-dns-nsone`` package has a different
|
||||
maintainer than the other packages and can lag behind in version.
|
||||
|
||||
**NetBSD**
|
||||
|
||||
|
||||
@@ -180,9 +180,9 @@ Certbot's DNS plugins.
|
||||
|
||||
These plugins are not included in a default Certbot installation and must be
|
||||
installed separately. While the DNS plugins cannot currently be used with
|
||||
``certbot-auto``, they are available in many OS package managers and as Docker
|
||||
images. Visit https://certbot.eff.org to learn the best way to use the DNS
|
||||
plugins on your system.
|
||||
``certbot-auto``, they are available in many OS package managers, as Docker
|
||||
images, and as snaps. Visit https://certbot.eff.org to learn the best way to use
|
||||
the DNS plugins on your system.
|
||||
|
||||
Once installed, you can find documentation on how to use each plugin at:
|
||||
|
||||
@@ -392,7 +392,7 @@ abuse of the ACME protocol, as described
|
||||
.. _changing:
|
||||
|
||||
Changing a Certificate's Domains
|
||||
================================
|
||||
--------------------------------
|
||||
|
||||
The ``--cert-name`` flag can also be used to modify the domains a certificate contains,
|
||||
by specifying new domains using the ``-d`` or ``--domains`` flag. If certificate ``example.com``
|
||||
@@ -631,7 +631,6 @@ systemd timers (`systemctl list-timers`).
|
||||
:header: "Distribution Name", "Distribution Version", "Automation Method"
|
||||
|
||||
"CentOS", "EPEL 7", "systemd"
|
||||
"Debian", "jessie", "cron, systemd"
|
||||
"Debian", "stretch", "cron, systemd"
|
||||
"Debian", "testing/sid", "cron, systemd"
|
||||
"Fedora", "26", "systemd"
|
||||
|
||||
@@ -83,7 +83,6 @@ elif sys.version_info < (3,3):
|
||||
|
||||
dev_extras = [
|
||||
'coverage',
|
||||
'ipdb',
|
||||
'pytest',
|
||||
'pytest-cov',
|
||||
'pytest-xdist',
|
||||
@@ -94,7 +93,10 @@ dev_extras = [
|
||||
|
||||
dev3_extras = [
|
||||
'astroid',
|
||||
'azure-devops',
|
||||
'ipdb',
|
||||
'mypy',
|
||||
'PyGithub',
|
||||
'pylint',
|
||||
]
|
||||
|
||||
@@ -131,7 +133,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 :: Console',
|
||||
@@ -143,7 +145,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',
|
||||
|
||||
@@ -306,7 +306,7 @@ class PostArgParseExceptHookTest(unittest.TestCase):
|
||||
self.log_path = 'foo.log'
|
||||
|
||||
def test_base_exception(self):
|
||||
exc_type = KeyboardInterrupt
|
||||
exc_type = BaseException
|
||||
mock_logger, output = self._test_common(exc_type, debug=False)
|
||||
self._assert_exception_logged(mock_logger.error, exc_type)
|
||||
self._assert_logfile_output(output)
|
||||
@@ -342,6 +342,11 @@ class PostArgParseExceptHookTest(unittest.TestCase):
|
||||
self._assert_exception_logged(mock_logger.debug, exc_type)
|
||||
self._assert_quiet_output(mock_logger, output)
|
||||
|
||||
def test_keyboardinterrupt(self):
|
||||
exc_type = KeyboardInterrupt
|
||||
mock_logger, output = self._test_common(exc_type, debug=False)
|
||||
mock_logger.error.assert_called_once_with('Exiting due to user request.')
|
||||
|
||||
def _test_common(self, error_type, debug):
|
||||
"""Returns the mocked logger and stderr output."""
|
||||
mock_err = six.StringIO()
|
||||
|
||||
@@ -1404,6 +1404,43 @@ class MainTest(test_util.ConfigTestCase):
|
||||
"user@example.org"])
|
||||
self.assertTrue("Could not find an existing account" in x[0])
|
||||
|
||||
@mock.patch('certbot._internal.main._determine_account')
|
||||
@mock.patch('certbot._internal.eff.prepare_subscription')
|
||||
@mock.patch('certbot._internal.main.account')
|
||||
def test_update_account_remove_email(self, mocked_account_module, mock_prepare, mock_det_acc):
|
||||
# Mock account storage and the account object returned
|
||||
mocked_storage = mock.MagicMock()
|
||||
mocked_account = mock.MagicMock()
|
||||
|
||||
mocked_account_module.AccountFileStorage.return_value = mocked_storage
|
||||
mocked_storage.find_all.return_value = [mocked_account]
|
||||
mock_det_acc.return_value = (mocked_account, "foo")
|
||||
|
||||
# Mock registration body to verify calls are made
|
||||
mock_regr_body = mock.MagicMock()
|
||||
|
||||
# mocked_account.regr is overwritten in update, requiring an odd mock setup
|
||||
mocked_account.regr.body = mock_regr_body
|
||||
|
||||
x = self._call(
|
||||
["update_account", "--register-unsafely-without-email"])
|
||||
|
||||
|
||||
# When update succeeds, the return value of update_account() is None
|
||||
self.assertTrue(x[0] is None)
|
||||
# and we got supposedly did update the registration from
|
||||
# the server
|
||||
client_mock = x[3]
|
||||
self.assertTrue(client_mock.Client().acme.update_registration.called)
|
||||
|
||||
self.assertTrue(mock_regr_body.update.called)
|
||||
self.assertTrue('contact' in mock_regr_body.update.call_args[1])
|
||||
self.assertEqual(mock_regr_body.update.call_args[1]['contact'], ())
|
||||
# and we saved the updated registration on disk
|
||||
self.assertTrue(mocked_storage.update_regr.called)
|
||||
# ensure we didn't try to subscribe (no email to subscribe with)
|
||||
self.assertFalse(mock_prepare.called)
|
||||
|
||||
@mock.patch('certbot._internal.main.display_ops.get_email')
|
||||
@test_util.patch_get_utility()
|
||||
def test_update_account_with_email(self, mock_utility, mock_email):
|
||||
|
||||
@@ -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.8.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.
|
||||
@@ -930,7 +930,7 @@ else
|
||||
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 "Please see https://certbot.eff.org/docs/contributing.html#prerequisites"
|
||||
error "for more info."
|
||||
exit 1
|
||||
}
|
||||
@@ -1530,18 +1530,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.8.0 \
|
||||
--hash=sha256:4bde86c53e30dc5bc0e78a0862045b053971703af727ac20c6a7da06596c7549 \
|
||||
--hash=sha256:4837c516af6543ccd10d70f1498a2113bbdf9ef9a05d3a18b1558b291a2953e4
|
||||
acme==1.8.0 \
|
||||
--hash=sha256:465033830a75f98042236f50f751f6e316735473ccb4edec0c718263f6c9ba8b \
|
||||
--hash=sha256:ad8d067d14258d73ad2643439d9365913362308c04e66cc3010e39c868c5002d
|
||||
certbot-apache==1.8.0 \
|
||||
--hash=sha256:8c9d981803e1156725fcfcf228afcb754b245c9d506e5b9f4fca948d6ae89aef \
|
||||
--hash=sha256:a93c3a7ad929fe0ba5e0868e29ee2d0fe10aea2d4c638a902c4613a5c12c59b6
|
||||
certbot-nginx==1.8.0 \
|
||||
--hash=sha256:e98e883b5ea7b29dd2e6a8ff286c7550a2d7af2fc859f47067303e510ad4fb52 \
|
||||
--hash=sha256:fdb96c74fe42d90bbaf11a00314444ac5544ba87292a1b8b1d707f7561a3eacc
|
||||
|
||||
UNLIKELY_EOF
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# For running tests, build a docker image with a passwordless sudo and a trust
|
||||
# store we can manipulate.
|
||||
|
||||
FROM debian:jessie
|
||||
|
||||
# Add an unprivileged user:
|
||||
RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups sudo --uid 1000 lea
|
||||
|
||||
# Install pip, sudo, and openssl:
|
||||
RUN apt-get update && \
|
||||
apt-get -q -y install python-pip sudo openssl && \
|
||||
apt-get clean
|
||||
# Use pipstrap to update to a stable and tested version of pip
|
||||
COPY ./pieces/pipstrap.py /opt
|
||||
RUN /opt/pipstrap.py
|
||||
# Pin pytest version for increased stability
|
||||
RUN pip install pytest==3.2.5 six==1.10.0
|
||||
|
||||
# Let that user sudo:
|
||||
RUN sed -i.bkp -e \
|
||||
's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' \
|
||||
/etc/sudoers
|
||||
|
||||
RUN mkdir -p /home/lea/certbot
|
||||
|
||||
# Install fake testing CA:
|
||||
COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
|
||||
|
||||
# Copy code:
|
||||
COPY . /home/lea/certbot/letsencrypt-auto-source
|
||||
|
||||
USER lea
|
||||
WORKDIR /home/lea
|
||||
|
||||
CMD ["pytest", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
|
||||
@@ -1,11 +1,11 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAABCAAdFiEEos+1H6J1pyhiNOeyTRfJlc2XdfIFAl8EsdgACgkQTRfJlc2X
|
||||
dfIBlAgAmUXFr9b4uPM0b0Nao82XhsvRB/BnpmRS2kjdYBCKCi/RWXJeU6skIj+H
|
||||
dGPFqrpScMxRizSRyiureW+GM5gNl2et4XAlJoHHwBYjhzcSpeS+Ve9oI4HNWcvr
|
||||
E3G10z82Gn4o+Fdj3VL50q7W2NxN90Lboyfurh7t+6dI/RaWLxMdyfYp7DlxadJF
|
||||
jVeLaPA2Xa8y+Rv9mD5IAykR12CIKK12PnSv2i4fDCNSDCXbSyaFUkOF14FJfp/1
|
||||
TKV9LBxx0VXmwlEjgK8n/nCS4R3eQvFf+Cw96XsYcnNhatJheLKmlfBHU2znzUeN
|
||||
faHtZjMoDhecefXCINRi9gaoW3mdRg==
|
||||
=Issq
|
||||
iQEzBAABCAAdFiEEos+1H6J1pyhiNOeyTRfJlc2XdfIFAl9XuHIACgkQTRfJlc2X
|
||||
dfIU8wgAkwXao63sZxfiRfeQfzyM01oYEaqjp17gX/f0QhxvmrBUIdBKsF3TBZ9H
|
||||
7c3NYlBxJ31/a5PVfzElQJAzqMl4yEdlZK1mxKEepQycmW+vHOq8DOfpvOU957ro
|
||||
cRBpDcu5BK+/tKPqVTHpLRZX7SFjzpunwKmmdCz1JzxLuf0Wgrqmq678Yyh6rLdT
|
||||
96j7bDhHCDg0R2RC3hL1yk9HyMdh/nSKUYNnQdqAi/YSybclHXBU2NJURupMrei1
|
||||
6LLoE6I8wo4LXptCaM48kQEHBKGwdMWeimVkos0YbmIzcPbmmetmu+MvrL/T/Dz8
|
||||
6OEBdYbAkMdT2gzseq76CYEUeWhL0g==
|
||||
=1K2n
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
@@ -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.7.0.dev0"
|
||||
LE_AUTO_VERSION="1.9.0.dev0"
|
||||
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.
|
||||
@@ -930,7 +930,7 @@ else
|
||||
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 "Please see https://certbot.eff.org/docs/contributing.html#prerequisites"
|
||||
error "for more info."
|
||||
exit 1
|
||||
}
|
||||
@@ -1530,18 +1530,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.8.0 \
|
||||
--hash=sha256:4bde86c53e30dc5bc0e78a0862045b053971703af727ac20c6a7da06596c7549 \
|
||||
--hash=sha256:4837c516af6543ccd10d70f1498a2113bbdf9ef9a05d3a18b1558b291a2953e4
|
||||
acme==1.8.0 \
|
||||
--hash=sha256:465033830a75f98042236f50f751f6e316735473ccb4edec0c718263f6c9ba8b \
|
||||
--hash=sha256:ad8d067d14258d73ad2643439d9365913362308c04e66cc3010e39c868c5002d
|
||||
certbot-apache==1.8.0 \
|
||||
--hash=sha256:8c9d981803e1156725fcfcf228afcb754b245c9d506e5b9f4fca948d6ae89aef \
|
||||
--hash=sha256:a93c3a7ad929fe0ba5e0868e29ee2d0fe10aea2d4c638a902c4613a5c12c59b6
|
||||
certbot-nginx==1.8.0 \
|
||||
--hash=sha256:e98e883b5ea7b29dd2e6a8ff286c7550a2d7af2fc859f47067303e510ad4fb52 \
|
||||
--hash=sha256:fdb96c74fe42d90bbaf11a00314444ac5544ba87292a1b8b1d707f7561a3eacc
|
||||
|
||||
UNLIKELY_EOF
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user