From 1f2b994c45eebde958b5a81d862c5b5db91df7c2 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 24 Jan 2017 16:51:07 +0000 Subject: [PATCH 01/15] First pass at gitlab-ci --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8c0f322 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,32 @@ +stages: + - package + - publish + +package:jessie: &package + stage: package + image: $CI_REGISTRY/docker-images/layers:$DISTRO-deb + variables: + DISTRO: jessie + script: + - git checkout -b debian/$DISTRO + - update-changelog + - install-dependencies + - rm -fv perp-build-deps*.deb .gitlab-ci.yml ../*.{deb,dsc,build,changes,tar.*} + - gbp buildpackage --git-ignore-new --git-ignore-branch -us -uc + - save-artifacts + artifacts: + paths: + - pkg/ + +package:stretch: + <<: *package + variables: + DISTRO: stretch + +publish: + stage: publish + tags: + - shell + script: + - publish + From ad1fbc788d97d6245312891b807c410f773d56b8 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 24 Jan 2017 16:52:05 +0000 Subject: [PATCH 02/15] Checkout the branch, don't create it --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c0f322..a89a08f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ package:jessie: &package variables: DISTRO: jessie script: - - git checkout -b debian/$DISTRO + - git checkout debian/$DISTRO - update-changelog - install-dependencies - rm -fv perp-build-deps*.deb .gitlab-ci.yml ../*.{deb,dsc,build,changes,tar.*} From 27e9ba595bb2526223209802ec40f98f13e7fd16 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 24 Jan 2017 16:54:15 +0000 Subject: [PATCH 03/15] Add more git-buildpackage flags --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a89a08f..60a24ee 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ package:jessie: &package - update-changelog - install-dependencies - rm -fv perp-build-deps*.deb .gitlab-ci.yml ../*.{deb,dsc,build,changes,tar.*} - - gbp buildpackage --git-ignore-new --git-ignore-branch -us -uc + - gbp buildpackage --git-ignore-new --git-ignore-branch --git-upstream-tag=%(s) --git-upstream-branch=master -us -uc - save-artifacts artifacts: paths: From c3a79718fa780b45e0141582f03a23897bac87c0 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 22 Feb 2017 12:09:19 +0000 Subject: [PATCH 04/15] Use sautobuild to do the building --- .gitlab-ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60a24ee..4c7e116 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,16 +4,13 @@ stages: package:jessie: &package stage: package - image: $CI_REGISTRY/docker-images/layers:$DISTRO-deb + tags: + - shell variables: DISTRO: jessie script: - git checkout debian/$DISTRO - - update-changelog - - install-dependencies - - rm -fv perp-build-deps*.deb .gitlab-ci.yml ../*.{deb,dsc,build,changes,tar.*} - - gbp buildpackage --git-ignore-new --git-ignore-branch --git-upstream-tag=%(s) --git-upstream-branch=master -us -uc - - save-artifacts + - sautobuild $PWD artifacts: paths: - pkg/ From 1aff2698f7770b92865c74d549d41f4d82a20d2f Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 22 Feb 2017 13:05:19 +0000 Subject: [PATCH 05/15] gitlab-ci: Updated some more --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c7e116..b83d26f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,10 @@ package:jessie: &package variables: DISTRO: jessie script: + - export VERSION=$(git tag --contains master --merged master) + - git archive -v --format tgz -o ../ruby-linux-netlink_$VERSION.orig.tar.gz master - git checkout debian/$DISTRO - - sautobuild $PWD + - sautobuild -d $DISTRO $PWD artifacts: paths: - pkg/ From 4c7488d928047704ec78b9aab991e08b101bd875 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Wed, 22 Feb 2017 13:06:20 +0000 Subject: [PATCH 06/15] gitlab-ci: Checkout master before trying to do stuff --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b83d26f..77a4617 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ package:jessie: &package variables: DISTRO: jessie script: + - git checkout master - export VERSION=$(git tag --contains master --merged master) - git archive -v --format tgz -o ../ruby-linux-netlink_$VERSION.orig.tar.gz master - git checkout debian/$DISTRO From ae655dde0e5389433e1d800a3cfe2082835bf9d8 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:17:10 +0000 Subject: [PATCH 07/15] added wheezy --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 77a4617..39bd373 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,11 @@ package:stretch: variables: DISTRO: stretch +package:wheezy: + <<: *package + variables: + DISTRO: wheezy + publish: stage: publish tags: From 7488920028e9f45b0ef127fb50f844e8acdea758 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:20:27 +0000 Subject: [PATCH 08/15] Update sautobuild just do do a binary build; also save artifacts --- .gitlab-ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39bd373..d2b93c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,11 +9,10 @@ package:jessie: &package variables: DISTRO: jessie script: - - git checkout master - - export VERSION=$(git tag --contains master --merged master) - - git archive -v --format tgz -o ../ruby-linux-netlink_$VERSION.orig.tar.gz master - - git checkout debian/$DISTRO - - sautobuild -d $DISTRO $PWD + - sautobuild -d $DISTRO -- --debuild-flags=-b $PWD + - mkdir -p pkg/$DISTRO + - mv -v ../*.{dsc,build,buildinfo,changes,tar.*} pkg/$DISTRO 2>/dev/null || true + - mv -v ../*.deb pkg/$DISTRO artifacts: paths: - pkg/ @@ -30,8 +29,6 @@ package:wheezy: publish: stage: publish - tags: - - shell script: - publish From 15a303cb97f27437e68a386bf543413b375ca0dc Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:21:31 +0000 Subject: [PATCH 09/15] Use quilt to build --- debian/rules | 2 +- debian/source/format | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 debian/source/format diff --git a/debian/rules b/debian/rules index 5a433f2..89b42f2 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,7 @@ # export DH_RUBY_GEMSPEC=gem.gemspec %: - dh $@ --buildsystem=ruby --with ruby + dh $@ --buildsystem=ruby --with ruby --with quilt override_dh_auto_build-arch: rake lib/linux/c_struct_sizeof_size_t.rb diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) From 17cf2062791c574acd437640db79ff9bd84ae412 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:25:05 +0000 Subject: [PATCH 10/15] Added correct debbuildopt --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2b93c4..b6770f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ package:jessie: &package variables: DISTRO: jessie script: - - sautobuild -d $DISTRO -- --debuild-flags=-b $PWD + - sautobuild -d $DISTRO -- --debbuildopts=-b $PWD - mkdir -p pkg/$DISTRO - mv -v ../*.{dsc,build,buildinfo,changes,tar.*} pkg/$DISTRO 2>/dev/null || true - mv -v ../*.deb pkg/$DISTRO From 230c5f86414f6b46511ba887c8a5efd6572de7d1 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:28:56 +0000 Subject: [PATCH 11/15] Added quilt as a build-dep --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 7f03e6f..56a41c8 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Maintainer: Matthew Bloch Uploaders: Patrick J Cherry Section: ruby Priority: optional -Build-Depends: debhelper (>= 7), gem2deb, rake, ruby-ffi +Build-Depends: debhelper (>= 7), gem2deb, rake, ruby-ffi, quilt Standards-Version: 3.8.0 XS-Ruby-Versions: all From 2614fdd90d28f9be3587fa98b2ba6d4653f3d8dd Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:33:28 +0000 Subject: [PATCH 12/15] This is really an arch-independent package --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 56a41c8..af3c8db 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.8.0 XS-Ruby-Versions: all Package: ruby-linux-netlink -Architecture: any +Architecture: all Depends: ruby | ruby-interpreter, ruby-ffi, ${misc:Depends} Provides: liblinux-netlink-ruby1.8, liblinux-netlink-ruby1.9.1 XB-Ruby-Versions: ${ruby:Versions} From 8c21f7c28f3c97515d5388e28a8f96d57397edd7 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:34:13 +0000 Subject: [PATCH 13/15] Use docker images to build --- .gitlab-ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6770f7..b49c89b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,16 +3,12 @@ stages: - publish package:jessie: &package + image: $CI_REGISTRY/docker-images/layers:$DISTRO-deb stage: package - tags: - - shell variables: DISTRO: jessie script: - - sautobuild -d $DISTRO -- --debbuildopts=-b $PWD - - mkdir -p pkg/$DISTRO - - mv -v ../*.{dsc,build,buildinfo,changes,tar.*} pkg/$DISTRO 2>/dev/null || true - - mv -v ../*.deb pkg/$DISTRO + - package artifacts: paths: - pkg/ From a389edbf27ea00c5dd43f23819bd25f848a64c76 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:39:58 +0000 Subject: [PATCH 14/15] Set correct image for publishing --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b49c89b..dc1697c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,7 @@ package:wheezy: DISTRO: wheezy publish: + image: $CI_REGISTRY/docker-images/layers:jessie-publish stage: publish script: - publish From b25a4b8744806fb8e496c8979f71d3c7fa98b8f4 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 28 Feb 2017 16:44:50 +0000 Subject: [PATCH 15/15] Updated changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 68d4b02..49986d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ruby-linux-netlink (0.18-2) stable; urgency=medium + + * This package is now architecture independent. + * The source format has been removed in favour of using dh --with quilt. + + -- Patrick J Cherry Tue, 28 Feb 2017 16:43:43 +0000 + ruby-linux-netlink (0.18-1+jessie1) stable; urgency=medium * Fixed new massive IP test thing to work with ruby1.8 and also non-root users