Hello community,

here is the log from the commit of package cpanspec for openSUSE:Factory 
checked in at 2019-03-13 09:13:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cpanspec (Old)
 and      /work/SRC/openSUSE:Factory/.cpanspec.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cpanspec"

Wed Mar 13 09:13:49 2019 rev:37 rq:684271 version:1.78.09

Changes:
--------
--- /work/SRC/openSUSE:Factory/cpanspec/cpanspec.changes        2016-01-08 
15:24:01.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cpanspec.new.28833/cpanspec.changes     
2019-03-13 09:13:55.619394805 +0100
@@ -1,0 +2,36 @@
+Tue Mar 12 11:49:23 UTC 2019 - Stephan Kulow <[email protected]>
+
+- Bernhard M. Wiedemann (5):
+      avoid stripping exec bits off .pl files
+      refactor custom spec sections
+      allow for post_build section
+      allow to override summary and description
+      accept more pathnames in tarballs
+
+Dirk Stoecker (8):
+      fix some issues, add minimal README
+      small cleanup in download case
+      fix Linux::Inotify2 - user new license names, don't show upstream 
license if identical, better summary capitalization
+      don't show upstream license if totally identical
+      support Zip
+      support perl license text in cpanspec.yml properly
+      support perl license text in cpanspec.yml properly - drop debug
+      unify perl license
+
+Dirk Stöcker (2):
+      makecmd - handle alike to perl and rm (#8)
+      support new storage position for cpan data
+
+Sebastian Riedel (1):
+      Prevent invalid "perl-.spec" and "perl-.changes" from being generated
+
+Stephan Kulow (7):
+      retry the checkout after branch (service in progress)
+      avoid "the manpage" links
+      remove debug statement
+      take license folder too
+      small fixes
+      Use %license
+      Fix wget options in cpanget
+
+-------------------------------------------------------------------

Old:
----
  cpanspec-1.78.08.tar.gz

New:
----
  cpanspec-1.78.09.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cpanspec.spec ++++++
--- /var/tmp/diff_new_pack.JQhUdQ/_old  2019-03-13 09:13:56.915394671 +0100
+++ /var/tmp/diff_new_pack.JQhUdQ/_new  2019-03-13 09:13:56.915394671 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package cpanspec
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,20 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
+%define cpan_name cpanspec
 Name:           cpanspec
-Version:        1.78.08
+Version:        1.78.09
 Release:        0
-%define cpan_name cpanspec
 Summary:        Generate a SUSE spec file for a CPAN module
-License:        Artistic-1.0 or GPL-1.0+
+License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Languages/Perl
-Url:            http://sourceforge.net/projects/cpanspec/
+URL:            https://github.com/openSUSE/cpanspec
 Source0:        cpanspec-%{version}.tar.gz
 Source99:       updaterpm.sh
-BuildArch:      noarch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
 BuildRequires:  perl(Archive::Tar)
@@ -43,7 +41,6 @@
 Requires:       perl(Archive::Tar)
 Requires:       perl(Archive::Zip)
 Requires:       perl(Class::Accessor::Chained)
-Recommends:     perl(IO::Uncompress::Bunzip2)
 Requires:       perl(LWP::UserAgent)
 Requires:       perl(Parse::CPAN::Packages)
 Requires:       perl(Perl::PrereqScanner)
@@ -52,6 +49,8 @@
 Requires:       perl(Text::Autoformat)
 Requires:       perl(Text::Capitalize)
 Requires:       perl(YAML)
+Recommends:     perl(IO::Uncompress::Bunzip2)
+BuildArch:      noarch
 %{perl_requires}
 
 %description
@@ -63,11 +62,11 @@
 find . -type f -print0 | xargs -0 chmod 644
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+make %{?_smp_mflags}
 
 %check
-%{__make} test
+make %{?_smp_mflags} test
 
 %install
 %perl_make_install
@@ -76,6 +75,7 @@
 
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Artistic BUGS Changes COPYING TODO
+%license COPYING
+%doc Artistic BUGS Changes TODO
 
 %changelog

++++++ cpanspec-1.78.08.tar.gz -> cpanspec-1.78.09.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpanspec-1.78.08/META.json 
new/cpanspec-1.78.09/META.json
--- old/cpanspec-1.78.08/META.json      2015-08-28 12:00:22.233507095 +0200
+++ new/cpanspec-1.78.09/META.json      2019-03-12 12:49:24.396281879 +0100
@@ -4,13 +4,13 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter 
version 2.140640",
+   "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "unknown"
    ],
    "meta-spec" : {
       "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
-      "version" : "2"
+      "version" : 2
    },
    "name" : "cpanspec",
    "no_index" : {
@@ -50,5 +50,6 @@
       }
    },
    "release_status" : "stable",
