Fix parallel make srpm
When building srpm using make -j, each of the recursive makes invoked to
build srpm-{dkms,kmod,utils} will build the dist target. This is both
unnecessary, and also has a very good chance of breaking when they race
trying to build gitrev.
Fix this by make dist a prerequisite of srpm-{dkms,kmod,utils} instead
of srpm-common, so that it will be done once before invoking the
recursive makes.
Also, gitrev is not really required for make dist, so instead of adding
it to BUILT_SOURCES, just add it as a prerequisite of the all target.
Mark the individual package targets as PHONY.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10564
2020-07-14 00:24:07 +03:00
|
|
|
PHONY += deb-kmod deb-dkms deb-utils deb deb-local
|
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
deb-local:
|
|
|
|
@(if test "${HAVE_DPKGBUILD}" = "no"; then \
|
|
|
|
echo -e "\n" \
|
|
|
|
"*** Required util ${DPKGBUILD} missing. Please install the\n" \
|
2018-02-15 23:58:23 +03:00
|
|
|
"*** package for your distribution which provides ${DPKGBUILD},\n" \
|
2010-08-26 22:22:58 +04:00
|
|
|
"*** re-run configure, and try again.\n"; \
|
2018-02-15 23:58:23 +03:00
|
|
|
exit 1; \
|
2010-08-26 22:22:58 +04:00
|
|
|
fi; \
|
|
|
|
if test "${HAVE_ALIEN}" = "no"; then \
|
|
|
|
echo -e "\n" \
|
|
|
|
"*** Required util ${ALIEN} missing. Please install the\n" \
|
2018-02-15 23:58:23 +03:00
|
|
|
"*** package for your distribution which provides ${ALIEN},\n" \
|
2010-08-26 22:22:58 +04:00
|
|
|
"*** re-run configure, and try again.\n"; \
|
2018-02-15 23:58:23 +03:00
|
|
|
exit 1; \
|
2010-08-26 22:22:58 +04:00
|
|
|
fi)
|
|
|
|
|
2013-02-18 00:10:17 +04:00
|
|
|
deb-kmod: deb-local rpm-kmod
|
|
|
|
name=${PACKAGE}; \
|
|
|
|
version=${VERSION}-${RELEASE}; \
|
|
|
|
arch=`$(RPM) -qp $${name}-kmod-$${version}.src.rpm --qf %{arch} | tail -1`; \
|
2018-01-18 21:15:41 +03:00
|
|
|
debarch=`$(DPKG) --print-architecture`; \
|
2013-02-18 00:10:17 +04:00
|
|
|
pkg1=kmod-$${name}*$${version}.$${arch}.rpm; \
|
2019-07-09 19:28:05 +03:00
|
|
|
fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1 || exit 1; \
|
2013-02-18 00:10:17 +04:00
|
|
|
$(RM) $$pkg1
|
2017-10-15 23:00:44 +03:00
|
|
|
|
|
|
|
|
|
|
|
deb-dkms: deb-local rpm-dkms
|
|
|
|
name=${PACKAGE}; \
|
|
|
|
version=${VERSION}-${RELEASE}; \
|
|
|
|
arch=`$(RPM) -qp $${name}-dkms-$${version}.src.rpm --qf %{arch} | tail -1`; \
|
2018-01-18 21:15:41 +03:00
|
|
|
debarch=`$(DPKG) --print-architecture`; \
|
2017-10-15 23:00:44 +03:00
|
|
|
pkg1=$${name}-dkms-$${version}.$${arch}.rpm; \
|
2019-07-09 19:28:05 +03:00
|
|
|
fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch $$pkg1 || exit 1; \
|
2017-10-15 23:00:44 +03:00
|
|
|
$(RM) $$pkg1
|
2010-08-26 22:22:58 +04:00
|
|
|
|
2020-09-12 18:22:07 +03:00
|
|
|
deb-utils: deb-local rpm-utils-initramfs
|
2010-08-26 22:22:58 +04:00
|
|
|
name=${PACKAGE}; \
|
2013-02-18 00:10:17 +04:00
|
|
|
version=${VERSION}-${RELEASE}; \
|
2011-06-16 23:14:33 +04:00
|
|
|
arch=`$(RPM) -qp $${name}-$${version}.src.rpm --qf %{arch} | tail -1`; \
|
2018-01-18 21:15:41 +03:00
|
|
|
debarch=`$(DPKG) --print-architecture`; \
|
2010-08-26 22:22:58 +04:00
|
|
|
pkg1=$${name}-$${version}.$${arch}.rpm; \
|
2014-05-17 15:20:59 +04:00
|
|
|
pkg2=libnvpair1-$${version}.$${arch}.rpm; \
|
|
|
|
pkg3=libuutil1-$${version}.$${arch}.rpm; \
|
|
|
|
pkg4=libzfs2-$${version}.$${arch}.rpm; \
|
|
|
|
pkg5=libzpool2-$${version}.$${arch}.rpm; \
|
|
|
|
pkg6=libzfs2-devel-$${version}.$${arch}.rpm; \
|
|
|
|
pkg7=$${name}-test-$${version}.$${arch}.rpm; \
|
2019-07-09 19:28:05 +03:00
|
|
|
pkg8=$${name}-dracut-$${version}.noarch.rpm; \
|
2015-07-24 15:49:03 +03:00
|
|
|
pkg9=$${name}-initramfs-$${version}.$${arch}.rpm; \
|
pyzfs: python3 support (build system)
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 <johnramsden@riseup.net>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8096
2018-10-31 19:22:59 +03:00
|
|
|
pkg10=`ls python*-pyzfs-$${version}* | tail -1`; \
|
2017-07-07 20:45:17 +03:00
|
|
|
## Arguments need to be passed to dh_shlibdeps. Alien provides no mechanism
|
|
|
|
## to do this, so we install a shim onto the path which calls the real
|
|
|
|
## dh_shlibdeps with the required arguments.
|
|
|
|
path_prepend=`mktemp -d /tmp/intercept.XXX`; \
|
|
|
|
echo "#$(SHELL)" > $${path_prepend}/dh_shlibdeps; \
|
|
|
|
echo "`which dh_shlibdeps` -- \
|
|
|
|
-xlibuutil1linux -xlibnvpair1linux -xlibzfs2linux -xlibzpool2linux" \
|
|
|
|
>> $${path_prepend}/dh_shlibdeps; \
|
|
|
|
## These -x arguments are passed to dpkg-shlibdeps, which exclude the
|
|
|
|
## Debianized packages from the auto-generated dependencies of the new debs,
|
|
|
|
## which should NOT be mixed with the alien-generated debs created here
|
|
|
|
chmod +x $${path_prepend}/dh_shlibdeps; \
|
|
|
|
env PATH=$${path_prepend}:$${PATH} \
|
2018-01-18 21:15:41 +03:00
|
|
|
fakeroot $(ALIEN) --bump=0 --scripts --to-deb --target=$$debarch \
|
2015-07-24 15:49:03 +03:00
|
|
|
$$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \
|
2019-07-09 19:28:05 +03:00
|
|
|
$$pkg8 $$pkg9 $$pkg10 || exit 1; \
|
2017-07-07 20:45:17 +03:00
|
|
|
$(RM) $${path_prepend}/dh_shlibdeps; \
|
|
|
|
rmdir $${path_prepend}; \
|
2015-07-24 15:49:03 +03:00
|
|
|
$(RM) $$pkg1 $$pkg2 $$pkg3 $$pkg4 $$pkg5 $$pkg6 $$pkg7 \
|
Adopt pyzfs from ClusterHQ
This commit introduces several changes:
* Update LICENSE and project information
* Give a good PEP8 talk to existing Python source code
* Add RPM/DEB packaging for pyzfs
* Fix some outstanding issues with the existing pyzfs code caused by
changes in the ABI since the last time the code was updated
* Integrate pyzfs Python unittest with the ZFS Test Suite
* Add missing libzfs_core functions: lzc_change_key,
lzc_channel_program, lzc_channel_program_nosync, lzc_load_key,
lzc_receive_one, lzc_receive_resumable, lzc_receive_with_cmdprops,
lzc_receive_with_header, lzc_reopen, lzc_send_resume, lzc_sync,
lzc_unload_key, lzc_remap
Note: this commit slightly changes zfs_ioc_unload_key() ABI. This allow
to differentiate the case where we tried to unload a key on a
non-existing dataset (ENOENT) from the situation where a dataset has
no key loaded: this is consistent with the "change" case where trying
to zfs_ioc_change_key() from a dataset with no key results in EACCES.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7230
2018-03-18 11:34:45 +03:00
|
|
|
$$pkg8 $$pkg9 $$pkg10;
|
2010-08-26 22:22:58 +04:00
|
|
|
|
2017-10-15 23:00:44 +03:00
|
|
|
deb: deb-kmod deb-dkms deb-utils
|