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

Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 #11017

Closed
wants to merge 9 commits into from

Conversation

SpeedJack
Copy link
Contributor

@prometheanfire @flappyports
This merges the changes introduced by Matthew and those made in the old PR #10932 .
Changes are described in commit messages. Apparently, these are a lot. But these are mainly minor edits to make all ebuilds in the same format (reorder of (R)DEPEND/HOMEPAGE/DESCRIPTION; alphabetical order for use flags; etc.); Other are fixes to minor bugs (wayland-protocols and scdoc in BDEPEND; add missing xkeyboard-config dep; etc.); Some are choices, that may be argueable (wl-clipboard removed from dependency list; swaybar & swaybg use flags against only one flag gdk-pixbuf; doc -> man renaming; etc.).

Regarding bug #677522, I tried building every version (except the live version) of Sway without git and it works for me.

Matthew said that he opened a thread on gentoo-dev to ask for a new category wayland-misc or something like. I hope it will be approved - but if not, I would consider moving dev-libs/{sway{lock,idle},wl-clipboard} to app-misc, which is a better category.

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Feb 10, 2019
@SpeedJack SpeedJack changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} Various fixes for dev-libs/{sway{idle,lock,},wlroots} [please reassing] Feb 10, 2019
@SpeedJack SpeedJack changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} [please reassing] Various fixes for dev-libs/{sway{idle,lock,},wlroots} [please reassign] Feb 10, 2019
@gentoo-bot gentoo-bot changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} [please reassign] Various fixes for dev-libs/{sway{idle,lock,},wlroots} Feb 10, 2019
@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Feb 10, 2019
@prometheanfire
Copy link
Member

  • we should probably just remove the betas (and earlier) given their stability.
    • perhaps for wlroots too
  • Since on disk stuff is being edited sway-1.0_rc1 should be renamed to sway-1.0_rc1-r1
  • MESON_AUTO_DEPEND=no should be specified if we are specifying which meson ourselves
  • we should use meson_use when we can (my opinion)
  • ~dev-libs/wlroots-0.3[elogind=,systemd=,X=] is problematic unless upstream states they ONLY support that version it should be >=. static deps make maintenance a pain.
  • (minor) tray should be auto-enabled?
  • {R,B,}DEPEND and first lines being newlines, that's done to aid readability.

Hard to tell via the diff, but latest version and 9999 should be the same (unless 9999 had changes not in latest version), this lets us copy 9999 to the new release when it comes for easy bumps.

@prometheanfire
Copy link
Member

prometheanfire commented Feb 11, 2019

I think swayidle needs systemd[policykit] to actually be allowed to send the lock

swayidle -w before-sleep 'swaylock'
Failed to send Inhibit signal: Permission denied

@prometheanfire
Copy link
Member

yep, remerged systemd and reloaded systemd-logind and now it works. elogind probably needs the same.

 - Update copyright header in all versions;

 - Use ${PN} wherever possible;

 - Remove explicit dependency on meson (no longer required);

 - Fix the order of (R)DEPEND;

 - wayland-protocols is a build-time dependency: move it in BDEPEND;

 - Add xcb-util-image dependency (required);

 - Remove `xkb` flag from libxcb dep (not required for >=wlroots-0.2).

Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
@SpeedJack
Copy link
Contributor Author

* Since on disk stuff is being edited sway-1.0_rc1 should be renamed to sway-1.0_rc1-r1

* we should use meson_use when we can (my opinion)

* `~dev-libs/wlroots-0.3[elogind=,systemd=,X=]` is problematic unless upstream states they ONLY support that version it should be `>=`.  static deps make maintenance a pain.

I think swayidle needs systemd[policykit] to actually be allowed to send the lock

Done.

* {R,B,}DEPEND and first lines being newlines, that's done to aid readability.

With {R,B,}DEPEND you mean also to change the order of these vars? In skel.ebuild DEPEND comes before RDEPEND.

* MESON_AUTO_DEPEND=no should be specified if we are specifying which meson ourselves

