Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce DOKU_DATA and DOKU_CACHE variables for packaging #108

Closed
wants to merge 4 commits into from

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Jun 24, 2012

add new constants, that makes packaging (rpm, deb) dokuwiki better fit to FHS standards:

  • DOKU_DATA - /var/lib/dokuwiki/
  • DOKU_CACHE - /var/cache/dokuwiki/

add new constants, that makes packaging (rpm, deb) dokuwiki better fit
to [FHS standards](http://www.pathname.com/fhs/pub/fhs-2.3.html):
- DOKU_DATA - /var/lib/dokuwiki/
- DOKU_CACHE - /var/cache/dokuwiki/
this allows you to put 'cachedir' outside 'savedir', i.e
savedir=/var/lib/dokuwiki, and cachedir=/var/cache/dokuwiki
@splitbrain
Copy link
Collaborator

Both can be set via $conf options and that's what the Debian packages does AFAIK. I don't see why this is needed.

@splitbrain
Copy link
Collaborator

@glensc unless you can provide any more info why this would be needed I'll close this one soon.

@glensc
Copy link
Contributor Author

glensc commented Jul 6, 2012

i'll try to test with your proposed changes. however quick looking i would say that installed would still fail and plugins that use those constants directly

@michitux
Copy link
Collaborator

michitux commented Jul 6, 2012

@glensc Why are the new constants only defined and never used outside the installer? At least in the debian package, the installer is not used at all afaik.

@glensc
Copy link
Contributor Author

glensc commented Jul 7, 2012

well. okay, i can make dokuwiki to work with adding cachedir to config, but installer would be still needed to modify so it won't attempt to verify paths that have been relocated by the packager

/usr/share/dokuwiki/conf/ is not writable by DokuWiki. You need to fix the permission settings of this directory!

is located to /etc/webapps/dokuwiki

/usr/share/dokuwiki/data is not writable by DokuWiki. You need to fix the permission settings of this directory!

is relocated to /var/lib/dokuwiki

/usr/share/dokuwiki/data/cache is not writable by DokuWiki. You need to fix the permission settings of this directory!

is relocated to /var/cache/dokuwiki

so i think it's more cleaner to add few mode constants, then i can define them in preload.php and not modify install.php

altho i don't do preload.php trick right now (so confdir error is displayed), but i could try!

@glensc
Copy link
Contributor Author

glensc commented Jul 7, 2012

otoh, preload.php is not loaded by install...

@glensc
Copy link
Contributor Author

glensc commented Jul 8, 2012

okay, reprhase pull request:

add DOKU_DATA and DOKU_CACHE constants for installer.php, so changing their default location is minimal patching of code, i.e only their definition, instead trying to match all uses in the script.

thus, these constants are not needed outside installer.php

i suppose i can remove them from init.php then and keep only in install.php?

@splitbrain
Copy link
Collaborator

Okay we talked a bit more about this on IRC:

  • the installer is not intended to work in special setups, it just covers the most basic, most common setup
  • in general we prefer distributions to not use our installer at all, but use their own distribution specific way of configuring packages (eg.Debian's debconf, or a custom post-install script)
  • if you still think this is the way to go, then we suggest a new pull request where the $dirs array is moved to the global scope and up to the top, to function as the configuration of the installer. This way it should be easy to patch in your package preparation skeleton. No need for any changes in init.php

@splitbrain splitbrain closed this Jul 8, 2012
splitbrain added a commit that referenced this pull request Apr 9, 2020
Skip undefined schemas when search for columns
@glensc glensc deleted the doku_data branch March 30, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants