diff --git a/fix-dir-create.patch b/fix-dir-create.patch deleted file mode 100644 index df93bde..0000000 --- a/fix-dir-create.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: stringprep-1.1/codegenerator/src/main/java/com/ongres/stringprep/codegenerator/GeneratorCode.java -=================================================================== ---- stringprep-1.1.orig/codegenerator/src/main/java/com/ongres/stringprep/codegenerator/GeneratorCode.java -+++ stringprep-1.1/codegenerator/src/main/java/com/ongres/stringprep/codegenerator/GeneratorCode.java -@@ -62,8 +62,8 @@ public class GeneratorCode { - ctx.put("parser", parser); - String path = args[0] + "/com/ongres/stringprep/StringPrep.java"; - File file = new File(path); -- if (!file.getParentFile().mkdirs()) { -- throw new IOException("The directory couldn't be created"); -+ if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) { -+ throw new IOException("The directory couldn't be created:" + file.getParentFile()); - } - Writer writer = new OutputStreamWriter(new FileOutputStream(file),StandardCharsets.UTF_8); - template.merge(ctx, writer); diff --git a/ongres-stringprep.changes b/ongres-stringprep.changes index 4f7a943..0826820 100644 --- a/ongres-stringprep.changes +++ b/ongres-stringprep.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Tue Apr 1 12:14:21 UTC 2025 - Michael Calmer + +- Version 2.2 + - Fix `Stringprep::getProvider` was not working on the module + path. + - The Profile interface now has overloaded methods with `char[]` + versions. + - The Java modules profiles `com.ongres.saslprep` and + `com.ongres.nameprep` have implied readability with + `com.ongres.stringprep`. + - Exports the packages of the profiles in the module declaration + to allow creating instances without the ServiceLoader lookup. + - Introduce the annotation `@ProfileName` to declare the name of + the profile used for ServiceLoader lookup. + - Full rewrite of the `stringprep` implementation, this release + is compatible with Java 8+. + - The stringprep profiles can be created by implementing the + `Profile` interface. + - New module `nameprep` implementing the stringprep `Profile`. + - Create Multi-release Modular JARs, the modules names are: + - `com.ongres.stringprep` + - `com.ongres.saslprep` + - `com.ongres.nameprep` + - Refactor of the `stringprep` implementation to make it + extensible and modular, now this implemenation is considered + feature-complete. + - Change the module `saslprep` to implement the stringprep + `Profile` interface. + Removed: fix-dir-create.patch +- include parent and saslprep into main package +- exclude codegenerator + ------------------------------------------------------------------- Wed Feb 21 10:52:17 UTC 2024 - Gus Kenion diff --git a/ongres-stringprep.spec b/ongres-stringprep.spec index 302ed4a..b199185 100644 --- a/ongres-stringprep.spec +++ b/ongres-stringprep.spec @@ -1,7 +1,7 @@ # # spec file for package ongres-stringprep # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ %global upstream_name stringprep -%global upstream_version 1.1 +%global upstream_version 2.2 Name: ongres-%{upstream_name} Version: %(echo %{upstream_version} | sed 's/-/~/g') Release: 0 @@ -25,13 +25,13 @@ Summary: Preparation of internationalized strings License: BSD-2-Clause URL: https://github.com/ongres/%{upstream_name} Source0: https://github.com/ongres/%{upstream_name}/archive/%{upstream_version}/%{upstream_name}-%{upstream_version}.tar.gz -Patch0: fix-dir-create.patch BuildRequires: fdupes -BuildRequires: java-devel >= 1.8 +BuildRequires: java-devel >= 11 BuildRequires: maven-local -BuildRequires: mvn(org.apache.velocity:velocity) -BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) -BuildRequires: mvn(org.codehaus.mojo:exec-maven-plugin) +Provides: ongres-stringprep-parent = %{upstream_version} +Obsoletes: ongres-stringprep-parent < %{upstream_version} +Provides: ongres-stringprep-saslprep = %{upstream_version} +Obsoletes: ongres-stringprep-saslprep < %{upstream_version} BuildArch: noarch %description @@ -43,54 +43,35 @@ Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name} -%package saslprep -Summary: SASLprep for %{name} - -%description saslprep -SaslPrep is a profile of stringprep for user names and passwords (saslprep, RFC 4013). - -%package parent -Summary: Developement files for %{name} - -%description parent -This package contains development files for %{name} - -%package codegenerator -Summary: Codegenerator - -%description codegenerator -This package contains a codegenerator for %{name} - %prep -%setup -n %{upstream_name}-%{upstream_version} -%patch -P 0 -p1 +%autosetup -n %{upstream_name}-%{upstream_version} find \( -name '*.jar' -o -name '*.class' \) -delete -%pom_remove_dep :velocity-tools codegenerator +%pom_remove_dep org.junit:junit-bom parent -%pom_remove_plugin :nexus-staging-maven-plugin -%pom_remove_plugin :maven-source-plugin +%pom_remove_plugin -r :maven-enforcer-plugin %pom_remove_plugin -r :maven-javadoc-plugin -%pom_xpath_set -r "pom:project/pom:properties/pom:java.version" "1.8" +# codegenerator is only needed at build time, and has extra dependencies +%{mvn_package} com.ongres.stringprep:codegenerator __noinstall + +# codegen is only needed for specific build profile that we do not use +rm -r codegen + +%pom_xpath_inject 'pom:plugin[pom:artifactId="maven-jar-plugin"]/pom:configuration/pom:archive' ' + + true + +' parent %build -%{mvn_build} -s -f -- -Dsource=8 +%{mvn_build} -f %install %mvn_install %fdupes -s %{buildroot}%{_javadocdir} -%files -f .mfiles-stringprep -%license LICENSE - -%files parent -f .mfiles-parent -%license LICENSE - -%files saslprep -f .mfiles-saslprep -%license LICENSE - -%files codegenerator -f .mfiles-codegenerator +%files -f .mfiles %license LICENSE %files javadoc -f .mfiles-javadoc diff --git a/stringprep-1.1.tar.gz b/stringprep-1.1.tar.gz deleted file mode 100644 index e09dc9d..0000000 --- a/stringprep-1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31e7e633828b2a12ed31cd3ccc54d1aa5aa99f3bcf201b59d3a7c9c21417266c -size 42793 diff --git a/stringprep-2.2.tar.gz b/stringprep-2.2.tar.gz new file mode 100644 index 0000000..a13d58a --- /dev/null +++ b/stringprep-2.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff4791d5d9d3b96f942b38b901b3053f20a141b3e51747430dd38762929b1798 +size 89428