MESON_AUTO_DEPEND has been removed. But anyway meson.eclass has been updated 4 days ago to auto-depend on >=meson-0.48.2 - so I've removed the explicit dependency.

* we should probably just remove the betas (and earlier) given their stability.
  
  * perhaps for wlroots too

I've removed older versions of sway and wlroots except the last 2 versions of each: this would allow a user to fallback to the older version if something breaks in the latest.

* (minor) tray should be auto-enabled?

Sway's tray feature now depends on systemd/elogind (see REQUIRED_USE). Default enabling it would force the user to either enable systemd/elogind or to explicity disable tray.

Hard to tell via the diff, but latest version and 9999 should be the same (unless 9999 had changes not in latest version), this lets us copy 9999 to the new release when it comes for easy bumps.

The only difference between sway-1.0_rc1-r1 and sway-9999 is:

28c28
<       >=dev-libs/wlroots-0.3[elogind=,systemd=,X=]
---
>       ~dev-libs/wlroots-9999[elogind=,systemd=,X=]

While sway-9999 actually works with wlroots-0.3, I think it's better to leave the dep on wlroots-9999 - or we risk having to edit the ebuild each time the upstream devs add something new to wlroots and sway.

@prometheanfire
Copy link
Member

If we want to have wlroots-9999 for sway-9999 then we should probably lock it behind a if VER string like is done in other places. the other changes sound good and I'll review it fully some time today.

@SpeedJack
Copy link
Contributor Author

I'll also add sway 1.0-rc2 (released 4h ago) to this PR later today.

@prometheanfire
Copy link
Member

ok, I've updated to that locally already (using the rc1 ebuild, deps didn't change it looks like).

@SpeedJack SpeedJack changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 Feb 12, 2019
Copy link
Member

@prometheanfire prometheanfire left a comment

Choose a reason for hiding this comment

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

