Skip to content

pkg_delete file missing from release 2.15.0 release tarball #1282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
rhelmot opened this issue Nov 29, 2024 · 8 comments · Fixed by #1287
Closed
3 tasks done

pkg_delete file missing from release 2.15.0 release tarball #1282

rhelmot opened this issue Nov 29, 2024 · 8 comments · Fixed by #1287

Comments

@rhelmot
Copy link

rhelmot commented Nov 29, 2024

Describe the bug

completions/pkg_delete is missing from the tarball. This causes build errors when built on BSD systems.

To reproduce

Build and install bash-completion on e.g. FreeBSD from the released tarball

Expected behavior

Installation completes successfully

Versions (please complete the following information)

  • Operating system name/distribution and version: FreeBSD 14.0
  • bash version, echo "$BASH_VERSION": 5.2.21(0)-release
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.15.0

Additional context

I originally encountered this issue cross compiling for FreeBSD from a Linux host via nix, but it reproduces just fine when building native for FreeBSD without nix.

Debug trace

[+] ~/bash-completion-2.15.0% ./configure                                                                                                                                                          audrey@chrysanthemum [09:02:15 PM]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for pytest... no
checking for pytest-3... no
checking build system type... x86_64-unknown-freebsd14.0
checking host system type... x86_64-unknown-freebsd14.0
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating completions/Makefile
config.status: creating doc/Makefile
config.status: creating helpers/Makefile
config.status: creating test/Makefile
config.status: creating test/fallback/Makefile
config.status: creating test/fallback/completions/Makefile
config.status: creating test/t/Makefile
config.status: creating test/t/unit/Makefile
[+] ~/bash-completion-2.15.0% make                                                                                                                                                                 audrey@chrysanthemum [09:02:20 PM]
Making all in completions
make[1]: don't know how to make pkg_delete. Stop

make[1]: stopped in /home/audrey/bash-completion-2.15.0/completions
*** Error code 1

Stop.
make: stopped in /home/audrey/bash-completion-2.15.0
@rhelmot
Copy link
Author

rhelmot commented Nov 29, 2024

as I attempt to hack together a fix, I am discovering that it's not just pkg_delete, it's all bsd specific completions that are missing from the release tarball. I'm really curious how this happened!

@akinomyoga
Copy link
Collaborator

This is caused by #1214 which is a continuation of #1210. So, the release tarball doesn't contain these files because it is generated by make dist. As I somehow anticipated in #1210 (comment), we want to have a configure option to include everything. Or, another option is to exclude these files only in the install target.

I think we also need similar switching for test files. We now include test/t/test_pkg_delete.py regardless of whether pkg_delete is included.

@yedayak
Copy link
Collaborator

yedayak commented Dec 2, 2024

This is caused by #1214 which is a continuation of #1210. So, the release tarball doesn't contain these files because it is generated by make dist. As I somehow anticipated in #1210 (comment), we want to have a configure option to include everything. Or, another option is to exclude these files only in the install target.

I think excluding only in the install makes more sense, since we're not going to distribute multiple variants of the tarball, and I don't think anyone really needs to make a tarball just for specific OSs.

I think we also need similar switching for test files. We now include test/t/test_pkg_delete.py regardless of whether pkg_delete is included.

Is there a reason you think it's needed? Tests that require the commands are skipped anyway, and I don't see the harm of tests that don't need the command running everywhere.

@akinomyoga
Copy link
Collaborator

akinomyoga commented Dec 2, 2024

I think excluding only in the install makes more sense, since we're not going to distribute multiple variants of the tarball, and I don't think anyone really needs to make a tarball just for specific OSs.

Yeah, I agree.

The option to include everything that I suggested in #1210 was for the installation and not really meant for the tarball. Just because of the way the files are currently selected, the option would affect the content of the tarball, but it's not the primary purpose of the option.

I think we also need similar switching for test files. We now include test/t/test_pkg_delete.py regardless of whether pkg_delete is included.

Is there a reason you think it's needed?

Currently, the files for a specific system (with specific configure options) are excluded from the tarball. Then, including the corresponding test files in the tarball doesn't make sense. Does it? However, if we are going to include everything in the tarball unconditionally, we can continue to include all the test files in the tarball.

yedayak added a commit to yedayak/bash-completion that referenced this issue Dec 3, 2024
This should fix scop#1282,
although still doesn't deal with the issue of including tests for them
or not.
yedayak added a commit to yedayak/bash-completion that referenced this issue Dec 4, 2024
This should fix scop#1282,
although still doesn't deal with the issue of including tests for them
or not.
yedayak added a commit to yedayak/bash-completion that referenced this issue Dec 5, 2024
This should fix scop#1282,
although still doesn't deal with the issue of including tests for them
or not.
@yedayak yedayak closed this as completed in a2d1bfc Dec 6, 2024
@yedayak
Copy link
Collaborator

yedayak commented Dec 6, 2024

Should be left open until the fix is included in a release I think.
@scop @akinomyoga I think we should release this in a patch release, 2.16.1. What do you think?

@yedayak yedayak reopened this Dec 6, 2024
@akinomyoga
Copy link
Collaborator

akinomyoga commented Dec 6, 2024

I agree with the new release, though I'm not sure if it should be v2.15.1 or v2.16.0.

If we would release v2.15.1, there are two options: to pick only the commit a2d1bfc for v2.15.1 or to include all the changes from the main branch in v2.15.1. We haven't been maintaining a "stable branch", and branching would make the maintenance cost larger. Also, we actually wanted a more frequent release cycle, so I'd suggest including everything in the new release even if we only increment the patch level.

@scop
Copy link
Owner

scop commented Dec 10, 2024

release-please takes care of version numbering for us automatically, depending on what gets included, based on semantic commit messages. Currently it'll be 2.16.0, #1276. I do not think we should start maintaining more than one branch unless we absolutely positively "have to".

Although it's not a 2.15 regression, I'd love to see rsync escaping issues fixed, #1232 and #1255 (I don't have time to look into them myself though). But if that'll take more than a few days, releasing what we have now (+ the updated macOS docs from #1288) would be fine with me.

@scop
Copy link
Owner

scop commented Dec 25, 2024

$ curl -sL https://github.com/scop/bash-completion/releases/download/2.16.0/bash-completion-2.16.0.tar.xz | tar Jtv | grep pkg_delete
-rw-r--r-- 1001/128        138 2024-12-25 12:28 bash-completion-2.16.0/test/t/test_pkg_delete.py
-rw-r--r-- 1001/128        527 2024-12-25 12:28 bash-completion-2.16.0/completions/pkg_delete

@scop scop closed this as completed Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants