Skip to content
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

orphaned and unneeded packages #39

Closed
jeremyd2019 opened this issue Feb 10, 2025 · 15 comments
Closed

orphaned and unneeded packages #39

jeremyd2019 opened this issue Feb 10, 2025 · 15 comments

Comments

@jeremyd2019
Copy link
Contributor

Orphaned packages (no longer in a repo):

$ pacman -Qmq
automake1.10
automake1.6
automake1.7
automake1.8
automake1.9
crypt
libcrypt
mingw-w64-i686-7zip
mingw-w64-i686-osslsigncode

(those last two I blame on the dropping of mingw32 from packages in msys2/MINGW-packages. @lazka maybe they could be reconsidered if they don't have too many deps, which they don't seem to)

Packages that were installed as dependencies but are not required by any installed packages:

$ pacman -Qtdq
glib2
icu
libatomic_ops
libgpgme
liblzo2
mingw-w64-i686-gettext-tools
mingw-w64-i686-glib2
mingw-w64-i686-jemalloc
mingw-w64-i686-libdeflate
mingw-w64-i686-libxml2
mingw-w64-i686-lzo2
mingw-w64-i686-pdcurses
mingw-w64-i686-rtmpdump
mingw-w64-i686-spdylay
perl-XML-Parser
tcl

I don't know if any of these are still needed (and should be marked as explicitly installed) or if they're left behind after updates made them no longer necessary.

@rimrul
Copy link
Member

rimrul commented Feb 10, 2025

See also git-for-windows/git#5395

@dscho
Copy link
Member

dscho commented Feb 10, 2025

mingw-w64-i686-7zip

This is needed to build Portable Git and MinGit.

mingw-w64-i686-osslsigncode

This is needed to code-sign all the .exe files that are code-signed.

mingw-w64-i686-gettext-tools

This is needed for msgfmt, to compile Git's translated messages.

perl-XML-Parser

As far as I remember, this is needed by git svn, but see also git-for-windows/git#5405 (read: we may not need this for much longer anyway, besides, after v2.48.1 for i686 only MinGit will be released and that does not contain Perl let along git svn).

tcl

This is needed by gitk and Git GUI. Having said that, after v2.48.1 for i686 only MinGit will be released and that does not contain any interactive tools (except for those that are entangled with non-interactive tools).

lazka added a commit to msys2/MINGW-packages that referenced this issue Feb 10, 2025
@lazka
Copy link

lazka commented Feb 10, 2025

(those last two I blame on the dropping of mingw32 from packages in msys2/MINGW-packages. @lazka maybe they could be reconsidered if they don't have too many deps, which they don't seem to)

sure, done

@jeremyd2019
Copy link
Contributor Author

jeremyd2019 commented Feb 10, 2025

tcl

This is needed by gitk and Git GUI. Having said that, after v2.48.1 for i686 only MinGit will be released and that does not contain any interactive tools (except for those that are entangled with non-interactive tools).

tcl or mingw-w64-i686-tcl? (or both)?

Given the above, I'd recommend (after the next sync that updates the sync dbs so -7zip and -osslsigncode are no longer orphaned):

pacman -S --dbonly --asexplicit mingw-w64-i686-gettext-tools perl-XML-Parser tcl
pacman -Rns $(pacman -Qmq) $(pacman -Qtdq)

... oops,

:: removing libcrypt breaks dependency 'libcrypt' required by curl
:: removing libcrypt breaks dependency 'libcrypt' required by heimdal-libs
:: removing libcrypt breaks dependency 'libcrypt' required by libcurl
:: removing libcrypt breaks dependency 'libcrypt' required by libsasl
:: removing libcrypt breaks dependency 'libcrypt' required by openssh
:: removing libcrypt breaks dependency 'libcrypt' required by perl
:: removing libcrypt breaks dependency 'libcrypt' required by perl-XML-Parser

wasn't libcrypt replaced with libxcrypt?

@dscho
Copy link
Member

dscho commented Feb 11, 2025

tcl or mingw-w64-i686-tcl? (or both)?

Whoops, you're right, tcl can go, only mingw-w64-i686-tcl is needed (and mingw-w64-i686-tk).

Given the above, I'd recommend (after the next sync that updates the sync dbs so -7zip and -osslsigncode are no longer orphaned):

