From: Art Cancro Date: Thu, 5 Aug 2021 05:10:16 +0000 (-0400) Subject: Abandoned the AppImage X-Git-Tag: v939~29 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=b4fbfa534369c2cc497031b715430bcd5ceb1348 Abandoned the AppImage --- diff --git a/appimage/.gitignore b/appimage/.gitignore deleted file mode 100644 index 8a7f3512c..000000000 --- a/appimage/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -citadel.AppDir/usr -Citadel-x86_64.AppImage diff --git a/appimage/README.txt b/appimage/README.txt deleted file mode 100644 index a2949fb36..000000000 --- a/appimage/README.txt +++ /dev/null @@ -1,42 +0,0 @@ -**************************************************************************************** -** DO NOT RUN THE APPIMAGE BUILD ON A PRODUCTION MACHINE! IT WILL ERASE YOUR DATA! ** -**************************************************************************************** - -The tooling in this directory can be used to build an AppImage, the entire Citadel System -distributed as a single binary file. Visit https://appimage.org/ to learn more about the -AppImage format and how it works. - -Again, do NOT try to build this on your production machine. For that matter, don't try -to build it on anything other than a dedicated build host. It may ERASE data you -intended to keep. - -If you're an end user you shouldn't have any need to do this at all. The whole point of -this is that we can supply ready-to-run binaries that will run on any Linux/Linux system -without modification or dependencies. If you are an end user, stop here, go download the -binary package, and use it. Enjoy it and have fun. - -Still with us? Then you must be a new member of the build team. So here's what you have -to do to build the binary: - -1. Download the Citadel source tree (if you're reading this, you've already done that). -2. Install all system dependencies. The same ones needed for Easy Install are fine. -3. Download and install "appimagetool" from appimage.org. -4. Run "./build_appimage.sh" - -What's going to happen next? - -1. Any existing /usr/local/citadel and /usr/local/webcit will be erased. -2. The script will go through the source tree, building and installing libcitadel, - the Citadel server, and WebCit into the /usr/local hierarchy. -3. All binaries, static data, and libraries will be copied into the citadel.AppDir - tree. -4. appimagetool will be called, and it will generate an executable with a - name like "Citadel-x64.AppImage". This is your distributable binary. Upload - it somewhere fun. - -You should be running this build on the OLDEST version of Linux/Linux on which your -binary should be able to run. The distribution does not matter -- for example, a -binary built on Debian should run fine on Ubuntu or Red Hat or whatever -- but the C -library and other very base system libraries are only upward compatible, not downward -compatible. For example, at the time of this writing, I am building on Ubuntu 16 and -it's early 2021. diff --git a/appimage/build_appimage.sh b/appimage/build_appimage.sh deleted file mode 100755 index 1a07c7c6a..000000000 --- a/appimage/build_appimage.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash - -# Work from the directory this script is in -APPIMAGE_BUILD_DIR=$(dirname $(readlink -f $0)) -cd $APPIMAGE_BUILD_DIR || exit 28 -echo APPIMAGE_BUILD_DIR is `pwd` - -# Remove old versions -rm -vf citadel-*appimage - -export CITADEL_BUILD_DIR=/tmp/citadel-build-$$ -export WEBCIT_BUILD_DIR=/tmp/webcit-build-$$ - -# libcitadel has to be built in a "real" library directory -pushd ../libcitadel || exit 1 -make distclean 2>/dev/null -./bootstrap || exit 2 -./configure || exit 3 -make || exit 4 -make install || exit 5 -popd - -# Build the text mode client -pushd ../textclient || exit 22 -make distclean 2>/dev/null -./bootstrap || exit 23 -./configure --prefix=`pwd` || exit 24 -make || exit 25 -popd - -# Build the Citadel server -pushd ../citadel || exit 6 -make distclean 2>/dev/null -./bootstrap || exit 7 -./configure --prefix=$CITADEL_BUILD_DIR || exit 8 -make || exit 9 -make install || exit 10 -popd - -# Build WebCit -pushd ../webcit || exit 11 -make distclean 2>/dev/null -./bootstrap || exit 12 -./configure --prefix=$WEBCIT_BUILD_DIR || exit 13 -make || exit 14 -make install || exit 15 -popd - -# Clear out any old versions in the AppDir -rm -frv citadel.AppDir/usr -mkdir -p citadel.AppDir/usr/bin -mkdir -p citadel.AppDir/usr/lib - -# Copy over all the libraries we used -for bin in \ - $CITADEL_BUILD_DIR/citserver \ - $WEBCIT_BUILD_DIR/webcit \ - $CITADEL_BUILD_DIR/ctdlmigrate \ - ../textclient/citadel \ - `which gdb` -do - ldd $bin -done | sort | while read libname junk libpath -do - if [ ! -e ${libpath} 2>/dev/null ] ; then - echo -e \\033[31m ${libname} was not found and will not be packaged. \\033[0m - elif grep ^${libname}$ excludelist >/dev/null 2>/dev/null ; then - echo -e \\033[33m ${libname} is in the exclude list and will not be packaged. \\033[0m - else - echo -e \\033[32m ${libname} will be packaged. \\033[0m - cp -L ${libpath} citadel.AppDir/usr/lib/ 2>/dev/null - fi -done -ldconfig -v citadel.AppDir/usr/lib - -# Copy over some utilities -for bin in db_dump db_load db_recover gdb -do - cp `which $bin` citadel.AppDir/usr/bin/ || exit 16 -done - -# Copy over the client -cp ../textclient/citadel citadel.AppDir/usr/bin/ || exit 26 -cp ../textclient/citadel.rc citadel.AppDir/ || exit 27 - -# Install the Citadel Server application tree -mkdir -p citadel.AppDir/usr/local/citadel || exit 17 -rsync -va $CITADEL_BUILD_DIR/ ./citadel.AppDir/usr/local/citadel/ || exit 18 - -# Install the WebCit application tree -mkdir -p citadel.AppDir/usr/local/webcit || exit 19 -rsync -va $WEBCIT_BUILD_DIR/ ./citadel.AppDir/usr/local/webcit/ || exit 20 - -# Remove the build directories -rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR - -cc ctdlvisor.c -o citadel.AppDir/usr/bin/ctdlvisor || exit 21 - -CPU=`uname -m` -basefilename=citadel-`cat ../release_version.txt` -if [ $CPU == x86_64 ] ; then - export ARCH=x86_64 -elif [ $CPU == armv7l ] ; then - export ARCH=arm -elif [ $CPU == aarch64 ] ; then - export ARCH=aarch64 -fi -echo ARCH: $ARCH -echo CPU: $CPU -appimagetool citadel.AppDir/ ${basefilename}-${CPU}.appimage diff --git a/appimage/citadel.AppDir/.DirIcon b/appimage/citadel.AppDir/.DirIcon deleted file mode 120000 index 98ba0b277..000000000 --- a/appimage/citadel.AppDir/.DirIcon +++ /dev/null @@ -1 +0,0 @@ -citadel.png \ No newline at end of file diff --git a/appimage/citadel.AppDir/AppRun b/appimage/citadel.AppDir/AppRun deleted file mode 100755 index 860b36b37..000000000 --- a/appimage/citadel.AppDir/AppRun +++ /dev/null @@ -1,258 +0,0 @@ -#!/bin/bash - -# This is an AppImage control script for the Citadel system. -# -# Copyright (c) 2021 by the citadel.org team -# -# This program is open source software. It runs great on the -# Linux operating system (and probably elsewhere). You can use, -# copy, and run it under the terms of the GNU General Public -# License version 3. -# -# 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. - -# Default values -HTTP_PORT=80 -HTTPS_PORT=443 -CTDL_DIR=/usr/local/citadel -export APPDIR -ulimit -c unlimited - -usage() { - echo ${APPIMAGE}: usage: ${APPIMAGE} '[-h data_directory] [-p http_port] [-s https_port] command' - echo 'command must be one of: run, test, install, database_cleanup, migrate' - exit 2 -} - - -# Permanently install the Citadel AppImage to this system -installation() { - - # Clear the screen and draw the banner - echo -e '\033[2J\033[H\033[44m\033[37m\033[K\033[0m' - echo -e '\033[44m\033[37m\033[1m Citadel installation\033[K\033[0m' - echo -e '\033[44m\033[37m \033[K\033[0m' - echo - - # First ... check to make sure Citadel isn't already running. - echo Checking to make sure Citadel is not already running... - if ps ax | grep citserver | grep -v grep ; then - echo - echo -e '\033[31m\033[1mInstallation cannot proceed while Citadel is running.\033[0m' - echo Stop your services and try again. - echo - exit 1 - fi - echo OK - echo - - # Check compatibility - echo Checking this AppImage compatibility with your host system... - ( - export LD_LIBRARY_PATH=$APPDIR/usr/lib - export PATH=$APPDIR/usr/bin - $APPDIR/usr/local/citadel/citserver -c || { - echo - echo -e '\033[31m\033[1mCompatibility failed.\033[0m' - echo 'This AppImage is not compatible with your system.' - echo 'If you are attempting to run it on a compatible platform, please make sure you' - echo 'have all of the latest updates and patches applied. Otherwise, you may have' - echo 'better luck with the Easy Install method.' - echo '' - exit 2 - } - ) || exit 2 - echo OK - echo - - # Clear the screen and draw the banner - echo -e '\033[2J\033[H\033[44m\033[37m\033[K\033[0m' - echo -e '\033[44m\033[37m\033[1m Citadel installation\033[K\033[0m' - echo -e '\033[44m\033[37m \033[K\033[0m' - echo - - # Locate the Citadel run directory - confirmed=0 - while [ ${confirmed} == 0 ] - do - echo -n In what directory will you run Citadel\? \[${CTDL_DIR}\]\ - read dir - if [ "${dir}" == "" ] - then - dir=${CTDL_DIR} - fi - if [ ! -d ${dir} ] - then - echo -n ${dir} does not exist. Do you want to create it\?\ - read yesno - if [ `echo ${yesno} | cut -c1` == 'y' ] - then - mkdir ${dir} - fi - fi - if [ -d ${dir} ] - then - confirmed=1 - fi - done - CTDL_DIR=${dir} - - # Check systemd - echo Checking this operating system for systemd... - systemctl --version >/dev/null 2>&1 || { - echo Automatic installation is only supported with systemd. - echo You can still run Citadel but you will need to start it some other way. - exit 3 - } | exit 3 - echo OK - echo - - # Remove old unit files - echo Checking for old startup files. - ls /etc/systemd/system/citadel* 2>/dev/null && { - rm -i /etc/systemd/system/citadel* - } - ls /etc/systemd/system/webcit* 2>/dev/null && { - rm -i /etc/systemd/system/webcit* - } - echo OK - echo - - # Clear the screen and draw the banner - echo -e '\033[2J\033[H\033[44m\033[37m\033[K\033[0m' - echo -e '\033[44m\033[37m\033[1m Citadel installation\033[K\033[0m' - echo -e '\033[44m\033[37m \033[K\033[0m' - echo - - echo Ready to install ${APPIMAGE} in ${CTDL_DIR} - echo Copying the AppImage... - rm -f ${CTDL_DIR}/citadel.appimage 2>/dev/null - cp ${APPIMAGE} ${CTDL_DIR}/citadel.appimage || { - echo Installation has failed with error code $? . - exit 4 - } | exit 4 - - echo Creating the systemd unit file... - ( - echo '# This unit file starts all Citadel services via the AppImage distribution.' - echo '# Automatically installed on' `date` - echo '' - echo '[Unit]' - echo 'Description=Citadel' - echo 'After=network.target' - echo '' - echo '[Service]' - echo 'ExecStart='${CTDL_DIR}'/citadel.appimage run -h '${CTDL_DIR}' -p '${HTTP_PORT}' -s '${HTTPS_PORT} - echo 'ExecStop=/bin/kill $MAINPID' - echo 'KillMode=process' - echo 'Restart=on-failure' - echo 'LimitCORE=infinity' - echo '' - echo '[Install]' - echo 'WantedBy=multi-user.target' - ) >/etc/systemd/system/citadel.service || { - echo Installation has failed with error code $? . - exit 5 - } | exit 5 - echo OK - echo - - echo Enabling the service... - systemctl enable citadel || { - echo Installation has failed with error code $? . - exit 6 - } | exit 6 - echo OK - echo - - echo Starting the service... - systemctl start citadel || { - echo Installation has failed with error code $? . - exit 6 - } || exit 6 - echo OK - echo - - # Clear the screen and draw the banner - echo -e '\033[2J\033[H\033[44m\033[37m\033[K\033[0m' - echo -e '\033[44m\033[37m\033[1m Citadel installation\033[K\033[0m' - echo -e '\033[44m\033[37m \033[K\033[0m' - echo - - echo -e '\033[32m\033[1mInstallation has completed.\033[0m' - echo Please continue by browsing to http://`hostname`:${HTTP_PORT} - echo - echo -e 'If this is a new installation, the default administrator' - echo -e 'will be named \033[7madmin\033[0m with password \033[7mcitadel\033[0m.' - exit -} - - -PARSED_ARGUMENTS=$(getopt -o h:p:s: -- "$@") -VALID_ARGUMENTS=$? -if [ "$VALID_ARGUMENTS" != "0" ]; then - usage -fi - -eval set -- ${PARSED_ARGUMENTS} -while : -do - case ${1} in - -h) CTDL_DIR=${2} ; shift 2 ;; - -p) HTTP_PORT=${2} ; shift 2 ;; - -s) HTTPS_PORT=${2} ; shift 2 ;; - --) shift; break;; - *) echo Unexpected option: ${1} - usage; - esac -done - -case ${1} in - run) - export APPDIR CTDL_DIR HTTP_PORT HTTPS_PORT - export LD_LIBRARY_PATH=$APPDIR/usr/lib - export PATH=$APPDIR/usr/bin - exec ctdlvisor $* - ;; - test) - export LD_LIBRARY_PATH=$APPDIR/usr/lib - export PATH=$APPDIR/usr/bin - exec $APPDIR/usr/local/citadel/citserver -c - ;; - install) - installation - ;; - database_cleanup) - export LD_LIBRARY_PATH=$APPDIR/usr/lib - export PATH=$APPDIR/usr/bin:$PATH - exec $APPDIR/usr/local/citadel/database_cleanup.sh -h $CTDL_DIR - ;; - migrate) - export APPDIR CTDL_DIR HTTP_PORT HTTPS_PORT - export LD_LIBRARY_PATH=$APPDIR/usr/lib - export PATH=$APPDIR/usr/bin - exec ctdlvisor -m - ;; - mount) - echo This mode of operation mounts the AppImage but does not run anything. - echo -n Kill it when you are finished... - while true - do - sleep 1 - done - ;; - debug) - export LD_LIBRARY_PATH=$APPDIR/usr/lib - export PATH=$APPDIR/usr/bin:$PATH - exec $APPDIR/usr/local/citadel/citserver -x9 -h $CTDL_DIR - ;; - *) - echo Unexpected command: ${1} - usage - exit 1 - ;; -esac -exit 0 diff --git a/appimage/citadel.AppDir/citadel.desktop b/appimage/citadel.AppDir/citadel.desktop deleted file mode 100644 index 8ac9118d4..000000000 --- a/appimage/citadel.AppDir/citadel.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Categories=Network; -Terminal=true -Exec=AppRun -Name=Citadel -Icon=citadel diff --git a/appimage/citadel.AppDir/citadel.png b/appimage/citadel.AppDir/citadel.png deleted file mode 100644 index dbabbb0fd..000000000 Binary files a/appimage/citadel.AppDir/citadel.png and /dev/null differ diff --git a/appimage/ctdlvisor.c b/appimage/ctdlvisor.c deleted file mode 100644 index f14b67c59..000000000 --- a/appimage/ctdlvisor.c +++ /dev/null @@ -1,286 +0,0 @@ -// This is a supervisor program that handles start/stop/restart of -// the various Citadel System components, when we are running on -// an AppImage instance. -// -// Copyright (c) 2021 by the citadel.org team -// -// This program is open source software. Use, duplication, or disclosure -// is subject to the terms of the GNU General Public License, version 3. -// The program is distributed without any warranty, expressed or implied. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -pid_t citserver_pid; -pid_t webcit_pid; -pid_t webcits_pid; -int shutting_down = 0; - -// Call this instead of exit() just for common diagnostics etc. -void ctdlvisor_exit(int code) { - printf("ctdlvisor: exit code %d\n", code); - exit(code); -} - - -// Interrupting this program with a signal will begin an orderly shutdown. -void signal_handler(int signal) { - fprintf(stderr, "ctdlvisor: caught signal %d\n", signal); - - while(shutting_down) { - fprintf(stderr, "ctdlvisor: already shutting down\n"); - sleep(1); - } - - int status; - pid_t who_exited; - char *what_exited = NULL; - - shutting_down = 1; - kill(citserver_pid, SIGTERM); - kill(webcit_pid, SIGTERM); - kill(webcits_pid, SIGTERM); - do { - fprintf(stderr, "ctdlvisor: waiting for all child process to exit...\n"); - who_exited = waitpid(-1, &status, 0); - if (who_exited == citserver_pid) { - what_exited = "Citadel Server"; - } - else if (who_exited == webcit_pid) { - what_exited = "WebCit HTTP"; - } - else if (who_exited == webcits_pid) { - what_exited = "WebCit HTTPS"; - } - else { - what_exited = "unknown"; - } - if (who_exited >= 0) { - fprintf(stderr, "ctdlvisor: %d (%s) ended, status=%d\n", who_exited, what_exited, status); - } - } while (who_exited >= 0); - ctdlvisor_exit(0); -} - - -void detach_from_tty(void) { - signal(SIGHUP, SIG_IGN); - signal(SIGINT, SIG_IGN); - signal(SIGQUIT, SIG_IGN); - - setsid(); // become our own process group leader - umask(0); - if ( (freopen("/dev/null", "r", stdin) != stdin) || - (freopen("/dev/null", "w", stdout) != stdout) || - (freopen("/dev/null", "w", stderr) != stderr) - ) { - fprintf(stderr, "sysdep: unable to reopen stdio: %s\n", strerror(errno)); - } -} - - -pid_t start_citadel() { - char bin[1024]; - sprintf(bin, "%s/usr/local/citadel/citserver", getenv("APPDIR")); - pid_t pid = fork(); - if (pid == 0) { - fprintf(stderr, "ctdlvisor: executing %s with data directory %s\n", bin, getenv("CTDL_DIR")); - detach_from_tty(); - execlp(bin, "citserver", "-x9", "-h", getenv("CTDL_DIR"), NULL); - exit(errno); - } - else { - fprintf(stderr, "ctdlvisor: citserver running on pid=%d\n", pid); - return(pid); - } -} - - -pid_t start_webcit() { - char bin[1024]; - sprintf(bin, "%s/usr/local/webcit/webcit", getenv("APPDIR")); - char wchome[1024]; - sprintf(wchome, "-h%s/usr/local/webcit", getenv("APPDIR")); - pid_t pid = fork(); - if (pid == 0) { - fprintf(stderr, "ctdlvisor: executing %s\n", bin); - detach_from_tty(); - execlp(bin, "webcit", "-x9", wchome, "-p", getenv("HTTP_PORT"), "uds", getenv("CTDL_DIR"), NULL); - exit(errno); - } - else { - fprintf(stderr, "ctdlvisor: webcit (HTTP) running on pid=%d\n", pid); - return(pid); - } -} - - -pid_t start_webcits() { - char bin[1024]; - sprintf(bin, "%s/usr/local/webcit/webcit", getenv("APPDIR")); - char wchome[1024]; - sprintf(wchome, "-h%s/usr/local/webcit", getenv("APPDIR")); - pid_t pid = fork(); - if (pid == 0) { - fprintf(stderr, "ctdlvisor: executing %s\n", bin); - detach_from_tty(); - execlp(bin, "webcit", "-x9", wchome, "-s", "-p", getenv("HTTPS_PORT"), "uds", getenv("CTDL_DIR"), NULL); - exit(errno); - } - else { - fprintf(stderr, "ctdlvisor: webcit (HTTPS) running on pid=%d\n", pid); - return(pid); - } -} - - -void main_loop(void) { - int status; - pid_t who_exited; - int citserver_exit_code = 0; - - do { - who_exited = waitpid(-1, &status, 0); - fprintf(stderr, "ctdlvisor: pid=%d exited, status=%d, exitcode=%d\n", who_exited, status, WEXITSTATUS(status)); - - // A *deliberate* exit of citserver will cause ctdlvisor to shut the whole AppImage down. - // If it crashes, however, we will start it back up. - if (who_exited == citserver_pid) { - citserver_exit_code = WEXITSTATUS(status); - if ((WIFEXITED(status)) && (citserver_exit_code == 0)) { - fprintf(stderr, "ctdlvisor: citserver exited normally - ending AppImage session\n"); - shutting_down = 1; - kill(webcit_pid, SIGTERM); - kill(webcits_pid, SIGTERM); - } - else if ((WIFEXITED(status)) && (citserver_exit_code >= 101) && (citserver_exit_code <= 109)) { - fprintf(stderr, "ctdlvisor: citserver exited intentionally - ending AppImage session\n"); - shutting_down = 1; - kill(webcit_pid, SIGTERM); - kill(webcits_pid, SIGTERM); - } - else { - if (WIFSIGNALED(status)) { - fprintf(stderr, "ctdlvisor: citserver crashed on signal %d\n", WTERMSIG(status)); - } - citserver_pid = start_citadel(); - } - } - - // WebCit processes are restarted if they exit for any reason. - if ((who_exited == webcit_pid) && (!shutting_down)) webcit_pid = start_webcit(); - if ((who_exited == webcits_pid) && (!shutting_down)) webcits_pid = start_webcits(); - - // If we somehow end up in an endless loop, at least slow it down. - sleep(1); - - } while (who_exited >= 0); - ctdlvisor_exit(citserver_exit_code); -} - - -void install_client_link(void) { - - FILE *fp; - char path_to_link[PATH_MAX]; - snprintf(path_to_link, sizeof path_to_link, "%s/citadel", getenv("CTDL_DIR")); - fp = fopen(path_to_link, "w"); - if (!fp) { - fprintf(stderr, "%s\n", strerror(errno)); - return; - } - - fprintf(fp, "#!/bin/bash\n" - "export APPDIR=%s\n" - "export LD_LIBRARY_PATH=${APPDIR}/usr/bin:$LD_LIBRARY_PATH\n" - "export PATH=${APPDIR}/usr/bin:$PATH\n" - "exec citadel\n" - , - getenv("APPDIR") - ); - - fchmod(fileno(fp), 0755); - fclose(fp); -} - - -int main(int argc, char **argv) { - int a; - int migrate_mode = 0; - - if (getenv("APPDIR") == NULL) { - fprintf(stderr, "ctdlvisor: APPDIR is not set. This program must be run from within an AppImage.\n"); - ctdlvisor_exit(1); - } - - /* parse command-line arguments */ - while ((a=getopt(argc, argv, "cm")) != EOF) switch(a) { - - // test this binary for compatibility and exit - case 'c': - fprintf(stderr, "%s: binary compatibility confirmed\n", argv[0]); - exit(0); - break; - - // run ctdlmigrate only - case 'm': - migrate_mode = 1; - break; - - // any other parameter makes it crash and burn - default: - fprintf(stderr, "usage\n"); - exit(1); - } - - fprintf(stderr, "ctdlvisor: Welcome to the Citadel System, brought to you using AppImage.\n"); - fprintf(stderr, "ctdlvisor: LD_LIBRARY_PATH = %s\n", getenv("LD_LIBRARY_PATH")); - fprintf(stderr, "ctdlvisor: PATH = %s\n", getenv("PATH")); - fprintf(stderr, "ctdlvisor: APPDIR = %s\n", getenv("APPDIR")); - fprintf(stderr, "ctdlvisor: data directory = %s\n", getenv("CTDL_DIR")); - fprintf(stderr, "ctdlvisor: HTTP port = %s\n", getenv("HTTP_PORT")); - fprintf(stderr, "ctdlvisor: HTTPS port = %s\n", getenv("HTTPS_PORT")); - - if (access(getenv("CTDL_DIR"), R_OK|W_OK|X_OK)) { - fprintf(stderr, "ctdlvisor: %s: %s\n", getenv("CTDL_DIR"), strerror(errno)); - ctdlvisor_exit(errno); - } - - signal(SIGHUP, signal_handler); - - // "migrate mode" means we just start the server and then run ctdlmigrate interactively. - if (migrate_mode) { - citserver_pid = start_citadel(); - fprintf(stderr, "ctdlvisor: waiting a moment for citserver to initialize...\n"); - sleep(5); - char bin[1024]; - sprintf(bin, "%s/usr/local/citadel/ctdlmigrate -h %s", getenv("APPDIR"), getenv("CTDL_DIR")); - system(bin); - kill(citserver_pid, SIGTERM); - } - - // Otherwise, it's just a normal happy day in Citadel land. - else { - signal(SIGTERM, signal_handler); - signal(SIGINT, signal_handler); - signal(SIGQUIT, signal_handler); - - citserver_pid = start_citadel(); // start Citadel Server - webcit_pid = start_webcit(); // start WebCit HTTP - webcits_pid = start_webcits(); // start WebCit HTTPS - - install_client_link(); - - main_loop(); - } - - ctdlvisor_exit(0); -} diff --git a/appimage/excludelist b/appimage/excludelist deleted file mode 100644 index 9ddaa07b2..000000000 --- a/appimage/excludelist +++ /dev/null @@ -1,225 +0,0 @@ -# retrieved from https://raw.githubusercontent.com/AppImage/pkg2appimage/master/excludelist by ajc on 2021may10 -# I also removed libexpat and libz from this list - -# This file lists libraries that we will assume to be present on the host system and hence -# should NOT be bundled inside AppImages. This is a working document; expect it to change -# over time. File format: one filename per line. Each entry should have a justification comment. - -# See the useful tool at https://abi-laboratory.pro/index.php?view=navigator&symbol=hb_buffer_set_cluster_level#result -# to investigate issues with missing symbols. - -ld-linux.so.2 -ld-linux-x86-64.so.2 -libanl.so.1 -libBrokenLocale.so.1 -libcidn.so.1 -# libcrypt.so.1 # Not part of glibc anymore as of Fedora 30. See https://github.com/slic3r/Slic3r/issues/4798 and https://pagure.io/fedora-docs/release-notes/c/01d74b33564faa42959c035e1eee286940e9170e?branch=f28 -libc.so.6 -libdl.so.2 -libm.so.6 -libmvec.so.1 -# libnsl.so.1 # Not part of glibc anymore as of Fedora 28. See https://github.com/RPCS3/rpcs3/issues/5224#issuecomment-434930594 -libnss_compat.so.2 -# libnss_db.so.2 # Not part of neon-useredition-20190321-0530-amd64.iso -libnss_dns.so.2 -libnss_files.so.2 -libnss_hesiod.so.2 -libnss_nisplus.so.2 -libnss_nis.so.2 -libpthread.so.0 -libresolv.so.2 -librt.so.1 -libthread_db.so.1 -libutil.so.1 -# These files are all part of the GNU C Library which should never be bundled. -# List was generated from a fresh build of glibc 2.25. - -libstdc++.so.6 -# Workaround for: -# usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found - -libGL.so.1 -# The above may be missing on Chrome OS, https://www.reddit.com/r/Crostini/comments/d1lp67/ultimaker_cura_no_longer_running_as_an_appimage/ -libEGL.so.1 -# Part of the video driver (OpenGL); present on any regular -# desktop system, may also be provided by proprietary drivers. -# Known to cause issues if it's bundled. - -libGLdispatch.so.0 -libGLX.so.0 -# reported to be superfluent and conflicting system libraries (graphics driver) -# see https://github.com/linuxdeploy/linuxdeploy/issues/89 - -libOpenGL.so.0 -# Qt installed via install-qt.sh apparently links to this library -# part of OpenGL like libGL/libEGL, so excluding it should not cause any problems -# https://github.com/linuxdeploy/linuxdeploy/issues/152 - -libdrm.so.2 -# Workaround for: -# Antergos Linux release 2015.11 (ISO-Rolling) -# /usr/lib/libdrm_amdgpu.so.1: error: symbol lookup error: undefined symbol: drmGetNodeTypeFromFd (fatal) -# libGL error: unable to load driver: swrast_dri.so -# libGL error: failed to load driver: swrast -# Unrecognized OpenGL version - -libglapi.so.0 -# Part of mesa -# known to cause problems with graphics, see https://github.com/RPCS3/rpcs3/issues/4427#issuecomment-381674910 - -libgbm.so.1 -# Part of mesa -# https://github.com/probonopd/linuxdeployqt/issues/390#issuecomment-529036305 - -libxcb.so.1 -# Workaround for: -# Fedora 23 -# symbol lookup error: /lib64/libxcb-dri3.so.0: undefined symbol: xcb_send_fd -# Uncertain if this is required to be bundled for some distributions - if so we need to write a version check script and use LD_PRELOAD to load the system version if it is newer -# Fedora 25: -# undefined symbol: xcb_send_request_with_fds -# https://github.com/AppImage/AppImages/issues/128 - -libX11.so.6 -# Workaround for: -# Fedora 23 -# symbol lookup error: ./lib/libX11.so.6: undefined symbol: xcb_wait_for_reply64 -# Uncertain if this is required to be bundled for some distributions - if so we need to write a version check script and use LD_PRELOAD to load the system version if it is newer - -libgio-2.0.so.0 -# Workaround for: -# On Ubuntu, "symbol lookup error: /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so: undefined symbol: g_settings_new" - -# libgdk-x11-2.0.so.0 # Missing on openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20170601-Media.iso -# libgtk-x11-2.0.so.0 # Missing on openSUSE-Tumbleweed-KDE-Live-x86_64-Snapshot20170601-Media.iso - -libasound.so.2 -# Workaround for: -# No sound, e.g., in VLC.AppImage (does not find sound cards) - -# https://github.com/AppImage/pkg2appimage/issues/475 -# libgdk_pixbuf-2.0.so.0 -# Was: Workaround for: -# On Ubuntu, get (inkscape:25621): GdkPixbuf-WARNING **: Error loading XPM image loader: Image type 'xpm' is not supported - -libfontconfig.so.1 -# Workaround for: -# Application stalls when loading fonts during application launch; e.g., KiCad on ubuntu-mate - -libthai.so.0 -# Workaround for: -# audacity: /tmp/.mount_AudaciUsFbON/usr/lib/libthai.so.0: version `LIBTHAI_0.1.25' not found (required by /usr/lib64/libpango-1.0.so.0) -# on openSUSE Tumbleweed - -# other "low-level" font rendering libraries -# should fix https://github.com/probonopd/linuxdeployqt/issues/261#issuecomment-377522251 -# and https://github.com/probonopd/linuxdeployqt/issues/157#issuecomment-320755694 -libfreetype.so.6 -libharfbuzz.so.0 - -# Note, after discussion we do not exlude this, but we can use a dummy library that just does nothing -# libselinux.so.1 -# Workaround for: -# sed: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory -# Some distributions, such as Arch Linux, do not come with libselinux.so.1 by default. -# The solution is to bundle a dummy mock library: -# echo "extern int is_selinux_enabled(void){return 0;}" >> selinux-mock.c -# gcc -s -shared -o libselinux.so.1 -Wl,-soname,libselinux.so.1 selinux-mock.c -# strip libselinux.so.1 -# More information: https://github.com/AppImage/AppImages/issues/83 -# and https://github.com/AppImage/AppImageKit/issues/775#issuecomment-614954821 -# https://gitlab.com/sulinos/devel/libselinux-dummy - -# The following are assumed to be part of the base system -# Removing these has worked e.g., for Krita. Feel free to report if -# you think that some of these should go into AppImages and why. -libcom_err.so.2 -libgcc_s.so.1 -libglib-2.0.so.0 -libgpg-error.so.0 -# libgssapi_krb5.so.2 # Disputed, seemingly needed by Arch Linux since Kerberos is named differently there -# libgssapi.so.3 # Seemingly needed when running Ubuntu 14.04 binaries on Fedora 23 -# libhcrypto.so.4 # Missing on openSUSE LEAP 42.0 -# libheimbase.so.1 # Seemingly needed when running Ubuntu 14.04 binaries on Fedora 23 -# libheimntlm.so.0 # Seemingly needed when running Ubuntu 14.04 binaries on Fedora 23 -# libhx509.so.5 # Missing on openSUSE LEAP 42.0 -libICE.so.6 -# libidn.so.11 # Does not come with Solus by default -# libk5crypto.so.3 # Runnning AppImage built on Debian 9 or Ubuntu 16.04 on an Archlinux fails otherwise; https://github.com/AppImage/AppImages/issues/301 -# libkeyutils.so.1 # Does not come with Void Linux by default; https://github.com/Subsurface-divelog/subsurface/issues/1971#issuecomment-466606834 -# libkrb5.so.26 # Disputed, seemingly needed by Arch Linux since Kerberos is named differently there. Missing on openSUSE LEAP 42.0 -# libkrb5.so.3 # Disputed, seemingly needed by Arch Linux since Kerberos is named differently there -# libkrb5support.so.0 # Disputed, seemingly needed by Arch Linux since Kerberos is named differently there -libp11-kit.so.0 -# libpcre.so.3 # Missing on Fedora 24, SLED 12 SP1, and openSUSE Leap 42.2 -# libroken.so.18 # Mission on openSUSE LEAP 42.0 -# libsasl2.so.2 # Seemingly needed when running Ubuntu 14.04 binaries on Fedora 23 -libSM.so.6 -libusb-1.0.so.0 -libuuid.so.1 -# libwind.so.0 # Missing on openSUSE LEAP 42.0 -#libz.so.1 removed by ajc 2021jun09 - -# Potentially dangerous libraries -libgobject-2.0.so.0 - -# Workaround for: -# Rectangles instead of fonts -# https://github.com/AppImage/AppImages/issues/240 -libpangoft2-1.0.so.0 -libpangocairo-1.0.so.0 -libpango-1.0.so.0 - -# FIXME: -# Can get symbol lookup error: /lib64/libpango-1.0.so.0: undefined symbol: g_log_structured_standard -# if libcairo is bundled but libpango is not - -# Workaround for: -# e.g., Spotify -# relocation error: /lib/x86_64-linux-gnu/libgcrypt.so.20: -# symbol gpgrt_lock_lock, version GPG_ERROR_1.0 not defined -# in file libgpg-error.so.0 with link time reference -libgpg-error.so.0 - -libjack.so.0 -# it must match the ABI of the JACK server which is installed in the base system -# rncbc confirmed this -# However, this library is missing on Fedora-WS-Live-31-1-9 -# which means that we should avoid using JACK altogether if possible - -# Unsolved issue: -# https://github.com/probonopd/linuxdeployqt/issues/35 -# Error initializing NSS with a persistent database (sql:/home/me/.pki/nssdb): libsoftokn3.so: cannot open shared object file: No such file or directory -# Error initializing NSS without a persistent database: NSS error code: -5925 -# nss_error=-5925, os_error=0 -# libnss3.so should not be removed from the bundles, as this causes other issues, e.g., -# https://github.com/probonopd/linuxdeployqt/issues/35#issuecomment-256213517 -# and https://github.com/AppImage/AppImages/pull/114 -# libnss3.so - -# The following cannot be excluded, see -# https://github.com/AppImage/AppImages/commit/6c7473d8cdaaa2572248dcc53d7f617a577ade6b -# http://stackoverflow.com/questions/32644157/forcing-a-binary-to-use-a-specific-newer-version-of-a-shared-library-so -# libssl.so.1 -# libssl.so.1.0.0 -# libcrypto.so.1 -# libcrypto.so.1.0.0 - -# According to https://github.com/RicardoEPRodrigues/3Engine/issues/4#issuecomment-511598362 -# libGLEW is not tied to a specific GPU. It's linked against libGL.so.1 -# and that one is different depending on the installed driver. -# In fact libGLEW is changing its soversion very often, so you should always bundle libGLEW.so.2.0 - -# libglut.so.3 # to be confirmed - -libxcb-dri3.so.0 # https://github.com/AppImage/AppImages/issues/348 -libxcb-dri2.so.0 # https://github.com/probonopd/linuxdeployqt/issues/331#issuecomment-442276277 - -# If the next line turns out to cause issues, we will have to remove it again and find another solution -libfribidi.so.0 # https://github.com/olive-editor/olive/issues/221 and https://github.com/knapsu/plex-media-player-appimage/issues/14 - -# Workaround for: -# symbol lookup error: /lib/x86_64-linux-gnu/libgnutls.so.30: undefined symbol: __gmpz_limbs_write -# https://github.com/ONLYOFFICE/appimage-desktopeditors/issues/3 -# Apparently coreutils depends on it, so it should be safe to assume that it comes with every target system -libgmp.so.10