Package Details: papermc 1.20.4+b364-2

Git Clone URL: https://aur.archlinux.org/papermc.git (read-only, click to copy)
Package Base: papermc
Description: Next generation of Minecraft server, compatible with Spigot plugins and offering uncompromising performance
Upstream URL: https://papermc.io/
Keywords: alternative craftbukkit cuberite minecraft-server paperspigot spigot
Licenses: custom
Conflicts: papermc-git
Submitter: edh
Maintainer: edh
Last Packager: edh
Votes: 23
Popularity: 0.23
First Submitted: 2019-08-06 07:47 (UTC)
Last Updated: 2023-12-31 16:04 (UTC)

Dependencies (8)

Required by (0)

Sources (3)

Pinned Comments

edh commented on 2019-09-03 10:54 (UTC) (edited on 2019-10-22 09:52 (UTC) by edh)

Unfortunately, upstream does not really have proper releases but instead points to build-versions of the software. Note, I will not push every new build of the package to the AUR but I will update the package upon new minecraft releases, e.g. for 1.14.4 to 1.14.5.

Latest Comments

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

edward-p commented on 2021-03-17 14:19 (UTC) (edited on 2021-03-17 15:07 (UTC) by edward-p)

@edh

By now, I don't think systemd-tmpfiles was designed to set file permissions and ownership for normal files.

It was designed for managing lifecycle of tmpfiles(create remove clean etc.) I think.

I think we just need to consider the files that provided by the package, then we only need:

z /srv/papermc 2775 papermc papermc - -
z /srv/papermc/log 2775 papermc papermc - -

As for /srv/papermc/papermc_server.jar we only need read permission guaranteed.

edward-p commented on 2021-03-17 13:57 (UTC) (edited on 2021-03-17 13:58 (UTC) by edward-p)

@edh

I just tested the config in https://aur.archlinux.org/packages/papermc/#comment-796931

It became normal:

$ systemd-analyze critical-chain systemd-tmpfiles-setup.service        [21:54:48]
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

systemd-tmpfiles-setup.service +2.570s
└─local-fs.target @6.181s
  └─run-user-1000.mount @13.695s
    └─local-fs-pre.target @3.387s
      └─systemd-tmpfiles-setup-dev.service @2.830s +557ms
        └─kmod-static-nodes.service @2.569s +72ms
          └─systemd-journald.socket @2.541s
            └─system.slice @2.162s
              └─-.slice @2.162s

But looking at the details, /srv/papermc/*, /srv/papermc/world* were ignored.

Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Running create action for entry z /srv/papermc
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: "/srv/papermc" matches mode 2775 already.
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Failed to determine whether '/srv/papermc/*' is below autofs, ignoring: No such file or directory
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Running create action for entry z /srv/papermc/*
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Running create action for entry Z /srv/papermc/cache
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Running create action for entry Z /srv/papermc/logs
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Failed to determine whether '/srv/papermc/world*' is below autofs, ignoring: No such file or directory
Mar 17 21:48:03 Ezpro-V5 systemd-tmpfiles[332]: Running create action for entry Z /srv/papermc/world*
Mar 17 21:48:05 Ezpro-V5 systemd-tmpfiles[332]: Running create action for entry z /usr/bin/postdrop
Mar 17 21:48:05 Ezpro-V5 systemd-tmpfiles[332]: "/usr/bin/postdrop" matches mode 2755 already.

I have no idea what "autofs" is.

edh commented on 2021-03-17 08:44 (UTC)

@edward-p That's unexpected but just might be due to caching. Can you test the suggested papermc.conf and see whether that resolved the problem for you?

edward-p commented on 2021-03-17 00:54 (UTC) (edited on 2021-03-17 01:05 (UTC) by edward-p)

@edh I just noticed something weired, when I try to execute it manually after boot:

root:~/ # time systemd-tmpfiles --create --prefix=/srv/papermc
systemd-tmpfiles --create --prefix=/srv/papermc  0.93s user 1.58s system 96% cpu 2.595 total
root:~/ # time chown -R papermc:papermc /srv/papermc
chown -R papermc:papermc /srv/papermc  0.39s user 1.82s system 25% cpu 8.698 total

It shows that systemd-tmpfiles is even faster than chown.

But none of them took more than 2min!

So systemd-tmpfiles was only slow on system boot.


papermc.conf:

z /srv/papermc 2775 papermc papermc - -
Z /srv/papermc - papermc papermc - -

And, I put papermc on HDD.

edh commented on 2021-03-16 22:55 (UTC)

@edward-p hmm, I am not really sure how to handle this case neatly. I definitely don't want to hard-code the user ID into the PKGBUILD to make the /srv/papermc files belong to papermc but I admit slowing down the boot that much isn't nice either.

Can you try adapting the tmpfile to something akin to this:

z /srv/papermc 2775 papermc papermc - -
z /srv/papermc/* - papermc papermc - -
Z /srv/papermc/cache - papermc papermc - -
Z /srv/papermc/logs - papermc papermc - -
Z /srv/papermc/world* - papermc papermc - -

This basically excludes the plugins directory from being chowned recursively. Maybe your plugin only needs read access and will still work.

Btw. what kind of hard or solid state drive are you using? Even for thousands of files changing the ownership shouldn't take that long!

edward-p commented on 2021-03-16 19:26 (UTC)

Z /srv/papermc - papermc papermc - - can cause slow boot(since some plugin like dynmap have so many files in /src/papermc/plugins/dynmap):

$ systemd-analyze blame                                                                    
2min 23.574s systemd-tmpfiles-setup.service

$ journalctl -u systemd-tmpfiles-setup.service
Mar 17 03:17:02 Ezpro-V5 systemd-tmpfiles[340]: Running create action for entry Z /srv/papermc
Mar 17 03:19:25 Ezpro-V5 systemd-tmpfiles[340]: Running create action for entry z /srv/papermc

edh commented on 2021-01-17 15:13 (UTC)

@xiretza Yes, you're absolutely right! I fixed the issue just now!

xiretza commented on 2021-01-17 15:03 (UTC)

LICENSE_1.16.5+b427.md checksum is wrong - should be d4c645a58e1a17a0a1e42856a3cc43097711a05bf3d9f18c77c3bc9874417f223552859042ff00b7d3dda0003f49a9ee568540c2eb24e9f8fbb3c055f3b6e0a5.

edh commented on 2020-10-03 09:53 (UTC)

Unfortunately there was a bug related to the new way users are created. It has been fixed in the new release of the package but for servers already featuring a papermc user, manual intervention is needed: If you happen to encounter the error message This account is currently not available., you will need to update the login shell such that you can interact with the console again by running usermod -s /bin/bash papermc as root.

edh commented on 2020-07-20 08:11 (UTC) (edited on 2020-07-20 08:11 (UTC) by edh)

@mqs This file is just a remnant from a very old version. I'll delete it with the next release. Thanks!

About the sysusers.d and tmpfiles.d stuff: I have long toyed with the idea of switching. I definitely agree that this is superior to the way it is handled now. However, I do not have the time at hand to properly test it and as I know that quite a few use my script and minecraft packages "productively" I am reluctant to roll out the changes just yet. If you are willing to test the changes that would be really awesome.

It could be as easy as

/usr/lib/tmpfiles.d/papermc.conf

z /srv/papermc 2775 papermc papermc - -
Z /srv/papermc - papermc papermc - -

and

/usr/lib/sysusers.d/papermc.conf

u papermc - "PaperMC Server" /srv/papermc -