pacman -S --dbonly --asexplicit mingw-w64-i686-gettext-tools perl-XML-Parser tcl
pacman -Rns $(pacman -Qmq) $(pacman -Qtdq)

Sounds good.

... oops,

:: removing libcrypt breaks dependency 'libcrypt' required by curl
:: removing libcrypt breaks dependency 'libcrypt' required by heimdal-libs
:: removing libcrypt breaks dependency 'libcrypt' required by libcurl
:: removing libcrypt breaks dependency 'libcrypt' required by libsasl
:: removing libcrypt breaks dependency 'libcrypt' required by openssh
:: removing libcrypt breaks dependency 'libcrypt' required by perl
:: removing libcrypt breaks dependency 'libcrypt' required by perl-XML-Parser
wasn't libcrypt replaced with libxcrypt?

It's quite possible that I did not follow best practices there; The packages on the right side seem all to be ones of which Git for Windows builds custom packages.

At this stage, just before the last Git for Windows version that ships with i686 installers and Portable Gits, I do not want to put much work into this, though: Come Thursday 🤞we can stop caring about i686 variants of curl, and perl. We do probably need to still include openssh though... 😦

@jeremyd2019
Copy link
Contributor Author

what about the check dlls action failure? I tried to figure it out, but the scripts involved were confusing me. I think at least one indicates that git-for-windows-provided i686 gnutls package needs to be rebuilt to link against the current msys-unistring-5.dll. The rest, I don't know.

@jeremyd2019
Copy link
Contributor Author

what about the check dlls action failure? I tried to figure it out, but the scripts involved were confusing me. I think at least one indicates that git-for-windows-provided i686 gnutls package needs to be rebuilt to link against the current msys-unistring-5.dll. The rest, I don't know.

I saw git-for-windows/build-extra#591 last night. Too many repositories for me to keep track of 😉

... oops,
:: removing libcrypt breaks dependency 'libcrypt' required by curl
:: removing libcrypt breaks dependency 'libcrypt' required by heimdal-libs
:: removing libcrypt breaks dependency 'libcrypt' required by libcurl
:: removing libcrypt breaks dependency 'libcrypt' required by libsasl
:: removing libcrypt breaks dependency 'libcrypt' required by openssh
:: removing libcrypt breaks dependency 'libcrypt' required by perl
:: removing libcrypt breaks dependency 'libcrypt' required by perl-XML-Parser
wasn't libcrypt replaced with libxcrypt?

It's quite possible that I did not follow best practices there; The packages on the right side seem all to be ones of which Git for Windows builds custom packages.

libcrypt-devel was removed and replaced with libxcrypt-devel in July 2023, and libcrypt was dropped in October. I'll look at making a PR in the git-for-windows/MSYS2-packages fork to switch these packages to say they depend on libxcrypt.

@dscho
Copy link
Member

dscho commented Feb 13, 2025

I saw git-for-windows/build-extra#591 last night. Too many repositories for me to keep track of 😉

Yup, and for me it's even too many patches to keep track of, upstream Git is currently making my life hard.

wasn't libcrypt replaced with libxcrypt?

It's quite possible that I did not follow best practices there; The packages on the right side seem all to be ones of which Git for Windows builds custom packages.

libcrypt-devel was removed and replaced with libxcrypt-devel in July 2023, and libcrypt was dropped in October. I'll look at making a PR in the git-for-windows/MSYS2-packages fork to switch these packages to say they depend on libxcrypt.

Thank you.

It wouldn't be possible to mark libxcrypt as provides=('libcrypt'), would it?

@jeremyd2019
Copy link
Contributor Author

The reason that wasn't done at the time was that libcrypt provided msys-crypt-0.dll while libxcrypt provides msys-crypt-2.dll. Both were kept for a time so that it wouldn't break the world (in the sort of way you seem to have noticed with msys-unistring-2 -> 5 in i686 😁) while packages were rebuilt. GfW's i686 packages of course missed the transition period due to the periodic-sync-nature of i686 updates. Hopefully git-for-windows/MSYS2-packages#218 results in everything there linking to msys-crypt-0.dll being updated (and if not, somebody's missing a depends on libcrypt).

@lazka
Copy link

