From 21f02d5b4d485c1044fba21633be36ad646412a1 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 12:50:05 +0200 Subject: [PATCH 01/15] 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 458bd1da3bc746c16c338fca779ab2bc08d9d647 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:42:10 +0200 Subject: [PATCH 02/15] 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 19ac57581791e8b9fde84955d66552460d1a5273 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:45:47 +0200 Subject: [PATCH 03/15] 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 6dc248b753666d7dbfdf88112c84bcdae97f4ecd Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:48:39 +0200 Subject: [PATCH 04/15] 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 2addb34975565c3134ea66f33964f5de849ff501 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:50:43 +0200 Subject: [PATCH 05/15] 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 d67ee87b31377926ae25f701c31edceb14cbc2cf Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 16:54:05 +0200 Subject: [PATCH 06/15] 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 11eacb23c9de13caf44dbb7d68a93991e63edc81 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 17:01:04 +0200 Subject: [PATCH 07/15] 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 8a152273aa7baba3e8d1de4ceab52f5d1384c785 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 17:02:58 +0200 Subject: [PATCH 08/15] 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 da52abf2b054f0ad9ee4196c3a769bc8ee2e541d Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 17:58:12 +0200 Subject: [PATCH 09/15] 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 487ff1f1a6244c9ac60472eeb1fa92ce58ed1824 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:00:55 +0200 Subject: [PATCH 10/15] Build jar from upstream tarball --- packaging/rpm/lsc-executable-plugin.spec | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 7d529e5..2bc033f 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -16,37 +16,37 @@ 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 - +Source0: https://github.com/lsc-project/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch +BuildRequires: maven +BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: javapackages-local +BuildRequires: jpackage-utils 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 +%setup -q +%build +mvn package +%install +# Jar +mkdir -p %{buildroot}%{_libdir}/lsc +install -m 0644 target/%{name}-%{version}.jar \ + %{buildroot}%{_libdir}/lsc + +# Scripts +mkdir -p %{buildroot}%{_localstatedir}/lib/lsc +install -m 0755 scripts/lsc-executable*.pl \ + %{buildroot}%{_localstatedir}/lib/lsc %files From 82429da414051cb7f77d46075ffc3d3929748bd1 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:02:03 +0200 Subject: [PATCH 11/15] Improve %%files section --- packaging/rpm/lsc-executable-plugin.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 2bc033f..0349928 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -50,8 +50,11 @@ install -m 0755 scripts/lsc-executable*.pl \ %files -/usr/%{_lib}/lsc/lsc-executable-plugin* -/var/lib/lsc/lsc-executable* +%license LICENSE.txt +%doc README.md doc/ +%{_libdir}/lsc/lsc-executable-plugin* +%{_localstatedir}/lib/lsc/lsc-executable*.pl + %changelog * Mon Jul 21 2025 - Clement Oudot - 1.3-1 From fb26d2ee0e800390f8bd1d35f6894e7301a982be Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:02:51 +0200 Subject: [PATCH 12/15] 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 0349928..2ef6e98 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 3bc99de59eede1774d708417944970073bc91010 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:03:53 +0200 Subject: [PATCH 13/15] Add conditional to allow skipping tests --- packaging/rpm/lsc-executable-plugin.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/rpm/lsc-executable-plugin.spec b/packaging/rpm/lsc-executable-plugin.spec index 2ef6e98..aa014c9 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -8,6 +8,7 @@ # Copyright (c) 2009 - 2021 LSC Project #================================================= %global lsc_min_version 2.2 +%bcond_without tests Name: lsc-executable-plugin Version: 1.3 @@ -33,7 +34,7 @@ This is an Executable plugin for LSC. %build -mvn package +mvn %{!?with_tests:"-Dmaven.test.skip=true"} package %install From 62cb47d80ead956a62e095693c7d18fde9740f48 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:10:34 +0200 Subject: [PATCH 14/15] 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 aa014c9..528dc31 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -22,6 +22,7 @@ BuildRequires: maven BuildRequires: java-devel >= 1:1.6.0 BuildRequires: javapackages-local BuildRequires: jpackage-utils +BuildRequires: perl-generators Requires: lsc >= %{lsc_min_version} From 00546048add344de5518cc07b2082b9db60c980a Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Mon, 21 Jul 2025 18:04:43 +0200 Subject: [PATCH 15/15] 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 528dc31..7e58619 100644 --- a/packaging/rpm/lsc-executable-plugin.spec +++ b/packaging/rpm/lsc-executable-plugin.spec @@ -12,7 +12,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 @@ -58,6 +58,9 @@ install -m 0755 scripts/lsc-executable*.pl \ %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