Skip to content

adding CI workflow for creating mpv binary and debian .deb package #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

ilkermeliksitki
Copy link

Currently, the workflow is only running on ubuntu-24.04.

  • a working mpv binary file is gotten
  • a debian package is created

During the creation of .deb package, libgnutls-dev couldn't be located and instead the other alternative libgnutls28-dev is used. I am not sure, but maybe we can delete it from the dependencies inside the debian/control file.

Changes to be committed:
	new file:   build_mpv_binary.yml
1- change the name of the workflow
2- change the branch name from main to master
3- add workflow_dispatch

Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_mpv_binary.yml
Changes to be committed:
	renamed:    build_mpv_binary.yml -> build_mpv_binary_and_deb_package.yml
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
@sfan5
Copy link
Member

sfan5 commented Dec 18, 2024

Can I see the workflow in action somewhere?

ilkermeliksitki and others added 3 commits December 18, 2024 17:12
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
@ilkermeliksitki
Copy link
Author

Can I see the workflow in action somewhere?

@sfan5 I guess you should be able to see the logs here.

Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
While building the package, by using equivs-build and debian/control
file, I got the following error:

```
root@a625b7a1de7c:/mpv-build# equivs-build --full debian/control
dpkg-buildpackage: info: source package mpv
dpkg-buildpackage: info: source version 1.0
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Kevin Mitchell <[email protected]>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 debian/rules clean
dh clean
dh: error: Please specify the compatibility level in debian/compat or via Build-Depends: debhelper-compat (= X)
make: *** [debian/rules:3: clean] Error 255
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2
Error in the build process: exit status 2
```
Based on the error message, I replaced debian/compat with
debhelper-compate (= 12) in debian/control file. The existing
compat file didn't help to build the package.

[Reference](FooBarWidget/debian-packaging-for-the-modern-developer#8 (comment))

Changes to be committed:
      deleted:    compat
      modified:   control
@wsldankers
Copy link
Contributor

wsldankers commented Dec 18, 2024

In general, is it useful to build mpv twice, once separately and once as a package? Building the package already exercises the build scripts. We could drop the first two steps and if we want to run mpv --version we could just install the resulting .deb file.

@avih
Copy link
Member

avih commented Dec 18, 2024

Can you please clarify the goal of this PR?

Is it to test that a normal build works, and also the debian packging works?

Or maybe only one of those?

Is it supposed to produce an artifact which debian users can install?

Something else?

@ilkermeliksitki
Copy link
Author

@avih My aim is to create a workflow that does:

  1. one that just runs the scripts: we should get a functioning mpv binary
  2. one that invokes the debian packaging stuff: we should get a deb package

Here is the original reference given by @sfan5.

This reverts commit a664c8d.

Changes to be committed:
	new file:   debian/compat
	modified:   debian/control
1. installation step is deleted during binary building
2. building `.deb` package is moved to `build_debian_package.yml`
3. `build_mpv_binary_and_deb_package.yml` is renamed to `build_debian_package.yml`
Changes to be committed:
      renamed:    build_mpv_binary_and_deb_package.yml -> build_debian_package.yml
      new file:   build_mpv_binary.yml
Changes to be committed:
	modified:   build_debian_package.yml
Changes to be committed:
	modified:   build_debian_package.yml
Changes to be committed:
	modified:   build_debian_package.yml
@sfan5 sfan5 self-requested a review February 23, 2025 12:13
Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise, where can I see them in action?

Changes to be committed:
	modified:   build_debian_package.yml
Changes to be committed:
	modified:   build_debian_package.yml
during the build procedure, the following error was encountered:

```
...
 [303/307] Compiling C object libmpv.so.2.5.0.p/video_out_vo_vdpau.c.o
[304/307] Linking target libmpv.so.2.5.0
FAILED: libmpv.so.2.5.0
cc  -o libmpv.so.2.5.0 libmpv.so.2.5.0.p/audio_aframe.c.o libmpv.so.2.5.0.p/audio_chmap.c.o libmpv.so.2.5.0.p/audio_chmap_avchannel.c.o libmpv.so.2.5.0.p/audio_chmap_sel.c.o libmpv.so.2.5.0.p/audio_decode_ad_lavc.c.o libmpv.so.2.5.0.p/audio_decode_ad_spdif.c.o libmpv.so.2.5.0.p/audio_filter_af_drop.c.o libmpv.so.2.5.0.p/audio_filter_af_format.c.o libmpv.so.2.5.0.p/audio_filter_af_lavcac3enc.c.o libmpv.so.2.5.0.p/audio_filter_af_scaletempo.c.o libmpv.so.2.5.0.p/audio_filter_af_scaletempo2.c.o libmpv.so.2.5.0.p/audio_filter_af_scaletempo2_internals.c.o libmpv.so.2.5.0.p/audio_fmt-conversion.c.o libmpv.so.2.5.0.p/audio_format.c.o libmpv.so.2.5.0.p/audio_out_ao.c.o libmpv.so.2.5.0.p/audio_out_ao_lavc.c.o libmpv.so.2.5.0.p/audio_out_ao_null.c.o libmpv.so.2.5.0.p/audio_out_ao_pcm.c.o libmpv.so.2.5.0.p/audio_out_buffer.c.o libmpv.so.2.5.0.p/common_av_common.c.o libmpv.so.2.5.0.p/common_av_log.c.o
...```

Changes to be committed:
	modified:   build_mpv_binary.yml
@kasper93 kasper93 self-requested a review March 13, 2025 22:43
@sfan5 sfan5 self-requested a review March 18, 2025 22:03
ilkermeliksitki and others added 8 commits April 6, 2025 19:05
Changes to be committed:
	modified:   scripts/libass-build
This reverts commit cce2eb6.
The trial didn't work.

Changes to be committed:
	modified:   scripts/libass-build
Changes to be committed:
	modified:   .github/workflows/build_debian_package.yml
Changes to be committed:
	modified:   .github/workflows/build_debian_package.yml
devscripst include the following command to be used in the
workflow:
  - dpkg-buildpackage
  - mk-build-deps

Changes to be committed:
	modified:   .github/workflows/build_debian_package.yml
The workflow gave the following error:
  mk-build-deps: You must have equivs installed to use this program.
  Error: Process completed with exit code 127.
So equivs package is added as dependency.

Changes to be committed:
	modified:   .github/workflows/build_debian_package.yml
Changes to be committed:
	modified:   .github/workflows/build_debian_package.yml
Copy link
Author

@ilkermeliksitki ilkermeliksitki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All feedback are addressed. CI is working. Both building mpv binary, and debian package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants