open-isns/open-isns.spec

139 lines
3.8 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package open-isns
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1600
%bcond_with slp
%else
%bcond_without slp
%endif
Name: open-isns
Summary: Partial Implementation of iSNS iSCSI registration
License: LGPL-2.1-or-later
Group: System/Kernel
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
Version: 0.102
Release: 0
Source: %{name}-%{version}.tar.xz
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
Patch1: Quiet-a-commpiler-warning.patch
URL: https://github.com/open-iscsi/%{name}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: glibc-devel
BuildRequires: make
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
BuildRequires: meson >= 0.55.0
%if %{with slp}
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
BuildRequires: openslp-devel
%endif
BuildRequires: openssl-devel
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
Requires: coreutils
Recommends: open-iscsi
%description
This is a partial implementation of the iSNS protocol (see below),
which supplies directory services for iSCSI initiators and targets.
The iSNS protocol is specified in
[RFC 4171](http://tools.ietf.org/html/rfc4171) and its purpose is to
make easier to discover, manage, and configure iSCSI devices. With
iSNS, iSCSI targets can be registered to a central iSNS server and
initiators can be configured to discover the targets by asking the
iSNS server.
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%package devel
Summary: Development files for open-isns
Group: Development/Libraries/C and C++
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
Requires: %{name} = %{version}
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%description devel
Files to develop an application using the open-isns library.
%prep
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%autosetup -p1
%build
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
%meson --default-library=both \
%if %{with slp}
-Dslp=enabled
%else
-Dslp=disabled
%endif
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%meson_build
%install
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%meson_install
ln -sf /usr/sbin/service %{buildroot}/usr/sbin/rcisnsd
%post
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%{run_ldconfig}
%{service_add_post isnsd.socket isnsd.service}
%postun
%{service_del_postun isnsd.socket isnsd.service}
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%{run_ldconfig}
%pre
%{service_add_pre isnsd.socket isnsd.service}
%preun
%{service_del_preun isnsd.socket isnsd.service}
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%post devel -p %{run_ldconfig}
%postun devel -p %{run_ldconfig}
%files
%defattr(-,root,root)
%{_sbindir}/isnsd
%{_sbindir}/isnsadm
%{_sbindir}/isnsdd
%dir %{_sysconfdir}/isns
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/isns/isnsd.conf
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/isns/isnsadm.conf
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/isns/isnsdd.conf
%{_sbindir}/rcisnsd
%license COPYING
%doc HACKING README TODO
%doc %{_mandir}/man8/isnsd.8%{?ext_man}
%doc %{_mandir}/man8/isnsadm.8%{?ext_man}
%doc %{_mandir}/man8/isnsdd.8%{?ext_man}
%doc %{_mandir}/man5/isns_config.5%{?ext_man}
%{_unitdir}/isnsd.service
%{_unitdir}/isnsd.socket
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%{_libdir}/libisns.so.0
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%files devel
%defattr(-,root,root)
%dir %{_includedir}/libisns
%{_includedir}/libisns/attrs.h
%{_includedir}/libisns/buffer.h
%{_includedir}/libisns/isns.h
%{_includedir}/libisns/isns-proto.h
%{_includedir}/libisns/message.h
%{_includedir}/libisns/paths.h
%{_includedir}/libisns/source.h
%{_includedir}/libisns/types.h
%{_includedir}/libisns/util.h
%{_libdir}/libisns.a
Accepting request 1002211 from home:lee_duncan:branches:Base:System - Update to version 0.102: * Preparing for version v0.102 * meson: just specify subdir for header-file install. * build: only specify version in one place * Fix two compiler warnings in slp.c * meson: update README * meson: small option usage cleanup * meson: several updates based on review * meson: fix error building shared lib with version * meson: convert some args to 'features' * meson: update README with meson info * Add a decprecation warning to configure script. * meson: Add ability to disable static library build * meson builds now working * git: ignore all shared library files * build: Remove these two files, no longer used * Add a package config file for libisns.a * isnsd: socket: Make sure to create IPv6 socket default * isnsadm: Fix unparse command line options "-V" and "-r" * Typo: s/overried/override/ * Removed bash-specific function definitions. Also, added patch to quiet compiler (soon upstream): * Quiet-a-commpiler-warning.patch This changes the SPEC file to use the new meson build system, supported in open-isns starting with version 0.102, instead of autoconf/make. Changes in the code: * no longer deliver isnsetup script or man page (development only) * now deliver a package config file for the library * now deliver both the static library and a shared library OBS-URL: https://build.opensuse.org/request/show/1002211 OBS-URL: https://build.opensuse.org/package/show/Base:System/open-isns?expand=0&rev=39
2022-09-09 00:52:14 +02:00
%{_libdir}/libisns.so
%{_libdir}/pkgconfig/libisns.pc
%changelog