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

media-sound/cadence: general overhaul #341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gerion0
Copy link

@gerion0 gerion0 commented May 10, 2020

Detailed Changes:

  • reduce the diff to upstream ebuild
    • add jack_capture
    • add python3_7
    • update to EAPI 7
    • undo catarina removal
    • drop gnome icon fix
  • add python3_8
  • add shebang fix
  • add better desktop entries for claudia
  • enable installation on Gentoo prefix (not tested)
  • drop revision for live ebuild
    (I can revert this if you want. However I don't find revisions on live ebuilds meaningful. Revisions should lead to a new merge of the ebuild, if the ebuild changes notably. However, live ebuilds should be merged regulary anyway and a new merge not only brings the new ebuild features but also new code, which may not compile at all or has other problems. Therefore, a new merge could be unwanted.)

Signed-off-by: Gerion Entrup [email protected]

@simonvanderveldt
Copy link
Member

Hi @gerion0 thanks for the PR!

reduce the diff to upstream ebuild

I/we missed that Cadence has been added to the gentoo tree. We generally don't keep any packages in the overlay that exist in the gentoo tree. Is there anything missing/broken with the ebuild in the gentoo tree that you're using the one from this overlay?

@gerion0
Copy link
Author

gerion0 commented May 10, 2020

The main point is missing support for Claudia/Ladish (also the blocker for me personally since I use mainly Claudia ). I think, this is due to the fact that ladish is not packaged in Gentoo.

The last four points, that I mentioned earlier, are also missing in the upstream ebuild:

  • add python3_8
  • add shebang fix
  • add better desktop entries for claudia
  • enable installation on Gentoo prefix (not tested)

All of these points can also be added upstream (except the claudia one). Maybe I'll make a separate pull request in the Gentoo repo. Nevertheless, I have made the pull request here, because I need ladish support.

Detailed Changes:
- reduce the diff to upstream ebuild
  - add jack_capture
  - add python3_7
  - update to EAPI 7
  - undo catarina removal
  - drop gnome icon fix
- add python3_8
- add shebang fix
- add better desktop entries for claudia
- enable installation on Gentoo prefix (not tested)
- drop revision for live ebuild

Signed-off-by: Gerion Entrup <[email protected]>
@gerion0
Copy link
Author

gerion0 commented Jun 19, 2020

Have made an upstream pull request.

Copy link
Member

@simonvanderveldt simonvanderveldt left a comment

Choose a reason for hiding this comment

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

Figured I should review this because the package in the gentoo tree probably won't get LADISH support, so for now you probably want to keep using the version from this overlay.

First of all: Thanks for the PR! And sorry for the delay.
I've reviewed it from our/my perspective, haven't checked what the ebuild in the gentoo tree looks like. There might be some items that are in there that I have a different opinion on.
If you feel there's too much to change I can also cherry-pick some of the changes you made and make a new PR myself. Let me know what you prefer.

drop revision for live ebuild

I'd prefer to keep this. AFAIK there are no exceptions regarding revbumps for live ebuilds, they should be revbumped based on the same criteria as regular ebuilds. I use a lot of binary packages and lack of revbumps is generally the cause of most of my issues when I'm installing them on a machine because the ebuilds are different but no rebuild was triggered because there was no revbump.
If you want to ensure you're building the same commit you can set EGIT_COMMIT or EGIT_BRANCH depending on what you want to pin exactly.

LICENSE="GPL-2"
SLOT="0"

IUSE="a2jmidid ladish -pulseaudio opengl"
Copy link
Member

Choose a reason for hiding this comment

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

Since these are already shuffled vs the previous rev can you put them in alphabetical order?

Copy link
Author

Choose a reason for hiding this comment

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

Will do.


REQUIRED_USE="${PYTHON_REQUIRED_USE}"

CDEPEND="
Copy link
Member

Choose a reason for hiding this comment

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

I don't think any of these are CDEPEND (at least not my understanding of CDEPEND from https://wiki.gentoo.org/wiki/Future_EAPI/New_dependency_types, AFAIK it's not an official thing) they are all required at runtime so should be RDEPEND, right?

Copy link
Author

Choose a reason for hiding this comment

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

I took this directly from the upstream ebuild. That said, I have looked into the real dependencies. For me, it looks like there are some build deps (for the c++ sources):

  • QtGui
  • QtCore
  • QtWidgets
  • QtSvg

