Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tgt for openSUSE:Factory checked in 
at 2026-03-25 21:18:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tgt (Old)
 and      /work/SRC/openSUSE:Factory/.tgt.new.8177 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tgt"

Wed Mar 25 21:18:56 2026 rev:47 rq:1342338 version:1.0.97

Changes:
--------
--- /work/SRC/openSUSE:Factory/tgt/tgt.changes  2025-03-26 21:22:40.744661628 
+0100
+++ /work/SRC/openSUSE:Factory/.tgt.new.8177/tgt.changes        2026-03-27 
06:51:05.153873373 +0100
@@ -1,0 +2,15 @@
+Tue Mar 24 23:14:52 UTC 2026 - Dirk Müller <[email protected]>
+
+- Update to version 1.0.97+0.f0dc199:
+  * tgt 1.0.97
+  * tgtd.service hardening
+  * glusterfs apparently changed some of their APIs to take some extra options 
parameters, which it is OK to pass NULL for. This seems to have happened a 
number of years ago now (2019?), so perhaps we can get away with not making 
this conditional?
+  * More updates to examples and manpage update
+  * Update examples
+  * tgt 1.0.96
+  * Install examples in documentation directory
+  * Support vtl setup from config files
+  * Fix escaping of commands
+- drop tgt-install-examples-in-documentation-dir.patch (upstream)
+
+-------------------------------------------------------------------

Old:
----
  tgt-1.0.95+0.2b6396622346.tar.xz
  tgt-install-examples-in-documentation-dir.patch

New:
----
  tgt-1.0.97+0.f0dc199.tar.xz

----------(Old B)----------
  Old:  * Fix escaping of commands
- drop tgt-install-examples-in-documentation-dir.patch (upstream)
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tgt.spec ++++++
--- /var/tmp/diff_new_pack.OBKmNd/_old  2026-03-27 06:51:06.249918618 +0100
+++ /var/tmp/diff_new_pack.OBKmNd/_new  2026-03-27 06:51:06.257918948 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package tgt
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,10 @@
 #
 
 
-%define tgt_service_tag 0.2b6396622346
+%define tgt_service_tag 0.f0dc199
 
 Name:           tgt
-Version:        1.0.95
+Version:        1.0.97
 Release:        0
 Summary:        Generic Linux target framework (tgt)
 License:        GPL-2.0-only
@@ -28,7 +28,6 @@
 Source:         %{name}-%{version}+%{tgt_service_tag}.tar.xz
 Source1:        sysconfig.%{name}
 Patch1:         %{name}-fix-build
-Patch2:         %{name}-install-examples-in-documentation-dir.patch
 Patch3:         harden_tgtd.service.patch
 Patch4:         %{name}-systemd-service-update.patch
 BuildRequires:  docbook-xsl-stylesheets

++++++ _service ++++++
--- /var/tmp/diff_new_pack.OBKmNd/_old  2026-03-27 06:51:06.317921425 +0100
+++ /var/tmp/diff_new_pack.OBKmNd/_new  2026-03-27 06:51:06.333922086 +0100
@@ -1,15 +1,15 @@
 <services>
-  <service name="tar_scm" mode="disabled">
+  <service name="tar_scm" mode="manual">
     <param name="url">https://github.com/fujita/tgt.git</param>
     <param name="scm">git</param>
     <param name="filename">tgt</param>
-    <param name="version">master</param>
-    <param name="versionformat">1.0.95+@TAG_OFFSET@.%h</param>
-    <param name="match-tag">v1.0.95</param>
+    <param name="version">v1.0.97</param>
+    <param name="versionformat">1.0.97+@TAG_OFFSET@.%h</param>
+    <param name="match-tag">v1.0.97</param>
     <param name="revision">master</param>
     <param name="changesgenerate">enable</param>
   </service>
-  <service name="recompress" mode="disabled">
+  <service name="recompress" mode="manual">
     <param name="file">tgt*.tar</param>
     <param name="compression">xz</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.OBKmNd/_old  2026-03-27 06:51:06.417925553 +0100
+++ /var/tmp/diff_new_pack.OBKmNd/_new  2026-03-27 06:51:06.437926379 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/fujita/tgt.git</param>
-              <param 
name="changesrevision">2b63966223469f4b21f23cb87651821fcafad13d</param></service></servicedata>
+              <param 
name="changesrevision">f0dc199bd5887ee0de5c1dc4fa9e97af52fccdb8</param></service></servicedata>
 (No newline at EOF)
 

++++++ tgt-1.0.95+0.2b6396622346.tar.xz -> tgt-1.0.97+0.f0dc199.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tgt-1.0.95+0.2b6396622346/Makefile 
new/tgt-1.0.97+0.f0dc199/Makefile
--- old/tgt-1.0.95+0.2b6396622346/Makefile      2025-03-01 02:32:40.000000000 
+0100
+++ new/tgt-1.0.97+0.f0dc199/Makefile   2025-11-03 01:20:54.000000000 +0100
@@ -1,4 +1,4 @@
-VERSION ?= 1.0.95
+VERSION ?= 1.0.97
 
 CHECK_CC = cgcc
 CHECK_CC_FLAGS = '$(CHECK_CC) -Wbitwise -Wno-return-void -no-compile $(ARCH)'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tgt-1.0.95+0.2b6396622346/conf/Makefile 
new/tgt-1.0.97+0.f0dc199/conf/Makefile
--- old/tgt-1.0.95+0.2b6396622346/conf/Makefile 2025-03-01 02:32:40.000000000 
+0100
+++ new/tgt-1.0.97+0.f0dc199/conf/Makefile      2025-11-03 01:20:54.000000000 
+0100
@@ -1,4 +1,5 @@
 sysconfdir ?= /etc
+docdatadir ?= /usr/share/doc/packages
 
 EXAMPLES = targets.conf.example targets.conf.vtl.L700 targets.conf.vtl.MSL2024
 
@@ -11,9 +12,9 @@
        if [ ! -f $(DESTDIR)$(sysconfdir)/tgt/targets.conf ] ; then \
                install -m 644 targets.conf $(DESTDIR)$(sysconfdir)/tgt ; \
        fi
-       install -d -m 755 $(DESTDIR)$(sysconfdir)/tgt/examples
+       install -d -m 755 $(DESTDIR)$(docdatadir)/tgt/examples
        for f in $(EXAMPLES) ; do \
-               install -m 644 examples/$$f 
$(DESTDIR)$(sysconfdir)/tgt/examples ;\
+               install -m 644 examples/$$f 
$(DESTDIR)$(docdatadir)/tgt/examples ;\
        done
        install -d $(DESTDIR)$(sysconfdir)/tgt/conf.d
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tgt-1.0.95+0.2b6396622346/conf/examples/targets.conf.vtl.L700 
new/tgt-1.0.97+0.f0dc199/conf/examples/targets.conf.vtl.L700
--- old/tgt-1.0.95+0.2b6396622346/conf/examples/targets.conf.vtl.L700   
2025-03-01 02:32:40.000000000 +0100
+++ new/tgt-1.0.97+0.f0dc199/conf/examples/targets.conf.vtl.L700        
2025-11-03 01:20:54.000000000 +0100
@@ -1,13 +1,17 @@
 # Virtual tape library example for a STK L700 tape library
 #
 # In this case, tapes are stored in the directory /root/tapes
-# size is in MB (1 GB in this case)
-# using the command "tgtimg --op=new --device-type=tape --barcode="A00000001" 
--size=10240 --type=data --file=A00000001"
+# size is in MB (1 GB in this case) and created # using the command
+# "tgtimg --op=new --device-type=tape --barcode="A00000001" --size=1024 
--type=data --file=A00000001"
+# N.B. despite the parameter name, tapes added with barcode=xxx must have a
+# filename of xxx regardless of their barcode when created.
 #
-# The tapes can be added after startup with
-# "tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 --params 
element_type=2,address=1000,barcode=A0000001,sides=1"
-# for slot 0 (is nr 1000)
+# In this example, slots 1-3 (1000-1002) are prepopulated. The tapes must be 
created as above first.
 #
