OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   22-Jul-2003 16:47:00
  Branch: HEAD                             Handle: 2003072215465901

  Modified files:
    openpkg-re              openpkg-dev rpmlint.pl speclint.pl
    openpkg-re/vcheck       vc.perl-time

  Log:
    disable l_value check for special openpkg-tool package; add one more
    check for canonical patch filenames

  Summary:
    Revision    Changes     Path
    1.129       +9  -9      openpkg-re/openpkg-dev
    1.8         +8  -7      openpkg-re/rpmlint.pl
    1.44        +18 -6      openpkg-re/speclint.pl
    1.27        +5  -0      openpkg-re/vcheck/vc.perl-time
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/openpkg-dev
  ============================================================================
  $ cvs diff -u -r1.128 -r1.129 openpkg-dev
  --- openpkg-re/openpkg-dev    22 Jul 2003 08:25:34 -0000      1.128
  +++ openpkg-re/openpkg-dev    22 Jul 2003 14:46:59 -0000      1.129
  @@ -1116,20 +1116,20 @@
   
               if [ ".${BRANCH}" = .HEAD ]; then
                   echo "++ linting ${name}.spec (package specification)"
  -                perl ${OPENPKG_WORK}/re/speclint.pl 
${OPENPKG_WORK}/src/${name}/${name}.spec 
  +                HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/speclint.pl 
${OPENPKG_WORK}/src/${name}/${name}.spec 
                   if [ $? -gt 0 ]; then
                       die "unacceptable specification: 
${OPENPKG_WORK}/src/${name}/${name}.spec"
                   fi
                   if [ -f rc.${name} ]; then
                       echo "++ linting rc.${name} (run-command script)"
  -                    perl ${OPENPKG_WORK}/re/rclint.pl 
${OPENPKG_WORK}/src/${name}/rc.${name}
  +                    HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rclint.pl 
${OPENPKG_WORK}/src/${name}/rc.${name}
                       if [ $? -gt 0 ]; then
                           die "unacceptable run commands: 
${OPENPKG_WORK}/src/${name}/rc.${name}"
                       fi
                   fi
                   if [ -f fsl.${name} ]; then
                       echo "++ linting fsl.${name} (OSSP fsl configuration)"
  -                    perl ${OPENPKG_WORK}/re/fsllint.pl 
${OPENPKG_WORK}/src/${name}/fsl.${name} 
  +                    HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/fsllint.pl 
${OPENPKG_WORK}/src/${name}/fsl.${name} 
                       if [ $? -gt 0 ]; then
                           die "unacceptable fsl configuration: 
${OPENPKG_WORK}/src/${name}/fsl.${name}"
                       fi
  @@ -1143,7 +1143,7 @@
                   bin_rpmdir=`HOME=${OPENPKG_WORK} ${OPENPKG_INST}/bin/rpm --eval 
'%{_rpmdir}'`
                   if [ -f "$bin_rpmdir/$bin_rpmfile" ]; then
                       echo "++ linting ${bin_rpmfile} (binary package)"
  -                    perl ${OPENPKG_WORK}/re/rpmlint.pl --check=layout,attrib 
$bin_rpmdir/$bin_rpmfile
  +                    HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rpmlint.pl 
--check=layout,attrib $bin_rpmdir/$bin_rpmfile
                       if [ $? -gt 0 ]; then
                           die "unacceptable specification: $bin_rpmdir/$bin_rpmfile"
                       fi
  @@ -1682,14 +1682,14 @@
               name=`echo ${name} | sed -e 's;\.spec$;;'`
   
               echo "++ linting $file (package specification)"
  -            perl ${OPENPKG_WORK}/re/speclint.pl $file
  +            HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/speclint.pl $file
               if [ $? -gt 0 -a $force -ne 1 ]; then
                   die "unacceptable specification"
               fi
   
               if [ -f ${path}/rc.${name} ]; then
                   echo "++ linting ${path}/rc.${name} (run-command script)"
  -                perl ${OPENPKG_WORK}/re/rclint.pl ${path}/rc.${name}
  +                HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rclint.pl 
${path}/rc.${name}
                   if [ $? -gt 0 -a $force -ne 1 ]; then
                       die "unacceptable run commands: ${path}/rc.${name}"
                   fi
  @@ -1697,7 +1697,7 @@
   
               if [ -f ${path}/fsl.${name} ]; then
                   echo "++ linting ${path}/fsl.${name} (OSSP fsl configuration)"
  -                perl ${OPENPKG_WORK}/re/fsllint.pl ${path}/fsl.${name} 
  +                HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/fsllint.pl 
${path}/fsl.${name} 
                   if [ $? -gt 0 -a $force -ne 1 ]; then
                       die "unacceptable fsl configuration: ${path}/fsl.${name}"
                   fi
  @@ -1709,7 +1709,7 @@
                   bin_rpmdir=`HOME=${OPENPKG_WORK} ${OPENPKG_INST}/bin/rpm --eval 
'%{_rpmdir}'`
                   if [ -f "$bin_rpmdir/$bin_rpmfile" ]; then
                       echo "++ linting ${bin_rpmdir}/${bin_rpmfile} (binary package)"
  -                    perl ${OPENPKG_WORK}/re/rpmlint.pl --check=layout,attrib 
$bin_rpmdir/$bin_rpmfile
  +                    HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/rpmlint.pl 
