Bug 9749 - Placeholders in koha-conf.xml generated by the Debian packages
Summary: Placeholders in koha-conf.xml generated by the Debian packages
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
: 12083 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-05 19:39 UTC by Magnus Enger
Modified: 2018-12-03 20:03 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2013-03-05 19:39:10 UTC
Bug 7028 updated the file debian/templates/koha-conf-site.xml.in to be more in line with the koha-conf.xml generated by other installation methods. However this seems to have introduced some placeholders that are not actually being replaced when a new instance is created with koha-create. Here is what I see with recently created instances, both with packages built off uptodate master and the official 3.8.x packages:

$ sudo grep "__" /etc/koha/sites/bergting/koha-conf.xml
<listen id="publicserver" >tcp:@:__ZEBRA_SRU_BIBLIOS_PORT__</listen>
<listen id="mergeserver">tcp:@:__MERGE_SERVER_PORT__</listen>
    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
            <host>__ZEBRA_SRU_HOST__</host>
            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-authorities.xml"
            <host>__ZEBRA_SRU_HOST__</host>
            <port>__ZEBRA_SRU_AUTHORITIES_PORT__</port>
    <xi:include href="__KOHA_CONF_DIR__/zebradb/explain-biblios.xml"
            <host>__ZEBRA_SRU_HOST__</host>
            <port>__ZEBRA_SRU_BIBLIOS_PORT__</port>
 <!-- <pazpar2url>http://__PAZPAR2_HOST__:__PAZPAR2_PORT__/search.pz2</pazpar2url> -->

koha-create does these substitutions:

    sed -e "s/__KOHASITE__/$name/g" \
        -e "s/__OPACPORT__/$OPACPORT/g" \
        -e "s/__INTRAPORT__/$INTRAPORT/g" \
        -e "s/__OPACSERVER__/$opacdomain/g" \
        -e "s/__INTRASERVER__/$intradomain/g" \
        -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
        -e "s/__ZEBRA_MARC_FORMAT__/$ZEBRA_MARC_FORMAT/g" \
        -e "s/__ZEBRA_LANGUAGE__/$ZEBRA_LANGUAGE/g" \
        -e "s/__DB_NAME__/$mysqldb/g" \
        -e "s/__DB_HOST__/$mysqlhost/g" \
        -e "s/__DB_USER__/$mysqluser/g" \
        -e "s/__DB_PASS__/$mysqlpwd/g" \
        -e "s/__UNIXUSER__/$username/g" \
        -e "s/__UNIXGROUP__/$username/g" \
        "/etc/koha/$1" > "$2"

So unless I am missing something we should perhaps remove some of the placeholders from koha-conf-site.xml.in again? 

The slightly weird thing is that all these placeholders do not seem to affect Koha in any way...
Comment 1 Magnus Enger 2014-04-16 20:24:53 UTC
*** Bug 12083 has been marked as a duplicate of this bug. ***
Comment 2 Mason James 2014-04-21 20:45:39 UTC
> So unless I am missing something we should perhaps remove some of the
> placeholders from koha-conf-site.xml.in again? 
> 
> The slightly weird thing is that all these placeholders do not seem to
> affect Koha in any way...

i have experienced this bug too

the glitchy config files have caused non-working zebras for me

i think the fix is to patch koha-create to correctly substitute the missing placeholders, rather than remove them
Comment 3 Robin Sheat 2014-04-22 02:32:49 UTC
(In reply to Mason James from comment #2)
> i have experienced this bug too
> 
> the glitchy config files have caused non-working zebras for me
> 
> i think the fix is to patch koha-create to correctly substitute the missing
> placeholders, rather than remove them

Are you sure? You'll have to point out what placeholders weren't filled in that were needed, as I just checked one of my systems and all the placeholders were in commented out sections of koha-conf.xml.

Many of them can't be generated by koha-create, as we can't know what they'll be.
Comment 4 Magnus Enger 2018-05-16 09:04:39 UTC
Looking at one of my oldest instances, all the placeholders there are also in commented sections, so I guess we can close this.