Sync from SUSE:SLFO:Main ongres-stringprep revision 885a1d0d25e4eed8533c4f010ae66fd0

This commit is contained in:
2025-04-17 00:20:06 +02:00
parent 947476213c
commit 63992fa5c4
5 changed files with 59 additions and 60 deletions

View File

@@ -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);

View File

@@ -1,3 +1,36 @@
-------------------------------------------------------------------
Tue Apr 1 12:14:21 UTC 2025 - Michael Calmer <mc@suse.com>
- 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 <gus.kenion@suse.com>

View File

@@ -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' '
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
' 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

BIN
stringprep-1.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
stringprep-2.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.