KUP-SERVER(1)

πŸ’– KUP-SERVER β€” bestie's guide to the kernel.org upload server πŸ’–

okay so this is kup-server, aka the kernel.org upload server utility, and she's the receiving end of the whole upload situation. think of her as the bouncer at the club who also happens to file your paperwork. let's get into it ✨


🌸 DESCRIPTION 🌸

kup-server is literally designed to be the thing that catches an ssh shell. you set it up in ~/.ssh/authorized_keys with options like this (or something basically identical):

command="/usr/bin/kup-server",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAAA[...]

the way this works: every single user needs their own UID. no sharing, no communal vibes, because Unix user permissions are the mechanism doing tree access control. on the client side there's a matching bestie called kup that kicks off the connection and actually does the uploading. they're a duo, your honor 🫢


⭐ GLOBAL CONFIG ⭐

the config file for kup-server lives at /etc/kup/kup-server.cfg and it has these options:

πŸŽ€ [paths] πŸŽ€

bestie. listen. all paths in this section should be disjoint. do not combine any of them into one directory. i'm so serious.
  • data_path = /var/lib/kup/pub β€” this is the path for public consumption, like when stuff gets served via http or rsync. it's the finished-goods shelf πŸ’…
  • git_path = /var/cache/git β€” this is where the git trees (for the TAR and DIFF options) are available. these should be readonly for the uploaders, no cap.
  • lock_file = /run/kup/lock β€” a common lock file for data_path. no program should modify the content in data_path without holding an flock on this file. also should be readonly for the uploaders. respect the lock or perish πŸ”₯
  • tmp_path = /var/cache/kup/tmp/ β€” okay so tmp_path can be either one of these two situations:
    1. a directory writable by every user and with the sticky bit set (typically mode 1777 or 1770). in that case, DO NOT end the path with a slash. or:
    2. a directory containing an empty directory for each user (named for that user), owned by that user and mode 0700. in this case, DO end the path with a slash.

in either case, this directory tree MUST be on the same filesystem as data_path, because the script expects to create files in this directory and rename() them into data_path. don't play with her like that πŸ™ˆ

  • pgp_path = /var/lib/kup/pgp β€” a directory containing a GnuPG public keyring for each user, named <user>.gpg and readable (but not writable) by that user.

πŸ¦‹ [limits] πŸ¦‹

heads up: all sizes are in bytes, all times in seconds.

  • max_data = 8589934592 β€” max size of uploaded data.
  • bufsiz = 262144 β€” buffer size when reading data.
  • timeout_command = 30 β€” how long to wait for a command to time out.
  • timeout_data = 300 β€” must read at least bufsiz bytes in this timespan.
  • timeout_compress = 900 β€” uncompressing tarballs must take at most this long.
  • timeout_compress_cpu = 900 β€” each compression command must take at most this long in CPU time.

🌈 [compressors] 🌈

this section is where you tell her which compressors to use when creating compressed versions of uploaded content. iconic behavior.

  • use = gz, xz β€” a comma-separated list of file extensions to create (minus the leading dot). for each extension you specify, you will need to add a matching section specifying which command and flags to use for decompression and which for compression. make sure to configure the decompress command to output to stdout. e.g.:
[gz]
compress_command = /bin/pigz -9
decompress_command = /bin/gzip -cd

[xz]
compress_command = /bin/xz -9 -T0
decompress_command = /bin/xz -cd

πŸ‘‘ AUTHOR πŸ‘‘

written by H. Peter Anvin <hpa@zytor.com>. periodt.


Copyright Β© 2011 Intel Corporation

this program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, Inc.; either version 2 of the License, or (at your option) any later version; incorporated herein by reference. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. so like, she's free, she's open, she's not promising you anything 😭


🌟 SEE ALSO 🌟

  • kup(1) β€” her partner in crime, go say hi 🫢

and that's the whole page, bestie! this was kup-server, the kernel.org upload server utility, brought to you in 2011 by kernel.org. now go configure your authorized_keys and slay πŸ’…βœ¨

πŸ“¦ where this page comes from