forked from pool/post-build-checks
- Update reserved init script names from LANANA.
The current authoritative list is currently found here: http://stewbenedict.org/lsb/lanana/lsbreg/init/init.txt OBS-URL: https://build.opensuse.org/package/show/Base:System/post-build-checks?expand=0&rev=66
This commit is contained in:
parent
b23f77c377
commit
243fe0ce72
@ -1,9 +0,0 @@
|
|||||||
Index: post-build-checks-1.0/suse-buildsystem.sh
|
|
||||||
===================================================================
|
|
||||||
--- post-build-checks-1.0.orig/suse-buildsystem.sh 2011-10-20 11:57:54.000000000 +0200
|
|
||||||
+++ post-build-checks-1.0/suse-buildsystem.sh 2012-06-04 12:07:23.597872870 +0200
|
|
||||||
@@ -1,3 +1,3 @@
|
|
||||||
-export SUSE_IGNORED_RPATHS=/etc/ld.so.conf
|
|
||||||
+export SUSE_IGNORED_RPATHS=/etc/suse-ignored-rpaths.conf
|
|
||||||
export SUSE_ASNEEDED=1
|
|
||||||
|
|
128
new.diff
128
new.diff
@ -1,128 +0,0 @@
|
|||||||
Index: post-build-checks-1.0/checks/09-check-packaged-twice
|
|
||||||
===================================================================
|
|
||||||
--- post-build-checks-1.0.orig/checks/09-check-packaged-twice 2011-10-20 11:57:54.000000000 +0200
|
|
||||||
+++ post-build-checks-1.0/checks/09-check-packaged-twice 2011-12-20 10:12:34.056044906 +0000
|
|
||||||
@@ -1,61 +1,76 @@
|
|
||||||
-#!/usr/bin/perl
|
|
||||||
+#!/usr/bin/perl -w
|
|
||||||
# search for files packaged more than once
|
|
||||||
+# it is an error if such a file exists but the packages do not conflict
|
|
||||||
#
|
|
||||||
use strict;
|
|
||||||
my $had_errors = 0;
|
|
||||||
-my $build_root = $::ENV{BUILD_ROOT};
|
|
||||||
-my @RPMS = ();
|
|
||||||
+my $build_root = $::ENV{BUILD_ROOT} || '/';
|
|
||||||
|
|
||||||
my $TOPDIR = '/usr/src/packages';
|
|
||||||
$TOPDIR = '/.build.packages' if -d "$build_root/.build.packages";
|
|
||||||
|
|
||||||
-open ( ALL_RPMS , "find $build_root$TOPDIR/RPMS -name \"*.rpm\" |");
|
|
||||||
-while ( my $cur = <ALL_RPMS> ) {
|
|
||||||
- chomp ( $cur );
|
|
||||||
- $cur =~ s/^$build_root//;
|
|
||||||
- push @RPMS, $cur;
|
|
||||||
+sub conflicts {
|
|
||||||
+ my ($rpm1, $rpm2) = @_;
|
|
||||||
+ open (F, "chroot $build_root rpm -qp --qf '[%{CONFLICTNAME} %{CONFLICTFLAGS} %{CONFLICTVERSION}\n]' $rpm1|");
|
|
||||||
+ my @conflicts = <F>;
|
|
||||||
+ close F;
|
|
||||||
+ chomp @conflicts;
|
|
||||||
+ return 0 unless @conflicts;
|
|
||||||
+ open (F, "chroot $build_root rpm -qp --qf '[%{PROVIDENAME} %{PROVIDEFLAGS} %{PROVIDEVERSION}\n]' $rpm2|");
|
|
||||||
+ my @provides = <F>;
|
|
||||||
+ close F;
|
|
||||||
+ for my $c (@conflicts) {
|
|
||||||
+ my @cc = split(' ', $c, 3);
|
|
||||||
+ $cc[0] =~ s/^otherproviders\((.*)\)$/$1/;
|
|
||||||
+ for my $p (@provides) {
|
|
||||||
+ my @pp = split(' ', $p, 3);
|
|
||||||
+ next unless $cc[0] eq $pp[0];
|
|
||||||
+ # add complex logic here if needed
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
-close ( ALL_RPMS );
|
|
||||||
|
|
||||||
-if ( $#RPMS < 1 ) {
|
|
||||||
- exit 0;
|
|
||||||
+open (ALL_RPMS, "chroot $build_root find $TOPDIR/RPMS/ -name \"*.rpm\" |");
|
|
||||||
+my @rpms = <ALL_RPMS>;
|
|
||||||
+chomp @rpms;
|
|
||||||
+close ALL_RPMS;
|
|
||||||
+
|
|
||||||
+exit 0 if @rpms < 2;
|
|
||||||
+
|
|
||||||
+my %allfiles;
|
|
||||||
+my %pkg2rpm;
|
|
||||||
+
|
|
||||||
+for my $rpm (@rpms) {
|
|
||||||
+ next if ($rpm =~ m/-debuginfo/ || $rpm =~ m/-debugsource/);
|
|
||||||
+ open (FILES, "chroot $build_root rpm -qp --qf '[%{FILEMODES:perms} F:%{FILEFLAGS:fflags} %{NAME} %{FILENAMES}\n]' $rpm|");
|
|
||||||
+ my @files = <FILES>;
|
|
||||||
+ chomp @files;
|
|
||||||
+ close FILES;
|
|
||||||
+ # ignore empty rpm as rpmlint will catch them
|
|
||||||
+ @files = grep {!/^\(none\)/} @files;
|
|
||||||
+ # ignore dirs
|
|
||||||
+ @files = grep {!/^d/} @files;
|
|
||||||
+ for my $file (@files) {
|
|
||||||
+ next unless $file =~ /^\S+ F:(\S*) (\S+) (.*)$/;
|
|
||||||
+ $allfiles{$3}->{$2} = $1;
|
|
||||||
+ $pkg2rpm{$2} = $rpm;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
-my %FILES = ();
|
|
||||||
-
|
|
||||||
-for my $cur (@RPMS) {
|
|
||||||
- my $rpmname = `chroot $build_root rpm -qp --qf '%{NAME}' $cur`;
|
|
||||||
- open ( FILELIST , "chroot $build_root rpm -qplv $cur |");
|
|
||||||
- while ( my $file = <FILELIST> ) {
|
|
||||||
- chomp ( $file );
|
|
||||||
- next if ( $file =~ /^d/ );
|
|
||||||
- my @line = split ('\s+',$file);
|
|
||||||
- my $filename = "";
|
|
||||||
- while (my $file_too = pop(@line)) {
|
|
||||||
- if ($file_too eq "->") {
|
|
||||||
- # this was a symlink target
|
|
||||||
- $filename = "";
|
|
||||||
- } else {
|
|
||||||
- $filename = $file_too.($filename eq "" ? "" : " ").$filename;
|
|
||||||
- }
|
|
||||||
- last if ($#line == 7);
|
|
||||||
- }
|
|
||||||
- if ( $FILES{$filename} ) {
|
|
||||||
- #printf "ERROR: $rpmname: $filename already packaged in package $FILES{$filename}\n";
|
|
||||||
- printf "WARNING: $rpmname: $filename already packaged in package $FILES{$filename}\n";
|
|
||||||
- $had_errors = 1;
|
|
||||||
- $FILES{$filename} .= ",$rpmname";
|
|
||||||
- } else {
|
|
||||||
- $FILES{$filename} = $rpmname;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- close ( FILELIST );
|
|
||||||
+for my $file (keys %allfiles) {
|
|
||||||
+ my @pkgs = keys %{$allfiles{$file}};
|
|
||||||
+ next if @pkgs < 2;
|
|
||||||
+ while (@pkgs) {
|
|
||||||
+ my $p1 = shift @pkgs;
|
|
||||||
+ for my $p2 (@pkgs) {
|
|
||||||
+ next if (index($allfiles{$file}->{$p1}, 'g') != -1) && (index($allfiles{$file}->{$p2}, 'g') != -1);
|
|
||||||
+ next if conflicts($pkg2rpm{$p1}, $pkg2rpm{$p2}) || conflicts($pkg2rpm{$p2}, $pkg2rpm{$p1});
|
|
||||||
+ print "ERROR: $file is packaged in both $p1 and $p2, and the packages do not conflict\n";
|
|
||||||
+ $had_errors = 1;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
-#if ( $had_errors ) {
|
|
||||||
-# printf "found ERRORS\n";
|
|
||||||
-# exit 1;
|
|
||||||
-#}
|
|
||||||
-
|
|
||||||
-exit 0;
|
|
||||||
-
|
|
||||||
+exit $had_errors;
|
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:dbf7e8e87ffd67fcae03201f5d860d98db182b7bc19807c07843993bd3da1827
|
oid sha256:58360dd18866cb41295d98c1d189eba0bc0566c98af59b9510c7127e5eecf39c
|
||||||
size 31248
|
size 32570
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 26 08:24:21 UTC 2012 - saschpe@suse.de
|
||||||
|
|
||||||
|
- Update reserved init script names from LANANA.
|
||||||
|
The current authoritative list is currently found here:
|
||||||
|
http://stewbenedict.org/lsb/lanana/lsbreg/init/init.txt
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 4 10:14:34 UTC 2012 - coolo@suse.com
|
Mon Jun 4 10:14:34 UTC 2012 - coolo@suse.com
|
||||||
|
|
||||||
|
@ -33,9 +33,6 @@ Url: http://gitorious.org/opensuse/post-build-checks
|
|||||||
# make package
|
# make package
|
||||||
#
|
#
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Patch0: new.diff
|
|
||||||
Patch1: strim-whitespace.diff
|
|
||||||
Patch2: ignore-ldso.conf.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -52,9 +49,6 @@ it may not be a good idea to install this to a running system:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# nothing to do
|
# nothing to do
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
Index: post-build-checks-1.0/checks-data/check_gcc_output
|
|
||||||
===================================================================
|
|
||||||
--- post-build-checks-1.0.orig/checks-data/check_gcc_output 2011-10-20 11:57:54.000000000 +0200
|
|
||||||
+++ post-build-checks-1.0/checks-data/check_gcc_output 2012-05-28 10:17:58.937350253 +0200
|
|
||||||
@@ -197,6 +197,7 @@ my $in_build_stage = 0;
|
|
||||||
|
|
||||||
while (<>) {
|
|
||||||
chomp;
|
|
||||||
+ s, +, ,g;
|
|
||||||
next if (m,/usr/include/c\+\+/,);
|
|
||||||
|
|
||||||
$in_build_stage = 1 if (/^Executing\(\%build/);
|
|
Loading…
Reference in New Issue
Block a user