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

.deb installer tends to overwrite configuration files in /etc/neo4j #6609

Open
astesin opened this issue Mar 6, 2016 · 1 comment
Open

Comments

@astesin
Copy link

astesin commented Mar 6, 2016

  • Neo4j version: 3.0.0-SNAPSHOT locally built Mar. 6, 2016
  • Operating system: Ubuntu 15/10
  • API/Driver: n/a

Steps to reproduce

$ sudo dpkg -i neo4j_3.0.0.SNAPSHOT_all.deb
(Reading database ... 93240 files and directories currently installed.)
Preparing to unpack neo4j_3.0.0.SNAPSHOT_all.deb ...
Unpacking neo4j (3.0.0.SNAPSHOT) over (3.0.0.SNAPSHOT) ...
Setting up neo4j (3.0.0.SNAPSHOT) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for man-db (2.7.4-1) ...
$ ls -la /etc/neo4j
total 36
drwxr-xr-x 3 neo4j adm 4096 Mar 6 19:52 .
drwxr-xr-x 101 root root 4096 Mar 6 19:52 ..
-rw-r--r-- 1 neo4j adm 4327 Mar 2 06:59 neo4j.conf
-rw-r--r-- 1 neo4j adm 1454 Mar 2 06:59 neo4j-http-logging.xml
-rw-r--r-- 1 neo4j adm 4479 Mar 6 17:59 neo4j-wrapper.conf
-rw-r--r-- 1 neo4j adm 566 Mar 2 06:59 README.txt
drwxr-xr-x 2 neo4j adm 4096 Mar 6 19:52 ssl

Configuration changes which were done with yesterday build, were overwritten by sample neo4j-wrapper.conf which came with the .deb package.

Expected behavior

Installer should install (and overwrite) configuration files which are stock/default for this exact release, naming those with suffix .sample, i.e.

neo4j.conf.sample
neo4j-wrapper.conf.sample

and overwrite actual config files only in the case they weren't present earlier (maybe issuing an appropriate warning because old config may not suite well for updated release)

[ -f /etc/neo4j/neo4j-wrapper.conf ] || cp /etc/neo4j/neo4j-wrapper.conf.sample /etc/neo4j/neo4j-wrapper.conf
[ -f /etc/neo4j/neo4j.conf ] || cp /etc/neo4j/neo4j.conf.sample /etc/neo4j/neo4j.conf
[ -f /etc/neo4j/neo4j-http-logging.xml ] || cp /etc/neo4j/neo4j-http-logging.xml.sample /etc/neo4j/neo4j-http-logging.xml

and leave *.sample config files to stay there around for future reference.

WBR,
Andrii

p.s. Also it seems to me that .deb package misses dependency on daemon package, though I'm not 100% sure on this.

@astesin
Copy link
Author

astesin commented Mar 7, 2016

Tested on another computer, and yes, dependency on daemon package does exist but is omitted somehow:

root@mynotebook:~/workspace/neo4j# dpkg -i ./packaging/installer-linux/installer-debian/target/neo4j_3.0.0.SNAPSHOT_all.deb
Selecting previously unselected package neo4j.
(Reading database ... 318112 files and directories currently installed.)
Preparing to unpack .../neo4j_3.0.0.SNAPSHOT_all.deb ...
Unpacking neo4j (3.0.0.SNAPSHOT) ...
dpkg: dependency problems prevent configuration of neo4j:
 neo4j depends on daemon; however:
  Package daemon is not installed.

dpkg: error processing package neo4j (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.4-1) ...
Errors were encountered while processing:
 neo4j
root@mynotebook:~/workspace/neo4j#

Obviously, apt-get install -f (which actually installs daemon package) and reinstall fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants