From 52d64aa03ef381fd745ba5b1a6e17d513831412e Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 12:50:05 +0200 Subject: [PATCH 01/16] Drop deprecated Group, BuildRoot, %%clean section and %%defattr --- packaging/rpm/lsc-executable-plugin.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index e460e38..4ab876f 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -27,14 +27,12 @@ Release: 1%{?dist} License: BSD BuildArch: noarch -Group: Applications/System URL: https://lsc-project.org Source: %{lsc_executable_name}-%{lsc_executable_version}.jar Source1: lsc-executable-add-modify-delete-modrdn.pl Source2: lsc-executable-csv2ldif-get.pl Source3: lsc-executable-csv2ldif-list.pl -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): coreutils Requires: lsc >= %{lsc_min_version} @@ -68,11 +66,8 @@ cp -a %{SOURCE3} %{buildroot}/var/lib/lsc %postun -%clean -rm -rf %{buildroot} %files -%defattr(-, root, root, 0755) /usr/%{_lib}/lsc/lsc-executable-plugin* /var/lib/lsc/lsc-executable* From 176148f009ec7890d466ef0632a4017ecf4c3be2 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:42:10 +0200 Subject: [PATCH 02/16] Insert blank lines between changelog entries --- packaging/rpm/lsc-executable-plugin.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 4ab876f..84c25cb 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -78,9 +78,12 @@ cp -a %{SOURCE3} %{buildroot}/var/lib/lsc * Mon Jul 21 2025 - Clement Oudot - 1.3-1 - Upgrade to 1.3 - fix value comparison + add unit test for executableLdifDestinationService task + * Mon Apr 14 2025 - Clement Oudot - 1.2-1 - Upgrade to 1.2 + * Thu Jan 07 2021 - Clement Oudot - 1.1-0 - Upgrade to 1.1 + * Tue Mar 04 2014 - Clement Oudot - 1.0-0 - First package for LSC Executable plugin From cce7f3c2f915e5b19f044bb42d2a29ea22f3bb92 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:45:47 +0200 Subject: [PATCH 03/16] Drop superflous comments --- packaging/rpm/lsc-executable-plugin.spec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 84c25cb..6ac4b3e 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -8,18 +8,12 @@ # Copyright (c) 2009 - 2021 LSC Project #================================================= -#================================================= -# Variables -#================================================= %define lsc_executable_name lsc-executable-plugin %define lsc_executable_version 1.3 %define lsc_min_version 2.2 %define lsc_user lsc %define lsc_group lsc -#================================================= -# Header -#================================================= Summary: LSC Executable plugin Name: %{lsc_executable_name} Version: %{lsc_executable_version} @@ -71,9 +65,6 @@ cp -a %{SOURCE3} %{buildroot}/var/lib/lsc /usr/%{_lib}/lsc/lsc-executable-plugin* /var/lib/lsc/lsc-executable* -#================================================= -# Changelog -#================================================= %changelog * Mon Jul 21 2025 - Clement Oudot - 1.3-1 - Upgrade to 1.3 From 5d07d950def05a9c59ba28dd2b9dcab8bf9c15f7 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:48:39 +0200 Subject: [PATCH 04/16] Drop lsc_executable_name and lsc_executable_name variables --- packaging/rpm/lsc-executable-plugin.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 6ac4b3e..ffca506 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -8,15 +8,13 @@ # Copyright (c) 2009 - 2021 LSC Project #================================================= -%define lsc_executable_name lsc-executable-plugin -%define lsc_executable_version 1.3 %define lsc_min_version 2.2 %define lsc_user lsc %define lsc_group lsc Summary: LSC Executable plugin -Name: %{lsc_executable_name} -Version: %{lsc_executable_version} +Name: lsc-executable-plugin +Version: 1.3 Release: 1%{?dist} License: BSD BuildArch: noarch From 0578b5077c99a3352240bbfce44663132b5a6071 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:50:43 +0200 Subject: [PATCH 05/16] Use SPDX identifier for License tag --- packaging/rpm/lsc-executable-plugin.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index ffca506..62d4425 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -16,7 +16,7 @@ Summary: LSC Executable plugin Name: lsc-executable-plugin Version: 1.3 Release: 1%{?dist} -License: BSD +License: BSD-3-Clause BuildArch: noarch URL: https://lsc-project.org From c770f43f3abcbf80a58736a8a19cd2cb6a0abf46 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:54:05 +0200 Subject: [PATCH 06/16] Add missing ending dot in %%description --- packaging/rpm/lsc-executable-plugin.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 62d4425..576d1fb 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -30,7 +30,7 @@ Requires(pre): coreutils Requires: lsc >= %{lsc_min_version} %description -This is an Executable plugin for LSC +This is an Executable plugin for LSC. %prep From 1d5377e9997824d5147c1826995272996024c428 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 17:01:04 +0200 Subject: [PATCH 07/16] Reorder headers --- packaging/rpm/lsc-executable-plugin.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 576d1fb..469308b 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -12,13 +12,11 @@ %define lsc_user lsc %define lsc_group lsc -Summary: LSC Executable plugin Name: lsc-executable-plugin Version: 1.3 Release: 1%{?dist} +Summary: LSC Executable plugin License: BSD-3-Clause -BuildArch: noarch - URL: https://lsc-project.org Source: %{lsc_executable_name}-%{lsc_executable_version}.jar @@ -26,7 +24,7 @@ Source1: lsc-executable-add-modify-delete-modrdn.pl Source2: lsc-executable-csv2ldif-get.pl Source3: lsc-executable-csv2ldif-list.pl -Requires(pre): coreutils +BuildArch: noarch Requires: lsc >= %{lsc_min_version} %description From a2a934a323d4089ade42c4749ceeadb93067cccf Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 17:02:58 +0200 Subject: [PATCH 08/16] Drop buildroot removal at start of %%install section --- packaging/rpm/lsc-executable-plugin.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 469308b..e96a665 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -36,8 +36,6 @@ This is an Executable plugin for LSC. %install -rm -rf %{buildroot} - # Create directories mkdir -p %{buildroot}/usr/%{_lib}/lsc mkdir -p %{buildroot}/var/lib/lsc From 00662fd6ead8de6205638e427d09f560afebe082 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 17:58:12 +0200 Subject: [PATCH 09/16] Drop scriptlets --- packaging/rpm/lsc-executable-plugin.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index e96a665..7d529e5 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -9,8 +9,6 @@ #================================================= %define lsc_min_version 2.2 -%define lsc_user lsc -%define lsc_group lsc Name: lsc-executable-plugin Version: 1.3 @@ -46,13 +44,9 @@ cp -a %{SOURCE1} %{buildroot}/var/lib/lsc cp -a %{SOURCE2} %{buildroot}/var/lib/lsc cp -a %{SOURCE3} %{buildroot}/var/lib/lsc -%post -/bin/chown -R %{lsc_user}:%{lsc_group} /usr/%{_lib}/lsc -/bin/chown -R %{lsc_user}:%{lsc_group} /var/lib/lsc -%postun %files From 0ac6462db835401004bd9243e396964d4aea6d6d Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:02:51 +0200 Subject: [PATCH 10/16] Use global rather than define --- packaging/rpm/lsc-executable-plugin.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 7d529e5..0c0386f 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -7,8 +7,7 @@ # # Copyright (c) 2009 - 2021 LSC Project #================================================= - -%define lsc_min_version 2.2 +%global lsc_min_version 2.2 Name: lsc-executable-plugin Version: 1.3 From 985cc250d712330b2deae3a4939f3bf039a6e4db Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:10:34 +0200 Subject: [PATCH 11/16] Generate perl requires for scripts --- packaging/rpm/lsc-executable-plugin.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 0c0386f..a61fa30 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -22,6 +22,7 @@ Source2: lsc-executable-csv2ldif-get.pl Source3: lsc-executable-csv2ldif-list.pl BuildArch: noarch +BuildRequires: perl-generators Requires: lsc >= %{lsc_min_version} %description From cc4fe67fbe62cd31f6d7f03a44860622bbdea40c Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:00:55 +0200 Subject: [PATCH 12/16] Add conditional to build from upstream tarball --- packaging/rpm/lsc-executable-plugin.spec | 69 +++++++++++++++++------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index a61fa30..4c10b78 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -9,50 +9,79 @@ #================================================= %global lsc_min_version 2.2 +%bcond build_from_sources 0 +%bcond tests 0 + Name: lsc-executable-plugin Version: 1.3 Release: 1%{?dist} Summary: LSC Executable plugin License: BSD-3-Clause URL: https://lsc-project.org - -Source: %{lsc_executable_name}-%{lsc_executable_version}.jar -Source1: lsc-executable-add-modify-delete-modrdn.pl -Source2: lsc-executable-csv2ldif-get.pl -Source3: lsc-executable-csv2ldif-list.pl - +%if %{with build_from_sources} +Source0: https://github.com/lsc-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +%else +Source1: https://www.lsc-project.org/archives/lsc-executable-plugin-%{version}.jar +Source2: https://raw.githubusercontent.com/lsc-project/%{name}/refs/tags/v%{version}/scripts/lsc-executable-add-modify-delete-modrdn.pl +Source3: https://raw.githubusercontent.com/lsc-project/%{name}/refs/tags/v%{version}/scripts/lsc-executable-csv2ldif-get.pl +Source4: https://raw.githubusercontent.com/lsc-project/%{name}/refs/tags/v%{version}/scripts/lsc-executable-csv2ldif-list.pl +%endif BuildArch: noarch + +BuildRequires: coreutils +%if %{with build_from_sources} +BuildRequires: jpackage-utils +BuildRequires: java-devel >= 1:21 +BuildRequires: maven +BuildRequires: maven-local +%endif BuildRequires: perl-generators Requires: lsc >= %{lsc_min_version} + %description This is an Executable plugin for LSC. -%prep - -%build -%install - -# Create directories -mkdir -p %{buildroot}/usr/%{_lib}/lsc -mkdir -p %{buildroot}/var/lib/lsc - -# Copy files -cp -a %{SOURCE0} %{buildroot}/usr/%{_lib}/lsc -cp -a %{SOURCE1} %{buildroot}/var/lib/lsc -cp -a %{SOURCE2} %{buildroot}/var/lib/lsc -cp -a %{SOURCE3} %{buildroot}/var/lib/lsc +%prep +%if %{with build_from_sources} +%setup -q +%endif +%build +%if %{with build_from_sources} +mvn %{!?with_tests:"-Dmaven.test.skip=true"} package +%endif +%install +# Jar +mkdir -p %{buildroot}%{_libdir}/lsc +%if %{with build_from_sources} +install -m 0644 target/%{name}-%{version}.jar \ + %{buildroot}%{_libdir}/lsc +%else +install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/lsc/ +mkdir scripts +install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} scripts/ +%endif + +# Scripts +mkdir -p %{buildroot}%{_localstatedir}/lib/lsc +install -m 0755 scripts/lsc-executable*.pl \ + %{buildroot}%{_localstatedir}/lib/lsc %files +%if %{with build_from_sources} +%license LICENSE.txt +%doc README.md doc/* +%endif /usr/%{_lib}/lsc/lsc-executable-plugin* /var/lib/lsc/lsc-executable* + %changelog * Mon Jul 21 2025 - Clement Oudot - 1.3-1 - Upgrade to 1.3 From e17197734f1c44e9d5b7f4d024b85c7125bb0fd6 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:02:03 +0200 Subject: [PATCH 13/16] Improve %%files section --- packaging/rpm/lsc-executable-plugin.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 4c10b78..4efdd85 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -78,8 +78,8 @@ install -m 0755 scripts/lsc-executable*.pl \ %license LICENSE.txt %doc README.md doc/* %endif -/usr/%{_lib}/lsc/lsc-executable-plugin* -/var/lib/lsc/lsc-executable* +%{_libdir}/lsc/lsc-executable-plugin* +%{_localstatedir}/lib/lsc/lsc-executable*.pl %changelog From 189e6c16548335a1d0eae7ed3a746c574037d451 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 27 Jul 2026 16:53:57 +0200 Subject: [PATCH 14/16] Move sample scripts to doc --- packaging/rpm/lsc-executable-plugin.spec | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 4efdd85..5f75e44 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -35,7 +35,6 @@ BuildRequires: java-devel >= 1:21 BuildRequires: maven BuildRequires: maven-local %endif -BuildRequires: perl-generators Requires: lsc >= %{lsc_min_version} @@ -67,19 +66,14 @@ mkdir scripts install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} scripts/ %endif -# Scripts -mkdir -p %{buildroot}%{_localstatedir}/lib/lsc -install -m 0755 scripts/lsc-executable*.pl \ - %{buildroot}%{_localstatedir}/lib/lsc - %files %if %{with build_from_sources} %license LICENSE.txt %doc README.md doc/* %endif +%doc scripts/* %{_libdir}/lsc/lsc-executable-plugin* -%{_localstatedir}/lib/lsc/lsc-executable*.pl %changelog From 5b6c196be0f3168866a0c9d2892da84ac5ab8b61 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:04:43 +0200 Subject: [PATCH 15/16] Add changelog entry --- packaging/rpm/lsc-executable-plugin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 5f75e44..d63884a 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -14,7 +14,7 @@ Name: lsc-executable-plugin Version: 1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: LSC Executable plugin License: BSD-3-Clause URL: https://lsc-project.org @@ -77,6 +77,9 @@ install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} scripts/ %changelog +* Mon Jul 21 2025 Xavier Bachelot - 1.3-2 +- Rework specfile + * Mon Jul 21 2025 - Clement Oudot - 1.3-1 - Upgrade to 1.3 - fix value comparison + add unit test for executableLdifDestinationService task From a72acb3f145de23a9a8309a8bdf9ef388996c50b Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 27 Jul 2026 12:26:19 +0200 Subject: [PATCH 16/16] Update to 1.4 --- packaging/rpm/lsc-executable-plugin.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index d63884a..98e35a2 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -7,14 +7,14 @@ # # Copyright (c) 2009 - 2021 LSC Project #================================================= -%global lsc_min_version 2.2 +%global lsc_min_version 2.3 %bcond build_from_sources 0 %bcond tests 0 Name: lsc-executable-plugin -Version: 1.3 -Release: 2%{?dist} +Version: 1.4 +Release: 1%{?dist} Summary: LSC Executable plugin License: BSD-3-Clause URL: https://lsc-project.org @@ -77,6 +77,12 @@ install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} scripts/ %changelog +* Mon Jul 27 2026 Xavier Bachelot - 1.4-1 +- Update to 1.4 + - Properly handle Base64-encoded attributes + - Compatibility with LSC 2.3 +- Clean rpm specfile + * Mon Jul 21 2025 Xavier Bachelot - 1.3-2 - Rework specfile