From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-dev+bounces-95345-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 49DBF158CB7 for <garchives@archives.gentoo.org>; Thu, 19 Aug 2021 18:02:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7591AE0869; Thu, 19 Aug 2021 18:02:53 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EC1C5E0822 for <gentoo-dev@lists.gentoo.org>; Thu, 19 Aug 2021 18:02:52 +0000 (UTC) From: Andreas Sturmlechner <asturm@gentoo.org> To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH 2/2] ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir Date: Thu, 19 Aug 2021 20:02:42 +0200 Message-ID: <5345638.IbC2pHGDlb@tuxbrain> In-Reply-To: <2510119.fDdHjke4Dd@tuxbrain> References: <2510119.fDdHjke4Dd@tuxbrain> Precedence: bulk List-Post: <mailto:gentoo-dev@lists.gentoo.org> List-Help: <mailto:gentoo-dev+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org> X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2674497.DJkKcVGEfx"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Archives-Salt: cc04b3d3-a797-4508-b733-99f7dd3b19a4 X-Archives-Hash: ded6909f5d1fdb6ff064b43e8c809b22 --nextPart2674497.DJkKcVGEfx Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii"; protected-headers="v1" From: Andreas Sturmlechner <asturm@gentoo.org> To: gentoo-dev@lists.gentoo.org Subject: [PATCH 2/2] ecm.eclass: Drop exec. bit from .desktop files in xdg standard dir Date: Thu, 19 Aug 2021 20:02:42 +0200 Message-ID: <5345638.IbC2pHGDlb@tuxbrain> In-Reply-To: <2510119.fDdHjke4Dd@tuxbrain> References: <2510119.fDdHjke4Dd@tuxbrain> Bug: https://bugs.gentoo.org/621970 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> --- eclass/ecm.eclass | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass index 919c7514b5..1f62d7f7af 100644 --- a/eclass/ecm.eclass +++ b/eclass/ecm.eclass @@ -30,6 +30,7 @@ if [[ -v KDE_GCC_MINIMAL ]]; then fi EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_test pkg_preinst pkg_postinst pkg_postrm +[[ ${EAPI} != 7 ]] && EXPORT_FUNCTIONS src_install if [[ -z ${_ECM_ECLASS} ]]; then _ECM_ECLASS=1 @@ -535,12 +536,26 @@ ecm_src_test() { # @FUNCTION: ecm_src_install # @DESCRIPTION: -# Wrapper for cmake_src_install. Currently doesn't do anything extra, but -# is included as part of the API just in case it's needed in the future. +# Wrapper for cmake_src_install. Drops executable bit from .desktop files +# installed inside /usr/share/applications. This is set by cmake when install() +# is called in PROGRAM form, as seen in many kde.org projects. ecm_src_install() { debug-print-function ${FUNCNAME} "$@" cmake_src_install + + # bug 621970 + if [[ ${EAPI} != 7 ]]; then + if [[ -d "${ED}"/usr/share/applications ]]; then + local f + for f in "${ED}"/usr/share/applications/*.desktop; do + if [[ -x ${f} ]]; then + einfo "Removing executable bit from ${f#$ {ED}}" + fperms a-x "${f#${ED}}" + fi + done + fi + fi } # @FUNCTION: ecm_pkg_preinst -- 2.33.0 --nextPart2674497.DJkKcVGEfx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEexlipVqzuLtTjHMOREsPlv/SLMsFAmEenMJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDdC MTk2MkE1NUFCM0I4QkI1MzhDNzMwRTQ0NEIwRjk2RkZEMjJDQ0IACgkQREsPlv/S LMteAAgAoYd+FrS1rhDjKNifrTs6MxtzInZW3L/WCCLPj1VwP9Y7favrriSmihPU qUWIQwMyK8LTMLdwqO2clODryM7kK+F0A9/gMb4H0CYrI4LnXeTyZc67tMKkUgxb ohdvk2/qUhuWV+BxJDPRQucZQ+MFpNHnyi16vDEI1G76s6m96UtSzWmKEJlUtdk7 /TLhnJkmcgGJyEKSPXDzuImkUeNOCIgKW3M5qE86XHpk3pE/e9ZcxBwRqReu3HaS n6kK4zEYYjYnJ1WJ+darzaJNH1EsrfxRZ95OGNZ8l3ofkGsaanvKU8fcscNGw2jd 57eunpIuD+zCm0CKeA0t+ZSgXOlh5A== =SkRJ -----END PGP SIGNATURE----- --nextPart2674497.DJkKcVGEfx--