Bug 226363

Summary: Merge Review: redhat-lsb
Product: [Fedora] Fedora Reporter: Nobody's working on this, feel free to take it <nobody>
Component: Package ReviewAssignee: Parag AN(पराग) <panemade>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, herrold, hliu, llim, notting, panemade, petersen, xning
Target Milestone: ---Flags: panemade: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-07 08:59:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Use $RPM_OPT_FLAGS
none
Modified SPEC
none
Partial Modification to SPEC to silent rpmlint messages on SRPM
none
Patch to purge all the errors and warnings given by rpmlint
none
Purge the error and warning messages given by rpmlint
none
Justify why hard-coded lib path is kept
none
Revise the position of comment
none
Revise the comment according to the feedback
none
CVS diff for redhat-lsb.spec none

Description Nobody's working on this, feel free to take it 2007-01-31 20:49:00 UTC
Fedora Merge Review: redhat-lsb

http://cvs.fedora.redhat.com/viewcvs/devel/redhat-lsb/
Initial Owner: llim

Comment 2 Lawrence Lim 2007-02-21 02:10:27 UTC
Patch included in redhat-lsb-3_1-13. Thanks.

Comment 4 Jens Petersen 2007-05-02 02:50:23 UTC
*** Bug 229440 has been marked as a duplicate of this bug. ***

Comment 5 Parag AN(पराग) 2007-05-02 03:45:40 UTC
So as this is Merge-review and not a new package as reported in bug 229440,
there is no need of sponsoring here.
Just a Formal official review and CLOSE this Review Request.

Comment 7 Parag AN(पराग) 2007-05-02 06:55:59 UTC
rpmlint on rpm package reported 
E: redhat-lsb statically-linked-binary /usr/sbin/redhat_lsb_trigger.i386
The package installs a statically linked binary or object file.

Usually this is a packaging bug. If not, contact your rpmlint distributor
about this so that this error gets included in the exception file for rpmlint
and will not be flagged as a packaging bug in the future (or add it to your
local configuration if you installed rpmlint from the source tarball).

E: redhat-lsb only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.

W: redhat-lsb dangling-relative-symlink /lib/ld-lsb.so.3 ld-linux.so.2
The relative symbolic link points nowhere.

W: redhat-lsb dangling-relative-symlink /usr/lib/lsb/remove_initd
../../../sbin/chkconfig
The relative symbolic link points nowhere.

W: redhat-lsb dangling-relative-symlink /bin/mailx mail
The relative symbolic link points nowhere.

E: redhat-lsb zero-length /etc/lsb-release.d/core-3.1-ia32
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/core-3.1-ia32
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

E: redhat-lsb zero-length /etc/lsb-release.d/graphics-3.1-noarch
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-noarch
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

E: redhat-lsb zero-length /etc/lsb-release.d/graphics-3.1-ia32
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-ia32
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

E: redhat-lsb non-readable /usr/sbin/redhat_lsb_trigger.i386 0700
The file can't be read by everybody. If this is expected (for security
reasons), contact your rpmlint distributor to get it added to the list of
exceptions for your distro (or add it to your local configuration if you
installed rpmlint from the source tarball).

E: redhat-lsb non-standard-executable-perm /usr/sbin/redhat_lsb_trigger.i386 0700
A standard executable should have permission set to 0755. If you get this
message, it means that you have a wrong executable permissions in some files
included in your package.

E: redhat-lsb zero-length /etc/lsb-release.d/core-3.1-noarch
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/core-3.1-noarch
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

W: redhat-lsb dangling-relative-symlink /usr/lib/lsb/install_initd
../../../sbin/chkconfig
The relative symbolic link points nowhere.

rpmlint on SRPM reported 
E: redhat-lsb hardcoded-library-path in /usr/lib/lsb/install_initd
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

E: redhat-lsb hardcoded-library-path in /usr/lib/lsb/remove_initd
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

E: redhat-lsb hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

E: redhat-lsb hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/install_initd
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

E: redhat-lsb hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

E: redhat-lsb hardcoded-library-path in /usr/lib/lsb
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

E: redhat-lsb hardcoded-library-path in /lib/lsb
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

W: redhat-lsb macro-in-%changelog endif
Macros are expanded in %changelog too, which can in unfortunate cases lead
to the package not building at all, or other subtle unexpected conditions that
affect the build.  Even when that doesn't happen, the expansion results in
possibly "rewriting history" on subsequent package revisions and generally
odd entries eg. in source rpms, which is rarely wanted.  Avoid use of macros
in %changelog altogether, or use two '%'s to escape them, like '%%foo'.



Comment 8 Parag AN(पराग) 2007-05-02 09:04:50 UTC
Also, I found tarball does not contain any license text file.
SHOULD :
   - Use dist tag (however its not mandatory).
   - Use new buildroot variable.
   - Use macros under %files
   - Add README in %doc


Comment 9 Parag AN(पराग) 2007-05-02 09:07:10 UTC
Created attachment 153923 [details]
Modified SPEC

I did some quick workaround for this SPEC. Still its having some problem as
reported by rpmlint on SRPM

Comment 10 Lawrence Lim 2007-05-03 09:45:04 UTC
Thanks I will have a look and build into the new system. :)

Comment 11 Parag AN(पराग) 2007-07-24 01:27:29 UTC
ping?

Comment 12 Parag AN(पराग) 2007-07-30 06:09:44 UTC
llim,
  Are you current owner for redhat-lsb or you left maintaining this package?
Is this package not so important as no one is responding to my ping here?


Comment 14 Parag AN(पराग) 2007-07-30 07:21:16 UTC
thanks for your reply.

Comment 15 Lawrence Lim 2007-08-10 03:04:04 UTC
Made some changes to the spec file. Let me know if there's any issue. In the
meantime, I will look at some of the symlinks to see if they are legite. Thanks.

http://people.redhat.com/llim/redhat-lsb/3.1-16/redhat-lsb-3.1-16.fc8.src.rpm
http://people.redhat.com/llim/redhat-lsb/3.1-16/redhat-lsb-3.1-16.fc7.x86_64.rpm


Comment 16 Parag AN(पराग) 2007-08-16 02:59:51 UTC
thx for updates
Still I can see rpmlint complaining on SRPM as
W: redhat-lsb invalid-license GPL
The value of the License tag was not recognized.  Known values are:
"AFL", "Affero GPL", "ASL 1.0", "ASL 1.0+", "ASL 1.1", "ASL 1.1+", "ASL 2.0",
"ASL 2.0+", "APSL 2.0", "APSL 2.0+", "Artistic clarified", "Boost", "BSD with
advertising", "BSD", "CeCILL", "CDDL", "CPL", "Condor", "Cryptix", "EPL",
"eCos", "EFL 2.0", "EFL 2.0+", "EU Datagrid", "GPL+", "GPLv2", "GPLv2+",
"GPLv3", "GPLv3+", "IBM", "iMatix", "Intel ACPI", "Interbase", "Jabber",
"LaTeX", "LGPL+", "LGPLv2", "LGPLv2 with exceptions", "LGPLv2+", "LGPLv3",
"LGPLv3+", "LPL", "mecab-ipadic", "MIT", "MPLv1.0", "MPLv1.0+", "MPLv1.1",
"MPLv1.1+", "NCSA", "NGPL", "NOSL", "Netscape", "Nokia", "OpenLDAP", "OSL
1.0", "OSL 1.0+", "OpenSSL", "Phorum", "PHP", "Public Domain", "Python",
"QPL", "RPSL", "Ruby", "Sleepycat", "SMLNJL", "SISSL", "SPL", "Vim", "VNLSL",
"VSL", "W3C", "WTFPL", "wxWindows", "xinetd", "Zend", "ZPLv1.0", "ZPLv1.0+",
"ZPLv2.0", "ZPLv2.0+", "zlib", "CDL", "FBSDDL", "GFDL", "Open Publication",
"CC-BY", "CC-BY-SA", "DSL", "Free Art", "Arphic", "SIL Open Font",
"Redistributable, no modification permitted", "Freely redistributable without
restriction".

E: redhat-lsb hardcoded-library-path in /lib/lsb
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

W: redhat-lsb macro-in-%changelog endif
Macros are expanded in %changelog too, which can in unfortunate cases lead
to the package not building at all, or other subtle unexpected conditions that
affect the build.  Even when that doesn't happen, the expansion results in
possibly "rewriting history" on subsequent package revisions and generally
odd entries eg. in source rpms, which is rarely wanted.  Avoid use of macros
in %changelog altogether, or use two '%'s to escape them, like '%%foo'.

AND rpmlint output on RPM as
W: redhat-lsb dangling-relative-symlink /lib/ld-lsb.so.3 ld-linux.so.2
The relative symbolic link points nowhere.

E: redhat-lsb zero-length /etc/lsb-release.d/core-3.1-ia32
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/core-3.1-ia32
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

E: redhat-lsb non-readable /usr/sbin/redhat_lsb_trigger.i386 0700
The file can't be read by everybody. If this is expected (for security
reasons), contact your rpmlint distributor to get it added to the list of
exceptions for your distro (or add it to your local configuration if you
installed rpmlint from the source tarball).

E: redhat-lsb non-standard-executable-perm /usr/sbin/redhat_lsb_trigger.i386 0700
A standard executable should have permission set to 0755. If you get this
message, it means that you have a wrong executable permissions in some files
included in your package.

E: redhat-lsb zero-length /etc/lsb-release.d/graphics-3.1-noarch
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-noarch
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

E: redhat-lsb zero-length /etc/lsb-release.d/graphics-3.1-ia32
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-ia32
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

