diff --git a/isns-utils-0.102.tar.gz b/isns-utils-0.102.tar.gz deleted file mode 100644 index d4d965bbcb1532d6fb6918c72d68acb28beb1d30..0000000000000000000000000000000000000000 Binary files a/isns-utils-0.102.tar.gz and /dev/null differ diff --git a/isns-utils.spec b/isns-utils.spec index c9d7c39c89e4302a09e3daf3bbd064d203210edc..2b2bee67a89bdc80ef4f3562a741be7037db79b4 100644 --- a/isns-utils.spec +++ b/isns-utils.spec @@ -1,14 +1,16 @@ -%define anolis_release 2 +%define anolis_release 1 Name: isns-utils -Version: 0.102 +Version: 0.103 Release: %{anolis_release}%{?dist} Summary: The iSNS daemon and utility programs License: LGPLv2+ URL: https://github.com/open-iscsi/open-isns -Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/isns-utils-%{version}.tar.gz +Source0: https://github.com/open-iscsi/open-isns/archive/v%{version}.tar.gz#/open-isns-%{version}.tar.gz Source1: isnsd.service -BuildRequires: gcc openssl-devel automake pkgconfig systemd-devel systemd make +Patch1: test_as_installed.patch +BuildRequires: gcc openssl-devel pkgconfig systemd-devel systemd +BuildRequires: meson ninja-build Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units @@ -44,15 +46,14 @@ The %{name}-doc package contains documentation files for %{name}. %autosetup -p1 -n open-isns-%{version} %build -%configure --enable-shared --disable-static -%make_build +%meson -Dsecurity=disabled -Dslp=disabled +%meson_build %install -%make_install -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 @@ -74,6 +75,7 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service /sbin/chkconfig --del isnsd >/dev/null 2>&1 || : /bin/systemctl try-restart isnsd.service >/dev/null 2>&1 || : +%ldconfig_scriptlets -n %{name}-libs %files %license COPYING %dir %{abidir} @@ -101,9 +103,12 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service %{_libdir}/libisns.so %files doc -%doc README +%doc README.md %changelog +* Wed Feb 19 2025 Xiaoping Liu - 0.103-1 +- Sync up from CentOS Stream isns-utils-0.103-1 (cleech@redhat.com) + * Thu Apr 13 2023 Kaihao Bai - 0.102-2 - optimize spec diff --git a/open-isns-0.103.tar.gz b/open-isns-0.103.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fffa92e3ae32c809dac254205ae93f7057c1d33b Binary files /dev/null and b/open-isns-0.103.tar.gz differ diff --git a/test_as_installed.patch b/test_as_installed.patch new file mode 100644 index 0000000000000000000000000000000000000000..372a4e2db673575ea2330be6b0128a673cb8e3b4 --- /dev/null +++ b/test_as_installed.patch @@ -0,0 +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 +new file mode 100644 +index 0000000..cd856c2 +--- /dev/null ++++ b/tests/Makefile +@@ -0,0 +1,5 @@ ++# Run tests on installed executables for CI ++# Excludes tests that use external test binaries (8-11) ++tests-as-installed: ++ @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 +