Merge pull request #114 from ivaradi/debian-build

Moved Debian build to Drone
This commit is contained in:
Roeland Jago Douma 2018-02-06 08:18:00 +01:00 committed by GitHub
commit 0743c63c81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 163 additions and 259 deletions

View file

@ -1,7 +1,7 @@
clone:
git:
image: plugins/git
depth: 1
tags: true
pipeline:
qt-5.7:
@ -88,6 +88,15 @@ pipeline:
matrix:
BUILD: AppImage
Debian:
image: nextcloudci/client-debian-ci:client-debian-ci-2
commands:
- /bin/bash -c "./admin/linux/debian/drone-build.sh"
secrets: [ DEBIAN_SECRET_KEY, DEBIAN_SECRET_IV ]
when:
matrix:
BUILD: Debian
documentation:
image: nextcloudci/documentation:documentation-5
commands:
@ -103,6 +112,7 @@ matrix:
- TESTS: qt-5.8
- TESTS: qt-5.9
- BUILD: AppImage
- BUILD: Debian
- TESTS: documentation
branches: [ master, 2.* ]

View file

@ -1,38 +0,0 @@
os: linux
dist: trusty
sudo: required
language: generic
services:
- docker
env:
matrix:
- BUILD_TYPE=debian
before_install:
- admin/linux/travis-build.sh before_install
install:
- admin/linux/travis-build.sh install
before_script:
- admin/linux/travis-build.sh before_script
script:
- admin/linux/travis-build.sh script
after_success:
- admin/linux/travis-build.sh after_success
deploy:
- provider: script
skip_cleanup: true
script: admin/linux/travis-build.sh ppa_deploy
on:
condition: ($BUILD_TYPE = debian)
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/

View file

@ -1,22 +1,22 @@
nextcloud-client (2.3.3-1.0~zesty1) zesty; urgency=medium
nextcloud-client (2.3.3-1.0~bionic1) bionic; urgency=medium
* Debian build support for the forked client.
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
nextcloud-client (2.3.1-1.0~zesty1) zesty; urgency=medium
nextcloud-client (2.3.1-1.0~bionic1) bionic; urgency=medium
* New upstream version
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
nextcloud-client (2.3.0-1.0~zesty1) zesty; urgency=medium
nextcloud-client (2.3.0-1.0~bionic1) bionic; urgency=medium
* New upstream version
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
nextcloud-client (2.2.4-1.4~zesty1) zesty; urgency=medium
nextcloud-client (2.2.4-1.4~bionic1) bionic; urgency=medium
* The locale-specific icon names are correct too

View file

@ -0,0 +1,13 @@
Binary files nextcloud-client-2.4.0.orig/.git/index and nextcloud-client-2.4.0/.git/index differ
diff -ruN nextcloud-client-2.4.0.orig/src/CMakeLists.txt nextcloud-client-2.4.0/src/CMakeLists.txt
--- nextcloud-client-2.4.0.orig/src/CMakeLists.txt 2018-02-01 19:16:38.461162563 +0100
+++ nextcloud-client-2.4.0/src/CMakeLists.txt 2018-02-01 19:20:20.253824030 +0100
@@ -4,7 +4,7 @@
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
-find_package(Qt5 5.6 COMPONENTS Core Network Xml Concurrent REQUIRED)
+find_package(Qt5 5.5 COMPONENTS Core Network Xml Concurrent REQUIRED)
if (Qt5Core_VERSION VERSION_LESS 5.9.0)
message(STATUS "For HTTP/2 support, compile with Qt 5.9 or higher.")
endif()

View file

@ -1,48 +0,0 @@
nextcloud-client (2.3.3-1.0~yakkety1) yakkety; urgency=medium
* Debian build support for the forked client.
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
nextcloud-client (2.3.1-1.0~yakkety1) yakkety; urgency=medium
* New upstream version
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
nextcloud-client (2.3.0-1.0~yakkety1) yakkety; urgency=medium
* New upstream version
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
nextcloud-client (2.2.4-1.4~yakkety1) yakkety; urgency=medium
* The locale-specific icon names are correct too
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
nextcloud-client (2.2.4-1.3~yakkety1) yakkety; urgency=medium
* Caja syncstate plugin is built.
* The syncstate plugin has application-specific name
-- István Váradi <ivaradi@varadiistvan.hu> Fri, 27 Jan 2017 19:34:18 +0100
nextcloud-client (2.2.4-1.2~yakkety1) yakkety; urgency=medium
* Fixed appname in the Nemo syncstate extension.
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 19 Jan 2017 16:46:50 +0100
nextcloud-client (2.2.4-1.1~yakkety1) yakkety; urgency=medium
* Added Nautilus and Nemo syncstate extensions.
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 17 Jan 2017 19:55:32 +0100
nextcloud-client (2.2.4-1.0~yakkety1) yakkety; urgency=medium
* Initial release.
-- István Váradi <ivaradi@varadiistvan.hu> Wed, 14 Dec 2016 20:07:46 +0100

