Skip to contentSkip to conversation

hddtemp: add from OE-Classic and update

PATCH In review Paul Eggleton 2 participants 6 messages Oct 19, 2012 – Oct 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hddtemp: add from OE-Classic and update

hddtemp is unmaintained upstream so we have to do a bit of patching. All patches sourced from Debian/Fedora, except hddtemp-no-nls-support.patch which came from OE-Classic.

Other improvements:
* Install initscript
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* inherit gettext to avoid error during configure

---
 .../hddtemp-0.3-beta15-autodetect-717479.patch     |   90 +
 .../recipes-support/hddtemp/files/hddtemp-db.patch |  133 +
 .../hddtemp/files/hddtemp-no-nls-support.patch     |   66 +
 meta-oe/recipes-support/hddtemp/files/hddtemp.db   |  523 ++
 .../hddtemp/files/hddtemp_0.3-beta15-52.diff       | 7545 ++++++++++++++++++++
 .../recipes-support/hddtemp/hddtemp_0.3-beta15.bb  |   30 +
 6 files changed, 8387 insertions(+)
 create mode 100644 meta-oe/recipes-support/hddtemp/files/hddtemp-0.3-beta15-autodetect-717479.patch
 create mode 100644 meta-oe/recipes-support/hddtemp/files/hddtemp-db.patch
 create mode 100644 meta-oe/recipes-support/hddtemp/files/hddtemp-no-nls-support.patch
 create mode 100644 meta-oe/recipes-support/hddtemp/files/hddtemp.db
 create mode 100644 meta-oe/recipes-support/hddtemp/files/hddtemp_0.3-beta15-52.diff
 create mode 100644 meta-oe/recipes-support/hddtemp/hddtemp_0.3-beta15.bb
