I can not package only bench and install erpnext using the packaged bench
But I have a issue, I need to tell to the bench than frappe and frappe apps will not be under /home/frappe/frappe-bench it will be under /usr/share/frappe/
Also I am creating a frappe system user with /user/share/frappe ass home to avoid run frappe service as root (this will be handled with systemd)
But I need to tell the bench where to find the frappe dir, so I need to ask:
The frappe dir is hardcoded into the bench code? It is defined in runtime? or it is a variable than can be configured at install?
Please if you can help me with this I will can continue working to get ERPNext packaged in RPM, after the Fedora packaging I will try to get all dependencies ready in CentOS 7 via the epel-repo.
Hi @pdvyas so I can put a plain text file under /etc/frappe_bench_dir with the path to frappe dir?
This is the second time than I ask about packaging frappe, frappe-bench and erpnext, first time was for v4 but how the v5 were coming fast I take the desicion to split the packaging after the v5 became stable.
I can package olny the bench for a informal package, but if I want to make the package official in Fedora repos and then work to get all depencies in CentOS 7and manybe CentOS 6 (note than the epel work for RedHat and Cientific Linux to, I am not sure is there will be a user of ERPNext than will run the service in RedHat), this same spec can help other people to make a rpm for other Operative System based in rpm like OpenSuse and Mageia, even it can help to make a .deb package
Fedora Packaging Guidelines do not allow to python apps to download from pypi, all packages must downloaded as rpm packages from the repo, also I can put content than will be served under /home and /usr/share is the best place to put frappe as because python code can be considered multi arch.
I am of the opinion that you should package only bench as we release very often and updates are important. Also, the bench assumes the presence of a virtualenv.
There is any way to let the bench command to run as root?
I have created the frappe group and user and they are the owners of /var/frappe-bench/logs/ (this is done by the spec) but the bench can not create files there
In the spec, delete that bench.log file after install if it gives perms error
You can run a command as root if you define frappe_user in config.json. If run as root in this case, bench will drop to that user before running the command.