Skip to content
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

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

Open
wants to merge 26 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
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
.github/workflows/build_mpv_binary_and_deb_package.yml Outdated Show resolved Hide resolved
@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
add `actions/checkout@v4`

Co-authored-by: sfan5 <sfan5@live.de>
Changes to be committed:
	modified:   build_mpv_binary_and_deb_package.yml
Co-authored-by: sfan5 <sfan5@live.de>
@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 <kevmitch@gmail.com>
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
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