From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7962515808B for ; Wed, 13 Apr 2022 17:11:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 549F2E0950; Wed, 13 Apr 2022 17:11:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 751D4E0950 for ; Wed, 13 Apr 2022 17:11:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 936AF341D30 for ; Wed, 13 Apr 2022 17:11:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D354F177 for ; Wed, 13 Apr 2022 17:11:20 +0000 (UTC) From: "Brian Evans" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Evans" Message-ID: <1649869800.7a6b3b7b1760583be2d969507e7f6c3af199f7cf.grknight@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/snuffleupagus/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-php/snuffleupagus/Manifest dev-php/snuffleupagus/metadata.xml dev-php/snuffleupagus/snuffleupagus-0.7.1.ebuild X-VCS-Directories: dev-php/snuffleupagus/ X-VCS-Committer: grknight X-VCS-Committer-Name: Brian Evans X-VCS-Revision: 7a6b3b7b1760583be2d969507e7f6c3af199f7cf X-VCS-Branch: master Date: Wed, 13 Apr 2022 17:11:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d823140d-f916-4daa-a36d-07e16b14fa8a X-Archives-Hash: 99ac79ac77db506a18005d6b37101062 commit: 7a6b3b7b1760583be2d969507e7f6c3af199f7cf Author: Brian Evans gentoo org> AuthorDate: Wed Apr 13 17:10:00 2022 +0000 Commit: Brian Evans gentoo org> CommitDate: Wed Apr 13 17:10:00 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a6b3b7b dev-php/snuffleupagus: New package A security add on script in the spirit of suhosin with modern flexibility. Signed-off-by: Brian Evans gentoo.org> dev-php/snuffleupagus/Manifest | 1 + dev-php/snuffleupagus/metadata.xml | 11 +++++ dev-php/snuffleupagus/snuffleupagus-0.7.1.ebuild | 59 ++++++++++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/dev-php/snuffleupagus/Manifest b/dev-php/snuffleupagus/Manifest new file mode 100644 index 000000000000..893d570b5b49 --- /dev/null +++ b/dev-php/snuffleupagus/Manifest @@ -0,0 +1 @@ +DIST snuffleupagus-0.7.1.tar.gz 11962220 BLAKE2B 8504721ca08e727a5a6fa58c216a5dac7be3fe6e5a98cffcb17e44a2235628c26f02afd2159e9b1fbe8e40e26bc7c4e34a4ff027ee27b8ec29cf89865dbb8514 SHA512 21510e214f94dd50a4aa05226188c9433a6a261c0bd3d58973ed4536754b3e12356e3f625480c370b66c570482694c25d336a771fbbbeb27e1d524b1f82c7869 diff --git a/dev-php/snuffleupagus/metadata.xml b/dev-php/snuffleupagus/metadata.xml new file mode 100644 index 000000000000..6cb8e5e502b5 --- /dev/null +++ b/dev-php/snuffleupagus/metadata.xml @@ -0,0 +1,11 @@ + + + + + php-bugs@gentoo.org + PHP + + + jvoisin/snuffleupagus + + diff --git a/dev-php/snuffleupagus/snuffleupagus-0.7.1.ebuild b/dev-php/snuffleupagus/snuffleupagus-0.7.1.ebuild new file mode 100644 index 000000000000..13decdb51061 --- /dev/null +++ b/dev-php/snuffleupagus/snuffleupagus-0.7.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PHP_EXT_NAME="${PN}" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +PHP_EXT_ECONF_ARGS=( --enable-${PN} ) +PHP_EXT_S="${S}/src" + +USE_PHP="php7-4 php8-0" + +inherit php-ext-source-r3 + +KEYWORDS="~amd64" + +DESCRIPTION="A PHP module to drastically raise the cost of attacks against websites" +HOMEPAGE="https://snuffleupagus.readthedocs.io/index.html" +SRC_URI="https://github.com/jvoisin/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="LGPL-3 PHP-3.01" +SLOT="0" + +src_prepare() { + # fix file locations tests look for + ln -s "${P}/config" "${WORKDIR}/config" || die + # Fix path dependent tests + sed -i -e 's~src/tests/~~' \ + src/tests/session_encryption/crypt_session_read_uncrypt.phpt || die + sed -i -e 's~%a/src~%a~' \ + src/tests/disable_function/disabled_functions_runtime.phpt || die + php-ext-source-r3_src_prepare +} + +src_install() { + einstalldocs + local slot x cfgdir + php-ext-source-r3_src_install + # Add the rules file which vary by install version + for slot in $(php_get_slots); do + php_init_slot_env "${slot}" + for x in ${PHP_EXT_SAPIS} ; do + cfgdir="/etc/php/${x}-${slot}" + php-ext-source-r3_addtoinifile "${cfgdir}/ext/${PHP_INI_NAME}.ini" \ + "sp.configuration_file" "${cfgdir}/${PN}.rules" + insinto "${cfgdir}" + case ${PHP_CURRENTSLOT:0:1} in + 8) newins "${S}/config/default_php8.rules" "${PN}.rules" ;; + *) newins "${S}/config/default.rules" "${PN}.rules" ;; + esac + done + done +} + +pkg_postinst() { + elog "This extension is configured with recommended rules enabled by default." + elog "Feel free to customize as necessary. Please test outside of production first." + elog "Failure to test may cause unexpected results to loosely coded sites." +}