View file

@ -1,4 +0,0 @@
usr/lib/*/libnextclouddolphinpluginhelper.so
usr/lib/*/qt5/plugins/kf5/overlayicon/nextclouddolphinoverlayplugin.so
usr/lib/*/qt5/plugins/nextclouddolphinactionplugin.so
usr/share/kservices5/nextclouddolphinactionplugin.desktop

124
admin/linux/debian/drone-build.sh Executable file
View file

@ -0,0 +1,124 @@
#!/bin/bash
set -xe
shopt -s extglob
PPA=ppa:nextcloud-devs/client-alpha
PPA_BETA=ppa:nextcloud-devs/client-beta
OBS_PROJECT=home:ivaradi:alpha
OBS_PROJECT_BETA=home:ivaradi:beta
OBS_PACKAGE=nextcloud-client
pull_request=${DRONE_PULL_REQUEST:=master}
if test -z "${DRONE_WORKSPACE}"; then
DRONE_WORKSPACE=`pwd`
fi
if test -z "${DRONE_DIR}"; then
DRONE_DIR=`dirname ${DRONE_WORKSPACE}`
fi
set +x
if test "$DEBIAN_SECRET_KEY" -a "$DEBIAN_SECRET_IV"; then
openssl aes-256-cbc -K $DEBIAN_SECRET_KEY -iv $DEBIAN_SECRET_IV -in admin/linux/debian/signing-key.txt.enc -d | gpg --import
openssl aes-256-cbc -K $DEBIAN_SECRET_KEY -iv $DEBIAN_SECRET_IV -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
touch ~/.has_ppa_keys
fi
set -x
cd "${DRONE_WORKSPACE}"
read basever kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
cd "${DRONE_DIR}"
echo "$kind" > kind
kind="release"
if test "$kind" = "beta"; then
repo=nextcloud-devs/client-beta
else
repo=nextcloud-devs/client-alpha
fi
origsourceopt=""
if ! wget http://ppa.launchpad.net/${repo}/ubuntu/pool/main/n/nextcloud-client/nextcloud-client_${basever}.orig.tar.bz2; then
cp -a ${DRONE_WORKSPACE} nextcloud-client_${basever}
tar cjf nextcloud-client_${basever}.orig.tar.bz2 --exclude .git nextcloud-client_${basever}
origsourceopt="-sa"
fi
for distribution in xenial artful bionic stable; do
rm -rf nextcloud-client_${basever}
cp -a ${DRONE_WORKSPACE} nextcloud-client_${basever}
cd nextcloud-client_${basever}
cp -a admin/linux/debian/debian .
if test -d admin/linux/debian/debian.${distribution}; then
tar cf - -C admin/linux/debian/debian.${distribution} . | tar xf - -C debian
fi
admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog ${distribution}
cp /tmp/tmpchangelog debian/changelog
if test -f admin/linux/debian/debian.${distribution}/changelog; then
cat admin/linux/debian/debian.${distribution}/changelog >> debian/changelog
else
cat admin/linux/debian/debian/changelog >> debian/changelog
fi
for p in debian/post-patches/*.patch; do
if test -f "${p}"; then
echo "Applying ${p}"
patch -p1 < "${p}"
fi
done
fullver=`head -1 debian/changelog | sed "s:nextcloud-client (\([^)]*\)).*:\1:"`
EDITOR=true dpkg-source --commit . local-changes
dpkg-source --build .
dpkg-genchanges -S ${origsourceopt} > "../nextcloud-client_${fullver}_source.changes"
if test -f ~/.has_ppa_keys; then
debsign -k7D14AA7B -S
fi
cd ..
done
if test "${pull_request}" = "master"; then
kind=`cat kind`
if test "$kind" = "beta"; then
PPA=$PPA_BETA
OBS_PROJECT=$OBS_PROJECT_BETA
fi
OBS_SUBDIR="${OBS_PROJECT}/${OBS_PACKAGE}"
if test -f ~/.has_ppa_keys; then
for changes in nextcloud-client_*~+([a-z])1_source.changes; do
dput $PPA $changes > /dev/null
done
mkdir osc
cd osc
osc co ${OBS_PROJECT} ${OBS_PACKAGE}
if test "$(ls ${OBS_SUBDIR})"; then
osc delete ${OBS_SUBDIR}/*
fi
cp ../nextcloud-client*.orig.tar.* ${OBS_SUBDIR}/
cp ../nextcloud-client_*[0-9.][0-9].dsc ${OBS_SUBDIR}/
cp ../nextcloud-client_*[0-9.][0-9].debian.tar* ${OBS_SUBDIR}/
cp ../nextcloud-client_*[0-9.][0-9]_source.changes ${OBS_SUBDIR}/
osc add ${OBS_SUBDIR}/*
cd ${OBS_SUBDIR}
osc commit -m "Travis update"
fi
fi

View file

@ -75,6 +75,15 @@ if test -d "${scriptdir}/../debian.${distribution}"; then
tar cf - -C "${scriptdir}/../debian.${distribution}" . | tar xf - -C "${packagedir}/debian"
fi
pushd "${packagedir}"
for p in debian/post-patches/*.patch; do
if test -f "${p}"; then
echo "Applying ${p}"
patch -p1 < "${p}"
fi
done
popd
"${scriptdir}/git2changelog.py" /tmp/git2changelog "${distribution}"
mv "${packagedir}/debian/changelog" "${packagedir}/debian/changelog.old"
cat /tmp/git2changelog "${packagedir}/debian/changelog.old" > "${packagedir}/debian/changelog"

View file

@ -4,5 +4,5 @@
# accross to the main repo for a pull request, so
# some hacking is needed
[versionhack]
#commit = 30986d6
#tag = v2.3.3-beta
commit = bc7e65b39552ac458b2adacf76cbf98735ec29a0
tag = v2.4.0-beta

View file

@ -1,143 +0,0 @@
#!/bin/bash
set -xe
shopt -s extglob
TRAVIS_BUILD_STEP="$1"
PPA=ppa:nextcloud-devs/client-alpha
PPA_BETA=ppa:nextcloud-devs/client-beta
OBS_PROJECT=home:ivaradi:alpha
OBS_PROJECT_BETA=home:ivaradi:beta
OBS_PACKAGE=nextcloud-client
if [ "$TRAVIS_BUILD_STEP" == "install" ]; then
sudo apt-get update -q
sudo apt-get install -y devscripts cdbs osc
if test "$encrypted_585e03da75ed_key" -a "$encrypted_585e03da75ed_iv"; then
openssl aes-256-cbc -K $encrypted_585e03da75ed_key -iv $encrypted_585e03da75ed_iv -in admin/linux/debian/signing-key.txt.enc -d | gpg --import
echo "DEBUILD_DPKG_BUILDPACKAGE_OPTS='-k7D14AA7B'" >> ~/.devscripts
openssl aes-256-cbc -K $encrypted_585e03da75ed_key -iv $encrypted_585e03da75ed_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
touch ~/.has_ppa_keys
elif test "$encrypted_8da7a4416c7a_key" -a "$encrypted_8da7a4416c7a_iv"; then
openssl aes-256-cbc -K $encrypted_8da7a4416c7a_key -iv $encrypted_8da7a4416c7a_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
PPA=ppa:ivaradi/nextcloud-client-exp
elif test "$encrypted_c5306c5c5331_key" -a "$encrypted_c5306c5c5331_key"; then
openssl aes-256-cbc -K $encrypted_c5306c5c5331_key -iv $encrypted_c5306c5c5331_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
PPA=ppa:ivaradi/nextcloud-client-exp
elif test "$encrypted_5dafbd038603_key" -a "$encrypted_5dafbd038603_iv"; then
openssl aes-256-cbc -K $encrypted_5dafbd038603_key -iv $encrypted_5dafbd038603_iv -in admin/linux/debian/signing-key.txt.enc -d | gpg --import
echo "DEBUILD_DPKG_BUILDPACKAGE_OPTS='-k7D14AA7B'" >> ~/.devscripts
openssl aes-256-cbc -K $encrypted_5dafbd038603_key -iv $encrypted_5dafbd038603_iv -in admin/linux/debian/oscrc.enc -out ~/.oscrc -d
touch ~/.has_ppa_keys
fi
elif [ "$TRAVIS_BUILD_STEP" == "script" ]; then
read basever kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
cd ..
echo "$kind" > kind
kind="release"
if test "$encrypted_5dafbd038603_key" -a "$encrypted_5dafbd038603_iv"; then
repo=ivaradi/nextcloud-client-exp
else
if test "$kind" = "beta"; then
repo=nextcloud-devs/client-beta
else
repo=nextcloud-devs/client-alpha
fi
fi
if test -d nextcloud.client; then
gitdir="nextcloud.client"
else
gitdir="client"
fi
origsourceopt=""
if ! wget http://ppa.launchpad.net/${repo}/ubuntu/pool/main/n/nextcloud-client/nextcloud-client_${basever}.orig.tar.bz2; then
mv ${gitdir} nextcloud-client_${basever}
tar cjf nextcloud-client_${basever}.orig.tar.bz2 --exclude .git nextcloud-client_${basever}
mv nextcloud-client_${basever} ${gitdir}
origsourceopt="-sa"
fi
for distribution in xenial zesty artful stable; do
rm -rf nextcloud-client_${basever}
cp -a ${gitdir} nextcloud-client_${basever}
cd nextcloud-client_${basever}
cp -a admin/linux/debian/debian .
if test -d admin/linux/debian/debian.${distribution}; then
tar cf - -C admin/linux/debian/debian.${distribution} . | tar xf - -C debian
fi
admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog ${distribution}
cp /tmp/tmpchangelog debian/changelog
if test -f admin/linux/debian/debian.${distribution}/changelog; then
cat admin/linux/debian/debian.${distribution}/changelog >> debian/changelog
else
cat admin/linux/debian/debian/changelog >> debian/changelog
fi
EDITOR=true dpkg-source --commit . local-changes
if test -f ~/.has_ppa_keys; then
debuild -S ${origsourceopt}
else
debuild -S ${origsourceopt} -us -uc
fi
cd ..
done
elif [ "$TRAVIS_BUILD_STEP" == "ppa_deploy" ]; then
cd ..
kind=`cat kind`
if test "$encrypted_5dafbd038603_key" -a "$encrypted_5dafbd038603_iv"; then
PPA=ppa:ivaradi/nextcloud-client-exp
fi
echo "kind: $kind"
if test "$kind" = "beta"; then
PPA=$PPA_BETA
OBS_PROJECT=$OBS_PROJECT_BETA
fi
OBS_SUBDIR="${OBS_PROJECT}/${OBS_PACKAGE}"
if test -f ~/.has_ppa_keys; then
for changes in nextcloud-client_*~+([a-z])1_source.changes; do
dput $PPA $changes > /dev/null
done
fi
mkdir osc
cd osc
osc co ${OBS_PROJECT} ${OBS_PACKAGE}
if test "$(ls ${OBS_SUBDIR})"; then
osc delete ${OBS_SUBDIR}/*
fi
cp ../nextcloud-client*.orig.tar.* ${OBS_SUBDIR}/
cp ../nextcloud-client_*[0-9.][0-9].dsc ${OBS_SUBDIR}/
cp ../nextcloud-client_*[0-9.][0-9].debian.tar* ${OBS_SUBDIR}/
cp ../nextcloud-client_*[0-9.][0-9]_source.changes ${OBS_SUBDIR}/
osc add ${OBS_SUBDIR}/*
cd ${OBS_SUBDIR}
osc commit -m "Travis update"
fi

View file

@ -1,19 +0,0 @@
#!/bin/bash
# Copyright (C) 2017 Marco Trevisan
set -xe
TRAVIS_BUILD_STEP="$1"
THIS_PATH=$(dirname $0)
if [ -z "$TRAVIS_BUILD_STEP" ]; then
echo "No travis build step defined"
exit 0
fi
if [ "$BUILD_TYPE" == "debian" ]; then
admin/linux/debian/travis-build.sh "$@"
else
echo 'No $BUILD_TYPE defined'
exit 1
fi