Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package open-iscsi for openSUSE:Factory checked in at 2022-12-11 17:16:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/open-iscsi (Old) and /work/SRC/openSUSE:Factory/.open-iscsi.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "open-iscsi" Sun Dec 11 17:16:25 2022 rev:123 rq:1042042 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/open-iscsi/open-iscsi.changes 2022-11-17 17:23:32.120757819 +0100 +++ /work/SRC/openSUSE:Factory/.open-iscsi.new.1835/open-iscsi.changes 2022-12-11 17:16:27.209820078 +0100 @@ -1,0 +2,11 @@ +Wed Dec 7 18:47:08 UTC 2022 - Lee Duncan <ldun...@suse.com> + +- Moving DB files from /etc/iscsi/* to /var/lib/iscsi/* for + SLE-15-SP5 and forward, as is done in Tumbleweed. +- Added /etc/iscsi/README.DB-files-moved, and added SPEC file + changes to support this, including a post-install script to + move the DB files, only installed if DB files are moved. +- Renamed shared library from libopeniscsiusr0_2_0 to + libopeniscsiusr0, to correctly match SONAME in library. + +------------------------------------------------------------------- @@ -5 +16 @@ - * scsid/iscsiuio: fix OOM adjustment (github issue #377) + * iscsid/iscsiuio: fix OOM adjustment (github issue #377) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ open-iscsi.spec ++++++ --- /var/tmp/diff_new_pack.ZJaIWw/_old 2022-12-11 17:16:27.777823242 +0100 +++ /var/tmp/diff_new_pack.ZJaIWw/_new 2022-12-11 17:16:27.781823265 +0100 @@ -16,6 +16,8 @@ # +%define _home_dir %{_sysconfdir}/iscsi + # Ensure usr-merge does not effect existing SLE. Cannot use _sbindir # directly since meson macros pass that on, and meson does not like # setting it to "/sbin". Also and move DB root to /var/lib/iscsi and @@ -23,18 +25,31 @@ %if ! 0%{?is_opensuse} # sle %define _iscsi_sbindir /sbin -%define _dbroot %{_sysconfdir}/iscsi -%define _lockdir %{_sysconfdir}/iscsi +%define _lockdir %{_home_dir} +%if 0%{?suse_version} <= 1540 +%define _dbroot %{_home_dir} +%else +%define _dbroot %{_sharedstatedir}/iscsi +%define _dbroot_new 1 +%endif %else # opensuse %define _iscsi_sbindir /usr/sbin -%define _dbroot %{_sharedstatedir}/iscsi %define _lockdir %{_rundir}/lock/iscsi +%define _dbroot %{_sharedstatedir}/iscsi +%define _dbroot_new 1 +%endif +%if 0%{?_dbroot_new} +%define _install_dbdir_move_readme_value true +%else +%define _install_dbdir_move_readme_value false %endif %define iscsi_minor_release 1 %define iscsi_patch_release 8 %define iscsi_patch_release_suse %{iscsi_patch_release}-suse +%define libname libopeniscsiusr0 +%define libversion 0.2.0 Name: open-iscsi Version: 2.1.8 Release: 0 @@ -60,7 +75,7 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) Requires(post): coreutils -Requires: libopeniscsiusr0_2_0 = %{version} +Requires: %{libname} = %{libversion} %{?systemd_requires} %description @@ -78,14 +93,16 @@ comes with a daemon process called iscsid, and a management utility, iscsiadm. -%package -n libopeniscsiusr0_2_0 -Version: 2.%{iscsi_minor_release}.%{iscsi_patch_release} +%package -n %{libname} +Version: 0.2.0 Release: 0 Summary: The iSCSI User-level Library Group: System/Libraries -Obsoletes: libopeniscsiusr0_1_0 < %{version} +Obsoletes: libopeniscsiusr0_1_0 +Obsoletes: libopeniscsiusr0_2_0 +Conflicts: libopeniscsiusr0_2_0 -%description -n libopeniscsiusr0_2_0 +%description -n %{libname} The iSCSI user-space API from the open-iscsi project. %package -n iscsiuio @@ -115,8 +132,8 @@ Release: 0 Summary: The iSCSI User-level Library Development Library and Include files Group: Development/Libraries/C and C++ +Requires: %{libname} = %{libversion} Requires: %{name} = %{version} -Requires: libopeniscsiusr0_2_0 = %{version} Conflicts: libopeniscsiusr0_1_0 %description devel @@ -133,6 +150,7 @@ %meson --libdir=%{_libdir} \ -Dc_flags="%{optflags} -fno-strict-aliasing -fno-common -DOFFLOAD_BOOT_SUPPORTED" \ -Discsi_sbindir=%{_iscsi_sbindir} -Ddbroot=%{_dbroot} -Drulesdir=%{_udevrulesdir} -Dlockdir=%{_lockdir} \ + -Dinstall_dbdir_move_readme=%{_install_dbdir_move_readme_value} \ --strip %meson_build @@ -149,7 +167,7 @@ ln -s %{_iscsi_sbindir}/service %{buildroot}%{_iscsi_sbindir}/rciscsi-init (cd %{buildroot}/etc; ln -sf iscsi/iscsid.conf iscsid.conf) # create an empty initiatorname file, as a package place holder -echo > %{buildroot}%{_sysconfdir}/iscsi/initiatorname.iscsi +echo > %{buildroot}%{_home_dir}/initiatorname.iscsi # rename iscsiuio logrotate file to proper name %if 0%{?suse_version} > 1500 mkdir -p %{buildroot}%{_distconfdir}/logrotate.d @@ -159,28 +177,40 @@ %endif %fdupes %{buildroot}/%{_prefix} +%pre +%service_add_pre iscsi.service iscsid.service iscsid.socket iscsi-init.service + %post %{?regenerate_initrd_post} -if [ ! -f %{_sysconfdir}/iscsi/initiatorname.iscsi ] ; then +if [ ! -f %{_home_dir}/initiatorname.iscsi ] ; then %{_iscsi_sbindir}/iscsi-gen-initiatorname fi +%if 0%{?_dbroot_new} +# move DB files if and only if not present in new location +for d in ifaces send_targets fw nodes static isns slp; do + if [ -d %{_home_dir}/$d ]; then + if [ -d %{_dbroot}/$d ]; then + echo "Warning: cannot copy DB directory %{_home_dir}/$d to %{_dbroot}/$d: already present" 1>&2 + else + cp -a %{_home_dir}/$d %{_dbroot} + fi + fi +done +%endif %service_add_post iscsi.service iscsid.service iscsid.socket iscsi-init.service %posttrans %{?regenerate_initrd_posttrans} +%preun +%service_del_preun iscsi.service iscsid.service iscsid.socket iscsi-init.service + %postun %service_del_postun_without_restart iscsi.service %service_del_postun iscsi.service iscsid.service iscsid.socket iscsi-init.service -%pre -%service_add_pre iscsi.service iscsid.service iscsid.socket iscsi-init.service - -%preun -%service_del_preun iscsi.service iscsid.service iscsid.socket iscsi-init.service - -%post -n libopeniscsiusr0_2_0 -p %{run_ldconfig} -%postun -n libopeniscsiusr0_2_0 -p %{run_ldconfig} +%post -n %{libname} -p %{run_ldconfig} +%postun -n %{libname} -p %{run_ldconfig} %post -n iscsiuio %service_add_post iscsiuio.service iscsiuio.socket @@ -195,10 +225,13 @@ %service_del_preun iscsiuio.service iscsiuio.socket %files -%dir %{_sysconfdir}/iscsi +%dir %{_home_dir} %{_sysconfdir}/iscsid.conf -%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/iscsi/iscsid.conf -%ghost %{_sysconfdir}/iscsi/initiatorname.iscsi +%attr(0600,root,root) %config(noreplace) %{_home_dir}/iscsid.conf +%ghost %{_home_dir}/initiatorname.iscsi +%if 0%{?_dbroot_new} +%config %{_home_dir}/README.DB-files-moved +%endif %dir %{_dbroot} %dir %{_dbroot}/ifaces %{_dbroot}/ifaces/iface.example @@ -229,7 +262,7 @@ %{_mandir}/man8/iscsi-gen-initiatorname.8%{ext_man} %{_udevrulesdir}/50-iscsi-firmware-login.rules -%files -n libopeniscsiusr0_2_0 +%files -n %{libname} %{_libdir}/libopeniscsiusr.so.* %files -n iscsiuio ++++++ open-iscsi-2.1.8-suse.tar.bz2 ++++++ ++++++ open-iscsi-SUSE-latest.diff.bz2 ++++++ --- /var/tmp/diff_new_pack.ZJaIWw/_old 2022-12-11 17:16:28.241825828 +0100 +++ /var/tmp/diff_new_pack.ZJaIWw/_new 2022-12-11 17:16:28.245825849 +0100 @@ -1,3 +1,61 @@ +diff --git a/etc/README.DB-files-moved.template b/etc/README.DB-files-moved.template +new file mode 100644 +index 000000000000..b69a3de83e55 +--- /dev/null ++++ b/etc/README.DB-files-moved.template +@@ -0,0 +1,12 @@ ++# ++# README file for open-iscsi Home Directory ++# ++ ++Note: the database (DB) files that used to be located here have moved. ++They have moved from this directory to: ++ ++ @DBROOT@ ++ ++If you use the normal open-iscsi tools for manipulating these DB files, ++they will work fine. But if you wish to manually edit them, please note ++the new location. +diff --git a/etc/iscsid.conf b/etc/iscsid.conf +index 79d8127cacca..93118e953749 100644 +--- a/etc/iscsid.conf ++++ b/etc/iscsid.conf +@@ -19,7 +19,7 @@ + # the time then leave this attribute commented out. + # + # Default for Fedora and RHEL. Uncomment to activate. +-# iscsid.startup = /bin/systemctl start iscsid.socket iscsiuio.socket ++iscsid.startup = /bin/systemctl start iscsid.socket iscsiuio.socket + # + # Default for Debian and Ubuntu. Uncomment to activate. + # iscsid.startup = /bin/systemctl start iscsid.socket +@@ -29,7 +29,7 @@ + + # Check for active mounts on devices reachable through a session + # and refuse to logout if there are any. Defaults to "No". +-# iscsid.safe_logout = Yes ++iscsid.safe_logout = Yes + + # Only require UID auth for MGMT IPCs, and not username. + # Useful if you want to run iscsid in a constrained environment. +diff --git a/etc/meson.build b/etc/meson.build +index 3d44f54459fe..f72718a30e2f 100644 +--- a/etc/meson.build ++++ b/etc/meson.build +@@ -7,3 +7,13 @@ iscsi_etc_iface_file_src = files('iface.example') + + # for our config file + iscsi_etc_config_file_src = files('iscsid.conf') ++ ++# templated etc files ++iscsi_etc_files_arr = {} ++if install_dbdir_move_readme ++ iscsi_etc_files = ['README.DB-files-moved'] ++ iscsi_etc_files_arr = {} ++ foreach u: iscsi_etc_files ++ iscsi_etc_files_arr += {u: files(u + '.template')} ++ endforeach ++endif diff --git a/iscsiuio/src/unix/main.c b/iscsiuio/src/unix/main.c index 0c9ad49441d1..9a2a60cdb721 100644 --- a/iscsiuio/src/unix/main.c @@ -66,8 +124,37 @@ } +diff --git a/meson.build b/meson.build +index 74e61033e7a4..be41e680835c 100644 +--- a/meson.build ++++ b/meson.build +@@ -41,6 +41,7 @@ endif + c_args = get_option('c_args') + man_dir = get_option('mandir') + iscsi_sbindir = get_option('iscsi_sbindir') ++install_dbdir_move_readme = get_option('install_dbdir_move_readme') + + # + # get list of sources from subdirs (iscsiuio included at bottom) +@@ -277,6 +278,16 @@ if not meson.is_cross_build() + install_mode: 'rw-r--r--') + endif + ++# handle any etc templated files (e.g. README*) ++foreach k,v: iscsi_etc_files_arr ++ configure_file( ++ input: v, ++ output: k, ++ configuration: conf, ++ install: true, ++ install_dir: home_dir) ++endforeach ++ + # + # handle documentation from 'doc' + # diff --git a/meson_options.txt b/meson_options.txt -index b76f044d628b..07fd7c0c5c14 100644 +index b76f044d628b..627ab89ecf06 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,8 +3,6 @@ option('systemddir', type: 'string', value: '/usr/lib/systemd', @@ -79,6 +166,12 @@ # these are in the 'sysconfigdir' (/etc by default) unless overridden option('homedir', type: 'string', value: 'iscsi', description: 'Set the HOME directory [/etc/iscsi]') +@@ -18,3 +16,5 @@ option('rulesdir', type: 'string', value: 'udev/rules.d', + # older version of meson do not allow overriding sbindir + option('iscsi_sbindir', type: 'string', value: '/usr/sbin', + description: 'Set the directory where our binaries go [/usr/sbin]') ++option('install_dbdir_move_readme', type: 'boolean', value: false, ++ description: 'Install README in home directory saying DB files have moved') diff --git a/usr/iscsi_util.c b/usr/iscsi_util.c index db1dc377727f..2f1de3e61dc3 100644 --- a/usr/iscsi_util.c