This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 456280 - Review Request: ini4j - Java API for handling files in Windows .ini format
Review Request: ini4j - Java API for handling files in Windows .ini format
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Lillian Angel
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 456337
  Show dependency treegraph
 
Reported: 2008-07-22 12:13 EDT by Victor G. Vasilyev
Modified: 2008-09-03 18:48 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-03 18:48:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
langel: fedora‑review+
kevin: fedora‑cvs+


Attachments (Terms of Use)
Diff between contents of original JAR file and newly generated one (4.03 KB, text/plain)
2008-08-22 08:52 EDT, Victor G. Vasilyev
no flags Details

  None (edit)
Description Victor G. Vasilyev 2008-07-22 12:13:35 EDT
Spec URL: http://nbi.netbeans.org/files/documents/210/2046/ini4j.spec
SRPM URL: http://nbi.netbeans.org/files/documents/210/2047/ini4j-0.3.2-1.fc10.src.rpm
Description: 
The [ini4j] is a simple Java API for handling configuration files 
in Windows .ini format. 
Additionally, the library includes Java Preferences API implementation 
based on the .ini file.

This package is required for the NetBeans IDE 6.1
Comment 1 Victor G. Vasilyev 2008-07-31 13:11:39 EDT
This is my first contribution so I need a sponsor please.
Comment 2 Victor G. Vasilyev 2008-08-15 13:22:46 EDT
The second release is prepared for review.
Spec URL:
http://nbi.netbeans.org/files/documents/210/2046/ini4j.spec
SRPM URL:
http://nbi.netbeans.org/files/documents/210/2125/ini4j-0.3.2-2.fc10.src.rpm

Changes:
- Documentation added
- Appropriate values of Group Tags are chosen from the official list
- The /etc/maven/fragments/ini4j file is attributed as a config(noreplace)

rpmlint shows no errors and no warnings against both SRPM and RPMs.
Comment 3 Jason Tibbitts 2008-08-20 17:36:53 EDT
I'm having trouble understanding why this package uses alternatives at all.  What good is switching out one jar?  If there's an application that needs an older version of the jar, then that older version could be packaged as a compat package and the consuming application could reference that specific version.

I have to say, the amount of macro use in this spec is... well... let's just say it makes things pretty hard to read.  So hard, in fact, that I don't think I can properly review this.  But if you really want to macro-ize things to that degree, you need to be be consistent and use %{__install} as well.

