diff options
-rw-r--r-- | app-crypt/acme-tiny/Manifest | 1 | ||||
-rw-r--r-- | app-crypt/acme-tiny/acme-tiny-4.0.0.ebuild | 43 | ||||
-rw-r--r-- | app-crypt/acme-tiny/acme-tiny-9999.ebuild | 11 | ||||
-rw-r--r-- | app-crypt/acme-tiny/files/acme-tiny-4.0.0-PR101-contactinfo.patch | 34 |
4 files changed, 81 insertions, 8 deletions
diff --git a/app-crypt/acme-tiny/Manifest b/app-crypt/acme-tiny/Manifest index 3c3367257ead..b176bea3185c 100644 --- a/app-crypt/acme-tiny/Manifest +++ b/app-crypt/acme-tiny/Manifest @@ -1 +1,2 @@ DIST acme-tiny-0_p20170917.tar.gz 10516 BLAKE2B e9d4ae170579cd5379dbb4d900d051bc1789ac994eb491aafb9952cd004b3e3feed20ef505f88587035f3f16163e7965a1b3883caaaa8c2327fca6be0240a17f SHA512 0bfb0d064f21f9d89e3c5863f33c7326c02948a42e2c8dc11c7b5baaf5e0dfcaeba0ad461b2ad12e292cc14f64b44f331f11b56dda6592a4663baf0714048700 +DIST acme-tiny-4.0.0.tar.gz 11934 BLAKE2B 2303fcd4e14d75cb7b36426f9ffe7e5f989d886be16b322aea2f8b40937e8c1a850704869570911ff7365a9545f5e41006f4e655ba207db9a7105ec3d59c8c32 SHA512 45f3469fbfa8b57c5755595823a6d08fd977c29d948b618ab6bd9c4feba4910bdcc1540757ba78bcdcd7e01c6f7451f4e8aec951a0ae118ab6597a1714f30691 diff --git a/app-crypt/acme-tiny/acme-tiny-4.0.0.ebuild b/app-crypt/acme-tiny/acme-tiny-4.0.0.ebuild new file mode 100644 index 000000000000..c36ebd5cd3c8 --- /dev/null +++ b/app-crypt/acme-tiny/acme-tiny-4.0.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) +inherit distutils-r1 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/diafygi/${PN}.git" + KEYWORDS="" +else + SRC_URI="https://github.com/diafygi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="A tiny, auditable script for Let's Encrypt's ACME Protocol" +HOMEPAGE="https://github.com/diafygi/acme-tiny" + +LICENSE="MIT" +SLOT="0" + +IUSE="minimal" + +DEPEND="dev-python/setuptools_scm[${PYTHON_USEDEP}]" +RDEPEND="dev-libs/openssl:0" + +pkg_setup() { + if [[ ${PV} != 9999 ]]; then + export SETUPTOOLS_SCM_PRETEND_VERSION="${PV}" + fi +} + +src_prepare() { + if ! use minimal; then + local PATCHES=( + "${FILESDIR}/${PN}-PR87-readmefix.patch" + "${FILESDIR}/${PN}-4.0.0-PR101-contactinfo.patch" + ) + fi + distutils-r1_src_prepare +} diff --git a/app-crypt/acme-tiny/acme-tiny-9999.ebuild b/app-crypt/acme-tiny/acme-tiny-9999.ebuild index 2ec5bef8dcba..c36ebd5cd3c8 100644 --- a/app-crypt/acme-tiny/acme-tiny-9999.ebuild +++ b/app-crypt/acme-tiny/acme-tiny-9999.ebuild @@ -10,11 +10,6 @@ if [[ ${PV} == 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/diafygi/${PN}.git" KEYWORDS="" -elif [[ ${PV} =~ 0_p* ]]; then - HASH="4ed13950c0a9cf61f1ca81ff1874cde1cf48ab32" - SRC_URI="https://github.com/diafygi/${PN}/archive/${HASH}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" - S="${WORKDIR}/${PN}-${HASH}" else SRC_URI="https://github.com/diafygi/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" @@ -33,15 +28,15 @@ RDEPEND="dev-libs/openssl:0" pkg_setup() { if [[ ${PV} != 9999 ]]; then - export SETUPTOOLS_SCM_PRETEND_VERSION="0.1.dev79+n${HASH:0:7}.d$(date +%Y%m%d)" + export SETUPTOOLS_SCM_PRETEND_VERSION="${PV}" fi } src_prepare() { if ! use minimal; then - PATCHES+=( + local PATCHES=( "${FILESDIR}/${PN}-PR87-readmefix.patch" - "${FILESDIR}/${PN}-PR101-contactinfo.patch" + "${FILESDIR}/${PN}-4.0.0-PR101-contactinfo.patch" ) fi distutils-r1_src_prepare diff --git a/app-crypt/acme-tiny/files/acme-tiny-4.0.0-PR101-contactinfo.patch b/app-crypt/acme-tiny/files/acme-tiny-4.0.0-PR101-contactinfo.patch new file mode 100644 index 000000000000..447ed5f5f9b5 --- /dev/null +++ b/app-crypt/acme-tiny/files/acme-tiny-4.0.0-PR101-contactinfo.patch @@ -0,0 +1,34 @@ +--- a/acme_tiny.py 2018-03-16 02:37:41.989372265 -0400 ++++ b/acme_tiny.py 2018-03-16 02:53:28.365319918 -0400 +@@ -12,7 +12,7 @@ + LOGGER.addHandler(logging.StreamHandler()) + LOGGER.setLevel(logging.INFO) + +-def get_crt(account_key, csr, acme_dir, log=LOGGER, CA=DEFAULT_CA, disable_check=False, directory_url=DEFAULT_DIRECTORY_URL): ++def get_crt(account_key, csr, acme_dir, account_email, log=LOGGER, CA=DEFAULT_CA, disable_check=False, directory_url=DEFAULT_DIRECTORY_URL): + directory, acct_headers, alg, jwk = None, None, None, None # global variables + + # helper functions - base64 encode for jose spec +@@ -107,6 +107,8 @@ + # create account and set the global key identifier + log.info("Registering account...") + reg_payload = {"termsOfServiceAgreed": True} ++ if account_email: ++ reg_payload["contact"] = ["mailto:"+account_email] + account, code, acct_headers = _send_signed_request(directory['newAccount'], reg_payload, "Error registering") + log.info("Registered!" if code == 201 else "Already registered!") + +@@ -185,10 +187,12 @@ + parser.add_argument("--disable-check", default=False, action="store_true", help="disable checking if the challenge file is hosted correctly before telling the CA") + parser.add_argument("--directory-url", default=DEFAULT_DIRECTORY_URL, help="certificate authority directory url, default is Let's Encrypt") + parser.add_argument("--ca", default=DEFAULT_CA, help="DEPRECATED! USE --directory-url INSTEAD!") ++ parser.add_argument("--account-email", help="contact e-mail address") + + args = parser.parse_args(argv) + LOGGER.setLevel(args.quiet or LOGGER.level) +- signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url) ++ signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, ++ args.account_email, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url) + sys.stdout.write(signed_crt) + + if __name__ == "__main__": # pragma: no cover |