1KUP(1) kernel.org KUP(1)
2
3
4
6 kup - kernel.org upload utility
7
9 kup [global options] command [-- command...]
10
12 This utility is used to upload files to kernel.org and other systems
13 using the same upload system (kup-server). Each upload is required to
14 have a PGP signature, and the server will generate multiple compressed
15 formats if the content uploaded is intended to be compressed.
16
17 Additionally, if the user has content from a git(1) tree already on
18 server, it is possible to reproduce the content server-side, thereby
19 reducing bandwidth needs. The user still has to generate the content
20 locally and sign it.
21
23 -b, --batch
24 Instead of connecting to a remote host, output the protocol con‐
25 tent to standard output. The output from an arbitrary number of
26 kup invocations can be concatenated into a single batchfile and
27 then sent to the server as a single session, e.g.:
28
29 cat batchfile | ssh -a -x -k -T [user@]host
30
31 -e, --rsh, --ssh command
32 Override the default command used to connect to the server. The
33 default is set by the environment variable KUP_RSH or if that is
34 not set, ssh -a -x -k -T.
35
36 -H, --host [user@]host
37 Override the default user and host to which to connect. The
38 default is set by the environment variable KUP_HOST or if that
39 is not set, kup.kernel.org.
40
41 -c, --subcmd subcommand
42 After establishing the ssh connection, issue a subcommand in
43 case the remote server is used in conjunction with an AuthZ tool
44 like gitolite. Can also be set using the env variable KUP_SUBCMD
45 or if not set, no subcommand will be used (default kup-server
46 behavior).
47
49 A series of commands can be specified on a single command line, sepa‐
50 rated by a double dash argument (--).
51
52 In all cases, PGP signatures are detached signature files corresponding
53 to the uncompressed content. If a remote_path ends in .gz then gzip,
54 bzip2 and xz compressed files are generated on the server; otherwise
55 the content is stored uncompressed.
56
57 put local_file signature_file remote_path
58 Upload the file local_file signed with signature_file.
59 local_file can be compressed with gzip, bzip2 or xz; this may
60 reduce upload time. The content will be stored compressed or
61 uncompressed depending solely on the extension of remote_path.
62
63 put --tar [--prefix=] remote_tree ref signature_file remote_path
64 Generate a tar archive file from ref ref of git tree remote_tree
65 (using git archive --format=tar) with signature signature_file
66 generated locally, and place it in remote_path.
67
68 git archive has been found to be relatively stable, so this com‐
69 mand is relatively robust to git version changes. The --prefix
70 is passed to git archive verbatim.
71
72 put --diff remote_tree ref1 ref2 signature_file remote_path
73 Generate a patch file between refs ref1 and ref2 of git tree
74 remote_tree (using git diff-tree -p) with signature signa‐
75 ture_file generated locally, and place it in remote_path.
76
77 The output of git diff-tree has been found to vary between git
78 versions, so successful use of this command may require the same
79 version of git locally as on the server in order to produce a
80 valid signature.
81
82 mkdir remote_path
83 Create a new directory on the server.
84
85 mv|move old_path new_path
86 Move the file or directory old_path to new_path. For a file,
87 the .sign files are also moved, and for compressed files, all
88 the compression formats are moved together.
89
90 ln|link old_path new_path
91 Hard link the file or directory old_path to new_path. For a
92 file, the .sign files are also linked, and for compressed files,
93 all the compression formats are linked together.
94
95 rm|del|delete old_path
96 Delete the file or directory old_path. For a file, the .sign
97 files are also deleted, and for compressed files, all the com‐
98 pression formats are deleted together.
99
100 ls|dir path...
101 Lists back the contents of one or more directories on the
102 server.
103
105 Remote (server) pathnames all need to be absolute paths, starting with
106 a slash (/). The sole exception is new_path for the mv and link com‐
107 mands, which if it is not absolute is taken to be relative to the
108 old_path minus the final component. Similarly, if new_path ends in a
109 slash then the final component of old_path will be appended.
110
111 For the put command, except when --tar or --diff is specified, if the
112 remote_path ends in a slash then the final (filename) component of
113 local_file will be appended to the final pathname.
114
116 Kup checks the presence of $HOME/.kuprc and can load the host and rsh
117 parameters from the config file. The environment variables KUP_HOST and
118 KUP_RSH will override the values set in this config file.
119
120 SAMPLE $HOME/.kuprc:
121
122 host = user@kup.kernel.org
123 rsh = /usr/bin/ssh -a -x -k -T
124
126 Generate a tarball locally, sign it, compress it, and upload it into
127 /pub/foolib on the server:
128
129 git archive --format=tar --prefix=foolib-1.0/ -o foolib-1.0.tar v1.0
130 gpg --detach-sign --armor foolib-1.0.tar
131 bzip2 -9 foolib-1.0.tar
132 kup put foolib-1.0.tar.bz2 foolib-1.0.tar.asc /pub/foolib/foolib-1.0.tar.bz2
133
134 Generate a tarball locally, sign it, then tell kup-server to generate
135 an identical tarball on the server, verify the signature, and put the
136 compressed results in /pub/foolib:
137
138 git archive --format=tar --prefix=foolib-1.0/ -o foolib-1.0.tar v1.0
139 gpg --detach-sign --armor foolib-1.0.tar
140 kup put --tar --prefix=foolib-1.0/ /repos/foolib.git v1.0 foolib-1.0.tar.asc /pub/foolib/foolib-1.0.tar.gz
141
143 Written by H. Peter Anvin <hpa@zytor.com>.
144
146 Copyright © 2011 Intel Corporation
147
148 This program is free software; you can redistribute it and/or modify it
149 under the terms of the GNU General Public License as published by the
150 Free Software Foundation, Inc.; either version 2 of the License, or (at
151 your option) any later version; incorporated herein by reference.
152 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
153 PARTICULAR PURPOSE.
154
156 git(1), ssh(1), gzip(1), bzip2(1), xz(1).
157
158
159
160kernel.org upload utility 2011 KUP(1)