diff --git a/.github/workflows/push-continous-delivery.yml b/.github/workflows/push-continous-delivery.yml index 0c5e7f4d0..7a5911c8b 100644 --- a/.github/workflows/push-continous-delivery.yml +++ b/.github/workflows/push-continous-delivery.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@master - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: actions/cache@v2 + uses: docker/setup-buildx-action@v2 + - uses: actions/cache@v3 with: path: /tmp/buildxcache key: ${{ runner.os }}-docker-buildx-${{ github.sha }} diff --git a/.github/workflows/release-delivery.yml b/.github/workflows/release-delivery.yml index fcefa3e20..55a14cce5 100644 --- a/.github/workflows/release-delivery.yml +++ b/.github/workflows/release-delivery.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@master - name: Docker Build and export run: | - docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile . + docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile-legacy . docker create --name rootfs difegue/lanraragi docker export --output=package.tar rootfs - name: Upload rootfs @@ -19,6 +19,7 @@ jobs: with: name: package path: package.tar + buildReleaseWSL: name: Build Windows Installer needs: exportDockerRootFS @@ -74,10 +75,10 @@ jobs: steps: - uses: actions/checkout@master - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - uses: actions/cache@v2 + uses: docker/setup-buildx-action@v2 + - uses: actions/cache@v3 with: path: /tmp/buildxcache key: ${{ runner.os }}-docker-buildx-${{ github.sha }} diff --git a/lib/LANraragi/Controller/Batch.pm b/lib/LANraragi/Controller/Batch.pm index f9cf55626..0ca42a912 100644 --- a/lib/LANraragi/Controller/Batch.pm +++ b/lib/LANraragi/Controller/Batch.pm @@ -18,14 +18,18 @@ sub index { #Build plugin listing my @pluginlist = get_plugins("metadata"); + # Get static category list + my @categories = LANraragi::Model::Category->get_static_category_list; + $self->render( - template => "batch", - plugins => \@pluginlist, - title => $self->LRR_CONF->get_htmltitle, - descstr => $self->LRR_DESC, - csshead => generate_themes_header($self), - tagrules => restore_CRLF( $self->LRR_CONF->get_tagrules ), - version => $self->LRR_VERSION + template => "batch", + plugins => \@pluginlist, + title => $self->LRR_CONF->get_htmltitle, + descstr => $self->LRR_DESC, + csshead => generate_themes_header($self), + tagrules => restore_CRLF( $self->LRR_CONF->get_tagrules ), + categories => \@categories, + version => $self->LRR_VERSION ); } @@ -96,6 +100,22 @@ sub socket { return; } + if ( $operation eq "addcat" ) { + my $catid = $command->{"category"}; + my ( $catsucc, $caterr ) = LANraragi::Model::Category::add_to_category( $catid, $id ); + + $client->send( + { json => { + id => $id, + category => $catid, + success => $catsucc, + message => $caterr + } + } + ); + return; + } + if ( $operation eq "tagrules" ) { $logger->debug("Applying tag rules to $id..."); diff --git a/lib/LANraragi/Controller/Index.pm b/lib/LANraragi/Controller/Index.pm index b81a5dded..8d4999010 100644 --- a/lib/LANraragi/Controller/Index.pm +++ b/lib/LANraragi/Controller/Index.pm @@ -54,8 +54,7 @@ sub index { my $userlogged = $self->LRR_CONF->enable_pass == 0 || $self->session('is_logged'); # Get static category list to populate the right-click menu - my @categories = LANraragi::Model::Category->get_category_list; - @categories = grep { %$_{"search"} eq "" } @categories; + my @categories = LANraragi::Model::Category->get_static_category_list; $self->render( template => "index", diff --git a/lib/LANraragi/Controller/Reader.pm b/lib/LANraragi/Controller/Reader.pm index f96516f7e..28bb84550 100644 --- a/lib/LANraragi/Controller/Reader.pm +++ b/lib/LANraragi/Controller/Reader.pm @@ -14,11 +14,8 @@ sub index { if ( $self->req->param('id') ) { - # Allow adding to category - my @categories = LANraragi::Model::Category->get_category_list; - - # But only to static categories - @categories = grep { %$_{"search"} eq "" } @categories; + # Allow adding to static categories + my @categories = LANraragi::Model::Category->get_static_category_list; # Get query string from referrer URL, if there's one my $referrer = $self->req->headers->referrer; diff --git a/lib/LANraragi/Controller/Upload.pm b/lib/LANraragi/Controller/Upload.pm index c473a65cb..1c86414ea 100644 --- a/lib/LANraragi/Controller/Upload.pm +++ b/lib/LANraragi/Controller/Upload.pm @@ -84,10 +84,7 @@ sub index { my $self = shift; # Allow adding to category on direct uploads - my @categories = LANraragi::Model::Category->get_category_list; - - # But only to static categories - @categories = grep { %$_{"search"} eq "" } @categories; + my @categories = LANraragi::Model::Category->get_static_category_list; $self->render( template => "upload", diff --git a/lib/LANraragi/Model/Category.pm b/lib/LANraragi/Model/Category.pm index 71c8f1766..0e4b6d563 100644 --- a/lib/LANraragi/Model/Category.pm +++ b/lib/LANraragi/Model/Category.pm @@ -29,6 +29,17 @@ sub get_category_list { return @result; } +# get_static_category_list() +# Returns a list of all the static category objects. +sub get_static_category_list() { + + my @categories = get_category_list; + + # Filter out dynamic categories + @categories = grep { %$_{"search"} eq "" } @categories; + return @categories; +} + # get_categories_containing_archive(id) # Returns a list of all the categories that contain the given archive. sub get_categories_containing_archive { @@ -178,7 +189,7 @@ sub add_to_category { if ( $redis->exists($cat_id) ) { unless ( $redis->hget( $cat_id, "search" ) eq "" ) { - $err = "$cat_id is a favorite search, can't add archives to it."; + $err = "$cat_id is a favorite search/dynamic category, can't add archives to it."; $logger->error($err); $redis->quit; return ( 0, $err ); @@ -203,7 +214,8 @@ sub add_to_category { } if ( "@cat_archives" =~ m/$arc_id/ ) { - $logger->warn("$arc_id already present in category $cat_id, doing nothing."); + $err = "$arc_id already present in category $cat_id, doing nothing."; + $logger->warn($err); $redis->quit; return ( 1, $err ); } diff --git a/lib/LANraragi/Model/Upload.pm b/lib/LANraragi/Model/Upload.pm index 27f6a368f..5aa9bc30e 100644 --- a/lib/LANraragi/Model/Upload.pm +++ b/lib/LANraragi/Model/Upload.pm @@ -153,10 +153,12 @@ sub download_url { die "Not a proper URL" unless $url; $logger->info("Downloading URL $url...This will take some time."); - my $tempdir = tempdir(); - my $tx = $ua->max_redirects(5)->get($url); + my $tempdir = tempdir(); + + # Download the URL, with 5 maximum redirects and unlimited response size. + my $tx = $ua->max_response_size(0)->max_redirects(5)->get($url); my $content_disp = $tx->result->headers->content_disposition; - my $filename = "Not_an_archive"; #placeholder; + my $filename = "Not_an_archive"; #placeholder; $logger->debug("Content-Disposition Header: $content_disp"); if ( $content_disp =~ /.*filename=\"(.*)\".*/gim ) { diff --git a/lib/LANraragi/Plugin/Metadata/Fakku.pm b/lib/LANraragi/Plugin/Metadata/Fakku.pm index 0ed1440cb..8879650d8 100644 --- a/lib/LANraragi/Plugin/Metadata/Fakku.pm +++ b/lib/LANraragi/Plugin/Metadata/Fakku.pm @@ -122,6 +122,12 @@ sub get_search_result_dom { # * Added a space ahead of the - (hyphen) filter, to only remove hyphens directly prepended to something else (those are the only ones that break searches, probably because the search engine treats them as exclusions as most engines would). $title =~ s/ -|'\w*|~|!|@//g; + # Removes everything inside [ ] as well as the brackets themselves + $title =~ s/\[([^\[\]]|(?0))*]//g; + + # Removes everything inside () as well as the parentheses themselves + $title =~ s/\(.*$//g; + # Visit the base host once to set cloudflare cookies and jank $ua->max_redirects(5)->get($fakku_host); diff --git a/lib/LANraragi/Plugin/Scripts/FolderToCat.pm b/lib/LANraragi/Plugin/Scripts/FolderToCat.pm index b4c45faa5..86f966006 100644 --- a/lib/LANraragi/Plugin/Scripts/FolderToCat.pm +++ b/lib/LANraragi/Plugin/Scripts/FolderToCat.pm @@ -45,13 +45,11 @@ sub run_script { if ($delete_old_cats) { $logger->info("Deleting all Static Categories before folder walking as instructed."); - my @categories = LANraragi::Model::Category->get_category_list; + my @categories = LANraragi::Model::Category->get_static_category_list; for my $category (@categories) { - if ( %{$category}{"search"} eq "" ) { - my $cat_id = %{$category}{"id"}; - $logger->debug("Deleting '$cat_id'"); - LANraragi::Model::Category::delete_category($cat_id); - } + my $cat_id = %{$category}{"id"}; + $logger->debug("Deleting '$cat_id'"); + LANraragi::Model::Category::delete_category($cat_id); } } diff --git a/lib/LANraragi/Utils/Database.pm b/lib/LANraragi/Utils/Database.pm index dbf3664b0..bc0ea07ea 100644 --- a/lib/LANraragi/Utils/Database.pm +++ b/lib/LANraragi/Utils/Database.pm @@ -295,6 +295,7 @@ sub clean_database { $redis->hset( $id, "file", "" ); } else { change_archive_id( $id, $newid, $redis ); + $redis->hset( "LRR_FILEMAP", $file, $newid ); } } else { diff --git a/lib/LANraragi/Utils/Generic.pm b/lib/LANraragi/Utils/Generic.pm index d3f9b5279..0fa089578 100644 --- a/lib/LANraragi/Utils/Generic.pm +++ b/lib/LANraragi/Utils/Generic.pm @@ -56,7 +56,7 @@ sub trim_url { # Checks if the provided file is an image. # Uses non-capturing groups (?:) to avoid modifying the incoming argument. sub is_image { - return $_[0] =~ /^.+\.(?:png|jpg|gif|bmp|jpeg|jfif|webp|avif|heif|heic)$/i; + return $_[0] =~ /^.+\.(?:png|jpg|gif|bmp|jpeg|jfif|webp|avif|heif|heic|jxl|)$/i; } # Checks if the provided file is an archive. @@ -142,6 +142,9 @@ sub start_minion { # Freeze the process object in the PID file store \$proc, get_temp . "/minion.pid"; + open( my $fh, ">", get_temp . "/minion.pid-s6" ); + print $fh $proc->pid; + close($fh); return $proc; } @@ -164,6 +167,9 @@ sub start_shinobu { # Freeze the process object in the PID file store \$proc, get_temp . "/shinobu.pid"; + open( my $fh, ">", get_temp . "/shinobu.pid-s6" ); + print $fh $proc->pid; + close($fh); return $proc; } diff --git a/lib/Shinobu.pm b/lib/Shinobu.pm index fa3c29aea..b7b84bffc 100644 --- a/lib/Shinobu.pm +++ b/lib/Shinobu.pm @@ -227,6 +227,8 @@ sub add_to_filemap { LANraragi::Utils::Database::change_archive_id( $filemap_id, $id, $redis ); + # Don't forget to update the filemap, later operations will behave incorrectly otherwise + $redis->hset( "LRR_FILEMAP", $file, $id ); } else { $logger->debug( "$file has the same ID as the one in the filemap. Duplicate inotify events? Cleaning cache just to make sure"); diff --git a/package.json b/package.json index 1d200d82c..b8503b950 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lanraragi", - "version": "0.8.6", - "version_name": "Buddha of Suburbia", + "version": "0.8.7", + "version_name": "Outside", "description": "I'm under Japanese influence and my honor's at stake!", "scripts": { "test": "prove -r -l -v tests/", @@ -11,7 +11,8 @@ "dev-server": "perl ./script/launcher.pl -m -v ./script/lanraragi", "docker-build": "docker build -t difegue/lanraragi -f ./tools/build/docker/Dockerfile .", "critic": "perlcritic ./lib/* ./script/* ./tools/install.pl", - "backup-db": "perl ./script/backup" + "backup-db": "perl ./script/backup", + "get-version": "perl -Mojo -E \"my \\$conf = j(f(qw(package.json))->slurp); say %\\$conf{version} .q/ - '/. %\\$conf{version_name} .q/'/ \"" }, "repository": { "type": "git", diff --git a/public/js/batch.js b/public/js/batch.js index 6fc898981..29af42fe4 100644 --- a/public/js/batch.js +++ b/public/js/batch.js @@ -157,6 +157,7 @@ Batch.startBatch = function () { const commandBase = { operation: Batch.currentOperation, plugin: Batch.currentPlugin, + category: $("#category").val(), args, }; @@ -223,6 +224,11 @@ Batch.updateBatchStatus = function (event) { case "tagrules": $("#log-container").append(`Replaced tags for ID ${msg.id} (New tags: ${msg.tags})\n\n`); break; + case "addcat": + // Append the message at the end of this log, + // as it can contain the warning about the ID already being in the category + $("#log-container").append(`Added ID ${msg.id} to category ${msg.category}! ${msg.message} \n\n`); + break; case "clearnew": { $("#log-container").append(`Cleared new flag for ID ${msg.id}\n\n`); // Remove last character from matching row diff --git a/templates/batch.html.tt2 b/templates/batch.html.tt2 index 2b053b4c8..3d4bc6cb4 100644 --- a/templates/batch.html.tt2 +++ b/templates/batch.html.tt2 @@ -19,7 +19,7 @@ - + @@ -54,6 +54,7 @@ + @@ -123,6 +124,17 @@ + + Add to Category : + + + + + diff --git a/templates/templates_config/config_tags.html.tt2 b/templates/templates_config/config_tags.html.tt2 index 4c03d2746..d2fd636db 100644 --- a/templates/templates_config/config_tags.html.tt2 +++ b/templates/templates_config/config_tags.html.tt2 @@ -85,8 +85,7 @@
- +
When tagging archives using Plugins, the rules specified here will be applied to the tags before saving them to the database.
Split rules with linebreaks. diff --git a/tools/Documentation/installing-lanraragi/docker.md b/tools/Documentation/installing-lanraragi/docker.md index 188d4e9ac..565bbe025 100644 --- a/tools/Documentation/installing-lanraragi/docker.md +++ b/tools/Documentation/installing-lanraragi/docker.md @@ -86,7 +86,7 @@ Regular versions of Debian shouldn't have this issue. ## Changing the port Since Docker allows for port mapping, you can most of times map the default port of 3000 to another port on your host quickly. -If you need something a bit more involved (like adding SSL), please check the Network Interfaces section for how to use thhe `LRR_NETWORK` environment variable. +If you need something a bit more involved (like adding SSL), please check the Network Interfaces section for how to use the `LRR_NETWORK` environment variable. {% content-ref url="../advanced-usage/network-interfaces.md" %} [network-interfaces.md](../advanced-usage/network-interfaces.md) diff --git a/tools/Documentation/installing-lanraragi/macos.md b/tools/Documentation/installing-lanraragi/macos.md index bdf2192a7..066813cdd 100644 --- a/tools/Documentation/installing-lanraragi/macos.md +++ b/tools/Documentation/installing-lanraragi/macos.md @@ -36,7 +36,7 @@ brew install lanraragi Your content folder is stored by default in `${HOME}/Library/Application Support/LANraragi`. (`${HOME}/LANraragi/content` on Linux.) The Redis database is stored in `${HOME}/Library/Application Support/LANraragi/database`. (`${HOME}/LANraragi/database` on Linux.) -The content folder can be moved to any folder you want through the in-app settings page. +While the in-app settings page won't allow you to change the location of the content folder, you can do so by overriding the `LRR_DATA_DIRECTORY` environment variable before launching. ## Usage diff --git a/tools/Documentation/installing-lanraragi/source.md b/tools/Documentation/installing-lanraragi/source.md index c89d82d6f..2dd5f594e 100644 --- a/tools/Documentation/installing-lanraragi/source.md +++ b/tools/Documentation/installing-lanraragi/source.md @@ -20,7 +20,7 @@ For information, my personal tests are done using Debian's vendor Perl. apt-get update apt-get upgrade -y apt-get install build-essential make gnupg pkg-config \ -cpanminus redis-server libarchive-dev imagemagick webp libssl-dev zlib1g-dev \ +cpanminus redis-server libarchive-dev imagemagick webp libssl-dev zlib1g-dev libjxl-dev \ perlmagick ghostscript npm ``` diff --git a/tools/build/docker/Dockerfile b/tools/build/docker/Dockerfile index 22b134a96..175ce27c0 100644 --- a/tools/build/docker/Dockerfile +++ b/tools/build/docker/Dockerfile @@ -1,5 +1,5 @@ # DOCKER-VERSION 0.3.4 -FROM alpine:3.14 +FROM alpine:3.16 LABEL git="https://github.com/Difegue/LANraragi" ENV S6_KEEP_ENV 1 @@ -9,10 +9,11 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 1 # wait 10s before KILLing ENV S6_KILL_GRACETIME 10000 +ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME 0 -# s6: The init is provided by alpine's s6-overlay package, hence the double slash. +# s6: The init is provided by alpine's s6-overlay package, hence the double slash. # See https://pkgs.alpinelinux.org/contents?branch=v3.14&name=s6-overlay&arch=x86&repo=community -ENTRYPOINT ["//init"] +ENTRYPOINT ["//init"] # Check application health HEALTHCHECK --interval=1m --timeout=10s --retries=3 \ @@ -62,8 +63,11 @@ COPY --chown=koyomi:koyomi /tests tests COPY --chown=koyomi:koyomi /lrr.conf lrr.conf COPY --chown=koyomi:koyomi /tools/build/docker/redis.conf tools/build/docker/ COPY /tools/build/docker/wsl.conf /etc/wsl.conf -COPY /tools/build/docker/s6/cont-init.d/ /etc/cont-init.d/ -COPY /tools/build/docker/s6/services.d/ /etc/services.d/ +#Copy s6-overlay 3.x services +#Uses a system-d like definition that can't be use in 2.x +COPY /tools/build/docker/s6/s6-rc.d/ /etc/s6-overlay/s6-rc.d/ +#Copy setup script as-is since no changes are needed between 2.x and 3.x +COPY /tools/build/docker/s6/cont-init.d/01-lrr-setup /etc/s6-overlay/s6-rc.d/init/ #COPY /tools/build/docker/s6/fix-attrs.d/ /etc/fix-attrs.d/ # Persistent volumes diff --git a/tools/build/docker/Dockerfile-legacy b/tools/build/docker/Dockerfile-legacy index f9fc05b8c..f6ab11b8f 100644 --- a/tools/build/docker/Dockerfile-legacy +++ b/tools/build/docker/Dockerfile-legacy @@ -67,7 +67,7 @@ COPY --chown=koyomi:koyomi /lrr.conf lrr.conf COPY --chown=koyomi:koyomi /tools/build/docker/redis.conf tools/build/docker/ COPY /tools/build/docker/wsl.conf /etc/wsl.conf COPY /tools/build/docker/s6/cont-init.d/ /etc/cont-init.d/ -COPY /tools/build/docker/s6/services.d/ /etc/services.d/ +COPY /tools/build/docker/s6/legacy-services.d/ /etc/services.d/ #COPY /tools/build/docker/s6/fix-attrs.d/ /etc/fix-attrs.d/ # Persistent volumes diff --git a/tools/build/docker/install-everything.sh b/tools/build/docker/install-everything.sh index 07b582fa5..a0b8fcc41 100755 --- a/tools/build/docker/install-everything.sh +++ b/tools/build/docker/install-everything.sh @@ -3,7 +3,7 @@ #Just do everything apk update apk add tzdata -apk add perl perl-io-socket-ssl perl-dev redis libarchive-dev libbz2 openssl-dev zlib-dev +apk add perl perl-io-socket-ssl perl-dev redis libarchive-dev libbz2 openssl-dev zlib-dev linux-headers apk add imagemagick imagemagick-perlmagick libwebp-tools libheif apk add g++ make pkgconf gnupg wget curl file apk add shadow s6 s6-portable-utils @@ -14,7 +14,7 @@ if [ -f /etc/alpine-release ]; then if [ "$alpine_version" = "3.12.12" ]; then apk add nodejs-npm else # Those packages don't exist on 3.12 - apk add nodejs npm s6-overlay s6-overlay-preinit + apk add nodejs npm s6-overlay libjxl fi fi @@ -24,12 +24,14 @@ curl -L https://cpanmin.us | perl - App::cpanminus #Alpine's libffi build comes with AVX instructions enabled #Rebuild our own libffi with those disabled if [ $(uname -m) == 'x86_64' ]; then + #Install deps only cpanm --notest --installdeps Alien::FFI curl -L -s https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/Alien-FFI-0.25.tar.gz | tar -xz cd Alien-FFI-0.25 - #Patch build script to disable AVX - sed -i 's/--disable-builddir/--disable-builddir --with-gcc-arch=x86-64-v2/' alienfile + # Patch build script to disable AVX - and SSE4 for real old CPUs + # See https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level + sed -i 's/--disable-builddir/--disable-builddir --with-gcc-arch=x86-64/' alienfile perl Makefile.PL && make install cd ../ && rm -rf Alien-FFI-0.25 fi diff --git a/tools/build/docker/s6/cont-init.d/01-lrr-setup b/tools/build/docker/s6/cont-init.d/01-lrr-setup old mode 100644 new mode 100755 index d7dca09a8..7d266df71 --- a/tools/build/docker/s6/cont-init.d/01-lrr-setup +++ b/tools/build/docker/s6/cont-init.d/01-lrr-setup @@ -42,7 +42,9 @@ chmod u+rwx /home/koyomi/lanraragi/public/temp #Remove mojo, minion and shinobu pid files rm /home/koyomi/lanraragi/public/temp/server.pid rm /home/koyomi/lanraragi/public/temp/shinobu.pid +rm /home/koyomi/lanraragi/public/temp/shinobu.pid-s6 rm /home/koyomi/lanraragi/public/temp/minion.pid +rm /home/koyomi/lanraragi/public/temp/minion.pid-s6 # https://redis.io/topics/faq#background-saving-fails-with-a-fork-error-under-linux-even-if-i-have-a-lot-of-free-ram OVERCOMMIT=$(cat /proc/sys/vm/overcommit_memory) diff --git a/tools/build/docker/s6/services.d/lanraragi/finish b/tools/build/docker/s6/legacy-services.d/lanraragi/finish old mode 100755 new mode 100644 similarity index 100% rename from tools/build/docker/s6/services.d/lanraragi/finish rename to tools/build/docker/s6/legacy-services.d/lanraragi/finish diff --git a/tools/build/docker/s6/services.d/lanraragi/run b/tools/build/docker/s6/legacy-services.d/lanraragi/run old mode 100755 new mode 100644 similarity index 100% rename from tools/build/docker/s6/services.d/lanraragi/run rename to tools/build/docker/s6/legacy-services.d/lanraragi/run diff --git a/tools/build/docker/s6/services.d/redis/finish b/tools/build/docker/s6/legacy-services.d/redis/finish old mode 100755 new mode 100644 similarity index 100% rename from tools/build/docker/s6/services.d/redis/finish rename to tools/build/docker/s6/legacy-services.d/redis/finish diff --git a/tools/build/docker/s6/services.d/redis/run b/tools/build/docker/s6/legacy-services.d/redis/run old mode 100755 new mode 100644 similarity index 100% rename from tools/build/docker/s6/services.d/redis/run rename to tools/build/docker/s6/legacy-services.d/redis/run diff --git a/tools/build/docker/s6/s6-rc.d/init/type b/tools/build/docker/s6/s6-rc.d/init/type new file mode 100644 index 000000000..bdd22a185 --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/init/type @@ -0,0 +1 @@ +oneshot diff --git a/tools/build/docker/s6/s6-rc.d/init/up b/tools/build/docker/s6/s6-rc.d/init/up new file mode 100644 index 000000000..5a4a22898 --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/init/up @@ -0,0 +1 @@ +/etc/s6-overlay/s6-rc.d/init/01-lrr-setup diff --git a/tools/build/docker/s6/s6-rc.d/lanraragi/dependencies.d/init b/tools/build/docker/s6/s6-rc.d/lanraragi/dependencies.d/init new file mode 100644 index 000000000..e69de29bb diff --git a/tools/build/docker/s6/s6-rc.d/lanraragi/dependencies.d/redis b/tools/build/docker/s6/s6-rc.d/lanraragi/dependencies.d/redis new file mode 100644 index 000000000..e69de29bb diff --git a/tools/build/docker/s6/s6-rc.d/lanraragi/finish b/tools/build/docker/s6/s6-rc.d/lanraragi/finish new file mode 100644 index 000000000..c7f28d2bf --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/lanraragi/finish @@ -0,0 +1,4 @@ +#!/bin/sh +kill -15 `cat /home/koyomi/lanraragi/public/temp/shinobu.pid-s6` +kill -15 `cat /home/koyomi/lanraragi/public/temp/minion.pid-s6` +sleep 5 diff --git a/tools/build/docker/s6/s6-rc.d/lanraragi/run b/tools/build/docker/s6/s6-rc.d/lanraragi/run new file mode 100644 index 000000000..b621c100b --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/lanraragi/run @@ -0,0 +1,4 @@ +#!/bin/sh +cd /home/koyomi/lanraragi/ +export HOME=/home/koyomi +exec s6-setuidgid koyomi perl /home/koyomi/lanraragi/script/launcher.pl -f /home/koyomi/lanraragi/script/lanraragi diff --git a/tools/build/docker/s6/s6-rc.d/lanraragi/type b/tools/build/docker/s6/s6-rc.d/lanraragi/type new file mode 100644 index 000000000..5883cff0c --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/lanraragi/type @@ -0,0 +1 @@ +longrun diff --git a/tools/build/docker/s6/s6-rc.d/redis/dependencies.d/init b/tools/build/docker/s6/s6-rc.d/redis/dependencies.d/init new file mode 100644 index 000000000..e69de29bb diff --git a/tools/build/docker/s6/s6-rc.d/redis/run b/tools/build/docker/s6/s6-rc.d/redis/run new file mode 100644 index 000000000..881f385f0 --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/redis/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec s6-setuidgid koyomi /usr/bin/redis-server /home/koyomi/lanraragi/tools/build/docker/redis.conf diff --git a/tools/build/docker/s6/s6-rc.d/redis/type b/tools/build/docker/s6/s6-rc.d/redis/type new file mode 100644 index 000000000..5883cff0c --- /dev/null +++ b/tools/build/docker/s6/s6-rc.d/redis/type @@ -0,0 +1 @@ +longrun diff --git a/tools/build/docker/s6/s6-rc.d/user/contents.d/init b/tools/build/docker/s6/s6-rc.d/user/contents.d/init new file mode 100644 index 000000000..e69de29bb diff --git a/tools/build/docker/s6/s6-rc.d/user/contents.d/lanraragi b/tools/build/docker/s6/s6-rc.d/user/contents.d/lanraragi new file mode 100644 index 000000000..e69de29bb diff --git a/tools/build/docker/s6/s6-rc.d/user/contents.d/redis b/tools/build/docker/s6/s6-rc.d/user/contents.d/redis new file mode 100644 index 000000000..e69de29bb diff --git a/tools/build/windows/Karen b/tools/build/windows/Karen index c6b8c6b80..eb529fc43 160000 --- a/tools/build/windows/Karen +++ b/tools/build/windows/Karen @@ -1 +1 @@ -Subproject commit c6b8c6b80d01d486cba64d1730530f8584419387 +Subproject commit eb529fc43b3ef6b8d46b0b2447c05eef09b01df8 diff --git a/tools/cpanfile b/tools/cpanfile index f6eadc8f3..ff53d9658 100755 --- a/tools/cpanfile +++ b/tools/cpanfile @@ -6,7 +6,7 @@ requires 'local::lib', 2.000024; requires 'Redis', 1.995; requires 'Encode', 3.01; requires 'Archive::Libarchive::Extract', 0.03; -requires 'Archive::Libarchive::Peek', 0.03; +requires 'Archive::Libarchive::Peek', 0.04; requires 'Digest::SHA', 6.02; # Not required by LRR itself but needs this version for Alpine support @@ -36,7 +36,7 @@ requires 'Test::Trap', 0.3.4; requires 'Test::Deep', 1.130; # Mojo stuff -requires 'Mojolicious', 9.19; +requires 'Mojolicious', 9.27; requires 'Mojolicious::Plugin::TemplateToolkit', 0.005; requires 'Mojolicious::Plugin::RenderFile', 0.12; requires 'Mojolicious::Plugin::Status', 1.15; @@ -44,7 +44,7 @@ requires 'IO::Socket::SSL', 2.067; requires 'Cpanel::JSON::XS', 4.06; # Job Queue (Minion) -requires 'Minion', 10.20; +requires 'Minion', 10.25; requires 'Minion::Backend::Redis', 0.002; # Background Worker (Shinobu)