On 4/30/19 11:45 AM, David Howells wrote:
Hi,
I need to install a directory (/afs) that will be a mountpoint that a systemd
service (also installed in the rpm) will mount upon.
What's the best way to encode this in the specfile?
I did have:
%files
/afs
but that doesn't upgrade correctly. Someone gave me another way to do it:
Just create it on your %install section
mkdir $RPM_BUILD_ROOT/afs
and continue adding the reference on the %files like:
%file
%dir /afs
%post
%systemd_post afs.mount
# Create /afs directory if it doesn't exist
if [ ! -d /afs ]; then
mkdir /afs
chown root.root /afs
chmod 0755 /afs
[ -x /usr/sbin/restorecon ] && /usr/sbin/restorecon /afs
fi
%files
%ghost %dir /afs
but rpmlint complains about the chown:
kafs-client.x86_64: W: dangerous-command-in-%post chown
The git repo is here:
http://git.infradead.org/users/dhowells/kafs-client.git/shortlog/refs/heads/next
The second patch from the top is the one that tries to fix the mountpoint dir
installation issue ("spec: Treat /afs special").
Thanks,
David
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org