diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd3d46f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/Rhino1_7_7_1_RELEASE.tar.gz diff --git a/.rh-maven35-rhino.metadata b/.rh-maven35-rhino.metadata new file mode 100644 index 0000000..0356306 --- /dev/null +++ b/.rh-maven35-rhino.metadata @@ -0,0 +1 @@ +d8af09f7c33b72c57a80f4f0fc2ba0a86ca3c4be SOURCES/Rhino1_7_7_1_RELEASE.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/rhino-1.7.7.1.pom b/SOURCES/rhino-1.7.7.1.pom new file mode 100644 index 0000000..16d97b8 --- /dev/null +++ b/SOURCES/rhino-1.7.7.1.pom @@ -0,0 +1,41 @@ + + 4.0.0 + + + org.sonatype.oss + oss-parent + 7 + + + org.mozilla + rhino + Mozilla Rhino + 1.7.7.1 + + jar + + Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically + embedded into Java applications to provide scripting to end users. + + https://developer.mozilla.org/en/Rhino + + + + Mozilla Public License, Version 2.0 + http://www.mozilla.org/MPL/2.0/index.txt + + + + + scm:git:git@github.com:mozilla/rhino.git + scm:git:git@github.com:mozilla/rhino.git + git@github.com:mozilla/rhino.git + + + + The Mozilla Foundation + http://www.mozilla.org + + diff --git a/SOURCES/rhino-addOrbitManifest.patch b/SOURCES/rhino-addOrbitManifest.patch new file mode 100644 index 0000000..c2579c7 --- /dev/null +++ b/SOURCES/rhino-addOrbitManifest.patch @@ -0,0 +1,32 @@ +--- src/manifest 2015-06-26 09:16:53.592746825 +0300 ++++ src/manifest.fixManifest 2015-06-26 09:19:57.296939380 +0300 +@@ -4,3 +4,28 @@ Implementation-Version: 1.7.7-SNAPSHOT + Implementation-Title: Mozilla Rhino 1.7.7.1 + Implementation-Vendor: Mozilla Foundation + Implementation-URL: http://www.mozilla.org/rhino ++Bundle-Vendor: %Bundle-Vendor.0 ++Bundle-Localization: plugin ++Bundle-RequiredExecutionEnvironment: J2SE-1.5 ++Bundle-Name: %Bundle-Name.0 ++Bundle-SymbolicName: org.mozilla.javascript ++Bundle-Version: 1.7.7 ++Export-Package: org.mozilla.classfile,org.mozilla.javascript,org.mozil ++ la.javascript.debug,org.mozilla.javascript.jdk13,org.mozilla.javascri ++ pt.jdk15,org.mozilla.javascript.optimizer,org.mozilla.javascript.rege ++ xp,org.mozilla.javascript.serialize,org.mozilla.javascript.tools,org. ++ mozilla.javascript.tools.debugger,org.mozilla.javascript.tools.debugg ++ er.treetable,org.mozilla.javascript.tools.idswitch,org.mozilla.javasc ++ ript.tools.jsc,org.mozilla.javascript.tools.shell,org.mozilla.javascr ++ ipt.xml,org.mozilla.javascript.xml.impl.xmlbeans,org.mozilla.javascri ++ pt.xmlimpl ++Bundle-ManifestVersion: 2 ++Import-Package: javax.swing;resolution:=optional,javax.swing.border;re ++ solution:=optional,javax.swing.event;resolution:=optional,javax.swing ++ .filechooser;resolution:=optional,javax.swing.table;resolution:=optio ++ nal,javax.swing.text;resolution:=optional,javax.swing.tree;resolution ++ :=optional,javax.xml.namespace;resolution:=optional,javax.xml.parsers ++ ;resolution:=optional,javax.xml.transform;resolution:=optional,javax. ++ xml.transform.dom;resolution:=optional,javax.xml.transform.stream;res ++ olution:=optional,org.w3c.dom;resolution:=optional,org.xml.sax;resolu ++ tion:=optional +\ No newline at end of file diff --git a/SOURCES/rhino-build.patch b/SOURCES/rhino-build.patch new file mode 100644 index 0000000..88469a3 --- /dev/null +++ b/SOURCES/rhino-build.patch @@ -0,0 +1,175 @@ +--- a/examples/Matrix.java ++++ b/examples/Matrix.java +@@ -218,7 +218,7 @@ public class Matrix implements Scriptabl + * Use the convenience method from Context that takes care of calling + * toString, etc. + */ +- public Object getDefaultValue(Class typeHint) { ++ public Object getDefaultValue(Class typeHint) { + return "[object Matrix]"; + } + +--- a/examples/PrimitiveWrapFactory.java ++++ b/examples/PrimitiveWrapFactory.java +@@ -25,7 +25,7 @@ import org.mozilla.javascript.*; + public class PrimitiveWrapFactory extends WrapFactory { + @Override + public Object wrap(Context cx, Scriptable scope, Object obj, +- Class staticType) ++ Class staticType) + { + if (obj instanceof String || obj instanceof Number || + obj instanceof Boolean) +--- a/src/org/mozilla/javascript/WrapFactory.java ++++ b/src/org/mozilla/javascript/WrapFactory.java +@@ -42,7 +42,7 @@ public class WrapFactory + * @return the wrapped value. + */ + public Object wrap(Context cx, Scriptable scope, +- Object obj, Class staticType) ++ Object obj, Class staticType) + { + if (obj == null || obj == Undefined.instance + || obj instanceof Scriptable) +--- a/toolsrc/org/mozilla/javascript/tools/debugger/build.xml ++++ b/toolsrc/org/mozilla/javascript/tools/debugger/build.xml +@@ -8,7 +8,7 @@ + + + +- + + +@@ -16,9 +16,9 @@ + +- +- +- ++ ++ ++ + + + +@@ -26,58 +26,58 @@ + + + +- ++ + import java.awt.Component; + +-package org.mozilla.javascript.tools.debugger.downloaded; ++package org.mozilla.javascript.tools.debugger.treetable; + + +- ++ + import java.awt.event.*; + + +- ++ + import java.awt.AWTEvent; + + +- ++ + import java.io.Serializable; + + +- ++ + import javax.swing.*; + +- package org.mozilla.javascript.tools.debugger.downloaded; ++ package org.mozilla.javascript.tools.debugger.treetable; + import javax.swing.*; + + +- ++ + class ListToTreeSelectionModelWrapper + public class ListToTreeSelectionModelWrapper + +- ++ + ListSelectionModel getListSelectionModel + public ListSelectionModel getListSelectionModel + +- ++ + import java.awt.Rectangle; + + +- ++ + import javax.swing.tree.TreeModel; + +- package org.mozilla.javascript.tools.debugger.downloaded; ++ package org.mozilla.javascript.tools.debugger.treetable; + import javax.swing.tree.TreeModel; + + +- ++ + import javax.swing.JTree; + +- package org.mozilla.javascript.tools.debugger.downloaded; ++ package org.mozilla.javascript.tools.debugger.treetable; + import javax.swing.JTree; + + +- ++ + + + +--- a/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java ++++ b/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java +@@ -36,7 +36,7 @@ public class JavaPolicySecurity extends + return super.defineClass(name, data, 0, data.length, domain); + } + +- public void linkClass(Class cl) { ++ public void linkClass(Class cl) { + resolveClass(cl); + } + } +--- a/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java ++++ b/xmlimplsrc/org/mozilla/javascript/xmlimpl/Namespace.java +@@ -86,7 +86,7 @@ class Namespace extends IdScriptableObje + } + + @Override +- public Object getDefaultValue(Class hint) { ++ public Object getDefaultValue(Class hint) { + return uri(); + } + +--- a/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java ++++ b/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java +@@ -116,7 +116,7 @@ final class QName extends IdScriptableOb + } + + @Override +- public Object getDefaultValue(Class hint) { ++ public Object getDefaultValue(Class hint) { + return toString(); + } + +--- a/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java ++++ b/xmlimplsrc/org/mozilla/javascript/xmlimpl/XMLObjectImpl.java +@@ -105,7 +105,7 @@ abstract class XMLObjectImpl extends XML + } + + @Override +- public final Object getDefaultValue(Class hint) { ++ public final Object getDefaultValue(Class hint) { + return this.toString(); + } + diff --git a/SOURCES/rhino.script b/SOURCES/rhino.script new file mode 100644 index 0000000..02d7769 --- /dev/null +++ b/SOURCES/rhino.script @@ -0,0 +1,32 @@ +#!/bin/sh +# +# rhino script +# JPackage Project + +# Source functions library +. /usr/share/java-utils/java-functions + +# Source system prefs +if [ -f /etc/rhino.conf ] ; then + . /etc/rhino.conf +fi + +# Source user prefs +if [ -f $HOME/.rhinorc ] ; then + . $HOME/.rhinorc +fi + +# Configuration +MAIN_CLASS=org.mozilla.javascript.tools.shell.Main +# Remove xmlbeans until we have it in Fedora +#BASE_JARS="rhino jline xmlbeans/xbean" +BASE_JARS="rhino jline/jline jansi" + +# Set parameters +set_jvm +set_classpath $BASE_JARS +set_flags $BASE_FLAGS +set_options $BASE_OPTIONS + +# Let's start +run "$@" diff --git a/SPECS/rhino.spec b/SPECS/rhino.spec new file mode 100644 index 0000000..00fc86c --- /dev/null +++ b/SPECS/rhino.spec @@ -0,0 +1,333 @@ +%{?scl:%scl_package rhino} +%{!?scl:%global pkg_name %{name}} + +# Copyright (c) 2000-2005, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the JPackage Project nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +%define scm_version 1_7_7_1 + +Name: %{?scl_prefix}rhino +Version: 1.7.7.1 +Release: 2.2%{?dist} +Summary: JavaScript for Java +License: MPLv2.0 + +Source0: https://github.com/mozilla/rhino/archive/Rhino%{scm_version}_RELEASE.tar.gz +Source1: http://repo1.maven.org/maven2/org/mozilla/rhino/%{version}/rhino-%{version}.pom +Source2: %{pkg_name}.script + +Patch0: %{pkg_name}-build.patch +# Add OSGi metadata from Eclipse Orbit project +Patch1: %{pkg_name}-addOrbitManifest.patch + +URL: http://www.mozilla.org/rhino/ + +BuildRequires: %{?scl_prefix}ant +BuildRequires: java-devel >= 1:1.6.0.0 +BuildRequires: %{?scl_prefix}sonatype-oss-parent +BuildRequires: %{?scl_prefix}javapackages-local +Requires: %{?scl_prefix}jline + +# Disable xmlbeans until we can get it into Fedora +#Requires: xmlbeans +#BuildRequires: xmlbeans +BuildArch: noarch + +%description +Rhino is an open-source implementation of JavaScript written entirely +in Java. It is typically embedded into Java applications to provide +scripting to end users. + +%package demo +Summary: Examples for %{pkg_name} + +%description demo +Examples for %{pkg_name}. + +%prep +%setup -q -n %{pkg_name}-Rhino%{scm_version}_RELEASE +%patch0 -p1 -b .build +%patch1 -b .fixManifest + +# Fix manifest +sed -i -e '/^Class-Path:.*$/d' src/manifest + +# Add jpp release info to version +sed -i -e 's|^implementation.version: Rhino .* release .* \${implementation.date}|implementation.version: Rhino %{version} release %{release} \${implementation.date}|' build.properties + +%mvn_alias : rhino:js +%mvn_file : js %{pkg_name} + +%build +ant deepclean jar copy-all -Dno-xmlbeans=1 +%mvn_artifact %{SOURCE1} build/%{pkg_name}%{version}/js.jar + +pushd examples + +export CLASSPATH=../build/%{pkg_name}%{version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null) +%{javac} *.java +%{jar} cf ../build/%{pkg_name}%{version}/%{pkg_name}-examples.jar *.class +popd + +%install +%mvn_install + +# man page +mkdir -p %{buildroot}%{_mandir}/man1/ +install -m 644 man/%{pkg_name}.1 %{buildroot}%{_mandir}/man1/%{pkg_name}.1 + +## script +mkdir -p %{buildroot}%{_bindir} +install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/%{pkg_name} + +# examples +cp -a build/%{pkg_name}%{version}/%{pkg_name}-examples.jar %{buildroot}%{_javadir}/%{pkg_name}-examples.jar +mkdir -p %{buildroot}%{_datadir}/%{pkg_name} +cp -a examples/* %{buildroot}%{_datadir}/%{pkg_name} +find %{buildroot}%{_datadir}/%{pkg_name} -name '*.build' -delete + +%files -f .mfiles +%defattr(0644,root,root,0755) +%attr(0755,root,root) %{_bindir}/* +%{_javadir}/* +%{_mandir}/man1/%{pkg_name}.1* + +%files demo +%{_datadir}/%{pkg_name} + +%changelog +* Thu Jun 22 2017 Michael Simacek - 1.7.7.1-2.2 +- Mass rebuild 2017-06-22 + +* Wed Jun 21 2017 Java Maintainers - 1.7.7.1-2.1 +- Automated package import and SCL-ization + +* Sat Feb 11 2017 Fedora Release Engineering - 1.7.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jun 16 2016 Alexander Kurtakov 1.7.7.1-1 +- Update to version 1.7.7.1. + +* Thu Jun 16 2016 Alexander Kurtakov 1.7.7-5 +- Add BR javapackages-local to unbreak build. + +* Wed Jun 15 2016 Mikolaj Izdebski - 1.7.7-4 +- Install JAR and POM with %%mvn_install + +* Thu Feb 04 2016 Fedora Release Engineering - 1.7.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jul 28 2015 Alexander Kurtakov 1.7.7-2 +- Fix launch script. + +* Fri Jun 26 2015 Alexander Kurtakov 1.7.7-1 +- Update to upstream 1.7.7 release. + +* Thu Jun 18 2015 Fedora Release Engineering - 1.7R4-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Jun 10 2014 Alexander Kurtakov 1.7R4-10 +- No longer ship javadoc subpackage and obsolete it. + +* Tue Jun 10 2014 Alexander Kurtakov 1.7R4-9 +- Use mfiles. + +* Sun Jun 08 2014 Fedora Release Engineering - 1.7R4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Jan 14 2014 Matěj Cepl - 1.7R4-7 +- Add overlow detection patch from the upstream (RHBZ# 1011947) +- Update all patches. + +* Mon Sep 09 2013 Elliott Baron 1.7R4-6 +- Update and add missing options for Rhino shell man page. + +* Thu Aug 29 2013 Alexander Kurtakov 1.7R4-5 +- Drop R on java-devel - rhbz #991706. + +* Thu Aug 1 2013 akurtakov 1.7R4-4 +- Add R on java-devel as rhino requires tools.jar at runtime. + +* Mon Jun 24 2013 Elliott Baron 1.7R4-3 +- Add man page for Rhino shell. + +* Thu Feb 28 2013 Krzysztof Daniel 1.7R4-2 +- Add a depmap to keep compatibility with previous versions. + +* Tue Feb 26 2013 Alexander Kurtakov 1.7R4-1 +- Update to 1.7R4. + +* Thu Feb 14 2013 Fedora Release Engineering - 1.7R3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Nov 2 2012 Mikolaj Izdebski - 1.7R3-7 +- Add maven POM + +* Sat Jul 21 2012 Fedora Release Engineering - 1.7R3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 12 2012 Bill Nottingham - 1.7R3-5 +- build against OpenJDK 1.7 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.7R3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sun Oct 16 2011 Ville Skyttä - 1.7R3-3 +- Crosslink javadocs with Java's. +- Drop versioned jars and javadoc dir. +- Exclude patch backup files from -examples. + +* Wed Sep 21 2011 Matěj Cepl - 1.7R3-2 +- Remove bea-stax-api dependency (and perl as well) + +* Fri Sep 16 2011 Matěj Cepl - 1.7R3-1 +- Fix numbering of the package (this is not a prerelease) +- Remove unnecessary macros +- Increase happines of rpmlint (better Group tags) + +* Wed Sep 14 2011 Matěj Cepl - 1.7-0.10.r3 +- New upstream pre-release. + +* Wed Jul 6 2011 Andrew Overholt 0:1.7-0.9.r2 +- Inject OSGi metadata from Eclipse Orbit project. + +* Wed Feb 09 2011 Fedora Release Engineering - 0:1.7-0.8.r2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Jul 26 2009 Fedora Release Engineering - 0:1.7-0.7.r2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sun May 31 2009 Toshio Kuratomi - 0:1.7-0.6.r2 +- Update to rhino1_7R2 +- Add patch from Steven Elliott to fix exception in the interpreter shell. + +* Mon Apr 20 2009 Lillian Angel - 0:1.7-0.4.r2pre.1.1 +- Added jpackage-utils requirement. +- Resolves: rhbz#496435 + +* Thu Mar 26 2009 Lillian Angel - 0:1.7-0.3.r2pre.1.1 +- Updated rhino-build.patch +- License for treetable has been fixed. Re-included this code, and removed patch. +- Resolves: rhbz#457336 + +* Wed Feb 25 2009 Fedora Release Engineering - 0:1.7-0.2.r2pre.1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Feb 13 2009 Lillian Angel - 0:1.7-0.1.r2pre.1.1 +- Upgraded to 1.7r2pre. +- Resolves: rhbz#485135 + +* Thu Jul 10 2008 Tom "spot" Callaway - 0:1.6-0.1.r5.1.3 +- drop repotag +- fix license tag + +* Thu Mar 15 2007 Matt Wringe 0:1.6-0.1.r5.1jpp.2 +- Remove script from build as the debugging tool is disabled due to it + containing proprietary code from Sun. + +* Wed Mar 07 2007 Deepak Bhole 0:1.6-0.1.r5.1jpp.1 +- Upgrade to 1.6r5 +- Change release per Fedora guidelines +- Disable dependency on xmlbeans (optional component, not in Fedora yet) +- Disable building of debugger tool, as it needs confidential code from Sun +- Remove post/postuns for javadoc and add the two dirs as %%doc + +* Wed Jun 14 2006 Ralph Apel 0:1.6-0.r2.2jpp +- Add bea-stax-api in order to build xmlimpl classes + +* Wed May 31 2006 Fernando Nasser 0:1.6-0.r2.1jpp +- Upgrade to RC2 + +* Mon Apr 24 2006 Fernando Nasser 0:1.6-0.r1.2jpp +- First JPP 1.7 build + +* Thu Dec 02 2004 David Walluck 0:1.6-0.r1.1jpp +- 1_6R1 +- add demo subpackage containing example code +- add jpp release info to implementation version +- add script to launch js shell +- build E4X implementation (Requires: xmlbeans) +- remove `Class-Path' from manifest + +* Tue Aug 24 2004 Fernando Nasser - 0:1.5-1.R5.1jpp +- Update to 1.5R5. +- Rebuild with Ant 1.6.2 + +* Sat Jul 19 2003 Ville Skyttä - 0:1.5-1.R4.1.1jpp +- Update to 1.5R4.1. +- Non-versioned javadoc dir symlink. + +* Fri Apr 11 2003 David Walluck 0:1.5-0.R4.2jpp +- remove build patches in favor of perl +- add epoch + +* Sun Mar 30 2003 Ville Skyttä - 1.5-0.r4.1jpp +- Update to 1.5R4. +- Rebuild for JPackage 1.5. + +* Wed May 08 2002 Guillaume Rousse 1.5-0.R3.1jpp +- 1.5R3 +- versioned dir for javadoc + +* Sun Mar 10 2002 Guillaume Rousse 1.5-0.R2.9jpp +- versioned compatibility symlink + +* Mon Jan 21 2002 Guillaume Rousse 1.5-0.R2.8jpp +- section macro +- new release scheme + +* Thu Jan 17 2002 Guillaume Rousse 1.5R2-7jpp +- spec cleanup +- changelog corrections + +* Fri Jan 11 2002 2002 Guillaume Rousse 1.5R2-6jpp +- backward compatibility js.jar symlink +- used original swing exemples archive +- fixed javadoc empty package-list file +- no dependencies for manual and javadoc packages + +* Sat Dec 1 2001 Guillaume Rousse 1.5R2-5jpp +- javadoc in javadoc package +- fixed offline build + +* Wed Nov 21 2001 Christian Zoffoli 1.5R2-4jpp +- changed extension --> jpp + +* Sat Oct 6 2001 Guillaume Rousse 1.5R2-3jpp +- first unified release +- s/jPackage/JPackage +- corrected license to MPL + +* Sat Sep 15 2001 Guillaume Rousse 1.5R2-2mdk +- spec cleanup +- standardized cvs references + +* Fri Aug 31 2001 Guillaume Rousse 1.5R2-1mdk +- first Mandrake release