I think all of this looks ok (I have not verified 9999 and latest version are the same, but I think they are and it'll be verified before push). The main question I have is if you've verified the depend/rdepend changes. I have a feeling removing stuff from rdepend could break stuff (once the depends are removed from the system on depclean). use lddtree and the like to check linking (and runtime deps).

@SpeedJack
Copy link
Contributor Author

use lddtree and the like to check linking (and runtime deps).

I've checked. deps seems fine. I see nothing that can break.

@SpeedJack SpeedJack changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 [please reassign] Feb 12, 2019
@gentoo-bot gentoo-bot changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 [please reassign] Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 Feb 12, 2019
@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Feb 12, 2019
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
@gentoo-bot gentoo-bot changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 [please reassign] Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 Feb 12, 2019
@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Feb 12, 2019
@SpeedJack
Copy link
Contributor Author

I'm still interested in hearing how upstream intends this to be used.

Sway's wiki
I've also added the wlroots[filecaps=] constraint to Sway: as per wiki, to use Sway with cap_sys_admin, wlroots must be compiled with libcap enabled.

The PR should be ok now.

@prometheanfire
Copy link
Member

it looks like they want to switch to setuid

10:29 <           emersion > ddevault, do you remmember why we don't drop caps anymore?
10:35 <           ddevault > emersion: no
10:35 <           ddevault > emersion: I just want to use setuid going forward
10:35 <           emersion > yeah, i don't think caps add any value

@SpeedJack
Copy link
Contributor Author

SpeedJack commented Feb 12, 2019

it looks like they want to switch to setuid

well, we have 3 choices:

  1. force the use of setuid and totally drop caps;
  2. let the user decide whether to use setuid or caps, and by default use caps;
  3. let the user decide whether to use setuid or caps, and by default use setuid;

Currently we are on (2), since filecaps is default enabled by fcaps.eclass.
I think we can obtain (3) by setting -filecaps in IUSE, forcing the flag to be default disabled.
Imho it's fine to leave it as is (choice 2), since it let the user to choose between caps/setuid (and I usually feel better when I can choose) and does not add a redundant flag (-filecaps) to the IUSE var.

@prometheanfire
Copy link
Member

option 4, force setuid when !systemd and !elogind

this is a security issue

@prometheanfire
Copy link
Member

but for now leave it as it until upstream decides what to do

 - Use ${PN} wherever possible;

 - Remove bash-completion use flag: bash completions should be always
   installed (see [1]);

 - Remove clipboard use flag and related dep: makes no sense to add this
   here, if the user wants to add utilities to handle the clipboard under
   wayland it is just and emerge away; wl-clipboard has nothing to do
   with sway;

 - Rename use flag: doc -> man (doc is a global use flag used to install
   additional documentation that most users does not want);

 - The sway tray feature (enabled by the tray use flag) now requires a
   logind provider: reflect this in REQUIRED_USE (fixes #677748);

 - Fix order of (R)DEPEND;

 - Remove required use gdk-pixbuf[jpeg]: the jpeg use flag is not
   required to be enabled. If the user wants support for JPEG images, he
   can manually enable it in gdk-pixbuf (as for other img formats);

 - Remove libcap dep: the fcaps eclass automatically adds it if filecaps
   use flag is enabled;

 - Dependency dbus is no longer required with tray (now uses sd-bus from
   logind): remove anything related to it;

 - Move scdoc and wayland-protocols dependencies to BDEPEND;

 - Add dep on xkeyboard-config: see bug #674640;

 - Add man-pages parameter to meson (fixes bug #677654);

 - Disable swaybar man page installation when swaybar use flag is
   disabled;

 - Use $MY_PV in sway-version arg to meson to reflect upstream version
   in sway --version;

 - Add a reminder to set XDG_RUNTIME_DIR if it's not set by the
   environment. This is needed in systems without logind/consolekit.

[1] www.gentoo.org/support/news-items/2014-11-25-bash-completion-2_1-r90.html

Closes: https://bugs.gentoo.org/672590
Closes: https://bugs.gentoo.org/675978
Closes: https://bugs.gentoo.org/674640
Closes: https://bugs.gentoo.org/677654
Closes: https://bugs.gentoo.org/677748
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
Closes: https://bugs.gentoo.org/677774
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
@SpeedJack
Copy link
Contributor Author

Upstream suggests to use only setuid: swaywm/sway#3668
So I've removed caps in favor of setuid.
Note: done in pkg_preinst since fperms can not be used in pkg_postinst.

@SpeedJack SpeedJack changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 [please reassign] Feb 12, 2019
@gentoo-bot gentoo-bot changed the title Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 [please reassign] Various fixes for dev-libs/{sway{idle,lock,},wlroots} & version bump to sway-1.0_rc2 Feb 12, 2019
@gentoo-bot
Copy link

Copyright policy change

Please note that on 2018-09-15 Trustees have approved new Gentoo copyright policy. All contributions made to Gentoo need to follow this policy. If you include the Signed-off-by line in your commit message, you indicate that you have read the policy and agree to its terms. For more detailed explanation, please see the new Gentoo copyright policy explained article.

Pull Request assignment

Submitter: @SpeedJack
Areas affected: ebuilds
Packages affected: dev-libs/sway, dev-libs/swayidle, dev-libs/swaylock, dev-libs/wlroots

dev-libs/sway: @flappyports, @prometheanfire, @Hummer12007, @SpeedJack
dev-libs/swayidle: @prometheanfire
dev-libs/swaylock: @prometheanfire
dev-libs/wlroots: @flappyports, @SpeedJack

Linked bugs

Bugs linked: 675978, 672590, 677774, 674640, 677748, 677654
Cross-linking bugs disabled due to large number of bugs linked.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. and removed assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR. labels Feb 12, 2019
@FuzzyGophers
Copy link
Contributor

This has been merged. We can continue to address the setuid and fcaps in future updates.

@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2019-02-13 00:23 UTC
Newest commit scanned: 6bcc71c
Status: ✅ good

No issues found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). bug linked Bug/Closes found in footer, and cross-linked with the PR.
Projects
None yet
5 participants