Bug 1327148 - post-install script needed to create xpra group
Summary: post-install script needed to create xpra group
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xpra
Version: 23
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jonathan Underwood
QA Contact: Fedora Extras Quality Assurance
URL: https://www.xpra.org/trac/browser/xpr...
Whiteboard: https://www.xpra.org/trac/ticket/1093
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-14 10:55 UTC by ILMostro
Modified: 2016-04-29 03:49 UTC (History)
3 users (show)

Fixed In Version: xpra-0.16.3-3.fc24 xpra-0.16.3-3.fc23 xpra-0.16.3-3.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-18 17:24:53 UTC


Attachments (Terms of Use)

Description ILMostro 2016-04-14 10:55:30 UTC
I would try to fix this, but I'm not even sure what the proper way of doing this is right now in fedora.  Does one use koji, mock, copr, rpmbuild?

Description of problem:

The `xpra` package adds a file `/usr/lib/tmpfiles.d/xpra.conf` during installation.  The contents of that file specify that a directory should be created within the `tmpfs` type mount point on `/var/run/` with `0770` permissions and ownership should be assigned to the "xpra" group.

```
cat /lib/tmpfiles.d/xpra.conf 
# This is the shared directory where users of the xpra group
# can place sockets if they want to be able to share them.
d /var/run/xpra 0770 - xpra

```

However, **the xpra package doesn't create the specified group** at the time of installation!

```
# rpm -q --scripts xpra
postinstall scriptlet (using /bin/sh):
/usr/bin/update-desktop-database &> /dev/null || :
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null || :
postuninstall scriptlet (using /bin/sh):
/usr/bin/update-desktop-database &> /dev/null || :

if [ $1 -eq 0 ] ; then
    /bin/touch --no-create /usr/share/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
fi
posttrans scriptlet (using /bin/sh):
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :

```


-----------------------------
Version-Release number of selected component (if applicable):

```
# rpm -q xpra
xpra-0.16.3-1.fc23.i686

```

--------------------------------
Additional info:


I'll add a link to the fix provided by the upstream package; namely:

```
1	#!/bin/sh
2	
3	SERVER_GROUP="xpra"
4	if ! getent group | grep -q "^$SERVER_GROUP:" ; then
5	        echo -n "Adding group $SERVER_GROUP.."
6	        addgroup --quiet --system $SERVER_GROUP 2>/dev/null ||true
7	        echo "..done"
8	fi
```

Comment 1 ILMostro 2016-04-14 11:04:47 UTC
Note, the "patch" was provided for the Debian trunk but not for "rpmbuild" trunk.

Additional information: https://www.xpra.org/trac/ticket/1093

Comment 2 Jonathan Underwood 2016-04-14 11:05:08 UTC
Hmm. What's this actually needed for? xpra is working fine for me locally without the group. Can you outline your failing use case?

Thanks

Comment 3 ILMostro 2016-04-14 11:19:01 UTC
For Fedora/RHEL/CentOS:

```
#!/bin/env sh

SERVER_GROUP="xpra"
if ! getent group | grep -q "^$SERVER_GROUP:" ; then
        echo -n "Adding group $SERVER_GROUP.."
        groupadd -r $SERVER_GROUP 2>/dev/null || true
        echo "..done"
fi

```

OR

```
postinstall scriptlet (using /bin/sh):
/usr/bin/update-desktop-database &> /dev/null || :
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null || :
/sbin/groupadd -r xpra &>/dev/null || :

postuninstall scriptlet (using /bin/sh):
/sbin/groupdel xpra &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :

if [ $1 -eq 0 ] ; then
    /bin/touch --no-create /usr/share/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
fi

posttrans scriptlet (using /bin/sh):
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :

```

Comment 4 ILMostro 2016-04-14 11:20:34 UTC
I'm sorry.  I hadn't even realized that I failed to point out the main reason for this.  `systemd-tmpfiles-setup` and, subsequently, `systemd-tmpfiles-clean` fail because of this.

```
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: Starting Create Volatile Files and Directories...
Apr 14 04:06:05 babinkomp.airportx.lan systemd-tmpfiles[743]: [/usr/lib/tmpfiles.d/xpra.conf:3] Unknown group 'xpra'.
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: Failed to start Create Volatile Files and Directories.
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-setup.service: Unit entered failed state.
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.

```

