Re: [PATCH spice-gtk 2/2] Add copr builds integration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Tue, Aug 27, 2019 at 6:27 PM Snir Sheriber <ssheribe@xxxxxxxxxx> wrote:
>
> This will let copr to generate srpm using the .copr/Makefile script

Do we really want to maintain that kind of distro things upstream? Do
we need it?

What does it bring that gitlab CI doesn't have?

>
> Signed-off-by: Snir Sheriber <ssheribe@xxxxxxxxxx>
> ---
>  .copr/Makefile | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 .copr/Makefile
>
> diff --git a/.copr/Makefile b/.copr/Makefile
> new file mode 100644
> index 0000000..db297fb
> --- /dev/null
> +++ b/.copr/Makefile
> @@ -0,0 +1,29 @@
> +# This Makefile script is invoked by copr to build source rpm
> +# See: https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm

When is the build actually triggered? Is copr monitoring the git
repository? Is there a hook somewhere in gitlab to trigger the build?

> +
> +PROTOCOL_GIT_REPO = https://gitlab.freedesktop.org/spice/spice-protocol
> +BUILD = meson gcc xz git rpm-build
> +
> +srpm:
> +       dnf install -y $(BUILD)
> +
> +       # get upstream spice protocol
> +       git clone $(PROTOCOL_GIT_REPO)
> +       cd spice-protocol && meson -Dprefix=/usr/ build && ninja -C build install
> +       rm -rf spice-protocol
> +
> +       # get other dependencies for project excluding spice-protocol
> +       dnf install -y `sed '/^BuildRequires:/!d; s/.*://; s/\bspice-protocol\b//; s/>.*//' *.spec.in`
> +
> +       # do not use commit id for version
> +       git fetch --tags
> +       git describe --abbrev=0 | sed 's/v//' > .tarball-version
> +       # create source rpm
> +       meson --buildtype=release build
> +       # Meson does not update submodules recursively
> +       git submodule update --init --recursive
> +       # this fix an issue with Meson dist
> +       if ! test -r ../spice-common.git; then DIR=`basename "$$PWD"`; ln -s "$$DIR/.git/modules/spice-common" ../spice-common.git; fi
> +       rm -rf meson-dist
> +       ninja -C build dist
> +       rpmbuild -bs ./build/*spec --define "_sourcedir $$PWD/build/meson-dist/" --define "_srcrpmdir $(outdir)"

Too much hacks for my taste here.

> --
> 2.21.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]