Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#38575 - [xbmc] does not follow the Arch Way

Attached to Project: Community Packages
Opened by Balló György (City-busz) - Sunday, 19 January 2014, 15:38 GMT
Last edited by Sergej Pupykin (sergej) - Wednesday, 22 January 2014, 06:26 GMT
Task Type General Gripe
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Currently the xbmc package provides a way to autostart it on boot, but I think it's not the way how we should package it.

- Since XBMC is a user application and a user session, we should not ship a systemd unit file. Just let the users to configure their system how they want. There are multiple ways available to autostart an X application on boot.

- We should not create a non-system user (with UID>=1000), just let the users to do this.

- The polkit directory should be /usr/share/polkit-1/rules.d instead of /etc/polkit-1/rules.d . The latter is the place where users can override system rules, and packages shouldn't add rules there.

- And the polkit rule should be applied only for the xbmc user, otherwise it causes an unwanted system-wide configuration.

So my opinion is to just remove the systemd unit file, remove polkit rule, and do not create the xbmc user. Just let the users the configure their system how they want, and add all information to the Arch wiki.

I attached a proposed source package and a diff file.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Wednesday, 22 January 2014, 06:26 GMT
Reason for closing:  Fixed
Comment by Ike Devolder (BlackEagle) - Sunday, 19 January 2014, 21:17 GMT
How do you think all those thinks landed in the package ?

there is more request from the users to add all these 'extras' than those who want to be punished and do everything themselves.

--1 for this
Comment by Sergej Pupykin (sergej) - Monday, 20 January 2014, 11:17 GMT
1st and 2nd items were added by user requests. I think it is convinient for TV boxes.

3rd issue is fixed in svn

4th - as I understand current polkit rule allows shutdown for users from power group and disk access for storage group. Do you know why these rules are not in polkit?
Comment by Balló György (City-busz) - Monday, 20 January 2014, 16:03 GMT
Users should ask features from upstream, not from us.

Anyway, I attached a new package, that keeps this functionality, but fixes the following problems:

1. Add the '-r' option for groupadd and useradd to create a system account, not a user account (applied only for new installations).

2. The owner of the var/lib/xbmc directory needs to be fixed after install to avoid problems when a user reinstalls the package, and may new GID/UID created for the xbmc user.

3. Remove the 'chown -R 102:0 etc/polkit-1' line from the .install file, because it's not needed.

4. When systemd starts xbmc, there is no active user session, therefore power management actions like shutdown and reboot are forbidden by default. This is the correct setting in most cases, so we should overrule this setting only for the xbmc user.

5. Move upower from optdepends to depends, otherwise shutdown and reboot are broken.

6. Delete the xbmc user after package removal.
Comment by Sergej Pupykin (sergej) - Monday, 20 January 2014, 16:41 GMT
Thank you, polkit.rules and xbmc.install commited into svn.

I am not sure about upower, if these features are mandatory. May be it is ok that shutdown does not work from xbmc interface?
Comment by Balló György (City-busz) - Monday, 20 January 2014, 17:07 GMT
I vote for include it as a dependency. Or at least the description needs to be fixed, because it's not only needed for suspend, but also for reboot and shutdown. E.g.: 'upower: used to trigger power management functionality'
Comment by Sergej Pupykin (sergej) - Tuesday, 21 January 2014, 08:34 GMT
upower description fixed
Comment by Balló György (City-busz) - Wednesday, 22 January 2014, 03:06 GMT
Sorry, the userdel command on post remove is wrong. It should be:

getent passwd xbmc > /dev/null && userdel xbmc

instead of

getent passwd xbmc > /dev/null || userdel xbmc

It was my mistake.

Loading...