[Bug 14674] New: koha-create should set upload_path in koha-conf.xml
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Bug ID: 14674 Summary: koha-create should set upload_path in koha-conf.xml Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |6874 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6874 [Bug 6874] Attach files to bibliographic records -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |julian.maurice@biblibre.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |m.de.rooy@rijksmuseum.nl, | |tomascohen@gmail.com --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What about /usr/share/koha_$instance_upload ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- In /var/lib/koha/instace/upload_dir please ☺ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #4 from Robin Sheat <robin@catalyst.net.nz> --- (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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 43630 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43630&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_22_candidate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- 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" \ -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #7 from Robin Sheat <robin@catalyst.net.nz> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Robin Sheat from comment #7)
I bet that the / in the path are confusing sed.
Probably. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43630|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 43802 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43802&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 43803 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43803&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|julian.maurice@biblibre.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|6874 | Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6874 [Bug 6874] Attach files to bibliographic records -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6874 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43802|0 |1 is obsolete| | Attachment #43803|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43818 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43818&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 43819 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43819&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks for the followup, Marcel! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14674 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Component|Packaging |Command-line Utilities -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org