From owner-freebsd-ports@freebsd.org Tue Feb 6 01:50:22 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5014AEE42DA for ; Tue, 6 Feb 2018 01:50:22 +0000 (UTC) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (prime.gushi.org [IPv6:2001:4f8:3:3d::42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "prime.gushi.org", Issuer "RapidSSL SHA256 CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D64626D810 for ; Tue, 6 Feb 2018 01:50:21 +0000 (UTC) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (danm@localhost [127.0.0.1]) by prime.gushi.org (8.15.2/8.15.2) with ESMTPS id w161k5EJ097097 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 5 Feb 2018 17:46:07 -0800 (PST) (envelope-from danm@prime.gushi.org) DKIM-Filter: OpenDKIM Filter v2.10.3 prime.gushi.org w161k5EJ097097 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gushi.org; s=prime2014; t=1517881277; bh=oefvKOND75cNp3LyLLh/ksNkcYjxTzr1cARw+UfC+pU=; h=Date:From:To:Subject; z=Date:=20Mon,=205=20Feb=202018=2017:46:05=20-0800=20(PST)|From:=20 "Dan=20Mahoney=20(Gushi)"=20|To:=20freebsd-port s@freebsd.org|Subject:=20rubygem-facter=20versus=20sysutils/facter ; b=CaRgGA9vZB9nhGBV8Yho3zv1pkGiaIlETUjV2heuagp38RAeapPxZa+p0mv2BN4Im K7Uv+9Qf1rk5D9lGioww1TU99V4kXQgftiqVEpxs2njyDyn2ey/MCIwSqmqzWWxRM+ k2SxVPQCgt5LRaLJwFwb6QQBDK05IpMTY+SqCk52bxPY1oeGW1b8cFib0m6ke+TQZa bRMXU3hRPDd0QRKCjFrpmLkliOLQ6VLry9VCXDCdLzapoIxRz54QqJI8Dgl0kFdABJ 8+3dQRXlKYtqC55KzsYxCzdLvAZDlZHAbY+HzrFsLa1FCMlKMapvlBk+HB4oA0t4lU z87eWQCQCca9A== X-DomainKeys: Sendmail DomainKeys Filter v1.0.2 prime.gushi.org w161k5EJ097097 DomainKey-Signature: a=rsa-sha1; s=primegushiorg; d=gushi.org; c=nofws; q=dns; h=received:date:from:x-x-sender:to:subject:message-id: user-agent:x-openpgp-key-id:mime-version:content-type; b=VirWp33Dr43cI+b01eNDo5yCfY58ymm3N+KkBc8edBme3XdRyf9B4+AFq73SDoEY/ 5KNoU6O03Jwksr3Fb1Y/g== Received: (from danm@localhost) by prime.gushi.org (8.15.2/8.15.2/Submit) id w161k5fj097096; Mon, 5 Feb 2018 17:46:05 -0800 (PST) (envelope-from danm) Date: Mon, 5 Feb 2018 17:46:05 -0800 (PST) From: "Dan Mahoney (Gushi)" X-X-Sender: danm@prime.gushi.org To: freebsd-ports@freebsd.org Subject: rubygem-facter versus sysutils/facter Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) X-OpenPGP-Key-ID: 0x624BB249 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (prime.gushi.org [127.0.0.1]); Tue, 06 Feb 2018 01:41:18 +0000 (UTC) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Feb 2018 01:50:22 -0000 All, I've lost the better part of an afternoon to this issue. These questions are not just specific to the above ports, but also as to how ports are best built in general. BACKGROUND: The puppet ports require rubygem-facter. There's a knob in the port that lets you switch to sysutils/facter, which is more modern and written in C. Rubygem-facter is based on facter 2, which is EOL as of 2016. The new-style puppet facts are now including more and more information that's not available in rubygem-facter, and it means that the "Fact" documentation on puppet.org doesn't at all match what you currently get on FreeBSD, even with a modern puppet. The ruby folks have been trying to make a modern rubygem-version for years, but there's no real progress: https://tickets.puppetlabs.com/browse/FACT-1523 https://tickets.puppetlabs.com/browse/FACT-1542 Having to build a custom port of Puppet on every machine (which would mean building ruby from scratch) is annoying as heck, and while I have my own poudriere install and build repos, it's *puppet* that places those on my production machines, so I'm looking for a bootstrapping method that "just works" as simply as 'pkg install puppet4' does. QUESTIONS: 1) In the port's Makefile, these are listed as build-time dependencies, and I don't think they are -- I think the ruby code will just find whatever facter exists at runtime, which begs the rest of these questions. 2) As a ports maintainer, it would be nice if there was a way to have either the rubygem-facter, or the core facter, satisfy this dependency. I know you can do this somewhat with ports, by adding something like: RUN_DEPENDS=facter:sysutils/facter But I'm not sure if it survives through to the pkg dependency tree. It would seem possible for dependency *binaries*, but not for packages. I.e. I can make it so a port is happy if there's a binary in the path called "facter", but *not* if I want to specify a version. Is this set in stone? Is there no way to say "RUN DEPENDS=(<= this version of rubygem-facter OR <= this version of sysutils/facter) 3) It would be nice if rubygem-facter and mainline facter could exist so I can compare their output without uninstalling/reinstalling puppet. In search of #3, I can't figure out how to get pkg to not outsmart me. I.e. "install facter, but don't deinstall puppet", or "install facter but don't deinstall rubygem-facter". It seems the only actual file they conflict on is /usr/local/bin/facter, and I can manage that with symlinks. Is there a way to force it? Best, -Dan -- --------Dan Mahoney-------- Techie, Sysadmin, WebGeek ---------------------------