From nobody Thu Mar 24 04:49:25 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C5F131A390FD for ; Thu, 24 Mar 2022 04:49:33 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from mail.gundo.com (gibson.gundo.com [75.145.166.65]) by mx1.freebsd.org (Postfix) with ESMTP id 4KPCSD4Xpnz3FWD for ; Thu, 24 Mar 2022 04:49:32 +0000 (UTC) (envelope-from pauamma@gundo.com) Received: from webmail.gundo.com (variax.gundo.com [75.145.166.70]) by mail.gundo.com (Postfix) with ESMTP id 572084C01CA for ; Wed, 23 Mar 2022 23:49:25 -0500 (CDT) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Date: Thu, 24 Mar 2022 04:49:25 +0000 From: Pau Amma To: Freebsd ports Subject: sysutils/libudisks; not always needed dependency, EXTRA_PATCHES, and make makepatch User-Agent: Roundcube Webmail/1.4.8 Message-ID: <4470d0711710de9e0387da177032ab74@gundo.com> X-Sender: pauamma@gundo.com Organization: The Cabal (TINC) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4KPCSD4Xpnz3FWD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=gundo.com; spf=pass (mx1.freebsd.org: domain of pauamma@gundo.com designates 75.145.166.65 as permitted sender) smtp.mailfrom=pauamma@gundo.com X-Spamd-Result: default: False [-2.79 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; FREEFALL_USER(0.00)[pauamma]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[75.145.166.65:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:75.145.166.64/28]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[75.145.166.65:from]; DMARC_POLICY_ALLOW(-0.50)[gundo.com,none]; NEURAL_SPAM_SHORT(0.11)[0.105]; MLMMJ_DEST(0.00)[freebsd-ports]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7922, ipnet:75.144.0.0/13, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N I'm finally getting around to upgrading sysutils/libudisks to 2.9.4 (it's been 7.5 months and another released version in-between) and while doing that, I'm trying to get rid of the spurious dependency on polkit when udisksctl (only thing that actually needs it) is disabled (enabled by default). The way I handled that in the 2.9.2 port was: - require polkit unconditionally - build everything including udisksctl - rm udisksctl in the post-install-UDISKSCTL-off target This is less than ideal because of the wasted resources and the pointless dependency. So I'm considering a different approach this time: UDISKSCTL_BUILD_DEPENDS= pkaction:sysutils/polkit UDISKSCTL_LIB_DEPENDS= libpolkit-agent-1.so:sysutils/polkit \ libpolkit-gobject-1.so:sysutils/polkit # Remove check for polkit and references to it if udisksctl is disabled UDISKSCTL_EXTRA_PATCHES_OFF= ${PATCHDIR}/UDISKSCTL-off Generating both sets of patch files with make makepatch will be a problem, though: - make makepatch with UDISKSCTL enabled doesn't generate the extra patches - make makepatch with UDISKSCTL disabled does, but lumps them in with the rest, so if I copy them all to noudisksctl, they overlap, contradict, and confuse make patch - having 2 sets of patch files each in its own directory, UDISKSCTL_EXTRA_PATCHES_OFF and UDISKSCTL_EXTRA_PATCHES_ON, with no common patches in ${PATCHDIR} I'm considering a semi-automated way to tease out what's unique to the UDISKSCTL disabled set of patches: 1- generate the UDISKSCTL on set of patches, stash them somewhere 2- generate the UDISKSCTL off set of patches, stash them somewhere else 3- process both sets to spit out common changes (put in ${PATCHDIR}), changes unique to UDISKSCTL off (go to ${PATCHDIR}/UDISKSCTL-off), and (not needed here but good for future-proofing) changes unique to UDISKSCTL on (would go to ${PATCHDIR}/UDISKSCTL-on) For 3, proper application of interdiff --no-revert-omitted and combine-diff from misc/patchutils may work unless I misremember set algebra (not unlikely, after 40+ years): - combinediff a.diff b.diff > a-union-b.diff - interdiff --no-revert-omitted a.diff b.diff > unique-to-a.diff - interdiff --no-revert-omitted b.diff a.diff > unique-to-b.diff - interdiff a-union-b.diff unique-to-a.diff | interdiff --no-revert-omitted /dev/stdin unique-to-b.diff > a-inter-b.diff Can someone confirm my impression that this method would work? Otherwise, I'd have to write something in perl, probably using Text::Diff::Parser) because perl is likely installed for portlint and I really don't want to implement a diff file parser in awk. So before I embark into that, is there any shortcoming? And or am I overthinking this and is there an easier solution (to this or my initial prothat what I'm considering? -- #BlackLivesMatter #TransWomenAreWomen #AccessibilityMatters #StandWithUkrainians English: he/him/his (singular they/them/their/theirs OK) French: il/le/lui (iel/iel and ielle/ielle OK) Tagalog: siya/niya/kaniya (please avoid sila/nila/kanila)