Skip to content

libct: remove relabeling dead code, deprecate Mount.Relabel#5152

Merged
cyphar merged 1 commit intoopencontainers:mainfrom
kolyshkin:rm-relabel
Mar 7, 2026
Merged

libct: remove relabeling dead code, deprecate Mount.Relabel#5152
cyphar merged 1 commit intoopencontainers:mainfrom
kolyshkin:rm-relabel

Conversation

@kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Mar 5, 2026

There is no way to set Mount.Relabel field via OCI spec (config.json), and so the relabeling code is never used.

My guess it's a leftover from times when runc used to be part of Docker.

Remove it, and mark Relabel field as deprecated and for future removal.

There is no way to set Mount.Relabel field via OCI spec (config.json),
and so the relabeling code is never used.

My guess it's a leftover from times when runc used to be part of Docker.

Remove it, and mark Relabel field as deprecated.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

(unless, of course, someone uses libcontainer to run containers (which I doubt).

@kolyshkin kolyshkin changed the title libct: remove relabeling dead code libct: remove relabeling dead code, deprecate Mount.Relabel Mar 5, 2026
@cyphar cyphar added this to the 1.5.0 milestone Mar 6, 2026
Copy link
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

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

@LittleLightLittleFire used to use libcontainer directly to start containers but he switched to using stock runc some time ago IIRC.

In any case, LGTM.

Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

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

LGTM. @kolyshkin wanna add a changelog entry?

@cyphar
Copy link
Member

cyphar commented Mar 7, 2026

I'll merge it and write my own in #5154.

@cyphar cyphar merged commit 5f3ac16 into opencontainers:main Mar 7, 2026
78 of 80 checks passed
Data string `json:"data,omitempty"`

// Relabel source if set, "z" indicates shared, "Z" indicates unshared.
Relabel string `json:"relabel,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Wait, should this have been json:"-"...?

Copy link
Contributor Author

@kolyshkin kolyshkin Mar 10, 2026

Choose a reason for hiding this comment

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

All I can say it was initially added by commit 49951d9. At that time the code was at github.com/docker/libcontainer (and that repo was 4 months old), and I'm not even sure who was the actual or the proposed user (dockerd?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! Right, it should be explicitly omitted at this time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #5160. That one should be included into rc.1 or we'll have a new empty Relabel field in state.json.

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.

3 participants