#1 1.68 bump; Package tests
Merged a year ago by jplesnik. Opened a year ago by jplesnik.
Unknown source rawhide  into  rawhide

file added
+1
@@ -0,0 +1,1 @@

+ 1

file added
+7
@@ -0,0 +1,7 @@

+ --- !Policy

+ product_versions:

+   - fedora-*

+ decision_context: bodhi_update_push_stable

+ subject_type: koji_build

+ rules:

+   - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

file modified
+50 -12
@@ -1,8 +1,8 @@

  %global base_version 1.59

  

  Name:           perl-threads-shared

- Version:        1.64

- Release:        490%{?dist}

+ Version:        1.68

+ Release:        1%{?dist}

  Summary:        Perl extension for sharing data structures between threads

  License:        GPL-1.0-or-later OR Artistic-1.0-Perl

  URL:            https://metacpan.org/release/threads-shared
@@ -18,6 +18,9 @@

  Patch3:         threads-shared-1.61-Upgrade-to-1.62.patch

  # Unbundled from perl 5.35.11

  Patch4:         threads-shared-1.62-Upgrade-to-1.64.patch

+ # Unbundled from perl 5.37.11

+ Patch5:         threads-shared-1.64-Upgrade-to-1.68.patch

+ BuildRequires:  coreutils

  BuildRequires:  findutils

  BuildRequires:  gcc

  BuildRequires:  make
@@ -55,24 +58,52 @@

  you to share variables across different threads (and pseudo-forks on

  Win32). It is used together with the threads module.

  

+ %package tests

+ Summary:        Tests for %{name}

+ Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}

+ Requires:       perl-Test-Harness

+ Requires:       perl(POSIX)

+ Requires:       perl(Time::HiRes)

+ 

+ %description tests

+ Tests from %{name}. Execute them

+ with "%{_libexecdir}/%{name}/test".

+ 

  %prep

  %setup -q -n threads-shared-%{base_version}

- %patch0 -p1

- %patch1 -p1

- %patch2 -p1

- %patch3 -p1

- %patch4 -p1

+ %patch -P0 -p1

+ %patch -P1 -p1

+ %patch -P2 -p1

+ %patch -P3 -p1

+ %patch -P4 -p1

+ %patch -P5 -p1

+ 

+ # Help generators to recognize Perl scripts