W: redhat-lsb dangling-relative-symlink /bin/mailx mail
The relative symbolic link points nowhere.

W: redhat-lsb dangling-relative-symlink /usr/lib/lsb/install_initd
../../../sbin/chkconfig
The relative symbolic link points nowhere.

W: redhat-lsb dangling-relative-symlink /usr/lib/lsb/remove_initd
../../../sbin/chkconfig
The relative symbolic link points nowhere.

E: redhat-lsb zero-length /etc/lsb-release.d/core-3.1-noarch
W: redhat-lsb non-conffile-in-etc /etc/lsb-release.d/core-3.1-noarch
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

W: redhat-lsb invalid-license GPL
The value of the License tag was not recognized.  Known values are:
"AFL", "Affero GPL", "ASL 1.0", "ASL 1.0+", "ASL 1.1", "ASL 1.1+", "ASL 2.0",
"ASL 2.0+", "APSL 2.0", "APSL 2.0+", "Artistic clarified", "Boost", "BSD with
advertising", "BSD", "CeCILL", "CDDL", "CPL", "Condor", "Cryptix", "EPL",
"eCos", "EFL 2.0", "EFL 2.0+", "EU Datagrid", "GPL+", "GPLv2", "GPLv2+",
"GPLv3", "GPLv3+", "IBM", "iMatix", "Intel ACPI", "Interbase", "Jabber",
"LaTeX", "LGPL+", "LGPLv2", "LGPLv2 with exceptions", "LGPLv2+", "LGPLv3",
"LGPLv3+", "LPL", "mecab-ipadic", "MIT", "MPLv1.0", "MPLv1.0+", "MPLv1.1",
"MPLv1.1+", "NCSA", "NGPL", "NOSL", "Netscape", "Nokia", "OpenLDAP", "OSL
1.0", "OSL 1.0+", "OpenSSL", "Phorum", "PHP", "Public Domain", "Python",
"QPL", "RPSL", "Ruby", "Sleepycat", "SMLNJL", "SISSL", "SPL", "Vim", "VNLSL",
"VSL", "W3C", "WTFPL", "wxWindows", "xinetd", "Zend", "ZPLv1.0", "ZPLv1.0+",
"ZPLv2.0", "ZPLv2.0+", "zlib", "CDL", "FBSDDL", "GFDL", "Open Publication",
"CC-BY", "CC-BY-SA", "DSL", "Free Art", "Arphic", "SIL Open Font",
"Redistributable, no modification permitted", "Freely redistributable without
restriction".

E: redhat-lsb statically-linked-binary /usr/sbin/redhat_lsb_trigger.i386
The package installs a statically linked binary or object file.

Usually this is a packaging bug. If not, contact your rpmlint distributor
about this so that this error gets included in the exception file for rpmlint
and will not be flagged as a packaging bug in the future (or add it to your
local configuration if you installed rpmlint from the source tarball).

E: redhat-lsb only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.


Comment 17 Parag AN(पराग) 2007-08-16 04:39:18 UTC
Created attachment 161430 [details]
Partial Modification to SPEC to silent rpmlint messages on SRPM

Comment 18 Lawrence Lim 2007-08-20 03:42:14 UTC
changes made from Comment #15 committed to cvs and redhat-lsb-3.1-16.fc8 has
been built.

Comment 19 Parag AN(पराग) 2007-11-19 06:46:53 UTC
time to review this package again.

First we try to resolve rpmlint messages that are possible for us.

here is rpmlint on redhat-lsb-3.1-19.fc9
redhat-lsb.i386: W: dangling-relative-symlink /lib/ld-lsb.so.3 ld-linux.so.2
The relative symbolic link points nowhere.

redhat-lsb.i386: E: zero-length /etc/lsb-release.d/core-3.1-ia32
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/core-3.1-ia32
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

redhat-lsb.i386: E: non-readable /usr/sbin/redhat_lsb_trigger.i386 0700
The file can't be read by everybody. If this is expected (for security
reasons), contact your rpmlint distributor to get it added to the list of
exceptions for your distro (or add it to your local configuration if you
installed rpmlint from the source tarball).

redhat-lsb.i386: E: non-standard-executable-perm
/usr/sbin/redhat_lsb_trigger.i386 0700
A standard executable should have permission set to 0755. If you get this
message, it means that you have a wrong executable permissions in some files
included in your package.

redhat-lsb.i386: E: zero-length /etc/lsb-release.d/graphics-3.1-noarch
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-noarch
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

redhat-lsb.i386: E: zero-length /etc/lsb-release.d/graphics-3.1-ia32
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-ia32
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

redhat-lsb.i386: W: dangling-relative-symlink /bin/mailx mail
The relative symbolic link points nowhere.

redhat-lsb.i386: W: dangling-relative-symlink /usr/lib/lsb/install_initd
../../../sbin/chkconfig
The relative symbolic link points nowhere.

redhat-lsb.i386: W: dangling-relative-symlink /usr/lib/lsb/remove_initd
../../../sbin/chkconfig
The relative symbolic link points nowhere.

redhat-lsb.i386: E: zero-length /etc/lsb-release.d/core-3.1-noarch
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/core-3.1-noarch
A non-executable file in your package is being installed in /etc, but is not
a configuration file. All non-executable files in /etc should be configuration
files. Mark the file as %config in the spec file.

redhat-lsb.i386: E: statically-linked-binary /usr/sbin/redhat_lsb_trigger.i386
The package installs a statically linked binary or object file.
==>Usually this is a packaging bug. If not, contact your rpmlint distributor
about this so that this error gets included in the exception file for rpmlint
and will not be flagged as a packaging bug in the future (or add it to your
local configuration if you installed rpmlint from the source tarball).

redhat-lsb.i386: E: only-non-binary-in-usr-lib
There are only non binary files in /usr/lib so they should be in /usr/share.

redhat-lsb.src:437: E: hardcoded-library-path in /lib/lsb
A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.
==> is this really needed?

redhat-lsb.src:540: W: macro-in-%changelog endif
Macros are expanded in %changelog too, which can in unfortunate cases lead
to the package not building at all, or other subtle unexpected conditions that
affect the build.  Even when that doesn't happen, the expansion results in
possibly "rewriting history" on subsequent package revisions and generally
odd entries eg. in source rpms, which is rarely wanted.  Avoid use of macros
in %changelog altogether, or use two '%'s to escape them, like '%%foo'.
==> update this in SPEC.


can you please provide your comments on which rpmlint messages can't be resolved
for this package and which can be resolved so that you can update them in SPEC?

Comment 20 Parag AN(पराग) 2008-01-16 07:01:15 UTC
llim,
  Can you please fix rpmlint messages above in CVS? Please leave any issue that
is needed for this package and can't be fixed.

This review has already taken much time so if I will not get any update within
one week I prefer to move away from this review.


Comment 21 Hao Liu 2008-06-27 05:53:27 UTC
This is a pre-review for convincing one of the sponsors of approving my application:

  I ran rpmlint against SRPM of the latest redhat-lsb, and I got following
errors and warnings:
  
  E: hardcoded-library-path in /usr/lib/lsb/install_initd
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  E: hardcoded-library-path in /usr/lib/lsb/remove_initd
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/install_initd
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  E: hardcoded-library-path in /usr/lib/lsb
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  E: hardcoded-library-path in /lib/lsb
  A library path is hardcoded to one of the following paths: /lib,
/usr/lib. It should be replaced by something like /%{_lib} or %{_libdir}.

  W: macro-in-%changelog endif
  Macros are expanded in %changelog too, which can in unfortunate cases lead
to the package not building at all, or other subtle unexpected conditions that
affect the build.  Even when that doesn't happen, the expansion results in
possibly "rewriting history" on subsequent package revisions and generally
odd entries eg. in source rpms, which is rarely wanted.  Avoid use of macros
in %changelog altogether, or use two '%'s to escape them, like '%%foo'.

  W: invalid-license GPL
  The value of the License tag was not recognized.  Known values are:
"AFL", "Affero GPL", "ASL 1.0", "ASL 1.0+", "ASL 1.1", "ASL 1.1+", "ASL 2.0",
"ASL 2.0+", "APSL 2.0", "APSL 2.0+", "Artistic clarified", "Boost", "BSD with
advertising", "BSD", "CeCILL", "CDDL", "CPL", "Condor", "Cryptix", "EPL",
"eCos", "EFL 2.0", "EFL 2.0+", "EU Datagrid", "GPL+", "GPLv2", "GPLv2+",
"GPLv3", "GPLv3+", "IBM", "iMatix", "Intel ACPI", "Interbase", "Jabber",
"LaTeX", "LGPL+", "LGPLv2", "LGPLv2 with exceptions", "LGPLv2+", "LGPLv3",
"LGPLv3+", "LPL", "mecab-ipadic", "MIT", "MPLv1.0", "MPLv1.0+", "MPLv1.1",
"MPLv1.1+", "NCSA", "NGPL", "NOSL", "Netscape", "Nokia", "OpenLDAP", "OSL
1.0", "OSL 1.0+", "OpenSSL", "Phorum", "PHP", "Public Domain", "Python",
"QPL", "RPSL", "Ruby", "Sleepycat", "SMLNJL", "SISSL", "SPL", "Vim", "VNLSL",
"VSL", "W3C", "WTFPL", "wxWindows", "xinetd", "Zend", "ZPLv1.0", "ZPLv1.0+",
"ZPLv2.0", "ZPLv2.0+", "zlib", "CDL", "FBSDDL", "GFDL", "Open Publication",
"CC-BY", "CC-BY-SA", "DSL", "Free Art", "Arphic", "SIL Open Font",
"Redistributable, no modification permitted", "Freely redistributable without
restriction".



