Merge branch 'jenkins'
Conflicts: javapackages-tools.spec
This commit is contained in:
commit
c30570bc47
58
build.bash
Normal file
58
build.bash
Normal file
@ -0,0 +1,58 @@
|
||||
#!/bin/bash -ex
|
||||
|
||||
resultdir="/var/lib/mock/javapackages-rawhide/result/"
|
||||
|
||||
# create directories
|
||||
repo=RPM/latest/
|
||||
[[ ! -d ${repo} ]] && mkdir -p ${repo}
|
||||
|
||||
# update version and release tag in spec file
|
||||
version=`sed 's/-SNAPSHOT//' VERSION`
|
||||
release=$(git describe --match="[^(jenkins)].*" --tags | sed 's/[^-]*-/0./;s/-/./;s/g/git/')
|
||||
sed -i "s/^Version:\s\+[0-9.]*$/Version: ${version}/" javapackages-tools.spec
|
||||
sed -i "s/^Release:\s\+[0-9.]*%{?dist}$/Release: ${release}/" javapackages-tools.spec
|
||||
|
||||
# make tarball
|
||||
git archive -v --prefix=javapackages-${version}/ HEAD | xz > javapackages-${version}.tar.xz
|
||||
|
||||
# print root.log and build.log in case of failure
|
||||
trap "cat ${resultdir}/root.log | tail -30; cat ${resultdir}/build.log || :" 0
|
||||
|
||||
# crate srpm
|
||||
rm -f SRPMS/*
|
||||
rpmbuild -bs --clean --define "_topdir `pwd`" --define "_sourcedir `pwd`" javapackages-tools.spec
|
||||
|
||||
# build RPM with custom mock config
|
||||
rm -Rf ${resultdir}/*
|
||||
mock -r ../..$PWD/fedora-rawhide-x86_64 SRPMS/*.src.rpm
|
||||
|
||||
# get nosetests results
|
||||
mock -r ../..$PWD/fedora-rawhide-x86_64 --copyout /builddir/build/BUILD/javapackages-${version}/test/nosetests.xml .
|
||||
|
||||
# remove unneeded stuff
|
||||
rm -f javapackages-*.tar.xz
|
||||
|
||||
last_bn=`grep "Build number" ${repo}/info.log | awk '{ print $3 }'`
|
||||
if [ -n "${last_bn}" ]; then
|
||||
mkdir -p RPM/${last_bn}
|
||||
mv ${repo}/* RPM/${last_bn}
|
||||
|
||||
# we only want keep RPMs from last 10 builds
|
||||
blist=`find ./RPM/ -maxdepth 1 -name "[0-9]*"`
|
||||
for bn in $blist; do
|
||||
if [ `basename $bn` -lt `expr $last_bn - 10` ]; then
|
||||
rm -Rf $bn
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# copy resulting RPMs to RPM/latest
|
||||
cp ${resultdir}/* ${repo}
|
||||
|
||||
tail -n 50 ${resultdir}/build.log
|
||||
|
||||
createrepo ${repo}
|
||||
|
||||
# store current build number into the file
|
||||
echo "Build number: $BUILD_NUMBER" >> ${repo}/info.log
|
||||
|
37
fedora-rawhide-x86_64.cfg
Normal file
37
fedora-rawhide-x86_64.cfg
Normal file
@ -0,0 +1,37 @@
|
||||
config_opts['root'] = 'javapackages-rawhide'
|
||||
config_opts['target_arch'] = 'x86_64'
|
||||
config_opts['legal_host_arches'] = ('x86_64',)
|
||||
config_opts['chroot_setup_cmd'] = 'install @buildsys-build PyXB asciidoc dia python-formencode python-lxml python-nose python-setuptools python2-devel scl-utils-build xmlto'
|
||||
config_opts['dist'] = 'rawhide' # only useful for --resultdir variable subst
|
||||
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
|
||||
config_opts['releasever'] = '21'
|
||||
|
||||
config_opts['yum.conf'] = """
|
||||
[main]
|
||||
logfile=/var/log/yum.log
|
||||
retries=20
|
||||
gpgcheck=0
|
||||
assumeyes=1
|
||||
syslog_ident=mock
|
||||
syslog_device=
|
||||
metadata_expire=600
|
||||
mirrorlist_expire=600
|
||||
debuglevel=2
|
||||
|
||||
[mock-rawhide]
|
||||
name=mock-rawhide
|
||||
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=x86_64
|
||||
failovermethod=priority
|
||||
cost=1000
|
||||
|
||||
[mock-koji]
|
||||
name=mock-koji
|
||||
baseurl=http://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/
|
||||
cost=2000
|
||||
|
||||
[mock-override]
|
||||
name=mock-override
|
||||
baseurl=http://people.redhat.com/~mizdebsk/jenkins-extra-repo/
|
||||
gpgcheck=0
|
||||
cost=500
|
||||
"""
|
@ -1,6 +1,6 @@
|
||||
Name: javapackages-tools
|
||||
Version: 3.5.0
|
||||
Release: 9%{?dist}
|
||||
Version: 4.0.0
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: Macros and scripts for Java packaging support
|
||||
|
||||
@ -8,20 +8,8 @@ License: BSD
|
||||
URL: https://fedorahosted.org/javapackages/
|
||||
Source0: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
|
||||
|
||||
# Add support for installing Maven artifacts with .hpi extension
|
||||
Patch0: 0001-Add-support-for-installing-hpi.patch
|
||||
|
||||
Patch1: 0001-depgenerators-Switch-to-require-java-headless-instea.patch
|
||||
Patch2: 0002-test-Fix-testsuite-for-java-headless-change.patch
|
||||
|
||||
Patch3: 0003-macros-Fix-add_maven_depmap-for-SCL-usage.patch
|
||||
Patch4: 0004-macros-Fix-xmvn-install-for-SCL-usage.patch
|
||||
|
||||
Patch5: 0001-generate-correct-requires-on-poms.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: python-lxml
|
||||
@ -30,6 +18,8 @@ BuildRequires: python-setuptools
|
||||
BuildRequires: python-formencode
|
||||
BuildRequires: scl-utils-build
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: dia
|
||||
BuildRequires: PyXB >= 1.2.3
|
||||
|
||||
Requires: coreutils
|
||||
Requires: libxslt
|
||||
@ -40,21 +30,21 @@ Requires: python-javapackages = %{version}-%{release}
|
||||
Provides: jpackage-utils = %{version}-%{release}
|
||||
Obsoletes: jpackage-utils < %{version}-%{release}
|
||||
|
||||
# Workaround for rhbz#1091385
|
||||
Provides: mvn(com.sun:tools)
|
||||
Provides: mvn(sun.jdk:jconsole)
|
||||
|
||||
%description
|
||||
This package provides macros and scripts to support Java packaging.
|
||||
|
||||
%package -n maven-local
|
||||
Summary: Macros and scripts for Maven packaging support
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: javapackages-local = %{version}-%{release}
|
||||
Requires: maven
|
||||
Requires: xmvn >= 1.0.0-0.1
|
||||
# We want to use OpenJDK 8 for building packages as it is default
|
||||
# implementation used in Fedora. Due to YUM bugs and limitations,
|
||||
# sometimes Java 7 may be installed alone. To workaround this
|
||||
# maven-local explicitly requires version 8 of OpenJDK. (If needed
|
||||
# Maven can still work with Java 7, but this needs to be enabled
|
||||
# explicitly in the spec file.)
|
||||
Requires: java-1.8.0-openjdk-devel >= 1:1.8
|
||||
Requires: xmvn >= 2
|
||||
Requires: xmvn-mojo >= 2
|
||||
Requires: xmvn-connector-aether >= 2
|
||||
# POM files needed by maven itself
|
||||
Requires: apache-commons-parent
|
||||
Requires: apache-parent
|
||||
@ -92,14 +82,9 @@ This package provides macros and scripts to support packaging Maven artifacts.
|
||||
%package -n ivy-local
|
||||
Summary: Local mode for Apache Ivy
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: javapackages-local = %{version}-%{release}
|
||||
Requires: apache-ivy >= 2.3.0-8
|
||||
Requires: guava
|
||||
Requires: maven
|
||||
Requires: plexus-classworlds
|
||||
Requires: plexus-containers-container-default
|
||||
Requires: plexus-utils
|
||||
Requires: xbean
|
||||
Requires: xmvn >= 1.5
|
||||
Requires: xmvn-connector-ivy >= 2
|
||||
|
||||
%description -n ivy-local
|
||||
This package implements local mode fow Apache Ivy, which allows
|
||||
@ -107,6 +92,7 @@ artifact resolution using XMvn resolver.
|
||||
|
||||
%package -n python-javapackages
|
||||
Summary: Module for handling various files for Java packaging
|
||||
Requires: PyXB >= 1.2.3
|
||||
Requires: python-lxml
|
||||
|
||||
%description -n python-javapackages
|
||||
@ -121,18 +107,32 @@ Requires: fedora-review
|
||||
%description -n fedora-review-plugin-java
|
||||
%{summary}.
|
||||
|
||||
%package doc
|
||||
Summary: Guide for Java packaging
|
||||
|
||||
%description doc
|
||||
User guide for Java packaging and using utilities from javapackages-tools
|
||||
|
||||
%package -n javapackages-local
|
||||
Summary: Non-essential macros and scripts for Java packaging support
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: xmvn-install >= 2
|
||||
Requires: xmvn-subst >= 2
|
||||
Requires: xmvn-resolve >= 2
|
||||
# We want to use OpenJDK 8 for building packages as it is default
|
||||
# implementation used in Fedora. Due to YUM bugs and limitations,
|
||||
# sometimes Java 7 may be installed alone. To workaround this
|
||||
# maven-local explicitly requires version 8 of OpenJDK. (If needed
|
||||
# Maven can still work with Java 7, but this needs to be enabled
|
||||
# explicitly in the spec file.)
|
||||
Requires: java-1.8.0-openjdk-devel >= 1:1.8
|
||||
|
||||
%description -n javapackages-local
|
||||
This package provides non-essential macros and scripts to support Java packaging.
|
||||
|
||||
%prep
|
||||
%setup -q -n javapackages-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
./build
|
||||
@ -152,10 +152,11 @@ popd
|
||||
./check
|
||||
|
||||
|
||||
|
||||
%files -f files-common
|
||||
%doc LICENSE
|
||||
|
||||
%files -n javapackages-local -f files-local
|
||||
|
||||
%files -n maven-local -f files-maven
|
||||
|
||||
%files -n ivy-local -f files-ivy
|
||||
@ -167,8 +168,13 @@ popd
|
||||
%files -n fedora-review-plugin-java
|
||||
%{_datadir}/fedora-review/plugins/*
|
||||
|
||||
%files doc -f files-doc
|
||||
%doc LICENSE
|
||||
|
||||
%changelog
|
||||
* Thu May 29 2014 Michal Srb <msrb@redhat.com> - 4.0.0-1
|
||||
- Update to 4.0.0
|
||||
|
||||
* Wed May 28 2014 Michal Srb <msrb@redhat.com> - 3.5.0-9
|
||||
- Apply the patch from my previous commit
|
||||
|
||||
@ -181,6 +187,9 @@ popd
|
||||
* Wed Apr 16 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.0-6
|
||||
- Add explicit maven-local requires on java-1.8.0-openjdk-devel
|
||||
|
||||
* Thu Mar 27 2014 Michael Simacek <msimacek@redhat.com> - 3.5.0-6
|
||||
- Install documentation
|
||||
|
||||
* Mon Feb 24 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.5.0-5
|
||||
- Backport java-headless patches
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user