From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4FAFA158074 for ; Mon, 23 Jun 2025 10:37:44 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 2BB103415E9 for ; Mon, 23 Jun 2025 10:37:44 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 887FC110553; Mon, 23 Jun 2025 10:37:39 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 7A231110553 for ; Mon, 23 Jun 2025 10:37:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 36D62341098 for ; Mon, 23 Jun 2025 10:37:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C69C72A6F for ; Mon, 23 Jun 2025 10:37:37 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1750675029.dd7dd8b95652c8ec470ed69f04c109c7213989e1.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/emerge-webrsync X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: dd7dd8b95652c8ec470ed69f04c109c7213989e1 X-VCS-Branch: master Date: Mon, 23 Jun 2025 10:37:37 +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: 5ed56318-e2e7-477d-b319-ef13993142cf X-Archives-Hash: f3113f763692b77b8de748c44a684a21 commit: dd7dd8b95652c8ec470ed69f04c109c7213989e1 Author: Kerin Millar plushkava net> AuthorDate: Mon Jun 23 02:34:08 2025 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jun 23 10:37:09 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=dd7dd8b9 emerge-webrsync: drop the obsolete post_sync feature Presently, the sync_local() function attempts to execute /etc/portage/bin/post_sync, provided that it is found to be an executable path. This behaviour has been obsolete since the release of portage-2.2.16 in Februrary 2015, which introduced support for native /etc/portage/{repo.,}postsync.d/* hooks. Given that emerge-webrsync can be executed directly by the user, I briefly entertained the notion of it being able to execute the aforementioned hooks without the aid of portage. However, I concluded that it would be nothing short of dangerous to do so. The fact of the matter is that emerge-webrsync cannot promise to provide the same operating environment that portage itself does. As such, it's not difficult to imagine a user having written a sloppy shell script that depends on the existence of a particular portage variable in order to act safely. In the course of discussing the matter with Sam, he agreed with this assessment. Thus, drop the code that attempts to execute "post_sync". Users that wish for postsync hooks to be acted upon should refrain from executing emerge-webrsync directly and, instead, have the program be executed by portage by defining "sync-type = webrsync" for the gentoo repo. Bug: https://bugs.gentoo.org/154220 Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/emerge-webrsync | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index 4ae1cb0c6a..2ea9dcaada 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -379,7 +379,7 @@ get_snapshot_timestamp() { sync_local() { local file=$1 - local ownership snapshot_dir post_sync + local ownership snapshot_dir local -a tarsync_opts rsync_opts einfo "Syncing local repository ..." @@ -434,9 +434,6 @@ sync_local() { "${emerge}" --metadata fi - post_sync=${PORTAGE_CONFIGROOT%/}/etc/portage/bin/post_sync - [[ -x "${post_sync}" ]] && "${post_sync}" - # --quiet suppresses output if there are no relevant news items if contains_word news "${FEATURES}"; then "${emerge}" --check-news --quiet @@ -626,7 +623,6 @@ portage_vars=( FETCHCOMMAND GENTOO_MIRRORS PORTAGE_BIN_PATH - PORTAGE_CONFIGROOT PORTAGE_GPG_DIR PORTAGE_GRPNAME PORTAGE_NICENESS