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
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}.
Assigning to the registered maintainer.
CC: (none) => marja11Assignee: bugsquad => shlomif
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