# Note to packagers: When rebasing this to a later version, do not # forget to ensure that sources 1 and 2 are up to date as well as # the Requires list. %global majorversion 1.8 %global archiver 1_8_9 Name: groovy18 Version: 1.8.9 Release: 34%{?dist} Summary: Dynamic language for the Java Platform # Some of the files are licensed under BSD and CPL terms, but the CPL has been superceded # by the EPL. We include copies of both for completeness. # groovyConsole uses CC-BY licensed icons # thanks to Michal Srb and Mikolaj Izdebski, and Tom Callaway License: ASL 2.0 and BSD and EPL and Public Domain and CC-BY URL: http://groovy-lang.org Source0: https://github.com/groovy/groovy-core/archive/GROOVY_%{archiver}.zip # thanks to Johannes Lips and Matt Spaulding Source1: groovy18-script Source2: groovy18-starter.conf Source4: cpl-v10.txt Source5: epl-v10.txt Source6: http://www.apache.org/licenses/LICENSE-2.0.txt # thanks to Andy Grimm Patch0: groovy-inner-interface-annotations.patch Patch1: groovy-build-with-java8.patch Patch2: groovy-servlet31.patch Patch3: groovy-commons-cli-1.3.patch Patch4: groovy-CVE-2015-3253-and-CVE-2016-6814.patch BuildRequires: ant BuildRequires: antlr-tool BuildRequires: ant-antlr BuildRequires: objectweb-asm3 BuildRequires: bsf BuildRequires: apache-ivy BuildRequires: jansi BuildRequires: jline1 BuildRequires: glassfish-jsp-api BuildRequires: junit BuildRequires: glassfish-servlet-api BuildRequires: xstream BuildRequires: java-devel >= 1.8 BuildRequires: desktop-file-utils BuildRequires: jpackage-utils BuildRequires: apache-commons-cli BuildRequires: unzip BuildRequires: javapackages-local BuildRequires: mvn(org.apache.ant:ant-junit) BuildRequires: mvn(org.apache.ant:ant-launcher) BuildRequires: mvn(javax.servlet:servlet-api) BuildRequires: mvn(javax.servlet:jsp-api) Requires: %{name}-lib = %{version}-%{release} # Following dependencies are optional from Maven POV, # but upstream ships them in binary distribution Requires: mvn(junit:junit) # Only used for command line tools: Requires: mvn(commons-cli:commons-cli) # Only used for Ant tasks & scripting tool: Requires: mvn(org.apache.ant:ant) Requires: mvn(org.apache.ant:ant-antlr) Requires: mvn(org.apache.ant:ant-launcher) Requires: mvn(org.apache.ant:ant-junit) # Only used for BSF adapter: Requires: mvn(bsf:bsf) Requires: mvn(commons-logging:commons-logging) # Used for servlet / gsp: Requires: glassfish-jsp-api Requires: glassfish-servlet-api # Used to dump out the AST, xpp only needed for reading: Requires: mvn(com.thoughtworks.xstream:xstream) # Used for richer interactive groovysh support: Requires: mvn(jline:jline:1) Requires: mvn(org.fusesource.jansi:jansi) # Used for @Grab and Grapes: Requires: mvn(org.apache.ivy:ivy) Requires: mvn(org.codehaus.gpars:gpars) # Joint compilation requires tools.jar from java-devel Suggests: java-devel BuildArch: noarch %description Groovy is an agile and dynamic language for the Java Virtual Machine, built upon Java with features inspired by languages like Python, Ruby and Smalltalk. It seamlessly integrates with all existing Java objects and libraries and compiles straight to Java byte-code so you can use it anywhere you can use Java. %package lib Summary: Groovy JAR artifact %description lib This package contains Groovy JAR artifact. %package javadoc Summary: API Documentation for %{name} %description javadoc JavaDoc documentation for %{name} %prep %setup -q -n groovy-core-GROOVY_%{archiver} find . -name "*.class" -delete find . -name "*.jar" -delete cp %{SOURCE4} %{SOURCE5} %{SOURCE6} . %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 # build.xml is not compatible with Ant 1.10+ sed -i "s| depends=\"-excludeLegacyAntVersion\"||" build.xml # We don't want to generate auto-R on optional dependencies %pom_xpath_replace "pom:dependency[pom:optional[text()='true']]/pom:scope" "provided" # java 7 apis %pom_remove_dep org.livetribe:livetribe-jsr223 # explicit tomcat apis sed -i "s|javax.servlet|org.apache.tomcat|" pom.xml sed -i "s|jsp-api|tomcat-jsp-api|" pom.xml sed -i "s|2.0|any|" pom.xml sed -i "s|servlet-api|tomcat-servlet-api|" pom.xml sed -i "s|2.4|any|" pom.xml # fix non ASCII chars for s in src/main/groovy/transform/NotYetImplemented.java\ src/main/org/codehaus/groovy/transform/NotYetImplementedASTTransformation.java;do native2ascii -encoding UTF8 ${s} ${s} done # build against shaded asm3 # TODO: fast&ugly, this could use some improvements find . -name "*.java" -exec sed -i 's|org.objectweb.asm|org.objectweb.distroshaded.asm|g' {} + find . -name "*.groovy" -exec sed -i 's|org.objectweb.asm|org.objectweb.distroshaded.asm|g' {} + %pom_change_dep :asm :asm-distroshaded %pom_change_dep :asm-commons :asm-commons-distroshaded %pom_change_dep :asm-util :asm-util-distroshaded %pom_change_dep :asm-analysis :asm-analysis-distroshaded %pom_change_dep :asm-tree :asm-tree-distroshaded %mvn_package : %{name}-lib %mvn_file : groovy %{name} %mvn_alias : :groovy-all :%{name}-all :%{name} %mvn_compat_version : "1.8" "1.8.9" %build mkdir -p target/lib/{compile,tools} # Construct classpath build-jar-repository target/lib/compile glassfish-servlet-api glassfish-jsp-api/javax.servlet.jsp-api \ objectweb-asm3/asm-tree-distroshaded objectweb-asm3/asm-distroshaded \ objectweb-asm3/asm-util-distroshaded objectweb-asm3/asm-analysis-distroshaded \ antlr ant/ant-antlr antlr \ bsf jline1/jline-1 xstream ant junit apache-ivy commons-cli \ jansi # Build # TODO: Build at least tests, maybe examples export CLASSPATH=$(build-classpath ant/ant-antlr) ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ createJars javadoc %install %mvn_artifact pom.xml target/dist/groovy.jar %mvn_install -J target/html/api/ # Startup scripts install -d $RPM_BUILD_ROOT%{_bindir} install -p -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name} for TOOL in grape18 %{name}c %{name}Console java2%{name} %{name}sh do ln $RPM_BUILD_ROOT%{_bindir}/%{name} \ $RPM_BUILD_ROOT%{_bindir}/$TOOL done # Configuration install -d $RPM_BUILD_ROOT%{_sysconfdir} install -p -m644 %{SOURCE2} \ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-starter.conf %files %{_bindir}/* %config(noreplace) %{_sysconfdir}/%{name}-starter.conf %doc README.md %license LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt %files lib -f .mfiles-%{name}-lib %license LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt %files javadoc %{_javadocdir}/%{name} %license LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt %changelog * Thu Jul 25 2019 Fedora Release Engineering - 1.8.9-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Feb 01 2019 Fedora Release Engineering - 1.8.9-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 1.8.9-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 1.8.9-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Aug 23 2017 Mikolaj Izdebski - 1.8.9-30 - Fix remote code execution vulnerability - Resolves: CVE-2015-3253 * Wed Jul 26 2017 Fedora Release Engineering - 1.8.9-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Tue Jul 11 2017 Mikolaj Izdebski - 1.8.9-28 - Actually apply patch for CVE-2016-6814 * Tue Jul 11 2017 Mikolaj Izdebski - 1.8.9-27 - Fix Information disclosure vulnerability - Resolves: CVE-2016-6814 * Fri Feb 10 2017 Fedora Release Engineering - 1.8.9-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Thu Jan 5 2017 Mikolaj Izdebski - 1.8.9-25 - Make build.xml work with Ant 1.10 * Wed Feb 03 2016 Fedora Release Engineering - 1.8.9-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Jul 14 2015 Mikolaj Izdebski - 1.8.9-23 - Remove strict dependency on java-devel * Thu Jun 25 2015 Michal Srb - 1.8.9-22 - Port to commons-cli 1.3 * Wed Jun 17 2015 Fedora Release Engineering - 1.8.9-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Mar 30 2015 Michal Srb - 1.8.9-20 - Remove -cp hack * Mon Mar 30 2015 Michal Srb - 1.8.9-19 - Build with servlet 3.1 * Fri Mar 13 2015 Michal Srb - 1.8.9-18 - Fix URL and Source0 tag * Wed Feb 04 2015 gil cattaneo 1.8.9-17 - introduce license macro * Tue Nov 25 2014 Michal Srb - 1.8.9-16 - Fix JAR filename (Resolves: rhbz#1166707) - Provide also :groovy:1.8.9 in addition to :groovy18:1.8.9 - Enable gpars at runtime * Wed Oct 29 2014 Michal Srb - 1.8.9-15 - Provide also "1.8.9" version (Resolves: rhbz#1158543) * Wed Aug 20 2014 Michal Srb - 1.8.9-14 - Introduce groovy-lib subpackage * Tue Aug 19 2014 Michal Srb - 1.8.9-13 - Add missing alias: org.codehaus.groovy:groovy18-all - Make this package compat again * Mon Aug 18 2014 Michal Srb - 1.8.9-12 - Migrate to mvn_artifact - Fix location of ivy artifact * Mon Jun 16 2014 Michal Srb - 1.8.9-11 - Fix FTBFS * Sat Jun 07 2014 Fedora Release Engineering - 1.8.9-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Dec 06 2013 Michal Srb - 1.8.9-9 - Shaded asm3 artifacts have no classifier * Fri Dec 06 2013 Michal Srb - 1.8.9-8 - Fix what I have broken (transition to shaded asm3) * Thu Dec 05 2013 Michal Srb - 1.8.9-7 - Build against shaded asm3 * Fri Nov 15 2013 gil cattaneo 1.8.9-6 - use objectweb-asm3 * Fri Nov 01 2013 Michal Srb - 1.8.9-5 - Switch to jline1 (Resolves: rhbz#1022971) * Sat Aug 03 2013 Fedora Release Engineering - 1.8.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Jul 04 2013 gil cattaneo - 1.8.9-3 - fix groovy18-script, thanks to Matt Spaulding * Tue Jun 11 2013 gil cattaneo - 1.8.9-2 - packaged as a compatibility package * Sat Apr 20 2013 gil cattaneo - 1.8.9-1 - Updated to upstream version 1.8.9 - renamed and rebuilt for gmaven * Thu Apr 11 2013 Matt Spaulding - 1.8.8-4 - Now accepts classpath argument (RHBZ #810885) * Mon Apr 8 2013 Andy Grimm - 1.8.8-3 - Apply patch for GROOVY-6085 (RHBZ #949352) * Thu Feb 14 2013 Fedora Release Engineering - 1.8.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Nov 27 2012 Tom Callaway - 1.8.8-1 - Update to 1.8.8 - Fix licensing issues * Wed Jul 25 2012 Johannes Lips - 1.8.7-1 - Update to 1.8.7 * Thu Jul 19 2012 Fedora Release Engineering - 1.8.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Mar 21 2012 Alexander Kurtakov 1.8.6-4 - Move to tomcat v7 apis. - Guideline fixes. * Fri Mar 09 2012 Johannes Lips - 1.8.6-3 - fixed the path of jvm in the startup script * Sat Mar 03 2012 Johannes Lips - 1.8.6-2 - fixed the startup script by adding jansi as dep * Wed Feb 22 2012 Johannes Lips - 1.8.6-1 - Update to 1.8.6 * Tue Jan 03 2012 Johannes Lips - 1.8.5-1 - Update to 1.8.5 * Sun Nov 20 2011 Johannes Lips - 1.8.4-1 - Update to 1.8.4 * Thu Oct 13 2011 Johannes Lips - 1.8.3-2 - remove the nojansi patch since jansi is in fedora * Thu Oct 13 2011 Johannes Lips - 1.8.3-1 - Update to 1.8.3 * Tue Sep 06 2011 Johannes Lips - 1.8.2-1 - Update to 1.8.2 * Sat Aug 13 2011 Johannes Lips - 1.8.1-3 - adjusted the maven pom dir * Sat Aug 13 2011 Johannes Lips - 1.8.1-2 - updated the nojansi patch * Sat Aug 13 2011 Johannes Lips - 1.8.1-1 - Update to 1.8.1 * Wed May 04 2011 Johannes Lips - 1.8.0-2 - Minor changes to reflect changes to packaging guidelines * Fri Apr 29 2011 Johannes Lips - 1.8.0-1 - Update to 1.8.0 * Wed Feb 09 2011 Fedora Release Engineering - 1.7.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sat Nov 6 2010 Alexander Kurtakov 1.7.2-3 - Build with servlet and jsp apis from tomcat6. * Thu Jun 17 2010 Lubomir Rintel - 1.7.2-2 - Fix a typo * Tue Apr 20 2010 Lubomir Rintel - 1.7.2-1 - Bump version * Fri Apr 02 2010 Lubomir Rintel - 1.7.1-1 - Bump version - Revert addition of jansi dependency * Fri Apr 02 2010 Lubomir Rintel - 1.7.0-2 - Add maven depmap * Wed Feb 17 2010 Lubomir Rintel - 1.7.0-1 - New upstream version - Use asm 3.1 instead of asm2 * Fri Dec 04 2009 Lubomir Rintel - 1.6.7-1 - New upstream version - Make Jochen happy * Thu Dec 03 2009 Lubomir Rintel - 1.6.6-2 - Build with OpenJDK * Mon Nov 30 2009 Lubomir Rintel - 1.6.6-1 - Bump to 1.6.6 - Don't mistakenly require itself (Jochen Schmitt, #534168#c3) * Fri Nov 27 2009 Lubomir Rintel - 1.6.5-2 - Hopefully fix mockbuild * Mon Nov 09 2009 Lubomir Rintel - 1.6.5-1 - Initial Fedora packaging