adding a directory tree to package source
Andrew Schulman via Cygwin-apps <[email protected]> Tue, 28 Jul 2026 12:55:56 -0400
| Newsgroups | gmane.os.cygwin.applications |
|---|---|
| Message-ID | <[email protected]> |
=46or fish I have a directory structure of Cygwin-specific files that I =
need to
have copied into the source tree:
$ git ls
Cygwin/etc/fish/conf.d/00_PATH.fish
Cygwin/etc/fish/conf.d/01_fish_variables.fish
Cygwin/etc/fish/conf.d/cygwin.fish
Cygwin/usr/share/fish/vendor_completions.d/mount.fish
Cygwin/usr/share/fish/vendor_completions.d/umount.fish
Cygwin/usr/share/fish/vendor_functions.d/fish_is_root_user.fish
Cygwin/usr/share/fish/vendor_functions.d/sudo.fish
fish.cygport
Is there a supported way to do this? I've tried multiple ways, and all of=
them
fail.
(1) Add the files to CYGWIN_FILES:
CYGWIN_FILES=3DCygwin/*
As I reported in [1], this doesn't work because cygport and scallywag =
seem to
handle CYGWIN_FILES differently. On my local build host the above works =
fine:
cygport prep copies the extra directories into the source tree. But when =
I
push it up to scallywag, the build fails [2]:
cp: cannot stat
'/cygdrive/d/a/scallywag/fish/fish-4.8.1-2.x86_64/src/fish-4.8.1/CYGWIN-P=
ATCHES/Cygwin/*':
No such file or directory
(2) Add the files to SRC_URI. Something like:
SRC_URI=3D"
https://github.com/fish-shell/fish-shell/releases/download/$VERSION/fish-=
$VERSION.tar.xz
Cygwin/etc
Cygwin/usr
"
I've tried several variations of this, but all of them give errors from
cygport. I've concluded that it's not going to work as cygport is written=
now,
because cygport allows only single files in SRC_URI, not directories.
(3) Use src_unpack_hook to copy in the files:
CYGPORT_USE_UNSTABLE_API=3D1
src_unpack_hook ()
{
inform "Copying in Cygwin"
cp -av ${top}/Cygwin "${S/\/src\///origsrc/}"
}
This used to work, but it's stopped working recently in scallywag[3]. =
It's
also unsupported, and isn't really right.
(4) Maintain the files as patches, and add them to PATCH_URI. Forget it. =
It's
unmaintainable.
(5) Tar up and commit the tree of extra files, and add the tarball to =
SRC_URI:
SRC_URI=3D"
https://github.com/fish-shell/fish-shell/releases/download/$VERSION/fish-=
$VERSION.tar.xz
Cygwin.tar.xz
"
Then copy the files in in src_install(). This isn't ideal, but it does =
work on
my local build host. But it fails when I try to push it up - git rejects =
the
commit because the tarball is more than 1024 bytes.
--
So I'm currently blocked here, and looking for a solution. If there's not
currently a way to do this, my preference would be either:
* Fix (1), by fixing scallywag to treat CYGWIN_FILES the same as cygport =
does;
or
* Fix (2), by letting cygport accept directories as well as single files =
in
SRC_URI. This would be super easy to do, I'm happy to offer a patch if it
would be of interest. I guess that scallywag would need to be updated =
too.
Suggestions?
Thanks,
Andrew
[1] =
https://sourceware.org/pipermail/cygwin-apps/2025-September/044631.html
[2]
https://github.com/cygwin/scallywag/actions/runs/30375321861/job/90329393=
203#step:9:204
[3]
https://github.com/cygwin/scallywag/actions/runs/29505988338/job/87647850=
187#step:9:939