postgresql-jdbc.git / summary / log / commit / refs

commit    dcbf70bc071fe9d602f7c87918982b01452da9ba
Author:   Pavel Raiskup <praiskup@redhat.com>
Date:     Fri Jan 19 11:26:37 2018 +0000

    packaging: update Fedora's CI
    
    * update Dockerfile to Fedora 27
    * spec template synced with Fedora Rawhide


.travis/travis_build.sh | 1 + packaging/rpm/.srpmconfig | 1 - packaging/rpm/.srpmgen | 10 ---------- packaging/rpm/fedora-image/Dockerfile | 2 +- packaging/rpm/fedora-image/copr-ci-git | 3 +++ packaging/rpm/postgresql-jdbc.spec.tpl | 16 +++++++--------- packaging/rpm_ci | 4 ++-- 7 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.travis/travis_build.sh b/.travis/travis_build.sh index 2aa0e1bf..57fd97a0 100755 --- a/.travis/travis_build.sh +++ b/.travis/travis_build.sh @@ -6,6 +6,7 @@ then # Try to prevent "stdout: write error" # WA is taken from https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);' + export PROJECT_VERSION=$(mvn -B -N org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\[') export PARENT_VERSION=$(mvn -B -N org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.parent.version | grep -v '\[') exec ./packaging/rpm_ci fi diff --git a/packaging/rpm/.srpmconfig b/packaging/rpm/.srpmconfig index 9cc16bf9..bdc6aceb 100644 --- a/packaging/rpm/.srpmconfig +++ b/packaging/rpm/.srpmconfig @@ -2,4 +2,3 @@ spec: postgresql-jdbc.spec source0: method: git_archive - archive_prefix: pgjdbc-REL9.5.git diff --git a/packaging/rpm/.srpmgen b/packaging/rpm/.srpmgen deleted file mode 100644 index f9af4cb8..00000000 --- a/packaging/rpm/.srpmgen +++ /dev/null @@ -1,10 +0,0 @@ -git: - address: 'https://github.com/pgjdbc/pgjdbc.git' - rpmsources: packaging/rpm - -spec: postgresql-jdbc.spec - -source0: - git_archive: - prefix: pgjdbc-REL9.5.git - tarball_base: REL9.5.git diff --git a/packaging/rpm/fedora-image/Dockerfile b/packaging/rpm/fedora-image/Dockerfile index bc140062..7f24e2e7 100644 --- a/packaging/rpm/fedora-image/Dockerfile +++ b/packaging/rpm/fedora-image/Dockerfile @@ -1,4 +1,4 @@ -FROM index.docker.io/fedora:25 +FROM index.docker.io/fedora:27 MAINTAINER pgjdbc team ENV HOME=/rpm diff --git a/packaging/rpm/fedora-image/copr-ci-git b/packaging/rpm/fedora-image/copr-ci-git index 56a94deb..b9416bc2 100755 --- a/packaging/rpm/fedora-image/copr-ci-git +++ b/packaging/rpm/fedora-image/copr-ci-git @@ -7,6 +7,8 @@ copr_be_link=https://copr-be.cloud.fedoraproject.org/results/@pgjdbc/pgjdbc-trav status_file=copr_build_id test -z "$PARENT_VERSION" && exit 1 +test -z "$PROJECT_VERSION" && exit 1 +PROJECT_VERSION=${PROJECT_VERSION//-/_} copr_wrapper () ( @@ -32,6 +34,7 @@ git_rev=$(git rev-parse --short=7 HEAD) date_rev=$(date +%Y%m%d_%H%M%S) release=${date_rev}.git$git_rev sed -e "s!^Release:.*\$!Release: 1.$release%{?dist}!" \ + -e "s!^Version:.*\$!Version: $PROJECT_VERSION!" \ -e "s!%global parent_ver.*!%global parent_ver $PARENT_VERSION!" \ "$2".spec.tpl > "$2".spec diff --git a/packaging/rpm/postgresql-jdbc.spec.tpl b/packaging/rpm/postgresql-jdbc.spec.tpl index eef41c47..b5988d64 100644 --- a/packaging/rpm/postgresql-jdbc.spec.tpl +++ b/packaging/rpm/postgresql-jdbc.spec.tpl @@ -35,8 +35,6 @@ %global section devel -%global upstreamrel git -%global upstreammajor 9.5 %global source_path pgjdbc/src/main/java/org/postgresql %global parent_ver GENERATED %global parent_poms_builddir ./pgjdbc-parent-poms @@ -46,30 +44,30 @@ Summary: JDBC driver for PostgreSQL Name: postgresql-jdbc -Version: %upstreammajor.%{upstreamrel} +Version: GENERATED Release: GENERATED License: BSD URL: http://jdbc.postgresql.org/ -Source0: REL%{version}.tar.gz +Source0: https://github.com/pgjdbc/pgjdbc/archive/REL%{version}/pgjdbc-REL%{version}.tar.gz # Upstream moved parent pom.xml into separate project (even though there is only # one dependant project on it?). Let's try to not complicate packaging by # having separate spec file for it, too. -Source1: https://github.com/pgjdbc/pgjdbc-parent-poms/archive/REL%parent_ver.tar.gz +Source1: https://github.com/pgjdbc/pgjdbc-parent-poms/archive/REL%parent_ver/pgjdbc-parent-poms-REL%{parent_ver}.tar.gz BuildArch: noarch BuildRequires: java-devel >= 1.8 BuildRequires: maven-local BuildRequires: java-comment-preprocessor BuildRequires: properties-maven-plugin -BuildRequires: maven-clean-plugin BuildRequires: maven-enforcer-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-plugin-build-helper BuildRequires: classloader-leak-test-framework BuildRequires: mvn(com.ongres.scram:client) +BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin) %if %runselftest BuildRequires: postgresql-contrib @@ -102,7 +100,7 @@ This package contains the API Documentation for %{name}. %prep -%setup -c -q -a 1 -n pgjdbc-REL%version +%setup -c -q -a 1 mv pgjdbc-REL%version/* . mv pgjdbc-parent-poms-REL%parent_ver pgjdbc-parent-poms @@ -143,7 +141,7 @@ mkdir -p pgjdbc/target/generated-sources/annotations # Include PostgreSQL testing methods and variables. %if %runselftest -%pgtests_init +%postgresql_tests_init PGTESTS_LOCALE=C.UTF-8 @@ -161,7 +159,7 @@ protocolVersion=0 EOF # Start the local PG cluster. -%pgtests_start +%postgresql_tests_start %else # -f is equal to -Dmaven.test.skip=true opts="-f" diff --git a/packaging/rpm_ci b/packaging/rpm_ci index ad325992..4c6464a5 100755 --- a/packaging/rpm_ci +++ b/packaging/rpm_ci @@ -10,6 +10,6 @@ cd "$(dirname "$0")" echo "$copr_token_password" | gpg --batch --passphrase-fd 0 rpm/copr-token.gpg ) || exit 0 -docker run -e HOME=/git -e PARENT_VERSION \ +docker run -e HOME=/git -e PARENT_VERSION -e PROJECT_VERSION \ -u `id -u` -ti --rm -v `pwd`/..:/git:Z praiskup/copr-and-jdbc-ci \ - copr-ci-git /git/packaging/rpm postgresql-jdbc 9.5.git + copr-ci-git /git/packaging/rpm postgresql-jdbc [parent: 975aaf5ae489]