linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-core 0/3] Fixes for cbuild and travis
@ 2018-01-15 21:13 Jason Gunthorpe
       [not found] ` <20180115211347.5651-1-jgg-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2018-01-15 21:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Fix the unconditional travis failures with the latest suse tumbleweed docker
images

Fix perplexing travis failures with no output from sparse.

Use clang 5.0

This is a PR:

https://github.com/linux-rdma/rdma-core/pull/283

Jason Gunthorpe (3):
  cbuild: Support distros that only ship python3
  travis: Do not loose ninja output if ninja fails during sparse
  travis: Use clang-5.0

 .travis.yml           |  6 +++---
 buildlib/cbuild       | 16 ++++++++++------
 buildlib/travis-build | 10 +++++-----
 3 files changed, 18 insertions(+), 14 deletions(-)

-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3
       [not found] ` <20180115211347.5651-1-jgg-uk2M96/98Pc@public.gmane.org>
@ 2018-01-15 21:13   ` Jason Gunthorpe
       [not found]     ` <20180115211347.5651-2-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-15 21:13   ` [PATCH rdma-core 2/3] travis: Do not loose ninja output if ninja fails during sparse Jason Gunthorpe
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2018-01-15 21:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

SuSE tumbleweed is no longer shipping python2 by default, at least
in the minimal docker image. This breaks cbuild and travis.

Revise this little scriptlet we run in the container to support
both versions of python and use python3 in tumbleweed.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 buildlib/cbuild | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index 3f659bf84ff68d..6e52328d489dea 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -73,6 +73,7 @@ class DockerFile(object):
         self.lines = ["FROM %s"%(src)];
 
 class Environment(object):
+    python_cmd = "python";
     aliases = set();
     use_make = False;
     proxy = True;
@@ -324,6 +325,9 @@ class tumbleweed(ZypperEnvironment):
     name = "tumbleweed";
     specfile = "suse/rdma-core.spec";
     rpmbuild_options = [ "--without=curlmini" ];
+    # tumbleweed no longer includes python2 in the base docker images, only python3,
+    # use that instead.
+    python_cmd = "python3";
 
 # -------------------------------------------------------------------------
 
@@ -474,17 +478,17 @@ def run_rpm_build(args,spec_file,env):
             print >> F,"""
 import os,subprocess;
 with open("/etc/passwd","a") as F:
-   print >> F, {passwd!r};
+   F.write({passwd!r} + "\\n");
 with open("/etc/group","a") as F:
-   print >> F, {group!r};
+   F.write({group!r} + "\\n");
 os.setgid({gid:d});
 os.setuid({uid:d});
 
 # Get RPM to tell us the expected tar filename.
 for ln in subprocess.check_output(["rpmspec","-P",{tspec_file!r}]).splitlines():
-   if ln.startswith("Source:"):
-      tarfn = ln.strip().partition(' ')[2].strip();
-os.symlink({tarfn!r},os.path.join("SOURCES",tarfn));
+   if ln.startswith(b"Source:"):
+      tarfn = ln.strip().partition(b' ')[2].strip();
+os.symlink({tarfn!r},os.path.join(b"SOURCES",tarfn));
 """.format(passwd=":".join(str(I) for I in pwd.getpwuid(os.getuid())),
            group=":".join(str(I) for I in grp.getgrgid(os.getgid())),
            uid=os.getuid(),
@@ -505,7 +509,7 @@ os.symlink({tarfn!r},os.path.join("SOURCES",tarfn));
         if args.run_shell:
             opts.append("/bin/bash");
         else:
-            opts.extend(["python","go.py"]);
+            opts.extend([env.python_cmd,"go.py"]);
 
         docker_cmd(args,*opts)
 
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH rdma-core 2/3] travis: Do not loose ninja output if ninja fails during sparse
       [not found] ` <20180115211347.5651-1-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-15 21:13   ` [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3 Jason Gunthorpe
@ 2018-01-15 21:13   ` Jason Gunthorpe
  2018-01-15 21:13   ` [PATCH rdma-core 3/3] travis: Use clang-5.0 Jason Gunthorpe
  2018-01-17 15:49   ` [PATCH rdma-core 0/3] Fixes for cbuild and travis Doug Ledford
  3 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2018-01-15 21:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

It turns out that cgcc is an older version of gcc on travis
and can produce warnings that the prior gcc runs didn't, but
due to how the output is filtered the messages are discarded
totally.

Ensure any output from ninja that is not a progress print is
displayed.

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 buildlib/travis-build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildlib/travis-build b/buildlib/travis-build
index bf86baa7432c6b..0efcbc60d18be5 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -30,9 +30,9 @@ cd ../build-sparse
 mv ../CMakeLists.txt ../CMakeLists-orig.txt
 grep -v "# NO SPARSE" ../CMakeLists-orig.txt > ../CMakeLists.txt
 CC=cgcc CFLAGS="-Werror" cmake -GNinja ..
-ninja > out
+ninja | grep -v '^\[' | tee out
 # sparse does not fail gcc on messages
-if grep -v '^\[' out; then
+if [ -s out ]; then
    false
 fi
 mv ../CMakeLists-orig.txt ../CMakeLists.txt
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH rdma-core 3/3] travis: Use clang-5.0
       [not found] ` <20180115211347.5651-1-jgg-uk2M96/98Pc@public.gmane.org>
  2018-01-15 21:13   ` [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3 Jason Gunthorpe
  2018-01-15 21:13   ` [PATCH rdma-core 2/3] travis: Do not loose ninja output if ninja fails during sparse Jason Gunthorpe
@ 2018-01-15 21:13   ` Jason Gunthorpe
  2018-01-17 15:49   ` [PATCH rdma-core 0/3] Fixes for cbuild and travis Doug Ledford
  3 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2018-01-15 21:13 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Packages are available for trusty now

Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 .travis.yml           | 6 +++---
 buildlib/travis-build | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 7af2aeb9072db5..9d9667a9ecd838 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,15 +11,15 @@ addons:
   apt:
     sources:
       # sourceline because travis won't white list trusty builds, and hasn't
-      # whitelisted 4.0
-      - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main"
+      # whitelisted 5.0
+      - sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main"
         key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key"
       - ubuntu-toolchain-r-test
       # Multiverse is not on by default and we need it to get sparse
       - sourceline: "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse"
     packages:
       - build-essential
-      - clang-4.0
+      - clang-5.0
       - cmake
       - debhelper
       - dh-systemd
diff --git a/buildlib/travis-build b/buildlib/travis-build
index 0efcbc60d18be5..cb5c1149a43ab8 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -9,9 +9,9 @@ mkdir build-clang build32 build-sparse build-aarch64
 
 # Build with latest clang first
 cd build-clang
-CC=clang-4.0 CFLAGS=-Werror cmake -GNinja ..
+CC=clang-5.0 CFLAGS=-Werror cmake -GNinja ..
 ninja
-../buildlib/check-build --src .. --cc clang-4.0
+../buildlib/check-build --src .. --cc clang-5.0
 
 # 32 bit build to check format strings/etc
 cd ../build32
@@ -42,7 +42,7 @@ cd ../build-clang
 cp ../util/udma_barrier.h ../util/udma_barrier.h.old
 echo "#error Fail" >> ../util/udma_barrier.h
 rm CMakeCache.txt
-CC=clang-4.0 CFLAGS=-Werror cmake -GNinja ..
+CC=clang-5.0 CFLAGS=-Werror cmake -GNinja ..
 ninja
 cp ../util/udma_barrier.h.old ../util/udma_barrier.h
 
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH rdma-core 0/3] Fixes for cbuild and travis
       [not found] ` <20180115211347.5651-1-jgg-uk2M96/98Pc@public.gmane.org>
                     ` (2 preceding siblings ...)
  2018-01-15 21:13   ` [PATCH rdma-core 3/3] travis: Use clang-5.0 Jason Gunthorpe
@ 2018-01-17 15:49   ` Doug Ledford
  3 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2018-01-17 15:49 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On Mon, 2018-01-15 at 14:13 -0700, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> Fix the unconditional travis failures with the latest suse tumbleweed docker
> images
> 
> Fix perplexing travis failures with no output from sparse.
> 
> Use clang 5.0
> 
> This is a PR:
> 
> https://github.com/linux-rdma/rdma-core/pull/283
> 
> Jason Gunthorpe (3):
>   cbuild: Support distros that only ship python3
>   travis: Do not loose ninja output if ninja fails during sparse
>   travis: Use clang-5.0
> 
>  .travis.yml           |  6 +++---
>  buildlib/cbuild       | 16 ++++++++++------
>  buildlib/travis-build | 10 +++++-----
>  3 files changed, 18 insertions(+), 14 deletions(-)
> 

This was merged yesterday.  I forgot to email the list, sorry.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3
       [not found]     ` <20180115211347.5651-2-jgg-uk2M96/98Pc@public.gmane.org>
@ 2018-01-17 16:25       ` Nicolas Morey-Chaisemartin
       [not found]         ` <f75a3cd5-9763-0b4c-5e99-0565023967e4-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2018-01-17 16:25 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Jason Gunthorpe



Le 15/01/2018 à 22:13, Jason Gunthorpe a écrit :
> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> SuSE tumbleweed is no longer shipping python2 by default, at least
> in the minimal docker image. This breaks cbuild and travis.
>
> Revise this little scriptlet we run in the container to support
> both versions of python and use python3 in tumbleweed.
>
> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  buildlib/cbuild | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/buildlib/cbuild b/buildlib/cbuild

I'm guessing this one should probably be backported to the stable branches so they keep working in travis ?
I don't think we need the others.

Can you confirm ?

Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3
       [not found]         ` <f75a3cd5-9763-0b4c-5e99-0565023967e4-l3A5Bk7waGM@public.gmane.org>
@ 2018-01-17 16:28           ` Jason Gunthorpe
       [not found]             ` <20180117162858.GA3788-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2018-01-17 16:28 UTC (permalink / raw)
  To: Nicolas Morey-Chaisemartin; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Wed, Jan 17, 2018 at 05:25:12PM +0100, Nicolas Morey-Chaisemartin wrote:
> 
> 
> Le 15/01/2018 à 22:13, Jason Gunthorpe a écrit :
> > From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > SuSE tumbleweed is no longer shipping python2 by default, at least
> > in the minimal docker image. This breaks cbuild and travis.
> >
> > Revise this little scriptlet we run in the container to support
> > both versions of python and use python3 in tumbleweed.
> >
> > Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >  buildlib/cbuild | 16 ++++++++++------
> >  1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/buildlib/cbuild b/buildlib/cbuild
> 
> I'm guessing this one should probably be backported to the stable branches so they keep working in travis ?
> I don't think we need the others.
> 
> Can you confirm ?

Makes sense to me, we should have travis working for the stable
branches.. You can use the github UI to construct PRs for the stable
branches if people want to use that?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3
       [not found]             ` <20180117162858.GA3788-uk2M96/98Pc@public.gmane.org>
@ 2018-01-17 16:31               ` Nicolas Morey-Chaisemartin
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2018-01-17 16:31 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA



Le 17/01/2018 à 17:28, Jason Gunthorpe a écrit :
> On Wed, Jan 17, 2018 at 05:25:12PM +0100, Nicolas Morey-Chaisemartin wrote:
>>
>> Le 15/01/2018 à 22:13, Jason Gunthorpe a écrit :
>>> From: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>>>
>>> SuSE tumbleweed is no longer shipping python2 by default, at least
>>> in the minimal docker image. This breaks cbuild and travis.
>>>
>>> Revise this little scriptlet we run in the container to support
>>> both versions of python and use python3 in tumbleweed.
>>>
>>> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>>>  buildlib/cbuild | 16 ++++++++++------
>>>  1 file changed, 10 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/buildlib/cbuild b/buildlib/cbuild
>> I'm guessing this one should probably be backported to the stable branches so they keep working in travis ?
>> I don't think we need the others.
>>
>> Can you confirm ?
> Makes sense to me, we should have travis working for the stable
> branches.. You can use the github UI to construct PRs for the stable
> branches if people want to use that?
>
> Jason
I know I do check the travis status in my own githup repo before pushing anything to stable.
So I'll backport it.

Thanks

Nicolas
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-17 16:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 21:13 [PATCH rdma-core 0/3] Fixes for cbuild and travis Jason Gunthorpe
     [not found] ` <20180115211347.5651-1-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-15 21:13   ` [PATCH rdma-core 1/3] cbuild: Support distros that only ship python3 Jason Gunthorpe
     [not found]     ` <20180115211347.5651-2-jgg-uk2M96/98Pc@public.gmane.org>
2018-01-17 16:25       ` Nicolas Morey-Chaisemartin
     [not found]         ` <f75a3cd5-9763-0b4c-5e99-0565023967e4-l3A5Bk7waGM@public.gmane.org>
2018-01-17 16:28           ` Jason Gunthorpe
     [not found]             ` <20180117162858.GA3788-uk2M96/98Pc@public.gmane.org>
2018-01-17 16:31               ` Nicolas Morey-Chaisemartin
2018-01-15 21:13   ` [PATCH rdma-core 2/3] travis: Do not loose ninja output if ninja fails during sparse Jason Gunthorpe
2018-01-15 21:13   ` [PATCH rdma-core 3/3] travis: Use clang-5.0 Jason Gunthorpe
2018-01-17 15:49   ` [PATCH rdma-core 0/3] Fixes for cbuild and travis Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).