Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 111963 | Differences between
and this patch

Collapse All | Expand All

(-)hsqldb-1.7.3.1-r1.ebuild (-3 / +32 lines)
Lines 10-16 Link Here
10
10
11
LICENSE="as-is"
11
LICENSE="as-is"
12
SLOT="0"
12
SLOT="0"
13
KEYWORDS="x86 amd64 ppc64 sparc ppc"
13
KEYWORDS="~x86"
14
IUSE="doc jikes source"
14
IUSE="doc jikes source"
15
15
16
RDEPEND=">=virtual/jre-1.4
16
RDEPEND=">=virtual/jre-1.4
Lines 44-50 Link Here
44
	einfo "Preparing configuration files..."
44
	einfo "Preparing configuration files..."
45
	mkdir conf
45
	mkdir conf
46
	HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
46
	HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
47
	sed -e 's:^JAVA_EXECUTABLE=.*$:JAVA_EXECUTABLE=$(which java 2>/dev/null):g' \
47
	sed -e 's:^JAVA_EXECUTABLE=.*$:JAVA_EXECUTABLE=$(java-config --java 2>/dev/null):g' \
48
		-e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${HSQLDB_JAR//\//\\/}/g" \
48
		-e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${HSQLDB_JAR//\//\\/}/g" \
49
		-e "s/^SERVER_HOME=.*$/SERVER_HOME=\/var\/lib\/hsqldb/g" \
49
		-e "s/^SERVER_HOME=.*$/SERVER_HOME=\/var\/lib\/hsqldb/g" \
50
		-e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \
50
		-e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \
Lines 74-81 Link Here
74
	doinitd ${FILESDIR}/hsqldb
74
	doinitd ${FILESDIR}/hsqldb
75
	doconfd conf/hsqldb
75
	doconfd conf/hsqldb
76
	insinto /etc/hsqldb
76
	insinto /etc/hsqldb
77
	insopts -m 0600
77
	# Change the ownership of server.properties and sqltool.rc
78
	# files to hsqldb:hsqldb. (resolves Bug #111963)
79
	insopts -m 0600 -o hsqldb -g hsqldb
78
	doins conf/server.properties
80
	doins conf/server.properties
81
	insopts -m 0600 -o hsqldb -g hsqldb
79
	doins conf/sqltool.rc
82
	doins conf/sqltool.rc
80
83
81
	dodir /var/lib/hsqldb/bin
84
	dodir /var/lib/hsqldb/bin
Lines 88-90 Link Here
88
	chmod o-rwx ${D}/var/lib/hsqldb
91
	chmod o-rwx ${D}/var/lib/hsqldb
89
}
92
}
90
93
94
pkg_postinst() {
95
	ewarn "If you intend to run hsqldb in Server mode and you want to create"
96
	ewarn "additional databases, remember to put correct information in both"
97
	ewarn "'server.properties' and 'sqltool.rc' files."
98
	ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3."
99
	ewarn "UNIX Quick Start' in the hsqldb docs for more information)"
100
	einfo ""
101
	einfo "Example:"
102
	einfo ""
103
	einfo "/etc/hsqldb/server.properties"
104
	einfo "============================="
105
	einfo "server.database.1=file:/var/lib/hsqldb/newdb/newdb"
106
	einfo "server.dbname.1=newdb"
107
	einfo "server.urlid.1=newdb"
108
	einfo ""
109
	einfo "/etc/hsqldb/sqltool.rc"
110
	einfo "======================"
111
	einfo "urlid newdb"
112
	einfo "url jdbc:hsqldb:hsql://localhost/newdb"
113
	einfo "username sa"
114
	einfo "password "
115
	ewarn ""
116
	ewarn "Also note that each hsqldb server can serve only up to 10"
117
	ewarn "different databases simultaneously (with consecutive {0-9}"
118
	ewarn "suffixes in the 'server.properties' file)."
119
}

Return to bug 111963