Skip to content

dist: fix to drop test bundle .c files from the source tarball - #22686

Closed
vszakats wants to merge 13 commits into
curl:masterfrom
vszakats:tarball-fix
Closed

vszakats wants to merge 13 commits into
curl:masterfrom
vszakats:tarball-fix

Conversation

@vszakats

@vszakats vszakats commented Aug 26, 2026

Copy link
Copy Markdown
Member

Drop libtests.c, servers.c, tunits.c, units.c from source distro
tarball.

Minor downside: it needs the bundle name be hardcoded into the
nodist_<BUNDLE>_SOURCES = lines.

Also:

  • confirmed that CLEANFILES is still required after this.

Ref: #22722 (alternate solution)
Ref: #22723 (experiment)
Follow-up to 71cf0d1 #14772

@vszakats
vszakats marked this pull request as draft August 26, 2026 09:53
@vszakats vszakats added the dist label Aug 26, 2026
@vszakats

vszakats commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Hm, I guess it's fine to have them there. May help if someone wants to
build tests but not run them on system with no Perl. But, I also can't
figure out how to exclude these files from dist. E.g. lib1521.c is excluded
and can't spot any difference between the handling of libtests.c, which
is included.

Try dropping `libtests.c`, `servers.c`, `tunits.c`, `units.c` from distro tarball.

Closes curl#22686
Replacing individual names for each. They are in different
subdirectories, thus the same source filename is fine.

To simplify excluding them from the source tarball.
@vszakats

Copy link
Copy Markdown
Member Author

This method seems to work:

-src/tool_hugehelp.c
-tests/Makefile.in
-tests/certs/Makefile.in
-tests/data/Makefile.in
-tests/http/Makefile.in
-tests/libtest/Makefile.in
-tests/server/Makefile.in
-tests/tunit/Makefile.in
-tests/unit/Makefile.in

https://github.com/curl/curl/actions/runs/33176294798/job/98866767685?pr=22686

Minor downside, it needs the bundle name be hardcoded into the nodist_<NAME>_SOURCES = line.
This is fine, but I wonder if there is an alternative that doesn't need this.

@vszakats
vszakats marked this pull request as ready for review August 28, 2026 13:54
@vszakats vszakats changed the title dist: blind try to fix stray bundle .c files in distro tarball dist: fix stray bundle .c files in distro tarball Aug 28, 2026
@vszakats vszakats changed the title dist: fix stray bundle .c files in distro tarball dist: fix to drop stray bundle .c files from the source tarball Aug 28, 2026
@vszakats vszakats changed the title dist: fix to drop stray bundle .c files from the source tarball dist: fix to drop bundle .c files from the source tarball Aug 28, 2026
@vszakats
vszakats requested a balanced review from Copilot August 28, 2026 14:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents generated test-bundle C files from being included in source distributions.

Changes:

  • Marks all four generated bundle sources as nodist.
  • Retains existing cleanup behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/unit/Makefile.am Excludes units.c from distributions.
tests/tunit/Makefile.am Excludes tunits.c from distributions.
tests/server/Makefile.am Excludes servers.c from distributions.
tests/libtest/Makefile.am Excludes libtests.c from distributions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vszakats vszakats changed the title dist: fix to drop bundle .c files from the source tarball dist: fix to drop test bundle .c files from the source tarball Aug 28, 2026
@vszakats vszakats closed this in f8992b6 Aug 28, 2026
@vszakats
vszakats deleted the tarball-fix branch August 28, 2026 21:08
vszakats added a commit that referenced this pull request Aug 28, 2026
Verify if the source tarball has any files that we did not expect.

Follow-up to f8992b6 #22686

Closes #22724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants