Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package growpart-generator for 
openSUSE:Factory checked in at 2022-02-18 23:03:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/growpart-generator (Old)
 and      /work/SRC/openSUSE:Factory/.growpart-generator.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "growpart-generator"

Fri Feb 18 23:03:04 2022 rev:3 rq:955847 version:0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/growpart-generator/growpart-generator.changes    
2019-11-11 13:01:38.853770201 +0100
+++ 
/work/SRC/openSUSE:Factory/.growpart-generator.new.1958/growpart-generator.changes
  2022-02-18 23:03:43.137409206 +0100
@@ -1,0 +2,7 @@
+Wed Feb 16 15:27:38 UTC 2022 - Fabian Vogt <[email protected]>
+
+- Get the parent device with lsblk
+- Improve the partition number extraction to work with device names
+  containing multiple numbers (bsc#1196101)
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ growpart-generator.spec ++++++
--- /var/tmp/diff_new_pack.IPLt7n/_old  2022-02-18 23:03:43.685409163 +0100
+++ /var/tmp/diff_new_pack.IPLt7n/_new  2022-02-18 23:03:43.693409163 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package growpart-generator
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -22,7 +22,7 @@
 Summary:        Grow a partition automatically 
 License:        GPL-3.0-only
 Group:          System/Management
-Url:            
https://build.opensuse.org/package/show/devel:kubic/growpart-generator
+URL:            
https://build.opensuse.org/package/show/devel:kubic/growpart-generator
 Source1:        growpart-generator.sh
 Source2:        gpl-3.0.txt
 BuildRequires:  systemd-rpm-macros

++++++ growpart-generator.sh ++++++
--- /var/tmp/diff_new_pack.IPLt7n/_old  2022-02-18 23:03:43.745409158 +0100
+++ /var/tmp/diff_new_pack.IPLt7n/_new  2022-02-18 23:03:43.749409158 +0100
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 set -euo pipefail
 
 UNIT_DIR="${1:-/tmp}"
@@ -13,6 +12,11 @@
        mnt_esc="$(systemd-escape --path "${mnt}")"
        dev_esc="$(systemd-escape --path "${dev}")"
 
+       # /dev/sda3 -> /dev/sda, /dev/nvme0n1p3 -> /dev/nvme0n1
+       parent_dev="/dev/$(lsblk --nodeps -rno PKNAME "${dev}")"
+       # Last number in the device name: /dev/nvme0n1p42 -> 42
+       partnum="$(echo "${dev}" | sed 's/^.*[^0-9]\([0-9]\+\)$/\1/')"
+
        mkdir -p "${UNIT_DIR}/${mnt_esc}.mount.wants"
        cat > "${UNIT_DIR}/growpart@${dev_esc}.service" <<EOF
 [Unit]
@@ -35,8 +39,7 @@
 RemainAfterExit=yes
 # Exit code 1 means "NOCHANGE"
 SuccessExitStatus=1
-# Use sed to split /dev/foo42 into /dev/foo 42
-ExecStart=/bin/sh -c "/usr/sbin/growpart $(echo ${dev} | sed 
's/\([a-z/]*\)\(\d*\)/\1 \2/')"
+ExecStart=/bin/sh -c "/usr/sbin/growpart ${parent_dev} ${partnum}"
 TimeoutSec=0
 EOF
        ln -sf "${UNIT_DIR}/growpart@${dev_esc}.service" 
"${UNIT_DIR}/${mnt_esc}.mount.wants/"

Reply via email to