-
Notifications
You must be signed in to change notification settings - Fork 56
feat: explicit symlink indicator #283
Copy link
Copy link
Open
Description
a quick braindump / feature proposal. here is what we end up often doing in chisel-releases:
slices:
bins:
contents:
/usr/sbin/ip6tables-nft-restore: # Symlink to xtables-legacy-multi
/usr/sbin/ip6tables-nft-save: # Symlink to xtables-legacy-multi
/usr/sbin/ip6tables-restore-translate: # Symlink to xtables-legacy-multi
...this is to make it easier to maintainers to unserstand which files ought to go together and how they relate to one another.
we could create the symlinks explicitly:
slices:
bins:
contents:
/usr/sbin/ip6tables-nft-restore:
symlink: xtables-legacy-multi
/usr/sbin/ip6tables-nft-save:
symlink: xtables-legacy-multi
/usr/sbin/ip6tables-restore-translate:
symlink: xtables-legacy-multi
...but them we're not actually checking that that file really is a symlink. we're just making one. the problem is with release-to-release maintenance:
- the underlying file e.g.
/usr/sbin/ip6tables-nft-restorecould be removed, and we would still be creating a symlink - the symlink target in the deb could change, and we would overwrite it
- the file could change from symlink to binary and we would not catch it.
the very rough idea would be something like:
slices:
bins:
contents:
/usr/sbin/ip6tables-nft-restore:
expect-symlink: xtables-legacy-multiwhich is a way of saying: "include this file. i expect it to be a symlink to $0. error otherwise"
i'm not strongly attached to the idea, but just thought i'd drop it here as a food-for-thought. :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels