Bug 2253415 - Systemd unit file and defaults are incorrect and contain breaking changes
Summary: Systemd unit file and defaults are incorrect and contain breaking changes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: wsdd
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Sam P
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-07 09:19 UTC by Nick
Modified: 2024-05-03 10:29 UTC (History)
2 users (show)

Fixed In Version: wsdd-0.7.1-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-03 10:29:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nick 2023-12-07 09:19:00 UTC
Description of problem:
In the Epel7 testing repo, the packaging is incorrect and contains breaking changes.
- In the wsdd service file the option AmbientCapabilities is not available to the version of systemd on the system. It only became available with v229 and El7 uses v219.
- In the wsdd service file the option DynamicUser is not available to the version of systemd on the system. It only became available with v232 and El7 uses v219.
- The service file calls for the Environment file of /etc/default/wsdd, but then places its environment file in /etc/sysconfig/wsdd
- In v0.7.0 in /etc/sysconfig/wsdd, the parameter for the environment is OPTIONS. In v0.7.1 this changes to WSDD_PARAMS which is referenced in the service file. However /etc/sysconfig/wsdd is flagged as a config file in the spec so, if anyone has updated their default file (and they should to run wsdd correctly), the file will not get replaced and will go in as an rpmnew. The old OPTIONS will still be in the /etc/sysconfig/wsdd file, but the service file is no longer looking for the parameter OPTIONS, looking for WSDD_PARAMS instead.

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

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
To maintain backward compatibility, the parameter OPTIONS should remain in /etc/sysconfig/wsdd. The service file needs to be tweaked accordingly.
The service file should be corrected for the three errors and should use OPTIONS instead of WSDD_PARAMS.

Comment 1 Nick 2023-12-17 09:29:04 UTC
Note that as this has now been released, if it gets fixed, it may be best if the ExecStart line in the service file now used both the $OPTIONS and $WSDD_PARAMS key words so any new installation also still works, in case the user has fixed the broken service file just by pointing it to /etc/sysconfig/wsdd.

Comment 2 Sam P 2023-12-17 16:31:22 UTC
Thank you for reporting this Nick and apologies for the issues and the delays. I have pushed the following update for EPEL7 here:

https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-ef66011582

to attempt to incorporate your suggested changes as well as merging Ondrej's tweaks to the best of my ability.

Ondrej could you please review this update for any potential issues?

I have set the update to require at least one positive karma before being deemed stable and disabled auto-promotion based on time so please feel free to add positive/negative karma based on your findings. Thank you.

Comment 3 Nick 2023-12-17 17:40:19 UTC
I am not aware of Ondrej's tweaks, but I've updated to your version on bhodi and it works in a compatible way with 0.7.0-1. Personally I would have dropped the WSDD_PARAMS from the /etc/sysconfig/wsdd file as it should not really have been there in the first place. The only people who will have it are those who did a fresh install of 0.7.1 or who never updated the file with a <= 0.7.0 installation. If neither of those groups of people have then changed their file, it will revert to the correct OPTIONS parameter only. This is just a personal preference. The most important thing is to leave both $OPTIONS and $WSDD_PARAMS in the service file. Then it will catch everyone.

I'll give this good karma as it now gives a safe update and fixes broken systems.

Comment 4 Ondrej Holy 2023-12-18 08:35:31 UTC
Sorry for the breaking changes. The epel7 update looks fine to me except for the fact that it seems redundant and confusing to have both $OPTIONS and $WSDD_PARAMS in the /etc/sysconfig/wsdd file.

For other releases than epel7, I would perhaps suggest adding something like the following in the %prep section to fix the backward compatibility:
sed -i "s/EnvironmentFile=\/etc\/default\/wsdd/EnvironmentFile=\/etc\/sysconfig\/wsdd/" etc/systemd/wsdd.service
sed -i "s/$WSDD_PARAMS/$WSDD_PARAMS $OPTIONS/" etc/systemd/wsdd.service


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