kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
465 stars 62 forks source link

Getting rid of tar strip components #143

Closed cemkeylan closed 4 years ago

cemkeylan commented 4 years ago

Now, on my fork I have finally got rid of strip components with these three commits:

  1. https://github.com/CarbsLinux/kiss/commit/ad39cd13a91d479f0e4a480a2afd9e642086220b
  2. https://github.com/CarbsLinux/kiss/commit/46819119907121b5f5e58c0f75c7f91323cc8b32
  3. https://github.com/CarbsLinux/kiss/commit/b6330280d7f074d535228b9225b0aa9d74b13047
  4. https://github.com/CarbsLinux/kiss/commit/0da69002ff52a09b37f19b2c042c7ab44ff75688

I have tested it with packages that use multiple tarball sources (like gst-plugins) and tested it with toybox tar.

NOTES:

dylanaraps commented 4 years ago

I think we just call sbase/ubase` a write-off and forget they exist entirely. They're so limited compared to literally every implementation of whatever they provide. It keeps causing me a headache.

I'll spend some time going over your changes, from first glance they look OK. Thank you for tackling the strip-components issue, I appreciate it!

cemkeylan commented 4 years ago

Yeah, Michael himself recommended against using sbase tar, and the maintainer of ubase cannot be reached anymore.

Obviously these patches can be improved, but I have yet to see an issue.

dylanaraps commented 4 years ago

Is the tar -opts usage more portable than the tar opts usage we're currently using? Any kind of source or rationale for this change?

Talking about this commit: https://github.com/CarbsLinux/kiss/commit/46819119907121b5f5e58c0f75c7f91323cc8b32

cemkeylan commented 4 years ago

Yes, older implementations (and sbase, heh) do not accept options without -. Newer tar implementations don't have an issue with this. If I recall, this was implemented by GNU and others followed it.

cemkeylan commented 4 years ago

Sorry, turns out it was the opposite. GNU implemented flags. Older implementations do not accept flags, but older implementations do not have required keys (like p). sbase doesn't accept usage without flags, but it's not usable either way. I will revert the changes.

cemkeylan commented 4 years ago

Pushed my changes and added a 4th patch to the issue :+1:

dylanaraps commented 4 years ago

The p flag is unneeded (from what I understand): https://github.com/kisslinux/kiss/commit/1933a19e105d83a512c9312022ba1d57bc04fd73

dylanaraps commented 4 years ago

Oh man. Busybox tar actually just ignores p. We were never actually using it:

///////:-p - accepted but ignored, restores mode (aliases in GNU tar: --preserve-permissions, --same-permissions)

https://git.busybox.net/busybox/tree/archival/tar.c

cemkeylan commented 4 years ago

Oh wow, I feel betrayed.

cemkeylan commented 4 years ago

Well, at least we now know that this will work with old implementations as well.