Merge branch 'maven' into stream-javapackages-tools-202501-rhel-9.6.0
This commit is contained in:
commit
932bdbbf12
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -0,0 +1,7 @@
|
||||
/1.0.2.tar.gz
|
||||
/jurand-1.1.0.tar.gz
|
||||
/jurand-1.2.0.tar.gz
|
||||
/jurand-1.3.0.tar.gz
|
||||
/jurand-1.3.1.tar.gz
|
||||
/jurand-1.3.2.tar.gz
|
||||
/jurand-1.3.3.tar.gz
|
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_contexts:
|
||||
- osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
87
jurand.spec
Normal file
87
jurand.spec
Normal file
@ -0,0 +1,87 @@
|
||||
Name: jurand
|
||||
Version: 1.3.3
|
||||
Release: 6%{?dist}
|
||||
Summary: A tool for manipulating Java symbols
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/fedora-java/jurand
|
||||
|
||||
Source0: https://github.com/fedora-java/jurand/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: diffutils
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
BuildRequires: rubygem-asciidoctor
|
||||
|
||||
%description
|
||||
The tool can be used for patching .java sources in cases where using sed is
|
||||
insufficient due to Java language syntax. The tool follows Java language rules
|
||||
rather than applying simple regular expressions on the source code.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%{make_build} test-compile manpages
|
||||
|
||||
%install
|
||||
export buildroot=%{buildroot}
|
||||
export bindir=%{_bindir}
|
||||
export rpmmacrodir=%{_rpmmacrodir}
|
||||
export mandir=%{_mandir}/man7
|
||||
|
||||
./install.sh
|
||||
|
||||
%check
|
||||
make test
|
||||
|
||||
%files -f target/installed_files
|
||||
%dir %{_rpmconfigdir}
|
||||
%dir %{_rpmmacrodir}
|
||||
%license LICENSE NOTICE
|
||||
%doc README.adoc
|
||||
|
||||
%changelog
|
||||
* Wed Sep 04 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.3-4
|
||||
- Drop unneeded obsoletes
|
||||
|
||||
* Tue Aug 20 2024 Marian Koncek <mkoncek@redhat.com> - 1.3.3-1
|
||||
- Update to upstream version 1.3.3
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Nov 21 2023 Marian Koncek <mkoncek@redhat.com> - 1.3.2-1
|
||||
- Update to upstream version 1.3.2
|
||||
|
||||
* Wed Aug 30 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.1-3
|
||||
- Obsolete javapackages-extra
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Mar 23 2023 Marian Koncek <mkoncek@redhat.com> - 1.3.1-1
|
||||
- Update to upstream version 1.3.1
|
||||
|
||||
* Wed Mar 15 2023 Marian Koncek <mkoncek@redhat.com> - 1.3.0-1
|
||||
- Update to upstream version 1.3.0
|
||||
|
||||
* Wed Mar 08 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-2
|
||||
- Skip interface keyword as annotation in name matching only
|
||||
|
||||
* Wed Mar 08 2023 Marian Koncek <mkoncek@redhat.com> - 1.2.0-1
|
||||
- Update to upstream version 1.2.0
|
||||
|
||||
* Tue Mar 07 2023 Marian Koncek <mkoncek@redhat.com> - 1.1.0-1
|
||||
- Update to upstream version 1.1.0
|
||||
|
||||
* Fri Mar 03 2023 Marian Koncek <mkoncek@redhat.com> - 1.0.2-1
|
||||
- Update to upstream version 1.0.2
|
||||
|
||||
* Wed Mar 01 2023 Marian Koncek <mkoncek@redhat.com> - 1.0.0-1
|
||||
- Initial build
|
5
plans/plan.fmf
Normal file
5
plans/plan.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Run tests from dist-git
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (jurand-1.3.3.tar.gz) = cf3858052864f45d576765bdade175c1b3cfd55331d31a3c46c51143596d370e918e9293fdf45c2e0db6d050a03108e772e6a81c4ced6236cc6b28634c57a344
|
5
tests/macros/main.fmf
Normal file
5
tests/macros/main.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Jurand macros test
|
||||
description: |
|
||||
Test whether Jurand RPM macros work.
|
||||
require:
|
||||
- rpm-build
|
41
tests/macros/runtest.sh
Executable file
41
tests/macros/runtest.sh
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
rlJournalStart
|
||||
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm jurand
|
||||
rlAssertRpm rpm-build
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlAssertGrep "^import com.Foo;$" test_template.java
|
||||
rlAssertGrep "^import biz.Bar;$" test_template.java
|
||||
rlAssertGrep "^@Foo$" test_template.java
|
||||
rlAssertGrep "^class test{}$" test_template.java
|
||||
|
||||
rlRun "cp test_template.java test.java"
|
||||
rlRun -s "rpm -E '%java_remove_imports test.java -n Foo'"
|
||||
rlAssertGrep /usr/bin/jurand $rlRun_LOG
|
||||
rlRun "sh $rlRun_LOG"
|
||||
rlAssertNotGrep "^import com.Foo;$" test.java
|
||||
rlAssertGrep "^import biz.Bar;$" test.java
|
||||
rlAssertGrep "^@Foo$" test.java
|
||||
rlAssertGrep "^class test{}$" test.java
|
||||
|
||||
rlRun "cp test_template.java test.java"
|
||||
rlRun -s "rpm -E '%java_remove_annotations test.java -n Foo'"
|
||||
rlAssertGrep /usr/bin/jurand $rlRun_LOG
|
||||
rlRun "sh $rlRun_LOG"
|
||||
rlAssertNotGrep "^import com.Foo;$" test.java
|
||||
rlAssertGrep "^import biz.Bar;$" test.java
|
||||
rlAssertNotGrep "^@Foo$" test.java
|
||||
rlAssertGrep "^class test{}$" test.java
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -f test.java"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
4
tests/macros/test_template.java
Normal file
4
tests/macros/test_template.java
Normal file
@ -0,0 +1,4 @@
|
||||
import com.Foo;
|
||||
import biz.Bar;
|
||||
@Foo
|
||||
class test{}
|
4
tests/main.fmf
Normal file
4
tests/main.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
contact: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
framework: beakerlib
|
||||
test: ./runtest.sh
|
||||
tier: 0
|
11
tests/smoke/main.fmf
Normal file
11
tests/smoke/main.fmf
Normal file
@ -0,0 +1,11 @@
|
||||
summary: Jurand smoke test
|
||||
description: |
|
||||
Download Guava sources, run Jurand to remove annotations and then
|
||||
compile Guava to verify that annotations were removed, producing
|
||||
valid Java code that can be compiled.
|
||||
require:
|
||||
- wget
|
||||
- tar
|
||||
- gzip
|
||||
- findutils
|
||||
- java-21-openjdk-devel
|
35
tests/smoke/runtest.sh
Executable file
35
tests/smoke/runtest.sh
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
rlJournalStart
|
||||
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm jurand
|
||||
rlAssertRpm java-21-openjdk-devel
|
||||
export JAVA_HOME=/usr/lib/jvm/java-21-openjdk
|
||||
rlRun "wget https://src.fedoraproject.org/lookaside/pkgs/guava/guava-31.1.tar.gz/sha512/660b486d82d526ce722130f2968ea8ab9eb53f5915f80e53ef135a7bfcb6ced9b2f2a50ebdb8b316cc48a4f2553fa067a1d6fc0bc4498774a9f1990a535651b8/guava-31.1.tar.gz"
|
||||
rlAssertExists guava-31.1.tar.gz
|
||||
rlRun "tar xf guava-31.1.tar.gz"
|
||||
rlAssertExists guava-31.1
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "jurand -i -a guava-31.1/guava/src\
|
||||
-p org[.]checkerframework[.]\
|
||||
-p com[.]google[.]common[.]annotations[.]\
|
||||
-p com[.]google[.]errorprone[.]annotations[.]\
|
||||
-p com[.]google[.]j2objc[.]annotations[.]\
|
||||
-p javax[.]annotation[.]\
|
||||
"
|
||||
rlRun -s "find guava-31.1/guava/src guava-31.1/futures/failureaccess/src -name \*.java | sort"
|
||||
rlRun -s "${JAVA_HOME}/bin/javac -d . @$rlRun_LOG"
|
||||
rlAssertNotGrep error: $rlRun_LOG
|
||||
rlAssertExists com/google/common/base/Strings.class
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -rf guava-31.1.tar.gz guava-31.1/ com/"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
Loading…
Reference in New Issue
Block a user