Cygwin
Get that Linux feeling - on Windows
Uploading Packages to cygwin.com
This page documents how to upload packages to cygwin.com, after you have provided an SSH key.
Uploading packages using cygport
If you have a cygport build
script for your packages, you can upload your finished packages
using
cygport up, e.g.:
cygport pkg.cygport up
calm will scan the upload directories for packages that are ready,
verify them, and, if there are no errors, move the packages into the real
release area. New directories in the release area will be created as needed.
If there are errors then setup.ini will not be updated and the release
area will remain unchanged.
Getting reports
The !email file in the root of your upload directory contains a list
of email address (one per line) where any calm reports on your
packages should be sent. This file is initially created containing the
email address from which the SSH key
was sent.
If this file is empty or missing, you won't get email when calm finds
issues with what was uploaded.
For historical reasons, this file can also be named !mail.
Removing the test label from a package
Package maintainers can promote their own packages from test to current using:ssh cygwin@cygwin.com untest package-version-releaseHistorical alternatives were:
- Ask on the
#cygwin-developersIRC channel, or thecygwin-appsmailing list, for the package to beuntest-ed. - If you still have the cygport build directory from when you built the test
packages, you can amend all the
.hintfiles underPVR.arch/dist/to remove thetest:line, andcygport uploadagain. - The package can be rebuilt with a bumped release number, and without using
cygport package-test(although this should be a last resort, because unless the build is reproducible, this invalidates some of the testing your package has received).
Removing files from the Cygwin distribution
Removing files is not normally needed, as old versions (as determined by the package expiry settings, which can be configured with keep*: lines in override.hint) will be removed automatically.
However, if you do need to remove a file from the distribution, upload an empty
file with the name of the file that you want deleted, prefixed with a
"-", in the same directory as the file that you want deleted.
For example, if you want to delete the file foo-1.2-1.tar.xz then upload an empty file named -foo-1.2-1.tar.xz
Note that this will not cause setup to automatically downgrade to the
previous version of foo, if foo-1.2-1 was installed before
it was removed. If a superseding version does not (yet) exist, downgrading
can be configured by using
a replace-versions: line in
override.hint.
Note that files are not actually deleted; they are moved to a vault where they will be removed after some indeterminate amount of time.
Uploading packages manually
You may also upload files directly, using an sftp client such as sftp or lftp. An upload directory on cygwin.com will look like this:
Your Name # directory is currently your full name (you won't actually see this)
x86 x86_64 noarch # arch directory
release release release # release directory
pkg # package directory
pkg-debuginfo # package subdirectories
Example using lftp to upload packages:
% lftp sftp://cygwin@cygwin.com
cd ok, cwd=/
lftp cygwin.com:/> ls
drwxrwsr-x 4 root cygstage 4096 Sep 1 05:16 .
drwxrwxr-x 61 cygwin root 4096 Sep 1 05:12 ..
drwxrwsr-x. 3 cygwin cygstage 4096 May 9 19:00 noarch
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 19:35 x86
drwxrwsr-x 3 cygwin cygstage 4096 Aug 10 19:04 x86_64
lftp cygwin.com:/> cd x86/release
cd ok, cwd=/x86/release
lftp cygwin.com:/x86/release> ls
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 18:28 .
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 19:35 ..
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 19:36 grep
lftp cygwin.com:/x86/release> mirror -eR grep
Total: 2 directories, 3 files, 0 symlinks
New: 3 files, 0 symlinks
2311396 bytes transferred in 14 seconds (166.2K/s)
lftp cygwin.com:/x86/release> ls grep
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 19:47 .
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 18:28 ..
-rw-r--r-- 1 cygwin cygstage 356 Oct 12 19:47 grep-2.14-3.hint
-rw-r--r-- 1 cygwin cygstage 229284 Oct 12 19:47 grep-2.14-3.tar.xz
-rw-r--r-- 1 cygwin cygstage 1204708 Oct 12 19:46 grep-2.14-3-src.tar.xz
drwxrwsr-x 2 cygwin cygstage 4096 Oct 12 19:47 grep-debuginfo
lftp cygwin.com:/x86/release> ls grep/grep-debuginfo
drwxrwsr-x 2 cygwin cygstage 4096 Oct 12 19:47 .
drwxrwsr-x 3 cygwin cygstage 4096 Oct 12 19:47 ..
-rw-r--r-- 1 cygwin cygstage 356 Oct 12 19:47 grep-debuginfo-2.14-3.hint
-rw-r--r-- 1 cygwin cygstage 877404 Oct 12 19:47 grep-debuginfo-2.14-3.tar.xz
lftp cygwin.com:/x86/release> put /dev/null -o !ready
Example lftp upload command line
# command line to upload the time packages
cd wherever
lftp -c 'connect sftp://cygwin@cygwin.com/; cd x86/release; mirror -eR time; put /dev/null -o !ready'
The package directories should exactly mirror what is currently in
the release directory. So, it should be a hierarchy containing
.tar.xz files and .hint files.
The !ready file is used to tell
calm (the script which creates setup.ini) that any files older
than this file in or under the given directory should be processed. The
intent is that you create !ready when you have finished
uploading everything that you plan on uploading.
Note: !ready files should not be created in the root of your
upload directory, i.e. they should be in the architecture
directories x86, x86_64 and noarch or in the package
directories themselves.
Frequently Asked Questions
Q) Why can't I login via sftp?
A) There are two likely reasons for login failures:
- You're not using the SSH key provided when you set up your account.
- You are not logging in as the
cygwinuser. You need to login as usercygwinwith no password.
Q) I don't understand the errors in an emailed calm upload report!
A) Ask on the cygwin-apps mailing list, or the #cygwin-developers IRC channel.