diff --git a/sendxmpp-1.24-git20161113.patch b/sendxmpp-1.24-git20250721.patch similarity index 68% rename from sendxmpp-1.24-git20161113.patch rename to sendxmpp-1.24-git20250721.patch index dd2fe47..7ad098e 100644 --- a/sendxmpp-1.24-git20161113.patch +++ b/sendxmpp-1.24-git20250721.patch @@ -1,8 +1,97 @@ -https://github.com/lhost/sendxmpp/compare/1.24...9186b8c +https://github.com/lhost/sendxmpp/compare/v1.24...fbc0ac5 ---- sendxmpp-1.24/sendxmpp 2014-09-13 23:23:08.000000000 +0200 -+++ sendxmpp-1.24/sendxmpp.git20161113 2020-08-08 00:10:22.488368180 +0200 -@@ -28,7 +28,7 @@ +--- sendxmpp-1.24/data/sendxmpp.doap 1970-01-01 01:00:00.000000000 +0100 ++++ sendxmpp-1.24/data/sendxmpp.doap.git20250721 2025-08-10 19:15:56.113898702 +0200 +@@ -0,0 +1,51 @@ ++ ++ ++ ++ sendxmpp ++ sendxmpp ++ ++ 2004-11-17 ++ ++ Perl script to send XMPP messages ++ Simple script written in Perl to send XMPP messages ++ ++ ++ ++ ++ ++ ++ ++ en ++ ++ Perl ++ Linux ++ macOS ++ FreeBSD ++ OpenBSD ++ NetBSD ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Lubomir Host ++ ++ 828a771064b09f14a2503dd3e8f8dc50e4aafb98 ++ ++ ++ ++ ++ ++ 1.24 ++ 2014-09-13 ++ ++ ++ ++ ++ ++ +--- sendxmpp-1.24/README 2014-09-13 23:23:08.000000000 +0200 ++++ sendxmpp-1.24/README.git20250721 2025-08-10 19:15:36.059739357 +0200 +@@ -3,7 +3,7 @@ + + sendxmpp is a perl-script to send XMPP (jabber) messages, similar to + what mail(1) does for mail. XMPP is an open, non-proprietary protocol +-for instant messaging. See www.jabber.org for more information. ++for instant messaging. See https://xmpp.org/ for more information. + + sendxmpp was written by me, Dirk-Jan C. Binnema, and is available under + the term of the GNU General Public License v2. The hard work is done by +@@ -11,14 +11,7 @@ + sendxmpp to work. Current maintainer is Lubomir Host + + Obviously, you also need a jabber account; they are freely available +-at jabber.org, but you can also install your own servers. +- +-sendxmpp is already in use for monitoring remote servers (servers can +-warn by sending xmpp-messages), and watching CVS commit messages +-(developers are all connected to a XMPP-chatroom to which messages are +-sent. +- +-I am interested in hearing about other uses. ++at https://list.jabber.at/, but you can also install your own servers. + + Homepage: http://sendxmpp.hostname.sk + +--- sendxmpp-1.24/sendxmpp 2014-09-13 23:23:08.000000000 +0200 ++++ sendxmpp-1.24/sendxmpp.git20250721 2025-08-10 19:14:32.096231157 +0200 +@@ -21,6 +21,7 @@ + use Net::XMPP; + use Net::Domain; + use Getopt::Long; ++use POSIX qw( strftime ); + + use strict; + +@@ -28,7 +29,7 @@ use open ':std'; # subroutines decls @@ -11,7 +100,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c sub xmpp_send ($$$$); sub xmpp_send_raw_xml($$); sub xmpp_send_message($$$$$$); -@@ -82,6 +82,7 @@ +@@ -82,6 +83,7 @@ $$cmdline{'no-tls-verify'} || $$config{'no-tls-verify'}, $$cmdline{'tls-ca-path'} || $$config{'tls-ca-path'} || '', $$cmdline{'ssl'}, @@ -19,7 +108,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c $$cmdline{'debug'}, $$cmdline{'sso'} ) or error_exit("cannot login: $!"); -@@ -102,7 +103,7 @@ +@@ -102,7 +104,7 @@ $txt .= $_ while (); } @@ -28,7 +117,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c } else { -@@ -115,7 +116,7 @@ +@@ -115,7 +117,7 @@ # line by line... while () { chomp; @@ -37,7 +126,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c } } -@@ -141,7 +142,7 @@ +@@ -141,7 +143,7 @@ error_exit ("$cfg_file must not be accessible by others") if ($mode & 0077); @@ -46,7 +135,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c or error_exit("cannot open $cfg_file for reading: $!"); my %config; -@@ -155,7 +156,7 @@ +@@ -155,7 +157,7 @@ #s/\#.*$//; # ignore comments in lines @@ -55,16 +144,17 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c $config{$1} = $2; } # Hugo van der Kooij has account with '#' as username -@@ -193,7 +194,7 @@ +@@ -193,7 +195,8 @@ unless (scalar(%config)); if ($DEBUG || $VERBOSE) { - while (my ($key,$val) = each %config) { + while (my ($key, $val) = each %config) { ++ $val ||= ""; debug_print ("config: '$key' => '$val'"); } } -@@ -211,7 +212,7 @@ +@@ -211,7 +214,7 @@ my ($subject, $file, $resource, $jserver, $port, $username, $password, $sso, $component, $message, $chatroom, $headline, $debug, $tls, $ssl, @@ -73,7 +163,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c $interactive, $help, $raw, $verbose ); $debug = 0; -@@ -232,6 +233,7 @@ +@@ -232,6 +235,7 @@ 'no-tls-verify|n' => \$no_tls_verify, 'tls-ca-path|a=s' => \$tls_ca_path, 'ssl|e' => \$ssl, @@ -81,7 +171,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c 'interactive|i' => \$interactive, 'help|usage|h' => \$help, 'debug|d:i' => sub { $debug = $_[1] ? $_[1] : $debug + 1 }, -@@ -301,6 +303,7 @@ +@@ -301,6 +305,7 @@ 'no-tls-verify' => ($no_tls_verify or 0), 'tls-ca-path' => ($tls_ca_path or ''), 'ssl' => ($ssl or 0), @@ -89,7 +179,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c 'debug' => ($debug or 0), 'verbose' => ($verbose or 0), 'raw' => ($raw or 0), -@@ -309,7 +312,7 @@ +@@ -309,7 +314,7 @@ ); if ($DEBUG || $VERBOSE) { @@ -98,7 +188,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c debug_print ("cmdline: '$key' => '$val'"); } } -@@ -319,12 +322,12 @@ +@@ -319,12 +324,12 @@ # # xmpp_login: login to the xmpp (jabber) server @@ -114,7 +204,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c my $cnx = new Net::XMPP::Client(debuglevel=>$debug); error_exit "could not create XMPP client object: $!" unless ($cnx); -@@ -343,27 +346,30 @@ +@@ -343,27 +348,30 @@ ssl_verify => $ssl_verify, ssl_ca_path => $tls_ca_path, ssl => $ssl, @@ -159,7 +249,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c delete $arghash->{port} unless $port; if ($arghash->{port}) { -@@ -374,7 +380,7 @@ +@@ -374,7 +382,7 @@ error_exit ("Could not connect to server '$host': ".($cnx->GetErrorCode()||$@)) unless @res; } @@ -168,7 +258,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c if ($comp) { my $sid = $cnx->{SESSION}->{id}; -@@ -385,7 +391,7 @@ +@@ -385,7 +393,7 @@ 'username' => $user, 'password' => $pw, 'resource' => $res); @@ -177,7 +267,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c return $cnx; } # }}} -@@ -426,20 +432,20 @@ +@@ -426,20 +434,20 @@ # # xmpp_send_raw_xml: send a raw XML packet @@ -202,12 +292,14 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c # sub xmpp_send_message ($$$$$$) { # {{{ -@@ -452,16 +458,16 @@ +@@ -452,22 +460,21 @@ 'subject' => $subject, 'body' => $msg); - xmpp_check_result('MessageSend',0,$cnx); + xmpp_check_result('MessageSend', 0, $cnx); ++ ++ debug_print("Recipient: '$rcpt'"); } # }}} # @@ -221,21 +313,31 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c + my ($cnx, $resource, $subject, $rcpt, $msg) = @_; # set the presence - my $pres = new Net::XMPP::Presence; -@@ -476,10 +482,10 @@ +- my $pres = new Net::XMPP::Presence; +- my $res = $pres->SetTo("$rcpt/$resource"); +- +- $cnx->Send($pres); ++ xmpp_send_raw_xml($cnx, ""); + + # create/send the message + my $groupmsg = new Net::XMPP::Message; +@@ -475,11 +482,12 @@ + body => $msg, type => 'groupchat'); - $res = $cnx->Send($groupmsg); +- $res = $cnx->Send($groupmsg); - xmpp_check_result ('Send',$res,$cnx); ++ my $res = $cnx->Send($groupmsg); + xmpp_check_result ('Send', $res, $cnx); # leave the group - $pres->SetPresence (Type=>'unavailable',To=>$rcpt); ++ my $pres = new Net::XMPP::Presence; + $pres->SetPresence (Type=>'unavailable', To=>$rcpt); } # }}} # -@@ -494,7 +500,7 @@ +@@ -494,7 +502,7 @@ my $cnx = shift; $cnx->Disconnect(); @@ -244,7 +346,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c } # }}} # -@@ -518,7 +524,7 @@ +@@ -518,7 +526,7 @@ } else { my $errmsg = $cnx->GetErrorCode() || '?'; @@ -253,7 +355,20 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c } } # }}} -@@ -547,7 +553,7 @@ +@@ -536,8 +544,10 @@ + # input: [array of strings] + # + sub debug_print { # {{{ +- print STDERR "sendxmpp: " . (join ' ', @_) . "\n" +- if (@_ && ($DEBUG ||$VERBOSE)); ++ if (@_ && ($DEBUG ||$VERBOSE)) { ++ my $date_str = strftime("%Y-%m-%d %H:%M:%S", localtime); ++ print STDERR "$date_str sendxmpp: " . (join ' ', @_) . "\n" ++ } + } # }}} + + # +@@ -547,7 +557,7 @@ # sub error_exit { # {{{ @@ -262,7 +377,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c print STDERR "$err\n"; xmpp_logout ($cnx) if ($cnx); -@@ -594,15 +600,15 @@ +@@ -594,15 +604,15 @@ =over @@ -281,7 +396,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c Use I instead of the one in the configuration file -@@ -610,35 +616,39 @@ +@@ -610,35 +620,39 @@ Instead of specifying username or password, attempt to use system level SSO (e.g. kerberos) if supported. @@ -329,7 +444,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c Backward compatibility option. You should use B<--message-type=headline> instead. Send a headline type message (not stored in offline messages) -@@ -646,35 +656,35 @@ +@@ -646,35 +660,35 @@ Set type of message. Supported types are: B. Default message type is B. Headline type message can be set also with B<--headline> option, see B<--headline> @@ -373,7 +488,7 @@ https://github.com/lhost/sendxmpp/compare/1.24...9186b8c Show debugging info while running. B: This will include passwords etc. so be careful with the output! Specify multiple times to increase debug level. -@@ -685,19 +695,19 @@ +@@ -685,19 +699,19 @@ You may define a 'F<~/.sendxmpprc>' file with the necessary data for your xmpp-account. Since version 1.24 the following format is supported: diff --git a/sendxmpp.spec b/sendxmpp.spec index c3c5d1a..542bd52 100644 --- a/sendxmpp.spec +++ b/sendxmpp.spec @@ -1,20 +1,16 @@ -Summary: Perl script to send XMPP messages -Name: sendxmpp -Version: 1.24 -Release: 19%{?dist} -License: GPL-2.0-only -URL: https://sendxmpp.hostname.sk/ -Source: https://github.com/lhost/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: sendxmpp-1.24-git20161113.patch -BuildRequires: perl-generators -%if 0%{?rhel} && 0%{?rhel} <= 7 -BuildRequires: perl(ExtUtils::MakeMaker), findutils -%else -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -%endif -BuildRequires: make -BuildRequires: perl(Net::XMPP) -BuildArch: noarch +Summary: Perl script to send XMPP messages +Name: sendxmpp +Version: 1.24 +Release: 25%{?dist} +License: GPL-2.0-only +URL: https://sendxmpp.hostname.sk/ +Source: https://github.com/lhost/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: sendxmpp-1.24-git20250721.patch +BuildRequires: make +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(Net::XMPP) +BuildArch: noarch %description Sendxmpp is a Perl script to send XMPP (Jabber) messages from the command @@ -22,8 +18,7 @@ line, similar to what mail(1) does for mail. Messages can be sent both to individual recipients and chat rooms. %prep -%setup -q -%patch0 -p1 -b .git20161113 +%autosetup -p1 %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 @@ -31,9 +26,6 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %install %make_install -%if 0%{?rhel} && 0%{?rhel} <= 7 -find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -f {} \; -%endif chmod -R u+w $RPM_BUILD_ROOT/* %files @@ -42,6 +34,24 @@ chmod -R u+w $RPM_BUILD_ROOT/* %{_mandir}/man1/%{name}.1* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 1.24-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Sat Jan 17 2026 Fedora Release Engineering - 1.24-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Sun Aug 10 2025 Robert Scheck 1.24-23 +- Upgrade to GIT 20250721 + +* Fri Jul 25 2025 Fedora Release Engineering - 1.24-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sun Jan 19 2025 Fedora Release Engineering - 1.24-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Sat Jul 20 2024 Fedora Release Engineering - 1.24-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 1.24-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild