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

feat(24.10): forward-port SDF for tar #492

Open
wants to merge 3 commits into
base: ubuntu-24.10
Choose a base branch
from

Conversation

eunufe
Copy link

@eunufe eunufe commented Feb 12, 2025

Proposed changes

feat(24.10): forward-port SDF for tar

Related issues/PRs

Forward porting

#320

Checklist

Additional Context

Copy link

Diff of dependencies:
None found.


- tar_rmt
- tar_tar
contents:
/usr/sbin/tarcat:
Copy link
Member

Choose a reason for hiding this comment

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

tarcat will actually need dash and coreutils (only dd, tr, cut).

Choose a reason for hiding this comment

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

The tar package doesn't declare dependencies on dash & coreutils, so not sure I understand why the SDF would declare them?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed.
@norrisjeremy some packages won't declare dependencies to other packages that are deemed "essential" and always present on the distro.

tarcat is a shell script #!/bin/sh that runs commands such as dd cat cut tr...

there's no test for it, and there should be one. that would support this statement. And the 24.04 should be fixed as well

- tar_copyright

slices:
bins:
Copy link
Member

Choose a reason for hiding this comment

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

Let's have bins contain all the binaries. We can have individual slices rmt, tar, cat etc. and then include all of those in bins.

Choose a reason for hiding this comment

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

That would diverge from the existing SDF in 24.04 that this is a forward-port of?

Copy link
Collaborator

Choose a reason for hiding this comment

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

this is already the case.

  • tar's binaries are tarcat, rmt-tar and tar. The latter two are brought in via essential. So effectively bins contains all binaries , as does tar in 24.04

essential:
- libc6_libs
contents:
/etc/rmt: {symlink: /usr/sbin/rmt-tar}
Copy link
Member

Choose a reason for hiding this comment

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

lrwxrwxrwx root/root         0 2024-04-08 16:20 ./etc/rmt -> /usr/sbin/rmt

I see that /etc/rmt points to /usr/sbin/rmt. The latter is created via the postinst script.

        update-alternatives --install /usr/sbin/rmt rmt /usr/sbin/rmt-tar 50 \
                --slave /usr/share/man/man8/rmt.8.gz rmt.8.gz \
                        /usr/share/man/man8/rmt-tar.8.gz

In my opinion, let's honour that chain.

Suggested change
/etc/rmt: {symlink: /usr/sbin/rmt-tar}
/etc/rmt:
/usr/sbin/rmt: {symlink: /usr/sbin/rmt-tar}

Let me know what you think.

Choose a reason for hiding this comment

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

@rebornplusplus This is a forward-port of the existing tar SDF definition from 24.04 that is missing in 24.10.
Not sure I understand why we would make changes that cause it to diverge from what was landed originally in #320?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep, agreed @rebornplusplus

@norrisjeremy is it something we should fix in 24.04.

Copy link
Member

Choose a reason for hiding this comment

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

Nice tests. 💯

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep.

please add the tarcat test too so we cover the use case discussed in the comments above.

@eunufe eunufe changed the title feat(24.04): add SDF for tar feat(24.10): forward-port SDF for tar Feb 14, 2025
- tar_copyright

slices:
bins:
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is already the case.

  • tar's binaries are tarcat, rmt-tar and tar. The latter two are brought in via essential. So effectively bins contains all binaries , as does tar in 24.04

- tar_rmt
- tar_tar
contents:
/usr/sbin/tarcat:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Agreed.
@norrisjeremy some packages won't declare dependencies to other packages that are deemed "essential" and always present on the distro.

tarcat is a shell script #!/bin/sh that runs commands such as dd cat cut tr...

there's no test for it, and there should be one. that would support this statement. And the 24.04 should be fixed as well

essential:
- libc6_libs
contents:
/etc/rmt: {symlink: /usr/sbin/rmt-tar}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep, agreed @rebornplusplus

@norrisjeremy is it something we should fix in 24.04.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep.

please add the tarcat test too so we cover the use case discussed in the comments above.

@cjdcordeiro
Copy link
Collaborator

FYI #498

@norrisjeremy
Copy link

@cjdcordeiro @rebornplusplus I'm not sure I understand what is being asked here?
Are you asking us to make changes before this will be merged?
If so, we will abandon this PR, since we were not the original authors of the tar SDF that was added in #320.
We simply noticed that it was missing in 24.10, tracked down that it was added to 24.04 in #320, copied the existing SDF & tests & submitted it here as this PR.

@cjdcordeiro
Copy link
Collaborator

we'll take care of #498 @norrisjeremy , which addressed 24.04.

This PR (24.10), needs some fixing. If you cannot make those, that's fair, just let us know, and we should be able to pick it up at some point, as long as we have maintainer access to change the PR.

@norrisjeremy
Copy link

we'll take care of #498 @norrisjeremy , which addressed 24.04.

This PR (24.10), needs some fixing. If you cannot make those, that's fair, just let us know, and we should be able to pick it up at some point, as long as we have maintainer access to change the PR.

@cjdcordeiro We are disappointed that a simple copy/paste forward port of an existing SDF cannot simply be merged, especially since we did not author the original one.
I will have to review internally to see whether we are interested in expending the time & effort to make these changes.

@cjdcordeiro
Copy link
Collaborator

hi @norrisjeremy

I understand the frustration. please understand that we want to keep improving things, and thus it would be counter-productive to forward port something that is inherently flawed.

The fact that the 24.04's SDF needs fixing is of course not your fault, and we'll be taking care of fixing it. The same for this PR, if you decide to focus on other slices - we'll take care of it :).

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 this pull request may close these issues.

4 participants