![](https://seccdn.libravatar.org/avatar/bce881f00c17a1bf997473f19b54e1d4.jpg?s=120&d=mm&r=g)
On Fri, Feb 18, Johannes Kastl wrote:
Hi again,
what is the currently recommended way to have a file installed by a package with two different names?
Many kubectl plugins can be run standalone or as a kubectl plugin. The latter only works, if the binary name is kubectl-foo.
My first idea: Package /usr/bin/foo and create a link to /usr/bin/kubectl-foo. But how to do that best? Spec?
Build section in the spec file.
During package installation?
Never! There is no advantage about this, only disadvantages (file not owned by any RPM, thus the symlink will not be removed if you de-install the package, or fights with %ghost entries and %postun sections, ... Just create the symlink in the build section and add it to the filelist. Thorsten
Or is there a better approach?
Thanks in advance!
Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de
B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
-- Thorsten Kukuk, Distinguished Engineer, Senior Architect SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany Managing Director: Ivo Totev (HRB 36809, AG Nürnberg)