+# Additional tapes can be added after startup with
+# "tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 --params 
element_type=2,address=1003,barcode=A0000004,sides=1"
+# for slot 4 (is nr 1003)
+# mtx -f $changer load 4 0
 
 include /etc/tgt/temp/*.conf
 
@@ -15,16 +19,7 @@
 
 <target iqn.2008-09.com.example:server.tape>
     allow-in-use yes
-#
-# For every drive We need a backing store, although the tape drive will be 
empty,
-# so we create a dummy tape "notape" in directory /root/tapes
-# with the command "tgtimg --op=new --device-type=tape --barcode="" --size=1 
--type=clean --file=notape"
-# and create symbolic links for every drive (limitation of tgt)
-# link -s /root/tapes/notape /root/tapes/notape1
-# link -s /root/tapes/notape /root/tapes/notape2
-# link -s /root/tapes/notape /root/tapes/notape2
-#
-    <backing-store /root/tapes/notape1>
+    <backing-store NONE:0>
         lun 1
         device-type tape
         removable 1
@@ -34,7 +29,7 @@
         scsi_sn "HUM1A00001"
         scsi_id "HP LTO3 ULTRIUM"
     </backing-store>
-    <backing-store /root/tapes/notape2>
+    <backing-store NONE:1>
         lun 2
         device-type tape
         removable 1
@@ -44,7 +39,7 @@
         scsi_sn "HUM1A00002"
         scsi_id "HP LTO3 ULTRIUM"
     </backing-store>
-    <backing-store /root/tapes/notape3>
+    <backing-store NONE:2>
         lun 3
         device-type tape
         removable 1
@@ -54,6 +49,10 @@
         scsi_sn "HUM1A00003"
         scsi_id "HP LTO3 ULTRIUM"
     </backing-store>
+#
+# For the tape changer we need also a backing store, this can be a file 
containing zeros, like this:
+# "dd if=/dev/zero of=$HOME/smc bs=1k count=1"
+#
     <backing-store /root/smc>
         lun 4
         device-type changer
@@ -81,12 +80,17 @@
         params element_type=1,start_address=1,quantity=1,media_home=/root/tapes
         # Type 2: Storage Elements (tape slots)
         params 
element_type=2,start_address=1000,quantity=216,media_home=/root/tapes
+        # Start with some tapes loaded.
+        params 
element_type=2,address=1000,barcode=A00000001,media_home=/root/tapes
+        params 
element_type=2,address=1001,barcode=A00000002,media_home=/root/tapes
+        params 
element_type=2,address=1002,barcode=A00000003,media_home=/root/tapes
         # Type 3: Import/Export Elements (CAP)
         params 
element_type=3,start_address=10,quantity=20,media_home=/root/tapes
         # Type 4: Add Data Transfer devices (drives)
         params 
element_type=4,start_address=500,quantity=3,media_home=/root/tapes
-        params element_type=4,address=500,tid=1,lun=1
-        params element_type=4,address=500,tid=1,lun=2
-        params element_type=4,address=500,tid=1,lun=3
+        params element_type=4,address=500,tid=${tid},lun=1
+        params element_type=4,address=501,tid=${tid},lun=2
+        params element_type=4,address=502,tid=${tid},lun=3
+
     </backing-store>
 </target>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tgt-1.0.95+0.2b6396622346/conf/examples/targets.conf.vtl.MSL2024 
new/tgt-1.0.97+0.f0dc199/conf/examples/targets.conf.vtl.MSL2024
--- old/tgt-1.0.95+0.2b6396622346/conf/examples/targets.conf.vtl.MSL2024        
2025-03-01 02:32:40.000000000 +0100
+++ new/tgt-1.0.97+0.f0dc199/conf/examples/targets.conf.vtl.MSL2024     
2025-11-03 01:20:54.000000000 +0100
@@ -3,10 +3,13 @@
 # In this case, tapes are stored in the directory /root/tapes
 # size is in MB (1 GB in this case)
 # using the command "tgtimg --op=new --device-type=tape --barcode="A00000001" 
--size=10240 --type=data --file=A00000001"
+# N.B. despite the parameter name, tapes added with barcode=xxx must have a
+# filename of xxx regardless of their barcode when created.
 #
 # The tapes can be added after startup with
 # "tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 --params 
element_type=2,address=1000,barcode=A0000001,sides=1"
-# for slot 0 (is nr 1000)
+# for slot 1 (is nr 1000)
+# mtx -f $changer load 1 0
 #
 # Please note that an MSL-2024 has no IMPORT/EXPORT elements (type 3)
 
@@ -16,12 +19,7 @@
 
 <target iqn.2008-09.com.example:server.tape>
     allow-in-use yes
-#
-# We need a backing store, although the tape drive will be empty,
-# so we create a dummy tape "notape" in directory /root/tapes
-# with the command "tgtimg --op=new --device-type=tape --barcode="" --size=1 
--type=clean --file=notape"
-#
-    <backing-store /root/tapes/notape>
+    <backing-store NONE:0>
         lun 1
         device-type tape
         removable 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tgt-1.0.95+0.2b6396622346/doc/targets.conf.5.xml 
new/tgt-1.0.97+0.f0dc199/doc/targets.conf.5.xml
--- old/tgt-1.0.95+0.2b6396622346/doc/targets.conf.5.xml        2025-03-01 
02:32:40.000000000 +0100
+++ new/tgt-1.0.97+0.f0dc199/doc/targets.conf.5.xml     2025-11-03 
01:20:54.000000000 +0100
@@ -380,6 +380,11 @@
          <para>
            Pass additional parameters to tgtadm.
          </para>
+         <para>
+           Note that '${tid}' and '${lun}' can be used verbatim to refer to the
+           tid and lun that are being configured. See targets.conf.vtl.L700 for
+           an example.
+         </para>
        </listitem>
       </varlistentry>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tgt-1.0.95+0.2b6396622346/scripts/tgt-admin 
new/tgt-1.0.97+0.f0dc199/scripts/tgt-admin
--- old/tgt-1.0.95+0.2b6396622346/scripts/tgt-admin     2025-03-01 
02:32:40.000000000 +0100
+++ new/tgt-1.0.97+0.f0dc199/scripts/tgt-admin  2025-11-03 01:20:54.000000000 
+0100
@@ -423,6 +423,7 @@
                }
        }
 
+       $param_value =~ s/'/\\'/g;
        if ($param eq "scsi_id" ||
            $param eq "scsi_sn" ||
            $param eq "vendor_id" ||
@@ -438,10 +439,12 @@
            $param eq "optimal_xfer_gran" ||
            $param eq "optimal_xfer_len" ||
            $param eq "readonly") {
-               return("tgtadm -C $control_port --lld $driver --op update 
--mode logicalunit --tid $next_tid --lun=$lun --params 
$param=\"$param_value\"");
+               return("tgtadm -C $control_port --lld $driver --op update 
--mode logicalunit --tid $next_tid --lun=$lun --params $param='$param_value'");
        }
        if ($param eq "params") {
-               return("tgtadm -C $control_port --lld $driver --op update 
--mode logicalunit --tid $next_tid --lun=$lun --params \"$param_value\"");
+               $param_value =~ s/\${tid}/$next_tid/g;
+               $param_value =~ s/\${lun}/$lun/g;
+               return("tgtadm -C $control_port --lld $driver --op update 
--mode logicalunit --tid $next_tid --lun=$lun --params '$param_value'");
 
        }
 }
@@ -488,7 +491,7 @@
        }
 
        if ($can_alloc == 1 &&
-          ($bstype =~ "glfs" || $bstype =~ "rbd" || (-e $backing_store && ! -d 
$backing_store))) {
+          ($bstype =~ "glfs" || $bstype =~ "rbd" || $backing_store =~ "^NONE:" 
|| (-e $backing_store && ! -d $backing_store))) {
                my @exec_commands;
                my $device_type;
                my $bs_type;
@@ -720,12 +723,20 @@
                        exit 1;
                }
                # Execute commands for a given LUN
-               if (length $device_type) { $device_type = "--device-type 
$device_type" };
-               if (length $bs_type) { $bs_type = "--bstype $bs_type" };
-               if (length $bsopts) { $bsopts = "--bsopts $bsopts" };
-               if (length $bsoflags) { $bsoflags = "--bsoflags $bsoflags" };
-               if (length $block_size) { $block_size = "--blocksize 
$block_size" };
-               execute("tgtadm -C $control_port --lld $driver --op new --mode 
logicalunit --tid $next_tid --lun $lun -b \"$backing_store\" $device_type 
$bs_type $bsopts $bsoflags $block_size");
+               # Escape any single quotes
+               $device_type =~ s/'/\\'/g;
+               $bs_type =~ s/'/\\'/g;
+               $bsopts =~ s/'/\\'/g;
+               $bsoflags =~ s/'/\\'/g;
+               $block_size =~ s/'/\\'/g;
+               $backing_store =~ s/'/\\'/g;
+               if (length $device_type) { $device_type = "--device-type 
'$device_type'" };
+               if (length $bs_type) { $bs_type = "--bstype '$bs_type'" };
+               if (length $bsopts) { $bsopts = "--bsopts '$bsopts'" };
+               if (length $bsoflags) { $bsoflags = "--bsoflags '$bsoflags'" };
+               if (length $block_size) { $block_size = "--blocksize 
'$block_size'" };
+               if ($backing_store =~ "^NONE:") { $backing_store = "" } else { 
$backing_store = "-b '$backing_store'" }
+               execute("tgtadm -C $control_port --lld $driver --op new --mode 
logicalunit --tid $next_tid --lun $lun $backing_store $device_type $bs_type 
$bsopts $bsoflags $block_size");
 
                # Commands should be executed in order
                my @execute_last;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tgt-1.0.95+0.2b6396622346/scripts/tgtd.service 
new/tgt-1.0.97+0.f0dc199/scripts/tgtd.service
--- old/tgt-1.0.95+0.2b6396622346/scripts/tgtd.service  2025-03-01 
02:32:40.000000000 +0100
+++ new/tgt-1.0.97+0.f0dc199/scripts/tgtd.service       2025-11-03 
01:20:54.000000000 +0100
@@ -25,7 +25,12 @@
 ExecStop=/usr/sbin/tgtadm  --op delete --mode system
 
 # Exit code: 107 tgtd not running
-
+ProtectHostname=true
+ProtectClock=true
+PrivateTmp=true
+SystemCallArchitectures=native
+RestrictNamespaces=true
+ProtectHome=true
 
 [Install]
 WantedBy=multi-user.target
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tgt-1.0.95+0.2b6396622346/usr/bs_glfs.c 
new/tgt-1.0.97+0.f0dc199/usr/bs_glfs.c
--- old/tgt-1.0.95+0.2b6396622346/usr/bs_glfs.c 2025-03-01 02:32:40.000000000 
+0100
+++ new/tgt-1.0.97+0.f0dc199/usr/bs_glfs.c      2025-11-03 01:20:54.000000000 
+0100
@@ -110,7 +110,7 @@
                        break;
                }
 
-               ret = glfs_pread(gfd, tmpbuf, length, offset, lu->bsoflags);
+               ret = glfs_pread(gfd, tmpbuf, length, offset, lu->bsoflags, 
NULL);
 
                if (ret != length) {
                        set_medium_error(&result, &key, &asc);
@@ -147,7 +147,7 @@
                        break;
                }
 
-               ret = glfs_pread(gfd, tmpbuf, length, offset, SEEK_SET);
+               ret = glfs_pread(gfd, tmpbuf, length, offset, SEEK_SET, NULL);
 
                if (ret != length) {
                        set_medium_error(&result, &key, &asc);
@@ -190,7 +190,7 @@
                        key = ILLEGAL_REQUEST;
                        asc = ASC_INVALID_FIELD_IN_CDB;
                } else {
-                       glfs_fdatasync(gfd);
+                       glfs_fdatasync(gfd, NULL, NULL);
                }
                break;
        case WRITE_VERIFY:
@@ -204,7 +204,7 @@
                length = scsi_get_out_length(cmd);
                write_buf = scsi_get_out_buffer(cmd);
 write:
-               ret = glfs_pwrite(gfd, write_buf, length, offset, lu->bsoflags);
+               ret = glfs_pwrite(gfd, write_buf, length, offset, lu->bsoflags, 
NULL, NULL);
 
                if (ret == length) {
                        struct mode_pg *pg;
@@ -222,7 +222,7 @@
                        }
                        if (((cmd->scb[0] != WRITE_6) && (cmd->scb[1] & 0x8)) ||
                            !(pg->mode_data[0] & 0x04))
-                               glfs_fdatasync(gfd);
+                               glfs_fdatasync(gfd, NULL, NULL);
                } else
                        set_medium_error(&result, &key, &asc);
 
@@ -258,7 +258,7 @@
                        }
 
                        ret = glfs_pwrite(gfd, tmpbuf, blocksize,
-                                       offset, lu->bsoflags);
+                                       offset, lu->bsoflags, NULL, NULL);
 
                        if (ret != blocksize)
                                set_medium_error(&result, &key, &asc);
@@ -273,7 +273,7 @@
        case READ_16:
                length = scsi_get_in_length(cmd);
                ret = glfs_pread(gfd, scsi_get_in_buffer(cmd),
-                               length, offset, SEEK_SET);
+                               length, offset, SEEK_SET, NULL);
 
                if (ret != length) {
                        eprintf("Error on read %x %x", ret, length);
@@ -299,7 +299,7 @@
                        break;
                }
 
-               ret = glfs_pread(gfd, tmpbuf, length, offset, lu->bsoflags);
+               ret = glfs_pread(gfd, tmpbuf, length, offset, lu->bsoflags, 
NULL);
 
                if (ret != length)
                        set_medium_error(&result, &key, &asc);

Reply via email to