Dr-Terrible / ineluctable-overlay

Ineluctable Overlay offers a repository of Gentoo ebuilds for projects that I am interested in, or are not yet available through Portage tree.
GNU General Public License v2.0
11 stars 4 forks source link

Sway #27

Closed bpinto closed 6 years ago

bpinto commented 6 years ago

Closes #26

Dr-Terrible commented 6 years ago

Setting caps and suid permissions from the build is really necessary? Shouldn't it be done by the build system, or am I missing something?

Arch doesn't sets them: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=sway-wlroots-git

bpinto commented 6 years ago

It's in their documentation: https://github.com/swaywm/sway#compiling-from-source

Since I run systemd I haven't run through the suid problem, but I could reproduce the lack of permissions on caps.

Arch does it as well: https://aur.archlinux.org/cgit/aur.git/tree/sway-wlroots-git.install?h=sway-wlroots-git

Dr-Terrible commented 6 years ago

It's in their documentation Arch does it as well

Oh, you're right. I missed both of those parts, my apologies. Feel free to squash + merge the PR when you're ready ;)

bpinto commented 6 years ago

@Dr-Terrible I have updated this PR.

There is now two versions of sway (alpha.1 and 9999) and two versions of wlroots (snapshot and 9999).

The documentation for the alpha.1 release has changed and suggests installing a specific commit now:

This release requires wlroots. The recommended commit of wlroots for use with this release is ba5c0903f9c288e7b617e537ef80eed2a42e08ed.

So I'm using this commit.

Dr-Terrible commented 6 years ago

There is now two versions of sway (alpha.1 and 9999) and two versions of wlroots (snapshot and 9999).

This release requires wlroots. The recommended commit of wlroots for use with this release is ba5c0903f9c288e7b617e537ef80eed2a42e08ed.

Awesome! You have done an astounding job @bpinto :tada:

Oh, I just noticed one last thing. Since the USE flags elogind and systemd are mutually exclusive, then you should add to the sway ebuilds this rule too: REQUIRED_USE="^^ ( elogind systemd )". This way emerge will enforce the intended behaviour and warn the user with the following error:

$  emerge -av dev-libs/sway

These are the packages that would be merged, in order:

!!! Problem resolving dependencies for dev-libs/sway

!!! The ebuild selected to satisfy "dev-libs/sway" has unmet requirements.
- dev-libs/sway-1.0_alpha1::ineluctable-overlay USE="-elogind -systemd"

  The following REQUIRED_USE flag constraints are unsatisfied:
    exactly-one-of ( elogind systemd )
bpinto commented 6 years ago

@Dr-Terrible unless I'm mistaken this would enforce either elogind or systemd flag to be specified, but we shouldn't do it?

In fact, !(use elogind || use systemd) && fperms u+s /usr/bin/sway sets the permission only when neither are being used.

Dr-Terrible commented 6 years ago

In fact, !(use elogind || use systemd) && fperms u+s /usr/bin/sway sets the permission only when neither are being used.

Oh right! I always forget that there are people still using other init systems other than systemd. Then never mind my suggestion about REQUIRED_USE.

bpinto commented 6 years ago

Oh right! I always forget that there are people still using other init systems other than systemd.

I'm surprised you don't use openrc yourself! :)