Koha/debian
Andreas Roussos f12dabe6cc Bug 21440: koha-create expects the file passed by $DEFAULTSQL to be in gzip format
koha-create contains a call to `zcat` which fails if the file passed
as an argument is not in gzip format.

This patch fixes the issue by adding the -f flag to the zcat call in
koha-create, as per the top-voted answers in the following SE URLs:
https://unix.stackexchange.com/a/77309
https://unix.stackexchange.com/a/131944

Test plan:
1) in /etc/koha/koha-sites.conf, set the DEFAULTSQL variable to point
   to an _uncompressed_ SQL database dump
2) run `koha-create --create-db instance` and notice how it fails with:
   gzip: /path/to/dump.sql: not in gzip format
3) apply the patch
4) notice the extra line of information "The SQL file can be optionally
   compressed with gzip" in koha-sites.conf
5) run the `koha-create` command again, this time it should work
6) repeat with DEFAULTSQL pointing to a gzip'd dump, it should work too

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-09 09:59:10 +00:00
..
docs Bug 14302: (follow-up) Remove traces in koha-create 2018-08-31 11:24:22 +00:00
scripts Bug 21440: koha-create expects the file passed by $DEFAULTSQL to be in gzip format 2018-10-09 09:59:10 +00:00
source Bug 18696: Change debian/source/format to quilt 2018-01-19 15:14:05 -03:00
templates Bug 21440: koha-create expects the file passed by $DEFAULTSQL to be in gzip format 2018-10-09 09:59:10 +00:00
bd-to-depends Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
build-git-snapshot Bug 20019: use Modern::Perl in misc perl scripts 2018-02-05 09:47:08 -03:00
changelog Bug 17019 - debian/changelog update 2016-08-08 14:30:55 +00:00
compat Bug 18908: Warning "Compatibility levels before 9 are deprecated" 2018-03-19 13:55:47 -03:00
control Bug 17084: Automatic debian/control updates (unstable/master) 2018-08-31 12:46:53 +00:00
control.in Bug 20801: Make dependency on memcached mandatory 2018-05-22 11:19:59 -03:00
copyright
koha-common.bash-completion Bug 17468: Remove koha-*-zebra scripts and its traces 2018-03-26 17:31:27 -03:00
koha-common.config
koha-common.cron.d Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.cron.daily Bug 21235: Remove table services_throttle 2018-09-07 15:09:39 +00:00
koha-common.cron.hourly Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.cron.monthly Bug 17717: Make cronjobs using koha-foreach use --chdir 2018-03-15 08:22:04 +00:00
koha-common.default Bug 16830: Remove -x usage on koha-indexer 2016-08-04 19:41:41 +00:00
koha-common.dirs Bug 17951: Make koha-create set template_cache_dir correctly 2017-12-22 13:15:39 -03:00
koha-common.docs
koha-common.init Bug 18250: Update LSB block of koha-common init script 2018-07-12 13:11:16 +00:00
koha-common.install Bug 17468: Remove koha-*-zebra scripts and its traces 2018-03-26 17:31:27 -03:00
koha-common.links Bug 17468: Remove koha-*-zebra scripts and its traces 2018-03-26 17:31:27 -03:00
koha-common.logrotate Bug 19610: Make koha-common.logrotate use copytruncate 2018-02-27 15:58:33 -03:00
koha-common.postinst Bug 14302: Remove GRS1 specific code 2018-08-31 11:24:20 +00:00
koha-common.preinst
koha-common.README.Debian
koha-common.templates
koha-post-install-setup
koha.apache-ports
koha.config
koha.dirs
koha.install Bug 14302: Remove GRS1 specific code 2018-08-31 11:24:20 +00:00
koha.postinst
koha.postrm
koha.prerm
koha.README.Debian
list-deps Bug 20800: Keep Koha on Stretch from using broken libhttp-oai-perl 2018-05-22 11:19:49 -03:00
README.build
rules
unavailable.html
update-control

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.