[Bug 226363] Merge Review: redhat-lsb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=226363

--- Comment #54 from xning@xxxxxxxxxx 2012-03-06 00:01:16 EST ---
diff -Naur /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/Constants.pm
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/Constants.pm
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/Constants.pm
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/Constants.pm 2012-03-05
09:11:02.000000000 +0800
@@ -0,0 +1,4 @@
+package Locale::Constants;
+use Locale::Codes::Constants;
+*main::Locale::Constants:: = *main::Locale::Codes::Constants::;
+1
diff -Naur /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/Constants.pod
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/Constants.pod
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/Constants.pod
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/Constants.pod 2012-03-05
09:59:01.000000000 +0800
@@ -0,0 +1,27 @@
+=pod
+
+=head1 NAME
+
+Locale::Constants - constants for Locale codes
+
+=head1 DESCRIPTION
+
+B<Locale::Constants> is an alias of B<Locale::Codes::Constants>.
+B<Locale::Constants> has been replaced by B<Locale::Codes::Constants>.
+The module is supplied just because LSB requires it. Pls
+B<do not> use B<Locale::Constants> in new software.
+For more detail of B<Locale::Constants>, pls reference
B<Locale::Codes::Constants>.
+
+=head1 AUTHOR
+
+This B<Locale::Constants> is created and maintained by Xibo Ning
(xning@xxxxxxxxxx)
+
+=head1 COPYRIGHT
+
+Just the same as Locale::Codes, or GPL+
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+=cut
+
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/lsb-release-2.0/Makefile
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/lsb-release-2.0/Makefile
---
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/lsb-release-2.0/Makefile
2008-04-17 01:50:14.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/lsb-release-2.0/Makefile
2012-02-29 09:46:31.000000000 +0800
@@ -21,6 +21,7 @@
 man: lsb_release.1.gz

 lsb_release.1.gz: lsb_release
+ @chmod u+x help2man lsb_release
  @./help2man -N --include ./lsb_release.examples
--alt_version_key=program_version ./lsb_release >lsb_release.1
  @gzip -9f lsb_release.1

