packages/net/seafile-server/patches/025-command-names.patch
Jeffery To cbfd166b15 seafile-server: Update to 7.1.2, revamp package
* Package scripts that are shipped by upstream in their binary download

  * Includes setup scripts (setup-seafile.sh to use SQLite,
    setup-seafile-mysql.{sh,py} to use MySQL) and control scripts
    (seafile.sh, seahub.sh)

  * Does not include seafile-admin, which is not shipped in upstream's
    binary download. Combined with the fact that it hasn't been updated
    to Python 3 suggests the script has been abandoned.

* Replace previous init scripts with a simplified script

  * Previous init scripts (seafile.init, seahub.init) were modified from
    older versions of seafile.sh and seahub.sh, but they haven't kept up
    with changes to upstream's scripts

  * New init script (seafile-server.init) start/stops both Seafile and
    Seahub (there is no need to control them separately) by calling
    upstream's control scripts

* Replace previous package config file with new config file

  * Options in previous config file (seafile.conf) were mainly for using
    Seahub in FastCGI mode. FastCGI was deprecated in Django 1.7 and
    removed in 1.9; upstream's control script will only start Seahub
    using Gunicorn. (Options for Gunicorn including port number can be
    changed by editing /etc/seafile/conf/gunicorn.conf.py.)

  * New config file (seafile-server.config) has one option that controls
    where the Seafile/Seahub data directories are stored

* Patch scripts/binaries to use standard, system-wide directory
  locations

  * Script files (wrappers for binaries) in /usr/bin
  * Binaries (not meant to be run directly by the user) in /usr/libexec
  * Config files in /etc/seafile
  * Pid/socket files in /var/run/seafile
  * Logs in /var/log/seafile

* Include a new script to create the first admin account

  * With upstream's original scripts, the user is required to
    interactively create the first admin account when Seahub is started
    for the first time

  * The user will now use the new script (create-seafile-admin.sh) to
    create the first admin account after setup (using setup-seafile.sh
    or setup-seafile-mysql.sh) and before starting Seafile/Seahub

  * seahub.sh is patched to only check if there is at least one admin
    account and exit with an error if there is no admin account

* Remove build config options and add seafile-server-fuse package

  * The console option controls whether the console window is shown when
    Seafile server is run on Windows. It has no use on Linux.

  * The fuse option controls whether seaf-fuse is built. (seaf-fuse is a
    FUSE implementation that allows the Seafile database/file system to
    be mounted to a local directory.) seaf-fuse is now always built and
    is available in a separate package (seafile-server-fuse).

* Add myself as a maintainer

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-03-16 17:46:30 +08:00

180 lines
7.4 KiB
Diff

--- a/scripts/reset-admin.sh
+++ b/scripts/reset-admin.sh
@@ -37,7 +37,7 @@ function check_python_executable() {
function validate_seafile_data_dir () {
if [[ ! -d ${default_seafile_data_dir} ]]; then
echo "Error: there is no seafile server data directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit 1;
fi
--- a/scripts/seaf-fsck.sh
+++ b/scripts/seaf-fsck.sh
@@ -25,7 +25,7 @@ function usage () {
function validate_ccnet_conf_dir () {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit -1;
fi
@@ -34,7 +34,7 @@ function validate_ccnet_conf_dir () {
function validate_seafile_data_dir () {
if [[ ! -d ${default_seafile_data_dir} ]]; then
echo "Error: there is no seafile server data directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit 1;
fi
--- a/scripts/seaf-fuse.sh
+++ b/scripts/seaf-fuse.sh
@@ -41,7 +41,7 @@ fi
function validate_ccnet_conf_dir () {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit -1;
fi
@@ -50,7 +50,7 @@ function validate_ccnet_conf_dir () {
function validate_seafile_data_dir () {
if [[ ! -d ${default_seafile_data_dir} ]]; then
echo "Error: there is no seafile server data directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit 1;
fi
@@ -67,7 +67,7 @@ function validate_already_running () {
function warning_if_seafile_not_running () {
if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then
echo
- echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?"
+ echo "Warning: seafile-controller not running. Have you run \"service seafile-server start\" ?"
echo
fi
}
--- a/scripts/seaf-gc.sh
+++ b/scripts/seaf-gc.sh
@@ -27,7 +27,7 @@ function usage () {
function validate_ccnet_conf_dir () {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit -1;
fi
@@ -36,7 +36,7 @@ function validate_ccnet_conf_dir () {
function validate_seafile_data_dir () {
if [[ ! -d ${default_seafile_data_dir} ]]; then
echo "Error: there is no seafile server data directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit 1;
fi
@@ -58,7 +58,7 @@ function check_component_running() {
function validate_already_running () {
if pid=$(pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null); then
- echo "seafile server is still running, stop it by \"seafile.sh stop\""
+ echo "seafile server is still running, stop it by \"service seafile-server stop\""
echo
exit 1;
fi
--- a/scripts/seafile.sh
+++ b/scripts/seafile.sh
@@ -53,7 +53,7 @@ function validate_running_user () {
function validate_ccnet_conf_dir () {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit -1;
fi
@@ -62,7 +62,7 @@ function validate_ccnet_conf_dir () {
function validate_central_conf_dir () {
if [[ ! -d ${central_config_dir} ]]; then
echo "Error: there is no conf/ directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit -1;
fi
@@ -71,7 +71,7 @@ function validate_central_conf_dir () {
function validate_seafile_data_dir () {
if [[ ! -d ${default_seafile_data_dir} ]]; then
echo "Error: there is no seafile server data directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit 1;
fi
--- a/scripts/seahub.sh
+++ b/scripts/seahub.sh
@@ -78,7 +78,7 @@ function check_python_executable() {
function validate_ccnet_conf_dir () {
if [[ ! -d ${default_ccnet_conf_dir} ]]; then
echo "Error: there is no ccnet config directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit -1;
fi
@@ -87,7 +87,7 @@ function validate_ccnet_conf_dir () {
function validate_seafile_data_dir () {
if [[ ! -d ${default_seafile_data_dir} ]]; then
echo "Error: there is no seafile server data directory."
- echo "Have you run setup-seafile.sh before this?"
+ echo "Have you run setup-seafile before this?"
echo ""
exit 1;
fi
@@ -133,7 +133,7 @@ fi
function warning_if_seafile_not_running () {
if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then
echo
- echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?"
+ echo "Warning: seafile-controller not running. Have you run \"service seafile-server start\" ?"
echo
exit 1
fi
@@ -167,7 +167,7 @@ function start_seahub () {
sleep 5
if ! pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then
printf "\033[33mError:Seahub failed to start.\033[m\n"
- echo "Please try to run \"./seahub.sh start\" again"
+ echo "Please try to run \"service seafile-server start\" again"
exit 1;
fi
echo
--- a/scripts/setup-seafile-mysql.py
+++ b/scripts/setup-seafile-mysql.py
@@ -1557,8 +1557,7 @@ def report_success():
Your seafile server configuration has been finished successfully.
-----------------------------------------------------------------
-run seafile server: ./seafile.sh { start | stop | restart }
-run seahub server: ./seahub.sh { start <port> | stop | restart <port> }
+run seafile server: service seafile-server { start | stop | restart }
-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
--- a/scripts/setup-seafile.sh
+++ b/scripts/setup-seafile.sh
@@ -718,8 +718,7 @@ echo "----------------------------------
echo "Your seafile server configuration has been completed successfully."
echo "-----------------------------------------------------------------"
echo
-echo "run seafile server: ./seafile.sh { start | stop | restart }"
-echo "run seahub server: ./seahub.sh { start <port> | stop | restart <port> }"
+echo "run seafile server: service seafile-server { start | stop | restart }"
echo
echo "-----------------------------------------------------------------"
echo "If the server is behind a firewall, remember to open these tcp ports:"