git: b3c7fff32af0 - main - sysutils/ansible-sshjail: New port

Mateusz Piotrowski 0mp at FreeBSD.org
Thu Apr 15 20:39:47 UTC 2021


Hi,

On 15/04/2021 21:46, Guido Falsi wrote:
> On 15/04/21 21:07, Mateusz Piotrowski wrote:
>>
>>> diff --git a/sysutils/ansible-sshjail/Makefile b/sysutils/ansible-sshjail/Makefile
>>> new file mode 100644
>>> index 000000000000..73499357b2f0
>>> --- /dev/null
>>> +++ b/sysutils/ansible-sshjail/Makefile
>>> @@ -0,0 +1,30 @@
>>> +PORTNAME=    ansible-sshjail
>>> +DISTVERSION=    1.1.0-g20210107
>> [snip]
>>> +GH_ACCOUNT=    austinhyde
>>> +GH_TAGNAME=    981674f
>> Perhaps GH_TAGNAME could be replaced with DISTVERSION* variables based 
on the output of git 
>> describe --tags which is "v1.1.0-30-g981674f".
>>
>
> Is there a specific advantage to this approach?
>
> I did what I've been doing with other ports and also what I see documented in the porter's handbook.
>
There are a couple of advantages:

1. There is only one block of variables you need to edit in case of an update.

2. DISTVERSION=1.1.0-30 becomes PORTVERSION=1.1.0.30. As a result, you don't have to worry about 
increasing the date manually. Also, if you happen to update the port twice to newer commit on a 
single day, you don't have to come up with a workaround for 1.1.0-g20210107. The DISTVERSION will 
just naturally increase from 1.1.0-30 to, e.g., 1.1.0-31.

In fact, this is described in the FreeBSD Porter's Handbook in Example 5.14. Using USE_GITHUB to 
Access a Commit Between Two Versions. The gYYYYMMDD is reserved for cases 
when there is no single 
version tagged by upstream (as explained in Example 5.13. Using USE_GITHUB When Upstream Does Not 
Use Versions).

Cheers!

Mateusz




More information about the dev-commits-ports-all mailing list