diff -Naur /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/README
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/README
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/README
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/README 2012-02-29
18:44:09.000000000 +0800
@@ -0,0 +1,43 @@
+* Two Databases
+** LSB db
+   o Mysql database
+   o How to create LSB db? pls reference:
+     https://wiki.linuxfoundation.org/en/SpecDatabaseUsage
+   o Table names and table schemata, pls reference:
+     https://wiki.linuxfoundation.org/en/SpecDatabaseSchema
+     https://wiki.linuxfoundation.org/en/LSB_Elements_Schema
+   o we can query LSB db to get commands and libraries of a submodule
+
+** db from yum repo
+   o SQLite database, command sqlite3 works well
+   o we need package.sqlite and filelists.sqlite. You can download
+     them from one of Fedora mirror servers. Pls reference:
+     http://mirrors.fedoraproject.org/publiclist/
+   o from filelists.sqlite, we can get package id by a command name
+     or library .so name
+   o we can get package name, version, group, provides, etc. from
+     primary.sqlite by package id.
+
+** put the two database together
+   we get a command name or library .so name, then we ask
+   filelists.sqlite and primary.sqlite to get the package
+   name.
+
+* Two Tools
+  o Tools in 'specdb' directory work with LSB database.
+    These tools source config file 'specdb/control'
+  o Tools in 'repodb' directory work with repo database
+  o Pls reference '-h' or '--help' option of commands
+  o repodb tools output results on stdout in one line if
+    find a match package, others output the command or library
+    name to stderr. So, it's easy to process the command
+    output. 
+  o repodb tools always output more packages, you need manually
+    remove the unwanted one.
+
+* Why Not Generate Dependencies automatically?
+  o LSB has more and more submodules
+  o we need support more than one architectures
+  o generating dependencies automatically, make spec file full of 'ifarch',
+    and we will get a long and complicated spec file.
+  o generating dependencies manually is not difficult 
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/repodb/pl2pkg.pl
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/repodb/pl2pkg.pl
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/repodb/pl2pkg.pl
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/repodb/pl2pkg.pl
2012-02-29 17:35:02.000000000 +0800
@@ -0,0 +1,139 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use feature qw(say);
+use Getopt::Long;
+use DBI;
+
+use Cwd qw(abs_path getcwd);
+use File::Basename;
+use File::Temp qw(tempdir);
+use Config::IniFiles;
+
+#set up autoflush
+$| = 1;
+$ENV{LANG} = 'C';
+
+sub usage;
+sub clean_when_exit;
+sub when_get_SIGINT;
+
+my $default_SIGINT_func = $SIG{INT};
+$SIG{INT} = \&when_get_SIGINT;
+
+my ( $help, $like ) = qw( 0 0 );
+my ( $sucess, $failed, ) = qw( 0 1 );
+my ( $dbh, ) =qw();
+my ( $db_source, %attr );
+my ( $filelist, $pkg, ) = ( '', '', );
+my $st = '';
+my ( $rf_pkg, ) = ( '', '', );
+my $pkg_found = 0;
+
+GetOptions(
+    'help'       => \$help,
+    'like'       => \$like,
+    'pkg=s'      => \$pkg,
+    'filelist=s' => \$filelist,
+    
+);
+
+%attr = (
+    RaiseError => 1,
+    AutoCommit => 1,
+    PrintError => 1,
+);
+
+if ($help) {
+    usage;
+    goto EXIT;
+}
+
+if ( -e $pkg && -r $pkg ) {
+    $db_source = 'dbi:SQLite:' . $pkg;
+    $dbh = DBI->connect( $db_source, '', '', \%attr )
+ or die "Failed to connect $pkg: $!";
+    if ( !defined( $dbh ) ) {
+ say STDERR 'Failed to connect ' . $pkg . ': $!';
+ goto FAILED;
+    }
+}
+else {
+    say STDERR "$pkg: can not be open";
+    goto FAILED;
+}
+
+foreach my $pp (@ARGV) { 
+    $pkg_found = 0;
+    my ( $pkg, $pkgKey, $provides ) = qw();
+    $st = '';
+    $st .= 'select provides.name, provides.pkgKey, ';
+    $st .= 'packages.name ';
+    $st .= 'from provides ';
+    $st .= 'left join packages ';
+    $st .= 'where provides.pkgKey = packages.pkgKey ';
+    $st .= 'and ( ';
+    if ($like) {
+    $st .= 'provides.name like ' . "'%$pp%' ";
+    } else {
+    $st .= 'provides.name = ' . "'$pp' ";
+    }
+    $st .= ' ) ';
+    $rf_pkg = $dbh->selectall_arrayref($st);
+    foreach my $row (@$rf_pkg) {
+ $pkg_found = 1;
+ $provides=$row->[0];
+ $pkgKey=$row->[1];
+ $pkg=$row->[2];
+ if ($like) {
+     say $pkg . ' - ' . $pkgKey . ' - ' . $pp . ' - ' . $provides;
+ } else {
+     say $pkg . ' - ' . $pkgKey . ' - ' . $provides;
+ }
+    }
+    say STDERR $pp if (!$pkg_found);
+}
+
+EXIT:
+clean_when_exit;
+exit $sucess;
+FAILED:
+clean_when_exit;
+exit $failed;
+
+sub clean_when_exit {
+        $dbh->disconnect if ( defined( $dbh ) );
+}
+
+sub when_get_SIGINT {
+    clean_when_exit;
+    $SIG{INT} = \&$default_SIGINT_func;
+    &$default_SIGINT_func;
+    goto FAILED;
+}
+
+sub usage {
+    say <<'EOF'
+USAGE
+     pl2pkg.pl --pkg db provides
+
+DESCRIPTION
+  pl2pkg output format as follows:
+  when enable --like:
+    pkg - pkgKey - pp -- provides
+  when disable --like:
+    pkg - pkgKey - provides
+
+OPTIONS
+    --help               => display this help page 
+    --like               => use 'like' replace of '=' in sql
+    --pkg pkg            => give the repo package database
+
+EXAMPLE
+   ./pl2pkg.pl --pkg primary.sqlite ls bash
+   ./pl2pkg.pl --pkg primary.sqlite 'Perl(strict)' 'Perl(warnings)'
+
+REPORT BUG
+Pls report bugs to xning@xxxxxxxxxx.
+EOF
+}
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/repodb/pp2pkg.pl
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/repodb/pp2pkg.pl
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/repodb/pp2pkg.pl
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/repodb/pp2pkg.pl
2012-02-29 17:36:11.000000000 +0800
@@ -0,0 +1,180 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use feature qw(say);
+use Getopt::Long;
+use DBI;
+
+use Cwd qw(abs_path getcwd);
+use File::Basename;
+use File::Temp qw(tempdir);
+use Config::IniFiles;
+
+#set up autoflush
+$| = 1;
+$ENV{LANG} = 'C';
+
+sub usage;
+sub clean_when_exit;
+sub when_get_SIGINT;
+
+my $default_SIGINT_func = $SIG{INT};
+$SIG{INT} = \&when_get_SIGINT;
+
+my ($help) = 0;
+my ( $sucess, $failed, ) = qw( 0 1 );
+my ( @dbh, @db );
+my ( $db_source, %attr );
+my ( $filelist, $pkg, ) = ( '', '', );
+my ( $pkgKey, ) = ( '', );
+
+GetOptions(
+    'help'       => \$help,
+    'pkg=s'      => \$pkg,
+    'filelist=s' => \$filelist,
+);
+
+$db[0] = $filelist;
+$db[1] = $pkg;
+
+%attr = (
+    RaiseError => 1,
+    AutoCommit => 1,
+    PrintError => 1,
+);
+
+if ($help) {
+    usage;
+    goto EXIT;
+}
+
+foreach ( 0 .. $#db ) {
+    if ( -e $db[$_] ) {
+        if ( -f $db[$_] and -r $db[$_] ) {
+            $db_source = 'dbi:SQLite:' . $db[$_];
+            $dbh[$_] = DBI->connect( $db_source, '', '', \%attr )
+              or die "Failed to connect $db[$_]: $!";
+            goto FAILED if ( !defined( $dbh[$_] ) );
+        }
+        else {
+            say STDERR "$db[$_]: can not be open";
+            goto FAILED;
+        }
+    }
+    else {
+        say STDERR "filelist db do not exists" if ( $_ == 0 );
+        say STDERR "pkg db do not exists"      if ( $_ == 1 );
+        goto FAILED;
+    }
+}
+
+foreach my $n (@ARGV) {
+    my $statement = '';
+    my ( $rf_file, $rf_pkg ) = qw();
+    my ( $pkg, $pkg_grp, $pkgKey, $dir, @files, @types, ) = qw();
+    my ( $n_dir, $n_file) = qw();
+    my $pkg_found = 0;
+    $n_dir=dirname $n;
+    $n_file=basename $n;
+    $statement .= 'select filelist.pkgKey, filelist.dirname, ';
+    $statement .= 'filelist.filenames, filelist.filetypes ';
+    $statement .= 'from filelist ';
+    $statement .= 'where ';
+    $statement .= '(  filenames = "' . $n_file . '" ';
+    $statement .= 'or filenames like "' . $n_file . '/%" ';
+    $statement .= 'or filenames like "%/' . $n_file . '/%" ';
+    $statement .= 'or filenames like "%/' . $n_file . '") ';
+    if ($n_dir =~ m!^/!mx) {
+ $statement .= 'and filelist.dirname = "' . $n_dir . '" ';
+    }
+#    say $statement;
+    $rf_file = $dbh[0]->selectall_arrayref($statement)
+      or die "failed to execute \"$statement\": $!";
+#    say 'partial path name: ' . $n;
+    foreach my $row (@$rf_file) {
+        $pkgKey = $row->[0];
+        $dir    = $row->[1];
+        @files  = split m!/!, $row->[2];
+        @types  = split m!!, $row->[3];
+        $files[ $#files + 1 ] = '' if ( $row->[2] =~ m!/$!mx );
+
+        if ( $#files == $#types ) {
+            foreach my $inx ( 0 .. $#files ) {
+  next if ($types[$inx] eq 'd');
+  if ($files[$inx] eq $n_file) {
+      $pkg_found = 1 if ( !$pkg_found  );
+      $statement = '';
+      $statement .= 'select packages.pkgKey, packages.name, ';
+      $statement .= 'packages.rpm_group, packages.rpm_packager ';
+      $statement .= 'from packages ';
+      $statement .= 'where packages.pkgKey = ' . $pkgKey . ' ';
+      $statement .= '';
+      $rf_pkg = $dbh[1]->selectall_arrayref($statement)
+   or die "failed to execute \"$statement\": $!";
+      if ( ( scalar @$rf_pkg ) != 1 ) {
+   say STDERR $pkgKey
+       . ': more than one packages have this id';
+   goto FAILED;
+      }
+      $pkg = $rf_pkg->[0]->[1];
+      $pkg_grp = $rf_pkg->[0]->[2];
+      say '"' . $pkg_grp . '"'  . ' - ' . $pkg . ' - '
+   . $types[$inx] . ' - '
+   . $dir . '/'
+   . $files[$inx] . ' - ' . ${n};
+  }
+     }
+ }
+ else {
+     my $errstr = 'pkgKey ' . $pkgKey;
+     $errstr .= ': files and types not one-to-one: ';
+     $errstr .= $#files . ' - ' . $#types;
+     say STDERR $errstr;
+     goto FAILED;
+ }
+    }
+    say STDERR $n if (!$pkg_found);
+    next;
+}
+
+EXIT:
+clean_when_exit;
+exit $sucess;
+FAILED:
+clean_when_exit;
+exit $failed;
+
+sub clean_when_exit {
+    for ( 0 .. $#db ) {
+        $dbh[$_]->disconnect if ( defined( $dbh[$_] ) );
+    }
+}
+
+sub when_get_SIGINT {
+    clean_when_exit;
+    $SIG{INT} = \&$default_SIGINT_func;
+    &$default_SIGINT_func;
+    goto FAILED;
+}
+
+sub usage {
+    say <<'EOF'
+USAGE
+     pp2pkg.pl --pkg pkg --filelist filelist ppname
+
+DESCRIPTION
+  pp2pkg.pl output format as follows:
+   rpm group - package name - file type - match file - ppname
+
+OPTIONS
+    --help               => display this help page 
+    --pkg pkg            => give the repo package database
+    --filelist filelist  => give the repo filelist database
+
+EXAMPLE
+  ./pp2pkg --pkg primary.sqlite --filelist filelists.sqlite ls cmp
+
+REPORT BUG
+Pls report bugs to xning@xxxxxxxxxx.
+EOF
+}
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/control
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/control
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/control
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/control
2012-02-29 18:46:40.000000000 +0800
@@ -0,0 +1,8 @@
+#mysql settings
+lsbdbhost=localhost
+lsbdbport=3306
+lsbdbuser=lsbadmin
+lsbdbpassword=redhat-lsb
+lsbdb=lsb
+mysql_cmd="mysql --host ${lsbdbhost} --port ${lsbdbport} --user ${lsbdbuser} \
+-D ${lsbdb} --password=${lsbdbpassword} --batch -N -e"
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkarch
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkarch
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkarch
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkarch 2012-02-29
16:31:29.000000000 +0800
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+cd $(dirname $0)
+
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0)
+EOF
+}
+if [ $# -eq 0 ];then
+    lsbdb='
+select Aname from Architecture order by Aname
+'
+    ${mysql_cmd} "${lsbdb}"
+    exit 0
+else
+    usage
+    exit 1
+fi
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkcmd
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkcmd
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkcmd
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkcmd 2012-03-05
10:23:03.000000000 +0800
@@ -0,0 +1,87 @@
+#!/bin/bash
+
+cd $(dirname $0)
+. control
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0) -h
+     $(basename $0) --help
+     $(basename $0) submod lsbver
+EOF
+}
+
+if [ $# -eq 0 -o $# -eq 1 ];then
+    usage
+    exit 1
+elif [ $# -eq 2 ];then
+    submod=$1
+    lsbver=$2
+    select_st='
+select cmd from
+(
+(
+select SMname, Cname as cmd, Ccandidatefor,
+Cdeprecatedsince, SMCappearedin, SMCwithdrawnin
+from Command
+left join SModCmd on Cid = SMCcid
+left join SubModule on SMCsmid = SMid
+where SMname is not NULL
+and Cpath is NULL
+and ( Cbuiltin is NULL or strcmp (Cbuiltin, "No") = 0 )
+)
+union
+(
+select "LSB_Others" as SMname, Cname as cmd, Ccandidatefor,
+Cdeprecatedsince, SMCappearedin, SMCwithdrawnin
+from Command
+left join SModCmd on Cid = SMCcid
+left join SubModule on SMCsmid = SMid
+where SMname is NULL
+and Cpath is NULL
+and ( Cbuiltin is NULL or strcmp (Cbuiltin, "No") = 0 )
+)
+union
+(
+select SMname, Cpath as cmd, Ccandidatefor,
+Cdeprecatedsince, SMCappearedin, SMCwithdrawnin
+from Command
+left join SModCmd on Cid = SMCcid
+left join SubModule on SMCsmid = SMid
+where SMname is not NULL
+and Cpath is not NULL
+and ( Cbuiltin is NULL or strcmp (Cbuiltin, "No") = 0 )
+)
+union
+(
+select "LSB_Others" as SMname, Cpath as cmd, Ccandidatefor,
+Cdeprecatedsince, SMCappearedin, SMCwithdrawnin
+from Command
+left join SModCmd on Cid = SMCcid
+left join SubModule on SMCsmid = SMid
+where SMname is NULL
+and Cpath is not NULL
+and ( Cbuiltin is NULL or strcmp (Cbuiltin, "No") = 0 )
+)
+) as ModCmd
+where 1 = 1
+'
+    where_st="
+and ( strcmp (SMname, '${submod}' ) = 0 )
+and (  Ccandidatefor is NULL
+    or Ccandidatefor <= $lsbver 
+    or strcmp ( Ccandidatefor, 'Unknown' ) != 0 )
+and (   SMCappearedin is not NULL
+    and strcmp ( SMCappearedin, '' ) != 0 
+    and SMCappearedin <= $lsbver )
+and (  SMCwithdrawnin is NULL
+    or  SMCwithdrawnin > $lsbver )
+order by SMname,cmd
+"
+    ${mysql_cmd} "${select_st} ${where_st}"
+    exit 0
+else
+    echo 'too many options' >&2
+    usage
+    exit 1
+fi
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkheader
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkheader
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkheader
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkheader
2012-02-29 16:31:29.000000000 +0800
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+cd $(dirname $0)
+
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0) lsbver
+     $(basename $0) -h
+     $(basename $0) --help
+EOF
+}
+
+if [ $# -eq 0 ];then
+    usage
+    exit 1
+elif [ $# -eq 1 ];then
+    if [ "$1" = "-h" -o "$1" = "--help" ];then
+ usage
+ exit 1
+    fi
+    lsbver=$1
+    select_st='
+select Hname from
+(
+select Hname, Hcandidatefor,
+Happearedin, Hwithdrawnin
+from Header
+) as header
+where 1 = 1
+'
+where_st="
+and (  Hcandidatefor is NULL
+    or Hcandidatefor <= $lsbver 
+    or strcmp ( Hcandidatefor, 'Unknown' ) != 0 )
+and (   Happearedin is not NULL
+    and strcmp ( Happearedin, '' )
+    and Happearedin <= $lsbver )
+and (  Hwithdrawnin is NULL
+    or Hwithdrawnin > $lsbver )
+order by Hname
+"
+
+${mysql_cmd} "${select_st} ${where_st}"
+    exit 0
+else
+    echo 'error: too many options' >&2
+    usage
+    exit 1
+fi
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkil
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkil
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkil
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkil 2012-02-29
16:31:29.000000000 +0800
@@ -0,0 +1,33 @@
+#!/bin/bash
+#Interpreted Language
+
+cd $(dirname $0)
+
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0) -h
+     $(basename $0) --help
+     $(basename $0) lsbver
+EOF
+}
+
+if [ $# -eq 0 -o $# -gt 1 -o "$1" = '-h' -o "$1" = '--help' ];then
+    usage
+    exit 1
+fi 
+
+lsbver=$1
+select_stm='
+select ILname from InterpretedLanguage
+'
+where_stm="
+where (   ILappearedin is not NULL
+      and strcmp ( ILappearedin, '' ) != 0
+      and ILappearedin <= ${lsbver} )
+and (  ILwithdrawnin is NULL
+    or ILwithdrawnin > ${lsbver} )
+"
+${mysql_cmd} "${select_stm} ${where_stm}"
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkilm
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkilm
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkilm
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkilm 2012-03-05
10:32:58.000000000 +0800
@@ -0,0 +1,48 @@
+#!/bin/bash
+#Interpreted Language Module
+
+cd $(dirname $0)
+
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0) -h
+     $(basename $0) --help
+     $(basename $0) interpretedlang lsbver
+EOF
+}
+
+if [ $# -ge 3 ];then
+    echo 'error: too many options' >&2 
+    usage
+    exit 1
+elif [ "$1" = '-h' -o "$1" = '--help' -o $# -eq 0 ];then
+    usage
+    exit 1
+fi
+interpretedlang=$1
+lsbver=$2
+
+select_stm='select ILMname, ILMversion
+from InterpretedLanguageModule
+left join InterpretedLanguage on ILMlanguage = ILid
+'
+
+where_stm="
+where 
+strcmp ( ILname, '${interpretedlang}' ) = 0
+and (   ILMappearedin is not NULL
+    and strcmp ( ILMappearedin, '' ) != 0
+    and ILMappearedin <= ${lsbver} )
+and (  ILMwithdrawnin is NULL
+    or ILMwithdrawnin > ${lsbver} )
+and (   ILappearedin is not NULL
+    and strcmp ( ILappearedin, '' )
+    and ILappearedin <= ${lsbver} )
+and (  ILwithdrawnin is NULL
+    or ILwithdrawnin > ${lsbver} )
+"
+#echo "${select_stm} ${where_stm}"
+${mysql_cmd} "${select_stm} ${where_stm}"
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mklib
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mklib
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mklib
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mklib 2012-03-05
10:31:08.000000000 +0800
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+cd $(dirname $0)
+
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0) -h
+     $(basename $0) --help
+     $(basename $0) arch submod lsbver
+EOF
+}
+if [ $# -eq 0 -o $# -eq 2 ];then
+    usage
+    exit 1
+elif [ $# -eq 1 ];then
+    if [ $1 = '-h' -o $1 = '--help' ];then
+ usage
+ exit 1
+    else
+ echo "$1: wrong option" >&2
+ exit 1
+    fi
+elif [ $# -eq 3 ];then
+    arch=$1
+    submod=$2
+    lsbver=$3
+    select_st='
+select Lname, ALrunname
+from Library
+left join SModLib on Lid = SMLlid
+left join ArchLib on Lid = ALlid
+left join SubModule on SMLsmid = SMid
+left join Architecture on ALaid = Aid
+where 1 = 1
+'
+    where_st="
+and ( strcmp (Aname, '$arch') = 0 )
+and ( strcmp (SMname, '$submod') = 0 ) 
+and (  Lcandidatefor is NULL
+    or Lcandidatefor <= $lsbver 
+    or strcmp ( Lcandidatefor, 'Unknown' ) != 0 )
+and (   ALappearedin is not NULL
+    and strcmp ( ALappearedin, ''  ) != 0 
+    and ALappearedin <= $lsbver )
+and (  ALwithdrawnin is NULL
+    or ALwithdrawnin > $lsbver )
+and (   SMLappearedin is not NULL
+    and strcmp ( SMLappearedin, ''  ) != 0
+    and SMLappearedin <= $lsbver )
+and (  SMLwithdrawnin is NULL
+    or  SMLwithdrawnin > $lsbver )
+"
+    ${mysql_cmd} "$select_st $where_st"
+    exit 0
+else
+    echo 'too many options' >&2
+    usage
+    exit 1
+fi
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkmod
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkmod
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkmod
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkmod 2012-02-29
16:31:29.000000000 +0800
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+cd $(dirname $0)
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0)
+EOF
+}
+if [ $# -eq 0 ];then
+    select_st='
+select Mname from Module order by Mname
+'
+    ${mysql_cmd} "$select_st"
+    exit 0
+else
+    usage
+    exit 1
+fi
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mksubmod
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mksubmod
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mksubmod
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mksubmod
2012-02-29 16:31:29.000000000 +0800
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+cd $(dirname $0)
+. control
+
+function usage {
+cat <<EOF >&2
+USAGE:
+    $(basename $0) -h
+    $(basename $0) --help
+    $(basename $0)
+    $(basename $0) mod lsbver  
+EOF
+    exit 1
+}
+
+if [ $# -eq 0 ];then
+    select_st='select SMname from SubModule'
+    { ${mysql_cmd} "${select_st}";echo "LSB_Others"; } | sort
+    exit 0
+elif [ $# -eq 1 ];then
+    if [ "$1" = '--help' -o "$1" = '-h' ];then
+ usage
+    else
+ echo "$1: wrong option" 1>&2
+ exit 1
+    fi
+elif [ $# -eq 2 ];then
+    mod=$1
+    lsbver=$2
+    select_st='
+select SMname
+from SubModule
+left join ModSMod on SMid = MSMsmid
+left join Module on MSMmid = Mid
+where 1 = 1
+'
+    where_st="
+and ( strcmp (Mname, '$mod') = 0 )
+and (    SMmandatorysince is not NULL
+     and strcmp ( SMmandatorysince, '' ) != 0
+     and SMmandatorysince <= $lsbver )
+and ( SMdeprecatedsince is NULL or SMdeprecatedsince > $lsbver )
+and ( MSMappearedin is not NULL
+and   strcmp ( MSMappearedin, '' ) != 0
+and   MSMappearedin <= $lsbver )
+and ( MSMwithdrawnin is NULL or MSMwithdrawnin > $lsbver )"
+
+#echo "${select_st} ${where_st}"
+${mysql_cmd} "${select_st} ${where_st}"
+    exit 0
+else
+    echo "wrong: too many options" >&2
+    usage
+    exit 1
+fi
diff -Naur
/home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkver
/home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkver
--- /home/tsllst/Downloads/redhat-lsb-4.0/redhat-lsb-4.0/utils/specdb/mkver
1970-01-01 08:00:00.000000000 +0800
+++ /home/tsllst/rpmbuild/SOURCES/redhat-lsb-4.1/utils/specdb/mkver 2012-02-29
16:31:29.000000000 +0800
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+cd $(dirname $0)
+. control
+
+function usage {
+    cat <<EOF >&2
+USAGE
+     $(basename $0)
+EOF
+}
+if [ $# -eq 0 ];then
+    select_st='
+select LVvalue from LSBVersion order by LVvalue
+'
+${mysql_cmd} "$select_st"
+    exit 0
+else
+    usage
+    exit 1
+fi

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review



[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]