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

fix: isolate files shared with upstream in supplemental package #25

Closed
wants to merge 10 commits into from
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
sway-regolith (1.9-6) noble; urgency=medium

* fix: isolate files shared with upstream in supplemental package

-- Regolith Linux <[email protected]> Sat, 18 May 2024 08:47:20 -0700

sway-regolith (1.9-5) noble; urgency=medium

[ Soumya Ranjan Patnaik ]
Expand Down
26 changes: 18 additions & 8 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Source: sway-regolith
Section: x11
Priority: optional
Maintainer: Sway and related packages team <[email protected]>
Uploaders: Birger Schacht <[email protected]>,
nicoo <[email protected]>
Maintainer: Regolith Desktop <[email protected]>
Build-Depends: debhelper-compat (= 13),
libcairo2-dev,
libcap-dev,
Expand All @@ -29,19 +27,31 @@ Build-Depends: debhelper-compat (= 13),
tree,
wayland-protocols (>= 1.24)
Standards-Version: 4.6.1.0
Homepage: http://swaywm.org
Vcs-Browser: https://salsa.debian.org/swaywm-team/sway
Vcs-Git: https://salsa.debian.org/swaywm-team/sway.git
Rules-Requires-Root: no

Package: sway-regolith
Architecture: any
Depends: libgl1-mesa-dri, swaybg, policykit-1, libtrawldb, ${misc:Depends}, ${shlibs:Depends}
Depends:
libgl1-mesa-dri,
swaybg,
polkitd,
libtrawldb,
sway (>= 1.9) | sway-regolith-supplemental,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the order have an effect? Ideally, sway-regolith-supplimental should be installed in the absence of both packages. Can we ensure that somehow??

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. I'm not aware of a way to specify a ranked dependency decl like that.. I'll try an experiement. I'll switch the order and (see if possible to) elevate the priority of our package to see if that effects the package solver. I happen to see this behavior on my dev machine, so the test is pretty simple:

$ sudo apt upgrade 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  mailcap suckless-tools
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  sway wmenu
The following packages have been kept back:
  gir1.2-glib-2.0 gir1.2-glib-2.0-dev libgirepository-2.0-0 libglib2.0-0t64 libglib2.0-0t64:i386 libglib2.0-bin libglib2.0-dev libglib2.0-dev-bin
The following packages will be upgraded:
  sway-regolith

Copy link
Member Author

Choose a reason for hiding this comment

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

The sway package's priority (at least in Debian) is optional.

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed one of the two seems to have caused the desired change:

The following packages were automatically installed and are no longer required:
  mailcap suckless-tools sway-backgrounds
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  sway-regolith-supplemental
The following packages have been kept back:
  gir1.2-glib-2.0 gir1.2-glib-2.0-dev libgirepository-2.0-0 libglib2.0-0t64 libglib2.0-0t64:i386 libglib2.0-bin libglib2.0-dev libglib2.0-dev-bin
The following packages will be upgraded:
  sway-regolith
1 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.

I will back out the Priority change as that's the most "special" and see what shakes out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removing Priority caused sway to return to the top pick. Will keep the Priority. Will test on a vanilla noble system (using quickemu)

Copy link
Member Author

Choose a reason for hiding this comment

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

Seeing inconsistent results between my dev environment and a clean install of noble :/ . Another approach might be to add a Recommends on sway-regolith-supplemental.

${misc:Depends},
${shlibs:Depends}
Suggests: xdg-desktop-portal-wlr
Provides: sway
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion this is still required. Many packages have a hard dependency on sway. Without this, the sway session will possibly lose out on much of the sway ecosystem.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just realised that the supplemental package replaces sway.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, the user MUST have EITHER sway OR sway-regolith-supplemental installed. Or this is my intention. LMK if this seems off.

Description: i3-compatible Wayland compositor for the Regolith desktop environment
sway (SirCmpwn's Wayland compositor) is a tiling Wayland compositor and a
drop-in replacement for the i3 window manager for X11. It works with your
existing i3 configuration and supports most of i3's features, plus a few
extras. This means it is a minimalist, tiling window manager. This variant
supports trawl integration.

Package: sway-regolith-supplemental
Architecture: any
Depends: libgl1-mesa-dri, ${misc:Depends}, ${shlibs:Depends}
Provides: sway
Conflicts: sway
Replaces: sway
Description: Support files that may also come from upstream package
These files are required for sway to function but may be provided by upstream.
4 changes: 4 additions & 0 deletions debian/sway-regolith-supplemental.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usr/bin/swaybar
usr/bin/swaymsg
usr/bin/swaynag
usr/share/
1 change: 1 addition & 0 deletions debian/sway-regolith.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/sway-regolith