From 997e1794f7b8eea248d16893ba0404098a5b1994 Mon Sep 17 00:00:00 2001 From: kyudin Date: Wed, 16 Jun 2021 22:08:34 +0300 Subject: [PATCH 01/10] add debianization and Jenkins --- Jenkinsfile_develop | 60 ++++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 5 ++++ debian/compat | 1 + debian/control | 19 ++++++++++++++ debian/copyright | 34 +++++++++++++++++++++++++ debian/docs | 0 debian/rules | 8 ++++++ debian/source/format | 1 + 8 files changed, 128 insertions(+) create mode 100644 Jenkinsfile_develop create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/Jenkinsfile_develop b/Jenkinsfile_develop new file mode 100644 index 00000000..26a4c749 --- /dev/null +++ b/Jenkinsfile_develop @@ -0,0 +1,60 @@ +node('develop') { + stage ('Checkout') { + checkout scm + } + + stage ('Source package') { +sh '''PKGVERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ //g\'` +dch -b -v ${PKGVERSION}.${BUILD_NUMBER}.dev \\"---new build---\\" +mkdir -p tmp_src +cd tmp_src +dpkg-source -Itmp_src -b ../ + +for i in `ls`; do +curl -X POST -F file=@$i http://10.1.10.84:8080/api/files/upload_${SOURCE_NAME}_buster-ci-develop && rm $i +done; +# add files +curl -X POST http://10.1.10.84:8080/api/repos/buster-ci-develop/file/upload_${SOURCE_NAME}_buster-ci-develop +curl -X PUT -H 'Content-Type: application/json' --data '{}' http://10.1.10.84:8080/api/publish//buster''' + } + + stage ('Build package') { + try { +sh '''PKGVERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ //g\'` +mkdir -p /dev/tmp +export TMPDIR=/dev/tmp + +export MAKE_ARGS=-j16 + +while true; do + apt-get update && break +done +apt-get build-dep -y ${SOURCE_NAME} +apt-get source ${SOURCE_NAME} +apt-get -y --new-pkgs upgrade + +cd ${SOURCE_NAME}-${PKGVERSION}.${BUILD_NUMBER}.dev +dpkg-buildpackage -us -uc -b -rfakeroot +cd .. + +for i in `ls *.deb`; do +curl -X POST -F file=@$i http://10.1.10.84:8080/api/files/upload_${SOURCE_NAME}_buster-ci-develop +done; +curl -X POST http://10.1.10.84:8080/api/repos/buster-ci-develop/file/upload_${SOURCE_NAME}_buster-ci-develop +curl -X PUT -H 'Content-Type: application/json' --data '{}' http://10.1.10.84:8080/api/publish//buster +''' + currentBuild.result = 'SUCCESS' + } catch (err) { + currentBuild.result = 'FAILURE' + error('Build Failed') + } finally { + step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: emailextrecipients([requestor(), culprits()]), sendToIndividuals: true]) + } + } + + stage ('Post Build') { + archiveArtifacts artifacts: '*.deb', onlyIfSuccessful: true + } +} diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..8f436031 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-riak (2.8) unstable; urgency=low + + * Initial Release. + + -- Kirill Yudin Wed, 16 Jun 2021 22:07:00 +0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..ec635144 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..af27fd60 --- /dev/null +++ b/debian/control @@ -0,0 +1,19 @@ +Source: python-riak +Priority: optional +Section: python +Maintainer: Andrey Minov +Build-Depends: debhelper (>= 9), dh-python +Build-Depends-Indep: python3 +Standards-Version: 3.9.5 +X-Python-Version: >= 3.4 +Homepage: +#Vcs-Git: git://anonscm.debian.org/collab-maint/python-httplib2.git +#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/python-httplib2.git;a=summary + +Package: python-riak +Architecture: all +Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} +Description: python_riak fork (IPS) + + + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..82c2876f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,34 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python-httplib2 +Source: + +Files: * +Copyright: + +License: GPL-3.0+ + +Files: debian/* +Copyright: 2016 Andrey Minov +License: GPL-3.0+ + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid to pick license terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..e69de29b diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..c0d80b0b --- /dev/null +++ b/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 + +%: + dh $@ -Spybuild + + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..89ae9db8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) From 85b7c74b729dfcae18f08fd21b989cb6b343ed16 Mon Sep 17 00:00:00 2001 From: kyudin Date: Wed, 16 Jun 2021 22:19:06 +0300 Subject: [PATCH 02/10] fix allow-hosts in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 37eb8da0..a6b4b4dd 100755 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ description='Python client for Riak', long_description=long_description, zip_safe=True, - options={'easy_install': {'allow_hosts': 'pypi.python.org'}}, + #options={'easy_install': {'allow_hosts': 'pypi.python.org'}}, include_package_data=True, license='Apache 2', platforms='Platform Independent', From e77c9e21a4bc92d3931ca8d3781fb25dba0a5379 Mon Sep 17 00:00:00 2001 From: kyudin Date: Thu, 8 Jul 2021 11:40:55 +0300 Subject: [PATCH 03/10] add Jenkinsfile_stage --- Jenkinsfile_stage | 60 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Jenkinsfile_stage diff --git a/Jenkinsfile_stage b/Jenkinsfile_stage new file mode 100644 index 00000000..87ac9475 --- /dev/null +++ b/Jenkinsfile_stage @@ -0,0 +1,60 @@ +node('stage') { + stage ('Checkout') { + checkout scm + } + + stage ('Source package') { +sh '''PKGVERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ //g\'` +dch -b -v ${PKGVERSION}.${BUILD_NUMBER}.stage \\"---new build---\\" +mkdir -p tmp_src +cd tmp_src +dpkg-source -Zgzip -I -Itmp_src -b ../ + +for i in `ls`; do +curl -X POST -F file=@$i http://10.1.10.87:8080/api/files/upload_${SOURCE_NAME}_buster-ci-stage && rm $i +done; +# add files +curl -X POST http://10.1.10.87:8080/api/repos/buster-ci-stage/file/upload_${SOURCE_NAME}_buster-ci-stage +curl -X PUT -H 'Content-Type: application/json' --data '{}' http://10.1.10.87:8080/api/publish//buster''' + } + + stage ('Build package') { + try { +sh '''PKGVERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ //g\'` +mkdir -p /dev/tmp +export TMPDIR=/dev/tmp + +export MAKE_ARGS=-j16 + +while true; do + apt-get update && break +done +apt-get build-dep -y ${SOURCE_NAME} +apt-get source ${SOURCE_NAME} +apt-get -y --new-pkgs upgrade + +cd ${SOURCE_NAME}-${PKGVERSION}.${BUILD_NUMBER}.stage +dpkg-buildpackage -us -uc -b -rfakeroot +cd .. + +for i in `ls *.deb`; do +curl -X POST -F file=@$i http://10.1.10.87:8080/api/files/upload_${SOURCE_NAME}_buster-ci-stage +done; +curl -X POST http://10.1.10.87:8080/api/repos/buster-ci-stage/file/upload_${SOURCE_NAME}_buster-ci-stage +curl -X PUT -H 'Content-Type: application/json' --data '{}' http://10.1.10.87:8080/api/publish//buster +''' + currentBuild.result = 'SUCCESS' + } catch (err) { + currentBuild.result = 'FAILURE' + error('Build Failed') + } finally { + step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: emailextrecipients([requestor(), culprits()]), sendToIndividuals: true]) + } + } + + stage ('Post Build') { + archiveArtifacts artifacts: '*.deb', onlyIfSuccessful: true + } +} From 21615d0cc401c40129abcf3b9dedb0db27be3d7a Mon Sep 17 00:00:00 2001 From: kyudin Date: Thu, 8 Jul 2021 13:03:59 +0300 Subject: [PATCH 04/10] add temporary workaround --- PKG-INFO | 1 + 1 file changed, 1 insertion(+) create mode 100644 PKG-INFO diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 00000000..c5810a22 --- /dev/null +++ b/PKG-INFO @@ -0,0 +1 @@ +Version: 2.7.0post31 From 080253df8ad125ad0cb497e659226cd02e396f00 Mon Sep 17 00:00:00 2001 From: Andrey Minov Date: Thu, 8 Jul 2021 13:38:42 +0300 Subject: [PATCH 05/10] Update Jenkinsfile_stage --- Jenkinsfile_stage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile_stage b/Jenkinsfile_stage index 87ac9475..3b9bd9ce 100644 --- a/Jenkinsfile_stage +++ b/Jenkinsfile_stage @@ -9,7 +9,7 @@ SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ dch -b -v ${PKGVERSION}.${BUILD_NUMBER}.stage \\"---new build---\\" mkdir -p tmp_src cd tmp_src -dpkg-source -Zgzip -I -Itmp_src -b ../ +dpkg-source -Zgzip -Itmp_src -b ../ for i in `ls`; do curl -X POST -F file=@$i http://10.1.10.87:8080/api/files/upload_${SOURCE_NAME}_buster-ci-stage && rm $i From c1842dba4dba6b0c6ba5c6501ac5454734438f18 Mon Sep 17 00:00:00 2001 From: Andrey Minov Date: Thu, 8 Jul 2021 13:38:57 +0300 Subject: [PATCH 06/10] Delete PKG-INFO --- PKG-INFO | 1 - 1 file changed, 1 deletion(-) delete mode 100644 PKG-INFO diff --git a/PKG-INFO b/PKG-INFO deleted file mode 100644 index c5810a22..00000000 --- a/PKG-INFO +++ /dev/null @@ -1 +0,0 @@ -Version: 2.7.0post31 From 3f09b42c7fe8449ecaaec8e363c51190f9a68af1 Mon Sep 17 00:00:00 2001 From: kyudin Date: Tue, 13 Jun 2023 18:51:37 +0300 Subject: [PATCH 07/10] add Jenkinsfile buster --- Jenkinsfile_buster | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Jenkinsfile_buster diff --git a/Jenkinsfile_buster b/Jenkinsfile_buster new file mode 100644 index 00000000..69e37d2f --- /dev/null +++ b/Jenkinsfile_buster @@ -0,0 +1,60 @@ +node('buster_main_branch') { + stage ('Checkout') { + checkout scm + } + + stage ('Source package') { +sh '''PKGVERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ //g\'` +dch -b -v ${PKGVERSION}.${BUILD_NUMBER}.bust \\"---new build---\\" +mkdir -p tmp_src +cd tmp_src +dpkg-source -Zgzip -I -Itmp_src -b ../ + +for i in `ls`; do +curl -X POST -F file=@$i http://10.1.10.87:8080/api/files/upload_${SOURCE_NAME}_$DEBIAN_RELEASE-ci && rm $i +done; +# add files +curl -X POST http://10.1.10.87:8080/api/repos/$DEBIAN_RELEASE-ci/file/upload_${SOURCE_NAME}_$DEBIAN_RELEASE-ci +curl -X PUT -H 'Content-Type: application/json' --data '{}' http://10.1.10.87:8080/api/publish//$DEBIAN_RELEASE''' + } + + stage ('Build package') { + try { +sh '''PKGVERSION=$(git describe --tags $(git rev-list --tags --max-count=1)) +SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ //g\'` +mkdir -p /dev/tmp +export TMPDIR=/dev/tmp + +export MAKE_ARGS=-j16 + +while true; do + apt-get update && break +done +apt-get build-dep -y ${SOURCE_NAME} +apt-get source ${SOURCE_NAME} +apt-get -y --new-pkgs upgrade + +cd ${SOURCE_NAME}-${PKGVERSION}.${BUILD_NUMBER}.bust +dpkg-buildpackage -us -uc -b -rfakeroot +cd .. + +for i in `ls *.deb`; do +curl -X POST -F file=@$i http://10.1.10.87:8080/api/files/upload_${SOURCE_NAME}_$DEBIAN_RELEASE-ci +done; +curl -X POST http://10.1.10.87:8080/api/repos/$DEBIAN_RELEASE-ci/file/upload_${SOURCE_NAME}_$DEBIAN_RELEASE-ci +curl -X PUT -H 'Content-Type: application/json' --data '{}' http://10.1.10.87:8080/api/publish//$DEBIAN_RELEASE +''' + currentBuild.result = 'SUCCESS' + } catch (err) { + currentBuild.result = 'FAILURE' + error('Build Failed') + } finally { + step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: emailextrecipients([requestor(), culprits()]), sendToIndividuals: true]) + } + } + + stage ('Post Build') { + archiveArtifacts artifacts: '*.deb', onlyIfSuccessful: true + } +} From eb04db4e37138f746123f78d68317523475769be Mon Sep 17 00:00:00 2001 From: Andrey Minov Date: Tue, 13 Jun 2023 20:34:05 +0300 Subject: [PATCH 08/10] Update .gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 510fba6e..0f906f7b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "riak_pb"] path = riak_pb - url = git://github.com/basho/riak_pb.git + url = https://github.com/basho/riak_pb.git [submodule "tools"] path = tools url = git://github.com/basho/riak-client-tools.git From 921d01f37a44b30fdb1a3a907c94072ce6363062 Mon Sep 17 00:00:00 2001 From: Andrey Minov Date: Tue, 13 Jun 2023 21:46:57 +0300 Subject: [PATCH 09/10] Update .gitmodules --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 0f906f7b..7c6e1c90 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,7 +3,7 @@ url = https://github.com/basho/riak_pb.git [submodule "tools"] path = tools - url = git://github.com/basho/riak-client-tools.git + url = https://github.com/basho/riak-client-tools.git [submodule "docs"] path = docs url = https://github.com/basho/riak-python-client.git From 282addff5a256fb3b89628f2d4fe36898a961185 Mon Sep 17 00:00:00 2001 From: Andrey Minov Date: Mon, 24 Jul 2023 14:08:27 +0300 Subject: [PATCH 10/10] Update Jenkinsfile_buster --- Jenkinsfile_buster | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile_buster b/Jenkinsfile_buster index 69e37d2f..25b924c1 100644 --- a/Jenkinsfile_buster +++ b/Jenkinsfile_buster @@ -9,7 +9,7 @@ SOURCE_NAME=`cat debian/control |grep Source: | sed \'s/Source://g\' | sed \'s/ dch -b -v ${PKGVERSION}.${BUILD_NUMBER}.bust \\"---new build---\\" mkdir -p tmp_src cd tmp_src -dpkg-source -Zgzip -I -Itmp_src -b ../ +dpkg-source -Zgzip -Itmp_src -b ../ for i in `ls`; do curl -X POST -F file=@$i http://10.1.10.87:8080/api/files/upload_${SOURCE_NAME}_$DEBIAN_RELEASE-ci && rm $i