aboutsummaryrefslogtreecommitdiffstats
path: root/rpm
Commit message (Collapse)AuthorAgeFilesLines
* contrib: rename initrd READMEs to README.mdнаб2022-02-111-2/+2
| | | | | | | | It's an unhelpful naming scheme and one that breaks GitHub autoreadme. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13017
* Propagate KERNEL_* to *.specDamian Szuberski2022-02-092-2/+8
| | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Authored-by: Damian Szuberski <[email protected]> Signed-off-by: Peter Levine <[email protected]> Closes #13046
* Add `--enable-asan` and `--enable-ubsan` switchesDamian Szuberski2022-02-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `configure` now accepts `--enable-asan` and `--enable-ubsan` switches which results in passing `-fsanitize=address` and `-fsanitize=undefined`, respectively, to the compiler. Those flags are enabled in GitHub workflows for ZTS and zloop. Errors reported by both instrumentations are corrected, except for: - Memory leak reporting is (temporarily) suppressed. The cost of fixing them is relatively high compared to the gains. - Checksum computing functions in `module/zcommon/zfs_fletcher*` have UBSan errors suppressed. It is completely impractical to enforce 64-byte payload alignment there due to performance impact. - There's no ASan heap poisoning in `module/zstd/lib/zstd.c`. A custom memory allocator is used there rendering that measure unfeasible. - Memory leaks detection has to be suppressed for `cmd/zvol_id`. `zvol_id` is run by udev with the help of `ptrace(2)`. Tracing is incompatible with memory leaks detection. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12928
* RPM: Add missing BuildRequires for PAM componentColMelvin2022-01-251-0/+5
| | | | | | | | | | | | | | When the optional PAM binaries are included in a build, ./configure will look for security/pam_modules.h and - if it doesn't find it - recommend the user install `libpam0g-dev`. On Red Hat systems, `pam-devel` is the package that supplies this requirement; `libpam0g-dev` does not exist. By encoding this requirement in the spec file, we give packagers more appropriate (and timely) recommendations for completing the build. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chris Lindee <[email protected]> Closes #13001
* Removed Python 2 and Python 3.5- supportDamian Szuberski2022-01-131-49/+30
| | | | | | | | | | | | Deprecation of Python versions below 3.6 gives opportunity to unify the build and install requirements for OpenZFS packages. The minimal supported Python version is 3.6 as this is the most recent Python package CentOS/RHEL 7 users can get. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12925
* Add init script to load keysogelpre2021-12-121-0/+2
| | | | | | | | | | Add new init scripts which allow automatic loading of keys if keylocation property is set to a URI. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Benedikt Neuffer <[email protected]> Closes #11659 Closes #11662
* zfs-dkms rpm: Fix scriptlets dependenciesTill Maas2021-12-121-0/+4
| | | | | | | | | | To ensure that the necessary packages are available during the %post and %preun scriptlets, require them properly. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Till Maas <[email protected]> Closes #12822 Closes #12832
* Remove basename(1). Clean up/shorten some coreutils pipelinesнаб2021-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basenames that remain, in cmd/zed/zed.d/statechange-led.sh: dev=$(basename "$(echo "$therest" | awk '{print $(NF-1)}')") vdev=$(basename "$ZEVENT_VDEV_PATH") I don't wanna interfere with #11988 scripts/zfs-tests.sh: SINGLETESTFILE=$(basename "$SINGLETEST") tests/zfs-tests/tests/functional/cli_user/zfs_list/zfs_list.kshlib: ACTUAL=$(basename $dataset) ACTUAL=$(basename $dataset) tests/zfs-tests/tests/functional/cli_user/zpool_iostat/ zpool_iostat_-c_homedir.ksh: typeset USER_SCRIPT=$(basename "$USER_SCRIPT_FULL") tests/zfs-tests/tests/functional/cli_user/zpool_iostat/ zpool_iostat_-c_searchpath.ksh: typeset CMD_1=$(basename "$SCRIPT_1") typeset CMD_2=$(basename "$SCRIPT_2") tests/zfs-tests/tests/functional/cli_user/zpool_status/ zpool_status_-c_homedir.ksh: typeset USER_SCRIPT=$(basename "$USER_SCRIPT_FULL") tests/zfs-tests/tests/functional/cli_user/zpool_status/ zpool_status_-c_searchpath.ksh typeset CMD_1=$(basename "$SCRIPT_1") typeset CMD_2=$(basename "$SCRIPT_2") tests/zfs-tests/tests/functional/migration/migration.cfg: export BNAME=`basename $TESTFILE` tests/zfs-tests/tests/perf/perf.shlib: typeset logbase="$(get_perf_output_dir)/$(basename \ tests/zfs-tests/tests/perf/perf.shlib: typeset logbase="$(get_perf_output_dir)/$(basename \ These are potentially Of Directories, where basename is actually useful Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12652
* Added uncompress requirementRich Ercolani2021-06-113-0/+19
| | | | | | | | | | | | Having an old enough version of "file" and no "uncompress" program installed can cause rpmbuild as root to crash and mangle rpmdb. So let's add a build dependency for RPM-based systems. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes: #12071 Closes: #12168
* Move properties, parameters, events, and concepts around manual sectionsнаб2021-06-091-0/+2
| | | | | | | | | | | | | | | | | | | The pages moved as follows: zpool-features.{5 => 7} spl{-module-parameters.5 => .4} zfs{-module-parameters.5 => .4} zfs-events.5 => into zpool-events.8 zfsconcepts.{8 => 7} zfsprops.{8 => 7} zpoolconcepts.{8 => 7} zpoolprops.{8 => 7} Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Co-authored-by: Daniel Ebdrup Jensen <[email protected]> Closes #12149 Closes #12212
* Correct a flaw in the Python 3 version checkingRich Ercolani2021-06-081-0/+5
| | | | | | | | | | | | | | | It turns out the ax_python_devel.m4 version check assumes that ("3.X+1.0" >= "3.X.0") is True in Python, which is not when X+1 is 10 or above and X is not. (Also presumably X+1=100 and ...) So let's remake the check to behave consistently, using the "packaging" or (if absent) the "distlib" modules. (Also, update the Github workflows to use the new packages.) Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes: #12073
* RPM: Explicitly set the required min/max kernel version for the DKMS packageArmin Wehrfritz2021-05-271-1/+1
| | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Armin Wehrfritz <[email protected]> Closes #12124
* Replace ZoL with OpenZFS where applicableнаб2021-05-071-2/+2
| | | | | | | | | | | | | | | | Afterward, git grep ZoL matches: * README.md: * [ZoL Site](https://zfsonlinux.org) - Correct * etc/default/zfs.in:# ZoL userland configuration. - Changing this would induce a needless upgrade-check, if the user has modified the configuration; this can be updated the next time the defaults change * module/zfs/dmu_send.c: * ZoL < 0.7 does not handle [...] - Before 0.7 is ZoL, so fair enough Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Issue #11956
* zfs.spec.in: remove post ldconfig scriptletsBrian Behlendorf2021-04-271-0/+16
| | | | | | | | | | | | | | | | | | | | In Fedora 28 the packaging guidelines were changed such that ldconfig should no longer be called in either the %post or %postun scriptlets. Instead the new compatibility macros %ldconfig_post, %ldconfig_postun, and %ldocnfig_scriptlets should be used. Since we only currently support Fedora 31 and newer, we could drop %post or %postun scriptlets entirely according to the guidelines. However, since we also use the same spec file for CentOS / RHEL it's convenient to call the macros which are available starting with CentOS / RHEL 8. For CentOS / RHEL 7 we must still call ldconfig in the traditional way. https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11931
* Obsolete earlier packages due to version bumpBrian Behlendorf2021-04-131-0/+4
| | | | | | | | | | | | Follow up to d5ef91af which adds a missing 'obsoletes' for the libzfs-devel package. Add a comment to the zfs.spec file as a reminder that previous versions of the package should be marked as obsolete. Reviewed-by: Olaf Faaland <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11844 Closes #11895
* kmod-zfs should obsolete kmod-spl as well as spl-kmodOlaf Faaland2021-04-111-0/+1
| | | | | | | | | Without this Obsoletes, using packages built --with-spec=redhat, an upgrade from zfs-0.7 to zfs-2.x does not cause the kmod-spl-0.7 package to be removed. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #11865
* fix misplaced quotes in kmod-preambleOlaf Faaland2021-04-071-2/+2
| | | | | | | | | | | | | | | | rpm/redhat/zfs-kmod.spec.in has a typo in the shell code that creates the kmod-preamble file. This typo results in the preamble file having the wrong name, ./SOURCES/kmod-preamblenObsoletes and missing the Obsoletes clause that has become part of the name. Because the filename is incorrect, the built package does not have "obsoletes" or "conflicts" set. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #11851
* Obsolete earlier packages due to version bumpBrian Behlendorf2021-04-071-0/+2
| | | | | | | | | | | In order for package managers such as dnf to upgrade cleanly after the package SONAME bump the obsolete package names must be known. Update the new packages to correctly obsolete the old ones. Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11844 Closes #11847
* Bump libzfs.so and libzpool.so versionsBrian Behlendorf2021-04-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | Bump the library versions as advised by the libtool guidelines. https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html Two new functions were added but no existing functions were changed, so we increase the version and the age (version:revision:age). Added functions (2): - boolean_t zpool_is_draid_spare(const char *); - zpool_compat_status_t zpool_load_compat(const char *, boolean_t *, char *, char *); Additionally bump the libzpool.so version information. This library is for internal use but we still want to update the version to track major changes to the interfaces. The libzfsbootenv, libuutil, libnvpair and libzfs_core libraries have not been updated. Reviewed-by: Richard Laager <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11817
* Add "compatibility" property for zpool feature setsColm2021-02-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Property to allow sets of features to be specified; for compatibility with specific versions / releases / external systems. Influences the behavior of 'zpool upgrade' and 'zpool create'. Initial man page changes and test cases included. Brief synopsis: zpool create -o compatibility=off|legacy|file[,file...] pool vdev... compatibility = off : disable compatibility mode (enable all features) compatibility = legacy : request that no features be enabled compatibility = file[,file...] : read features from specified files. Only features present in *all* files will be enabled on the resulting pool. Filenames may be absolute, or relative to /etc/zfs/compatibility.d or /usr/share/zfs/compatibility.d (/etc checked first). Only affects zpool create, zpool upgrade and zpool status. ABI changes in libzfs: * New function "zpool_load_compat" to load and parse compat sets. * Add "zpool_compat_status_t" typedef for compatibility parse status. * Add ZPOOL_PROP_COMPATIBILITY to the pool properties enum * Add ZPOOL_STATUS_COMPATIBILITY_ERR to the pool status enum An initial set of base compatibility sets are included in cmd/zpool/compatibility.d, and the Makefile for cmd/zpool is modified to install these in $pkgdatadir/compatibility.d and to create symbolic links to a reasonable set of aliases. Reviewed-by: ericloewe Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Colm Buckley <[email protected]> Closes #11468
* Install zgenhostid to sbindirAntonio Russo2021-01-211-1/+1
| | | | | | | | | | | | | | zgenhostid(8) is used to modify or create /etc/hostid. This administrative tool is currently installed to bindir. System utilities are typically placed in sbin. Modify the installation directory for zgenhostid. Additionally, track this change in its use in dracut and the rpm installation. Authored-by: наб <[email protected]> Authored-by: Antonio Russo <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #11485
* zfs-kmods: install to /lib/modules instead of /usr/lib/modulesChristian Schwarz2020-12-211-4/+0
| | | | | | | | | | | | | | | | | | Before this patch, dracut wouldn't find zfs.ko for inclusion in initramfs. This was caused by the packages installing in to /lib/modules instead of /usr/lib/modules. Correcting this allows dracut to do the right thing, even without # /etc/dracut.conf add_drivers+=" zfs " Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of the `prefix` macro that this commit removes in the generic kmod spec. And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not mention `prefix` at all. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes #11381
* zpool_influxdb: move to libexec dirPavel Snajdr2020-11-281-1/+0
| | | | | | | | | | | | Move the zpool_influxdb command to /usr/libexec/zfs, and include the /usr/libexec/zfs path in the system search directory when running the test suite. Reviewed-by: Richard Elling <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Snajdr <[email protected]> Closes #11156 Closes #11160 Closes #11224
* Obsolete earlier packages due to version bumpBrian Behlendorf2020-11-241-0/+5
| | | | | | | | | In order for package managers such as dnf to upgrade cleanly after the package SONAME bump the obsolete package names must be known. Update the new packages to correctly obsolete the old ones. Signed-off-by: Brian Behlendorf <[email protected]> Closes #11230 Closes #11233
* Track SONAME version bump in packagingAntonio Russo2020-11-191-36/+36
| | | | | | | | | RPM and DEB packages are named after the SONAME version of the library they contain. After bumping this version, the packaging should be renamed. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #11219
* Add zpool_influxdb commandRichard Elling2020-10-091-0/+1
| | | | | | | | | | | | | | | A zpool_influxdb command is introduced to ease the collection of zpool statistics into the InfluxDB time-series database. Examples are given on how to integrate with the telegraf statistics aggregator, a companion to influxdb. Finally, a grafana dashboard template is included to show how pool latency distributions can be visualized in a ZFS + telegraf + influxdb + grafana environment. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Richard Elling <[email protected]> Closes #10786
* Replace ZFS on Linux references with OpenZFSBrian Behlendorf2020-10-084-5/+5
| | | | | | | | | | | | | This change updates the documentation to refer to the project as OpenZFS instead ZFS on Linux. Web links have been updated to refer to https://github.com/openzfs/zfs. The extraneous zfsonlinux.org web links in the ZED and SPL sources have been dropped. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11007
* zfs label bootenv should store data as nvlistToomas Soome2020-09-151-0/+1
| | | | | | | | | | | | | nvlist does allow us to support different data types and systems. To encapsulate user data to/from nvlist, the libzfsbootenv library is provided. Reviewed-by: Arvind Sankar <[email protected]> Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Signed-off-by: Toomas Soome <[email protected]> Closes #10774
* Use correct prefix for share/pam-configsRyan Moeller2020-07-301-2/+4
| | | | | | | | Respect the configured install prefix. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Arvind Sankar <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10604
* Disable shebang mangling on input filesArvind Sankar2020-07-193-8/+2
| | | | | | | | | | | | | | | | | The DKMS module installs the entire source tree, including the .in files that will later be substituted when building. This makes brp_mangle_shebangs complain about shebang lines in the .in files. Exclude everything under /usr/src from shebang mangling in the DKMS package. The KMOD package doesn't contain any of the files it excludes from mangling, so just drop the exclusion. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: João Carlos Mendes Luís <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10581 Closes #10582
* Clean up lib dependenciesArvind Sankar2020-07-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libzutil is currently statically linked into libzfs, libzfs_core and libzpool. Avoid the unnecessary duplication by removing it from libzfs and libzpool, and adding libzfs_core to libzpool. Remove a few unnecessary dependencies: - libuutil from libzfs_core - libtirpc from libspl - keep only libcrypto in libzfs, as we don't use any functions from libssl - librt is only used for clock_gettime, however on modern systems that's in libc rather than librt. Add a configure check to see if we actually need librt - libdl from raidz_test Add a few missing dependencies: - zlib to libefi and libzfs - libuuid to zpool, and libuuid and libudev to zed - libnvpair uses assertions, so add assert.c to provide aok and libspl_assertf Sort the LDADD for programs so that libraries that satisfy dependencies come at the end rather than the beginning of the linker command line. Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY instead. This can take advantage of pkg-config, and it also avoids polluting LIBS. List all the required dependencies in the pkgconfig files, and move the one for libzfs_core into the latter's directory. Install pkgconfig files in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on FreeBSD, instead of /usr/share/pkgconfig, as the more correct location for library .pc files. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Arvind Sankar <[email protected]> Closes #10538
* pam: implement a zfs_key pam modulefelixdoerre2020-06-241-1/+13
| | | | | | | | | | | | | | | | | Implements a pam module for automatically loading zfs encryption keys for home datasets. The pam module: - loads a zfs key and mounts the dataset when a session opens. - unmounts the dataset and unloads the key when the session closes. - when the user is logged on and changes the password, the module changes the encryption key. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: @jengelh <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Felix Dörre <[email protected]> Closes #9886 Closes #9903
* RPM: Remove old versions of DKMS on upgradeColMelvin2020-05-141-1/+1
| | | | | | | | | | | | Due to a mismatch between the text and a regex looking for that text, the `%preuninstall` script would never run the `dkms remove` command necessary to avoid corrupting the DKMS data configuration. Increase regex specificity to avoid this issue. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chris Lindee <[email protected]> Closes: #9891 Closes #10327
* Change http://zfsonlinux.org links to https://zfsonlinux.orgBrian Behlendorf2020-01-134-4/+4
| | | | | | | | | | | Update the project website links contained in to repository to reference the secure https://zfsonlinux.org address. Reviewed-By: Richard Laager <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Garrett Fields <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #9837
* Canonicalize Python shebangsRyan Moeller2019-09-121-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | /usr/bin/env python3 is the suggested[1] shebang for Python in general (likewise for python2) and is conventional across platforms. This eases development on systems where python is not installed in /usr/bin (FreeBSD for example) and makes it possible to develop in virtual environments (venv) for isolating dependencies. Many packaging guidelines discourage the use of /usr/bin/env, but since this is the canonical way of writing shebangs in the Python community, many packaging scripts are already equipped to handle substituting the appropriate absolute path to python automatically. Some RPM package builders lacking brp-mangle-shebangs need a small fallback mechanism in the package spec to stamp the appropriate shebang on installed Python scripts. [1]: https://docs.python.org/3/using/unix.html?#miscellaneous Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #9314
* BuildRequires libtirpc-devel needed for RHEL 8Olaf Faaland2019-09-061-1/+1
| | | | | | | | | | | | Building against RHEL 8 requires libtirpc-devel, as with fedora 28. Add rhel8 and centos8 options to the test, to account for that. BuildRequires Originally added for fedora 28 via commit 1a62a305be01972ef1b81469134faa4937836096 Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #9289
* Fix zfs-dkms .deb package warning in prerm scriptloli10K2019-09-031-1/+1
| | | | | | | | | | | | | Debian zfs-dkms package generated by alien doesn't call the prerm script (rpm's %preun) with an integer as first parameter, which results in the following warning when the package is uninstalled: "zfs-dkms.prerm: line 3: [: remove: integer expression expected" Modify the if-condition to avoid the warning. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #9271
* initramfs: fixes for (debian) initramfsMichael Niewöhner2019-08-161-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * contrib/initramfs: include /etc/default/zfs and /etc/zfs/zfs-functions At least debian needs /etc/default/zfs and /etc/zfs/zfs-functions for its initramfs. Include both in build when initramfs is configured. * contrib/initramfs: include 60-zvol.rules and zvol_id Include 60-zvol.rules and zvol_id and set udev as predependency instead of debians zdev. This makes debians additional zdev hook unneeded. * Correct initconfdir substitution for some distros Not every Linux distro is using @sysconfdir@/default but @initconfdir@ which is already determined by configure. Let's use it. * systemd: prevent possible conflict between systemd and sysvinit Systemd will not load a sysvinit service if a unit exists with the same name. This prevents conflicts between sysvinit and systemd. In ZFS there is one sysvinit service that does not have a systemd service but a target counterpart, zfs-import.target. Usually it does not make any sense to install both but it is possisble. Let's prevent any conflict by masking zfs-import.service by default. This does not harm even if init.d/zfs-import does not exist. Reviewed-by: Chris Wedgwood <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Tested-by: Alex Ingram <[email protected]> Tested-by: Dreamcat4 <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]> Closes #7904 Closes #9089
* install path fixesMichael Niewöhner2019-07-301-2/+2
| | | | | | | | | | | | | | | | | | * rpm: correct pkgconfig path pkconfig files get installed to $datarootdir/pkgconfig but rpm expects them to be at $datadir. This works when $datarootdir==$datadir which is the case most of the time but will fail when they differ. * install: make initramfs-tools path static Since initramfs-tools' path is nothing we can control as it is an external package it does not make any sense to install zfs additions anywhere else. Simply use /usr/share/initramfs-tools as path. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Laager <[email protected]> Signed-off-by: Michael Niewöhner <[email protected]> Closes #9087
* New service that waits on zvol links to be createdPavel Zakharov2019-07-171-1/+2
| | | | | | | | | | | | | | | | The zfs-volume-wait.service scans existing zvols and waits for their links under /dev to be created. Any service that depends on zvol links to be there should add a dependency on zfs-volumes.target. By default, this target is not enabled. Reviewed-by: Fabian Grünbichler <[email protected]> Reviewed-by: Antonio Russo <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: loli10K <[email protected]> Reviewed-by: John Gallagher <[email protected]> Reviewed-by: George Wilson <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pavel Zakharov <[email protected]> Closes #8975
* pkg-utils python sitelib for SLES15Shaun Tancheff2019-07-091-2/+3
| | | | | | | | Use python -Esc to set __python_sitelib. Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Shaun Tancheff <[email protected]> Closes #8969
* Remove arch and relax version dependencygordan-bobic2019-06-221-1/+2
| | | | | | | | | | Remove arch and relax version dependency for zfs-dracut package. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Gordan Bobic <[email protected]> Issue #8913 Closes #8914
* kmod-zfs-devel rpm should provide kmod-spl-develOlaf Faaland2019-06-191-0/+1
| | | | | | | | | | | | | | | When configure is run with --with-spec=redhat, and rpms are built, the kmod-zfs-devel package is missing Provides: kmod-spl-devel = %{version} which is required by software such as Lustre which builds against zfs kmods. Adding it makes it easier for such software to build against both zfs-0.7 (where SPL is separate and may be missing) and zfs-0.8. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #8930
* Add diffutils dependency for dkms buildkpande2019-02-201-1/+1
| | | | | | | | | The cmp and diff utilities are required at configure time. Add a dependency on diffutils to ensure they are installed. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Kash Pande <[email protected]> Closes #5205 Closes #8428
* Exclude test-runner.py from the rpmbuild shebang checkTony Hutter2019-01-281-0/+4
| | | | | | | | | Exclude test-runner.py from the rpmbuild shebang check to allow it to run under Python 2 and 3. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #8331
* Add pyzfs BuildRequires for mock(1)Brian Behlendorf2019-01-131-9/+14
| | | | | | | | When building pyzfs under mock the python-cffi and python-setuptools packages need to be installed and have been added to the BuildRequires. Reviewed-by: Neal Gompa <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #8265
* Fix missing dkms modules after upgradesTony Hutter2019-01-081-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you were upgrading from say, fc28->fc29, on ZFS version X, the RPMs macros would get called like this: %post X.fc29 - This is the step where fc29 gets built by dkms. As part of the build, dkms automatically removes the previous modules before building the new ones. It then builds the new modules. %preun X.fc28 - Right before this step, X.fc29 is be built and installed, but since it has the same X, it's files get inadvertently removed by fc28's uninstall. %postun X.fc28 This patch updates %preun X.fc28 to see if we're upgrading or uninstalling. If we're uninstalling, then remove our files. If we're upgrading then do nothing, since will know dkms will have already removed our files in %post X.fc29. Note that since this fixes the %preun step, it's effect isn't going to be noticed immediately. It will only be seen when packages with this fix are upgraded to a newer version. Reviewed-by: Ralf Ertzinger <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #6902 Closes #8216
* pyzfs: python3 support (build system)Brian Behlendorf2019-01-061-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all of the Python code in the respository has been updated to be compatibile with Python 2.6, Python 3.4, or newer. The only exceptions are arc_summery3.py which requires Python 3, and pyzfs which requires at least Python 2.7. This allows us to maintain a single version of the code and support most default versions of python. This change does the following: * Sets the default shebang for all Python scripts to python3. If only Python 2 is available, then at install time scripts which are compatible with Python 2 will have their shebangs replaced with /usr/bin/python. This is done for compatibility until Python 2 goes end of life. Since only the installed versions are changed this means Python 3 must be installed on the system for test-runner when testing in-tree. * Added --with-python=<2|3|3.4,etc> configure option which sets the PYTHON environment variable to target a specific python version. By default the newest installed version of Python will be used or the preferred distribution version when creating pacakges. * Fixed --enable-pyzfs configure checks so they are run when --enable-pyzfs=check and --enable-pyzfs=yes. * Enabled pyzfs for Python 3.4 and newer, which is now supported. * Renamed pyzfs package to python<VERSION>-pyzfs and updated to install in the appropriate site location. For example, when building with --with-python=3.4 a python34-pyzfs will be created which installs in /usr/lib/python3.4/site-packages/. * Renamed the following python scripts according to the Fedora guidance for packaging utilities in /bin - dbufstat.py -> dbufstat - arcstat.py -> arcstat - arc_summary.py -> arc_summary - arc_summary3.py -> arc_summary3 * Updated python-cffi package name. On CentOS 6, CentOS 7, and Amazon Linux it's called python-cffi, not python2-cffi. For Python3 it's called python3-cffi or python3x-cffi. * Install one version of arc_summary. Depending on the version of Python available install either arc_summary2 or arc_summary3 as arc_summary. The user output is only slightly different. Reviewed-by: John Ramsden <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: loli10K <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #8096
* Fix systemd spec file macrosBrian Behlendorf2018-11-114-4/+28
| | | | | | | | | | | | | | | | Ensure that the _unitdir, _presetdir, _modulesloaddir, and _systemdgeneratordir macros are always defined. If not set them to the expected default values. Pass all of these options to ./configure and package the resulting files in those locations. Additionally, set __brp_mangle_shebangs_exclude_from until the conversion to Python 3 is complete so they may be built cleanly under mock. Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7567 Closes #8119
* Add BuildRequires gcc, make, elfutils-libelf-develTony Hutter2018-11-072-0/+5
| | | | | | | | | | | | | | | | This adds a BuildRequires for gcc, make, and elfutils-libelf-devel into our spec files. gcc has been a packaging requirement for awhile now: https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B These additional BuildRequires allow us to mock build in Fedora 29. Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #8095 Closes #8102