Comment 5 ILMostro 2016-04-14 11:22:08 UTC
# systemctl status -l systemd-tmpfiles-setup
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
   Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-04-14 04:06:05 CDT; 2h 15min ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 743 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
 Main PID: 743 (code=exited, status=1/FAILURE)

Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: Starting Create Volatile Files and Directories...
Apr 14 04:06:05 babinkomp.airportx.lan systemd-tmpfiles[743]: [/usr/lib/tmpfiles.d/xpra.conf:3] Unknown group 'xpra'.
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-setup.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: Failed to start Create Volatile Files and Directories.
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-setup.service: Unit entered failed state.
Apr 14 04:06:05 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-setup.service: Failed with result 'exit-code'.
[06:21][1029]# systemctl status -l systemd-tmpfiles-clean
● systemd-tmpfiles-clean.service - Cleanup of Temporary Directories
   Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-04-14 04:20:58 CDT; 2h 0min ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 2966 ExecStart=/usr/bin/systemd-tmpfiles --clean (code=exited, status=1/FAILURE)
 Main PID: 2966 (code=exited, status=1/FAILURE)

Apr 14 04:20:57 babinkomp.airportx.lan systemd[1]: Starting Cleanup of Temporary Directories...
Apr 14 04:20:58 babinkomp.airportx.lan systemd-tmpfiles[2966]: [/usr/lib/tmpfiles.d/xpra.conf:3] Unknown group 'xpra'.
Apr 14 04:20:58 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-clean.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 04:20:58 babinkomp.airportx.lan systemd[1]: Failed to start Cleanup of Temporary Directories.
Apr 14 04:20:58 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-clean.service: Unit entered failed state.
Apr 14 04:20:58 babinkomp.airportx.lan systemd[1]: systemd-tmpfiles-clean.service: Failed with result 'exit-code'.

Comment 6 Fedora Update System 2016-04-14 15:14:32 UTC
xpra-0.16.3-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-26dd63a02e

Comment 7 Fedora Update System 2016-04-14 15:14:39 UTC
xpra-0.16.3-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b033aaa1dc

Comment 8 Fedora Update System 2016-04-14 15:14:43 UTC
xpra-0.16.3-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bb6ed3ab0f

Comment 9 Fedora Update System 2016-04-14 16:13:30 UTC
xpra-0.16.3-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-60030f2ec2

Comment 10 Fedora Update System 2016-04-14 16:13:34 UTC
xpra-0.16.3-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9cab30831f

Comment 11 Fedora Update System 2016-04-14 16:13:38 UTC
xpra-0.16.3-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f225900ec8

Comment 12 Jonathan Underwood 2016-04-14 16:50:29 UTC
If you'd like to test the updated package without waiting for it to hit the updates-testing repo, you can pull it directly from koji here:

http://koji.fedoraproject.org/koji/buildinfo?buildID=754481

Comment 13 Fedora Update System 2016-04-15 08:36:56 UTC
xpra-0.16.3-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9cab30831f

Comment 14 Fedora Update System 2016-04-16 19:25:54 UTC
xpra-0.16.3-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-60030f2ec2

Comment 15 Fedora Update System 2016-04-16 19:27:23 UTC
xpra-0.16.3-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f225900ec8

Comment 16 ILMostro 2016-04-17 05:26:08 UTC
Thank you for this prompt response.  This Bug should be closed, as the problem has been solved.  Is there a page I should go to to give "Karma"? I don't remember where or if that's still being used.

# systemctl status -l systemd-tmpfiles-setup
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
   Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
   Active: active (exited) since Sat 2016-04-16 22:00:48 CDT; 2h 23min ago
     Docs: man:tmpfiles.d(5)
           man:systemd-tmpfiles(8)
  Process: 750 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=0/SUCCESS)
 Main PID: 750 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/systemd-tmpfiles-setup.service

Apr 16 22:00:48 babinkomp.airportx.lan systemd[1]: Starting Create Volatile Files and Directories...
Apr 16 22:00:48 babinkomp.airportx.lan systemd[1]: Started Create Volatile Files and Directories.

# uname -r
4.4.6-301.fc23.i686

Comment 17 Fedora Update System 2016-04-18 17:24:50 UTC
xpra-0.16.3-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2016-04-28 21:53:05 UTC
xpra-0.16.3-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2016-04-29 03:49:24 UTC
xpra-0.16.3-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.