[pkg-go] Bug#820466: Bug#820466: golang-github-shirou-gopsutil: diff for NMU version 2.1-2.1

2016-11-16 Thread Breno Leitao
Hello Martín,

On 11/15/2016 10:21 AM, Martín Ferrari wrote:
> Hi Breno,
> 
> Thanks for the patch!
> 
> I was going to merge all this and reupload after merging the new
> upstream release, but I have noticed these patches are already in upstream.
> 
> So, does it make sense to merge this instead of just upgrading?

I would say that upgrading this package to the latest release much easier. I
saw that there is a new release, version v2.16.10, that contains my patch.
That would be ideal.


> And one question about the patches: when you say "all currently
> supported architectures" does this include gccgo? Or would that patch
> break it?

Hmm, this is a patch I just cherry picked from upstream. Thomas created it.
I understand that ClockTicks is not defined by architecture anymore, but
defined on Linux for all archs (process_linux.go).

___
Pkg-go-maintainers mailing list
Pkg-go-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers


[pkg-go] Bug#820466: Bug#820466: golang-github-shirou-gopsutil: diff for NMU version 2.1-2.1

2016-11-15 Thread Martín Ferrari
Hi Breno,

Thanks for the patch!

I was going to merge all this and reupload after merging the new
upstream release, but I have noticed these patches are already in upstream.

So, does it make sense to merge this instead of just upgrading?

And one question about the patches: when you say "all currently
supported architectures" does this include gccgo? Or would that patch
break it?

Thanks!

On 07/11/16 13:04, Breno Leitao wrote:
> Control: tags 820466 + patch
> Control: tags 820466 + pending
> 
> Dear maintainer,
> 
> I've prepared an NMU for golang-github-shirou-gopsutil (versioned as 2.1-2.1) 
> and
> uploaded it to DELAYED/10. Please feel free to tell me if I should delay it 
> longer.
> 
> Regards.
> diff -Nru golang-github-shirou-gopsutil-2.1/debian/changelog 
> golang-github-shirou-gopsutil-2.1/debian/changelog
> --- golang-github-shirou-gopsutil-2.1/debian/changelog2016-07-14 
> 03:23:30.0 -0400
> +++ golang-github-shirou-gopsutil-2.1/debian/changelog2016-11-03 
> 08:57:27.0 -0400
> @@ -1,3 +1,12 @@
> +golang-github-shirou-gopsutil (2.1-2.1) unstable; urgency=medium
> +
> +  * Non-maintainer upload.
> +
> +  [ Breno Leitao ]
> +  * Fix FTBFS and add support for ppc64el. (Closes: #820466)
> +
> + -- Fernando Seiti Furusato   Thu, 03 Nov 2016 
> 10:57:27 -0200
> +
>  golang-github-shirou-gopsutil (2.1-2) unstable; urgency=medium
>  
>* Extend "01-Disable_failing_tests.patch" to disable failing
> diff -Nru 
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-Improve-CPU-identification-for-POWER-processors.patch
>  
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-Improve-CPU-identification-for-POWER-processors.patch
> --- 
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-Improve-CPU-identification-for-POWER-processors.patch
>1969-12-31 19:00:00.0 -0500
> +++ 
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-Improve-CPU-identification-for-POWER-processors.patch
>2016-11-03 08:34:51.0 -0400
> @@ -0,0 +1,47 @@
> +From 286927a039eb369b9ef12a0578df7bd4bdf91a12 Mon Sep 17 00:00:00 2001
> +From: Breno Leitao 
> +Date: Mon, 24 Oct 2016 14:00:37 -0400
> +Subject: [PATCH] Improve CPU identification for POWER processors
> +
> +Currently gopsutils fails to indentify the POWER processors family,
> +returning an almost empty Info() structure.
> +
> +This patch improves the POWER identification without changing what is
> +available for x86.
> +---
> + cpu/cpu_linux.go | 18 +++---
> + 1 file changed, 15 insertions(+), 3 deletions(-)
> +
> +diff --git a/cpu/cpu_linux.go b/cpu/cpu_linux.go
> +index 3537b2d..1979ebc 100644
> +--- a/cpu/cpu_linux.go
>  b/cpu/cpu_linux.go
> +@@ -144,10 +144,22 @@ func Info() ([]InfoStat, error) {
> + c.Family = value
> + case "model":
> + c.Model = value
> +-case "model name":
> ++case "model name", "cpu":
> + c.ModelName = value
> +-case "stepping":
> +-t, err := strconv.ParseInt(value, 10, 64)
> ++if strings.Contains(value, "POWER8") ||
> ++   strings.Contains(value, "POWER7") {
> ++c.Model = strings.Split(value, " ")[0]
> ++c.Family = "POWER"
> ++c.VendorID = "IBM"
> ++}
> ++case "stepping", "revision":
> ++val := value
> ++
> ++if key == "revision" {
> ++val = strings.Split(value, ".")[0]
> ++}
> ++
> ++t, err := strconv.ParseInt(val, 10, 64)
> + if err != nil {
> + return ret, err
> + }
> +-- 
> +2.9.3
> +
> diff -Nru 
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-process-determine-page-sizes-via-function.patch
>  
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-process-determine-page-sizes-via-function.patch
> --- 
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-process-determine-page-sizes-via-function.patch
>  1969-12-31 19:00:00.0 -0500
> +++ 
> golang-github-shirou-gopsutil-2.1/debian/patches/0001-process-determine-page-sizes-via-function.patch
>  2016-11-03 08:34:51.0 -0400
> @@ -0,0 +1,86 @@
> +From eb4a57117f5b734246226c9b6d6b1f9edca2e4f2 Mon Sep 17 00:00:00 2001
> +From: Thomas Hipp 
> +Date: Fri, 16 Sep 2016 09:04:52 +0200
> +Subject: [PATCH] process: determine page sizes via function
> +
> +Instead of hard-coding the page size for linux systems, use Go's
> +`Getpagesize` function.
> +
> +This resolves #258.
> +
> +Signed-off-by: Thomas Hipp 
> +---
> + process/process_linux.go   | 5 -
> + process/process_linux_386.go   | 3 +--
> + process/process_linux_amd64.go | 3 +--
> + process/process_linux_arm.go   | 3 +--
> + process/process_linux_arm64.go | 3 +--
> +