You do not need to have explicit scriptlet dependencies for /bin/sh (although it doesn't hurt).

You shouldn't own /etc/maven/fragments or /usr/share/maven2/poms; they are owned by jpackage-utils.

Is it not possible to run the tests at build time in a %check section?  I see a bunch of commented out dependencies which suggest runtime dependencies for the unit tests, which confuses me since generally tests have no impact on the final packages.
Comment 4 Victor G. Vasilyev 2008-08-22 07:56:46 EDT
The third release is prepared for review.
Spec URL: http://www.netbeans.org/files/documents/210/2046/ini4j.spec
SRPM URL: http://nbi.netbeans.org/files/documents/210/2145/ini4j-0.3.2-3.fc10.src.rpm

FYI a page with all resources related to the NetBeans here:
http://nbi.netbeans.org/servlets/ProjectDocumentList?folderID=267

(In reply to comment #3)
> I'm having trouble understanding why this package uses alternatives at all.
- Ability to switch on the alternative implementations is removed.
I agree. Probability to have an alternative implementation of the ini4j on the Fedora platform is very low if only somebody won't recompile the project sources via GCJ. 
 
> I have to say, the amount of macro use in this spec is... well... let's just
> say it makes things pretty hard to read.
- All macroses reflecting a folders layout of the project are removed.
I agree it was noise in this case. Now, there are no user-defined macroses in the spec. I hope the spec is readable now.

> ... you need to be be consistent and use %{__install} as well.
- The %%{__install} macro is used everywhere instead of the install command.

> You do not need to have explicit scriptlet dependencies for /bin/sh.
- Explicit scriptlet dependencies for /bin/sh are removed.

> You shouldn't own /etc/maven/fragments or /usr/share/maven2/poms; they are
> owned by jpackage-utils.
- Owning of /etc/maven/fragments/ini4j is removed.
But, now the rpmlint shows a warning:
------------
$ rpmlint ini4j-0.3.2-3.fc10.noarch.rpm
ini4j.noarch: W: non-conffile-in-etc /etc/maven/fragments/ini4j
1 packages and 0 specfiles checked; 0 errors, 1 warnings.
------------

And, I can't remove owning of /usr/share/maven2/poms due to
RPM build errors:
  Installed (but unpackaged) file(s) found:
  /usr/share/maven2/poms/JPP-ini4j.pom

BTW, the example http://fedoraproject.org/wiki/Packaging/Java#maven_2 recommends to have this owning.

> Is it not possible to run the tests at build time in a %check section?
Yeah, it will be better to have the tests, but it requires a set of extra packages. I guess,  it will be serious overhead if the these packages will only provided to test the ini4j package. Please note, only the junit package in fc10 is meet with the project requirements.

Also, please note, that the ini4j package doesn't have any patches against the original Java code. Therefore, there is no need to have the tests for investigating any regressions.

Nevertheless, to be sure that all is OK I've done a test to proofing of assumption that content of the target JAR generated in the scope of the package is byte-to-byte the same as  content of original JAR - http://downloads.sourceforge.net/ini4j/ini4j-0.3.2-bin.zip

The test has shown only expected differences in the following files:
* META-INF/MANIFEST.MF - some informational values are changed
* META-INF/maven/org.ini4j/ini4j/pom.properties - the build date is different
* META-INF/maven/org.ini4j/ini4j/pom.xml - some lines are commented out according to the specified patch
* org/ini4j/PreferencesBean$1.class and org/ini4j/PreferencesBean.class -
the JDK 1.6.0_03 has been used in the original project, but it has a bug
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6520152
On the other hand,  the OpenJDK 1.6.0 will be used to compile the classes in the scope of the package and the OpenJDK is free from this bug.

So, I can say that the JAR files are the same, and, moreover, from viewpoint of the Java specifications the JAR file for Fedora is better than original one. :-)
Also, I think, we can rely on the unit test results obtained in the scope of the project. 

> I see a bunch of commented out dependencies which suggest runtime dependencies
> for the unit tests, which confuses me since generally tests have no impact on
> the final packages.
There are several solutions to provide the tests, including a separate subpackage that will have these dependencies at the run time.
Such solution lets to test an implementation after installation into the real run-time environment.
I've provided the info about dependencies only to show what will be need if somebody decide to turn on the tests, but if you feel that it is redundant or misleading info then I can remove it at all.
Comment 5 Victor G. Vasilyev 2008-08-22 08:52:16 EDT
Created attachment 314799 [details]
Diff between contents of original JAR file and newly generated one

Attached ini4j-0.3.2.jar_content.diff file is the report of the test intended to check that the original JAR file is the same as a generated one from the package.
Note, to investigate content of both binary files org/ini4j/PreferencesBean$1.class and org/ini4j/PreferencesBean.class the additional textual files was generated via respective commands:
javap -c -private -s -verbose ${fileName}.class > ${fileName}.javap
Comment 6 Victor G. Vasilyev 2008-08-25 10:49:25 EDT
Successful koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=784687
Comment 7 Lillian Angel 2008-08-28 12:10:59 EDT
A few things to look at. See items marked with an X.

X rpmlint:
$ rpmlint /notnfs/langel/rpm/RPMS/noarch/ini4j-*
ini4j.noarch: W: non-conffile-in-etc /etc/maven/fragments/ini4j
2 packages and 0 specfiles checked; 0 errors, 1 warnings.

Can you explain this?


http://fedoraproject.org/wiki/Packaging/Guidelines#Filesystem_Layout

1 Packaging Guidelines

* 1.1 Naming
ok
* 1.2 Legal
ok. 
* 1.3 No inclusion of pre-built binaries or libraries
all removed. ok
* 1.4 Writing a package from scratch
ok
* 1.5 Modifying an existing package
ok
* 1.6 Filesystem Layout
ok
* 1.7 Use rpmlint
see above
* 1.8 Changelogs
ok
* 1.9 Tags
ok
* 1.10 BuildRoot tag
ok
* 1.11 Requires
ok
* 1.12 BuildRequires
ok
X 1.13 Summary and description
Can you take out the line break from the description? Otherwise, ok.
* 1.14 Encoding
ok
X 1.15 Documentation
Is there a license file somewhere? I do not see one in the zip.
* 1.16 Compiler flags
ok
* 1.17 Debuginfo packages
n/a
* 1.18 Exclusion of Static Libraries
n/a
* 1.19 Duplication of system libraries
n/a
* 1.20 Beware of Rpath
n/a
* 1.21 Configuration files
n/a
* 1.22 Initscripts
n/a
* 1.23 Desktop files
n/a
* 1.24 Macros
ok
* 1.25 Handling Locale Files
n/a
* 1.26 Timestamps
n/a
* 1.27 Parallel make
n/a
* 1.28 Scriptlets requirements
n/a
* 1.29 Running scriptlets only in certain situations
n/a
* 1.30 Scriplets are only allowed to write in certain directories
n/a
* 1.31 Conditional dependencies
n/a
* 1.32 Build packages with separate user accounts
n/a
* 1.33 Relocatable packages
n/a
* 1.34 Code Vs Content
ok
* 1.35 File and Directory Ownership
ok
* 1.36 Users and Groups
ok
* 1.37 Web Applications
ok
* 1.38 Conflicts
ok
* 1.39 No External Kernel Modules
ok
* 1.40 No Files or Directories under /srv
ok
* 1.41 Application Specific Guidelines
ok


http://fedoraproject.org/wiki/Packaging/ReviewGuidelines

MUST Items:

- MUST: rpmlint must be run on every package. The output should be posted in the review.
See above.
- MUST: The package must be named according to the Package Naming Guidelines
ok
- MUST: The spec file name must match the base package %{name}, in the format %{name}.spec unless your package has an exemption on Package Naming Guidelines
ok
- MUST: The package must meet the Packaging Guidelines .
ok
- MUST: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines .
I see it is ASL 2.0 http://ini4j.sourceforge.net/license.html. This is fine.
- MUST: The License field in the package spec file must match the actual license.
ok
X MUST: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %doc.
Is there one?
- MUST: The spec file must be written in American English.
ok
- MUST: The spec file for the package MUST be legible.
ok
- MUST: The sources used to build the package must match the upstream source, as provided in the spec URL.
ok
- MUST: The package must successfully compile and build into binary rpms on at least one supported architecture.
ok
- MUST: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense.
ok
- MUST: The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden.
n/a
- MUST: Every binary RPM package which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun. If the package has multiple subpackages with libraries, each subpackage should also have a %post/%postun section that calls /sbin/ldconfig. An example of the correct syntax for this is:
ok
- MUST: If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker.
n/a
- MUST: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory. Refer to the Guidelines for examples.
ok
- MUST: A package must not contain any duplicate files in the %files listing.
ok
- MUST: Permissions on files must be set properly. Executables should be set with executable permissions, for example. Every %files section must include a %defattr(...) line.
ok
- MUST: Each package must have a %clean section, which contains rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ).
ok
- MUST: Each package must consistently use macros, as described in the macros section of Packaging Guidelines .
ok
- MUST: The package must contain code, or permissable content. This is described in detail in the code vs. content section of Packaging Guidelines .
ok
- MUST: Large documentation files should go in a -doc subpackage.
ok
- MUST: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present.
ok
- MUST: Header files must be in a -devel package.
n/a
- MUST: Static libraries must be in a -static package.
n/a
- MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig' (for directory ownership and usability).
n/a
- MUST: If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package.
n/a
- MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name} = %{version}-%{release}
n/a
- MUST: Packages must NOT contain any .la libtool archives, these should be removed in the spec.
ok
- MUST: Packages containing GUI applications must include a %{name}.desktop file.
ok
- MUST: Packages must not own files or directories already owned by other packages.
ok
- MUST: At the beginning of %install, each package MUST run rm -rf %{buildroot} ( or $RPM_BUILD_ROOT ). See Prepping BuildRoot For %install for details.
ok
- MUST: All filenames in rpm packages must be valid UTF-8.
ok


