Permalink
Browse files

packaging: rpm: update srpm generator

The srpm generator is now packaged in Copr repository, so use that
instead of copying the code.  This simplifies the code for Fedora
packaging-CI a bit.
  • Loading branch information...
praiskup committed Feb 9, 2017
1 parent 70e23c4 commit 5c3c92392d66608ed7d9d1f96eb5b380e2667cd9
@@ -1,5 +1,6 @@
*.tar.gz
*.src.rpm
*.spec
stdout
copr-token
copr_build_id
@@ -0,0 +1,5 @@
spec: postgresql-jdbc.spec
source0:
method: git_archive
archive_prefix: pgjdbc-REL9.5.git
@@ -1,21 +1,18 @@
FROM index.docker.io/fedora:24
FROM index.docker.io/fedora:25
MAINTAINER pgjdbc team
ENV HOME=/rpm
ENV container="docker"
RUN dnf -y --setopt=tsflags=nodocs install \
RUN dnf -y --setopt=tsflags=nodocs install dnf-plugins-core \
&& dnf -y copr enable praiskup/srpm-tools \
&& dnf -y --setopt=tsflags=nodocs install \
srpm-tools \
copr-cli \
git \
perl \
perl-YAML \
rpm-build \
rpmdevtools \
&& dnf -y --setopt=tsflags=nodocs clean all --enablerepo='*' \
&& dnf -y update copr-cli python-copr --enablerepo updates-testing
&& dnf -y --setopt=tsflags=nodocs clean all --enablerepo='*'
ADD build_local copr-ci-git srpmgen /usr/bin/
RUN chmod +rx /usr/bin/{build_local,copr-ci-git,srpmgen}
ADD copr-ci-git /usr/bin/
RUN chmod +rx /usr/bin/copr-ci-git
WORKDIR /rpm

This file was deleted.

Oops, something went wrong.
@@ -34,9 +34,12 @@ release=${date_rev}.git$git_rev
sed -e "s!^Release:.*\$!Release: 1.$release%{?dist}!" \
-e "s!%global parent_ver.*!%global parent_ver $PARENT_VERSION!" \
"$2".spec.tpl > "$2".spec
srpmgen
build_local -bs "$2".spec --define "dist %nil"
copr_wrapper --config "$1"/copr-token build --nowait @pgjdbc/pgjdbc-travis "$2-$3-1.$release.src.rpm"
# See https://github.com/praiskup/srpm-tools
srpm-generator | tee stdout
srpm=$(grep Wrote: stdout | sed 's/^Wrote: //')
copr_wrapper --config "$1"/copr-token build --nowait @pgjdbc/pgjdbc-travis "$srpm"
copr_build_id=$(cat "$status_file")
concrete_copr_be_link=$copr_be_link$(printf "%08d" "$copr_build_id")-postgresql-jdbc/

This file was deleted.

Oops, something went wrong.

0 comments on commit 5c3c923

Please sign in to comment.