-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perl: exclude version patch number in lib directory #84510
Conversation
I've not looked into the grokj2k situation yet, but based on this PR alone this makes sense to me. This is a backwards incompatible change, though would've eventually broke anyway when updating to 5.34.1 (if there even will be one - there's not one planned at the moment).
I'm open to some restructuring if it makes things easier but I'm not sure how that solves the issue described. |
The latter part is partly comparing to how Linux distros may package Perl modules and installed them into general However, based on Homebrew's rules relating to CPAN modules, it probably doesn't align with formulae requirements. Overall, not too important of a topic and can be ignored. I'm just noting that there is often some overhead when interacting with Perl formulae. On separate note, after Linux CI finishes, I need to check on the For example, current
Also want to check EDIT:
|
In theory, that could potentially be fixed by doing one of:
|
I think Debian does a combination of first and last https://salsa.debian.org/perl-team/interpreter/perl/-/blob/debian-5.32/debian/rules#L168. Their libraries are provided as:
I'll probably try the 2nd option for now as it seems simpler and a smaller change from current bottles. Though, it retains the demerit of some annoying libperl path, which requires a bit more work to get to once when we need it in a dependent formula (e.g. this is what I did in Still need to go through some Linux failures after excluding the ones related to CI Java issue. And, need to wait for Self-Hosted queue to clear up a bit as any CI run will need to wait for Python3.9 and Boost PRs. |
I locally tried adding # perl -V:'install(privlib|archlib|vendorlib|vendorarch|sitelib|sitearch)'
installarchlib='/home/linuxbrew/.linuxbrew/Cellar/perl/5.34.0/lib/perl5/5.34/x86_64-linux-thread-multi';
installprivlib='/home/linuxbrew/.linuxbrew/Cellar/perl/5.34.0/lib/perl5/5.34';
installsitearch='/home/linuxbrew/.linuxbrew/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34/x86_64-linux-thread-multi';
installsitelib='/home/linuxbrew/.linuxbrew/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34';
installvendorarch='';
installvendorlib='';
# perl -V:'(privlib|archlib|vendorlib|vendorarch|sitelib|sitearch)'
archlib='/home/linuxbrew/.linuxbrew/opt/perl/lib/perl5/5.34/x86_64-linux-thread-multi';
privlib='/home/linuxbrew/.linuxbrew/opt/perl/lib/perl5/5.34';
sitearch='/home/linuxbrew/.linuxbrew/opt/perl/lib/perl5/site_perl/5.34/x86_64-linux-thread-multi';
sitelib='/home/linuxbrew/.linuxbrew/opt/perl/lib/perl5/site_perl/5.34';
vendorarch='';
vendorlib=''; In comparison, the macOS system Perl: ❯ /usr/bin/perl -V:'install(privlib|archlib|vendorlib|vendorarch|sitelib|sitearch)'
installarchlib='/Library/Perl/Updates/5.30.2/darwin-thread-multi-2level';
installprivlib='/Library/Perl/Updates/5.30.2';
installsitearch='/Library/Perl/5.30/darwin-thread-multi-2level';
installsitelib='/Library/Perl/5.30';
installvendorarch='/Network/Library/Perl/5.30/darwin-thread-multi-2level';
installvendorlib='/Network/Library/Perl/5.30';
❯ /usr/bin/perl -V:'(privlib|archlib|vendorlib|vendorarch|sitelib|sitearch)'
archlib='/System/Library/Perl/5.30/darwin-thread-multi-2level';
privlib='/System/Library/Perl/5.30';
sitearch='/Library/Perl/5.30/darwin-thread-multi-2level';
sitelib='/Library/Perl/5.30';
vendorarch='/Network/Library/Perl/5.30/darwin-thread-multi-2level';
vendorlib='/Network/Library/Perl/5.30'; Also # ldd /home/linuxbrew/.linuxbrew/Cellar/weechat/3.2.1/lib/weechat/plugins/perl.so
libperl.so => /home/linuxbrew/.linuxbrew/opt/perl/lib/perl5/5.34/x86_64-linux-thread-multi/CORE/libperl.so (0x0000004001a80000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000004001e11000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00000040021dc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00000040023f9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00000040025fd000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x0000004002907000)
/lib64/ld-linux-x86-64.so.2 (0x0000004000000000) |
fb4629d
to
98097da
Compare
98097da
to
51fba0a
Compare
inreplace Dir[libexec/"bin/{perl-build,config_data}"] do |s| | ||
s.sub! %r{^#!#{HOMEBREW_PREFIX}/Cellar/perl/[^/]+/bin/perl}o, "#!#{Formula["perl"].opt_bin}/perl" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: Re-added comment after force-push.
I think the perl-build
build script replaces the Perl shebang with realpath of Homebrew Perl. I couldn't find another way to deal with this:
detected_perl_shebang
will only return system/usr/
Perl paths- Trying to inreplace
Formula["perl"].bin
fails as it returns opt_bin:Error: An exception occurred within a child process: Utils::Inreplace::Error: inreplace failed /home/linuxbrew/.linuxbrew/Cellar/perl-build/1.32/libexec/bin/perl-build: expected replacement of #<Pathname:/home/linuxbrew/.linuxbrew/opt/perl/bin> with #<Pathname:/home/linuxbrew/.linuxbrew/opt/perl/bin> /home/linuxbrew/.linuxbrew/Cellar/perl-build/1.32/libexec/bin/config_data: expected replacement of #<Pathname:/home/linuxbrew/.linuxbrew/opt/perl/bin> with #<Pathname:/home/linuxbrew/.linuxbrew/opt/perl/bin>
06c31ea
to
47fa38e
Compare
freeradius-serverDue to Since most repos don't enable this feature and Debian specifically has comment on there being issues (https://salsa.debian.org/debian/freeradius/-/blob/master/debian/control#L6), I want to avoid this being linked in new bottle. At this point, I may just need to manually inreplace the mhonarcWith Perl directory changes, my $cfg_prefix = interpolate_path($Config{'prefix'});
$DefValues{'binpath'} = interpolate_path($Config{'installbin'});
$DefValues{'libpath'} = interpolate_path($Config{'installsitelib'});
$DefValues{'manpath'} = interpolate_path($Config{'installman1dir'});
if (defined($OptValues{'prefix'})) {
$DefValues{'binpath'} = join($DIRSEP, $OptValues{'prefix'}, 'bin')
unless $DefValues{'binpath'} =~
s/^\Q$cfg_prefix/$OptValues{'prefix'}/o;
$DefValues{'libpath'} = join($DIRSEP, $OptValues{'prefix'}, 'lib')
unless $DefValues{'libpath'} =~
s/^\Q$cfg_prefix/$OptValues{'prefix'}/o;
$DefValues{'manpath'} = join($DIRSEP, $OptValues{'prefix'}, 'man')
unless $DefValues{'manpath'} =~
s/^\Q$cfg_prefix/$OptValues{'prefix'}/o;
$DefValues{'docpath'} = join($DIRSEP, $OptValues{'prefix'}, 'doc'); |
47fa38e
to
d223403
Compare
Linux failures (
21 due to reoccurring Java CI issue
24 due to no space left on CI runner
6 failures also seen in Python 3.9.7 PR #84283
|
-Dman1dir=#{man1} | ||
-Dman3dir=#{man3} | ||
-Dman1dir=#{opt_share}/man/man1 | ||
-Dman3dir=#{opt_share}/man/man3 | ||
-Duseshrplib | ||
-Duselargefiles | ||
-Dusethreads | ||
] | ||
args << "-Dsed=/usr/bin/sed" if OS.mac? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove this, as it's a no-op. Could probably wait for a follow-up PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add this with I get a chance to rebase. vim
was updated so the PR needs to be re-run for new bottles.
Can you rebase this so we can merge it @cho-m ? |
I'll try to rebase the PR this week when I get some time. Hopefully can avoid any merge conflicts with Monterey bottling. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?Splitting off the change from #84191.
Directory structure using only major/minor version to avoid breakage on Perl patch releases. This is closer to how Arch Linux and macOS package it:
One thing that may be worth considering is setting up an installation structure for Perl formulae similar to other Linux distros and Homebrew's Python formulae so that we can easily pick up very common packages like XML::Parser rather than jumping through hoops with the
PERL5LIB
.