Summary: | koha-create should set upload_path in koha-conf.xml | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Command-line Utilities | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | jonathan.druart, julian.maurice, m.de.rooy, robin, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6874 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 14674: koha-create should populate upload_path
Bug 14674: koha-create should populate upload_path Bug 14674: [QA Follow-up] Typos and textual adjustment Bug 14674: koha-create should populate upload_path Bug 14674: [QA Follow-up] Typos and textual adjustment |
Description
Tomás Cohen Arazi (tcohen)
2015-08-11 16:02:22 UTC
What about /usr/share/koha_$instance_upload ? Note that it would preferably be a folder that is NOT shared between instances. For simplicity I would recommend that each instance, which has its own upload table, also has its own upload folder. In /var/lib/koha/instace/upload_dir please ☺ (In reply to Marcel de Rooy from comment #1) > What about /usr/share/koha_$instance_upload ? Writeable stuff under /usr/share is very non-standard. On larger unixy systems, it's not uncommon for that to be read-only. This is what /var is for. My suggestion would simply be /var/lib/koha/[instance]/uploads Created attachment 43630 [details] [review] Bug 14674: koha-create should populate upload_path This patch makes koha-create and koha-create-dirs aware of the new upload_path configuration entry. It defaults to /var/lib/koha/<instance>/uploads as proposed by Robin but lets the user specify its own directory, using the --upload-path option switch that is added by this patch. koha-create-dirs is tweaked so it also creates this new directory. The docs are updated accordingly. To test: - Apply the patch, have a packages setup (either by grabbing the relevant files [1] or by creating your own package). - Run koha-create --create-db instance => SUCCESS: /var/lib/koha/instance/uploads directory is created => SUCCESS: /etc/koha/sites/instance/koha-config.xml has upload_path set correctly - Create a new instance using the --upload-path making it point to whatever you want => SUCCESS: koha-conf.xml points to your chosen path - Sign off :-D Regards Sponsored-by: Universidad Nacional de Cordoba debian/scripts/koha-create: line 294: local: `=upload21': not a valid identifier Trivial typo in the routine set_upload_path: remove the $ from instance sed: -e expression #26, char 20: unknown option to `s' Not sure why this comes up But it appears to be something with the new line: -e "s/__UPLOAD_PATH__/$UPLOAD_PATH/g" \ (In reply to Marcel de Rooy from comment #6) > debian/scripts/koha-create: line 294: local: `=upload21': not a valid > identifier > Trivial typo in the routine set_upload_path: remove the $ from instance > > sed: -e expression #26, char 20: unknown option to `s' > Not sure why this comes up > But it appears to be something with the new line: > -e "s/__UPLOAD_PATH__/$UPLOAD_PATH/g" \ I bet that the / in the path are confusing sed. (In reply to Robin Sheat from comment #7) > I bet that the / in the path are confusing sed. Probably. Created attachment 43802 [details] [review] Bug 14674: koha-create should populate upload_path This patch makes koha-create and koha-create-dirs aware of the new upload_path configuration entry. It defaults to /var/lib/koha/<instance>/uploads as proposed by Robin but lets the user specify its own directory, using the --upload-path option switch that is added by this patch. koha-create-dirs is tweaked so it also creates this new directory. The docs are updated accordingly. To test: - Apply the patch, have a packages setup (either by grabbing the relevant files [1] or by creating your own package). - Run koha-create --create-db instance => SUCCESS: /var/lib/koha/instance/uploads directory is created => SUCCESS: /etc/koha/sites/instance/koha-config.xml has upload_path set correctly - Create a new instance using the --upload-path making it point to whatever you want => SUCCESS: koha-conf.xml points to your chosen path - Sign off :-D Regards Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Does not work in its current state. Needs a follow-up. Created attachment 43803 [details] [review] Bug 14674: [QA Follow-up] Typos and textual adjustment This patch does: [1] Resolve error [koha-create: line 294: local: `=upload21': not a valid identifier] by replacing $instance by instance. [2] Resolved typo for 'specify'. [3] Resolve error: [sed: -e expression #26, char 20: unknown option to `s'] by replacing the slash in the sed line by a #. This makes sed not stumble over the slashes in the upload path. [4] Added the aspect of permanent storage in the wording (as opposed to the storage of temporary uploads in /tmp or similar). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Verified that koha-create now inserts the right path in koha-conf.xml. Verified that koha-create-dirs created the new uploads directory. Created attachment 43818 [details] [review] Bug 14674: koha-create should populate upload_path This patch makes koha-create and koha-create-dirs aware of the new upload_path configuration entry. It defaults to /var/lib/koha/<instance>/uploads as proposed by Robin but lets the user specify its own directory, using the --upload-path option switch that is added by this patch. koha-create-dirs is tweaked so it also creates this new directory. The docs are updated accordingly. To test: - Apply the patch, have a packages setup (either by grabbing the relevant files [1] or by creating your own package). - Run koha-create --create-db instance => SUCCESS: /var/lib/koha/instance/uploads directory is created => SUCCESS: /etc/koha/sites/instance/koha-config.xml has upload_path set correctly - Create a new instance using the --upload-path making it point to whatever you want => SUCCESS: koha-conf.xml points to your chosen path - Sign off :-D Regards Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Does not work in its current state. Needs a follow-up. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 43819 [details] [review] Bug 14674: [QA Follow-up] Typos and textual adjustment This patch does: [1] Resolve error [koha-create: line 294: local: `=upload21': not a valid identifier] by replacing $instance by instance. [2] Resolved typo for 'specify'. [3] Resolve error: [sed: -e expression #26, char 20: unknown option to `s'] by replacing the slash in the sed line by a #. This makes sed not stumble over the slashes in the upload path. [4] Added the aspect of permanent storage in the wording (as opposed to the storage of temporary uploads in /tmp or similar). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Verified that koha-create now inserts the right path in koha-conf.xml. Verified that koha-create-dirs created the new uploads directory. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Patches pushed to master. Thanks for the followup, Marcel! |