Comment 22 Hao Liu 2008-06-27 09:03:13 UTC
Created attachment 310415 [details]
Patch to purge all the errors and warnings given by rpmlint

This's the patch used to purge all the errors and warnings given by rpmlint:
  Errors: hardcoded lib path
  Warnings: 
   1. macro-in-%changelog endif
   2. invalid-license GPL

Comment 23 Jens Petersen 2008-07-03 08:28:59 UTC
-License: GPL
+License: GPLv2

You are sure it is GPLv2 and not GPLv2+?

-Requires: /usr/lib/lsb/install_initd
-Requires: /usr/lib/lsb/remove_initd
+Requires: %{_libdir}/lsb/install_initd
+Requires: %{_libdir}/lsb/remove_initd

Why is redhat-lsb requiring it's own files?

-         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \
+         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT%{_libdir}/lsb \
:
-ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT/usr/lib/lsb/install_initd
-ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
+ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT%{_libdir}/lsb/install_initd
+ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT%{_libdir}/lsb/remove_initd
:
-/usr/lib/lsb
-/lib/lsb
+%{_libdir}/lsb
+/%{_lib}/lsb

I don't think /usr/lib/lsb and /lib/lsb should be changed to
%{_libdir}/lsb and %{_lib}/lsb.  I guess they are intentional.


 * Fri Jan 21 2005 Leon Ho <llch> 1.3-7
 - Add to support multiple LSB test suite version
-- Add %endif in trigger postun
+- Add endif in trigger postun

Good

Comment 24 Hao Liu 2008-07-04 01:39:44 UTC
Reply to Comment #23:

1. Yes, after reconfirmation with llim, it's GPLv2.

2. I don't think it's redhat-lsb requiring its own files, redhat-lsb and lsb are
2 different packages. For example, redhat-lsb may delegate the database querying
job to lsb to find out the dependencies.

3. I'd like to know why the path is intentionally hard-coded. 