-   "version" : "v1.78.08"
+   "version" : "v1.78.09",
+   "x_serialization_backend" : "JSON::PP version 2.97001"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpanspec-1.78.08/META.yml 
new/cpanspec-1.78.09/META.yml
--- old/cpanspec-1.78.08/META.yml       2015-08-28 12:00:22.118508150 +0200
+++ new/cpanspec-1.78.09/META.yml       2019-03-12 12:49:24.320281657 +0100
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 
2.140640'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version 
2.150010'
 license: unknown
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -32,4 +32,5 @@
   Text::Autoformat: '0'
   YAML: '0'
   locale: '0'
-version: v1.78.08
+version: v1.78.09
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpanspec-1.78.08/cpanget new/cpanspec-1.78.09/cpanget
--- old/cpanspec-1.78.08/cpanget        2015-08-28 12:00:21.376514961 +0200
+++ new/cpanspec-1.78.09/cpanget        2019-03-12 12:49:22.764277114 +0100
@@ -4,6 +4,10 @@
 
 CPAN=${CPAN:-"http://www.cpan.org"}
 packages=$HOME/.cpan/sources/modules/02packages.details.txt.gz
+npackages=$HOME/.local/share/.cpan/sources/modules/02packages.details.txt.gz
+if test -e $npackages; then
+  packages=$npackages
+fi
 
 quiet=''
 only_url=0
@@ -56,7 +60,7 @@
 mkdir -p $( dirname $packages )
 
 
-(cd $(dirname $packages) && wget -q -nc $CPAN/modules/$( basename $packages ) )
+(cd $(dirname $packages) && wget -q -N -nd $CPAN/modules/$( basename $packages 
) )
 
 for module in "$@" ; do
     tar=$( zgrep '^'$module' ' $packages | awk '{print $3}' )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cpanspec-1.78.08/cpanspec 
new/cpanspec-1.78.09/cpanspec
--- old/cpanspec-1.78.08/cpanspec       2015-08-28 12:00:21.377514952 +0200
+++ new/cpanspec-1.78.09/cpanspec       2019-03-12 12:49:22.764277114 +0100
@@ -9,8 +9,6 @@
 # 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.
-#
-# $Id: cpanspec,v 1.67 2009/01/16 20:35:17 stevenpritchard Exp $
 
 =head1 NAME
 
@@ -135,7 +133,7 @@
 =item B<-c>, B<--cpan>
 
 The URL to a CPAN mirror.  If not specified with this option or the
-B<CPAN> environment variable, defaults to L<http://www.cpan.org/>.
+B<CPAN> environment variable, defaults to L<https://cpan.metacpan.org/>.
 
 =item B<-v>, B<--verbose>
 
@@ -190,7 +188,7 @@
 use warnings;
 
 our $NAME    = "cpanspec";