--check=layout,attrib $bin_rpmdir/$bin_rpmfile
                       if [ $? -gt 0 -a $force -ne 1 ]; then
                           die "unacceptable specification: $bin_rpmdir/$bin_rpmfile"
                       fi
  @@ -1941,7 +1941,7 @@
           for file in $files; do
               TERM=${TERM}-color command vim "${file}"
               if [ ".${OPENPKG_MODE}" = .developer -a ".${B}" = .HEAD -o $force -ne 0 
]; then
  -                perl ${OPENPKG_WORK}/re/speclint.pl ${file}
  +                HOME=${OPENPKG_WORK} perl ${OPENPKG_WORK}/re/speclint.pl ${file}
                   if [ $? -gt 0 ]; then
                       die "unacceptable specification: ${file}"
                   fi
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-re/rpmlint.pl
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 rpmlint.pl
  --- openpkg-re/rpmlint.pl     9 Jul 2003 14:05:16 -0000       1.7
  +++ openpkg-re/rpmlint.pl     22 Jul 2003 14:46:59 -0000      1.8
  @@ -215,8 +215,8 @@
           }
       }
   
  -    #  unpacking files
  -    if (grep(/^content$/, @checks)) {
  +    #   unpacking files
  +    if (grep(/^content$/, @{$checks})) {
           &msg_verbose("++ unpacking RPM package files");
           $info->{root} = "$tmpdir/root"; 
           system("mkdir -p ".$info->{root});
  @@ -314,15 +314,16 @@
           }
       }
   
  -    #   check for symbolic link targets (absolute, dangling)
  +    #   check for symbolic link targets (outside absolute, dangling)
       foreach my $path (keys(%{$info->{ls}})) {
           my $symlink = $info->{ls}->{$path}->{'symlink'};
           if ($symlink ne '') {
  -            #   check 1: absolute target
  -            if ($symlink =~ m|^/.*|) {
  -                &lint_warning($rpm, "symbolic link \"$path\" points to absolute 
path \"$symlink\" (expected relative path)");
  +            #   check for outside absolute target
  +            my $prefix = quotemeta($info->{prefix});
  +            if ($symlink =~ m|^/.*| and $symlink !~ m|^$prefix|s) {
  +                &lint_warning($rpm, "symbolic link \"$path\" points to absolute 
path \"$symlink\" outside prefix \"$info->{prefix}\" (expected it to be under prefix 
only)");
               }
  -            #   check 2: dangling target
  +            #   check for dangling target
               my $resolved = &resolve($info, $path);
               sub resolve {
                   my ($info, $path) = @_;
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-re/speclint.pl
  ============================================================================
  $ cvs diff -u -r1.43 -r1.44 speclint.pl
  --- openpkg-re/speclint.pl    22 Jul 2003 12:40:16 -0000      1.43
  +++ openpkg-re/speclint.pl    22 Jul 2003 14:46:59 -0000      1.44
  @@ -874,12 +874,13 @@
       }
   
       #   check for deprecated use of "shtool install|subst -e @l_...@ %{l_...}"
  -    my $done = ''; my $this = ''; my $todo = $spec;
  -    #while ($todo =~ m/%{l_shtool} (install|subst)[EMAIL 
PROTECTED](prefix|[mrn](usr|grp))\@/s) {
  -    while ($todo =~ m/%{l_shtool} 
(install|subst)(?:\\\n|[^\n])*?-e(?:\\\n|[^\n])[EMAIL 
PROTECTED](prefix|[smrn](usr|grp|uid|gid))[EMAIL PROTECTED]/s) {
  -        $done .= $`; $this = $&; $todo = $';
  -        &lint_warning($file, $done, $this, "deprecated usage of \"shtool $1 -e 
[EMAIL PROTECTED]@\" (expected use of %{l_value -s -a})");
  -        $done .= $this;
  +    if ($file !~ m|openpkg-tool|) {
  +        my $done = ''; my $this = ''; my $todo = $spec;
  +        while ($todo =~ m/%{l_shtool} 
(install|subst)(?:\\\n|[^\n])*?-e(?:\\\n|[^\n])[EMAIL 
PROTECTED](prefix|[smrn](usr|grp|uid|gid))[EMAIL PROTECTED]/s) {
  +            $done .= $`; $this = $&; $todo = $';
  +            &lint_warning($file, $done, $this, "deprecated usage of \"shtool $1 -e 
[EMAIL PROTECTED]@\" (expected use of %{l_value -s -a})");
  +            $done .= $this;
  +        }
       }
   
       #   check for constant "root" in %attr
  @@ -1141,6 +1142,17 @@
           }
           elsif ($s->{-url} ne '' and -f $cvsdir."/".$s->{-file} and not -f 
$dstdir."/".$s->{-file}) {
               &lint_error($file, undef, undef, "source \"$s->{-file}\" not found in 
DST, but in CVS (expected it in DST or want URL)");
  +        }
  +    }
  +
  +    #   check for patch file naming
  +    foreach my $src (%{$S}) {
  +        my $s = $S->{$src};
  +        next if (not $s->{-refhdr});
  +        if (    $s->{-url} eq '' and $s->{-type} eq 'patch' 
  +            and $s->{-file} !~ m|^${name}\.patch(\.[^./]+)?$|) {
  +            &lint_warning($file, undef, undef, "non-canonical patch filename 
\"$s->{-file}\"" .
  +                          " (expected to match \"${name}\\.patch(\\.[^./]+)?\$\")");
           }
       }
   }
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-re/vcheck/vc.perl-time
  ============================================================================
  $ cvs diff -u -r1.26 -r1.27 vc.perl-time
  --- openpkg-re/vcheck/vc.perl-time    3 Jul 2003 17:40:39 -0000       1.26
  +++ openpkg-re/vcheck/vc.perl-time    22 Jul 2003 14:47:00 -0000      1.27
  @@ -21,6 +21,11 @@
     url       = http://www.cpan.org/modules/by-module/Date/
     regex     = DateManip-(__VER__)\.tar\.gz
   }
  +prog perl-time:DateTime-LeapSecond = {
  +  version   = 0.02
  +  url       = http://www.cpan.org/modules/by-module/DateTime/
  +  regex     = DateTime-LeapSecond-(__VER__)\.tar\.gz
  +}
   prog perl-time:Time-modules = {
     version   = 2003.0211
     url       = http://www.cpan.org/modules/by-authors/id/MUIR/modules/
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to