Creating port from pre-built package

Chris portmaster at bsdforge.com
Thu Feb 11 17:27:07 UTC 2021


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 at 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


More information about the freebsd-ports mailing list