-our $VERSION = '1.78.08';
+our $VERSION = '1.78.09';
 
 use Cwd;
 BEGIN {
@@ -210,7 +208,7 @@
 use YAML::Any qw(Dump Load LoadFile);
 use Getopt::Long;
 use Pod::POM;
-use Pod::POM::View::Text;
+use PodViewSpec;
 use Pod::Usage;
 use File::Basename;
 use LWP::UserAgent;
@@ -246,16 +244,21 @@
 our $follow       = 0;
 our $macros       = 1;
 our $skip_changes = 0;
+our $cmdperl      = "perl"; # \%{__perl}
+our $cmdrm        = "rm"; # \%{__rm}
+our $cmdmake      = "make"; # \%{__make}
+our $perllicense  = "Artistic-1.0 or GPL-1.0-or-later";
 our $config_file;
 our $old_file;
 our $config = {};
-our $cpan = $ENV{'CPAN'} || "http://www.cpan.org";;
+our $cpan = $ENV{'CPAN'} || 'https://cpan.metacpan.org';
 
 our $home = $ENV{'HOME'} || (getpwuid($<))[7];
 die "Can't locate home directory.  Please define \$HOME.\n"
   if (!defined($home));
 
-our $pkgdetails = "$home/.cpan/sources/modules/02packages.details.txt.gz";
+our $pkgdetails = (-d "$home/.local/share/.cpan" ? "$home/.local/share" : 
"$home")
+                  . "/.cpan/sources/modules/02packages.details.txt.gz";
 our $updated    = 0;
 our $basedir    = mkdtemp("/tmp/cpanspecXXXXXX") . "/";
 
@@ -372,6 +375,7 @@
 }
 
 sub get_file($) {
+    my $type;
     $file = shift;
     # Look up $file in 02packages.details.txt.
     verbose("Get file $file");
@@ -391,10 +395,12 @@
         $name    = $d->dist();
         $version = $d->version();
         $version =~ s/^v\.?//;
+        $type = $d->prefix() =~ /\.zip/ ? "zip" : "tar";
     }
     else {
         warn "Failed to parse '$file' or find a module by that name, 
skipping...\n";
     }
