On 24/02/15 18:26, Don Pellegrino wrote:
I am attempting to add an RPM package for Apache Jena to Fedora Linux.
The RPM .spec file and details on the packaging process can be found
in Red Hat Bugzilla Bug 1193730
(https://bugzilla.redhat.com/show_bug.cgi?id=1193730).
Hi there - it's very interesting to see this happening!
I don't have a lot of depth (or indeed any !) in how packaging is done
so please bear me for some simple questions:
Are you building from source, or taking the binaries and repackaging them?
During packaging, I ended up changing the line endings for a few files:
# Address "wrong-file-end-of-line-encoding" warnings from rpmlint
dos2unix javadoc-arq/META-INF/MANIFEST.MF
dos2unix javadoc-core/META-INF/MANIFEST.MF
dos2unix javadoc-sdb/META-INF/MANIFEST.MF
dos2unix javadoc-tdb/META-INF/MANIFEST.MF
Those files are generated generated automatically. I don't know why
they are the line ending they have - the last release wasn't on windows
so maybe the javadoc tool does it (that's a guess - no evidence).
dos2unix src-examples/data/eswc-2006-09-21.rdf
dos2unix src-examples/data/test1.owl
dos2unix src-examples/tdb/examples/ExTDB1.java
dos2unix src-examples/tdb/examples/ExTDB2.java
dos2unix src-examples/tdb/examples/ExTDB3.java
dos2unix src-examples/tdb/examples/ExTDB4.java
dos2unix src-examples/tdb/examples/ExTDB5.java
src-examples - not critical to running.
I don't know of any particular reason to have MSWindows line ends
except, maybe, they are more likely to be viewed on Windows. That said,
nowadays it rarely matters. IDEs "do the right thing". Only old text
editors have problems and they have other issues anyway.
I also used sed to update the scripts in /bin so that they used
/etc/jena-log4j.properties and found the .jar files in the
system-level jar directory:
The scripts will use their own copy of jena-log4j.properties - it's
built into jena-core.
All the ARQ related scripts have a built-in logging configuration anyway
- they do look around for a local copy of log4j.properties.
# Modify the scripts to use the sysconfdir jena-log4j.properties file
# instead of relative paths.
find bin -type f -exec sed -i
's|LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"|LOGGING="${LOGGING:--Dlog4j.configuration=file:%{_sysconfdir}/jena-log4j.properties}"|g'
{} \;
# Modify the scripts to use the javadir for JAR dependencies instead
# of relative paths.
find bin -type f -exec sed -i 's|-cp "$JENA_CP"|-cp
"%{_javadir}/%{name}/*"|g' {} \;
Let me know if you have any interest in the Fedora package or feedback
on the packaging.
It's really helpful to have this being done and outside the core
committers. There are simply too many setups and variations to handle.
That is one of the reasons why Apache releases source, not just binaries
(other reasons being provenance and verifiability).
It's quite likely the scripts should be changed. They are written for a
downloaded "apache-jena" setup.
They are all made by "template.bin" and running "cmd-maker" in
jena/apache-jena so you can make changes in one place and reform the
scripts if you wish to do it that way.
Andy