intel / idxd-config

Accel-config / libaccel-config
Other
59 stars 35 forks source link

Don't put executable binary files in /usr/share #18

Closed ColinIanKing closed 1 year ago

ColinIanKing commented 2 years ago

Currently the test programs are being installed into /usr/share which violates the policy https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#usrshareArchitectureindependentData and hence lintian complains that these files break the policy with the warning https://lintian.debian.org/tags/arch-dependent-file-in-usr-share

I believe placing them in /usr/lib/accel-config would be the more correct way forward. This means altering the path in the scripts to match.

ramesh-thomas commented 2 years ago

I will move them to /usr/lib/accel-config. I think that is the right folder for the tests. I also looked at /usr/bin but that folder seems to have only executables and not folders containing a set of executables and related data files.

ramesh-thomas commented 2 years ago

@ColinIanKing should it go to /usr/lib64/accel-config instead because accel-config is only for 64 bits?

ColinIanKing commented 2 years ago

/usr/lib is the default location, but for 64 bit x86 debian multiarch the debhelpers can potentially put it into /usr/lib/x86_64-linux-gnu/

ramesh-thomas commented 2 years ago

I will move them to /usr/lib then. I want to keep it common for make install, rpm and debian.

snits commented 1 year ago

Should the non test stuff go into /usr/lib/ ? That doesn't seem like a location you would normally look for example configs. The test/ directory contains the configs it needs, yes?

ramesh-thomas commented 1 year ago

Should the non test stuff go into /usr/lib/ ? That doesn't seem like a location you would normally look for example configs. The test/ directory contains the configs it needs, yes?

Yes, the test programs have their own configs and the sample configs need not be in the same place. I had thought of moving them because the samples themselves were in arbitrary locations. accel-config.conf.sample was in /etc/accel-config and contrib/configs/* was in /usr/share. Also I thought it is better not put things in many different folders.

Should I move accel-config.conf.sample and contrib/configs/* to /usr/share/accel-config and leave the test program and its configs at /usr/lib?

@davejiang, any opinion?

davejiang commented 1 year ago

I thought that typically config files go in /etc? That seems to be the behavior for most Linux apps.

snits commented 1 year ago

@ColinIanKing where would Debian normally put the contrib bits?

snits commented 1 year ago

On my Fedora system it looks like examples and contrib would normally either be in /usr/share, or /usr/share/doc.

xinzhanz commented 1 year ago

On centos, it is installed /usr/lib/accel-config/ with latest change. So it is the last decision to put it under /usr/lib?

ramesh-thomas commented 1 year ago

Had a discussion with @davejiang. accel-config is considered a system configuration tool so for that reason /etc seems to be the appropriate place for the configurations. I will remove the single sample file as it is now redundant and confusing. The ones in contrib/configs are more detailed and address different usage requirements.

ColinIanKing commented 1 year ago

/etc is the normal place for configs, generally specific tools/deamons.. have their own directory in /etc for their configs

snits commented 1 year ago

Dropping the sample config file from /etc, and moving the contrib configs there works for me.

ramesh-thomas commented 1 year ago

This is resolved in 3.5 release https://github.com/intel/idxd-config/releases/tag/accel-config-v3.5.0

ramesh-thomas commented 1 year ago

The location of the test folder has changed in the debian upload. It has been changed from /usr/lib to /usr/libexec to use debhelper's default multiarch libdir. I see that the test script "test/common" refers to a hardcoded path. How should we resolve this?

  1. Make it common for all distributions and place the tests in /usr/libexec/accel-config
  2. Let them be in different locations and the test script checks and uses the path where it finds the test folder

I think #1 is better. Please let me know your opinions.

snits commented 1 year ago

I agree, just go with the one location.