Package: openipmi
Version: 2.0.21-1.2
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu yakkety ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

    - debian/openipmi.init: Change lockfile path. '/var/lock/subsys' does
      not exists in Debian. (LP #722770)

      [ At some point /var/lock/subsys not existing may have been true,
        but in actuality it does exist, but is legacy. From
        /usr/lib/tmpfiles.d/legacyconf:

# These files are considered legacy and are unnecessary on legacy-free
# systems.

L /var/lock - - - - ../run/lock

# /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems.

d /run/lock/subsys 0755 root root -
        
        I believe the right choice, therefore is to use /run/lock/ipmi
        as the lockfile for the init-script. ]

    - Fix up packaging to install and use /etc/default/openipmi.
      (LP #473332) Thanks to Serge Hallyn.
      [ /etc/sysconfig/openipmi doesn't exist on Debian/Ubuntu
        (/etc/sysconfig doesn't) as it's a RH-ism. ]

    - Detect that a module is built into the kernel.
      + LP #1309860
      [ Fixes a bug for .configs where certain IPMI modules are built-in
        and not modules. ]
    - debian/openipmi.init: Do not unload all modules if some configured
      HW modules are not successfully loaded (LP #1318317).
      [ Fixes a bug with the init-script and certain configurations,
        where by default not all /etc/default/openipmi modules are
        actually loadable (HW incompatibility, e.g.) but that leads to
        all IPMI modules being unloaded. I have sent this upstream, but
        there has been no response. ]

Thanks for considering the patch.

*** /tmp/tmpYcskC8/openipmi_2.0.21-1.2ubuntu1.debdiff
diff -Nru openipmi-2.0.21/debian/dirs openipmi-2.0.21/debian/dirs
--- openipmi-2.0.21/debian/dirs 2016-03-21 10:39:58.000000000 -0700
+++ openipmi-2.0.21/debian/dirs 2016-06-21 10:06:45.000000000 -0700
@@ -1 +1,2 @@
 usr/bin
+etc/default
diff -Nru openipmi-2.0.21/debian/openipmi.init 
openipmi-2.0.21/debian/openipmi.init
--- openipmi-2.0.21/debian/openipmi.init        2016-03-21 10:39:58.000000000 
-0700
+++ openipmi-2.0.21/debian/openipmi.init        2016-06-16 15:45:27.000000000 
-0700
@@ -32,7 +32,7 @@
 #############################################################################
 . /lib/lsb/init-functions
 
-CONFIGFILE=/etc/sysconfig/ipmi
+CONFIGFILE=/etc/default/openipmi
 # source config info
 [ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
 
@@ -66,7 +66,7 @@
 MODULES="${MODULES_INTERFACES} ${MODULES_FEATURES} ${MODULES_HW} 
${MODULES_BASE}"
 
 RETVAL=0
-LOCKFILE=/var/lock/subsys/ipmi
+LOCKFILE=/run/lock/ipmi
 DEV_IPMI_TIMEOUT=15
 
 UDEV_EXISTS=0
@@ -90,6 +90,9 @@
                if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
                        echo "$m module loaded."
                        OnePlusLoaded=1
+               elif [ -d "/sys/module/$m" ]; then
+                       echo "$m module in kernel."
+                       OnePlusLoaded=1
                else
                        echo "$m module not loaded."
                        OnePlusUnloaded=1
@@ -104,6 +107,8 @@
        for m in $@; do
                if /sbin/lsmod | grep $m >/dev/null 2>&1 ; then
                        OnePlusLoaded=1
+               elif [ -d "/sys/module/$m" ]; then
+                       OnePlusLoaded=1
                else
                        OnePlusUnloaded=1
                fi
@@ -323,9 +328,9 @@
        local locdelay
        modprobe ipmi_msghandler > /dev/null 2>&1
        modules_loaded ipmi_msghandler
-       [ ${OnePlusLoaded} -ne 1 ] && unload_all_ipmi_modules && 
RETVAL=$((RETVAL | 1)) && return
+       [ ${OnePlusLoaded} -ne 1 ] && RETVAL=$((RETVAL | 1)) && return
        load_hw_modules
-       [ $((RETVAL & 1)) -eq 1 ] && unload_all_ipmi_modules && 
RETVAL=$((RETVAL | 1)) && return
+       [ $((RETVAL & 1)) -eq 1 ] && return
 
        if [ "${DEV_IPMI}" = "yes" ]; then
                modprobe ipmi_devintf > /dev/null 2>&1
diff -Nru openipmi-2.0.21/debian/rules openipmi-2.0.21/debian/rules
--- openipmi-2.0.21/debian/rules        2016-03-24 10:02:24.000000000 -0700
+++ openipmi-2.0.21/debian/rules        2016-06-16 15:34:29.000000000 -0700
@@ -86,6 +86,8 @@
        dh_installdocs
        dh_installexamples
        dh_installinit -p openipmi --name openipmi --no-start -- defaults 21 20
+       mv ipmi.sysconf openipmi
+       dh_install openipmi etc/default
        dh_installman
        dh_link
        dh_strip


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-24-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd

Reply via email to