You are not logged in.
Hello, hope you guys can help me about PKGBUILD guidelines.
I'm creating a PKGBUILD to make a really great and powerful open source CRM available in AUR, for people running web servers on Arch being able to install the application easily. I already run this CRM on a Debian instance for my business, and I saw the opportunity to use my knowledge on this application to make this available to the Arch community.
On my coding, I'm using the read command, to ask the user some information about paths and folder names, since the folder structure can be different depending on how the web server was deployed by the hosting company/server admin (and to avoid breaking some other application already installed on the server).
I created four custom empty variables, and listed them on the variables list starting with _ (Wiki information). These variables will be filled during the installation process, as the user answers the read prompts.
_path
_folder
_domainname
_apacheusername
After this, unpacks the tarball to the informed folder path ($_path and $_folder combined), chown the files to the apache user that the server runs under ($_apacheusername), chmod 755 and 775 on some folders (according to the CRM manual).
In the final step, it opens the install.php file (wizard of the application) on the default browser using xdg-open (URL is generated using $_domainname and $folder combined), and the user needs to finish the installation there.
My questions:
1) It's ok to use read on a PKGBUILD file? I included on prepare() function.
2) It's ok to use xdg-open to open install.php? I have read somewhere that this code may be too invasive, some users complained about. This is a temporary solution, I'm trying to make this installer full bash scripting, especially for users that don't have a desktop environment to open the install.php file on a browser.
Thank you guys, I'm enjoying Arch a lot for my daily use and I'm excited to make my first AUR contribution to the community as soon as possible.
Offline
1) It's ok to use read on a PKGBUILD file? I included on prepare() function.
No. PKGBUILD's on the AUR should never ask for user input.
2) It's ok to use xdg-open to open install.php?
No.
Post your full PKGBUILD and other relevant files and we can suggest better solutions.
Why do you assume that the users will be using Apache instead of a different web server?
All configuration should be left to the user, not second-guessed by the PKGBUILD.
Offline
Thanks for the answers @Slithery. My coding definitely needs some changes, I think I figured out how to do this without asking for user inputs and without breaking anything on a server environment.
Why do you assume that the users will be using Apache instead of a different web server?
Wow, I can't believe I missed this. So used with Apache, completely forgot this crucial detail. The application can run under Apache or IIS (Microsoft Web Server) according to the documentation, I need to find a way to put this web server aspect in the code.
I will do some work on this PKGBUILD (provide a cleaner and updated code) and update this topic after the changes.
Thanks!
Offline
Which CMS is this?
There are probably several other web servers that can be used, not just Apache or IIS (which is irrelevant on Arch).
Offline
This open source CRM is SuiteCRM, a project forked from SugarCRM.
Great alternative to Salesforce, Hubspot and many others.
It's mainly coded in PHP, needs the classic LAMP stack to be deployed and used, plus some dependencies (listed on the documentation).
Home page: https://suitecrm.com
Official repository on Github: https://github.com/salesagility/SuiteCRM
Full documentation: https://docs.suitecrm.com/
Requirements page of the official documentation: https://docs.suitecrm.com/admin/compatibility-matrix/
Installation guide: https://docs.suitecrm.com/admin/install … nstalling/. This inspired me to create an AUR package, it's clearly possible to have this installation process done by a package manager with the proper PKGBUILD.
Offline