Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install location of python scripts #5344

Closed
Fabian-Gruenbichler opened this issue Oct 27, 2016 · 2 comments
Closed

install location of python scripts #5344

Fabian-Gruenbichler opened this issue Oct 27, 2016 · 2 comments

Comments

@Fabian-Gruenbichler
Copy link
Contributor

Fabian-Gruenbichler commented Oct 27, 2016

Currently, the three python scripts arcstat.py , arc_summary.py and dbufstat.py get installed to bin_dir (an autoconf/automake macro), while all the other binaries like zfs and zpool are installed to sbin_dir. The bin_dir macro is also referenced in the zfs-share.service.in file in the ExecStartPre directive for removing the /etc/dfs/sharetab file.

In practice this means that bin_dir must be set to /bin in a lot of cases (because that is where rm is on most distributions that don't yet have a merged /usr). Debian (and Ubuntu?) decided to put the scripts into /usr/sbin by setting bin_dir accordingly, which broke the zfs-share service file. While this is rather trivial to fix, in the Debian bug report the question arose whether putting the python scripts into bin_dir by upstream is intentional, or whether the three automake files for the scripts should be adapted to install into sbin_dir instead (which would allow reverting the bin_dir macro to point to /bin again).

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842237 for discussion and (potential) patches, any feedback/input welcome.

@behlendorf
Copy link
Contributor

The zfs and zpool commands require root privileges and may be needed prior to /usr/ being mounted. For this reason they are intentionally installed under /sbin/ as described in the system binaries section of the FHS.

The python scripts on the other hand require no escalated privileges and will never be needed as part of booting the system and therefore are installed under /usr/bin/ by default.

If Debian/Ubuntu want to install these commands in a different location in order to conform with their packaging policy that's fine. But I'd suggest we go about it by extending the autoconf/automake build to take the needed options to specify the desired install path. This way each distribution can easily do what's right for them.

The project already contains several options like for installing things like udev helpers and rules, systemd units and presets, etc.

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

No branches or pull requests

3 participants
@behlendorf @Fabian-Gruenbichler and others