meta-oe/recipes-support/hddtemp/files/hddtemp-0.3-beta15-autodetect-717479.patch new file +90 -0
new file mode 100644
index 0000000..19f8380
@@ -0,0 +1,90 @@
+Auto-detect disks if none specified
+
+Refer to:
+https://bugzilla.redhat.com/show_bug.cgi?id=717479
+
+diff -up hddtemp-0.3-beta15/doc/hddtemp.8~ hddtemp-0.3-beta15/doc/hddtemp.8
+--- hddtemp-0.3-beta15/doc/hddtemp.8~	2011-08-18 00:36:05.689001470 +0300
++++ hddtemp-0.3-beta15/doc/hddtemp.8	2011-08-18 00:44:46.753006253 +0300
+@@ -19,7 +19,7 @@
+ hddtemp \- Utility to monitor hard drive temperature
+ .SH SYNOPSIS
+ .B hddtemp
+-.RI [ options ] " [type:]disk" ...
++.RI [ options ] " [[type:]disk]" ...
+ .SH "DESCRIPTION"
+ .PP
+ .B hddtemp 
+@@ -35,7 +35,8 @@ You can specify one or more device drive
+ with a
+ .B type
+ like PATA, SATA or SCSI to force hddtemp too use one of these type
+-(because detection can fail).
++(because detection can fail). If no paths are specified, autodetection of
++installed drives is attempted.
+ 
+ 
+ .SH "OPTIONS"
+diff -up hddtemp-0.3-beta15/src/hddtemp.c~ hddtemp-0.3-beta15/src/hddtemp.c
+--- hddtemp-0.3-beta15/src/hddtemp.c~	2011-08-18 00:36:05.638996861 +0300
++++ hddtemp-0.3-beta15/src/hddtemp.c	2011-08-18 00:35:55.485060798 +0300
+@@ -54,6 +54,7 @@
+ #include <linux/hdreg.h>
+ #include <ctype.h>
+ #include <assert.h>
++#include <glob.h>
+ 
+ // Application specific includes
+ #include "ata.h"
+@@ -255,6 +256,7 @@ int main(int argc, char* argv[]) {
+   int 		ret = 0;
+   int           show_db;
+   struct        disk * ldisks;
++  glob_t        diskglob;
+ 
+   backtrace_sigsegv();
+   backtrace_sigill();
+@@ -419,11 +421,6 @@ int main(int argc, char* argv[]) {
+      exit(0);
+   }
+   
+-  if(argc - optind <= 0) {
+-    fprintf(stderr, _("Too few arguments: you must specify one drive, at least.\n"));
+-    exit(1);
+-  }
+-
+   if(debug) {
+     /*    argc = optind + 1;*/
+     quiet = 1;
+@@ -434,6 +431,23 @@ int main(int argc, char* argv[]) {
+     exit(1);
+   }
+ 
++  memset(&diskglob, 0, sizeof(glob_t));
++  if(argc - optind <= 0) {
++    if(glob("/dev/[hs]d[a-z]", 0, NULL, &diskglob) == 0) {
++      argc = diskglob.gl_pathc;
++      argv = diskglob.gl_pathv;
++      optind = 0;
++    } else {
++      argc = 0;
++    }
++  }
++
++  if(argc - optind <= 0) {
++    globfree(&diskglob);
++    fprintf(stderr, _("Too few arguments: you must specify one drive, at least.\n"));
++    exit(1);
++  }
++
+   init_bus_types();
+ 
+   /* collect disks informations */
+@@ -527,6 +541,7 @@ int main(int argc, char* argv[]) {
+   else {
+     do_direct_mode(ldisks);
+   }
++  globfree(&diskglob);
+ 
+   return ret;
+ }
meta-oe/recipes-support/hddtemp/files/hddtemp-db.patch new file +133 -0

133 lines not on this page · raw message

meta-oe/recipes-support/hddtemp/files/hddtemp-no-nls-support.patch new file +66 -0

66 lines not on this page · raw message

meta-oe/recipes-support/hddtemp/files/hddtemp.db new file +523 -0

523 lines not on this page · raw message

meta-oe/recipes-support/hddtemp/files/hddtemp_0.3-beta15-52.diff new file +7545 -0

2,188 lines not on this page · raw message

meta-oe/recipes-support/hddtemp/hddtemp_0.3-beta15.bb new file +30 -0
new file mode 100644
index 0000000..fc38d86

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.7.9.5

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 11 lines · Paul Eggleton

hddtemp is unmaintained upstream so we have to do a bit of patching. All patches sourced from Debian/Fedora, except hddtemp-no-nls-support.patch which came from OE-Classic.

Other improvements:
* Install initscript
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* inherit gettext to avoid error during configure

I think some patches could be cleaned up. Specially the generated files. Debian includes them in the patch and the packaging guide advices to do it (there're reasons for it) but OE regenerated those so I think it could be dropped.

Another thing, I remember to see this patch before on mailing list. Did you forget to mark it as v2?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#2 lore raw
Quoted 4 lines · On Saturday 20 October 2012 08:54:37 Otavio Salvador wrote:

I think some patches could be cleaned up. Specially the generated files. Debian includes them in the patch and the packaging guide advices to do it (there're reasons for it) but OE regenerated those so I think it could be dropped.

I'd really rather not touch the content of the patches - hddtemp upstream is dead, we're not intending to maintain our own fork and it's easier if we can just pull in any new patches as-is from Debian or Fedora (with source information, which I did add to the top of each patch).

Quoted 2 lines

Another thing, I remember to see this patch before on mailing list. Did you forget to mark it as v2?

No, all the patches I have sent to the list are the same. Sorry for the noise but none of them are being picked up by patchwork for some reason and Khem was trying to fix that (still doesn't seem to be fixed as I have noted).

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#3 lore raw
Quoted 10 lines · Paul Eggleton
Quoted 4 lines · On Saturday 20 October 2012 08:54:37 Otavio Salvador wrote:

I think some patches could be cleaned up. Specially the generated files. Debian includes them in the patch and the packaging guide advices to do it (there're reasons for it) but OE regenerated those so I think it could be dropped.

I'd really rather not touch the content of the patches - hddtemp upstream is dead, we're not intending to maintain our own fork and it's easier if we can just pull in any new patches as-is from Debian or Fedora (with source information, which I did add to the top of each patch).

Right but including generated files is waste of space, unpack time and patching time. We're rewrite those in do_configure.

Quoted 14 lines
Quoted 2 lines

Another thing, I remember to see this patch before on mailing list. Did you forget to mark it as v2?

No, all the patches I have sent to the list are the same. Sorry for the noise but none of them are being picked up by patchwork for some reason and Khem was trying to fix that (still doesn't seem to be fixed as I have noted).

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#4 lore raw
Quoted 8 lines · On Saturday 20 October 2012 10:13:50 Otavio Salvador wrote:
Quoted 6 lines · Paul Eggleton
Quoted 4 lines · On Saturday 20 October 2012 08:54:37 Otavio Salvador wrote:

I think some patches could be cleaned up. Specially the generated files. Debian includes them in the patch and the packaging guide advices to do it (there're reasons for it) but OE regenerated those so I think it could be dropped.

Quoted 7 lines
Quoted 4 lines

I'd really rather not touch the content of the patches - hddtemp upstream is dead, we're not intending to maintain our own fork and it's easier if we can just pull in any new patches as-is from Debian or Fedora (with source information, which I did add to the top of each patch).

Right but including generated files is waste of space, unpack time and patching time. We're rewrite those in do_configure.

So leaving aside the tiny amount of time/space we're talking about for a second, which files are you referring to exactly?

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw
In reply to Paul Eggleton
Quoted 11 lines · Paul Eggleton

hddtemp is unmaintained upstream so we have to do a bit of patching. All patches sourced from Debian/Fedora, except hddtemp-no-nls-support.patch which came from OE-Classic.

Other improvements:
* Install initscript
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* inherit gettext to avoid error during configure

...

Quoted 6 lines
meta-oe/recipes-support/hddtemp/files/hddtemp_0.3-beta15-52.diff new file +0 -0
new file mode 100644
index 0000000..393b5f4

meta-oe/recipes-support/hddtemp/files/hddtemp_0.3-beta15-52.diff line 8

Quoted 8 lines
meta-oe/recipes-support/hddtemp/files/hddtemp_0.3-beta15-52.diff new file +8 -0
@@ -0,0 +1,7545 @@
+Megapatch from debian
+
+Original URL: http://ftp.debian.org/debian/pool/main/h/hddtemp/hddtemp_0.3-beta15-52.diff.gz
+
+Upstream-Status: unmaintained
+
+--- hddtemp-0.3-beta15.orig/README
++++ hddtemp-0.3-beta15/README

Not need; we don't use README

...

Quoted 2 lines
meta-oe/recipes-support/hddtemp/files/hddtemp_0.3-beta15-52.diff new file +2 -0
+--- hddtemp-0.3-beta15.orig/debian/rules
++++ hddtemp-0.3-beta15/debian/rules

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/docs
++++ hddtemp-0.3-beta15/debian/docs

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/postrm
++++ hddtemp-0.3-beta15/debian/postrm

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/changelog
++++ hddtemp-0.3-beta15/debian/changelog

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/templates
++++ hddtemp-0.3-beta15/debian/templates

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/dirs
++++ hddtemp-0.3-beta15/debian/dirs

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/copyright
++++ hddtemp-0.3-beta15/debian/copyright

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/config
++++ hddtemp-0.3-beta15/debian/config

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/postinst
++++ hddtemp-0.3-beta15/debian/postinst

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/control
++++ hddtemp-0.3-beta15/debian/control

...

Quoted 6 lines

+--- hddtemp-0.3-beta15.orig/debian/compat
++++ hddtemp-0.3-beta15/debian/compat
+@@ -0,0 +1 @@
++5
+--- hddtemp-0.3-beta15.orig/debian/README.Debian
++++ hddtemp-0.3-beta15/debian/README.Debian

...

Quoted 2 lines

+--- hddtemp-0.3-beta15.orig/debian/po/*
++++ hddtemp-0.3-beta15/debian/po/*

Those are the ones I think is not worth keeping ... those are Debian specific (except the po update but doesn't look worth to me).

In my opinion you could filterout all debian/ changes and copy the init file (as you use it). This will reduce a lot the change size.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br