diff --git a/security/acme.sh/Makefile b/security/acme.sh/Makefile index e5ad098963d2..c36e819d362f 100644 --- a/security/acme.sh/Makefile +++ b/security/acme.sh/Makefile @@ -1,81 +1,82 @@ PORTNAME= acme.sh PORTVERSION= 3.1.1 +PORTREVISION= 1 CATEGORIES= security MAINTAINER= dvl@FreeBSD.org COMMENT= ACME protocol client written in shell WWW= https://github.com/Neilpang/acme.sh/ LICENSE= GPLv3+ USES= shebangfix SHEBANG_FILES= deploy/synology_dsm.sh USE_GITHUB= yes GH_ACCOUNT= acmesh-official USERS= acme GROUPS= acme OPTIONS_DEFINE= BINDTOOLS DOCS EXAMPLES IDN STANDALONE OPTIONS_DEFAULT= CURL STANDALONE OPTIONS_SINGLE= HTTP OPTIONS_SINGLE_HTTP= CURL WGET BINDTOOLS_DESC= Depend on bind-tools for nsupdate CURL_DESC= Depend on cURL for HTTP(S) queries STANDALONE_DESC= Standalone mode requires SOCAT WGET_DESC= Depend on Wget for HTTP(S) queries NO_ARCH= yes NO_BUILD= yes BINDTOOLS_RUN_DEPENDS= nsupdate:dns/bind-tools CURL_RUN_DEPENDS= curl:ftp/curl IDN_RUN_DEPENDS= idn2:dns/libidn2 STANDALONE_RUN_DEPENDS= socat>0:net/socat WGET_RUN_DEPENDS= wget:ftp/wget PORTDOCS= README.md SUB_FILES= acme-crontab pkg-message SUB_LIST= ACME_USER=acme post-patch-EXAMPLES-on: ${REINPLACE_CMD} -e 's|sed -i "|sed -i bak "|' ${WRKSRC}/dnsapi/dns_nsd.sh post-patch-IDN-on: ${REINPLACE_CMD} -e 's|^ *idn | idn2 |'\ -e 's|_exists idn|_exists idn2|' ${WRKSRC}/acme.sh do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME} ${MKDIR} ${STAGEDIR}/var/db/acme/.acme.sh \ ${STAGEDIR}/var/db/acme/certs \ ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d \ ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${FILESDIR}/account.conf.sample ${STAGEDIR}/var/db/acme/.acme.sh ${INSTALL_DATA} ${WRKDIR}/acme-crontab ${STAGEDIR}${EXAMPLESDIR}/acme.sh-cron.d ${INSTALL_DATA} ${FILESDIR}/acme-newsyslog ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/acme.sh.conf.sample do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} do-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/deploy ${STAGEDIR}${EXAMPLESDIR}/dnsapi ( cd ${WRKSRC} && ${COPYTREE_BIN} deploy ${STAGEDIR}${EXAMPLESDIR} ) ( cd ${WRKSRC} && ${COPYTREE_BIN} dnsapi ${STAGEDIR}${EXAMPLESDIR} ) ( cd ${WRKSRC} && ${COPYTREE_BIN} notify ${STAGEDIR}${EXAMPLESDIR} ) ${RLN} ${STAGEDIR}/${EXAMPLESDIR}/deploy ${STAGEDIR}/var/db/acme/.acme.sh ${RLN} ${STAGEDIR}/${EXAMPLESDIR}/dnsapi ${STAGEDIR}/var/db/acme/.acme.sh ${RLN} ${STAGEDIR}/${EXAMPLESDIR}/notify ${STAGEDIR}/var/db/acme/.acme.sh .include diff --git a/security/acme.sh/files/patch-acme.sh b/security/acme.sh/files/patch-acme.sh new file mode 100644 index 000000000000..e21b8561a5dc --- /dev/null +++ b/security/acme.sh/files/patch-acme.sh @@ -0,0 +1,36 @@ +diff --git acme.sh acme.sh +index 3316b25fa9..02986a332d 100755 +--- acme.sh ++++ acme.sh +@@ -436,14 +436,28 @@ _secure_debug3() { + fi + } + ++__USE_TR_TAG="" ++if [ "$(echo "abc" | LANG=C tr a-z A-Z 2>/dev/null)" != "ABC" ] ; then ++ __USE_TR_TAG="1" ++fi ++export __USE_TR_TAG ++ + _upper_case() { ++ if [ "$__USE_TR_TAG" ]; then ++ LANG=C tr '[:lower:]' '[:upper:]' ++ else + # shellcheck disable=SC2018,SC2019 +- tr '[a-z]' '[A-Z]' ++ LANG=C tr '[a-z]' '[A-Z]' ++ fi + } + + _lower_case() { +- # shellcheck disable=SC2018,SC2019 +- tr '[A-Z]' '[a-z]' ++ if [ "$__USE_TR_TAG" ]; then ++ LANG=C tr '[:upper:]' '[:lower:]' ++ else ++ # shellcheck disable=SC2018,SC2019 ++ LANG=C tr '[A-Z]' '[a-z]' ++ fi + } + + _startswith() {