SHOULD Items:

X SHOULD: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it.
Please do this and add it to the docs.
- SHOULD: The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available.
n/a
- SHOULD: The reviewer should test that the package builds in mock. See MockTricks for details on how to do this.
ok
- SHOULD: The package should compile and build into binary rpms on all supported architectures.
ok
- SHOULD: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example.
ok
- SHOULD: If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity.
n/a
- SHOULD: Usually, subpackages other than devel should require the base package using a fully versioned dependency.
n/a
- SHOULD: The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb.
ok
- SHOULD: If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself.
n/a
Comment 8 Victor G. Vasilyev 2008-08-29 14:32:20 EDT
(In reply to comment #7)
> X rpmlint:
> $ rpmlint /notnfs/langel/rpm/RPMS/noarch/ini4j-*
> ini4j.noarch: W: non-conffile-in-etc /etc/maven/fragments/ini4j
> 2 packages and 0 specfiles checked; 0 errors, 1 warnings.
> 
> Can you explain this?

It was explained in the comment #4 above (See the answer for "> You shouldn't own /etc/maven/fragments or /usr/share/maven2/poms; ...").
Note, the spec meets with the example http://fedoraproject.org/wiki/Packaging/Java#maven_2

> X 1.13 Summary and description
> Can you take out the line break from the description? Otherwise, ok.
- Description is formatted

> X 1.15 Documentation
> Is there a license file somewhere? I do not see one in the zip.
The software is protected by the Apache License Version 2.0, January 2004.
The text of the license is accessible on a project page - http://www.ini4j.org/license.html 
The license is also referenced from the text of the legal notices that are placed at the top of each source of the project. 
Note, such solution is completely meet with conditions of this license (See "APPENDIX: How to apply the Apache License to your work." in the license text)

> X MUST: If (and only if) the source package includes the text of the 
> license(s)in its own file, then that file, containing the text of the 
> license(s) for the package must be included in %doc.
> Is there one?
The original upstream of the project doesn't include a license file.
Therefore, this item - N/A

> X SHOULD: If the source package does not include license text(s) as a separate
> file from upstream, the packager SHOULD query upstream to include it.
> Please do this and add it to the docs.
- The http://www.apache.org/licenses/LICENSE-2.0.txt is added as a separate source, i.e. under tag "Source1:" and it is installed via the %doc script.

Additionally it is also changed:
- Versionless symbolic link to the jar is added
- Redundant user-defined macro for the poms directory is removed

Spec URL: http://nbi.netbeans.org/files/documents/210/2046/ini4j.spec
SRPM URL: http://nbi.netbeans.org/files/documents/210/2154/ini4j-0.3.2-4.fc10.src.rpm
Comment 9 Lillian Angel 2008-09-02 10:01:28 EDT
APPROVED.
Comment 10 Victor G. Vasilyev 2008-09-02 13:32:03 EDT
New Package CVS Request
=======================
Package Name: ini4j
Short Description: Java API for handling files in Windows .ini format
Owners: victorv
Branches:
InitialCC:
Comment 11 Kevin Fenzi 2008-09-03 16:25:48 EDT
cvs done.
Comment 12 Victor G. Vasilyev 2008-09-03 18:48:11 EDT
Successful koji build: http://koji.fedoraproject.org/koji/taskinfo?taskID=803464

Note You need to log in before you can comment on or make changes to this bug.