user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 3/5] updates around RPM packages on CentOS 7.x
Date: Wed, 13 Sep 2023 09:12:40 +0000	[thread overview]
Message-ID: <20230913091242.1827709-4-e@80x24.org> (raw)
In-Reply-To: <20230913091242.1827709-1-e@80x24.org>

Add explicit dependencies on packages that are possible to
remove without removing the `perl' RPM from CentOS 7.x.
However, simplify deps.perl to avoid naming essential Perl
modules (e.g. `perl-Exporter') that cannot be removed
without removing the `perl' RPM entirely.

We can also drop `Socket6' from deps.perl since it's pulled
in as-needed by other packages and we try to avoid it in favor
of the (now-standard) IO::Socket::IP.
---
 INSTALL           |  3 +--
 Makefile.PL       | 25 ++++++++++++++-----------
 install/deps.perl | 18 ++++++++++++------
 3 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/INSTALL b/INSTALL
index 4f473b78..52bc9447 100644
--- a/INSTALL
+++ b/INSTALL
@@ -208,9 +208,8 @@ RPM-based distros split them out into separate packages:
 * autodie                          rpm: perl-autodie
 * Digest::SHA                      rpm: perl-Digest-SHA
 * Data::Dumper                     rpm: perl-Data-Dumper
-* Encode                           rpm: perl-Encode
 * IO::Compress                     rpm: perl-IO-Compress
-* Storable                         rpm: perl-Storable
+* Sys::Syslog                      rpm: perl-Sys-Syslog
 * Text::ParseWords                 rpm: perl-Text-Parsewords
 
 Copyright
diff --git a/Makefile.PL b/Makefile.PL
index d0652410..a04a3b75 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -150,15 +150,14 @@ WriteMakefile(
 
 		# perl-modules-5.xx or libperl5.xx in Debian-based
 		# part of "perl5" on FreeBSD
-		'autodie' => 0,
-		'Compress::Raw::Zlib' => 0,
-		'Compress::Zlib' => 0,
-		'Data::Dumper' => 0,
+		'autodie' => 0, # rpm: perl-autodie
+		'Compress::Raw::Zlib' => 0, # rpm: perl-Compress-Raw-Zlib
+		'Compress::Zlib' => 0, # rpm: perl-IO-Compress
+		'Data::Dumper' => 0, # rpm: perl-Data-Dumper
 		'Digest::SHA' => 0, # rpm: perl-Digest-SHA
-		'Encode' => 2.35, # 2.35 shipped with 5.10.1
-		'IO::Compress::Gzip' => 0,
-		'IO::Uncompress::Gunzip' => 0,
-		'Storable' => 0, # rpm: perl-Storable
+		'IO::Compress::Gzip' => 0, # rpm: perl-IO-Compress
+		'IO::Uncompress::Gunzip' => 0, # rpm: perl-IO-Compress
+		'Sys::Syslog' => 0, # rpm: perl-Sys-Syslog
 		'Text::ParseWords' => 0, # rpm: perl-Text-ParseWords
 
 		# Plack is needed for public-inbox-httpd and PublicInbox::WWW
@@ -170,12 +169,16 @@ WriteMakefile(
 		# users to install them.  See INSTALL
 
 		# All Perl installs I know about have these, but RH-based
-		# distros make them separate even though 'perl' pulls them in
+		# distros can separate these even if `perl' depends on them:
+		'constant' => 0, # rpm: perl-constant
+		'Encode' => 2.35, # rpm: perl-Encode # 2.35 shipped with 5.10.1
 		'File::Path' => 0,
 		'File::Temp' => '0.19', # for ->tmpdir support
-		'Getopt::Long' => 0,
-		'Exporter' => 0,
+		'Getopt::Long' => 0, # rpm: perl-Getopt-Long
+		'Exporter' => 0, # rpm: perl-Exporter
 		'IO::Poll' => 0,
+		'Storable' => 0, # rpm: perl-Storable
+		'Time::HiRes' => 0, # rpm: perl-Time-HiRes
 		# ExtUtils::MakeMaker # this file won't run w/o it...
 	},
 	MAN3PODS => \%man3,
diff --git a/install/deps.perl b/install/deps.perl
index e888cf30..a7b42607 100755
--- a/install/deps.perl
+++ b/install/deps.perl
@@ -35,12 +35,13 @@ my @test_essential = qw(Test::Simple); # we actually use Test::More
 my $profiles = {
 	# the smallest possible profile for testing
 	essential => [ qw(
+		autodie
 		git
 		perl
 		Digest::SHA
-		Encode
 		ExtUtils::MakeMaker
 		IO::Compress
+		Text::ParseWords
 		URI
 		), @test_essential ],
 
@@ -58,7 +59,6 @@ my $profiles = {
 		Plack::Test
 		Plack::Middleware::ReverseProxy
 		Xapian
-		Socket6
 		highlight.pm
 		xapian-tools
 		) ],
@@ -79,9 +79,9 @@ $profiles->{v2essential} = [ @{$profiles->{essential}}, qw(DBD::SQLite DBI) ];
 # dependencies to prevent essential package removal:
 my $non_auto = {
 	git => {
-		pkg => [ qw(curl p5-Socket6 p5-TimeDate git) ],
+		pkg => [ qw(curl p5-TimeDate git) ],
 		rpm => [ qw(curl git) ],
-		pkg_add => [ qw(curl p5-Socket6 p5-Time-TimeDate git) ],
+		pkg_add => [ qw(curl p5-Time-TimeDate git) ],
 	},
 	perl => {
 		pkg => 'perl5',
@@ -132,8 +132,14 @@ my $non_auto = {
 	},
 };
 
-# standard library stuff that CentOS 7.x (and presumably other RPM) split out:
-for (qw(Digest::SHA Encode ExtUtils::MakeMaker IO::Compress Test::Simple)) {
+# standard library stuff that CentOS 7.x (and presumably other RPM)
+# split out and can be removed without removing the `perl' RPM:
+for (qw(autodie Digest::SHA ExtUtils::MakeMaker IO::Compress Sys::Syslog
+		Test::Simple Text::ParseWords)) {
+	# n.b.: Compress::Raw::Zlib is pulled in by IO::Compress
+	# qw(constant Encode Getopt::Long Exporter Storable Time::HiRes)
+	# don't need to be here since it's impossible to have `perl'
+	# on CentOS 7.x without them.
 	$non_auto->{$_} = {
 		deb => 'perl', # libperl5.XX, but the XX varies
 		pkg => 'perl5',

  parent reply	other threads:[~2023-09-13  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13  9:12 [PATCH 0/5] more deps and updates from portability Eric Wong
2023-09-13  9:12 ` [PATCH 1/5] INSTALL: update for 2023, NetBSD and OpenBSD Eric Wong
2023-09-13  9:12 ` [PATCH 2/5] move deps.perl into new install/ directory Eric Wong
2023-09-13  9:12 ` Eric Wong [this message]
2023-09-13  9:12 ` [PATCH 4/5] install/deps: safer defaults for regular users Eric Wong
2023-09-13  9:12 ` [PATCH 5/5] t/xap_helper: improve reliability of TTIN/TTOU tests Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230913091242.1827709-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).