Comment 25 Jens Petersen 2008-07-04 07:42:46 UTC
(In reply to comment #24)
> 1. Yes, after reconfirmation with llim, it's GPLv2.

I think you need to go through the source files and audit more carefully.
Some are clearly GPLv2+ and a few LGPL.

> 2. I don't think it's redhat-lsb requiring its own files, redhat-lsb and lsb are
> 2 different packages. For example, redhat-lsb may delegate the database querying
> job to lsb to find out the dependencies.

% repoquery -q --whatprovides /usr/lib/lsb/install_initd
redhat-lsb-0:3.1-19.fc8.i386
% repoquery -q --whatprovides /usr/lib/lsb/remove_initd
redhat-lsb-0:3.1-19.fc8.i386
% rpm -qlp redhat-lsb-3.1-19.fc8.i386.rpm| grep _initd
/usr/lib/lsb/install_initd
/usr/lib/lsb/remove_initd

> 3. I'd like to know why the path is intentionally hard-coded. 

Because the directory name should be lib and not lib64 even on 64bit machines I
guess.

Comment 26 Hao Liu 2008-07-07 08:19:45 UTC
Created attachment 311133 [details]
Purge the error and warning messages given by rpmlint

1. Modify the Licence info

2. Remove the lines may cause requiring self problem

3. Remove the hard-coded problem

Comment 27 Jens Petersen 2008-07-11 02:17:05 UTC
-License: GPL
+License: GPLv2 and GPLv2+ and LGPLv2

Good


-Requires: /usr/lib/lsb/install_initd
-Requires: /usr/lib/lsb/remove_initd

Thanks

 mkdir -p $RPM_BUILD_ROOT/etc $RPM_BUILD_ROOT/%{_lib} $RPM_BUILD_ROOT/%{_mandir} \
-         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \
+         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT%{_libdir}/lsb \
:
-ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT/usr/lib/lsb/install_initd
-ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
+ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT%{_libdir}/lsb/install_initd
+ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT%{_libdir}/lsb/remove_initd

As I said before I think this package is intentionally using /usr/lib rather
than _libdir.
Could you please check this point?

Comment 28 Jens Petersen 2008-07-11 02:19:48 UTC
It would be good to add a comment explaining why /usr/lib is being used though,
if it is correct.

Comment 29 Hao Liu 2008-07-11 02:53:05 UTC
Created attachment 311542 [details]
Justify why hard-coded lib path is kept

1. Justify why hard-coded lib path is kept
2. Purge warnings and errors given out by rpmlint

Comment 30 Hao Liu 2008-07-11 02:54:20 UTC
The hard-coded lib path is kept because even if on a 64 bit operating system,
lsb should locate in /usr/lib but /usr/lib64.

Comment 31 Jens Petersen 2008-07-11 05:54:53 UTC
s/but/not/

-         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \
+         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \ #lsb should
locate in /usr/lib but /usr/lib64 even on a 64bit operating system

I think you better add the comment above: you can't have it in the middle of a
command.

Comment 32 Mamoru TASAKA 2008-07-11 06:26:48 UTC
Slightly offtopic:

-         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \
+         $RPM_BUILD_ROOT/%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \ #lsb should
locate in /usr/lib but /usr/lib64 even on a 64bit operating system

Well, rpmbuild seems to handle this, however when someone writes some comments
with sharp
alter backslash on a shell script, it usually causes an unexpected behavior.
rpmbuild seems to delete such comments after backslash "as expected", however is
this a
documented behavior? Personally I would not write any comments after backslash.


Comment 33 Hao Liu 2008-07-11 06:57:42 UTC
Created attachment 311552 [details]
Revise the position of comment

Move the comment after the slash out of the block

Comment 34 Jens Petersen 2008-07-18 09:20:02 UTC
Sorry, better to write the comment as:

# LSB uses /usr/lib rather than /usr/lib64 even for 64bit OS

But do you have a reference for LSB using /usr/lib on x86_64 etc?

Comment 35 Jens Petersen 2008-07-18 10:04:03 UTC
Ok I found the change was introduced in:

cvs diff -r redhat-lsb-3_1-15_f8 -r redhat-lsb-3_1-16_fc8

which is comment 18.

So I think the reversion in comment 33 is correct.  But you can still change the
wording as
comment 34.  I'll continue the review next week: but if you want to you can look
through:
http://fedoraproject.org/wiki/Packaging/ReviewGuidelines to check for any other
potential
problems.


Comment 36 Hao Liu 2008-07-18 10:11:55 UTC
Created attachment 312117 [details]
Revise the comment according to the feedback

Revise the comment according to the feedbace, the comment explains why the
hard-coded path is kept.

Comment 37 Hao Liu 2008-07-31 07:31:58 UTC
Created attachment 313075 [details]
CVS diff for redhat-lsb.spec

it's a cvs diff file generated for bug review.

Comment 38 Lawrence Lim 2008-07-31 07:39:06 UTC
Comment on attachment 313075 [details]
CVS diff for redhat-lsb.spec

pls select the MIME type manually.

Comment 39 Jens Petersen 2008-08-06 05:41:06 UTC
There really needs to be a license file added to the top directory.

License header in longer source files would be desirable too, specially C code.

Some comments on the latest patch:

-%define srcrelease 5
+%define srcrelease 4

Please use 3.1.x for future releases

-Version: 3.1
+Version: 3.2

Is there a new upstream??

+Release: 1.f9

You must use "1%{?dist}".

-License: GPLv2
+License: GPLv2 and GPLv2+ and LGPLv2

Not sure where this came from earlier...

-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot: %{_tmppath}/%{name}-root

No!

 # dependency for primary LSB application for v1.3
 Provides: lsb = %{version}
 # dependency for primary LSB application for v2.0 and v3.0
@@ -93,120 +91,290 @@ ExclusiveArch: i386 ia64 x86_64 ppc ppc6
 
 %ifarch %{ix86}
 # archLSB IA32 Base Libraries
-Requires: libz.so.1
-Requires: libutil.so.1
-Requires: libpthread.so.0
-Requires: libncurses.so.5
-Requires: libm.so.6
-Requires: libgcc_s.so.1
-Requires: libdl.so.2
-Requires: libcrypt.so.1
+Requires: libatk-1.0.so.0
 Requires: libc.so.6
+Requires: libcrypt.so.1
+Requires: libdl.so.2
+Requires: libgcc_s.so.1
+Requires: libgdk-x11-2.0.so.0
+Requires: libgdk_pixbuf-2.0.so.0
+Requires: libgdk_pixbuf_xlib-2.0.so.0
+Requires: libglib-2.0.so.0
+Requires: libgmodule-2.0.so.0
+Requires: libgobject-2.0.so.0
+Requires: libgthread-2.0.so.0
+Requires: libgtk-x11-2.0.so.0
+Requires: libm.so.6
+Requires: libncurses.so.5
+Requires: libpango-1.0.so.0
+Requires: libpangoft2-1.0.so.0
+Requires: libpangoxft-1.0.so.0
+Requires: libpthread.so.0
+Requires: libqt-mt.so.3
+Requires: libQtCore.so.4
+Requires: libQtGui.so.4
+Requires: libQtNetwork.so.4
+Requires: libQtOpenGL.so.4
+Requires: libQtSql.so.4
+Requires: libQtSvg.so.4
+Requires: libQtXml.so.4
 Requires: libstdc++.so.6
+Requires: libutil.so.1
+Requires: libz.so.1

Lot of changes?

-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/core-3.1-%{archname}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/core-3.1-noarch
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/graphics-3.1-%{archname}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/graphics-3.1-noarch
+touch $RPM_BUILD_ROOT/etc/lsb-release.d/core-3.2-%{archname}
+touch $RPM_BUILD_ROOT/etc/lsb-release.d/core-3.2-noarch
+touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-3.2-%{archname}
+touch $RPM_BUILD_ROOT/etc/lsb-release.d/desktop-3.2-noarch

Please use %{_sysconfdir}.
 
-  $RPM_BUILD_ROOT%{_sbindir}/redhat_lsb_trigger.%{_target_cpu}
+  $RPM_BUILD_ROOT/usr/sbin/redhat_lsb_trigger.%{_target_cpu}

Why?
 
+#/usr/X11R6/lib/X11/fonts
+#/usr/X11R6/lib/X11/rgb.txt

Please drop lines.

 %defattr(-,root,root)
-%doc README

Why?

-%{_sysconfdir}/redhat-lsb
-%dir %{_sysconfdir}/lsb-release.d
-%{_sysconfdir}/lsb-release.d/*
+/etc/redhat-lsb
+#%config /etc/lsb-release
+#/etc/redhat-lsb
+%dir /etc/lsb-release.d
+/etc/lsb-release.d/*

No!

+#%dir /usr/X11R6/lib/X11/xserver
+#/usr/X11R6/lib/X11/xserver/*

Again

-#/bin/mailx
+/bin/mailx

No!

-%{_sbindir}/redhat_lsb_trigger.%{_target_cpu}
+/usr/sbin/redhat_lsb_trigger.%{_target_cpu}

No

+#/usr/X11R6/lib/X11/xserver/SecurityPolicy
+#/usr/X11R6/lib/X11/fonts
+#/usr/X11R6/lib/X11/rgb.txt

Ditto

 %changelog
-* Thu Jul 31 2009 Lawrence Lim <llim> - 3.1-21
-- remove symlink for mailx (Bug #457241)
-
-* Tue Feb 19 2008 Fedora Release Engineering <rel-eng> - 3.1-20
-- Autorebuild for GCC 4.3
-
-* Wed Oct 3 2007 Lawrence Lim <llim> - 3.1-19
-- fix build issue on ppc - (.opd+0x10): multiple definition of `__libc_start_main'

It is not considered good to remove old changelog entries - please leave them.

+* Wed Apr 16 2008 Mats Wichmann <mats> 3.2-1
+- port forward to LSB 3.2

You can put it in your name, I think.
 
-* Fri Sep 21 2007 Lawrence Lim <llim> - 3.1-18
-- fix build issue in minimal build root (Bug #265241)
-
-* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 3.1-17
-- Rebuild for selinux ppc32 issue.
-
-* Fri Aug 20 2007 Lawrence Lim <llim> - 3.1-16
-- update spec file in accordance to feedback provided through merge review - merge-review.patch - #226363
-
-* Wed Jul 18 2007 Lawrence Lim <llim> - 3.1-15.f8
+* Wed Jul 18 2007 Lawrence <llim> - 3.1-13.f8
 - Resolved: #239842 - /lib/lsb/init-functions shall use aliases but not functions
-- forward port the patch from 3.1-12.3.EL which fix #217566, #233530, #240916
-
-* Wed May 2 2007 Lawrence Lim <llim> - 3.1-14.fc7
-- fixed Bug 232918 for new glibc version
+- forward port the patch from 3.1-12.3.EL
 
-* Wed Feb 21 2007 Lawrence Lim <llim> - 3.1-13
-- fixed Bug 226363
+* Tue Jun 26 2007 Lawrence Lim <llim> - 3.1-12.3.EL
+- Resolves: #217566 - rewrite /lib/lsb/init-functions file needs to define the commands as true shell functions rather than aliases.
+- Resolves: #233530 - LSB pidofproc misspelled as pidofprof.
+- Resolves: #240916 - "log_warning_message" replaced with "log_warning_msg" per the LSB 3.1 spec
+
+* Wed Dec 6 2006 Lawrence Lim <llim> - 3.1-12.2.EL
+- Resolves: bug 217566
+- revise patch

So this is a forward port from RHEL?

Comment 40 Hao Liu 2008-08-06 06:08:53 UTC
Upload src rpm and spec for redhat-lsb3.1 to hliu.fedorapeople.org

1. Revise the License info
2. Remove the 2 requires provided by redhat-lsb3.1
3. Add comments explaining why hard-coded lib paths are kept.
4. Resolve some hard-coded path problems.

Comment 41 Hao Liu 2008-08-06 06:30:20 UTC
Update Comment#40:

The full urls for the 2 uploaded files are:

SPEC: [http://hliu.fedorapeople.org/redhat-lsb.spec]
SRPM: [http://hliu.fedorapeople.org/redhat-lsb-3.1-21.fc9.src.rpm]

Comment 42 Parag AN(पराग) 2008-08-06 08:05:38 UTC
Ok. lets start review again with new maintainer.
rpmlint on binary gave me
redhat-lsb.i386: W: dangling-relative-symlink /lib/ld-lsb.so.3 ld-linux.so.2
redhat-lsb.i386: W: dangling-relative-symlink /usr/lib/lsb/install_initd ../../../sbin/chkconfig
redhat-lsb.i386: W: dangling-relative-symlink /usr/lib/lsb/remove_initd ../../../sbin/chkconfig
==> Ok 

redhat-lsb.i386: E: zero-length /etc/lsb-release.d/core-3.1-ia32
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/core-3.1-ia32
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/graphics-3.1-noarch
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-noarch
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/graphics-3.1-ia32
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-ia32
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/core-3.1-noarch
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/core-3.1-noarch
==> As explained in SPEC needed these LSB Profile files and as they are not having any contents no issue of marking as conffile.

redhat-lsb.i386: E: non-readable /usr/sbin/redhat_lsb_trigger.i386 0700
redhat-lsb.i386: E: non-standard-executable-perm /usr/sbin/redhat_lsb_trigger.i386 0700
redhat-lsb.i386: E: statically-linked-binary /usr/sbin/redhat_lsb_trigger.i386
==> Not sure about this for now

redhat-lsb.i386: E: only-non-binary-in-usr-lib
==> From LSB documentation page 460 this looks ok.

redhat-lsb.i386: W: incoherent-version-in-changelog 3.1-22 3.1-21.fc10
==> Change Release tag in SPEC

rpmlint on SRPM gave

redhat-lsb.src:361: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb
redhat-lsb.src:379: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/install_initd
redhat-lsb.src:380: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
===> From spec comment its ok

As comment in SPEC said "# LSB uses /usr/lib rather than /usr/lib64 even for 64bit OS"

you should revert your changes
437c436
< /lib/lsb
---
> /%{_lib}/lsb
otherwise there will be problem on 64bit machine as those files will be installed in /usr/lib64

cp command should be used like "cp -p"

Comment 43 Parag AN(पराग) 2008-08-06 08:12:42 UTC
Ok got statically linked rpmlint messages bug 232918. Because of this bug fix this package got that rpmlint message.

Comment 44 Hao Liu 2008-08-06 08:54:16 UTC
Revise the spec according to the comment #42 and #43,
SPEC: [http://hliu.fedorapeople.org/redhat-lsb-3.1-22.spec]
SRPM: [http://hliu.fedorapeople.org/redhat-lsb-3.1-22.fc9.src.rpm]

Comment 45 Parag AN(पराग) 2008-08-06 12:06:35 UTC
with updated SRPM I see that build.log gave me
warning: File listed twice: /lib/lsb
warning: File listed twice: /lib/lsb/init-functions

Your %files should look like this
%files
%defattr(-,root,root)
%doc README
%{_sysconfdir}/redhat-lsb
%dir %{_sysconfdir}/lsb-release.d
# These files are needed because they shows which LSB we're supporting now,
# for example, if core-3.1-noarch exists, it means we are supporting LSB3.1 now
%{_sysconfdir}/lsb-release.d/*
%{_mandir}/*/*
%{_bindir}/*
#/bin/mailx
/bin/redhat_lsb_init
/usr/lib/lsb
/%{_lib}/*so*
/lib/lsb/init-functions
%{_sbindir}/redhat_lsb_trigger.%{_target_cpu}


Otherwise with SRPM you submitted rpm failed to build on x86_64. Please, update SPEC and SRPM with no release increment.

Comment 46 Hao Liu 2008-08-07 06:16:04 UTC
According to the comment#45, revise the spec file and build the source rpm.

SPEC: [http://hliu.fedorapeople.org/redhat-lsb.spec]
SRPM: [http://hliu.fedorapeople.org/redhat-lsb-3.1-22.fc9.src.rpm]

Description:
1. Replace %{_libdir}/lsb with /usr/lib/lsb

2. Replace /%{_lib}/* with /%{_lib}/*so*

3. replace /lib/lsb with /lib/lsb*

Comment 47 Parag AN(पराग) 2008-08-07 07:09:46 UTC
koji build => 
http://koji.fedoraproject.org/koji/taskinfo?taskID=764240
package build successfully.

Suggestions:-
  Add some more changelog in SPEC from comment #46
  change prep section from
  %setup -q -a 0
  %patch0 -p 0
   to
  %setup -q
  %patch0 -p1


I think you can commit this new SPEC with above suggessted modification in CVS now.

Can you commit and build new package? once you done comment here and will see if we have any issues otherwise will APPROVE and CLOSE this review.

Comment 48 Parag AN(पराग) 2008-08-07 08:59:04 UTC
Review:-
  With latest cvs build
  rpmlint gave
redhat-lsb.i386: W: dangling-relative-symlink /lib/ld-lsb.so.3 ld-linux.so.2
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/core-3.1-ia32
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/core-3.1-ia32
redhat-lsb.i386: E: non-readable /usr/sbin/redhat_lsb_trigger.i386 0700
redhat-lsb.i386: E: non-standard-executable-perm /usr/sbin/redhat_lsb_trigger.i386 0700
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/graphics-3.1-noarch
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-noarch
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/graphics-3.1-ia32
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/graphics-3.1-ia32
redhat-lsb.i386: W: dangling-relative-symlink /usr/lib/lsb/install_initd ../../../sbin/chkconfig
redhat-lsb.i386: W: dangling-relative-symlink /usr/lib/lsb/remove_initd ../../../sbin/chkconfig
redhat-lsb.i386: E: zero-length /etc/lsb-release.d/core-3.1-noarch
redhat-lsb.i386: W: non-conffile-in-etc /etc/lsb-release.d/core-3.1-noarch
redhat-lsb.i386: E: statically-linked-binary /usr/sbin/redhat_lsb_trigger.i386
redhat-lsb.i386: E: only-non-binary-in-usr-lib
redhat-lsb.src:361: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb
redhat-lsb.src:382: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/install_initd
redhat-lsb.src:383: E: hardcoded-library-path in $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
redhat-lsb.src:439: E: hardcoded-library-path in /usr/lib/lsb
redhat-lsb.src:441: E: hardcoded-library-path in /lib/lsb*
==> all above are accepted for this package

redhat-lsb.src:450: W: macro-in-%changelog _libdir
redhat-lsb.src:451: W: macro-in-%changelog _lib
==> You should take care of this next time you build new release of redhat-lsb

All other looks ok.

APPROVED.

Comment 49 Parag AN(पराग) 2008-08-07 09:00:22 UTC
oops new BZ UI is confusing. Correcting RESOLUTION

Comment 50 Jens Petersen 2008-08-07 09:45:58 UTC
Thank you all - specially to Parag for his long work and effort
on getting this package through. :-)

Comment 51 Parag AN(पराग) 2012-03-02 07:24:11 UTC
*** Bug 798595 has been marked as a duplicate of this bug. ***

Comment 52 Xibo Ning 2012-03-06 04:49:00 UTC
Update LSB to 4.1 for x86 and x86_64.  if we use package names or provides instead of library .so names, I think we will get nearly the same dependencies for different architectures. This is true for x86 and x86 _64.

LSB is packaged into different subpackages, nearly one submodule, one subpackage, except Graphics submodules and Qt submodules.

LSB 4.1 requires perl module 'Locale::Constants'. But now, we only supplied 'Locale::Codes::Constants', so I supply a simple solution to this problem. Detailed information pls reference: 
https://bugzilla.redhat.com/show_bug.cgi?id=736822
http://search.cpan.org/~sbeck/Locale-Codes-3.20/

LSB 4.1 requires perl module 'Pod::Plainer', I package this module. Pls reference:
https://bugzilla.redhat.com/show_bug.cgi?id=799284

I also package LSB dist test manager, so we can simply install this software and its dependencies. Pls reference:
https://bugzilla.redhat.com/show_bug.cgi?id=798595

I also supplied two little perl script to translate library .so name to package name. These tools use yum repo database. 

All files are in the following srpm package.

SPEC url:  https://dl.dropbox.com/u/64704553/redhat-lsb.spec
SRPM url: https://dl.dropbox.com/u/64704553/redhat-lsb-4.1-1.fc16.src.rpm

Comment 53 Xibo Ning 2012-03-06 04:52:31 UTC
--- redhat-lsb-4.0/redhat-lsb.spec	2012-01-15 05:12:31.000000000 +0800
+++ /home/tsllst/rpmbuild/SPECS/redhat-lsb.spec	2012-03-06 11:26:11.864463621 +0800
@@ -6,50 +6,19 @@
 %define lsbldso ld-lsb.so
 %endif
 
-%ifarch ia64
-%define ldso ld-linux-ia64.so.2
-%define lsbldso ld-lsb-ia64.so
-%endif
-
-%ifarch ppc
-%define ldso ld.so.1
-%define lsbldso ld-lsb-ppc32.so
-%endif
-
-%ifarch ppc64
-%define ldso ld64.so.1
-%define lsbldso ld-lsb-ppc64.so
-%endif
-
-%ifarch s390
-%define ldso ld.so.1
-%define lsbldso ld-lsb-s390.so
-%endif
-
-%ifarch s390x
-%define ldso ld64.so.1
-%define lsbldso ld-lsb-s390x.so
-%endif
-
 %ifarch x86_64
 %define ldso ld-linux-x86-64.so.2
 %define lsbldso ld-lsb-x86-64.so
 %endif
 
-%ifarch ia64 ppc64 s390x x86_64
-%define qual ()(64bit)
-%else
-%define qual %{nil}
-%endif
-
 %define upstreamlsbrelver 2.0
-%define lsbrelver 4.0
+%define lsbrelver 4.1
 %define srcrelease 1
 
 Summary: LSB base libraries support for Red Hat Enterprise Linux
 Name: redhat-lsb
-Version: 4.0
-Release: 11%{?dist}
+Version: 4.1
+Release: 1%{?dist}
 URL: http://www.linuxfoundation.org/collaborate/workgroups/lsb
 Source0: %{name}-%{version}-%{srcrelease}.tar.bz2
 #Source1: http://prdownloads.sourceforge.net/lsb/lsb-release-%{upstreamlsbrelver}.tar.gz
@@ -66,288 +35,57 @@
 %ifarch %{ix86}
 %define archname ia32
 %endif
-%ifarch ia64
-%define archname ia64
-%endif
-%ifarch ppc
-%define archname ppc32
-%endif
-%ifarch ppc64
-%define archname ppc64
-%endif
-%ifarch s390
-%define archname s390
-%endif
-%ifarch s390x
-%define archname s390x
-%endif
 %ifarch x86_64
 %define archname amd64
 %endif
 Provides: lsb-core-%{archname} = %{version}
 Provides: lsb-core-noarch = %{version}
 
-ExclusiveArch: %{ix86} ia64 x86_64 ppc ppc64 s390 s390x %{arm}
-
-%ifarch %{ix86}
-# archLSB IA32 Base Libraries
-Requires: libc.so.6
-Requires: libcrypt.so.1
-Requires: libdl.so.2
-Requires: libgcc_s.so.1
-Requires: libm.so.6
-Requires: libncurses.so.5
-Requires: libpthread.so.0
-Requires: libstdc++.so.6
-Requires: libutil.so.1
-Requires: libz.so.1
-%endif
-
-%ifarch ia64
-# archLSB IA64 Base Libraries
-Requires: libc.so.6.1()(64bit)
-Requires: libcrypt.so.1()(64bit)
-Requires: libdl.so.2()(64bit)
-Requires: libgcc_s.so.1()(64bit)
-Requires: libm.so.6.1()(64bit)
-Requires: libncurses.so.5()(64bit)
-Requires: libpthread.so.0()(64bit)
-Requires: libstdc++.so.6()(64bit)
-Requires: libutil.so.1()(64bit)
-Requires: libz.so.1()(64bit)
-%endif
-
-%ifarch ppc
-# archLSB PPC32 Base Libraries
-Requires: libc.so.6
-Requires: libcrypt.so.1
-Requires: libdl.so.2
-Requires: libgcc_s.so.1
-Requires: libm.so.6
-Requires: libncurses.so.5
-Requires: libpthread.so.0
-Requires: libstdc++.so.6
-Requires: libutil.so.1
-Requires: libz.so.1
-%endif
-
-%ifarch ppc64
-# archLSB PPC64 Base Libraries
-Requires: libc.so.6()(64bit)
-Requires: libcrypt.so.1()(64bit)
-Requires: libdl.so.2()(64bit)
-Requires: libgcc_s.so.1()(64bit)
-Requires: libm.so.6()(64bit)
-Requires: libncurses.so.5()(64bit)
-Requires: libpthread.so.0()(64bit)
-Requires: libstdc++.so.6()(64bit)
-Requires: libutil.so.1()(64bit)
-Requires: libz.so.1()(64bit)
-%endif
-
-%ifarch s390
-# archLSB S390 Base Libraries
-Requires: libc.so.6
-Requires: libcrypt.so.1
-Requires: libdl.so.2
-Requires: libgcc_s.so.1
-Requires: libm.so.6
-Requires: libncurses.so.5
-Requires: libpthread.so.0
-Requires: libstdc++.so.6
-Requires: libutil.so.1
-Requires: libz.so.1
-%endif
+ExclusiveArch: %{ix86} x86_64
 
-%ifarch s390x
-# archLSB S390X Base Libraries
-Requires: libc.so.6()(64bit)
-Requires: libcrypt.so.1()(64bit)
-Requires: libdl.so.2()(64bit)
-Requires: libgcc_s.so.1()(64bit)
-Requires: libm.so.6()(64bit)
-Requires: libncurses.so.5()(64bit)
-Requires: libpthread.so.0()(64bit)
-Requires: libstdc++.so.6()(64bit)
-Requires: libutil.so.1()(64bit)
-Requires: libz.so.1()(64bit)
-%endif
-
-%ifarch x86_64
-# archLSB AMD64 Base Libraries
-Requires: libc.so.6()(64bit)
-Requires: libcrypt.so.1()(64bit)
-Requires: libdl.so.2()(64bit)
-Requires: libgcc_s.so.1()(64bit)
-Requires: libm.so.6()(64bit)
-Requires: libncurses.so.5()(64bit)
-Requires: libpthread.so.0()(64bit)
-Requires: libstdc++.so.6()(64bit)
-Requires: libutil.so.1()(64bit)
-Requires: libz.so.1()(64bit)
-%endif
-
-# gLSB Base/Utility/Stdc++
-Requires: libcrypt.so.1%{qual}
-Requires: libdl.so.2%{qual}
-Requires: libgcc_s.so.1%{qual}
-Requires: libncurses.so.5%{qual}
-Requires: libnspr4.so%{qual}
-Requires: libnss3.so%{qual}
-Requires: libpam.so.0%{qual}
-Requires: libpthread.so.0%{qual}
-Requires: librt.so.1%{qual}
-Requires: libssl3.so%{qual}
-Requires: libstdc++.so.6%{qual}
-Requires: libutil.so.1%{qual}
-Requires: libz.so.1%{qual}
+# gLSB Library
+Requires: glibc
+Requires: libgcc
+Requires: ncurses-libs
+Requires: pam
+Requires: zlib
 
 # gLSB Command and Utilities
-Requires: /bin/awk
-Requires: /bin/basename
-Requires: /bin/cat
-Requires: /bin/chgrp
-Requires: /bin/chmod
-Requires: /bin/chown
-Requires: /bin/cp
-Requires: /bin/cpio
-Requires: /bin/cut
-Requires: /bin/date
-Requires: /bin/dd
-Requires: /bin/df
-Requires: /bin/dmesg
-Requires: /bin/echo
-Requires: /bin/ed
-Requires: /bin/egrep
-Requires: /bin/env
-Requires: /bin/false
-Requires: /bin/fgrep
-Requires: /bin/find
-Requires: /bin/gettext
-Requires: /bin/grep
-Requires: /bin/gunzip
-Requires: /bin/gzip
-Requires: /bin/hostname
-Requires: /bin/kill
-Requires: /bin/ln
-Requires: /bin/ls
-Requires: /bin/mailx
-Requires: /bin/mkdir
-Requires: /bin/mknod
-Requires: /bin/mktemp
-Requires: /bin/more
-Requires: /bin/mount
-Requires: /bin/mv
-Requires: /bin/nice
-Requires: /bin/ps
-Requires: /bin/pwd
-Requires: /bin/rm
-Requires: /bin/rmdir
-Requires: /bin/sed
-Requires: /bin/sh
-Requires: /bin/sleep
-Requires: /bin/sort
-Requires: /bin/stty
-Requires: /bin/su
-Requires: /bin/sync
-Requires: /bin/tar
-Requires: /bin/touch
-Requires: /bin/true
-Requires: /bin/umount
-Requires: /bin/uname
-Requires: /bin/zcat
-Requires: /sbin/fuser
-Requires: /sbin/pidof
-Requires: /sbin/shutdown
-Requires: /usr/bin/[
-Requires: /usr/bin/ar
-Requires: /usr/bin/at
-Requires: /usr/bin/batch
-Requires: /usr/bin/bc
-Requires: /usr/bin/chfn
-Requires: /usr/bin/chsh
-Requires: /usr/bin/cksum
-Requires: /usr/bin/cmp
-Requires: /usr/bin/col
-Requires: /usr/bin/comm
-Requires: /usr/bin/crontab
-Requires: /usr/bin/csplit
-Requires: /usr/bin/diff
-Requires: /usr/bin/dirname
-Requires: /usr/bin/du
-Requires: /usr/bin/expand
-Requires: /usr/bin/expr
-Requires: /usr/bin/file
-Requires: /usr/bin/fold
-Requires: /usr/bin/gencat
-Requires: /usr/bin/getconf
-Requires: /usr/bin/groups
-Requires: /usr/bin/head
-Requires: /usr/bin/iconv
-Requires: /usr/bin/id
-Requires: /usr/bin/install
-Requires: /usr/bin/ipcrm
-Requires: /usr/bin/ipcs
-Requires: /usr/bin/join
-Requires: /usr/bin/killall
-Requires: /usr/bin/locale
-Requires: /usr/bin/localedef
-Requires: /usr/bin/logger
-Requires: /usr/bin/logname
-Requires: /usr/bin/m4
-Requires: /usr/bin/make
-Requires: /usr/bin/man
-Requires: /usr/bin/md5sum
-Requires: /usr/bin/mkfifo
-Requires: /usr/bin/msgfmt
-Requires: /usr/bin/newgrp
-Requires: /usr/bin/nl
-Requires: /usr/bin/nohup
-Requires: /usr/bin/od
-Requires: /usr/bin/passwd
-Requires: /usr/bin/paste
-Requires: /usr/bin/patch
-Requires: /usr/bin/pathchk
-Requires: /usr/bin/pax
-Requires: /usr/bin/perl
-Requires: /usr/bin/pr
-Requires: /usr/bin/printf
-Requires: /usr/bin/python
-Requires: /usr/bin/renice
-Requires: /usr/bin/seq
-Requires: /usr/bin/split
-Requires: /usr/bin/strip
-Requires: /usr/bin/tail
-Requires: /usr/bin/tee
-Requires: /usr/bin/test
-Requires: /usr/bin/time
-Requires: /usr/bin/tr
-Requires: /usr/bin/tsort
-Requires: /usr/bin/tty
-Requires: /usr/bin/unexpand
-Requires: /usr/bin/uniq
-Requires: /usr/bin/wc
-Requires: /usr/bin/xargs
-Requires: /usr/lib/lsb/install_initd
-Requires: /usr/lib/lsb/remove_initd
-Requires: /usr/sbin/groupadd
-Requires: /usr/sbin/groupdel
-Requires: /usr/sbin/groupmod
-Requires: /usr/sbin/sendmail
-Requires: /usr/sbin/useradd
-Requires: /usr/sbin/userdel
-Requires: /usr/sbin/usermod
-
-# Add split off packages from core perl package
-Requires: perl(Locale::Codes)
-Requires: perl(Class::ISA)
-## following for f17 and above
-Requires: perl(Digest::MD5)
-Requires: perl(Pod::Perldoc::ToChecker)
-Requires: perl(Pod::Perldoc::ToMan)
-Requires: perl(Pod::Perldoc::ToNroff)
-Requires: perl(Pod::Perldoc::ToPod)
-Requires: perl(Pod::Perldoc::ToText)
+Requires: at
+Requires: bash
+Requires: bc
+Requires: binutils
+Requires: coreutils
+Requires: cpio
+Requires: cronie
+Requires: cups
+Requires: diffutils
+Requires: ed
+Requires: file
+Requires: findutils
+Requires: gawk
+Requires: gettext
+Requires: glibc-common
+Requires: grep
+Requires: gzip
+Requires: hostname
+Requires: m4
+Requires: mailx
+Requires: make
+Requires: man-db
+Requires: MTA
+Requires: passwd
+Requires: patch
+Requires: pax
+Requires: procps
+Requires: psmisc
+Requires: sed
+Requires: shadow-utils
+Requires: systemd
+Requires: sysvinit-tools
+Requires: tar
+Requires: time
+Requires: util-linux
 
 %description
 The Linux Standard Base (LSB) is an attempt to develop a set of
@@ -357,234 +95,143 @@
 components required by the LSB that are provided by Red Hat Linux are
 installed on the system.
 
-%package graphics
+%package perl
 Group: System Environment/Base
-Summary: LSB graphics libraries support for Red Hat Enterprise Linux
+Summary: LSB interpreted language perl support for Red Hat Enterprise Linux
+# Add split off packages from core perl package
+# Requires: perl-Locale-Codes
+# Requires: perl-Class-ISA
+# Perl and Perl non-builtin modules
+Requires: perl
+Requires: perl-CGI
+Requires: perl-Class-ISA
+Requires: perl-CPAN
+Requires: perl-ExtUtils-MakeMaker
+# Locale::Constants has been Locale::Codes::Costants, so we need
+# create a /usr/share/perl5/vendor_perl/Constants.pm manually.
+# Requires: perl(Locale::Constants)
+# DB module is a builtin module
+# Requires: perl(DB)
+
+Requires: perl-Locale-Codes
+Requires: perl-PathTools
+Requires: perl-Scalar-List-Utils
+Requires: perl-Test-Harness
+Requires: perl-Test-Simple
+Requires:       %{name} = %{version}-%{release}
 
-%ifarch %{ix86}
-# archLSB IA32 Graphics Libraries
-Requires: libatk-1.0.so.0
-Requires: libgdk-x11-2.0.so.0
-Requires: libgdk_pixbuf-2.0.so.0
-Requires: libgdk_pixbuf_xlib-2.0.so.0
-Requires: libglib-2.0.so.0
-Requires: libgmodule-2.0.so.0
-Requires: libgobject-2.0.so.0
-Requires: libgthread-2.0.so.0
-Requires: libgtk-x11-2.0.so.0
-Requires: libpango-1.0.so.0
-Requires: libpangocairo-1.0.so.0
-Requires: libpangoft2-1.0.so.0
-Requires: libpangoxft-1.0.so.0
-Requires: libqt-mt.so.3
-Requires: libQtCore.so.4
-Requires: libQtGui.so.4
-Requires: libQtNetwork.so.4
-Requires: libQtOpenGL.so.4
-Requires: libQtSql.so.4
-Requires: libQtSvg.so.4
-Requires: libQtXml.so.4
-%endif
+Provides: lsb-perl-%{archname} = %{version}
+Provides: lsb-perl-noarch = %{version}
 
-%ifarch ia64
-# archLSB IA64 Graphics Libraries
-Requires: libatk-1.0.so.0()(64bit)
-Requires: libgdk-x11-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf_xlib-2.0.so.0()(64bit)
-Requires: libglib-2.0.so.0()(64bit)
-Requires: libgmodule-2.0.so.0()(64bit)
-Requires: libgobject-2.0.so.0()(64bit)
-Requires: libgthread-2.0.so.0()(64bit)
-Requires: libgtk-x11-2.0.so.0()(64bit)
-Requires: libpango-1.0.so.0()(64bit)
-Requires: libpangocairo-1.0.so.0()(64bit)
-Requires: libpangoft2-1.0.so.0()(64bit)
-Requires: libpangoxft-1.0.so.0()(64bit)
-Requires: libqt-mt.so.3()(64bit)
-Requires: libQtCore.so.4()(64bit)
-Requires: libQtGui.so.4()(64bit)
-Requires: libQtNetwork.so.4()(64bit)
-Requires: libQtOpenGL.so.4()(64bit)
-Requires: libQtSql.so.4()(64bit)
-Requires: libQtSvg.so.4()(64bit)
-Requires: libQtXml.so.4()(64bit)
-%endif
+%description perl
+The Linux Standard Base (LSB) Runtime Language Specifications define Perl
+modules that are required to be present on an LSB conforming system.
 
-%ifarch ppc
-# archLSB PPC32 Graphics Libraries
-Requires: libatk-1.0.so.0
-Requires: libgdk-x11-2.0.so.0
-Requires: libgdk_pixbuf-2.0.so.0
-Requires: libgdk_pixbuf_xlib-2.0.so.0
-Requires: libglib-2.0.so.0
-Requires: libgmodule-2.0.so.0
-Requires: libgobject-2.0.so.0
-Requires: libgthread-2.0.so.0
-Requires: libgtk-x11-2.0.so.0
-Requires: libpango-1.0.so.0
-Requires: libpangocairo-1.0.so.0
-Requires: libpangoft2-1.0.so.0
-Requires: libpangoxft-1.0.so.0
-Requires: libqt-mt.so.3
-Requires: libQtCore.so.4
-Requires: libQtGui.so.4
-Requires: libQtNetwork.so.4
-Requires: libQtOpenGL.so.4
-Requires: libQtSql.so.4
-Requires: libQtSvg.so.4
-Requires: libQtXml.so.4
-%endif
+%package python
+Group: System Environment/Base
+Summary: LSB interpreted language python support for Red Hat Enterprise Linux
 
-%ifarch ppc64
-# archLSB PPC64 Graphics Libraries
-Requires: libatk-1.0.so.0()(64bit)
-Requires: libgdk-x11-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf_xlib-2.0.so.0()(64bit)
-Requires: libglib-2.0.so.0()(64bit)
-Requires: libgmodule-2.0.so.0()(64bit)
-Requires: libgobject-2.0.so.0()(64bit)
-Requires: libgthread-2.0.so.0()(64bit)
-Requires: libgtk-x11-2.0.so.0()(64bit)
-Requires: libpango-1.0.so.0()(64bit)
-Requires: libpangocairo-1.0.so.0()(64bit)
-Requires: libpangoft2-1.0.so.0()(64bit)
-Requires: libpangoxft-1.0.so.0()(64bit)
-Requires: libqt-mt.so.3()(64bit)
-Requires: libQtCore.so.4()(64bit)
-Requires: libQtGui.so.4()(64bit)
-Requires: libQtNetwork.so.4()(64bit)
-Requires: libQtOpenGL.so.4()(64bit)
-Requires: libQtSql.so.4()(64bit)
-Requires: libQtSvg.so.4()(64bit)
-Requires: libQtXml.so.4()(64bit)
-%endif
+# Python modules, all are builtin modules, so only need Python
+# Pls referrence http://docs.python.org/library/
+Requires: python
 
-%ifarch s390
-# archLSB S390 Graphics Libraries
-Requires: libatk-1.0.so.0
-Requires: libgdk-x11-2.0.so.0
-Requires: libgdk_pixbuf-2.0.so.0
-Requires: libgdk_pixbuf_xlib-2.0.so.0
-Requires: libglib-2.0.so.0
-Requires: libgmodule-2.0.so.0
-Requires: libgobject-2.0.so.0
-Requires: libgthread-2.0.so.0
-Requires: libgtk-x11-2.0.so.0
-Requires: libpango-1.0.so.0
-Requires: libpangocairo-1.0.so.0
-Requires: libpangoft2-1.0.so.0
-Requires: libpangoxft-1.0.so.0
-Requires: libqt-mt.so.3
-Requires: libQtCore.so.4
-Requires: libQtGui.so.4
-Requires: libQtNetwork.so.4
-Requires: libQtOpenGL.so.4
-Requires: libQtSql.so.4
-Requires: libQtSvg.so.4
-Requires: libQtXml.so.4
-%endif
+Requires:       %{name} = %{version}-%{release}
 
-%ifarch s390x
-# archLSB S390X Graphics Libraries
-Requires: libatk-1.0.so.0()(64bit)
-Requires: libgdk-x11-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf_xlib-2.0.so.0()(64bit)
-Requires: libglib-2.0.so.0()(64bit)
-Requires: libgmodule-2.0.so.0()(64bit)
-Requires: libgobject-2.0.so.0()(64bit)
-Requires: libgthread-2.0.so.0()(64bit)
-Requires: libgtk-x11-2.0.so.0()(64bit)
-Requires: libpango-1.0.so.0()(64bit)
-Requires: libpangocairo-1.0.so.0()(64bit)
-Requires: libpangoft2-1.0.so.0()(64bit)
-Requires: libpangoxft-1.0.so.0()(64bit)
-Requires: libqt-mt.so.3()(64bit)
-Requires: libQtCore.so.4()(64bit)
-Requires: libQtGui.so.4()(64bit)
-Requires: libQtNetwork.so.4()(64bit)
-Requires: libQtOpenGL.so.4()(64bit)
-Requires: libQtSql.so.4()(64bit)
-Requires: libQtSvg.so.4()(64bit)
-Requires: libQtXml.so.4()(64bit)
-%endif
+Provides: lsb-python-%{archname} = %{version}
+Provides: lsb-python-noarch = %{version}
 
-%ifarch x86_64
-# archLSB AMD64 Graphics Libraries
-Requires: libatk-1.0.so.0()(64bit)
-Requires: libgdk-x11-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf-2.0.so.0()(64bit)
-Requires: libgdk_pixbuf_xlib-2.0.so.0()(64bit)
-Requires: libglib-2.0.so.0()(64bit)
-Requires: libgmodule-2.0.so.0()(64bit)
-Requires: libgobject-2.0.so.0()(64bit)
-Requires: libgthread-2.0.so.0()(64bit)
-Requires: libgtk-x11-2.0.so.0()(64bit)
-Requires: libpango-1.0.so.0()(64bit)
-Requires: libpangocairo-1.0.so.0()(64bit)
-Requires: libpangoft2-1.0.so.0()(64bit)
-Requires: libpangoxft-1.0.so.0()(64bit)
-Requires: libpthread.so.0()(64bit)
-Requires: libqt-mt.so.3()(64bit)
-Requires: libQtCore.so.4()(64bit)
-Requires: libQtGui.so.4()(64bit)
-Requires: libQtNetwork.so.4()(64bit)
-Requires: libQtOpenGL.so.4()(64bit)
-Requires: libQtSql.so.4()(64bit)
-Requires: libQtSvg.so.4()(64bit)
-Requires: libQtXml.so.4()(64bit)
-%endif
+%description python
+The Linux Standard Base (LSB) Runtime Language Specifications define Python
+modules that are required to be present on an LSB conforming system.
+
+%package c++
+Group: System Environment/Base
+Summary: LSB c++ standard library support for Red Hat Enterprise Linux
+
+Requires: libstdc++
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-c++-%{archname} = %{version}
+Provides: lsb-c++-noarch = %{version}
 
-# gLSB Graphics Libraries
-Requires: libasound.so.2%{qual}
-Requires: libatk-1.0.so.0%{qual}
-Requires: libcairo.so.2%{qual}
-Requires: libcrypt.so.1%{qual}
-Requires: libcups.so.2%{qual}
-Requires: libcupsimage.so.2%{qual}
-Requires: libfontconfig.so.1%{qual}
-Requires: libfreetype.so.6%{qual}
-Requires: libgdk-x11-2.0.so.0%{qual}
-Requires: libgdk_pixbuf-2.0.so.0%{qual}
-Requires: libgdk_pixbuf_xlib-2.0.so.0%{qual}
-Requires: libGL.so.1%{qual}
-Requires: libglib-2.0.so.0%{qual}
-Requires: libGLU.so.1%{qual}
-Requires: libgmodule-2.0.so.0%{qual}
-Requires: libgobject-2.0.so.0%{qual}
-Requires: libgthread-2.0.so.0%{qual}
-Requires: libgtk-x11-2.0.so.0%{qual}
-Requires: libICE.so.6%{qual}
-Requires: libjpeg.so.62%{qual}
-Requires: libpango-1.0.so.0%{qual}
-Requires: libpangocairo-1.0.so.0%{qual}
-Requires: libpangoft2-1.0.so.0%{qual}
-Requires: libpangoxft-1.0.so.0%{qual}
-Requires: libpng12.so.0%{qual}
-Requires: libqt-mt.so.3%{qual}
-Requires: libQtCore.so.4%{qual}
-Requires: libQtGui.so.4%{qual}
-Requires: libQtNetwork.so.4%{qual}
-Requires: libQtOpenGL.so.4%{qual}
-Requires: libQtSql.so.4%{qual}
-Requires: libQtSvg.so.4%{qual}
-Requires: libQtXml.so.4%{qual}
-Requires: libSM.so.6%{qual}
-Requires: libX11.so.6%{qual}
-Requires: libXext.so.6%{qual}
-Requires: libXft.so.2%{qual}
-Requires: libXi.so.6%{qual}
-Requires: libxml2.so.2%{qual}
-Requires: libXrender.so.1%{qual}
-Requires: libXt.so.6%{qual}
-Requires: libXtst.so.6%{qual}
+%description c++
+The Linux Standard Base (LSB) C++ Specifications define c++ libraries that
+are required to be present on an LSB conforming system.
+
+%package toolkit-gtk
+Group: System Environment/Base
+Summary: LSB gtk support for Red Hat Enterprise Linux
+
+Requires: atk
+Requires: gdk-pixbuf2
+Requires: glib2
+Requires: gtk2
+Requires: pango
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-tookit-gtk-%{archname} = %{version}
+Provides: lsb-tookit-gtk-noarch = %{version}
+%description toolkit-gtk
+The Linux Standard Base (LSB) Desktop Specifications define gtk libraries
+and utilities that are required to be present on an LSB conforming system.
+
+%package toolkit-qt
+Group: System Environment/Base
+Summary: LSB qt support for Red Hat Enterprise Linux
+
+Requires: qt
+Requires: qt-x11
+Requires: qt3
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-tookit-qt-%{archname} = %{version}
+Provides: lsb-tookit-qt-noarch = %{version}
+%description toolkit-qt
+The Linux Standard Base (LSB) Desktop Specifications define qt libraries
+and utilities that are required to be present on an LSB conforming system.
+
+%package xml
+Group: System Environment/Base
+Summary: LSB XML support for Red Hat Enterprise Linux
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-xml-%{archname} = %{version}
+Provides: lsb-xml-noarch = %{version}
+%description xml
+The Linux Standard Base (LSB) Desktop Specifications define xml libraries
+and utilities that are required to be present on an LSB conforming system.
+
+%package graphics
+Group: System Environment/Base
+Summary: LSB XML libraries support for Red Hat Enterprise Linux
+
+# LSB_Graphics library
+Requires: Glide3-libGL
+Requires: libICE
+Requires: libSM
+Requires: libX11
+Requires: libXext
+Requires: libXi
+Requires: libXt
+Requires: libXtst
+Requires: mesa-libGL
+Requires: mesa-libGLU
+
+# LSB_Graphics_Ext library
+Requires: cairo
+Requires: fontconfig
+Requires: freetype
+Requires: libjpeg-turbo
+Requires: libpng
+Requires: libXft
+Requires: libXrender
 
 # gLSB Graphics Command and Utilities
-Requires: /usr/bin/fc-cache
-Requires: /usr/bin/fc-list
-Requires: /usr/bin/fc-match
+Requires: fontconfig
 
 #for directory ownership
 Requires:       %{name} = %{version}-%{release}
@@ -593,22 +240,21 @@
 Provides: lsb-graphics-noarch = %{version}
 
 %description graphics
-The Linux Standard Base (LSB) Graphics Specifications define components that are required
- to be present on an LSB conforming system.
+The Linux Standard Base (LSB) Desktop Specifications define graphic
+components that are required to be present on an LSB conforming
+system.
+
 
 %package printing
 Group: System Environment/Base
 Summary: LSB printing libraries support for Red Hat Enterprise Linux
 
 # gLSB Printing Libraries
-Requires: libcups.so.2%{qual}
-Requires: libcupsimage.so.2%{qual}
+Requires: cups-libs
 
 # gLSB Printing Command and Utilities
-Requires: /usr/bin/foomatic-rip
-Requires: /usr/bin/gs
-Requires: /usr/bin/lp
-Requires: /usr/bin/lpr
+Requires: foomatic-filters
+Requires: ghostscript
 
 #for directory ownership
 Requires:       %{name} = %{version}-%{release}
@@ -620,6 +266,52 @@
 The Linux Standard Base (LSB) Printing Specifications define components that are required
  to be present on an LSB conforming system.
 
+%package multimedia
+Group: System Environment/Base
+Summary: LSB multimedia support for Red Hat Enterprise Linux
+
+Requires: alsa-lib
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-multimedia-%{archname} = %{version}
+Provides: lsb-multimedia-noarch = %{version}
+%description multimedia
+The Linux Standard Base (LSB) Multimedia Specifications define multimedia
+libraries and utilities that are required to be present on an LSB 
+conforming system.
+
+%package security
+Group: System Environment/Base
+Summary: LSB security library support for Red Hat Enterprise Linux
+
+Requires: nspr
+# Requires: nspr-devel
+Requires: nss
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-security-%{archname} = %{version}
+Provides: lsb-security-noarch = %{version}
+%description security
+The Linux Standard Base (LSB) Core Specifications define security libraries
+and utilities that are required to be present on an LSB conforming system.
+
+%package desktop-misc
+Group: System Environment/Base
+Summary: LSB desktop misc library and utilities support for Red Hat Enterprise Linux
+
+Requires: xdg-utils
+
+Requires:       %{name} = %{version}-%{release}
+
+Provides: lsb-desktop-misc-%{archname} = %{version}
+Provides: lsb-desktop-misc-noarch = %{version}
+%description desktop-misc
+The Linux Standard Base (LSB) Desktop Specifications define desktop
+miscellaneous libraries and utilities that are required to be present
+on an LSB conforming system.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -645,19 +337,24 @@
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} $RPM_BUILD_ROOT/%{_lib} $RPM_BUILD_ROOT%{_mandir} \
          $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT/usr/lib/lsb \
          $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/ $RPM_BUILD_ROOT%{_sbindir}
+
+# manually add Locale::Constants. This module is just an alias of Locale::Codes::Constants
+mkdir -p $RPM_BUILD_ROOT%{perl_vendorlib}/Locale
+cp -p Constants.pm $RPM_BUILD_ROOT%{perl_vendorlib}/Locale
+cp -p Constants.pod $RPM_BUILD_ROOT%{perl_vendorlib}/Locale
+
 make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
 cd lsb-release-%{upstreamlsbrelver}
 make mandir=$RPM_BUILD_ROOT/%{_mandir} prefix=$RPM_BUILD_ROOT/%{_prefix} install
 cd ..
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/core-4.0-%{archname}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/core-4.0-noarch
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/graphics-4.0-%{archname}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/graphics-4.0-noarch
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/printing-4.0-%{archname}
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/printing-4.0-noarch
+for name in core perl python c++ toolkit-gtk toolkit-qt xml multimedia security \
+    desktop-misc graphics printing;do
+  touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/${name}-%{lsbrelver}-%{archname}
+  touch $RPM_BUILD_ROOT%{_sysconfdir}/lsb-release.d/${name}-%{lsbrelver}-noarch
+done
 
 for LSBVER in %{lsbsover}; do
-  ln -s %{ldso} $RPM_BUILD_ROOT/%{_lib}/%{lsbldso}.$LSBVER
+  ln -snf %{ldso} $RPM_BUILD_ROOT/%{_lib}/%{lsbldso}.$LSBVER
 done
 
 mkdir -p $RPM_BUILD_ROOT/bin
@@ -722,12 +419,41 @@
 %{_mandir}/*/*
 %{_bindir}/*
 #/bin/mailx
-/bin/redhat_lsb_init
+%attr(0755, root, root)/bin/redhat_lsb_init
 /usr/lib/lsb
 /%{_lib}/*so*
 /lib/lsb*
 %{_sbindir}/redhat_lsb_trigger.%{_target_cpu}
 
+%files perl
+%{_sysconfdir}/lsb-release.d/perl*
+%{perl_vendorlib}/Locale/Constants.pm
+%{perl_vendorlib}/Locale/Constants.pod
+
+%files python
+%{_sysconfdir}/lsb-release.d/python*
+
+%files c++
+%{_sysconfdir}/lsb-release.d/c++*
+
+%files toolkit-gtk
+%{_sysconfdir}/lsb-release.d/toolkit-gtk*
+
+%files toolkit-qt
+%{_sysconfdir}/lsb-release.d/toolkit-qt*
+
+%files xml
+%{_sysconfdir}/lsb-release.d/xml*
+
+%files multimedia
+%{_sysconfdir}/lsb-release.d/multimedia*
+
+%files security
+%{_sysconfdir}/lsb-release.d/security*
+
+%files desktop-misc
+%{_sysconfdir}/lsb-release.d/desktop-misc*
+
 %files graphics
 %{_sysconfdir}/lsb-release.d/graphics*
 
@@ -736,6 +462,12 @@
 
 
 %changelog
+* Mon Mar 05 2012 xning <xning AT redhat DOT com> - 4.1-1
+- Update to LSB 4.1 for x86 and x86-64
+- Update "Requires:" tag from file path or library .so name to
+  package name to simplify spec file
+- one LSB submodule, one rpm package, except Graphics and qt libraries.
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng.org> - 4.0-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
@@ -959,4 +691,3 @@
 
 * Thu Jan 24 2002 Matt Wilson <msw>
 - Initial build.
-

Comment 54 Xibo Ning 2012-03-06 05:01:16 UTC
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)
+
+=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.
+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.
+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

Comment 55 Parag AN(पराग) 2012-03-06 05:16:49 UTC
I thought you will open a new bug as per requested instead to continue work here. This review is long ago completed.