lazka commented Feb 13, 2025

(I just wanted to add that it wasn't my intention with the sync to make this much extra work this close to the git4win 32bit semi-EOL. In theory the sync could be ignored, no?)

@jeremyd2019
Copy link
Contributor Author

Given the above, I'd recommend (after the next sync that updates the sync dbs so -7zip and -osslsigncode are no longer orphaned):

pacman -S --dbonly --asexplicit mingw-w64-i686-gettext-tools perl-XML-Parser tcl
pacman -Rns $(pacman -Qmq) $(pacman -Qtdq)

Make that

pacman -S --dbonly --asexplicit mingw-w64-i686-gettext-tools perl-XML-Parser
pacman -Rns $(pacman -Qmq) $(pacman -Qtdq)

After git-for-windows/MSYS2-packages#218. How is this done? The dbonly could be reasonably done as a PR against this repo, I guess, the local db is text so the changes will be obvious. Is there a need for some workflow to remove packages? (In that case it'd be better to inline the list explicitly rather than using $())

@jeremyd2019
Copy link
Contributor Author

After git-for-windows/MSYS2-packages#218. How is this done? The dbonly could be reasonably done as a PR against this repo, I guess, the local db is text so the changes will be obvious. Is there a need for some workflow to remove packages? (In that case it'd be better to inline the list explicitly rather than using $())

#40 for consideration.

You'd probably need to do whatever needs doing to repo-remove the unneeded i686 packages (libsasl is blocking removing libcrypt at this point).

@dscho
Copy link
Member

dscho commented Feb 17, 2025

You'd probably need to do whatever needs doing to repo-remove the unneeded i686 packages (libsasl is blocking removing libcrypt at this point).

Indeed, and that repo-remove needs to have an effect on both the old Pacman repository on Azure Blobs as well as on the new one at pacman-repo. And the package files need to be git rmed from pacman-repo's tip, too.

My best idea for that would be to copy-edit the build-and-deploy workflow as well as pacman-helper.sh quick_add (or maybe rename and refactor quick_add so that it can perform both repo-add and repo-remove, then add a small quick_add adaptor function on top).

jeremyd2019 added a commit that referenced this issue Feb 17, 2025
Result of running:
 pacman -S --dbonly --asexplicit mingw-w64-i686-gettext-tools perl-XML-Parser

Part of #39

Signed-off-by: Jeremy Drake <[email protected]>
@jeremyd2019
Copy link
Contributor Author

If you don't beat me to it, I'll try to look at that tomorrow. I've also got a fix for Cygwin to try to get submitted tomorrow too, since it sounds like 3.6.0 is expected to be released in a couple of weeks.

jeremyd2019 added a commit that referenced this issue Feb 18, 2025
Result of running:
 pacman -S --dbonly --asexplicit mingw-w64-i686-gettext-tools perl-XML-Parser

Part of #39

Signed-off-by: Jeremy Drake <[email protected]>
jeremyd2019 added a commit to jeremyd2019/git-for-windows-automation that referenced this issue Feb 19, 2025
Calls pacman-helper.sh quick_remove.

For git-for-windows/git-sdk-32#39 (comment)

Signed-off-by: Jeremy Drake <[email protected]>
dscho added a commit to jeremyd2019/git-for-windows-automation that referenced this issue Feb 20, 2025
Git for Windows relies on MSYS2 for a lot of packages, but also provides
some packages of its own. Sometimes, Git for Windows even overrides
(or "shadows") MSYS2's packages. And sometimes Git for Windows needs to
stop overriding such packages.

This new GitHub workflow allows for stopping to override MSYS2 packages
by calling the shiny new `pacman-helper.sh quick_remove` functionality
added in git-for-windows/build-extra#597.

This will be used to clean up Git for Windows' Pacman repository after
the most recent batch of MSYS2 updates to its i686 repository, see
git-for-windows/git-sdk-32#39 (comment)
for full details.

Co-authored-by: Johannes Schindelin <[email protected]>
Signed-off-by: Jeremy Drake <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Feb 21, 2025

I daresay that this has been addressed via #42 and #43. Thank you so much @jeremyd2019!

@dscho dscho closed this as completed Feb 21, 2025
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

No branches or pull requests

4 participants