Created attachment 183489 [details] fix ownership of solar var dirs Directories /var/db/solr and /var/log/solr are owned by root:wheel. Change these to solr:solr in pkg-plist so that the solr user can write to them.
Created attachment 183496 [details] Completed previous sent patch to remove the post install script The previous version sets the permission of the folders /var/db/solr and /var/log/solr with the help of a post install script, which seems to not work for at least one user. Logic changed to set permission using pkg-plist. Thanks for this!
(In reply to Matthias Fechner from comment #1) Oh, I didnt see that script at all. I think you have to also have a PKGINSTALL directive in the Makefile for that to apply.
You are right, I have started a test build, but it requires some time, as some other updates are included in the poudiere build.
It will not be that simple as I thought at first. Can you provide with an improved patch for this? If not I would suggest the already attached to be used. It is not perfect but better than the first version.
(In reply to Matthias Fechner from comment #4) Hey, tried it too, could not get it working.
Could you please be a little bit more specific? What is not working? Do you get an error message?
(In reply to Matthias Fechner from comment #6) Sorry for being vague, I could not get the pkg-install script to chdir the /var/db/solr and /var/log/solr directory. It does work with the pkg-plist chowning the dir to solr,solr
But if you apply the patch attach to this PR it should work or?
After testing the patch, it still needs a little bit of work. Before patch would change everything in directory /var/db/solr to solr:solr. It now remains root:wheel. Was this intended? root@103amd64-test:/var/db/solr # ls -l /var/log /var/log/solr /var/db /var/db/solr /var/db: total 271 drwx------ 2 operator operator 2 Mar 25 2016 entropy drwxr-xr-x 3 root wheel 4 Mar 25 2016 etcupdate drwxr-xr-x 2 root wheel 5 Jun 30 18:32 fontconfig drwx------ 7 root wheel 14 Jun 6 19:23 freebsd-update drwx------ 2 root wheel 2 Mar 25 2016 hyperv drwx------ 2 root wheel 2 Mar 25 2016 ipf -rw-r--r-- 1 nobody wheel 0 Mar 25 2016 locate.database -rw------- 1 root wheel 28642 Jan 1 16:10 mergemaster.mtree drwx------ 2 root wheel 2 Mar 25 2016 ntp drwxr-xr-x 2 root wheel 3 Jun 30 18:33 pkg drwxr-xr-x 2 root wheel 2 Jun 28 16:11 ports drwxr-xr-x 2 root wheel 2 Mar 25 2016 portsnap drwxr-xr-x 2 solr solr 6 Jun 30 18:33 solr /var/db/solr: total 34 -rw-r--r-- 1 root wheel 1390 Jun 30 18:28 log4j.properties -rw-r--r-- 1 root wheel 1390 Jun 30 18:28 log4j.properties-dist -rw-r--r-- 1 root wheel 2117 Jun 30 18:28 solr.xml -rw-r--r-- 1 root wheel 2117 Jun 30 18:28 solr.xml-dist /var/log: total 27 -rw-r----- 1 root wheel 0 Mar 25 2016 sendmail.st drwxr-xr-x 2 solr solr 2 Jun 30 18:28 solr -rw------- 1 root wheel 151 Jun 30 18:32 userlog -rw-r--r-- 1 root wheel 197 Jun 30 18:33 utx.lastlogin -rw-r--r-- 1 root wheel 60 Jun 30 18:33 utx.log /var/log/solr: total 0
Created attachment 184036 [details] Fix permission of folders and config files Thanks a lot Richard, now I understand what the reported problem is. Attached a new patch that should fix it.
A commit references this bug: Author: ultima Date: Thu Jul 6 19:31:02 UTC 2017 New revision: 445166 URL: https://svnweb.freebsd.org/changeset/ports/445166 Log: * Fixed uid:gid of solr directories PR: 220001 Submitted by: Matthias Fechner <idefix@fechner.net> (maintainer), Reshad Patuck <reshadpatuck1@gmail.com> Reviewed by: lifanov (mentor) Approved by: lifanov (mentor) Differential Revision: https://reviews.freebsd.org/D11501 Changes: head/textproc/apache-solr/Makefile head/textproc/apache-solr/files/pkg-install.in head/textproc/apache-solr/pkg-plist
(In reply to Matthias Fechner from comment #10) Not a problem! Committed, thanks!