From owner-freebsd-ports@freebsd.org Sun Jun 12 19:06:51 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D49EAF1588 for ; Sun, 12 Jun 2016 19:06:51 +0000 (UTC) (envelope-from p.morsou@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7D6642C5A for ; Sun, 12 Jun 2016 19:06:51 +0000 (UTC) (envelope-from p.morsou@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 7CBC7AF1587; Sun, 12 Jun 2016 19:06:51 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C5C6AF1586 for ; Sun, 12 Jun 2016 19:06:51 +0000 (UTC) (envelope-from p.morsou@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46A592C59 for ; Sun, 12 Jun 2016 19:06:51 +0000 (UTC) (envelope-from p.morsou@gmail.com) Received: by mail-io0-x231.google.com with SMTP id o127so58166785iod.2 for ; Sun, 12 Jun 2016 12:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=S+7s/1w+aSwi0KD+jzm0j31j+MkDjdLZJNTGpNvl274=; b=jnM8zgiNA36oLDXMTu8gMZBk0CLVxdt6ivf1rq5Sbog37OVDOF2obmBONuQCB7airr rSL1yCoYEgiDoYExo5NHKF8Snbbzr9+WQ2F4GTeW+OdujnkzExnAy83kCZfe7Yi2C2zM 4/5Ub5+rBHBt1sHauD9kJuAIcdxI4LOvKtmFu9bXxMA/jo4wlhZe/C96N+deoaMOs6as xL7E37E3Acvt6qcGbjsdbVdopZlC9D5WtM8eiWSaAPXxYxpVhIFau0BP0diuVfYqRx0e 20AeKiLpSFSpWqpXWog/39MGfNTsjfTb4clatusNXBIz3HK6axUYi2rMXuxki+rdGtFV JpHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=S+7s/1w+aSwi0KD+jzm0j31j+MkDjdLZJNTGpNvl274=; b=KRLb//wecG1dnswu7NtD6FA/77SwvYeWyAcDUAFY6I/aFkJz/bSIzCNlQRa++vigpe jntFN25N2mv1rpbqdq/cwCWbQ3pz23ifa261xFDxa+7tUBO/RP6XxJC6LNNYxlhaHqz0 s5DFUbPNsWYvu/MNTHhkBQMdG/yPgyqLUc+S3N5B96p3gRF5sfPs/aWynSlOlnQGcmD9 5JywLHcwfHptm7pIBDir/CRelIMjFLG2/gvRpNZsIfSUvbJxDqKLhQE7bDG1OAGEOliJ Ezmd61jbBqdPt1Vop6WxQ+LUrVC/f/2KuMWnUmycW4b5BJspeDkowZupSAdd7tzMET+R XlDA== X-Gm-Message-State: ALyK8tLo5CaXw5kQcs7KNot+2c9Hvglbaa7mwT1nCwaauIp/9yy7cdZ7ZIFjMRnTxzn9l8eAeqroK9dEkvzCbA== X-Received: by 10.107.205.8 with SMTP id d8mr2693016iog.113.1465758410577; Sun, 12 Jun 2016 12:06:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.91.135 with HTTP; Sun, 12 Jun 2016 12:06:50 -0700 (PDT) In-Reply-To: <20160604193607.GK41922@home.opsec.eu> References: <20160604193607.GK41922@home.opsec.eu> From: Peter M Souter Date: Sun, 12 Jun 2016 20:06:50 +0100 Message-ID: Subject: Re: Facter 3.X questions To: Kurt Jaeger Cc: ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2016 19:06:51 -0000 Hi Kurt, > Can you explain the state of factor for us ? We have 3.1.3 in the ports, and upstream is @3.1.8. Have you tried to provide a patch to the ports to get the port up2date ? Not sure it would need a patch, I think just pulling down the latest tag from git should be enough. > Then: What are those 'facts' ? Are they modules for facter to collect specific info on a system etc ? Are they part of facter itself or do you want to provide seperate ports for this ? What kind of facts are generally available ? Facter is a tool to get information from a system, such as amount of RAM, CPUs, mounts, size of partitions etc. Usually for usage with Puppet. The missing facts are part of facter itself, they just got missed when the upgrade happened because we dont have internal infra for testing Facter, it's mainly in the hands of FreeBSD puppet users to log issues when stuff breaks. > The WWW in pkg-descr is https://puppetlabs.com/facter, which no longer works -- what would be the correct link ? Yeah, there was a site re-design recently. I guess the new link would probably be the main docs page: https://docs.puppet.com/facter/ Would that be something that needs a patch? I can see if I can figure out how to submit for that :) > How/when should facter replace rubygem-facter in the ports tree ? Right now puppet depends on rubygem-facter, which is only at 2.4.4 ? Upstream is at 2.4.6 I guess the best time to replace would be when all the missing facts are restored. I'm making ok progress on it right now, we have a hackathon soon so I might be able to get it completely across the line then. What's the policy of when ports get removed? Some people prefer to use the older Facter as it's Ruby based, or they're not reading to make the major version jump, so it might be best to keep both? > For this, we probably need more understanding of facter 8-} Any links that you can share that bring us up to speed ? Hah, it's not super clear how to get started in it. I'd recommend reading the Facter README to get up to speed with how to build: https://github.com/puppetlabs/facter/blob/master/README.md Then looking at a PR with an example of how a fact is written. If you can get your head around the Facter internals, it's basically just making sure each result key can match with some C/C++ code to get the information from the system. For example, to get processor count of the machine with a sysctl call: // Get the logical count of processors len = sizeof(result.logical_count); mib[1] = HW_NCPU; if (sysctl(mib, 2, &result.logical_count, &len, nullptr, 0) == -1) { LOG_DEBUG("sysctl hw.ncpu failed: %1% (%2%): logical processor count is unavailable.", strerror(errno), errno); } https://github.com/puppetlabs/facter/pull/1348/files If you're interested there's normally people in #puppet-dev on Freenode who know way more than I do about internals that can answer questions > Submit PRs requesting maintainer, and if they come with patches that bring the ports up2date, you're maintainer if the previous maintainer agrees. Just to make sure, I actually work at Puppet, it's not a conflict of interest or anything to become a Facter maintainer right? if not I'll give that a go! :) > PS. Sorry if this is the wrong way to do this, first time emailing to a > port maintainer list. I asked in the FreeBSD freenode room and people said > this was the way to do it and to CC the Ports mailing list also :) > Both lists are fine. As this is more a general ports question, -ports is probably fine for further discussion. There's not much discussion on -ruby. Great, removed ruby- from CC. On Sat, Jun 4, 2016 at 8:36 PM, Kurt Jaeger wrote: > Hi! > > > Since Facter's move to a C/C++ codebase, a lot of facts have gone missing > > on FreeBSD machines. As a dabbler in FreeBSD I want to help fix this! :) > > Very nice! I'm no puppet or facter user, but I can probably help > with the ports part. > > Can you explain the state of factor for us ? We have 3.1.3 in > the ports, and upstream is @3.1.8. Have you tried to provide > a patch to the ports to get the port up2date ? > > Then: What are those 'facts' ? Are they modules for facter to > collect specific info on a system etc ? Are they part of facter itself > or do you want to provide seperate ports for this ? > > What kind of facts are generally available ? > > The WWW in pkg-descr is https://puppetlabs.com/facter, which > no longer works -- what would be the correct link ? > > How/when should facter replace rubygem-facter in the ports tree ? > Right now puppet depends on rubygem-facter, which is only at 2.4.4 ? > Upstream is at 2.4.6. > > > more difficult missing areas such as determining swap space, networks and > > such, that would be greatly appreciated. Getting kenv and sysctl settings > > has been fairly simple, these ones have been a little bit more complex... > > For this, we probably need more understanding of facter 8-} > Any links that you can share that bring us up to speed ? > > > 3) How difficult is it to become a maintainer? > > Submit PRs for sysutils/facter and sysutils/rubygem-facter. > robak@ is the maintainer for rubygem-facter, so maybe he's willing > to step down ? > > > I notice that facter is > > currently under the ruby maintainer email namespace, but right now it's > not > > released to Rubygems since 2.4 and the code is 85% C++ now. I wouldn't > mind > > throwing my hat in and becoming a maintainer if that would help? :) > > Submit PRs requesting maintainer, and if they come with > patches that bring the ports up2date, you're maintainer > if the previous maintainer agrees. > > > PS. Sorry if this is the wrong way to do this, first time emailing to a > > port maintainer list. I asked in the FreeBSD freenode room and people > said > > this was the way to do it and to CC the Ports mailing list also :) > > Both lists are fine. As this is more a general ports question, > -ports is probably fine for further discussion. There's not much > discussion on -ruby. > > -- > pi@opsec.eu +49 171 3101372 4 years to > go ! >