Merge branch 'master' of https://github.com/yacy/yacy_search_server.git
commit
893a40995a
@ -1,46 +1,49 @@
|
||||
# Build a docker image from latest YaCy sources
|
||||
|
||||
# Base image : latest stable Debian
|
||||
FROM debian:latest
|
||||
|
||||
# Install needed packages
|
||||
RUN apt-get update && apt-get install -yq \
|
||||
default-jdk \
|
||||
default-jre-headless \
|
||||
ant \
|
||||
git
|
||||
# Base image : latest stable official jdk image from Docker (Debian based)
|
||||
FROM java:latest
|
||||
|
||||
# Install needed packages not in base image
|
||||
RUN apt-get update && apt-get install -yq curl
|
||||
|
||||
# trace java version
|
||||
RUN java -version
|
||||
|
||||
# set current working dir
|
||||
WORKDIR /opt
|
||||
|
||||
# clone main YaCy git repository (we need to clone git repository to generate correct version when building from source)
|
||||
RUN git clone https://github.com/yacy/yacy_search_server.git
|
||||
# All in one step to reduce image size growth :
|
||||
# - install ant and git packages
|
||||
# - clone main YaCy git repository (we need to clone git repository to generate correct version when building from source)
|
||||
# - Compile with ant
|
||||
# - remove unnecessary and size consuming .git directory
|
||||
# - remove ant and git packages
|
||||
RUN apt-get update && \
|
||||
apt-get install -yq ant git && \
|
||||
git clone https://github.com/yacy/yacy_search_server.git && \
|
||||
ant compile -f /opt/yacy_search_server/build.xml && \
|
||||
rm -rf /opt/yacy_search_server/.git && \
|
||||
apt-get purge -yq --auto-remove ant git && \
|
||||
apt-get clean
|
||||
|
||||
# trace content of source directory
|
||||
RUN ls -la /opt/yacy_search_server
|
||||
|
||||
# set current working dir
|
||||
WORKDIR /opt/yacy_search_server
|
||||
|
||||
# Compile with ant
|
||||
RUN ant compile
|
||||
|
||||
# Set initial admin password : "docker" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
|
||||
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init
|
||||
|
||||
# make some cleaning to reduce image size
|
||||
RUN rm -rf .git \
|
||||
&& apt-get purge -yq --auto-remove \
|
||||
default-jdk \
|
||||
ant \
|
||||
git \
|
||||
&& apt-get clean
|
||||
# Create user and group yacy : this user will be used to run YaCy main process
|
||||
RUN adduser --system --group --no-create-home --disabled-password yacy
|
||||
|
||||
# Set ownership of yacy install directory to yacy user/group
|
||||
RUN chown yacy:yacy -R /opt/yacy_search_server
|
||||
|
||||
# Expose port 8090
|
||||
EXPOSE 8090
|
||||
|
||||
# Set data volume : can be used to persist yacy data and configuration
|
||||
# Set data volume : yacy data and configuration will persist aven after container stop or destruction
|
||||
VOLUME ["/opt/yacy_search_server/DATA"]
|
||||
|
||||
# Start yacy ind debug mode (-d) to display console logs and to wait for yacy process
|
||||
# Next commands run as yacy as non-root user for improved security
|
||||
USER yacy
|
||||
|
||||
# Start yacy in debug mode (-d) to display console logs and to wait for yacy process
|
||||
CMD sh /opt/yacy_search_server/startYACY.sh -d
|
||||
|
@ -0,0 +1,81 @@
|
||||
# Build a docker image from latest YaCy sources on Alpine Linux
|
||||
|
||||
# Base image : latest stable official jdk image from Docker based on Alpine Linux
|
||||
FROM java:alpine
|
||||
|
||||
# trace java version
|
||||
RUN java -version
|
||||
|
||||
# Install needed packages not in base image
|
||||
RUN apk update && \
|
||||
apk add --no-cache curl
|
||||
|
||||
# set current working dir
|
||||
WORKDIR /tmp
|
||||
|
||||
# --- Begin of apache ant install : from binary distribution because ant is not in alpine packages
|
||||
|
||||
# set ant version once in a environment variable
|
||||
ENV ANT_VERSION 1.9.7
|
||||
|
||||
# All in one step to reduce image size growth :
|
||||
# - add gnupg package
|
||||
# - get ant binary file from a mirror and PGP file signature from main repository
|
||||
# - import gpg keys from main repository and verify binary file signature
|
||||
# - extract binary, make /opt directory, move extracted ant to /opt/ant
|
||||
# - remove archive and gnupg package
|
||||
RUN apk update && \
|
||||
apk add --no-cache gnupg && \
|
||||
curl -fSL http://www.eu.apache.org/dist//ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz -o apache-ant-${ANT_VERSION}-bin.tar.gz && \
|
||||
curl -fSL https://www.apache.org/dist/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz.asc -o apache-ant-${ANT_VERSION}-bin.tar.gz.asc && \
|
||||
curl -fSL https://www.apache.org/dist/ant/KEYS | gpg --import && \
|
||||
gpg --verify apache-ant-${ANT_VERSION}-bin.tar.gz.asc && \
|
||||
tar xzf apache-ant-${ANT_VERSION}-bin.tar.gz && \
|
||||
mkdir /opt && \
|
||||
mv apache-ant-${ANT_VERSION} /opt/ant && \
|
||||
rm -f apache-ant-${ANT_VERSION}-bin.tar.gz && \
|
||||
apk del gnupg
|
||||
|
||||
# set ant required environment variables
|
||||
ENV ANT_HOME /opt/ant
|
||||
ENV PATH ${PATH}:/opt/ant/bin
|
||||
|
||||
# --- End of apache ant install
|
||||
|
||||
# set current working dir
|
||||
WORKDIR /opt
|
||||
|
||||
# All in one step to reduce image size growth :
|
||||
# - add git package
|
||||
# - clone main YaCy git repository (we need to clone git repository to generate correct version when building from source)
|
||||
# - compile with apache ant
|
||||
# - remove unnecessary and size consuming .git directory
|
||||
# - delete git package and ant binary install
|
||||
RUN apk update && \
|
||||
apk add --no-cache git && \
|
||||
git clone https://github.com/yacy/yacy_search_server.git && \
|
||||
ant compile -f /opt/yacy_search_server/build.xml && \
|
||||
rm -rf /opt/yacy_search_server/.git && \
|
||||
rm -rf /opt/ant && \
|
||||
apk del git
|
||||
|
||||
# Set initial admin password : "docker" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
|
||||
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:e672161ffdce91be4678605f4f4e6786" /opt/yacy_search_server/defaults/yacy.init
|
||||
|
||||
# Create user and group yacy : this user will be used to run YaCy main process
|
||||
RUN addgroup yacy && adduser -S -G yacy -H -D yacy
|
||||
|
||||
# Set ownership of yacy install directory to yacy user/group
|
||||
RUN chown yacy:yacy -R /opt/yacy_search_server
|
||||
|
||||
# Expose port 8090
|
||||
EXPOSE 8090
|
||||
|
||||
# Set data volume : yacy data and configuration will persist aven after container stop or destruction
|
||||
VOLUME ["/opt/yacy_search_server/DATA"]
|
||||
|
||||
# Next commands run as yacy as non-root user for improved security
|
||||
USER yacy
|
||||
|
||||
# Start yacy in debug mode (-d) to display console logs and to wait for yacy process
|
||||
CMD sh /opt/yacy_search_server/startYACY.sh -d
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,233 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>YaCy JavaScript license information</title>
|
||||
#%env/templates/metas.template%#
|
||||
</head>
|
||||
<body id="jslicense">
|
||||
#%env/templates/simpleheader.template%#
|
||||
<h1>YaCy JavaScript files license information</h1>
|
||||
<table id="jslicense-labels1">
|
||||
<tr>
|
||||
<th>Script</th>
|
||||
<th>License</th>
|
||||
<th>Source</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/jquery.min.js">jquery.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://code.jquery.com/jquery-1.11.0.js">jquery-1.11.0.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/bootstrap.min.js">bootstrap.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/env/bootstrap/js/bootstrap.js">bootstrap.js</a> (3.3.6)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/bootstrap-switch.min.js">bootstrap-switch.min.js</a></td>
|
||||
<td><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0</a></td>
|
||||
<td><a href="/env/bootstrap/js/bootstrap-switch.js">bootstrap-switch.js</a> (3.0.0)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/docs.min.js">docs.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/imsky/holder/v2.3.1/holder.js">holder.js</a> (2.3.1)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/html5shiv.js">html5shiv.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/aFarkas/html5shiv/3.7.0/src/html5shiv.js">html5shiv.js</a> (3.7.0)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/respond.min.js">respond.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://github.com/scottjehl/Respond/blob/1.4.2/dest/respond.src.js">respond.src.js</a> (1.4.2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/typeahead.jquery.min.js">typeahead.jquery.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://github.com/twitter/typeahead.js/blob/v0.10.2/dist/typeahead.jquery.js">typeahead.jquery.js</a> (0.10.2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/flexigrid/js/flexigrid.pack.js">flexigrid.pack.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/flexigrid/flexigrid-1.1.zip">flexigrid-1.1.zip</a> (0.10.2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery-1.7.min.js">jquery-1.7.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://code.jquery.com/jquery-1.7.js">jquery-1.7.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery-ui-1.8.16.custom.min.js">jquery-ui-1.8.16.custom.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://code.jquery.com/ui/1.8.16/jquery-ui.js">jquery-ui.js</a> (1.8.16)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery-ui-combobox.js">jquery-ui-combobox.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/jquery/js/jquery-ui-combobox.js">jquery-ui-combobox.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.field-0.9.2.min.js">jquery.field-0.9.2.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/jquery/js/jquery.field-0.9.2.min.js">jquery.field-0.9.2.min.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.form-2.73.js">jquery.form-2.73.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/jquery/js/jquery.form-2.73.js">jquery.form-2.73.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.multiselect.filter.min.js">jquery.multiselect.filter.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/ehynds/jquery-ui-multiselect-widget/1.11/src/jquery.multiselect.filter.js">jquery.multiselect.filter.js</a> (1.3)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.multiselect.min.js">jquery.multiselect.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/ehynds/jquery-ui-multiselect-widget/4e1c524663150108c9c6f446252ebd48e870ab34/src/jquery.multiselect.js">jquery.multiselect.js</a> (1.12pre)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.query-2.1.7.js">jquery.query-2.1.7.js</a></td>
|
||||
<td><a href="http://www.wtfpl.net/txt/copying/">WTFPL</a></td>
|
||||
<td><a href="/jquery/js/jquery.query-2.1.7.js">jquery.query-2.1.7.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.rdfquery.core-1.0.js">jquery.rdfquery.core-1.0.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/jquery/js/jquery.rdfquery.core-1.0.js">jquery.rdfquery.core-1.0.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/jquery/js/jquery.tagsinput.min.js">jquery.tagsinput.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/jquery/js/jquery.tagsinput.min.js">jquery.tagsinput.min.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/env/bootstrap/js/typeahead.jquery.min.js">typeahead.jquery.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/env/bootstrap/js/typeahead.jquery.js">typeahead.jquery.js</a> (0.10.2)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/d3.v3.min.js">d3.v3.min.js</a></td>
|
||||
<td><a href="http://opensource.org/licenses/BSD-3-Clause">Modified-BSD</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/d3/d3.github.com/b3382f60bf721923c7c649709adcfb4c8b66d994/d3.v3.js">d3.v3.js</a> (3.4.4)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/highslide/highslide.js">highslide.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/js/highslide/highslide.js">highslide.js</a> (4.1.13)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/morris.js">morris.js</a></td>
|
||||
<td><a href="http://www.freebsd.org/copyright/freebsd-license.html">FreeBSD</a></td>
|
||||
<td><a href="/js/morris.js">morris.js</a> (4.1.13)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/raphael-min.js">raphael-min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/DmitryBaranovskiy/raphael/v2.1.3/raphael.js">raphael.js</a> (2.1.3)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/sorttable.js">sorttable.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/js/sorttable.js">sorttable.js</a> (2.1.3)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/ajax.js">ajax.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/ajax.js">ajax.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/Bookmarks.js">Bookmarks.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/Bookmarks.js">Bookmarks.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/Crawler.js">Crawler.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/Crawler.js">Crawler.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/html.js">html.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/html.js">html.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/hypertree.js">hypertree.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/hypertree.js">hypertree.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/IndexCreate.js">IndexCreate.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/IndexCreate.js">IndexCreate.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/query.js">query.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/query.js">query.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/rss2.js">rss2.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/rss2.js">rss2.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/WatchWebStructure.js">WatchWebStructure.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/WatchWebStructure.js">WatchWebStructure.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/xml.js">xml.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/xml.js">xml.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/yacy-ymarks-bookmark-actions.js">yacy-ymarks-bookmark-actions.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/yacy-ymarks-bookmark-actions.js">yacy-ymarks-bookmark-actions.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/yacy-ymarks-tag-actions.js">yacy-ymarks-tag-actions.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/yacy-ymarks-tag-actions.js">yacy-ymarks-tag-actions.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/yacy-ymarks.js">yacy-ymarks.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/yacy-ymarks.js">yacy-ymarks.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/yacyinteractive.js">yacyinteractive.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/yacyinteractive.js">yacyinteractive.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/js/yacysearch.js">yacysearch.js</a></td>
|
||||
<td><a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU-GPL-2.0-or-later</a></td>
|
||||
<td><a href="/js/yacysearch.js">yacysearch.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/portalsearch/yacy-portalsearch.js">yacy-portalsearch.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/portalsearch/yacy-portalsearch.js">yacy-portalsearch.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/yacy/ui/js/jquery.colorpicker.js">jquery.colorpicker.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/yacy/ui/js/jquery.colorpicker.js">jquery.colorpicker.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/yacy/ui/js/jquery.dimensions.min.js">jquery.dimensions.min.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="https://raw.githubusercontent.com/johnantoni/jquery.dimensions/master/jquery.dimensions.js">jquery.dimensions.js</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="/yacy/ui/js/jquery.tagcloud.js">jquery.tagcloud.js</a></td>
|
||||
<td><a href="http://www.jclark.com/xml/copying.txt">Expat</a></td>
|
||||
<td><a href="/yacy/ui/js/jquery.tagcloud.js">jquery.tagcloud.js</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,49 @@
|
||||
// jslicense.java
|
||||
// -----------------------
|
||||
// (C) 2009 by Michael Peter Christen; mc@yacy.net, Frankfurt a. M., Germany
|
||||
// first published 07.04.2005 on http://yacy.net
|
||||
//
|
||||
// This is a part of YaCy, a peer-to-peer based web search engine
|
||||
//
|
||||
// This File is contributed by luc
|
||||
//
|
||||
// $LastChangedDate$
|
||||
// $LastChangedRevision$
|
||||
// $LastChangedBy$
|
||||
//
|
||||
// LICENSE
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
import net.yacy.cora.protocol.RequestHeader;
|
||||
import net.yacy.server.serverObjects;
|
||||
import net.yacy.server.serverSwitch;
|
||||
|
||||
/**
|
||||
* Produces YaCy JavaScript license information page (sse jslicense.html).
|
||||
* @author luc
|
||||
*
|
||||
*/
|
||||
public class jslicense {
|
||||
|
||||
/**
|
||||
* @param header request headers
|
||||
* @param post post parameters
|
||||
* @param env server environment
|
||||
*/
|
||||
public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
|
||||
return new serverObjects();
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package net.yacy.crawler;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import net.yacy.cora.document.id.DigestURL;
|
||||
import net.yacy.cora.util.SpaceExceededException;
|
||||
import net.yacy.crawler.retrieval.Request;
|
||||
import net.yacy.crawler.robots.RobotsTxt;
|
||||
import net.yacy.data.WorkTables;
|
||||
import static net.yacy.kelondro.util.FileUtils.deletedelete;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class HostBalancerTest {
|
||||
|
||||
final File queuesRoot = new File("test/DATA/INDEX/QUEUES");
|
||||
final File datadir = new File("test/DATA");
|
||||
|
||||
/**
|
||||
* Test of reopen existing HostBalancer cache to test/demonstrate issue with
|
||||
* HostQueue for file: protocol
|
||||
*/
|
||||
@Test
|
||||
public void testReopen() throws IOException, SpaceExceededException, InterruptedException {
|
||||
boolean exceed134217727 = true;
|
||||
int onDemandLimit = 1000;
|
||||
String hostDir = "C:\\filedirectory";
|
||||
|
||||
// prepare one urls for push test
|
||||
String urlstr = "file:///" + hostDir;
|
||||
DigestURL url = new DigestURL(urlstr);
|
||||
Request req = new Request(url, null);
|
||||
|
||||
deletedelete(queuesRoot); // start clean test
|
||||
|
||||
HostBalancer hb = new HostBalancer(queuesRoot, onDemandLimit, exceed134217727);
|
||||
Thread.sleep(100); // wait for file operation
|
||||
hb.clear();
|
||||
|
||||
Thread.sleep(100);
|
||||
assertEquals("After clear", 0, hb.size());
|
||||
|
||||
WorkTables wt = new WorkTables(datadir);
|
||||
RobotsTxt rob = new RobotsTxt(wt, null);
|
||||
|
||||
String res = hb.push(req, null, rob); // push url
|
||||
assertNull(res); // should have no error text
|
||||
assertTrue(hb.has(url.hash())); // check existence
|
||||
assertEquals("first push of one url", 1, hb.size()); // expected size=1
|
||||
|
||||
res = hb.push(req, null, rob); // push same url (should be rejected = double occurence)
|
||||
assertNotNull(res); // should state double occurrence
|
||||
assertTrue(hb.has(url.hash()));
|
||||
assertEquals("second push of same url", 1, hb.size());
|
||||
|
||||
hb.close(); // close
|
||||
|
||||
Thread.sleep(200); // wait a bit for file operation
|
||||
|
||||
hb = new HostBalancer(queuesRoot, onDemandLimit, exceed134217727); // reopen balancer
|
||||
Thread.sleep(200); // wait a bit for file operation
|
||||
|
||||
assertEquals("size after reopen (with one existing url)", 1, hb.size()); // expect size=1 from previous push
|
||||
assertTrue("check existance of pushed url", hb.has(url.hash())); // check url exists (it fails as after reopen internal queue.hosthash is wrong)
|
||||
|
||||
res = hb.push(req, null, rob); // push same url as before (should be rejected, but isn't due to hosthash mismatch afte reopen)
|
||||
assertNotNull("should state double occurence", res);
|
||||
assertEquals("first push of same url after reopen", 1, hb.size()); // should stay size=1
|
||||
assertTrue("check existance of pushed url", hb.has(url.hash()));
|
||||
|
||||
res = hb.push(req, null, rob);
|
||||
assertNotNull("should state double occurence", res);
|
||||
assertTrue("check existance of pushed url", hb.has(url.hash()));
|
||||
assertEquals("second push of same url after reopen", 1, hb.size()); // double check, should stay size=1
|
||||
|
||||
// list all urls in hostbalancer
|
||||
Iterator<Request> it = hb.iterator();
|
||||
while (it.hasNext()) {
|
||||
Request rres = it.next();
|
||||
System.out.println(rres.toString());
|
||||
}
|
||||
hb.close();
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in new issue