Package Details: mastodon 4.2.8-1

Git Clone URL: https://aur.archlinux.org/mastodon.git (read-only, click to copy)
Package Base: mastodon
Description: Your self-hosted, globally interconnected microblogging community
Upstream URL: https://github.com/mastodon/mastodon
Keywords: activitypub fediverse mastodon server
Licenses: AGPL3
Submitter: flacks
Maintainer: dodecahedron
Last Packager: dodecahedron
Votes: 20
Popularity: 0.96
First Submitted: 2018-06-19 19:35 (UTC)
Last Updated: 2024-02-23 15:26 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 Next › Last »

peippo commented on 2022-11-03 09:46 (UTC)

Thanks for the reply, and thanks for the package!

It did not work for me as-is. Might be connected to other things as well, but the changes I commented about made it work for me. Not saying that that’s what’s supposed to go into the PKGBUILD, but maybe it helps others who have similar struggles. For the record, I did not try to backup the config file and database, then uninstall mastodon and reinstall a clean copy from scratch, which might have been easier.

ZhangHua commented on 2022-11-03 03:44 (UTC)

@peippo

I think there is no need to set permission for /opt/mastodon/.bundle because it is just a symbol link to /var/lib/mastodon/.bundle, when read/write those files, program should follow the link to the place it have permission to do .

As all the file in /var/lib/mastodon belongs to mastodon:mastodon, I think there is also no need to set permission explicitly for /var/lib/mastodon/public.

Files in /opt/mastodon/app is read-only for user mastodon because there shouldn't change them when setting up or precompiling assets.

There is also no /var/lib/mastodon/node_modules/font-awesome/css/postcss.config.js on my computer but precompiling still works. You can check if your working directory is /opt/mastodon rather than /var/lib/mastodon, files in /var/lib/mastodon are more like an overlay to add writable data to /opt/mastodon.

I am also still trying to understand what happens when installing/upgrading this package, so I can't guarantee that I am right. If I am wrong, please let me know so I can fix the gist. You can leave a comment on gist to avoid disturbing ones noticing here.

peippo commented on 2022-11-02 17:00 (UTC)

One last comment for today, because it might help others: manually copying /opt/mastodon/postcss.config.js to /var/lib/mastodon/node_modules/font-awesome/css/ did allow me to run the precompile step. Not ideal, but works.

peippo commented on 2022-11-02 15:26 (UTC)

Thanks, @ZhangHua!

I also still added

Z /opt/mastodon/.bundle              -   mastodon    mastodon
Z /var/lib/mastodon/public           -   mastodon    mastodon
L /var/lib/mastodon/app              -   -           -           -   /opt/mastodon/app

to the tmpfiles.d, and manually usermoded mastodon’s home directory.

Note that the permissions I gave are maybe too generous, and that I don’t have any idea how the home directory of the user could be updated from the sysusers.d (would stopping all processes be enough?)

However, I still end up with an error during precompile, which I don’t seem to be able to solve:

    WARNING in ./app/javascript/styles/mastodon-light.scss (/var/lib/mastodon/node_modules/css-loader/dist/cjs.js??ref--6-1!/var/lib/mastodon/node_modules/postcss-loader/src??ref--6-2!/var/lib/mastodon/node_modules/sass-loader/dist/cjs.js??ref--6-3!./app/javascript/styles/mastodon-light.scss)
    Module Warning (from /var/lib/mastodon/node_modules/postcss-loader/src/index.js):
    Warning

    (1:225993) start value has mixed support, consider using flex-start instead
Child mini-css-extract-plugin ../../var/lib/mastodon/node_modules/css-loader/dist/cjs.js??ref--6-1!../../var/lib/mastodon/node_modules/postcss-loader/src/index.js??ref--6-2!../../var/lib/mastodon/node_modules/sass-loader/dist/cjs.js??ref--6-3!../../var/lib/mastodon/node_modules/font-awesome/css/font-awesome.css:
    Entrypoint mini-css-extract-plugin = *
       1 module

    ERROR in /var/lib/mastodon/node_modules/font-awesome/css/font-awesome.css (/var/lib/mastodon/node_modules/css-loader/dist/cjs.js??ref--6-1!/var/lib/mastodon/node_modules/postcss-loader/src??ref--6-2!/var/lib/mastodon/node_modules/sass-loader/dist/cjs.js??ref--6-3!/var/lib/mastodon/node_modules/font-awesome/css/font-awesome.css)
    Module build failed (from /var/lib/mastodon/node_modules/postcss-loader/src/index.js):
    Error: No PostCSS Config found in: /var/lib/mastodon/node_modules/font-awesome/css
        at /var/lib/mastodon/node_modules/postcss-load-config/src/index.js:91:15

Do you have any idea how to fix this? (google and stackoverflow did not help ;))

ZhangHua commented on 2022-11-02 13:15 (UTC)

@peippo Oh I see, I forgot to set proper options, you can add options=(!lto) just like https://github.com/archlinux/svntogit-community/blob/packages/ruby/trunk/PKGBUILD#L16

peippo commented on 2022-11-02 11:21 (UTC) (edited on 2022-11-02 12:06 (UTC) by peippo)

@ZhangHua: I tried the PKGBUILD from your gist, but I cannot build it. I always end up in a segfault during ruby compilation:

<internal:gc>:240: [BUG] Segmentation fault at 0x0000000000000004

full build log here

edit: seems to be connected to LTO, see https://bugs.ruby-lang.org/issues/18062 . I’ll try building without LTO and will let you know.

edit 2: with options=(!lto) it builds, but the installed bundle seems to get lost - are all the symlinks in the correct direction, or should they be the opposite way around?

ZhangHua commented on 2022-10-28 03:21 (UTC) (edited on 2022-10-29 04:07 (UTC) by ZhangHua)

I think we may build a custom version of ruby instead using the system one, just like what the Dockerfile does, the size of custom one is just about 121MB and I think it is affordable compared to this package's size.

Edit: I have tried to use the custom version of ruby and it seems works well. If you want to try, you can use this gist to create a newer version of mastodon package. Please also note that there are some breaking changes such as moving program to /opt/mastodon and just make /var/lib/mastodon for storing data, you may want to run migrate steps to keep your server work after upgrading.

dodecahedron commented on 2022-10-13 18:18 (UTC)

It seems like updates to the Ruby stdlib packages recently caused Mastodon to break with errors like this:

Oct 13 14:43:52 exozyme bundle[20494]: [20494] ! Unable to load application: LoadError: cannot load such file -- digest/version
Oct 13 14:43:52 exozyme bundle[20494]: Did you mean?  digest/version
Oct 13 14:43:52 exozyme bundle[20494]: bundler: failed to load command: puma (/var/lib/mastodon/vendor/bundle/ruby/3.0.0/bin/puma)
Oct 13 14:43:52 exozyme bundle[20494]: /var/lib/mastodon/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27:in `require': cannot load such file -- digest/version (LoadError)
Oct 13 14:43:52 exozyme bundle[20494]: Did you mean?  digest/version

Until this is fixed, I recommend you do not upgrade any Ruby packages. Does anyone with more Ruby knowledge than me know what should be done to actually fix this?

ZhangHua commented on 2022-08-27 03:40 (UTC)

line 76 should be -i nginx.conf because when run that command, current working directory has already been dist folder.

dodecahedron commented on 2022-08-25 23:16 (UTC)

@MShrimp4 Thanks, fixed!