Thomas Horsley wrote:
> Finally found this bugzilla: 
> https://bugzilla.redhat.com/show_bug.cgi?id=2254986
> 
> Create empty file /etc/default/wsdd and it is happy (sheesh!)

The root of the issue is that the package installs the
defaults file in the wrong location.  Here's a patch to the
package, if anyone cares to push this to the maintainer.

Alternately, the path in the systemd unit file could be
changed to sysconfig.  That's needlessly different from
upstream, IMO.

diff --git i/wsdd.spec w/wsdd.spec
index 0e2e714..6b71f56 100644
--- i/wsdd.spec
+++ w/wsdd.spec
@@ -1,6 +1,6 @@
 Name:           wsdd
 Version:        0.7.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Web Services Dynamic Discovery host daemon
 License:        MIT 
 URL:            https://github.com/christgau/wsdd 
@@ -24,13 +24,16 @@ like Windows.
 
 %prep
 %autosetup -p1
-sed -i "s/;BindsTo=smb.service/BindsTo=smb.service/" etc/systemd/wsdd.service
+sed -Ei \
+    -e 's/^;(BindsTo=smb.service)/\1/' \
+    -e 's/^EnvironmentFile=/&-/' \
+    etc/systemd/wsdd.service
 
 
 %install
 install -pDm644 %{S:1} %{buildroot}%{_usr}/lib/firewalld/services/wsdd.xml
 install -pDm644 %{S:2} %{buildroot}%{_usr}/lib/firewalld/services/wsdd-http.xml
-install -pDm644 etc/systemd/wsdd.defaults 
%{buildroot}%{_sysconfdir}/sysconfig/wsdd
+install -pDm644 etc/systemd/wsdd.defaults 
%{buildroot}%{_sysconfdir}/default/wsdd
 install -pDm644 etc/systemd/wsdd.service %{buildroot}%{_unitdir}/wsdd.service
 install -pDm644 man/wsdd.8 %{buildroot}%{_mandir}/man8/wsdd.8
 install -pDm755 src/wsdd.py %{buildroot}%{_bindir}/wsdd
@@ -56,7 +59,7 @@ exit 0
 %{_unitdir}/wsdd.service
 %{_usr}/lib/firewalld/services/wsdd.xml
 %{_usr}/lib/firewalld/services/wsdd-http.xml
-%config(noreplace) %{_sysconfdir}/sysconfig/wsdd
+%config(noreplace) %{_sysconfdir}/default/wsdd
 %{_bindir}/wsdd
 %{_mandir}/man8/wsdd.8*
 %license LICENSE
@@ -64,6 +67,9 @@ exit 0
 
 
 %changelog
+* Mon Feb 12 2024 Todd Zullinger <t...@pobox.com> - 0.7.1-3
+- fix systemd handling of environment file
+
 * Sat Jan 27 2024 Fedora Release Engineering <rel...@fedoraproject.org> - 
0.7.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
 
-- 
Todd
--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to