From b67427461f25e1bbeedc7c9cfca900b85570c59f Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 19:04:23 +0000 Subject: [PATCH] import UBI isns-utils-0.103-1.el10 --- .gitignore | 3 +- fix-openssl-argument-order-in-tests.patch | 25 ----- gating.yaml | 6 -- isns-utils.spec | 113 ++++++++++++++++------ isnsd.service | 9 ++ sources | 2 +- test_as_installed.patch | 76 ++++++++++----- 7 files changed, 148 insertions(+), 86 deletions(-) delete mode 100644 fix-openssl-argument-order-in-tests.patch delete mode 100644 gating.yaml create mode 100644 isnsd.service diff --git a/.gitignore b/.gitignore index d913305..32d2ebc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -SOURCES/open-isns-0.99.tar.gz -/open-isns-0.99.tar.gz +open-isns-0.103.tar.gz diff --git a/fix-openssl-argument-order-in-tests.patch b/fix-openssl-argument-order-in-tests.patch deleted file mode 100644 index b01032e..0000000 --- a/fix-openssl-argument-order-in-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 65aae761c6d1e73b1cd3c05b40b5a70ee0eb67b7 Mon Sep 17 00:00:00 2001 -From: Chris Leech -Date: Fri, 22 Mar 2019 16:12:41 -0700 -Subject: [PATCH 1/1] fix openssl argument order in tests - ---- - tests/genkey | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/genkey b/tests/genkey -index 36c5eeee56a5..2351a65dedf4 100755 ---- a/tests/genkey -+++ b/tests/genkey -@@ -123,7 +123,7 @@ if [ ! -r $dsa_parms ]; then - EOF - - mkdir -p `dirname $dsa_parms` -- openssl dsaparam $dsa_bits -out $dsa_parms || -+ openssl dsaparam -out $dsa_parms $dsa_bits || - exit 1 - - # DSA parameters are public --- -2.17.2 - diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 6985029..0000000 --- a/gating.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- !Policy -product_versions: - - rhel-8 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/isns-utils.spec b/isns-utils.spec index 253995d..d5f2b47 100644 --- a/isns-utils.spec +++ b/isns-utils.spec @@ -1,20 +1,21 @@ Name: isns-utils -Version: 0.99 +Version: 0.103 Release: 1%{?dist} Summary: The iSNS daemon and utility programs -Group: System Environment/Daemons -License: LGPLv2+ +License: LGPL-2.1-or-later URL: https://github.com/open-iscsi/open-isns Source0: https://github.com/open-iscsi/open-isns/archive/v%{version}.tar.gz#/open-isns-%{version}.tar.gz -Patch1: fix-openssl-argument-order-in-tests.patch -Patch2: test_as_installed.patch +Source1: isnsd.service +Patch1: test_as_installed.patch -BuildRequires: openssl-devel automake pkgconfig systemd-devel systemd +BuildRequires: gcc +BuildRequires: pkgconfig systemd-devel systemd +BuildRequires: meson ninja-build Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units - +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description The iSNS package contains the daemon and tools to setup a iSNS server, @@ -23,14 +24,12 @@ allows automated discovery, management and configuration of iSCSI and Fibre Channel devices (using iFCP gateways) on a TCP/IP network. %package libs -Group: Development/Libraries Summary: Shared library files for iSNS %description libs Shared library files for iSNS %package devel -Group: Development/Libraries Summary: Development files for iSNS Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -39,32 +38,33 @@ Development files for iSNS %prep -%autosetup -n open-isns-%{version} -p1 +%autosetup -p1 -n open-isns-%{version} %build -%configure --enable-shared --disable-static -make %{?_smp_mflags} - +%meson -Dsecurity=disabled -Dslp=disabled +%meson_build %install -make install DESTDIR=%{buildroot} -make install_hdrs DESTDIR=%{buildroot} -make install_lib DESTDIR=%{buildroot} +%meson_install chmod 755 %{buildroot}%{_sbindir}/isns* chmod 755 %{buildroot}%{_libdir}/libisns.so.0 +chmod 700 %{buildroot}/var/lib/isns +rm %{buildroot}%{_unitdir}/isnsd.service +rm %{buildroot}%{_unitdir}/isnsd.socket +install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service %post -%systemd_post isnsd.service isnsd.socket +%systemd_post isnsd.service %postun -%systemd_postun isnsd.service isnsd.socket +%systemd_postun isnsd.service %preun -%systemd_preun isnsd.service isnsd.socket +%systemd_preun isnsd.service %triggerun -- isns-utils < 0.91-7 @@ -78,39 +78,94 @@ chmod 755 %{buildroot}%{_libdir}/libisns.so.0 /bin/systemctl try-restart isnsd.service >/dev/null 2>&1 || : -%post -n %{name}-libs -p /sbin/ldconfig - -%postun -n %{name}-libs -p /sbin/ldconfig +%ldconfig_scriptlets -n %{name}-libs %files -%defattr(-,root,root,-) -%doc COPYING README +%doc COPYING README.md %{_sbindir}/isnsd %{_sbindir}/isnsadm %{_sbindir}/isnsdd %{_mandir}/man5/* %{_mandir}/man8/* %{_unitdir}/isnsd.service -%{_unitdir}/isnsd.socket %dir %{_sysconfdir}/isns %dir %{_var}/lib/isns %config(noreplace) %{_sysconfdir}/isns/* %files libs -%defattr(-,root,root,-) %{_libdir}/libisns.so.0 %files devel -%defattr(-,root,root,-) %dir %{_includedir}/libisns %{_includedir}/libisns/*.h %{_libdir}/libisns.so +%{_libdir}/pkgconfig/libisns.pc %changelog -* Fri Mar 22 2019 Chris Leech - 0.99-1 -- rebase to 0.99 +* Fri Dec 13 2024 Chris Leech - 0.101-12 +- Add explicit requires with version on subpackage isns-utils-lib + Resolves: RHEL-70744 + +* Tue Oct 29 2024 Troy Dawson - 0.101-11 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 0.101-10 +- Bump release for June 2024 mass rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 0.101-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 0.101-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 0.101-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 0.101-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 0.101-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 0.101-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Sep 14 2021 Sahana Prasad - 0.101-3 +- Rebuilt with OpenSSL 3.0.0 + +* Thu Jul 22 2021 Fedora Release Engineering - 0.101-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue May 18 2021 Chris Leech - 0.101-0 +- update to 0.101 + +* Tue Jan 26 2021 Fedora Release Engineering - 0.100-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Sep 17 2020 Chris Leech - 0.100-0 +- rebase to upstream v0.100 + patches from git + +* Fri Aug 21 2020 Tom Stellard - 0.97-12 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Tue Jul 28 2020 Fedora Release Engineering - 0.97-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 0.97-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.97-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 0.97-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.97-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 0.97-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/isnsd.service b/isnsd.service new file mode 100644 index 0000000..f4ee128 --- /dev/null +++ b/isnsd.service @@ -0,0 +1,9 @@ +[Unit] +Description=ISNS Server +After=network.target + +[Service] +ExecStart=/usr/sbin/isnsd -f + +[Install] +WantedBy=multi-user.target diff --git a/sources b/sources index 19ad6ae..b419c02 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (open-isns-0.99.tar.gz) = 90a2297535c5e939f83c761173ce5f5f88e68adc31e41e833b23d07b6dc6959572ae7184db0084b861918199a877b251ebae4b4a7456fdd8c93400dc8457adc9 +SHA512 (open-isns-0.103.tar.gz) = 219dd4f7e0a8459f5acaf2036fc737b90604cdcfe78b5492d50e4826744923afe35c9c331b3e39aa7c9bb5ebb2c378c464dced204d51da46e2b7474c6ca94057 diff --git a/test_as_installed.patch b/test_as_installed.patch index 63d8452..372a4e2 100644 --- a/test_as_installed.patch +++ b/test_as_installed.patch @@ -1,27 +1,57 @@ +From f04f3c56ac1598a787cee58489e3de5589d7f879 Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Fri, 13 Dec 2024 20:48:21 -0800 +Subject: [PATCH 1/1] Test from installed for CI + +Signed-off-by: Chris Leech +--- + tests/Makefile | 5 +++++ + tests/harness.py | 6 ++++++ + 2 files changed, 11 insertions(+) + create mode 100644 tests/Makefile + diff --git a/tests/Makefile b/tests/Makefile -index 5b7884f319e0..f4ec3428d29b 100644 ---- a/tests/Makefile +new file mode 100644 +index 0000000..cd856c2 +--- /dev/null +++ b/tests/Makefile -@@ -43,3 +43,8 @@ tests-no-security: - @for test in test*.pl; do \ - perl $$test -i -q; \ - done -+ +@@ -0,0 +1,5 @@ ++# Run tests on installed executables for CI ++# Excludes tests that use external test binaries (8-11) +tests-as-installed: -+ @for test in test*.pl; do \ -+ perl $$test -q --path="/usr/sbin/"; \ -+ done -diff --git a/tests/harness.pl b/tests/harness.pl -index 7ed4fa09f5b6..fc7f937a3ca0 100755 ---- a/tests/harness.pl -+++ b/tests/harness.pl -@@ -858,7 +858,8 @@ sub __isns_prep_test { - GetOptions('verbose+' => \$__isns_verbose, - "quiet" => \$__isns_quiet, - "fast" => \$__isns_quick, -- "insecure" => \$__isns_insecure); -+ "insecure" => \$__isns_insecure, -+ "path=s" => \$__isns_bin); - $__isns_verbose = 0 if ($__isns_quiet); - $__isns_security = 0 if ($__isns_insecure); ++ @echo running tests from installed executables ++ ./test-isns.py --bin-dir=/usr/sbin Test0{1..7} +diff --git a/tests/harness.py b/tests/harness.py +index f232132..d5a03b1 100644 +--- a/tests/harness.py ++++ b/tests/harness.py +@@ -60,6 +60,8 @@ def get_bindir(): + """ + return the directory where binaries live + """ ++ if os.path.isabs(Global.isns_bin_dir): ++ return Global.isns_bin_dir + return '%s/%s' % (Global.test_dir, Global.isns_bin_dir) + def isns_stage(name, msg): +@@ -148,6 +150,9 @@ def new_initArgParsers(self): + self._main_parser.add_argument('-D', '--test-dir', dest='test_dir', + default='.', + help='Sets the test dir (default ".")') ++ self._main_parser.add_argument('--bin-dir', dest='bin_dir', ++ default='../builddir', ++ help='Sets the isns bin dir (default "../builddir")') + + def new_parseArgs(self, argv): + """ +@@ -160,6 +165,7 @@ def new_parseArgs(self, argv): + Global.security = self.security + Global.debug = self.debug + Global.test_dir = self.test_dir ++ Global.isns_bin_dir = self.bin_dir + dprint("found: debug=%s, verbosity=%d, security=%s, list=%s, test_dir='%s'" % \ + (Global.debug, Global.verbosity, + Global.security, self.list, self.test_dir)) +-- +2.47.0 +