+    return $type;
 }
 
 sub get_source($) {
@@ -516,7 +522,7 @@
         $description = '';
         foreach my $item ($head1->content()) {
             last if ($item->type() eq 'head2');
-            eval { $description .= $item->present('Pod::POM::View::Text'); };
+            eval { $description .= $item->present('PodViewSpec'); };
         }
 
         return $description = undef unless length($description);
@@ -661,7 +667,7 @@
 
 sub map_version($$) {
     my ($module, $version) = @_;
-    if (grep { $module eq $_ } qw/Module::Build CPAN::Meta::Requirements 
ExtUtils::PkgConfig Test::Exception Test::Number::Delta Time::Duration 
DateTime::Locale/ ) {
+    if (grep { $module eq $_ } qw/Module::Build CPAN::Meta::Requirements 
ExtUtils::PkgConfig Test::Exception Test::Number::Delta Time::Duration 
DateTime::Locale File::Path/ ) {
        my $nv = $version . "000000";
        if ($nv =~ /^(.*\.[0-9]{6})/) {
            return $1;
@@ -702,6 +708,26 @@
     return '';
 }
 
+sub add_custom_spec_section($$) {
+    my ($spec, $section) = @_;
+    if ($config->{$section}) {
+        print $spec "# MANUAL BEGIN\n";
+        chomp $config->{$section};
+        print $spec $config->{$section};
+        print $spec "\n# MANUAL END\n";
+    }
+}
+
+sub is_license_file {
+    my $file = shift;
+
+    return 1 if $file =~ /^copying/i;
+    return 1 if $file =~ /^license/i;
+    return 1 if $file =~ /^artistic/i;
+    return 1 if $file =~ /^mit/i;
+    return;
+}
+
 # Set locale to en_US.UTF8 so that dates in changelog will be correct
 # if using another locale. Also ensures writing out UTF8. (Thanks to
 # Roy-Magne Mo for pointing out the problem and providing a solution.)
@@ -763,22 +789,23 @@
 for my $ofile (@args) {
 
     my $type = undef;
+    my $download = undef;
     ($file, $name, $source, $version) = (undef, undef, undef, undef);
     ($content, $summary, $description, $author, $license) = (undef, undef, 
undef, undef, undef);
 
-    if ($ofile =~ /^(?:.*\/)?(.*)-(?:v\.?)?([^-]+)\.(tar)\.(?:gz|bz2)$/i) {
+    if ($ofile =~ /^(?:.*\/)?(.+)-(?:v\.?)?([^-]+)\.(tar)\.(?:gz|bz2)$/i) {
         $file    = $ofile;
         $name    = $1;
         $version = $2;
         $type    = $3;
     }
-    elsif ($ofile =~ /^(?:.*\/)?(.*)-(?:v\.?)?([^-]+)\.tgz$/i) {
+    elsif ($ofile =~ /^(?:.*\/)?(.+)-(?:v\.?)?([^-]+)\.tgz$/i) {
         $file    = $ofile;
         $name    = $1;
         $version = $2;
         $type    = 'tar';
     }
-    elsif ($ofile =~ /^(?:.*\/)?(.*)-(?:v\.?)?([^-]+)\.(zip)$/i) {
+    elsif ($ofile =~ /^(?:.*\/)?(.+)-(?:v\.?)?([^-]+)\.(zip)$/i) {
         $file    = $ofile;
         $name    = $1;
         $version = $2;
@@ -789,8 +816,10 @@
         $ofile =~ s/-/::/g;
 
         # Look up $file in 02packages.details.txt.
-        get_file($ofile);
+        $type = get_file($ofile);
+        $download = 1;
     }
+    next unless $name;
 
     my $module = $name;
     $module =~ s/-/::/g;
@@ -831,7 +860,8 @@
         $archive = Archive::Zip->new() or die "Archive::Zip->new() failed: 
$!\n";
         die "Read error on $file\n" unless ($archive->read($file) == AZ_OK);
         $ext = '.zip';
-        die "we do not support ZIP atm\n";
+        $archive->extractTree('', $basedir);
+        push(@archive_files, $archive->memberNames());
     }
 
     my @files = ();
@@ -840,7 +870,9 @@
     my $changes;
     my $changesfile;
     foreach my $entry (@archive_files) {
-        if ($entry !~ /^(?:.\/)?($name-(?:v\.?)?$version)(?:\/|$)/) {
+        my $version0=$version;
+        $version0=~s/0*$/0*/; # pathnames may not contain as many trailing 
zeros
+        if ($entry !~ /^(?:.\/)?($name-(?:v\.?)?$version0)(?:\/|$)/) {
             warn "BOGUS PATH DETECTED: $entry\n";
             $bogus++;
             next;
@@ -849,7 +881,7 @@
             $path = $1;
         }
 
-        $entry =~ s,^(?:.\/)?$name-(?:v\.?)?$version/,,;
+        $entry =~ s,^(?:.\/)?$name-(?:v\.?)?$version0/,,;
         next if (!$entry);
 
         push(@files, $entry);
@@ -874,7 +906,7 @@
         next;
     }
 
-    my $url="http://search.cpan.org/dist/$name/";;
+    my $url="https://metacpan.org/release/\%{cpan_name}";;
 
     get_source($name) if(!defined $source && -d dirname($pkgdetails));
 
@@ -904,7 +936,7 @@
             and $_ ne $path
             and $_ ne "MANIFEST"
             and $_ ne "MANIFEST.SKIP"
-            and $_ ne "INSTALL"
+            and !/^INSTALL/i
             and $_ ne "SIGNATURE"
            and !/^META\..+$/i
            and !/^MYMETA\..+$/i
@@ -936,6 +968,7 @@
     push(@doc, "util") if grep(/^util\//, @files);
     push(@doc, "example") if grep(/^example\//, @files);
     push(@doc, "samples") if grep(/^samples\//, @files);
+    push(@doc, "license") if grep(/^license\//, @files);
 
     my $date=strftime("%a %b %d %Y", localtime);
 
@@ -1004,7 +1037,7 @@
         next;
     }
 
-    print $spec qq[\%{!?perl_$vendorlib: \%define perl_$vendorlib \%(eval 
"\`\%{__perl} -V:install$vendorlib\`"; echo \$install$vendorlib)}\n\n]
+    print $spec qq[\%{!?perl_$vendorlib: \%define perl_$vendorlib \%(eval 
"\`$cmdperl -V:install$vendorlib\`"; echo \$install$vendorlib)}\n\n]
       if ($compat);
 
     $license = undef;
@@ -1054,7 +1087,7 @@
             # docs, cross referenced with the list of licenses in
             # /usr/share/rpmlint/config.
             if ($meta->{license} =~ /^perl$/i) {
-                $license = "Artistic-1.0 or GPL-1.0+";
+                $license = $perllicense;
             }
             elsif ($meta->{license} =~ /^apache$/i) {
                 $license = "Apache-2.0";
@@ -1069,13 +1102,13 @@
                 $license = "BSD-3-Clause";
             }
             elsif ($meta->{license} =~ /^gpl$/i) {
-                $license = "GPL-1.0+";
+                $license = "GPL-1.0-or-later";
             }
             elsif ($meta->{license} =~ /^gpl2$/i) {
-                $license = "GPL-2.0+";
+                $license = "GPL-2.0-or-later";
             }
             elsif ($meta->{license} =~ /^lgpl$/i) {
-                $license = "LGPL-2.1+";
+                $license = "LGPL-2.1-or-later";
             }
             elsif ($meta->{license} =~ /^mit$/i) {
                 $license = "MIT";
@@ -1083,6 +1116,9 @@
             elsif ($meta->{license} =~ /^mozilla$/i) {
                 $license = "MPL";
             }
+            elsif ($meta->{license} =~ /^gpl3$/i) {
+                $license = "GPL-3.0-or-later";
+            }
             elsif ($meta->{license} =~ /^open_source$/i || $meta->{license} =~ 
/^unrestricted$/i) {
                 $license = "SUSE-Public-Domain";    # rpmlint will complain
             }
@@ -1109,7 +1145,7 @@
                 || $license =~ /under the terms of the Perl artistic license/
                 || $license =~ qr/free software.*dev.perl.org.* for more 
information/))
         {
-            $license = "GPL-1.0+ or Artistic-1.0";
+            $license = $perllicense;
         }
     }
 
@@ -1117,7 +1153,7 @@
         $summary = "$module Perl module";
     }
 
-    $license = "CHECK(GPL-1.0+ or Artistic-1.0)" if (!$license);
+    $license = "CHECK($perllicense)" if (!$license);
 
     $description = $summary if (!defined($description));
 
@@ -1125,12 +1161,19 @@
     $summary =~ s,^[aA] ,,;
     if ($summary ne ucfirst($summary)) {
         # capitalize the damn thing - for real
-        require Text::Capitalize;
-        $summary = Text::Capitalize::capitalize_title($summary);
+        $summary = ucfirst($summary);
+        #require Text::Capitalize;
+        #$summary = Text::Capitalize::capitalize_title($summary);
     }
     if (length($summary) > 79) {
         $summary = substr($summary, 0, 72) . "[cut]";
     }
+    if ($config->{summary}) {
+        $summary = $config->{summary};
+    }
+    if ($config->{description}) {
+        $description = $config->{description};
+    }
 
     my $usebuildpl  = 0;
     my $usebuildplt = 0;
@@ -1187,7 +1230,7 @@
 
     foreach my $pkg (keys %packages) { delete $build_requires{$pkg} }
 
-    my %hdoc = ();
+    my %hdoc;
     if (@doc) {
         foreach my $d (@doc) {
             $hdoc{$d} = 1;
@@ -1201,7 +1244,7 @@
 #
 # spec file for package $prefix$name (Version $rpm_version)
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -1212,7 +1255,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 END
@@ -1233,7 +1276,15 @@
 
     print $spec "Epoch:          $epoch\n" if (defined($epoch));
     if ($config->{license}) {
-        print $spec "#Upstream: $license\n";
+        if($config->{license} =~ /^Perl( License)?$/i)
+        {
+          $config->{license} = $perllicense;
+        }
+        if("CHECK($config->{license})" ne $license
+        && $config->{license} ne $license)
+        {
+          print $spec "#Upstream: $license\n";
+        }
         print $spec "License:   $config->{license}\n";
     }
     else {
@@ -1247,10 +1298,11 @@
 END
     my $sfile = basename($ofile);
     $sfile =~ s/$name/\%{cpan_name}/;
+    $source =~ s/$name/\%{cpan_name}/ if $download;
 
     my $counter = 0;
     if ($source) {
-        if (basename($source) eq $sfile) {
+        if (basename($source) eq $sfile || $download) {
             $source =~ s,$version,$version_string,;
             print $spec "Source$counter:         $source\n";
         }
@@ -1378,12 +1430,7 @@
     }
 
     print $spec "%{perl_requires}\n";
-    if ($config->{preamble}) {
-        print $spec "# MANUAL BEGIN\n";
-        chomp $config->{preamble};
-        print $spec $config->{preamble};
-        print $spec "\n# MANUAL END\n";
-    }
+    add_custom_spec_section($spec, "preamble");
 
     my $buildpath = $path;
     $buildpath =~ s/$name/\%{cpan_name}/;
@@ -1398,7 +1445,7 @@
 END
 
     if ($execs) {
-        print $spec "find . -type f -print0 | xargs -0 chmod 644\n";
+        print $spec "find . -type f ! -name \\*.pl -print0 | xargs -0 chmod 
644\n";
     }
 
     if ($config->{patches}) {
@@ -1433,12 +1480,7 @@
 END
     }
 
-    if ($config->{post_prep}) {
-        print $spec "# MANUAL BEGIN\n";
-        chomp $config->{post_prep};
-        print $spec $config->{post_prep};
-        print $spec "\n# MANUAL END\n";
-    }
+    add_custom_spec_section($spec, "post_prep");
 
     print $spec <<END;
 
@@ -1451,32 +1493,33 @@
     else {
         if ($usebuildplt) {
             print $spec <<END;
-\%{__perl} Build.PL --installdirs=vendor@{[$noarch ? '' : qq{ 
optimize="$macro{optimize}"} ]}
+$cmdperl Build.PL --installdirs=vendor@{[$noarch ? '' : qq{ 
optimize="$macro{optimize}"} ]}
 ./Build build --flags=\%{?_smp_mflags}
 
 END
         }
         elsif ($usebuildpl) {
             print $spec <<END;
-\%{__perl} Build.PL installdirs=vendor@{[$noarch ? '' : qq{ 
optimize="$macro{optimize}"} ]}
+$cmdperl Build.PL installdirs=vendor@{[$noarch ? '' : qq{ 
optimize="$macro{optimize}"} ]}
 ./Build build flags=\%{?_smp_mflags}
 
 END
         }
         else {
             print $spec <<END;
-\%{__perl} Makefile.PL INSTALLDIRS=vendor@{[$noarch ? '' : qq{ 
OPTIMIZE="$macro{optimize}"}]}
+$cmdperl Makefile.PL INSTALLDIRS=vendor@{[$noarch ? '' : qq{ 
OPTIMIZE="$macro{optimize}"}]}
 END
 
-            print $spec "\%{__perl} -pi -e 
's/^\\tLD_RUN_PATH=[^\\s]+\\s*/\\t/' Makefile\n"
+            print $spec "$cmdperl -pi -e 's/^\\tLD_RUN_PATH=[^\\s]+\\s*/\\t/' 
Makefile\n"
               if ($compat and !$noarch);
 
             print $spec <<END;
-\%{__make} \%{?_smp_mflags}
+$cmdmake \%{?_smp_mflags}
 
 END
         }
     }
+    add_custom_spec_section($spec, "post_build");
 
     print $spec <<END;
 \%check@{[($compat ? ' || :' : '')]}
@@ -1494,7 +1537,7 @@
           print $spec "$noprefix./Build test\n";
       }
       else {
-          print $spec "$noprefix\%{__make} test\n";
+          print $spec "$noprefix$cmdmake test\n";
       }
     }
 
@@ -1515,12 +1558,7 @@
 %perl_process_packlist
 END
     }
-    if ($config->{post_install}) {
-        print $spec "# MANUAL BEGIN\n";
-        chomp $config->{post_install};
-        print $spec $config->{post_install};
-        print $spec "\n# MANUAL END\n";
-    }
+    add_custom_spec_section($spec, "post_install");
 
     print $spec "%perl_gen_filelist\n";
 
@@ -1538,7 +1576,7 @@
     if (@filter_requires || @filter_provides) {
         print $spec <<END;
 \%clean
-\%{__rm} -rf $macro{buildroot}@{[
+$cmdrm -rf $macro{buildroot}@{[
     (@filter_requires ? ' %{__perl_requires}' : '') .
     (@filter_provides ? ' %{__perl_provides}' : '')]}
 END
@@ -1551,7 +1589,20 @@
     print $spec "\%defattr(-,root,root,755)\n";
 
     if (%hdoc) {
-        print $spec "%doc " . join(' ', sort(keys(%hdoc))) . "\n";
+       my (@ldoc, @hdoc);
+       for my $f (keys %hdoc) {
+           if (is_license_file($f)) {
+               push(@ldoc, $f);
+           } else {
+               push(@hdoc, $f);
+           }
+       }
+       if (@hdoc) {
+           print $spec "%doc " . join(' ', sort(@hdoc)) . "\n";
+       }
+       if (@ldoc) {
+           print $spec "%license " . join(' ', sort(@ldoc)) . "\n";
+       }
     }
 
     if ($scripts) {
@@ -1582,25 +1633,41 @@
 
     if (!$skip_changes) {
         (my $basename = $specfile) =~ s{\.spec$}{};
+        my $changelogfile = "$basename.changes";
+        my $skip = 0;
 
         my $changes_diff;
 
         my ($tfh, $tmpfile) = File::Temp::tempfile;
-        my $oldfh = select $tfh;
+        my $cltxt = "";
 
-        if (-f "$basename.changes") {
-            print "updated to $version\n   see 
$defaultdocdir/$basename/$changesfile\n\n";
+        if (-f $changelogfile) {
+            my $txt = "updated to $version\n   see 
$defaultdocdir/$basename/$changesfile\n\n";
+            $cltxt .= $txt;
             if ($old_file && $changes) {
                 my $old_changes = extract_old_changes($old_file, $changesfile);
                 $old_changes =~ s,\r\n,\n,g;
-                print diff_changes($old_changes, $changes) if $old_changes;
+                $cltxt .= diff_changes($old_changes, $changes) if $old_changes;
+            }
+            local $/;
+            undef $/;
+            if(open CHANGES,"<",$changelogfile)
+            {
+              my $log = <CHANGES>;
+              if($log =~ $txt)
+              {
+                $skip = 1;
+                print STDERR "Skip changelog entry, already exists.\n";
+              }
+              close CHANGES;
             }
         }
         else {
-            print "initial package $version\n * created by $NAME $VERSION";
+            $cltxt .= "initial package $version\n * created by $NAME $VERSION";
         }
-        system("osc vc -F $tmpfile $basename.changes");
-        select($oldfh);
+        print $tfh $cltxt;
+        system("osc vc -F $tmpfile $basename.changes") if !$skip;
+        close($tfh);
     }
 }
 

++++++ updaterpm.sh ++++++
--- /var/tmp/diff_new_pack.JQhUdQ/_old  2019-03-13 09:13:56.971394665 +0100
+++ /var/tmp/diff_new_pack.JQhUdQ/_new  2019-03-13 09:13:56.971394665 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-rev=aec50fb13474f4a76747b656c9cb215c7140ebe4
+rev=b1663887dfdf4f134341c07d97f98ee9c05beba6
 git clone https://github.com/openSUSE/cpanspec.git
 cd cpanspec
 nrev=`git show HEAD| grep commit | head -n 1 | cut '-d ' -f2`


Reply via email to