From owner-freebsd-ports@freebsd.org Thu Feb 11 17:27:07 2021 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45ED252F0B6 for ; Thu, 11 Feb 2021 17:27:07 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dc3Tl0LGtz4YLB for ; Thu, 11 Feb 2021 17:27:06 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 11BHRcML065080; Thu, 11 Feb 2021 09:27:44 -0800 (PST) (envelope-from portmaster@bsdforge.com) MIME-Version: 1.0 Date: Thu, 11 Feb 2021 09:27:38 -0800 From: Chris To: Shawn Webb Cc: freebsd-ports@freebsd.org Subject: Re: Creating port from pre-built package In-Reply-To: <20210211170858.lsdctdxkc57wsvzb@mutt-hbsd> References: <20210211162625.k55tncjs2yjpw5jt@mutt-hbsd> <20210211170858.lsdctdxkc57wsvzb@mutt-hbsd> User-Agent: UDNSMS/17.0 Message-ID: X-Sender: portmaster@bsdforge.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Dc3Tl0LGtz4YLB X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2021 17:27:07 -0000 On 2021-02-11 09:08, Shawn Webb wrote: > On Thu, Feb 11, 2021 at 09:03:19AM -0800, Chris wrote: >> On 2021-02-11 08:26, Shawn Webb wrote: >> > Hey all, >> > >> > The Splunk universal forwarder for FreeBSD is distributed as a package >> > tarball that you can use `pkg add` on. I'm in a position where I'd >> > like to create a port of the package so that I can automate certain >> > tasks. >> Reverse engineer a package? I think that will violate the NDA you >> signed. ;-) >> >> Really. Unless the package is simply a wrapper of a binary blob. You'll >> need to *build* the port, as part of the package creation process. >> That is, unless I've *completely* misunderstood your intent here. :-) > > It's literally a package of pre-built binaries. You can install it by > running: > > # pkg add ./splunkforwarder-8.0.7-cbe73339abca-freebsd-11.1-amd64.txz > > Here's what `pkg info` shows: > > $ pkg info -F splunkforwarder-8.0.7-cbe73339abca-freebsd-11.1-amd64.txz > [11:55:13] > splunkforwarder-8.0.7 > Name : splunkforwarder > Version : 8.0.7 > Origin : sysutils/splunk > Architecture : FreeBSD:11:amd64 > Prefix : /opt > Categories : > Licenses : > Maintainer : eng-release@splunk.com > WWW : http://www.splunk.com > Comment : Splunk> The platform for machine data. > Annotations : > no_provide_shlib: yes > FreeBSD_version: 1101001 > Flat size : 56.6MiB > Description : > Splunk> The platform for machine data. > > (C) 2005-2020 Splunk Inc. All rights Reserved > > I'm not looking to re-build the binaries, but rather just use ports to > recreate the package given a pre-existing package tarball. Well it's missing Categories && Licenses, and the Prefix is wrong. So changes are in order. Aside from unpacking it somewhere, and cobbling up a script to re-pack(age) it. I'm at a loss. But it *does* seem like it might be possible. Good luck. > > Thanks, --Chris