Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jflex for openSUSE:Factory checked in at 2022-01-15 21:45:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jflex (Old) and /work/SRC/openSUSE:Factory/.jflex.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jflex" Sat Jan 15 21:45:07 2022 rev:20 rq:946337 version:1.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/jflex/jflex-bootstrap.changes 2017-10-06 10:55:20.466906400 +0200 +++ /work/SRC/openSUSE:Factory/.jflex.new.1892/jflex-bootstrap.changes 2022-01-15 21:45:12.345614278 +0100 @@ -1,0 +2,21 @@ +Fri Jan 14 07:05:37 UTC 2022 - Fridrich Strba <fst...@suse.com> + +- Upgrade to version 1.8.2 + * fix build with recent java-cup +- Build the bootstrap package using ant with a generated build.xml +- Build the non-bootstrap package using maven, since its dependency + auto is already built with maven +- Added patch: + * jflex-1.8.2-no-auto-value.patch + + do not process auto-value-annotations in bootstrap build + + the generated file is pre-generated outside build for this + variant +- Removed patches: + * jflex-byaccj-utl.patch + * jflex-classpath.patch + * jflex-javac-no-target.patch + * jflex-junit4.patch + * jflex-no-cup-no-jflex.patch + + not needed in this version + +------------------------------------------------------------------- jflex.changes: same change Old: ---- jflex-1.4.3.tar.bz2 jflex-byaccj-utl.patch jflex-classpath.patch jflex-javac-no-target.patch jflex-junit4.patch jflex-no-cup-no-jflex.patch jflex.script jpackage-bootstrap-prepare.sh New: ---- jflex-1.8.2-generated-files.tar.xz jflex-1.8.2-no-auto-value.patch jflex-1.8.2.tar.gz jflex-build.xml pre_checkin.sh ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jflex-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.8QaO7X/_old 2022-01-15 21:45:14.141615229 +0100 +++ /var/tmp/diff_new_pack.8QaO7X/_new 2022-01-15 21:45:14.145615231 +0100 @@ -1,7 +1,7 @@ # # spec file for package jflex-bootstrap # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,46 +12,40 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} -%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} -%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} -%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} ##### WARNING: please do not edit this auto generated spec file. Use the jflex.spec! ##### -%define with_bootstrap 1 -%define section free +%global with_bootstrap 1 +%bcond_with bootstrap Name: jflex-bootstrap -# This line is not a comment, please do not remove it! -#%(sh %{_sourcedir}/jpackage-bootstrap-prepare.sh %{_sourcedir} %{name}) -Version: 1.4.3 +Version: 1.8.2 Release: 0 Summary: Lexical Analyzer Generator for Java -License: GPL-2.0+ +License: BSD-3-Clause Group: Development/Libraries/Java -Url: http://www.jflex.de/ -Source0: http://www.jflex.de/jflex-%{version}.tar.bz2 -Source1: jflex.script -Source100: jpackage-bootstrap-prepare.sh -Patch0: jflex-javac-no-target.patch -Patch1: jflex-no-cup-no-jflex.patch -Patch2: jflex-classpath.patch -Patch4: jflex-byaccj-utl.patch -#PATCH-FIX-OPENSUSE: make AllTests.main empty, code was not compatible with junit 4 -Patch5: jflex-junit4.patch +URL: https://www.jflex.de/ +Source0: http://www.jflex.de/release/jflex-%{version}.tar.gz +Source1: jflex-%{version}-generated-files.tar.xz +Source2: jflex-build.xml +Patch0: jflex-1.8.2-no-auto-value.patch BuildRequires: ant -BuildRequires: java-cup-bootstrap BuildRequires: java-devel +BuildRequires: javapackages-local Requires: java_cup Requires: javapackages-tools BuildArch: noarch -%if %without bootstrap +%if %{without bootstrap} +BuildRequires: fdupes +BuildRequires: java-cup BuildRequires: jflex-bootstrap -BuildRequires: junit +BuildRequires: maven-local +BuildRequires: mvn(com.google.auto.value:auto-value) +BuildRequires: mvn(com.google.auto.value:auto-value-annotations) Conflicts: jflex-bootstrap %else +BuildRequires: java-cup-bootstrap Conflicts: jflex %endif @@ -71,89 +65,82 @@ * JLex compatibility %if %without bootstrap -%package doc -Summary: Documentation and examples for %{name} -Group: Development/Libraries/Java - -%description doc -JFlex is a lexical analyzer generator for Java written in Java. It is -also a rewrite of the very useful tool JLex which was developed by -Elliot Berk at Princeton University. As Vern Paxson states for his C/C++ -tool flex: they do not share any code though. +%package javadoc +Summary: API documentation for %{name} +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} -Design goals The main design goals of JFlex are: +%description javadoc +This package provides %{summary}. - * Full unicode support - * Fast generated scanners - * Fast scanner generation - * Convenient specification syntax - * Platform independence - * JLex compatibility - -This package contains documentation and examples for %{name} %endif %prep %setup -q -n jflex-%{version} -perl -pi -e 's/\r$//g' examples/standalone/sample.inp -rm -rf src/java_cup -find . -name '*.jar' | xargs -t rm -%if %without bootstrap -export CLASSPATH=$(build-classpath java-cup java-cup-runtime junit jflex) -export OPT_JAR_LIST=: -pushd src -%{ant} realclean -%{ant} -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 jflex -popd -%endif +find . -name '*.jar' -print -delete +find . -name '.gitignore' -print -delete +rm -rf src/generated +%pom_remove_plugin :jflex-maven-plugin +%pom_remove_plugin :cup-maven-plugin +%pom_remove_plugin :maven-shade-plugin +%pom_remove_plugin :jacoco-maven-plugin + +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-site-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='fmt-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='cup-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-shade-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='jacoco-maven-plugin']" parent.xml + +%if %{with bootstrap} +%setup -q -T -D -a 1 -n jflex-%{version} +cp %{SOURCE2} build.xml %patch0 -p1 - -%if %with bootstrap -%patch1 -p1 - -echo `pwd` -rm -rf src/JFlex/tests -%else # with bootstrap -# You must use Re jflex.spec and have a java-cup and jflex installed -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 +mkdir -p lib +build-jar-repository -s lib java-cup-runtime +%else +%{mvn_file} : %{name} JFlex %endif %build -pushd src -%if %without bootstrap -export CLASSPATH=$(build-classpath java-cup java-cup-runtime junit jflex antlr-bootstrap) +%if %{with bootstrap} +%{ant} package %else -export CLASSPATH=$(build-classpath java-cup java-cup-runtime junit antlr-bootstrap) +java-cup -parser LexParse -interface -destdir src/main/java src/main/cup/LexParse.cup +jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex +%{mvn_build} -f %endif -export OPT_JAR_LIST=: -echo `pwd` -%{ant} -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 jar -popd %install + +%if %{with bootstrap} # jar mkdir -p %{buildroot}%{_javadir} -cp -a lib/JFlex.jar %{buildroot}%{_javadir}/jflex-%{version}.jar -(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -s ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar # compatibility symlink (cd %{buildroot}%{_javadir} && ln -s jflex.jar JFlex.jar) +%else +%mvn_install +%fdupes -s %{buildroot}/%{_javadocdir}/%{name} +%endif -mkdir -p %{buildroot}%{_bindir} -install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/jflex +%jpackage_script jflex.Main "" "" jflex:java-cup jflex true +%if %{with bootstrap} %files -%doc COPYRIGHT src/README src/changelog -%attr(0755,root,root) %{_bindir}/jflex %{_javadir}/jflex.jar -%{_javadir}/jflex-%{version}.jar %{_javadir}/JFlex.jar +%else + +%files -f .mfiles +%endif +%license src/main/resources/LICENSE_JFLEX +%doc README.md changelog.md +%attr(0755,root,root) %{_bindir}/jflex %if %without bootstrap -%files doc -%doc examples doc +%files javadoc -f .mfiles-javadoc +%license src/main/resources/LICENSE_JFLEX %endif %changelog ++++++ jflex.spec ++++++ --- /var/tmp/diff_new_pack.8QaO7X/_old 2022-01-15 21:45:14.165615242 +0100 +++ /var/tmp/diff_new_pack.8QaO7X/_new 2022-01-15 21:45:14.169615244 +0100 @@ -1,7 +1,7 @@ # # spec file for package jflex # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,45 +12,39 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} -%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} -%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} -%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} -%define _without_bootstrap 1 -%define section free +%global _without_bootstrap 1 +%bcond_with bootstrap Name: jflex -# This line is not a comment, please do not remove it! -#%(sh %{_sourcedir}/jpackage-bootstrap-prepare.sh %{_sourcedir} %{name}) -Version: 1.4.3 +Version: 1.8.2 Release: 0 Summary: Lexical Analyzer Generator for Java -License: GPL-2.0+ +License: BSD-3-Clause Group: Development/Libraries/Java -Url: http://www.jflex.de/ -Source0: http://www.jflex.de/jflex-%{version}.tar.bz2 -Source1: jflex.script -Source100: jpackage-bootstrap-prepare.sh -Patch0: jflex-javac-no-target.patch -Patch1: jflex-no-cup-no-jflex.patch -Patch2: jflex-classpath.patch -Patch4: jflex-byaccj-utl.patch -#PATCH-FIX-OPENSUSE: make AllTests.main empty, code was not compatible with junit 4 -Patch5: jflex-junit4.patch +URL: https://www.jflex.de/ +Source0: http://www.jflex.de/release/jflex-%{version}.tar.gz +Source1: jflex-%{version}-generated-files.tar.xz +Source2: jflex-build.xml +Patch0: jflex-1.8.2-no-auto-value.patch BuildRequires: ant -BuildRequires: java-cup-bootstrap BuildRequires: java-devel +BuildRequires: javapackages-local Requires: java_cup Requires: javapackages-tools BuildArch: noarch -%if %without bootstrap +%if %{without bootstrap} +BuildRequires: fdupes +BuildRequires: java-cup BuildRequires: jflex-bootstrap -BuildRequires: junit +BuildRequires: maven-local +BuildRequires: mvn(com.google.auto.value:auto-value) +BuildRequires: mvn(com.google.auto.value:auto-value-annotations) Conflicts: jflex-bootstrap %else +BuildRequires: java-cup-bootstrap Conflicts: jflex %endif @@ -70,89 +64,82 @@ * JLex compatibility %if %without bootstrap -%package doc -Summary: Documentation and examples for %{name} -Group: Development/Libraries/Java - -%description doc -JFlex is a lexical analyzer generator for Java written in Java. It is -also a rewrite of the very useful tool JLex which was developed by -Elliot Berk at Princeton University. As Vern Paxson states for his C/C++ -tool flex: they do not share any code though. +%package javadoc +Summary: API documentation for %{name} +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < %{version}-%{release} -Design goals The main design goals of JFlex are: +%description javadoc +This package provides %{summary}. - * Full unicode support - * Fast generated scanners - * Fast scanner generation - * Convenient specification syntax - * Platform independence - * JLex compatibility - -This package contains documentation and examples for %{name} %endif %prep %setup -q -n jflex-%{version} -perl -pi -e 's/\r$//g' examples/standalone/sample.inp -rm -rf src/java_cup -find . -name '*.jar' | xargs -t rm -%if %without bootstrap -export CLASSPATH=$(build-classpath java-cup java-cup-runtime junit jflex) -export OPT_JAR_LIST=: -pushd src -%{ant} realclean -%{ant} -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 jflex -popd -%endif +find . -name '*.jar' -print -delete +find . -name '.gitignore' -print -delete +rm -rf src/generated +%pom_remove_plugin :jflex-maven-plugin +%pom_remove_plugin :cup-maven-plugin +%pom_remove_plugin :maven-shade-plugin +%pom_remove_plugin :jacoco-maven-plugin + +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-site-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='fmt-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='cup-maven-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='maven-shade-plugin']" parent.xml +%pom_xpath_remove "pom:plugin[pom:artifactId='jacoco-maven-plugin']" parent.xml + +%if %{with bootstrap} +%setup -q -T -D -a 1 -n jflex-%{version} +cp %{SOURCE2} build.xml %patch0 -p1 - -%if %with bootstrap -%patch1 -p1 - -echo `pwd` -rm -rf src/JFlex/tests -%else # with bootstrap -# You must use Re jflex.spec and have a java-cup and jflex installed -%patch2 -p1 -%patch4 -p1 -%patch5 -p1 +mkdir -p lib +build-jar-repository -s lib java-cup-runtime +%else +%{mvn_file} : %{name} JFlex %endif %build -pushd src -%if %without bootstrap -export CLASSPATH=$(build-classpath java-cup java-cup-runtime junit jflex antlr-bootstrap) +%if %{with bootstrap} +%{ant} package %else -export CLASSPATH=$(build-classpath java-cup java-cup-runtime junit antlr-bootstrap) +java-cup -parser LexParse -interface -destdir src/main/java src/main/cup/LexParse.cup +jflex -d src/main/java/jflex --skel src/main/jflex/skeleton.nested src/main/jflex/LexScan.flex +%{mvn_build} -f %endif -export OPT_JAR_LIST=: -echo `pwd` -%{ant} -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 jar -popd %install + +%if %{with bootstrap} # jar mkdir -p %{buildroot}%{_javadir} -cp -a lib/JFlex.jar %{buildroot}%{_javadir}/jflex-%{version}.jar -(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -s ${jar} `echo $jar| sed "s|-%{version}||g"`; done) +cp -a target/jflex-%{version}.jar %{buildroot}%{_javadir}/jflex.jar # compatibility symlink (cd %{buildroot}%{_javadir} && ln -s jflex.jar JFlex.jar) +%else +%mvn_install +%fdupes -s %{buildroot}/%{_javadocdir}/%{name} +%endif -mkdir -p %{buildroot}%{_bindir} -install -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/jflex +%jpackage_script jflex.Main "" "" jflex:java-cup jflex true +%if %{with bootstrap} %files -%doc COPYRIGHT src/README src/changelog -%attr(0755,root,root) %{_bindir}/jflex %{_javadir}/jflex.jar -%{_javadir}/jflex-%{version}.jar %{_javadir}/JFlex.jar +%else + +%files -f .mfiles +%endif +%license src/main/resources/LICENSE_JFLEX +%doc README.md changelog.md +%attr(0755,root,root) %{_bindir}/jflex %if %without bootstrap -%files doc -%doc examples doc +%files javadoc -f .mfiles-javadoc +%license src/main/resources/LICENSE_JFLEX %endif %changelog ++++++ jflex-1.8.2-no-auto-value.patch ++++++ --- jflex/src/main/java/jflex/base/IntPair.java +++ jflex/src/main/java/jflex/base/IntPair.java @@ -9,8 +9,6 @@ package jflex.base; -import com.google.auto.value.AutoValue; - /** * Simple pair of integers. * @@ -19,7 +17,6 @@ import com.google.auto.value.AutoValue; * @author Gerwin Klein * @version JFlex 1.8.2 */ -@AutoValue public abstract class IntPair { public abstract int start(); ++++++ jflex-build.xml ++++++ <?xml version="1.0" encoding="UTF-8"?> <project name="jflex" default="package" basedir="."> <!-- ====================================================================== --> <!-- Build environment properties --> <!-- ====================================================================== --> <property file="build.properties"/> <property name="project.artifactId" value="jflex"/> <property name="project.version" value="1.8.2"/> <property name="build.finalName" value="${project.artifactId}-${project.version}"/> <property name="build.dir" value="target"/> <property name="build.outputDir" value="${build.dir}/classes"/> <property name="build.srcDir" value="src/main/java"/> <property name="build.resourceDir" value="src/main/resources"/> <property name="compiler.source" value="1.8"/> <property name="compiler.target" value="${compiler.source}"/> <!-- ====================================================================== --> <!-- Defining classpaths --> <!-- ====================================================================== --> <path id="build.classpath"> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </path> <!-- ====================================================================== --> <!-- Cleaning up target --> <!-- ====================================================================== --> <target name="clean" description="Clean the output directory"> <delete dir="${build.dir}"/> </target> <!-- ====================================================================== --> <!-- Compilation target --> <!-- ====================================================================== --> <target name="compile" description="Compile the code"> <mkdir dir="${build.outputDir}"/> <javac destdir="${build.outputDir}" nowarn="false" debug="true" encoding="utf8" optimize="false" deprecation="true" target="${compiler.target}" verbose="false" fork="false" source="${compiler.source}"> <src> <pathelement location="${build.srcDir}"/> </src> <classpath refid="build.classpath"/> </javac> <copy todir="${build.outputDir}"> <fileset dir="${build.resourceDir}"/> </copy> </target> <!-- ====================================================================== --> <!-- Package target --> <!-- ====================================================================== --> <target name="package" depends="compile" description="Package the application"> <jar jarfile="${build.dir}/${build.finalName}.jar" compress="true" index="false" basedir="${build.outputDir}" excludes="**/package.html"> <manifest> <attribute name="Main-Class" value="jflex.Main"/> </manifest> </jar> </target> </project> ++++++ pre_checkin.sh ++++++ #!/bin/bash NAME1=jflex NAME2=jflex-bootstrap COPY_CHANGES=true EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${NAME1}.spec! #####\n" sed "s/^%global _without_bootstrap.*$/${EDIT_WARNING}%global with_bootstrap 1/; s/^\(Name:.*\)$/\1-bootstrap/; " < ${NAME1}.spec > ${NAME2:-${NAME1}-bootstrap}.spec if ${COPY_CHANGES}; then cp ${NAME1}.changes ${NAME2:-${NAME1}-bootstrap}.changes fi