Hello community,

here is the log from the commit of package mdevctl for openSUSE:Factory checked 
in at 2020-12-10 15:57:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mdevctl (Old)
 and      /work/SRC/openSUSE:Factory/.mdevctl.new.2328 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mdevctl"

Thu Dec 10 15:57:09 2020 rev:2 rq:854165 version:0.78

Changes:
--------
--- /work/SRC/openSUSE:Factory/mdevctl/mdevctl.changes  2020-07-05 
01:15:41.580520655 +0200
+++ /work/SRC/openSUSE:Factory/.mdevctl.new.2328/mdevctl.changes        
2020-12-10 15:57:17.278806512 +0100
@@ -1,0 +2,15 @@
+Tue Dec 08 23:31:30 UTC 2020 - jfeh...@suse.com
+
+- Update to version 0.78:
+  * Automatic version commit for tag 0.78
+  * use standard bash path
+  * avoid other tags spilling into the .spec changelog
+  * mdevctl: fix cleanup on error when creating and removing mdev
+  * version support
+  * Fix attributes getting applied via start-parent-mdevs
+  * mdevctl: fix cleanup on error when writing to attribute
+  * Remove never used 'available' option
+  * Fix attribute validation
+  jsc#SLE-15861, bsc#1179770
+
+-------------------------------------------------------------------

Old:
----
  mdevctl-0.61.tar.xz

New:
----
  mdevctl-0.78.tar.xz

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

Other differences:
------------------
++++++ mdevctl.spec ++++++
--- /var/tmp/diff_new_pack.VQiB6W/_old  2020-12-10 15:57:17.822807024 +0100
+++ /var/tmp/diff_new_pack.VQiB6W/_new  2020-12-10 15:57:17.826807028 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           mdevctl
-Version:        0.61
+Version:        0.78
 Release:        0
 Summary:        Mediated device management and persistence utility
 License:        LGPL-2.1-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.VQiB6W/_old  2020-12-10 15:57:17.858807058 +0100
+++ /var/tmp/diff_new_pack.VQiB6W/_new  2020-12-10 15:57:17.858807058 +0100
@@ -1,11 +1,12 @@
 <services>
   <service name="tar_scm" mode="disabled">
     <param name="filename">mdevctl</param>
-    <param name="revision">d7dfac5f5bfb4828d3d56e7e6ebe9d6956ae79dc</param>
+    <param name="revision">e029640033d399a73b3e04e1e91f59479cdbadd9</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="url">https://github.com/mdevctl/mdevctl</param>
     <param name="versionformat">@PARENT_TAG@</param>
+    <param name="changesgenerate">enable</param>
   </service>
   <service name="recompress" mode="disabled">
     <param name="file">*.tar</param>

++++++ mdevctl-0.61.tar.xz -> mdevctl-0.78.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdevctl-0.61/Makefile new/mdevctl-0.78/Makefile
--- old/mdevctl-0.61/Makefile   2019-12-19 22:47:57.000000000 +0100
+++ new/mdevctl-0.78/Makefile   2020-11-24 20:48:33.000000000 +0100
@@ -4,8 +4,10 @@
 CONFDIR=/etc/mdevctl.d
 MANDIR=$(PREFIX)/share/man
 NAME=mdevctl
-VERSION=0.$(shell git rev-list --count HEAD)
-NVFMT=$(NAME)-$(VERSION)
+MDEVCTL_VER=$(shell ./mdevctl version)
+REVLIST_VER=0.$(shell git rev-list --count HEAD)
+NEXT_VER=0.$(shell echo $$(( $(shell git rev-list --count HEAD) + 1 )) )
+NVFMT=$(NAME)-$(REVLIST_VER)
 
 files: mdevctl 60-mdevctl.rules mdevctl.8 \
        Makefile COPYING README.md mdevctl.spec.in
@@ -15,9 +17,9 @@
        gzip -f -9 $(NVFMT).tar
 
 mdevctl.spec: tag mdevctl.spec.in files
-       sed -e 's:#VERSION#:$(VERSION):g' < mdevctl.spec.in > mdevctl.spec
+       sed -e 's:#VERSION#:$(shell ./mdevctl version):g' < mdevctl.spec.in > 
mdevctl.spec
        PREV=""; \
-       for TAG in `git tag --sort=version:refname | tac`; do \
+       for TAG in `git tag --sort=version:refname --merged | tac`; do \
            if [ -n "$$PREV" ]; then \
            git log --format="- %h (\"%s\")" $$TAG..$$PREV >> mdevctl.spec; \
            fi; \
@@ -38,13 +40,13 @@
        install -m 644 60-mdevctl.rules $(DESTDIR)$(UDEVDIR)/rules.d/
        mkdir -p $(DESTDIR)$(SBINDIR)
        install -m 755 mdevctl $(DESTDIR)$(SBINDIR)/
-       ln -s mdevctl $(DESTDIR)$(SBINDIR)/lsmdev
+       ln -sf mdevctl $(DESTDIR)$(SBINDIR)/lsmdev
        mkdir -p $(DESTDIR)$(MANDIR)/man8
        install -m 644 mdevctl.8 $(DESTDIR)$(MANDIR)/man8/
-       ln -s mdevctl.8  $(DESTDIR)$(MANDIR)/man8/lsmdev.8
+       ln -sf mdevctl.8  $(DESTDIR)$(MANDIR)/man8/lsmdev.8
 
 clean:
        rm -f mdevctl.spec *.src.rpm noarch/*.rpm *.tar.gz
 
 tag:
-       git tag -l $(VERSION) | grep -q $(VERSION) || git tag $(VERSION)
+       [ $(MDEVCTL_VER) == $(REVLIST_VER) ] || (sed -i 
"s/^version=.*/version=\"$(NEXT_VER)\"/" mdevctl && git add mdevctl && git 
commit -m "Automatic version commit for tag $(NEXT_VER)" && git tag $(NEXT_VER))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdevctl-0.61/mdevctl new/mdevctl-0.78/mdevctl
--- old/mdevctl-0.61/mdevctl    2019-12-19 22:47:57.000000000 +0100
+++ new/mdevctl-0.78/mdevctl    2020-11-24 20:48:33.000000000 +0100
@@ -1,8 +1,9 @@
-#!/usr/bin/bash
+#!/bin/bash
 
 persist_base=/etc/mdevctl.d
 mdev_base=/sys/bus/mdev/devices
 parent_base=/sys/class/mdev_bus
+version="0.78"
 
 # Alias 'lsmdev' to 'mdevctl list'
 if [ $(basename $0) == "lsmdev" ]; then
@@ -27,13 +28,12 @@
     # first arg: expected root, second arg: attr to check
     if [ ! -w "$1/$2" ]; then
        echo "Attribute $2 cannot be set" >&2
-       return 1
-    fi
-    if [ $(realpath --relative-base "$1" "$1/$2") == "$2" ]; then
-        return 0
+       echo 1
+    elif [ $(realpath --relative-base "$1" "$1/$2") == "$2" ]; then
+        echo 0
     else
         echo "Invalid attribute $2" >&2
-        return 1
+        echo 1
     fi
 }
 
@@ -233,8 +233,9 @@
         return 1
     fi
 
-    echo "$uuid" > "$parent_base/$parent/mdev_supported_types/$type/create"
-    if [ $? -ne 0 ]; then
+    cret=0
+    echo "$uuid" > "$parent_base/$parent/mdev_supported_types/$type/create" || 
cret=$?
+    if [ $cret -ne 0 ]; then
         echo "Error creating mdev type $type on $parent" >&2
         return 1
     fi
@@ -256,14 +257,15 @@
         if [ "$count" -ge 0 ]; then
             for i in $(seq 0 "$count"); do
                 attr=$(get_attr_index_key $i)
-                validate_attr "$mdev_base/$uuid" "$attr"
-                if [ $? -ne 0 ]; then
+                valid=$(validate_attr "$mdev_base/$uuid" "$attr")
+                if [ $valid -ne 0 ]; then
                     remove_mdev "$uuid"
                     return 1
                 fi
                 val=$(get_attr_index_value $i)
-                echo -e "$val" > "$mdev_base/$uuid/$attr"
-                if [ $? -ne 0 ]; then
+                wret=0
+                echo -e "$val" > "$mdev_base/$uuid/$attr" || wret=$?
+                if [ $wret -ne 0 ]; then
                     echo "Failed to write $val to attribute $attr" >&2
                     remove_mdev "$uuid"
                     return 1
@@ -288,8 +290,9 @@
         return 1
     fi
 
-    echo 1 > "$mdev_base/$uuid/remove"
-    if [ $? -ne 0 ]; then
+    rret=0
+    echo 1 > "$mdev_base/$uuid/remove" || rret=$?
+    if [ $rret -ne 0 ]; then
         echo "Error removing device $uuid" >&2
         return 1
     fi
@@ -383,6 +386,7 @@
                Specifying a PARENT lists only the types provided by the given
                parent device.  The dumpjson option provides output in machine
                readable JSON format.
+version                Print mdevctl version.
 EOF
     exit 1
 }
@@ -419,7 +423,7 @@
                 fi
 
                 if [ "$(get_config_key start)" == "auto" ]; then
-                    create_mdev "$uuid" "$parent" "$(get_config_key mdev_type)"
+                    start_mdev "$uuid" "$parent" "$(get_config_key mdev_type)"
                     if [ $? -ne 0 ]; then
                         echo "Failed to create mdev $uuid, type 
$(get_config_key mdev_type) on $parent" >&2
                         # continue...
@@ -435,6 +439,12 @@
     --help|-h|-?)
         usage
         ;;
+    version)
+        cmd="$1"
+        OPTIONS=""
+        LONGOPTS=""
+        shift
+       ;;
     define)
         cmd="$1"
         OPTIONS="u:p:t:a"
@@ -540,10 +550,6 @@
             defined=y
             shift 1
             ;;
-        -a|--available)
-            available=y
-            shift 1
-            ;;
         -v|--verbose)
             verbose=y
             shift 1
@@ -565,6 +571,9 @@
 fi
 
 case "$cmd" in
+    version)
+        echo $version
+        ;;
     define)
         if [ -n "$jsonfile" ]; then
             if [ ! -r "$jsonfile" ]; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mdevctl-0.61/mdevctl.8 new/mdevctl-0.78/mdevctl.8
--- old/mdevctl-0.61/mdevctl.8  2019-12-19 22:47:57.000000000 +0100
+++ new/mdevctl-0.78/mdevctl.8  2020-11-24 20:48:33.000000000 +0100
@@ -102,7 +102,7 @@
 \fB-v|--verbose\fR
 .RS 4
 Increase output verbosity, currently only adds attribute output to the
-\fBtypes\fR command.
+\fBlist\fR command.
 .RE
 
 .SH COMMANDS
@@ -178,6 +178,12 @@
 Running devices are unaffected by this command.
 .RE
 
+.PP
+\fBversion\fR
+.RS 4
+Print mdevctl version.
+.RE
+
 .SH "NOTE ON DEVICE SPECIFICATION"
 
 For a given UUID, only one device with that UUID may be running at the
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to