Opened 3 years ago

Closed 2 years ago

#64079 closed defect (fixed)

privoxy @3.0.32 uses indeterminate perl5.major for dependencies

Reported by: brunoomartin Owned by: essandess (Steve Smith)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: mascguy (Christopher Nielsen), chrstphrchvz (Christopher Chavez), cooljeanius (Eric Gallager)
Port: privoxy

Description (last modified by jmroot (Joshua Root))

port upgrade fails on upgrading privoxy (dependency problem) on a mac running 11.6.1, Xcode 13.1, MacPorts 2.7.1 Here is the output of the upgrade failure:

Warning: No port p5.26-sgmlspm found in the index.
Warning: No port p5.26-getopt-long found in the index.
Warning: No port p5.26-time-local found in the index.
--->  Computing dependencies for privoxy
Error: Dependency 'p5.26-sgmlspm' not found.

Change History (10)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: set to essandess
Port: 3.0.32 removed
Status: newassigned
Summary: privoxy @3.0.32 Fails to upgradeprivoxy @3.0.32 uses indeterminate perl5.major for dependencies

The problem is that privoxy doesn't use a specific version of perl, it just goes with whatever variant you happen to have installed perl5 with. That's already bad for reproducibility, but it also results in nonexistent dependencies being used sometimes, as you've discovered.

comment:2 Changed 3 years ago by essandess (Steve Smith)

I though this Portfile code used whatever is set to be the default perl5 branch per https://github.com/macports/macports-ports/blob/d275a24edbefe7f361f2aa6eb8f59648092058c0/_resources/port1.0/group/perl5-1.0.tcl#L11

Whenever MacPorts bumps the default version, privoxy should just follow along and not hard code its own perl5 version.

What’s the correct way to do that?

Last edited 3 years ago by essandess (Steve Smith) (previous) (diff)

comment:3 in reply to:  1 ; Changed 3 years ago by essandess (Steve Smith)

Replying to jmroot:

The problem is that privoxy doesn't use a specific version of perl, it just goes with whatever variant you happen to have installed perl5 with. That's already bad for reproducibility, but it also results in nonexistent dependencies being used sometimes, as you've discovered.

This doesn’t appear to be this issue. I looked at the way other Portfiles handle this, and a significant number do not set perl5.major: https://github.com/search?q=perl5.major+repo%3Amacports%2Fmacports-ports+filename%3APortfile&type=Code&ref=advsearch&l=&l=

As far as I can tell, the privoxy Portfile is also doing this correctly.

I do not know how to resolve this dependency issue.

comment:4 Changed 3 years ago by essandess (Steve Smith)

Resolution: fixed
Status: assignedclosed

In 8bc65f7fd61a11aab515ee6fb2f6c11d19ce68e9/macports-ports (master):

privoxy: Bugfixes

  • Fixes: #64079
  • Fix man page paths

comment:5 in reply to:  3 Changed 3 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: closedreopened

Replying to essandess:

This doesn’t appear to be this issue. I looked at the way other Portfiles handle this, and a significant number do not set perl5.major: https://github.com/search?q=perl5.major+repo%3Amacports%2Fmacports-ports+filename%3APortfile&type=Code&ref=advsearch&l=&l=

As far as I can tell, the privoxy Portfile is also doing this correctly.

I do not know how to resolve this dependency issue.

If other ports are doing the same thing, they are also incorrect. The version of perl used by privoxy changes depending on how perl5 is installed:

% port deps privoxy
Full Name: privoxy @3.0.33_1+https_inspection
Fetch Dependencies:   gnupg2
Build Dependencies:   autoconf, automake, libtool, sf-pwgen
Library Dependencies: brotli, pcre, zlib, apple-pki-bundle, curl-ca-bundle,
                      openssl, openssl
Runtime Dependencies: perl5.30, p5.30-getopt-long, p5.30-time-local
% sudo port install perl5 +perl5_28 
--->  Computing dependencies for perl5
--->  Deactivating perl5 @5.28.3_0+perl5_30
--->  Cleaning perl5
--->  Activating perl5 @5.28.3_0+perl5_28
--->  Cleaning perl5
% port deps privoxy                 
Full Name: privoxy @3.0.33_1+https_inspection
Fetch Dependencies:   gnupg2
Build Dependencies:   autoconf, automake, libtool, sf-pwgen
Library Dependencies: brotli, pcre, zlib, apple-pki-bundle, curl-ca-bundle,
                      openssl, openssl
Runtime Dependencies: perl5.28, p5.28-getopt-long, p5.28-time-local

This is simply incompatible with binary distribution. It will be built to use a certain perl version on the build machine, and that perl version may not even be present on the user's machine because the dependencies evaluate differently there.

The port needs to choose a specific perl version in a deterministic way. You can offer variants if it is desirable to be able to use different perl versions.

comment:6 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:7 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:8 Changed 3 years ago by chrstphrchvz (Christopher Chavez)

The stow port also appears to be affected by this.

comment:9 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:10 Changed 2 years ago by essandess (Steve Smith)

Resolution: fixed
Status: reopenedclosed

In e1ba6fef443657fe07cff999217452f72c67e824/macports-ports (master):

privoxy: Bugfix perl5.major

Note: See TracTickets for help on using tickets.