Bug 20283

Summary: avahi-autoipd system user’s home directory /var/lib/avahi-autoipd is not created
Product: Mageia Reporter: Davy Defaud <davy.defaud>
Component: RPM PackagesAssignee: Shlomi Fish <shlomif>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Normal CC: marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: avahi-0.6.32-1.mga6.src.rpm CVE:
Status comment:

Description Davy Defaud 2017-02-14 03:06:57 CET
Description of problem:
Despite the following scriptlet in the spec file, I donât have /var/lib/avahi-autoipd created as the home directory of the avahi-autoipd system user:

%pre
%_pre_useradd %{name} %{_var}/run/%{name}-daemon /bin/false
%_pre_useradd %{name}-autoipd %{_var}/lib/%{name}-autoipd /bin/false
# Correct home directories if users already exists (mga#10004)
if [ "`grep -E '^%{name}:' < /etc/passwd | cut -f6 -d:`" = %{_var}/avahi ]; then
    %{_sbindir}/usermod -d %{_var}/run/%{name}-daemon %{name}
fi
if [ "`grep -E '^%{name}-autoipd:' < /etc/passwd | cut -f6 -d:`" = %{_var}/avahi ]; then
    %{_sbindir}/usermod -d %{_var}/lib/%{name}-autoipd %{name}-autoipd
fi
Comment 1 Davy Defaud 2017-02-14 03:26:11 CET
I think the problem is a bad copy/paste for usermod of the avahi-autoipd user.
It should be:
if [ "`grep -E '^%{name}-autoipd:' < /etc/passwd | cut -f6 -d:`" = %{_var}/lib/%{name}-autoipd ];

Even better, every %{_var}/lib in the spec file could be replaced by %{_sharedstatedir}.
Comment 2 Marja Van Waes 2017-02-14 22:41:31 CET
Assigning to the registered maintainer.

CC: (none) => marja11
Assignee: bugsquad => shlomif

Davy Defaud 2017-05-07 14:10:36 CEST

Summary: avahi-autoipd system userâs home directory /var/lib/avahi-autoipd is not created => avahi-autoipd system user’s home directory /var/lib/avahi-autoipd is not created