diff --git a/NOTICE-CC-BY.txt b/NOTICE-CC-BY.txt deleted file mode 100644 index ab3e0dd07391b76f98a87c4ea7a661560e12f448..0000000000000000000000000000000000000000 --- a/NOTICE-CC-BY.txt +++ /dev/null @@ -1,4 +0,0 @@ -Copyright (c) 2005 Brian Goetz -Released under the Creative Commons Attribution License - (http://creativecommons.org/licenses/by/2.5) -Official home: http://www.jcip.net diff --git a/jcip-annotations-1.0-1.tar.gz b/jcip-annotations-1.0-1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fc8e1a3e217a610deee92ddc1c9cde4b4b5ac148 Binary files /dev/null and b/jcip-annotations-1.0-1.tar.gz differ diff --git a/jsr-305.spec b/jsr-305.spec index 0bdac954da942cda4eec60b4da712198d512a116..b21356f3c632c4289d4531b525f5cec05fe140dc 100644 --- a/jsr-305.spec +++ b/jsr-305.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_without bootstrap Name: jsr-305 @@ -6,22 +6,20 @@ Version: 3.0.2 Release: %{anolis_release}%{?dist} Summary: Correctness annotations for Java code -# The majority of code is BSD-licensed, but some Java sources -# are licensed under CC-BY license, see: $ grep -r Creative . -License: BSD and CC-BY +# The majority of code is BSD-licensed. +# JCIP annotations are Apache-licensed. +License: BSD-3-Clause AND Apache-2.0 URL: https://code.google.com/p/jsr-305 BuildArch: noarch ExclusiveArch: %{java_arches} noarch # ./generate-tarball.sh Source0: %{name}-%{version}.tar.gz -# File containing URL to CC-BY license text -Source1: NOTICE-CC-BY.txt +Source1: https://github.com/stephenc/jcip-annotations/archive/refs/tags/jcip-annotations-1.0-1.tar.gz %if %{with bootstrap} -BuildRequires: javapackages-bootstrap-openjdk8 +BuildRequires: javapackages-bootstrap %else -BuildRequires: maven-local-openjdk8 BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) %endif @@ -34,9 +32,18 @@ Detection. %prep %setup -q -cp %{SOURCE1} NOTICE-CC-BY -%pom_xpath_set "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/*" 1.6 +# Replace javax.annotation.concurrent annotations (that are based on +# code from https://jcip.net/ and are licensed under CC-BY-2.5, which +# is not Fedora-approved for code) with a clean-room implementation +# under Apache-2.0 from https://github.com/stephenc/jcip-annotations +tar xf %{SOURCE1} +rm -rf ri/src/main/java/javax/annotation/concurrent +mv jcip-annotations-jcip-annotations-1.0-1/src/main/java/net/jcip/annotations ri/src/main/java/javax/annotation/concurrent +sed -i /^package/s/net.jcip.annotations/javax.annotation.concurrent/ ri/src/main/java/javax/annotation/concurrent/* + +%pom_xpath_set "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/*" 1.8 +%pom_remove_plugin :maven-compiler-plugin ri sed -i 's|com\.google\.code\.findbugs|org.jsr-305|' ri/pom.xml sed -i 's|jsr305|ri|' ri/pom.xml @@ -63,9 +70,13 @@ sed -i 's|jsr305|ri|' ri/pom.x %mvn_install %files -f .mfiles -%license ri/LICENSE NOTICE-CC-BY +%license ri/LICENSE jcip-annotations-jcip-annotations-1.0-1/LICENSE.txt %doc sampleUses %changelog +* Tue Apr 15 2025 Xiaoping Liu - 3.0.2-2 +- remove BuildRequires openjdk8 +- Replace CC-BY-2.5 annotations with Apache-2.0 ones + * Sun Apr 16 2023 Funda Wang - 3.0.2-1 - Import package for anolis 23