+ for F in t/*.t t/*pl; do

+     perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"

+     chmod +x "$F"

+ done

  

  %build

- perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS"

+ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="%{optflags}"

  %{make_build}

  

  %install

  %{make_install}

- find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete

- %{_fixperms} $RPM_BUILD_ROOT/*

+ find %{buildroot} -type f -name '*.bs' -size 0 -delete

+ %{_fixperms} %{buildroot}/*

+ 

+ # Install tests

+ mkdir -p %{buildroot}%{_libexecdir}/%{name}

+ cp -a t %{buildroot}%{_libexecdir}/%{name}

+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'

+ #!/bin/sh

+ cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"

+ EOF

+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test

  

  %check

+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')

  unset GIT_DIR PERL_BUILD_PACKAGING PERL_CORE PERL_RUNPERL_DEBUG \

      RUN_MAINTAINER_TESTS

  make test
@@ -81,9 +112,16 @@

  %doc Changes examples README

  %{perl_vendorarch}/auto/*

  %{perl_vendorarch}/threads*

- %{_mandir}/man3/*

+ %{_mandir}/man3/threads::shared*

+ 

+ %files tests

+ %{_libexecdir}/%{name}

  

  %changelog

+ * Thu May 18 2023 Jitka Plesnikova <jplesnik@redhat.com> - 1.68-1

+ - Upgrade to 1.68 as provided in perl-5.37.11

+ - Package tests

+ 

  * Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.64-490

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

  
@@ -282,7 +320,7 @@

  

  * Wed Aug 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.37-3

  - change path on vendor, so our debuginfo are not conflicting with

-  perl core debuginfos

+   perl core debuginfos

  

  * Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.37-2

  - Perl mass rebuild

file added
+5
@@ -0,0 +1,5 @@

+ summary: Sanity tests

+ discover:

+     how: fmf

+ execute:

+     how: tmt

@@ -0,0 +1,4 @@

+ summary: Upstream tests

+ component: perl-threads-shared

+ require: perl-threads-shared-tests

+ test: /usr/libexec/perl-threads-shared/test

@@ -0,0 +1,90 @@

+ From dca84f1765496c5beb5ac418286c588eb8c268d9 Mon Sep 17 00:00:00 2001

+ From: Jitka Plesnikova <jplesnik@redhat.com>

+ Date: Thu, 18 May 2023 19:26:24 +0200

+ Subject: [PATCH] Upgrade to 1.68

+ 

+ ---

+  lib/threads/shared.pm |  4 ++--

+  shared.xs             | 21 +++++++++------------

+  2 files changed, 11 insertions(+), 14 deletions(-)

+ 

+ diff --git a/lib/threads/shared.pm b/lib/threads/shared.pm

+ index 1fd2899..6e67acd 100644

+ --- a/lib/threads/shared.pm

+ +++ b/lib/threads/shared.pm

+ @@ -8,7 +8,7 @@ use Config;

+  

+  use Scalar::Util qw(reftype refaddr blessed);

+  

+ -our $VERSION = '1.64'; # Please update the pod, too.

+ +our $VERSION = '1.68'; # Please update the pod, too.

+  my $XS_VERSION = $VERSION;

+  $VERSION = eval $VERSION;

+  

+ @@ -196,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads

+  

+  =head1 VERSION

+  

+ -This document describes threads::shared version 1.64

+ +This document describes threads::shared version 1.68

+  

+  =head1 SYNOPSIS

+  

+ diff --git a/shared.xs b/shared.xs

+ index 6a7f03c..f78542d 100644

+ --- a/shared.xs

+ +++ b/shared.xs

+ @@ -40,7 +40,7 @@

+   * proxy PVLV element with attached element magic.

+   *

+   * Pointers to the shared SV are squirrelled away in the mg->mg_ptr field

+ - * of magic (with mg_len == 0), and in the IV2PTR(SvIV(sv)) field of tied

+ + * of magic (with mg_len == 0), and in the INT2PTR(SvIV(sv)) field of tied

+   * object SVs. These pointers have to be hidden like this because they

+   * cross interpreter boundaries, and we don't want sv_clear() and friends

+   * following them.

+ @@ -130,14 +130,11 @@

+  #include "EXTERN.h"

+  #include "perl.h"

+  #include "XSUB.h"

+ -#ifdef HAS_PPPORT_H

+ -#  define NEED_sv_2pv_flags

+ -#  define NEED_vnewSVpvf

+ -#  define NEED_warner

+ -#  define NEED_newSVpvn_flags

+ -#  include "ppport.h"

+ -#  include "shared.h"

+ -#endif

+ +#define NEED_sv_2pv_flags

+ +#define NEED_vnewSVpvf

+ +#define NEED_warner

+ +#define NEED_newSVpvn_flags

+ +#include "ppport.h"

+  

+  #ifndef CLANG_DIAG_IGNORE

+  # define CLANG_DIAG_IGNORE(x)

+ @@ -704,10 +701,10 @@ Perl_sharedsv_cond_timedwait(perl_cond *cond, perl_mutex *mut, double abs)

+      abs -= (NV)ts.tv_sec;

+      ts.tv_nsec = (long)(abs * 1000000000.0);

+  

+ -    CLANG_DIAG_IGNORE_STMT(-Wthread-safety);

+ +    CLANG_DIAG_IGNORE(-Wthread-safety)

+      /* warning: calling function 'pthread_cond_timedwait' requires holding mutex 'mut' exclusively [-Wthread-safety-analysis] */

+      switch (pthread_cond_timedwait(cond, mut, &ts)) {

+ -	CLANG_DIAG_RESTORE_STMT;

+ +	CLANG_DIAG_RESTORE

+  

+          case 0:         got_it = 1; break;

+          case ETIMEDOUT:             break;

+ @@ -1145,7 +1142,7 @@ sharedsv_array_mg_CLEAR(pTHX_ SV *sv, MAGIC *mg)

+              I32 items = isav ? AvFILLp((AV *)ssv) + 1 : 0;

+              HE *iter;

+              if (!isav) hv_iterinit((HV *)ssv);

+ -            while (isav ? items-- : !!(iter = hv_iternext((HV *)ssv))) {

+ +            while (isav ? items-- : cBOOL(iter = hv_iternext((HV *)ssv))) {

+                  SV *sv = isav ? *svp++ : HeVAL(iter);

+                  if (!sv) continue;

+                  if ( (SvOBJECT(sv) || (SvROK(sv) && (sv = SvRV(sv))))

+ -- 

+ 2.40.1

+