diff --git a/.gitignore b/.gitignore index ad0e30e..3631050 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,3 @@ POE-Component-IRC-6.14.tar.gz /POE-Component-IRC-6.91.tar.gz /POE-Component-IRC-6.92.tar.gz /POE-Component-IRC-6.93.tar.gz -/POE-Component-IRC-6.93_repackaged.tar.gz -/POE-Component-IRC-6.95_repackaged.tar.gz diff --git a/0001-apply-fixes-for-rhbz-591215.patch b/0001-apply-fixes-for-rhbz-591215.patch new file mode 100644 index 0000000..9bf92ab --- /dev/null +++ b/0001-apply-fixes-for-rhbz-591215.patch @@ -0,0 +1,146 @@ +From 8fec0161383143419d4cc957e001b0b2fc9fa304 Mon Sep 17 00:00:00 2001 +From: Iain Arnell +Date: Thu, 20 May 2010 19:22:35 +0200 +Subject: [PATCH] apply fixes for rhbz#591215 + +cherry-picked 4f46c29376359b3d7c5b5cd400115103fdef9ca8 +cherry-picked 675f55cd40ceebbc1bd2f309311a066bed41d869 +cherry-picked 9e2a01af6a908f9c1c97431bcbc5f483a7a99e2f +--- + lib/POE/Component/IRC.pm | 19 +++++++------------ + t/02_behavior/14_newline.t | 16 +++++++++------- + xt/perlcriticrc_t | 1 + + 3 files changed, 17 insertions(+), 19 deletions(-) + +diff --git a/lib/POE/Component/IRC.pm b/lib/POE/Component/IRC.pm +index 4fe23da..ecaa50c 100644 +--- a/lib/POE/Component/IRC.pm ++++ b/lib/POE/Component/IRC.pm +@@ -1038,9 +1038,7 @@ sub onlytwoargs { + + # Handler for privmsg or notice events. + sub privandnotice { +- my ($kernel, $state, $to) = @_[KERNEL, STATE, ARG0]; +- my $message = join ' ', @_[ARG1 .. $#_]; +- my @messages = split /\n/, $message; ++ my ($kernel, $state, $to, $msg) = @_[KERNEL, STATE, ARG0, ARG1]; + my $pri = $_[OBJECT]->{IRC_CMDS}->{$state}->[CMD_PRI]; + + $state =~ s/privmsglo/privmsg/; +@@ -1048,7 +1046,7 @@ sub privandnotice { + $state =~ s/noticelo/notice/; + $state =~ s/noticehi/notice/; + +- if (!defined $to || !defined $message) { ++ if (!defined $to || !defined $msg) { + warn "The '$state' event requires two arguments\n"; + return; + } +@@ -1056,9 +1054,7 @@ sub privandnotice { + $to = join ',', @$to if ref $to eq 'ARRAY'; + $state = uc $state; + +- for my $msg (@messages) { +- $kernel->yield(sl_prioritized => $pri, "$state $to :$msg"); +- } ++ $kernel->yield(sl_prioritized => $pri, "$state $to :$msg"); + return; + } + +@@ -1214,14 +1210,14 @@ sub sl_prioritized { + + my $now = time(); + $self->{send_time} = $now if $self->{send_time} < $now; ++ ++ # if we find a newline in the message, take that to be the end of it ++ $msg =~ s/[\015\012].*//s; + + if (bytes::length($msg) > $self->{msg_length} - bytes::length($self->nick_name())) { + $msg = bytes::substr($msg, 0, $self->{msg_length} - bytes::length($self->nick_name())); + } + +- # if we find a newline in the message, take that to be the end of it +- $msg =~ s/\n.*//gm; +- + if (@{ $self->{send_queue} }) { + my $i = @{ $self->{send_queue} }; + $i-- while ($i && $priority < $self->{send_queue}->[$i-1]->[MSG_PRI]); +@@ -2188,8 +2184,7 @@ it will be treated as a PART message and dealt with accordingly. + Sends a public or private message to the nick(s) or channel(s) which + you specify. Takes 2 arguments: the nick or channel to send a message + to (use an array reference here to specify multiple recipients), and +-the text of the message to send. If the message contains newlines, it +-will be split up into multiple messages. ++the text of the message to send. + + Have a look at the constants in + L if you would +diff --git a/t/02_behavior/14_newline.t b/t/02_behavior/14_newline.t +index efad9f3..e59998d 100644 +--- a/t/02_behavior/14_newline.t ++++ b/t/02_behavior/14_newline.t +@@ -3,16 +3,15 @@ use warnings; + use lib 't/inc'; + use POE qw(Wheel::SocketFactory); + use Socket; +-use POE::Component::IRC::State; +-use POE::Component::IRC::Plugin::AutoJoin; ++use POE::Component::IRC; + use POE::Component::Server::IRC; + use Test::More tests => 9; + +-my $bot1 = POE::Component::IRC::State->spawn( ++my $bot1 = POE::Component::IRC->spawn( + Flood => 1, + plugin_debug => 1, + ); +-my $bot2 = POE::Component::IRC::State->spawn( ++my $bot2 = POE::Component::IRC->spawn( + Flood => 1, + plugin_debug => 1, + ); +@@ -89,7 +88,7 @@ sub irc_join { + my ($sender, $heap, $who, $where) = @_[SENDER, HEAP, ARG0, ARG1]; + my $nick = ( split /!/, $who )[0]; + my $irc = $sender->get_heap(); +- ++ + return if $nick ne $irc->nick_name(); + is($where, '#testchannel', 'Joined Channel Test'); + +@@ -98,10 +97,13 @@ sub irc_join { + + $irc->yield(quote => "PRIVMSG $where :one\nPRIVMSG $where :two"); + $irc->yield(privmsg => $where, "foo\nbar"); ++ $irc->yield(privmsg => $where, "baz\rquux"); + } + + sub irc_public { +- my ($heap, $msg) = @_[HEAP, ARG2]; ++ my ($sender, $heap, $where, $msg) = @_[SENDER, HEAP, ARG1, ARG2]; ++ my $irc = $sender->get_heap(); ++ my $chan = $where->[0]; + + $heap->{got_msg}++; + if ($heap->{got_msg} == 1) { +@@ -111,7 +113,7 @@ sub irc_public { + is($msg, 'foo', 'Second message'); + } + elsif ($heap->{got_msg} == 3) { +- is($msg, 'bar', 'Third message'); ++ is($msg, 'baz', 'Third message'); + $bot1->yield('quit'); + $bot2->yield('quit'); + } +diff --git a/xt/perlcriticrc_t b/xt/perlcriticrc_t +index 3bd1ed9..9b1b549 100644 +--- a/xt/perlcriticrc_t ++++ b/xt/perlcriticrc_t +@@ -25,3 +25,4 @@ verbose = 3 + [-Modules::RequireExplicitPackage] + [-Modules::RequireFilenameMatchesPackage] + [-Subroutines::RequireFinalReturn] ++[-ControlStructures::ProhibitCascadingIfElse] +-- +1.7.0.1 + diff --git a/gating.yaml b/gating.yaml index c778f75..282e16b 100644 --- a/gating.yaml +++ b/gating.yaml @@ -1,16 +1,7 @@ --- !Policy -product_versions: - - fedora-rawhide -decision_context: bodhi_update_push_stable -subject_type: koji_build -rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional} ---- !Policy product_versions: - fedora-* decision_context: bodhi_update_push_stable subject_type: koji_build rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional} - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/perl-POE-Component-IRC.rpmlintrc b/perl-POE-Component-IRC.rpmlintrc index 9d95585..1118857 100644 --- a/perl-POE-Component-IRC.rpmlintrc +++ b/perl-POE-Component-IRC.rpmlintrc @@ -1,2 +1,2 @@ -addFilter('-tests\.noarch: W: no-documentation') -addFilter('invalid-url Source0: POE-Component-IRC-[\d\.]*_repackaged\.tar\.gz') +from Config import * +addFilter("-tests\\.noarch: W: no-documentation") diff --git a/perl-POE-Component-IRC.spec b/perl-POE-Component-IRC.spec index 836513d..4f4e43c 100644 --- a/perl-POE-Component-IRC.spec +++ b/perl-POE-Component-IRC.spec @@ -9,29 +9,11 @@ Name: perl-POE-Component-IRC Summary: A POE component for building IRC clients -Version: 6.95 -Release: 2%{?dist} -# LICENSE: (GPL-1.0-or-later OR Artistic-1.0-Perl) declaration, -# GPL-1.0 text and Artistic-1.0 text -# other files: GPL-1.0-or-later OR Artistic-1.0-Perl -# t/inc/Crypt/PasswdMD5.pm: Beerware AND (GPL-1.0-or-later OR Artistic-1.0-Perl) -## Not used at build or in any binary package -# repackage.sh: GPL-2.0-or-later -## Stripped from source archive -# docs/draft-brocklesby-irc-isupport-03.txt: non-free -# docs/draft-mitchell-irc-capabilities-02.html: non-free -# docs/rfc2810.html: non-free -# docs/rfc2811.html: non-free -# docs/rfc2812.html: non-free -# docs/rfc2813.html: non-free -License: GPL-1.0-or-later OR Artistic-1.0-Perl -SourceLicense: (%{license}) AND Beerware AND GPL-2.0-or-later +Version: 6.93 +Release: 1%{?dist} +License: GPL+ or Artistic +Source0: https://cpan.metacpan.org/authors/id/B/BI/BINGOS/POE-Component-IRC-%{version}.tar.gz URL: https://metacpan.org/release/POE-Component-IRC -# Origin Source0 URL: -# https://cpan.metacpan.org/authors/id/B/BI/BINGOS/POE-Component-IRC-%%{version}.tar.gz -# stripped from non-free IETF documents with repackage.sh script. -Source0: POE-Component-IRC-%{version}_repackaged.tar.gz -Source1: repackage.sh BuildArch: noarch BuildRequires: coreutils BuildRequires: make @@ -79,6 +61,9 @@ BuildRequires: perl(POE::Wheel::SocketFactory) BuildRequires: perl(POSIX) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Socket) +%if %{with perl_POE_Component_IRC_enables_ipv6} +BuildRequires: perl(Socket6) +%endif # Tests: BuildRequires: perl(Crypt::PasswdMD5) BuildRequires: perl(Data::Dumper) @@ -93,6 +78,7 @@ BuildRequires: perl(Socket::GetAddrInfo) BuildRequires: perl(Test::Differences) >= 0.61 BuildRequires: perl(Test::More) >= 0.47 BuildRequires: perl(vars) +Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) Requires: perl(IRC::Utils) >= 0.12 Requires: perl(List::Util) >= 1.33 Requires: perl(overload) @@ -113,6 +99,9 @@ Recommends: perl(POE::Filter::Zlib::Stream) >= 1.96 Requires: perl(POE::Wheel::FollowTail) Requires: perl(POE::Wheel::ReadWrite) Requires: perl(POE::Wheel::SocketFactory) +%if %{with perl_POE_Component_IRC_enables_ipv6} +Requires: perl(Socket6) +%endif %{?perl_default_filter} @@ -132,7 +121,6 @@ is to it. Cool, no? %package tests Summary: Tests for %{name} -License: (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Beerware Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: coreutils Requires: perl-Test-Harness @@ -152,6 +140,9 @@ Requires: perl(POE::Wheel::SocketFactory) %if %{with perl_POE_Component_IRC_enables_ipv6} Requires: perl(Socket::GetAddrInfo) %endif +%if %{with perl_POE_Component_IRC_enables_ipv6} +Requires: perl(Socket6) +%endif Requires: perl(Test::Differences) >= 0.61 Requires: perl(Test::More) >= 0.47 Provides: bundled(POE-Component-Server-IRC) = 1.52 @@ -161,7 +152,7 @@ Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %prep -%autosetup -p1 -n POE-Component-IRC-%{version} +%setup -q -n POE-Component-IRC-%{version} chmod -c -x examples/* # Remove bundled modules for D in t/inc/Crypt t/inc/Net; do @@ -209,64 +200,13 @@ make test %files %license LICENSE %doc Changes docs/ examples/ -%dir %{perl_vendorlib}/POE -%dir %{perl_vendorlib}/POE/Component -%{perl_vendorlib}/POE/Component/IRC{,.pm} -%dir %{perl_vendorlib}/POE/Filter -%{perl_vendorlib}/POE/Filter/IRC{,.pm} -%{_mandir}/man3/POE::Component::IRC{.,::}* -%{_mandir}/man3/POE::Filter::IRC{.,::}* +%{perl_vendorlib}/* +%{_mandir}/man3/*.3* %files tests %{_libexecdir}/%{name} %changelog -* Fri Jul 25 2025 Fedora Release Engineering - 6.95-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Jul 08 2025 Petr Pisar - 6.95-1 -- 6.95 bump - -* Thu May 15 2025 Petr Pisar - 6.93-14 -- Fix webirc check in connection configuration (CPAN RT#157738) -- Remove non-free IETF documents from the package - -* Sat Jan 18 2025 Fedora Release Engineering - 6.93-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Tue Aug 06 2024 Miroslav Suchý - 6.93-12 -- convert license to SPDX - -* Fri Jul 19 2024 Fedora Release Engineering - 6.93-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 6.93-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 6.93-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 6.93-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jan 20 2023 Fedora Release Engineering - 6.93-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 6.93-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jun 01 2022 Jitka Plesnikova - 6.93-5 -- Perl 5.36 rebuild - -* Fri Jan 21 2022 Fedora Release Engineering - 6.93-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Jul 22 2021 Fedora Release Engineering - 6.93-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jul 07 2021 Michal Josef Špaček - 6.93-2 -- Remove obsolete require for Socket6 - * Wed Jun 16 2021 Petr Pisar - 6.93-1 - 6.93 bump @@ -278,12 +218,6 @@ make test - Package the tests - Unbundle Net::Netmask -* Sun May 23 2021 Jitka Plesnikova - 6.90-12 -- Perl 5.34 rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 6.90-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - * Tue Jul 28 2020 Fedora Release Engineering - 6.90-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/repackage.sh b/repackage.sh deleted file mode 100755 index 47ba045..0000000 --- a/repackage.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2010, 2021 Red Hat, Inc. -# Authors: -# Thomas Woerner -# Petr Pisar -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -version=$1 -[ -z "$version" ] && { echo "Usage: $0 "; exit 1; } - -# files to be removed without the main SDL-/ prefix -declare -a REMOVE -REMOVE[${#REMOVE[*]}]="docs/draft-brocklesby-irc-isupport-03.txt" -REMOVE[${#REMOVE[*]}]="docs/draft-mitchell-irc-capabilities-02.html" -REMOVE[${#REMOVE[*]}]="docs/rfc2810.html" -REMOVE[${#REMOVE[*]}]="docs/rfc2811.html" -REMOVE[${#REMOVE[*]}]="docs/rfc2812.html" -REMOVE[${#REMOVE[*]}]="docs/rfc2813.html" - -# no changes below this line should be needed - -orig="POE-Component-IRC-${version}" -orig_tgz="${orig}.tar.gz" -repackaged="${orig}_repackaged" -repackaged_tar="${repackaged}.tar" -repackaged_tgz="${repackaged_tar}.gz" - -# pre checks -[ ! -f "${orig_tgz}" ] && { echo "ERROR: ${orig_tgz} does not exist"; exit 1; } -[ -d "${orig}" ] && { echo "ERROR: ${orig} directory already exist"; exit 1; } -[ -f "${repackaged_tgz}" ] && { echo "ERROR: ${repackaged_tgz} already exist"; exit 1; } - -# repackage -failure=0 -tar -xzf "${orig_tgz}" -for file in "${REMOVE[@]}"; do - rm "${orig}/${file}" 2>> repackage.log - [ $? != 0 ] && { echo "ERROR: Could not remove ${orig}/${file} file."; failure=1; } || echo "${orig}/${file} removed." -done -[ $failure != 0 ] && { echo "See repackage.log for the details."; exit 1; } -tar -czf "${repackaged_tgz}" "${orig}" - -# post checks -RET=0 -for file in "${REMOVE[@]}"; do - found=$(tar -ztvf "${repackaged_tgz}" | grep "${file}") - [ -n "$found" ] && { echo "ERROR: file ${file} is still in the repackaged archive."; RET=1; } -done - -[ $RET == 0 ] && echo "Sucessfully repackaged ${orig}: ${repackaged_tgz}" - -exit $RET diff --git a/sources b/sources index fe1c15f..86a5ac1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (POE-Component-IRC-6.95_repackaged.tar.gz) = dc480db56d2eb9aeff51778f2fed488f7310f12e78013e13976c6ca0357d609dfcc0f0844ccbb0d2f8db3c2f5685cf164b07e5040f5be35018d952e2d41f291b +SHA512 (POE-Component-IRC-6.93.tar.gz) = 334535cb4f02c63fbc8b457b9e5c6d8cb96ef0ac159ac6f810d7cda337f55a729b73115a65dfca11c44ca286d355667500b021cd5408943a1afd2d325ece7be0