Converting port to subport

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Converting port to subport

Marius Schamschula-3
Hi all,

I’m trying to fold py-acme, certbot-apache and certbot-nginx into the certbot Portfile. This will simplify maintenance as they always get updated together, and share the same source tarball.

Bjarne Mathiesen has created several additional subports which will also be available with the next release.

After adding these sub-ports to the certbot Portfile, disabling the old certbot-apache and certbot-nginx, and running portindex I get an error that the Portfile for certbot-apache cannot be found. port is still looking for the old Portfile in my local tree.

Yet the old Portfile exists in macports-ports, but is also ignored.

Do I need to use the obsolete portgroup?

This counterintuitive, as the subport has the same name as the port it is replacing.

Marius
--
Marius Schamschula



Reply | Threaded
Open this post in threaded view
|

Re: [certbot,py-acme] Converting port to subport

Bjarne D Mathiesen


Marius Schamschula wrote:
> Hi all,
>
> I’m trying to fold py-acme, certbot-apache and certbot-nginx into the
> certbot Portfile. This will simplify maintenance as they always get
> updated together, and share the same source tarball.

If I understands things correctly, then
   py-acme
       is a general package, that others might also use in their project
       Thus, it should be kept as a separate module
       In eg dovecot2 & dovecot2-sieve, there're notes about keeping
       these synced, so you might do something similar.
       If you do fold it into certbot, you'll have to make sure, it
       is *always* selected, and *can't* be de-selected.
   certbot-apache , certbot-nginx
       are plugins to certbot, thus it makes sense to have these as
       subports, as it doesn't make sense to have these without cerbot

>
> Bjarne Mathiesen has created several additional subports which will also
> be available with the next release.

Thanks for the credit :-) <3

>
> After adding these sub-ports to the certbot Portfile, disabling the old
> certbot-apache and certbot-nginx, and running portindex I get an error
> that the Portfile for certbot-apache cannot be found. port is still
> looking for the old Portfile in my local tree.
>
> Yet the old Portfile exists in macports-ports, but is also ignored.

I don't get that kind of problems with all the plugins folded into certbot

$=> port info certbot
certbot @0.38.0_1 (security)
Sub-ports:  certbot-apache, certbot-nginx, ...
Variants:   python27, (+)python37, universal

Description:          An ACME Let's Encrypt client that can obtain certs
                      and extensibly update server configurations.
Homepage:             https://github.com/certbot/certbot

Build Dependencies:   ...

$=> port info certbot-apache
certbot-apache @0.38.0_1 (security)
Variants:             python27, (+)python37, universal

Description: The Apache plugin currently supports modern OSes based on
             ...
Homepage:             https://github.com/certbot/certbot

Build Dependencies:   ...

$=> port file certbot
/Volumes/Bjarne/WebServer/MacPorts/newPorts/security/certbot/Portfile

$=> port file certbot-apache
/Volumes/Bjarne/WebServer/MacPorts/newPorts/security/certbot/Portfile
bjarne@Pro17 09:41:07 ~/Sites/NewStuff/spfengine


>
> Do I need to use the obsolete portgroup?

I do think you'll have to do this for the exiting
   certbot-apache , certbot-nginx
but you might get away with setting an early expiration date ;-)

>
> This counterintuitive, as the subport has the same name as the port it
> is replacing.

--
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz
Reply | Threaded
Open this post in threaded view
|

Re: [certbot,py-acme] Converting port to subport

ryandesign2
Administrator


On Sep 6, 2019, at 02:51, Bjarne D Mathiesen wrote:

>> After adding these sub-ports to the certbot Portfile, disabling the old
>> certbot-apache and certbot-nginx, and running portindex I get an error
>> that the Portfile for certbot-apache cannot be found. port is still
>> looking for the old Portfile in my local tree.
>>
>> Yet the old Portfile exists in macports-ports, but is also ignored.
>
> I don't get that kind of problems with all the plugins folded into certbot
>
> $=> port info certbot
> certbot @0.38.0_1 (security)
> Sub-ports:  certbot-apache, certbot-nginx, ...
> Variants:   python27, (+)python37, universal


>> Do I need to use the obsolete portgroup?
>
> I do think you'll have to do this for the exiting
>   certbot-apache , certbot-nginx
> but you might get away with setting an early expiration date ;-)

If the certbot-apache and certbot-nginx *ports* will continue to exist (but moving from separate Portfiles to being subports in the certbot Portfile) then no, you will not be using the obsolete Portgroup; you will be deleting the old separate certbot-apache and certbot-nginx Portfiles. The PortIndex entries for the new subports of the certbot port will replace the old entries for the old separate ports, since entries are keyed off the port name. It's just a matter of getting portindex to do that. I have at times in the past needed to delete the PortIndex and PortIndex.quick files and let portindex regenerate both. That may not have been necessary, and it may suffice to just `touch` the new certbot Portfile before running portindex.