Koha/debian
Magnus Enger ae8223e333 Bug 17265 - Make koha-create-defaults less greedy
koha-create-defaults substitutes the instance name with the placeholder
__KOHASITE__ in the SQL file that it creates. If the instance name is
something common, like "data", this means that way too many substitutions
will be made, and when koha-create uses the SQL file as a template, broken
data can be the result.

The solution in this patch was suggested by drojf on IRC.

To test:
- Create an instance called "data"
- Run "sudo koha-dump-defaults data > test.sql"
- Take a look at test.sql and verify there are way too many occurences
  of __KOHASITE__, like "-- Dumping __KOHASITE__ for table `accountlines`"
- Apply the patch
- Copy the resulting koha-create and koha-dump-defaults to somewhere
  running off the packages
- Run "sudo koha-dump-defaults data > test.sql" again and verify there
  are only 4 occurrences of __KOHASITE__, in places that make sense
- Create an instance with something like:
  $ gzip test.sql
  $ sudo koha-create --create-db --defaultsql test.sql.gz test17265
- Verify that you have a working Koha install

Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 11:33:11 +00:00
..
docs Bug 17266 - Update man page for koha-remove with -p 2016-09-15 13:46:10 +00:00
scripts Bug 17265 - Make koha-create-defaults less greedy 2017-01-13 11:33:11 +00:00
source
templates Bug 13029 : Follow up 2016-12-16 11:33:39 +00:00
bd-to-depends
build-git-snapshot Bug 17013 - build-git-snapshot: add basetgz parameter and update master version number 2016-08-08 13:13:24 +00:00
changelog Bug 17019 - debian/changelog update 2016-08-08 14:30:55 +00:00
compat
control Bug 17084 - Automatic debian/control updates (unstable) 2016-11-02 10:59:28 +00:00
control.in Bug 15200 - t/Creators.t fails when using build-git-snapshot 2016-08-16 16:44:44 +00:00
copyright
koha-common.bash-completion
koha-common.config
koha-common.cron.d
koha-common.cron.daily Bug 17520: add serialsUpdate.pl to the list of regular cron jobs 2016-12-28 13:33:23 +00:00
koha-common.cron.hourly
koha-common.cron.monthly
koha-common.default
koha-common.dirs
koha-common.docs
koha-common.init Bug 16822: Make koha-common call koha-plack without --quiet 2016-09-09 09:27:45 +00:00
koha-common.install
koha-common.logrotate
koha-common.postinst
koha-common.preinst
koha-common.README.Debian
koha-common.templates
koha-post-install-setup
koha.apache-ports
koha.config
koha.dirs
koha.install
koha.postinst
koha.postrm
koha.prerm
koha.README.Debian
list-deps Bug 17085 - Specify libmojolicious-perl min version 2016-09-25 13:15:21 +00: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.