Of course, there is the dependency to PyQt5 already, but I think, this is not enough, since Qt is used from C++ directly.

The rest should be RDEPENDs, yes.


CDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
Copy link
Member

Choose a reason for hiding this comment

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

Does putting multiple packages in a single python_gen_cond_dep work?
I believe the normal/official way is a python_gen_cond_dep per dep, have to say I prefer that as well over this.

Copy link
Author

Choose a reason for hiding this comment

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

According to mgorny, who (afaik) introduces this whole thing, multiple packages in a single function are the official way, see:

Moreover, the upstream ebuild also uses this.

dev-python/PyQt5[dbus,gui,opengl?,svg,widgets,${PYTHON_MULTI_USEDEP}]
')
media-sound/jack2[dbus]
media-sound/jack_capture
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer to put this behind a USE flag, render is probably the best option for that.

Copy link
Author

Choose a reason for hiding this comment

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

Will do.

}

src_install() {
emake PREFIX="${EPREFIX}/usr" DESTDIR="${ED}" install
Copy link
Member

Choose a reason for hiding this comment

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

I guess we need ${ED} here instead of ${D} because there's no configure for cadence because it's Makefile/install only?

make_desktop_entry claudia Claudia claudia "AudioVideo;AudioVideoEditing;Qt"
make_desktop_entry claudia-launcher "Claudia Launcher" claudia-launcher "AudioVideo;AudioVideoEditing;Qt"
fi
make_desktop_entry catarina Catarina catarina "AudioVideo;AudioVideoEditing;Qt"
Copy link
Member

@simonvanderveldt simonvanderveldt Jun 20, 2020

Choose a reason for hiding this comment

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

I'd prefer to leave catarina out or alternatively put it behind a USE flag. Most users won't need it and it's just noise in the application list if it's present.

Copy link
Author

Choose a reason for hiding this comment

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

Hmm, I think, we should keep it. Yes, of course, this is a test tool. However, the upstream Makefile also builds/installs it by default, therefore there might be users that want to use it and it should be the choice of the user whether to use or ignore it.
I'm okay with putting it behind a useflag.

Copy link
Member

Choose a reason for hiding this comment

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

OK, USE flag is fine, guess we can just use one called catarina.

rm -rf "${ED}"/usr/share/applications/*.desktop

if use !pulseaudio; then
rm -rf "${ED}"/usr/bin/cadence-pulse2{jack,loopback}
Copy link
Member

Choose a reason for hiding this comment

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

I vastly prefer just listing things separately. That way grepping ebuilds for filenames always works and tbh I also don't really see the gain, it takes me more brain-time to process this than just the straight direct lines.

Copy link
Author

Choose a reason for hiding this comment

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

I took this from the in-tree ebuild. It reduces the code size a little bit and of course makes it easier to get the differences between in-tree ebuild and audio-overlay ebuild. The latter was exactly the reason why I chose to reduce the diff: To be able to see with one glance what the differences are and to keep both ebuils up-to-date simultainously.

However, I don't have a really strong feeling about this. If you wish, I can revert it.

Copy link
Member

@simonvanderveldt simonvanderveldt Jun 21, 2020

Choose a reason for hiding this comment

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

If you wish, I can revert it.

Yeah, I'd prefer to keep it as it was.

With regards to the diff to upstream: I'd prefer to focus on trying to make it so the ebuild in this overlay is no longer necessary and you (and anyone else) can just use the ebuild in the gentoo tree.

But I don't expect LADISH to be added to the gentoo tree, both because it's pretty much unmaintained and because it currently requires Python 2.7 (there have been three recent commits, but there's more to do to make it work with Python 3).
Would your use case also be served with NSM (https://github.com/linuxaudio/new-session-manager, it's a fork of Non Session Manager) instead of LADISH? It's the session manager the majority of the Linux audio community has decided to standardize on. It might take a bit of time before it offers the same features and UX as LADISH, especially with regards to the GUIs but it's at least a sustainable way forward.

Copy link

Choose a reason for hiding this comment

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

rm -rf "${ED}"/usr/share/cadence/pulse2{jack, loopback}
fi
if use !ladish; then
rm -rf "${ED}"/usr/bin/claudia{,-launcher}
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

rm -rf "${ED}"/usr/share/cadence/icons/claudia-hicolor/
fi

# Replace desktop entries with QA issues with these
Copy link
Member

@simonvanderveldt simonvanderveldt Jun 20, 2020

Choose a reason for hiding this comment

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

👍
We should create an issue or PR upstream about this.
The same issue for Carla was eventually fixed, Falk just didn't apply the same change to Cadence (yet).

Copy link
Author

Choose a reason for hiding this comment

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

Of course, the whole src_install phase is a mess. The rm section should be part of the upstrem Makefile, too.

@gerion0
Copy link
Author

gerion0 commented Jun 21, 2020

I'd prefer to keep this. AFAIK there are no exceptions regarding revbumps for live ebuilds, they should be revbumped based on the same criteria as regular ebuilds. I use a lot of binary packages and lack of revbumps is generally the cause of most of my issues when I'm installing them on a machine because the ebuilds are different but no rebuild was triggered because there was no revbump.

Are these binary packages live packages?

Normally the revision should ensure that the user can switch back if something fails and get an update for changes that are worthy of a complete rebuild.

For live ebuilds the first point normally is meaningless, since the upstream version normally changed anyway, so you can't switch back if you install the ebuild with a minor revision. The second point also is critical because the newer version maybe does not build at all even if the ebuild is better, because upstream has commited something weird.

Let's take the last revision of cadence from this overlay. The difference between the revisions where the updated Python versions. Making a revision triggers an update for the user. Let's say that the user has Cadence installed with Python 3.6, then the revision triggers an update that is not useful. Let's say that the newer Cadence source does not build at all (because of upstream issues), then the user get's presented an update that she does not need and also fails.

I (as a user) don't want (forced) updates for live ebuilds in general since there is a high probability that the source code won't build anymore and if I want an update, I can trigger this myself (or via a regulary emerge @smart-live-rebuild etc.). In this way it is always an extra action and not part of my standard system update.

Regarding the policy: You are correct. I have not found any policy for that. However, in the Gentoo source tree are only two ebuilds that have live ebuild revisions: git and gnulib. Git seems to "resolve" the rebuild problem by keeping all old revisions in the tree as files but update them to the newest one (there is no difference between git-9999{,-r1,-r2,r3}.) All other live ebuilds are simply updated, if upstream needs other dependencies or the ebuild itself needs adjustment.

If you want to ensure you're building the same commit you can set EGIT_COMMIT or EGIT_BRANCH depending on what you want to pin exactly.
I'm not sure what you mean with that. Do you mean to pin it as a user or as a maintainer in an fake version, like cadence-v2020-06-21?

@simonvanderveldt
Copy link
Member

@gerion0 Thanks for the info, those are all valid points, my/our intentions are obviously not to cause breakage for users, but I've also had issues myself when not revbumping ebuilds.
I'll sleep on it a bit and try to reproduce the issues i had in the past to see if I can find another way to work around it.

P.S. That Python version change is actually one of the most annoying issues with the current setup in gentoo. I don't like how Python versions for packages are handled. I have to rebuild all packages that have any kind of change in Python versions (even if it's just adding 3.9 support without it being enabled) otherwise my binary packages are useless. There has to be a better solution, although I don't really have one at the moment either (apart from storing stuff like this not in USE flags but in some other property).

@gerion0
Copy link
Author

gerion0 commented Jun 23, 2020

There has to be a better solution, although I don't really have one at the moment either.

Maybe runtime useflags would be the solution. Unfortunately, noone has implement them yet.

@simonvanderveldt
Copy link
Member

@gerion0 I did some testing and I think I can get my desired behavior by using newuse for the emerges on the machine that builds my binary packages. This should trigger a rebuild for all USE flag changes which is what I need for the binary packages to be useful.

I'll create a PR to remove the revision of the other 9999 ebuilds in this repo to clean it up, I'll leave cadence out of that PR so there are no merge conflicts.
Thanks for bringing this up!

@NexAdn
Copy link
Member

NexAdn commented Feb 12, 2023

Is this PR still needed? If so, please rebase it onto the current master branch to fix the CI pipeline.

@gerion0
Copy link
Author

gerion0 commented Feb 12, 2023

Sorry, I'm using the Gentoo upstream Cadence with Pipewire at the meantime, so I have no interest in updating this PR (and cannot really test it).
From a quick glance, the Cadence ebuild in this overlay looks fairly outdated in comparison to Gentoo upstream, so probably this pull request still makes sense to some extend.

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

Successfully merging this pull request may close these issues.

4 participants