public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core v1 0/3] Perform package tests in Travis CI
@ 2017-11-05 14:44 Leon Romanovsky
       [not found] ` <20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-05 14:44 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
	Benjamin Drung, Nicolas Morey-Chaisemartin

Changelog: v0->v1:
 * The "cbuild: Properly create tarball for SuSE" patch was abandoned as
   no one is interested by scripts behavior when being ran by root.
 * Patch "travis: Add RedHat and SuSE rpmbuild support"
   "buildlib/package-build-test" script to skip build tests when being ran
   outside travis (the actual check is whether we are already running inside
   a container or not).
 * In the patch "travis: Test Debian packaging under artful container"
   removed as no longer needed installations: debhelper, dh-systemd, fakeroot

-----------------------------------------------------------------------------

This patchset comes from Alaa and he adds to Travis CI ability
to reuse our cbuild script to build various packages.

The PR is https://github.com/linux-rdma/rdma-core/pull/241

The change to SuSE Tumbleweed wasn't straightforward and can be done as
a followup patch.

Thanks

Cc: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
Cc: Nicolas Morey-Chaisemartin <nmoreychaisemartin-l3A5Bk7waGM@public.gmane.org>

Alaa Hleihel (3):
  travis: Add RedHat and SuSE rpmbuild support
  buildlib/cbuild: Add Ubuntu artful
  travis: Test Debian packaging under artful container

 .travis.yml                 |  7 ++++---
 buildlib/cbuild             |  7 +++++++
 buildlib/package-build-test | 21 +++++++++++++++++++++
 buildlib/travis-build       | 14 --------------
 4 files changed, 32 insertions(+), 17 deletions(-)
 create mode 100755 buildlib/package-build-test

--
2.15.0

--
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 v1 1/3] travis: Add RedHat and SuSE rpmbuild support
       [not found] ` <20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-11-05 14:45   ` Leon Romanovsky
  2017-11-05 14:45   ` [PATCH rdma-core v1 2/3] buildlib/cbuild: Add Ubuntu artful Leon Romanovsky
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-05 14:45 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
	Benjamin Drung, Nicolas Morey-Chaisemartin, Alaa Hleihel

From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Provide a new script for testing rpmbuild under RedHat and SuSE
environments which validates both of the suse/rdma-core.spec and
redhat/rdma-core.spec spec files.

The script performs the RPM package build test by utilizing the existing
cbuild tool.

Signed-off-by: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 .travis.yml                 |  4 ++++
 buildlib/package-build-test | 21 +++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100755 buildlib/package-build-test

diff --git a/.travis.yml b/.travis.yml
index c190a241..4d7b0cc0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,6 +42,9 @@ addons:
       - gcc-multilib
       - lib32gcc-7-dev
 
+service:
+    - docker
+
 before_script:
   - export LATEST_GCC_LINARO_URL=`wget -qO - https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/ | grep -o '<a href=['"'"'"].*gcc-linaro-.*x86_64_aarch64-linux-gnu.tar.xz['"'"'"]'  |  sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//'`
   - export LATEST_GCC_LINARO_TAR=`basename $LATEST_GCC_LINARO_URL`
@@ -51,6 +54,7 @@ before_script:
 script:
   - buildlib/travis-build
   - buildlib/travis-checkpatch
+  - buildlib/package-build-test
   - buildlib/github-release
 deploy:
   # Deploy assets to Github releases
diff --git a/buildlib/package-build-test b/buildlib/package-build-test
new file mode 100755
index 00000000..d5fcdd9c
--- /dev/null
+++ b/buildlib/package-build-test
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# fail on errors
+set -e
+# be verbose
+set -x
+
+# Do not run these tests if we are already inside a container
+if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then
+       echo "We are running in a container, skipping ..."
+       exit 0
+fi
+
+for OS in centos7 opensuse-42.3
+do
+	echo
+	echo "Checking package build for ${OS} ...."
+	echo
+	buildlib/cbuild build-images ${OS}
+	buildlib/cbuild pkg ${OS}
+done
-- 
2.15.0

--
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 v1 2/3] buildlib/cbuild: Add Ubuntu artful
       [not found] ` <20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-11-05 14:45   ` [PATCH rdma-core v1 1/3] travis: Add RedHat and SuSE rpmbuild support Leon Romanovsky
@ 2017-11-05 14:45   ` Leon Romanovsky
  2017-11-05 14:45   ` [PATCH rdma-core v1 3/3] travis: Test Debian packaging under artful container Leon Romanovsky
  2017-11-07  8:30   ` [PATCH rdma-core v1 0/3] Perform package tests in Travis CI Leon Romanovsky
  3 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-05 14:45 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
	Benjamin Drung, Nicolas Morey-Chaisemartin, Alaa Hleihel

From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

This patch adds Ubuntu17.10 artful, that comes with GCC 7

Signed-off-by: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 buildlib/cbuild | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/buildlib/cbuild b/buildlib/cbuild
index fac1c3c6..e6a64e8a 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -181,6 +181,12 @@ class xenial(APTEnvironment):
     name = "ubuntu-16.04";
     aliases = {"xenial"};
 
+class artful(APTEnvironment):
+    docker_parent = "ubuntu:17.10"
+    pkgs = xenial.pkgs
+    name = "ubuntu-17.10";
+    aliases = {"artful"};
+
 class jessie(APTEnvironment):
     docker_parent = "debian:8"
     pkgs = xenial.pkgs;
@@ -325,6 +331,7 @@ environments = [centos6(),
                 travis(),
                 trusty(),
                 xenial(),
+                artful(),
                 jessie(),
                 stretch(),
                 fc26(),
-- 
2.15.0

--
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 v1 3/3] travis: Test Debian packaging under artful container
       [not found] ` <20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-11-05 14:45   ` [PATCH rdma-core v1 1/3] travis: Add RedHat and SuSE rpmbuild support Leon Romanovsky
  2017-11-05 14:45   ` [PATCH rdma-core v1 2/3] buildlib/cbuild: Add Ubuntu artful Leon Romanovsky
@ 2017-11-05 14:45   ` Leon Romanovsky
       [not found]     ` <20171105144503.32709-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-11-07  8:30   ` [PATCH rdma-core v1 0/3] Perform package tests in Travis CI Leon Romanovsky
  3 siblings, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-05 14:45 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
	Benjamin Drung, Nicolas Morey-Chaisemartin, Alaa Hleihel

From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

This will be compiled with GCC 7 coming with Ubuntu artful.

Also, remove installations of debian helpers from addons->apt
list in .travis.yml file as they are no longer required.

Signed-off-by: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 .travis.yml                 |  3 ---
 buildlib/package-build-test |  2 +-
 buildlib/travis-build       | 14 --------------
 3 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 4d7b0cc0..bdcb20a8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,9 +21,6 @@ addons:
       - build-essential
       - clang-4.0
       - cmake
-      - debhelper
-      - dh-systemd
-      - fakeroot
       - gcc
       - gcc-7
       - git
diff --git a/buildlib/package-build-test b/buildlib/package-build-test
index d5fcdd9c..e6d7b100 100755
--- a/buildlib/package-build-test
+++ b/buildlib/package-build-test
@@ -11,7 +11,7 @@ if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then
        exit 0
 fi
 
-for OS in centos7 opensuse-42.3
+for OS in centos7 opensuse-42.3 artful
 do
 	echo
 	echo "Checking package build for ${OS} ...."
diff --git a/buildlib/travis-build b/buildlib/travis-build
index bf86baa7..1a88dff2 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -45,17 +45,3 @@ rm CMakeCache.txt
 CC=clang-4.0 CFLAGS=-Werror cmake -GNinja ..
 ninja
 cp ../util/udma_barrier.h.old ../util/udma_barrier.h
-
-# Finally run through gcc-7 64 bit through the debian packaging This gives a
-# good clue if patches are changing packaging related things, the RPM stuff
-# will have to be audited by hand.
-
-# When running cmake through debian/rules it is hard to set -Werror,
-# instead force it on by changing the CMakeLists.txt
-cd ..
-echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
-sed -i -e 's/-DCMAKE_BUILD_TYPE=Release//g' debian/rules
-sed -i -e 's/ninja \(.*\)-v/ninja \1/g' debian/rules
-
-CC=gcc-7 debian/rules build
-fakeroot debian/rules binary
-- 
2.15.0

--
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 v1 3/3] travis: Test Debian packaging under artful container
       [not found]     ` <20171105144503.32709-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-11-06  2:17       ` Jason Gunthorpe
       [not found]         ` <20171106021737.GC26011-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2017-11-06  2:17 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Benjamin Drung,
	Nicolas Morey-Chaisemartin, Alaa Hleihel

On Sun, Nov 05, 2017 at 04:45:02PM +0200, Leon Romanovsky wrote:

> -# Finally run through gcc-7 64 bit through the debian packaging This gives a
> -# good clue if patches are changing packaging related things, the RPM stuff
> -# will have to be audited by hand.
> -
> -# When running cmake through debian/rules it is hard to set -Werror,
> -# instead force it on by changing the CMakeLists.txt
> -cd ..
> -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake

Loosing this stuff seems like a problem though. We need to make sure
the package builds run with -Werror or travis will not flag new
warnings.

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 v1 3/3] travis: Test Debian packaging under artful container
       [not found]         ` <20171106021737.GC26011-uk2M96/98Pc@public.gmane.org>
@ 2017-11-06  8:19           ` Alaa Hleihel
       [not found]             ` <68f08161-0ecf-17f7-f0fc-bc18b66fc4fa-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Alaa Hleihel @ 2017-11-06  8:19 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Benjamin Drung,
	Nicolas Morey-Chaisemartin, Alaa Hleihel



On 06/11/2017 4:17, Jason Gunthorpe wrote:
> On Sun, Nov 05, 2017 at 04:45:02PM +0200, Leon Romanovsky wrote:
>
>> -# Finally run through gcc-7 64 bit through the debian packaging This gives a
>> -# good clue if patches are changing packaging related things, the RPM stuff
>> -# will have to be audited by hand.
>> -
>> -# When running cmake through debian/rules it is hard to set -Werror,
>> -# instead force it on by changing the CMakeLists.txt
>> -cd ..
>> -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
> Loosing this stuff seems like a problem though. We need to make sure
> the package builds run with -Werror or travis will not flag new
> warnings.

We still have compilation tests with -Werror in buildlib/travis-build (clang, 32 bit, arm, etc..).
If that is not enough, I think we can pass the -Werror to rpmbuild via CFLAGS environment variable:
CFLAGS="-Werror" rpmbuild ............

What do you think ?

Regards,
Alaa

> 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

--
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 v1 3/3] travis: Test Debian packaging under artful container
       [not found]             ` <68f08161-0ecf-17f7-f0fc-bc18b66fc4fa-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2017-11-06 16:50               ` Jason Gunthorpe
  0 siblings, 0 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2017-11-06 16:50 UTC (permalink / raw)
  To: Alaa Hleihel
  Cc: Leon Romanovsky, Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Benjamin Drung, Nicolas Morey-Chaisemartin, Alaa Hleihel

On Mon, Nov 06, 2017 at 10:19:37AM +0200, Alaa Hleihel wrote:
> 
> 
> On 06/11/2017 4:17, Jason Gunthorpe wrote:
> > On Sun, Nov 05, 2017 at 04:45:02PM +0200, Leon Romanovsky wrote:
> >
> >> -# Finally run through gcc-7 64 bit through the debian packaging This gives a
> >> -# good clue if patches are changing packaging related things, the RPM stuff
> >> -# will have to be audited by hand.
> >> -
> >> -# When running cmake through debian/rules it is hard to set -Werror,
> >> -# instead force it on by changing the CMakeLists.txt
> >> -cd ..
> >> -echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
> > Loosing this stuff seems like a problem though. We need to make sure
> > the package builds run with -Werror or travis will not flag new
> > warnings.
> 
> We still have compilation tests with -Werror in buildlib/travis-build (clang, 32 bit, arm, etc..).
> If that is not enough,

It is not enough. All compilation tests must be run with -Werror and
if you move the gcc-7 test then you have to keep the -Werror

> I think we can pass the -Werror to rpmbuild via CFLAGS environment variable:
> CFLAGS="-Werror" rpmbuild ............

If that works properly it would be fine.

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 v1 0/3] Perform package tests in Travis CI
       [not found] ` <20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-11-05 14:45   ` [PATCH rdma-core v1 3/3] travis: Test Debian packaging under artful container Leon Romanovsky
@ 2017-11-07  8:30   ` Leon Romanovsky
  3 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-07  8:30 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Benjamin Drung,
	Nicolas Morey-Chaisemartin

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

