Comment 24 for bug 1668126

Revision history for this message
Jeff Lane  (bladernr) wrote : Re: [Bug 1668126] Re: [Intel feature] Include latest version of Enclosure LED Utilities

Hi, I updated the bug last week, I'm not sure how I ended up reverting
those changes, but the current version in the test PPA should work,
here's the diff from that latest upload:

diff -Nru ledmon-0.90/debian/changelog ledmon-0.90/debian/changelog
--- ledmon-0.90/debian/changelog 2018-03-29 15:48:25.000000000 +0000
+++ ledmon-0.90/debian/changelog 2018-03-30 18:10:46.000000000 +0000
@@ -1,3 +1,9 @@
+ledmon (0.90-1.7) bionic; urgency=medium
+
+ * reverted previous commit that somehow removed necessary patches
+
+ -- Jeff Lane <email address hidden> Fri, 30 Mar 2018 14:10:05 -0400
+
 ledmon (0.90-1.6) xenial; urgency=medium

   * fixed homepage and source location data in packaging info
diff -Nru ledmon-0.90/debian/patches/series ledmon-0.90/debian/patches/series
--- ledmon-0.90/debian/patches/series 1970-01-01 00:00:00.000000000 +0000
+++ ledmon-0.90/debian/patches/series 2018-03-30 18:13:21.000000000 +0000
@@ -0,0 +1 @@
+upstream-fixes
diff -Nru ledmon-0.90/debian/patches/upstream-fixes
ledmon-0.90/debian/patches/upstream-fixes
--- ledmon-0.90/debian/patches/upstream-fixes 1970-01-01
00:00:00.000000000 +0000
+++ ledmon-0.90/debian/patches/upstream-fixes 2018-03-30
18:15:48.000000000 +0000
@@ -0,0 +1,55 @@
+Description: upstream fixes pulled in for FFE
+ Reapply upstream patches
+ .
+ ledmon (0.90-1.7) bionic; urgency=medium
+ .
+ * reverted previous commit that somehow removed necessary patches
+Author: Jeff Lane <email address hidden>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- ledmon-0.90.orig/src/pidfile.c
++++ ledmon-0.90/src/pidfile.c
+@@ -20,6 +20,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#include <signal.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -81,9 +82,9 @@ int pidfile_remove(const char *name)
+ */
+ int ping_proc(pid_t pid)
+ {
+- char buf[PATH_MAX];
+- sprintf(buf, "kill -n 10 %d 2>/dev/null", pid);
+- if (system(buf) == 0)
++ if (pid <= 0)
++ return STATUS_INVALID_PATH;
++ if (kill(pid, 1) == 0)
+ return STATUS_SUCCESS;
+ return STATUS_INVALID_PATH;
+ }
+--- ledmon-0.90.orig/src/sysfs.c
++++ ledmon-0.90/src/sysfs.c
+@@ -125,7 +125,7 @@ static enum device_type _get_device_type
+ if (p != NULL) {
+ if (strlen(p) > 0) {
+ if (strncmp(p, "external:", 9) == 0) {
+- if (p[9] == '/')
++ if (p[9] == '/' || p[9] == '-')
+ result = DEVICE_TYPE_VOLUME;
+ else
+ result = DEVICE_TYPE_CONTAINER;

On Fri, Mar 30, 2018 at 6:19 AM, Michał Żyłowski
<email address hidden> wrote:
> Sorry, but I can't make your ppa working for me on my ubuntu installation.
> I still get:
> E: Failed to fetch http://ppa.launchpad.net/bladernr/ledmon/ubuntu/dists/bionic/main/binary-amd64/Packages 404 Not Found
> during apt-get update and ledmon is no available to install.
> When I tried with '~' in apt-get update I have:
> E: Failed to fetch http://ppa.launchpad.net/~bladernr/ledmon/ubuntu/dists/bionic/main/binary-i386/Packages 403 Forbidden
>
>
> So, I just downloaded deb via http://ppa.launchpad.net/bladernr/ledmon/ubuntu/pool/main/l/ledmon/ledmon_0.90-1.6_amd64.deb
> After installation:
> dpkg -i ledmon_0.90-1.6_amd64.deb
> I still can reproduce two issues fixes by my additional patches.
> So I downloaded http://ppa.launchpad.net/bladernr/ledmon/ubuntu/pool/main/l/ledmon/ledmon_0.90.orig.tar.gz. After unpacking I don't see my fixes for example in src/pidfile.c.
>
> In git log I see merge commit for my patches
> (c0561c2f930c38716e981b2ef15133e4c40fe5bc). But the next commit
> (4fba45588380c302ae8e7d4c3f10ea8d6d72a526) removes (reverts) previous
> merge:
>
> git show 4fba45588380c302ae8e7d4c3f10ea8d6d72a526
> commit 4fba45588380c302ae8e7d4c3f10ea8d6d72a526
> Author: Jeff Lane <email address hidden>
> Date: Wed Mar 28 15:20:12 2018 -0400
>
> bump for ppa and add upstream patches
>
> diff --git a/debian/changelog b/debian/changelog
> index c595505..ebd031c 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,3 +1,9 @@
> +ledmon (0.90-1.4) bionic; urgency=medium
> +
> + * bump for PPA
> +
> + -- Jeff Lane <email address hidden> Wed, 28 Mar 2018 15:15:06 -0400
> +
> ledmon (0.90-1.3) bionic; urgency=medium
>
> * pulled in upstream patches and bump rev for new build
> diff --git a/src/pidfile.c b/src/pidfile.c
> index 0f6ff4d..49fd1df 100644
> --- a/src/pidfile.c
> +++ b/src/pidfile.c
> @@ -20,7 +20,6 @@
> #include <errno.h>
> #include <fcntl.h>
> #include <limits.h>
> -#include <signal.h>
> #include <stdint.h>
> #include <stdio.h>
> #include <stdlib.h>
> @@ -82,9 +81,9 @@ int pidfile_remove(const char *name)
> */
> int ping_proc(pid_t pid)
> {
> - if (pid <= 0)
> - return STATUS_INVALID_PATH;
> - if (kill(pid, 1) == 0)
> + char buf[PATH_MAX];
> + sprintf(buf, "kill -n 10 %d 2>/dev/null", pid);
> + if (system(buf) == 0)
> return STATUS_SUCCESS;
> return STATUS_INVALID_PATH;
> }
> diff --git a/src/sysfs.c b/src/sysfs.c
> index f42be09..1a18a8b 100644
> --- a/src/sysfs.c
> +++ b/src/sysfs.c
> @@ -125,7 +125,7 @@ static enum device_type _get_device_type(const char *path)
> if (p != NULL) {
> if (strlen(p) > 0) {
> if (strncmp(p, "external:", 9) == 0) {
> - if (p[9] == '/' || p[9] == '-')
> + if (p[9] == '/')
> result = DEVICE_TYPE_VOLUME;
> else
> result = DEVICE_TYPE_CONTAINER;
>
>
> So I think something went wrong again during merging.
>
> --
> You received this bug notification because you are a member of Intel
> Team, which is subscribed to intel.
> Matching subscriptions: Private or proprietary bugs
> https://bugs.launchpad.net/bugs/1668126
>
> Title:
> [Intel feature] Include latest version of Enclosure LED Utilities
>
> Status in intel:
> In Progress
> Status in ledmon package in Ubuntu:
> Confirmed
>
> Bug description:
> Feature Description:
> Include Latest version of Enclosure LED Utilities
>
> The LEDCTL and LEDMON applications are design to work on both AHCI and SCU.
> Both use broad range of protocols to control LEDs e.g. SGPIO, SES-2, SGPIO over SMP, etc.
> Also, new version of ledmon adds the functionality of blinking LED with NVMe under VMD domains.
> The LEDCTL application is similar to SGPIO but the major difference is that LEDCTL (as well as LEDMON) has the internal logic built in and this means it is aware about RAID devices present in the system.
> Enable LED management for software RAID solutions.
>
> The ledctl is user space application design to control LEDs associated with each slot in an enclosure or a drive bay. There are two types of system: 2-LEDs system (Activity LED, Status LED) and 3-LEDs system (Activity LED, Locate LED, Fail LED). User must have root privileges to use this application.
> The ledctl application uses SGPIO and SES-2 protocol to control LEDs.
> The program implements IBPI patterns from SFF-8489 specification for SGPIO.
> New version on ledmon will contain new feature:
> - led blinking functionality for NVMe drives under VMD domains.
> - bugfixes
>
> The ledmon application is daemon program to monitor a state of
> software RAID device (md only) or a state of block device. The state
> is visualizing on LEDs associated with each slot in an enclosure or a
> drive bay. There are two types of system: 2-LEDs system (Activity LED,
> Status LED) and 3-LEDs system (Activity LED, Locate LED, Fail LED).
> This application has the highest priority when accessing the LEDs.
>
> External links:
> http://ledmon.sourceforge.net
> http://sourceforge.net/projects/ledmon/files/
> Ledmon application is in active development.
> Final version will be available at:
> http://ledmon.sourceforge.net
>
> Target Release: 18.04
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/intel/+bug/1668126/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=intel; status=In Progress; importance=Undecided; assignee=None;
> Launchpad-Bug: distribution=ubuntu; sourcepackage=ledmon; component=universe; status=Confirmed; importance=Undecided; assignee=None;
> Launchpad-Bug-Tags: user-space-pkgs
> Launchpad-Bug-Information-Type: Private
> Launchpad-Bug-Private: yes
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: anthonywong bladernr janitor leannogasawara mzylowsk-intel pbaldysi pragyan quanxian-wang
> Launchpad-Bug-Reporter: quanxian (quanxian-wang)
> Launchpad-Bug-Modifier: Michał Żyłowski (mzylowsk-intel)
> Launchpad-Message-Rationale: Subscriber (intel) @intel-team
> Launchpad-Message-For: intel-team
> Launchpad-Subscription: Private or proprietary bugs

--
Jeff Lane
TPP / Server Certification Lead

"Entropy isn't what it used to be."