From b78c7b3c63ea35ba99de0082df32a2af2acb54bd Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 27 Mar 2019 09:58:12 -0400 Subject: [PATCH 1/4] Release libmodulemd 2.x for COPR on EPEL 7 Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 100 ++++++++++++----------------------------------- 1 file changed, 26 insertions(+), 74 deletions(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 88b4a3a..51a540a 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -18,88 +18,59 @@ BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(yaml-0.1) BuildRequires: pkgconfig(gtk-doc) -BuildRequires: python3-devel -BuildRequires: python3-gobject-base +BuildRequires: python36-devel +BuildRequires: python36-gobject-base %ifarch %{valgrind_arches} BuildRequires: valgrind %endif -Obsoletes: python2-modulemd < 1.3.4 -Obsoletes: python3-modulemd < 1.3.4 # Patches + %description C Library for manipulating module metadata files. See https://github.com/fedora-modularity/libmodulemd/blob/master/README.md for more details. -%package -n python3-%{name} -Summary: Python 3 bindings for %{name} +%package -n python2-%{name} +Summary: Python 2 bindings for %{name} BuildArch: noarch Requires: libmodulemd = %{version}-%{release} -Requires: python3-gobject-base +Requires: python-gobject-base +Obsoletes: python2-modulemd < 1.3.4 + +%description -n python2-%{name} +Python 2 bindings for %{name} + + +%package -n python36-%{name} +Summary: Python 3.6 bindings for %{name} +BuildArch: noarch +Requires: libmodulemd = %{version}-%{release} +Requires: python36-gobject-base Obsoletes: python3-modulemd < 1.3.4 -%description -n python3-%{name} -Python 3 bindings for %{name} +%description -n python36-%{name} +Python 3.6 bindings for %{name} %package devel Summary: Development files for libmodulemd Requires: %{name}%{?_isa} = %{version}-%{release} - +Conflicts: libmodulemd1-devel %description devel Development files for libmodulemd. -%package -n libmodulemd1 -Summary: Compatibility package for libmodulemd 1.x -Version: %{libmodulemd_v1_version} -Obsoletes: libmodulemd < 2 -Provides: libmodulemd = %{libmodulemd_v1_version}-%{release} -Provides: libmodulemd%{?_isa} = %{libmodulemd_v1_version}-%{release} - -%description -n libmodulemd1 -Compatibility library for libmodulemd 1.x - - -%package -n libmodulemd1-devel -Summary: Compatibility development package for libmodulemd 1.x -Version: %{libmodulemd_v1_version} -Requires: libmodulemd1%{?_isa} = %{libmodulemd_v1_version}-%{release} -Conflicts: %{name}-devel -Obsoletes: libmodulemd-devel < 2 -Provides: libmodulemd-devel = %{libmodulemd_v1_version}-%{release} -RemovePathPostfixes: .compat - - -%description -n libmodulemd1-devel -Development files for libmodulemd 1.x - - -%package -n python3-libmodulemd1 -Summary: Python 3 bindings for %{name}1 -Version: %{libmodulemd_v1_version} -BuildArch: noarch -Requires: libmodulemd1 = %{libmodulemd_v1_version}-%{release} -Requires: python3-gobject-base - -Obsoletes: python3-libmodulemd < 2 -Provides: python3-libmodulemd = %{libmodulemd_v1_version}-%{release} - -%description -n python3-libmodulemd1 -Python 3 bindings for libmodulemd1 - - %prep %autosetup -p1 -n modulemd-%{libmodulemd_version} %build -%meson -Ddeveloper_build=false -Dbuild_api_v1=true -Dbuild_api_v2=true +%meson -Ddeveloper_build=false -Dbuild_api_v1=false -Dbuild_api_v2=true %meson_build @@ -126,9 +97,6 @@ export MMD_SKIP_VALGRIND=1 %install %meson_install -ln -s libmodulemd.so.%{libmodulemd_v1_version} \ - %{buildroot}%{_libdir}/%{name}.so.compat - %files %license COPYING @@ -151,32 +119,16 @@ ln -s libmodulemd.so.%{libmodulemd_v1_version} \ %{_datadir}/gtk-doc/html/modulemd-2.0/ -%files -n python3-%{name} +%files -n python2-%{name} -%files -n python3-libmodulemd1 +%files -n python36-%{name} -%files -n libmodulemd1 -%license COPYING -%doc README.md -%{_bindir}/modulemd-validator-v1 -%{_libdir}/%{name}.so.1* -%dir %{_libdir}/girepository-1.0 -%{_libdir}/girepository-1.0/Modulemd-1.0.typelib - - -%files -n libmodulemd1-devel -%{_libdir}/%{name}.so.compat -%{_libdir}/pkgconfig/modulemd.pc -%{_includedir}/modulemd/ -%dir %{_datadir}/gir-1.0 -%{_datadir}/gir-1.0/Modulemd-1.0.gir -%dir %{_datadir}/gtk-doc -%dir %{_datadir}/gtk-doc/html -%{_datadir}/gtk-doc/html/modulemd-1.0/ - %changelog +* Wed Mar 27 2019 Stephen Gallagher - 2.2.1-1 +- Release libmodulemd 2.x for COPR on EPEL 7 + * Tue Mar 26 2019 Stephen Gallagher - 2.2.1-1 - Update to libmodulemd 2.2.1 - Fixes builds on i686 From 3c389d6897308b5e03297f8113bd84a0a7daa4df Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 1 Apr 2019 14:18:22 -0400 Subject: [PATCH 2/4] Add py2 overrides flag Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index 14a84e8..c67a5e1 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -70,7 +70,7 @@ Development files for libmodulemd. %build -%meson -Ddeveloper_build=false -Dbuild_api_v1=false -Dbuild_api_v2=true +%meson -Ddeveloper_build=false -Dbuild_api_v1=false -Dbuild_api_v2=true -Dwith_py2_overrides=true %meson_build From aeeeaab6253105d655a256db928d0be78096bf0f Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 23 Apr 2019 10:14:27 -0400 Subject: [PATCH 3/4] Disable tests for now Signed-off-by: Stephen Gallagher --- libmodulemd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmodulemd.spec b/libmodulemd.spec index b840d84..43a1af3 100644 --- a/libmodulemd.spec +++ b/libmodulemd.spec @@ -92,7 +92,10 @@ export MMD_SKIP_VALGRIND=1 # Don't run tests on ARM for now. There are problems with # performance on the builders and often these time out. %ifnarch %{arm} aarch64 -%meson_test + +# Temporarily disable tests on EPEL 7 builds because they're timing out in +# COPR +# %%meson_test %endif From 9fd2f62c6528b848660a4ec1e16fcf3627ee53c2 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 13 May 2019 10:31:14 -0400 Subject: [PATCH 4/4] Add script to build for Fedora Infrastructure Signed-off-by: Stephen Gallagher --- build-infra.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 build-infra.sh diff --git a/build-infra.sh b/build-infra.sh new file mode 100755 index 0000000..6da3297 --- /dev/null +++ b/build-infra.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +VERSION=$(rpm -q --specfile --qf='%{version}\n' $SCRIPT_DIR/libmodulemd.spec | head -n1) +RELEASE=$(rpm -q --define 'dist .el7.infra' --specfile --qf='%{release}\n' $SCRIPT_DIR/libmodulemd.spec | head -n1) + +rpmbuild --define "_sourcedir $SCRIPT_DIR" \ + --define "_specdir $SCRIPT_DIR" \ + --define "_builddir $SCRIPT_DIR" \ + --define "_srcrpmdir $SCRIPT_DIR" \ + --define "_rpmdir $SCRIPT_DIR" \ + --define 'dist .el7.infra' \ + --define 'rhel 7' \ + --eval '%undefine fedora' \ + --define 'el7 1' \ + --eval '%undefine fc30' \ + --nodeps \ + -bs \ + $SCRIPT_DIR/libmodulemd.spec + +if [ -f $SCRIPT_DIR/libmodulemd-$VERSION-$RELEASE.src.rpm ]; then + koji build epel7-infra $SCRIPT_DIR/libmodulemd-$VERSION-$RELEASE.src.rpm +else + echo "Missing $SCRIPT_DIR/libmodulemd-$VERSION-$RELEASE.src.rpm" +fi +