Bug 1178718

Summary: %service_add_post causes error message
Product: [openSUSE] openSUSE Tumbleweed Reporter: Fabian Vogt <fvogt>
Component: BasesystemAssignee: systemd maintainers <systemd-maintainers>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fbui, werner
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Fabian Vogt 2020-11-12 10:47:30 UTC
When installing any rpm which uses %service_add_post with a full unit name, e.g. shadow, this appears:
systemd service shadow.service.service does not exist.

This is because of https://build.opensuse.org/package/rdiff/Base:System/systemd-rpm-macros?linkrev=base&rev=44, where the "${service%%.*}" was dropped.
Comment 1 Fabian Vogt 2020-11-12 10:53:41 UTC
*** Bug 1178717 has been marked as a duplicate of this bug. ***
Comment 2 Franck Bui 2020-11-16 15:59:59 UTC
Hmm my guess is that systemd is not up to date on this system.

Can you check that systemd has the following change ?

  * Mon Nov 02 2020 Franck Bui <fbui@suse.com>
  - Simplify systemd-sysv-convert
Comment 3 Fabian Vogt 2020-11-17 10:12:17 UTC
(In reply to Franck Bui from comment #2)
> Hmm my guess is that systemd is not up to date on this system.
>
> Can you check that systemd has the following change ?
> 
>   * Mon Nov 02 2020 Franck Bui <fbui@suse.com>
>   - Simplify systemd-sysv-convert

Makes sense. I was running shadow built against Base:System and a staging, but systemd in TW didn't have that change until 20201110, which was published after I filed this bug.

I can confirm that with systemd from the current snapshot the error does no longer occur.