Hello everyone, This discussion is blocking my work on BIGTOP-3785, so I’d like to use the second approach for now, to avoid the default behavior changes.
I’d be happy to create patches if we make other conclusions here. Best Regards, Zhiguo Wu > On Aug 31, 2022, at 01:32, 吴治国 <[email protected]> wrote: > > Hello everyone, > > I'm having some problems adding path prefix to build scripts. > > Currently, the symlink of our configuration directory is > `/usr/lib/${name}/conf` -> `/etc/${name}/conf` -> > `/etc/alternatives/${name}-conf` -> `/etc/${name}/conf.dist`. > > Assuming that we have installed components prefixed with > `/usr/bigtop/3.1.0/`, and we want to upgrade it to bigtop stack 3.2.0, which > will be installed in `/usr/bigtop/3.2.0/`, the old configuration files under > `/etc/${name}/conf.dist` will be overwritten, which I think is not friendly > to component upgrades. > > I tried to prefix all files, but `/var/log` and `/var/run` are unnecessary, > and `/etc/alternatives/${name}-conf` is generated by command `alternatives`, > so I came up with two solutions > > 1. We change the symlink to `/etc/${name}/conf` -> > `/etc/alternatives/${name}-conf` -> `/usr/lib/${name}/conf`, which all > configuration files will be placed in components lib directory. > 2. We add prefix for `/etc/${name}/conf.dist`. > > Both way we keep `/var/log`, `/var/run` and `/etc/${name}/conf` with no > prefix, and all other files are prefixed. > > Personally I prefer the first solution, it’s more clear than the second one, > but it will change the original behavior which I think follows Linux's > Filesystem Hierarchy Standard, so could you give me some advices? > > Best Regards, > Zhiguo Wu
