Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Feb 2021 08:45:01 +0100
From:      Stefan Esser <se@freebsd.org>
To:        Shawn Webb <shawn.webb@hardenedbsd.org>
Cc:        Chris <portmaster@bsdforge.com>, freebsd-ports@freebsd.org, "Patrick M. Hausen" <hausen@punkt.de>
Subject:   Re: Creating port from pre-built package
Message-ID:  <c8d76264-25c3-110c-9c87-6ec76b84bf08@freebsd.org>
In-Reply-To: <20210211171206.7dcplood437oqmfc@mutt-hbsd>
References:  <20210211162625.k55tncjs2yjpw5jt@mutt-hbsd> <d84184b80159f7a1772e56fd6010e786@bsdforge.com> <9C536D5D-6D0B-45FA-8DBF-F3FC51BC0551@punkt.de> <20210211171206.7dcplood437oqmfc@mutt-hbsd>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--NF4UhBhXrzwkqXnemzh2uvs74BBV0pKWF
Content-Type: multipart/mixed; boundary="y8ZyR1ESch9mpXhgLs8nsvKB1vbH6LwqB";
 protected-headers="v1"
From: Stefan Esser <se@freebsd.org>
To: Shawn Webb <shawn.webb@hardenedbsd.org>
Cc: Chris <portmaster@bsdforge.com>, freebsd-ports@freebsd.org,
 "Patrick M. Hausen" <hausen@punkt.de>
Message-ID: <c8d76264-25c3-110c-9c87-6ec76b84bf08@freebsd.org>
Subject: Re: Creating port from pre-built package
References: <20210211162625.k55tncjs2yjpw5jt@mutt-hbsd>
 <d84184b80159f7a1772e56fd6010e786@bsdforge.com>
 <9C536D5D-6D0B-45FA-8DBF-F3FC51BC0551@punkt.de>
 <20210211171206.7dcplood437oqmfc@mutt-hbsd>
In-Reply-To: <20210211171206.7dcplood437oqmfc@mutt-hbsd>

--y8ZyR1ESch9mpXhgLs8nsvKB1vbH6LwqB
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

Am 11.02.21 um 18:12 schrieb Shawn Webb:
> On Thu, Feb 11, 2021 at 06:09:52PM +0100, Patrick M. Hausen wrote:
>> Hi all,
>>
>>> Am 11.02.2021 um 18:03 schrieb Chris <portmaster@bsdforge.com>:
>>>
>>> On 2021-02-11 08:26, Shawn Webb wrote:
>>>> Hey all,
>>>> The Splunk universal forwarder for FreeBSD is distributed as a packa=
ge
>>>> 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. :-)=

>>
>> The binary package is provided by the software manufacturer without
>> source code.
>>
>> Still one might want to have a port available so one can put the port
>> in poudriere and have it available in one's own package repo.
>>
>=20
> Right, I'm not aiming to recompile the software. I'm looking to simply
> create a new package.txz with the pre-built artifacts included.

I shouldn't be too hard to create a port, just be careful to consider
the architecture dependency of the binary package you are using.

If multiple architectures and OS releases are supported, then you'll
have to create the package name from those parameters and provide
distinfo data for all supported combinations of architecture and
OS release. You can override the name of the DISTINFO_FILE in the
port's Makefile to have separate distinfo files per arch/version.

In the port's Makefile extract the contents of the correct package
into the stage directory, have dummy targets for phases that are not
reuquired (e.g. an empty do-stage to have the stage done marker set
in the ${WRKSRC} directory) and provide a pkg-plist (possibly multiple
variants selected by the PLIST variable, if there are arch/version
specific differences).

Use ONLY_FOR_ARCH and IGNORE to limit the package building to those
architectures and releases that are supported, to prevent package
fall-out messages and to give ports users a reasonable error message
when trying to build the port on an unsupported system.

The generated package will have the meta-data from your port. If
you want to preserve some meta-date from the pre-built package, then
extract it from the extracted distfile, e.g. in the build phase.
Else use NO_BUILD to suppress this and possibly other phases that
are not required (empty dummy targets will do as well).

Regards, STefan


--y8ZyR1ESch9mpXhgLs8nsvKB1vbH6LwqB--

--NF4UhBhXrzwkqXnemzh2uvs74BBV0pKWF
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmAmMf0FAwAAAAAACgkQR+u171r99UQI
RwgAuNqCkznUh0CUSKbNro6tvcOEqPDgNtek/WyDTyV8nDhUmrOVRKDZEPbrc+dWo0CLB5kHuueK
+VT80UfBdPpB2Hu2qiWJl1kRZINGZdPVOSNo0Ou9gtTw91Fue7Nm9KdLdZcRwNNcmSkb/rpI7Nf2
T3WwWUTRsyZUYO/Qz0QB+Hn0LrOnL0jhoVZ3gWFsMdsaQORxj9sXkt7sKdSvNbtQlMF5osWfRVUJ
mm4LVJLWtwfZrq4B9JU2EK9E3G/TtzQlypKPaG7ncgV21WRhJcJVXAXxWXJFYRNtcbUMGjauI8g7
OHIE4uCpJqfbfRunuj/D2aSmyVxDw29rtNMUZCsVvQ==
=5SEL
-----END PGP SIGNATURE-----

--NF4UhBhXrzwkqXnemzh2uvs74BBV0pKWF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c8d76264-25c3-110c-9c87-6ec76b84bf08>