On Sun, Nov 05, 2017 at 04:44:59PM +0200, Leon Romanovsky wrote:
> Changelog: v0->v1:
>  * The "cbuild: Properly create tarball for SuSE" patch was abandoned as
>    no one is interested by scripts behavior when being ran by root.
>  * Patch "travis: Add RedHat and SuSE rpmbuild support"
>    "buildlib/package-build-test" script to skip build tests when being ran
>    outside travis (the actual check is whether we are already running inside
>    a container or not).
>  * In the patch "travis: Test Debian packaging under artful container"
>    removed as no longer needed installations: debhelper, dh-systemd, fakeroot
>
> -----------------------------------------------------------------------------
>
> This patchset comes from Alaa and he adds to Travis CI ability
> to reuse our cbuild script to build various packages.
>
> The PR is https://github.com/linux-rdma/rdma-core/pull/241
>
> The change to SuSE Tumbleweed wasn't straightforward and can be done as
> a followup patch.
>
> Thanks
>
> Cc: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> Cc: Nicolas Morey-Chaisemartin <nmoreychaisemartin-l3A5Bk7waGM@public.gmane.org>
>
> Alaa Hleihel (3):
>   travis: Add RedHat and SuSE rpmbuild support
>   buildlib/cbuild: Add Ubuntu artful

I will take the two patches above, because they are not controversial
and resend the third one.

Thanks


>   travis: Test Debian packaging under artful container
>
>  .travis.yml                 |  7 ++++---
>  buildlib/cbuild             |  7 +++++++
>  buildlib/package-build-test | 21 +++++++++++++++++++++
>  buildlib/travis-build       | 14 --------------
>  4 files changed, 32 insertions(+), 17 deletions(-)
>  create mode 100755 buildlib/package-build-test
>
> --
> 2.15.0
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-11-07  8:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-05 14:44 [PATCH rdma-core v1 0/3] Perform package tests in Travis CI Leon Romanovsky
     [not found] ` <20171105144503.32709-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-05 14:45   ` [PATCH rdma-core v1 1/3] travis: Add RedHat and SuSE rpmbuild support Leon Romanovsky
2017-11-05 14:45   ` [PATCH rdma-core v1 2/3] buildlib/cbuild: Add Ubuntu artful Leon Romanovsky
2017-11-05 14:45   ` [PATCH rdma-core v1 3/3] travis: Test Debian packaging under artful container Leon Romanovsky
     [not found]     ` <20171105144503.32709-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-06  2:17       ` Jason Gunthorpe
     [not found]         ` <20171106021737.GC26011-uk2M96/98Pc@public.gmane.org>
2017-11-06  8:19           ` Alaa Hleihel
     [not found]             ` <68f08161-0ecf-17f7-f0fc-bc18b66fc4fa-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2017-11-06 16:50               ` Jason Gunthorpe
2017-11-07  8:30   ` [PATCH rdma-core v1 0/3] Perform package tests in Travis CI Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox