openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.69k stars 1.75k forks source link

Missing `contrib/debian/control` when building deb dkms package on Ubuntu 23.10 #15586

Open FL140 opened 1 year ago

FL140 commented 1 year ago

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 23.10
Kernel Version 6.5.0-10-generic
Architecture x86_64/amd64
OpenZFS Version 2.2.1

Describe the problem you're observing

I am trying to build a deb zfs dkms package for Ubuntu 23.10 from the release 2.2.1 tar package from GitHub according to the recommendation given in https://github.com/openzfs/zfs/pull/15529#issuecomment-1823169348 if followed the instructions given in https://openzfs.github.io/openzfs-docs/Developer%20Resources/Custom%20Packages.html .

I am trying this because of the block clone bug and the following fixes introduced with 2.2.1, unfortunately there is still no package for Ubuntu available and I need to fix the systems I am responsible for ASAP.

Unfortunately it seems as the instructions and release package have issues.

The following issues were found:

Only the first issue needs solving, I already solved the other issues (except that the documentation needs an update).

Describe how to reproduce the problem

I wrote an installation script:

#!/bin/bash
# Ubuntu OpenZFS DKMS Kernel Module Install Script

typeset -r OPENZFS_VERSION=${1:-2.2.1}
typeset -r TMP_DIR="/tmp"

# Installed required packages (Debian, Ubuntu)
# Note:
# TBD: hmm, I don't think we need alien and related packages any longer for versions >= v2.2.
sudo apt-get install -y build-essential autoconf automake libtool gawk \
        fakeroot libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev \
        libaio-dev libattr1-dev libelf-dev linux-headers-generic \
        python3 python3-dev python3-setuptools python3-cffi libffi-dev \
        python3-packaging debhelper-compat dh-python po-debconf \
        python3-all-dev python3-sphinx \
        dkms dh-dkms

# Create working directory
[ -d "${TMP_DIR}/zfs-${OPENZFS_VERSION}" ] && { rm -rf "${TMP_DIR}/zfs-${OPENZFS_VERSION}"; }    # !! use a fixed sting in rm -rf!
install -d -m 0770 -o root -g root "${TMP_DIR}/zfs-${OPENZFS_VERSION}"
pushd "${TMP_DIR}/zfs-${OPENZFS_VERSION}" > /dev/null || { echo "Error while pushd directory \"${TMP_DIR}/zfs-${OPENZFS_VERSION}\"!"; exit 2; }

# Get Source Code Released Tarball
# Note:
# The download location given in the instructions does not exist, get the tar package directly from GitHub.
#wget http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-${OPENZFS_VERSION}.tar.gz
wget https://github.com/openzfs/zfs/releases/download/zfs-${OPENZFS_VERSION}/zfs-${OPENZFS_VERSION}.tar.gz
wget https://github.com/openzfs/zfs/releases/download/zfs-${OPENZFS_VERSION}/zfs-${OPENZFS_VERSION}.sha256.asc
sha256sum --check zfs-${OPENZFS_VERSION}.sha256.asc || { echo "Error checksum(s) for zfs-${OPENZFS_VERSION} does not match!"; exit 3; }
gpg --verify zfs-${OPENZFS_VERSION}.sha256.asc zfs-${OPENZFS_VERSION}.tar.gz    # TBD add error handling

# Build and install OpenZFS DKMS deb package
# Note:
# Starting from openzfs-2.2 release, native deb-based DKMS and user packages can be built.
# => We are compiling for => v2.2.1 so this is the way to go.
tar -xzf zfs-${OPENZFS_VERSION}.tar.gz
cd zfs-${OPENZFS_VERSION}
./configure || { echo "Error while configuring zfs-${OPENZFS_VERSION} package build!"; exit 4; }
make native-deb-utils || { echo "Error while making native-deb-utils for zfs-${OPENZFS_VERSION}!"; exit 5; }
sudo apt-get install --fix-missing ../*.deb

# Clean Up
popd > /dev/null || { echo "Error while popd directory!"; exit 2; }
rm -rf "${TMP_DIR}/zfs-${OPENZFS_VERSION}"    # !! use a fixed sting in rm -rf!
exit 0

The command make native-deb-utils triggers the error:

cp -r contrib/debian debian; chmod +x debian/rules;
cp contrib/debian/control debian/control; \
dpkg-buildpackage -b -rfakeroot -us -uc;
cp: cannot stat 'contrib/debian/control': No such file or directory
dpkg-buildpackage: error: cannot read debian/control: No such file or directory
make: *** [Makefile:14365: native-deb-utils] Error 255
$

Include any warning/errors/backtraces from the system logs

Script output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'debhelper' instead of 'debhelper-compat'
build-essential is already the newest version (12.10ubuntu1).
autoconf is already the newest version (2.71-3).
automake is already the newest version (1:1.16.5-1.3).
libtool is already the newest version (2.4.7-7).
gawk is already the newest version (1:5.2.1-2).
fakeroot is already the newest version (1.32.1-1).
libblkid-dev is already the newest version (2.39.1-4ubuntu2).
uuid-dev is already the newest version (2.39.1-4ubuntu2).
libudev-dev is already the newest version (253.5-1ubuntu6.1).
libssl-dev is already the newest version (3.0.10-1ubuntu2.1).
zlib1g-dev is already the newest version (1:1.2.13.dfsg-1ubuntu5).
libaio-dev is already the newest version (0.3.113-5).
libattr1-dev is already the newest version (1:2.5.1-4).
libelf-dev is already the newest version (0.189-4).
linux-headers-generic is already the newest version (6.5.0.13.15).
python3 is already the newest version (3.11.4-5).
python3-dev is already the newest version (3.11.4-5).
python3-setuptools is already the newest version (68.1.2-2).
python3-cffi is already the newest version (1.15.1-5build1).
libffi-dev is already the newest version (3.4.4-1).
python3-packaging is already the newest version (23.1-1).
debhelper is already the newest version (13.11.6ubuntu1).
dh-python is already the newest version (6.20230825).
po-debconf is already the newest version (1.0.21+nmu1).
python3-all-dev is already the newest version (3.11.4-5).
python3-sphinx is already the newest version (5.3.0-7).
dkms is already the newest version (3.0.11-1ubuntu10).
dh-dkms is already the newest version (3.0.11-1ubuntu10).
0 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.
--2023-11-27 02:52:04--  https://github.com/openzfs/zfs/releases/download/zfs-2.2.1/zfs-2.2.1.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/437011/37f69214-9581-4db2-8e6c-7a26979ac46f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231127T015205Z&X-Amz-Expires=300&X-Amz-Signature=791d267aece7050ab752adce49df04a77434f694ee904325e7c48ab3b87ddf52&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=437011&response-content-disposition=attachment%3B%20filename%3Dzfs-2.2.1.tar.gz&response-content-type=application%2Foctet-stream [following]
--2023-11-27 02:52:05--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/437011/37f69214-9581-4db2-8e6c-7a26979ac46f?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231127T015205Z&X-Amz-Expires=300&X-Amz-Signature=791d267aece7050ab752adce49df04a77434f694ee904325e7c48ab3b87ddf52&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=437011&response-content-disposition=attachment%3B%20filename%3Dzfs-2.2.1.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33814243 (32M) [application/octet-stream]
Saving to: ‘zfs-2.2.1.tar.gz’

zfs-2.2.1.tar.gz             100%[==============================================>]  32.25M  2.61MB/s    in 13s     

2023-11-27 02:52:18 (2.42 MB/s) - ‘zfs-2.2.1.tar.gz’ saved [33814243/33814243]

--2023-11-27 02:52:18--  https://github.com/openzfs/zfs/releases/download/zfs-2.2.1/zfs-2.2.1.sha256.asc
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/437011/1d6d831e-d287-4a71-ad8f-d70dc13f0a30?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231127T015219Z&X-Amz-Expires=300&X-Amz-Signature=637a0d74af6ee34e8ec53b45885f2417a3b2dc97240167ef90c0030c56978cf6&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=437011&response-content-disposition=attachment%3B%20filename%3Dzfs-2.2.1.sha256.asc&response-content-type=application%2Foctet-stream [following]
--2023-11-27 02:52:19--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/437011/1d6d831e-d287-4a71-ad8f-d70dc13f0a30?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231127%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231127T015219Z&X-Amz-Expires=300&X-Amz-Signature=637a0d74af6ee34e8ec53b45885f2417a3b2dc97240167ef90c0030c56978cf6&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=437011&response-content-disposition=attachment%3B%20filename%3Dzfs-2.2.1.sha256.asc&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 968 [application/octet-stream]
Saving to: ‘zfs-2.2.1.sha256.asc’

zfs-2.2.1.sha256.asc         100%[==============================================>]     968  --.-KB/s    in 0s      

2023-11-27 02:52:20 (38.0 MB/s) - ‘zfs-2.2.1.sha256.asc’ saved [968/968]

zfs-2.2.1.tar.gz: OK
sha256sum: WARNING: 18 lines are improperly formatted
gpg: not a detached signature
checking for gawk... gawk
checking metadata... META file
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking dependency style of gcc... gcc3
checking whether to build with code coverage support... no
checking how to create a pax tar archive... gnutar
checking zfs author... OpenZFS
checking zfs license... CDDL
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for the common suffixes of directories in the library search path... lib,lib
checking zfs config... all
checking the number of available CPUs... 16
checking whether gcc supports -Wno-clobbered... yes
checking whether gcc supports -Winfinite-recursion... yes
checking whether  supports -Winfinite-recursion... yes
checking whether gcc supports -Wimplicit-fallthrough... yes
checking whether gcc supports -Wframe-larger-than=<size>... yes
checking whether gcc supports -Wno-format-truncation... yes
checking whether gcc supports -Wno-format-zero-length... yes
checking whether gcc supports -Wformat-overflow... yes
checking whether gcc supports -fno-omit-frame-pointer... yes
checking whether gcc supports -fno-ipa-sra... yes
checking whether  supports -fno-ipa-sra... yes
checking whether to build with -fsanitize=address support... no
checking whether to build with -fsanitize=undefined support... no
checking whether host toolchain supports SSE... yes
checking whether host toolchain supports SSE2... yes
checking whether host toolchain supports SSE3... yes
checking whether host toolchain supports SSSE3... yes
checking whether host toolchain supports SSE4.1... yes
checking whether host toolchain supports SSE4.2... yes
checking whether host toolchain supports AVX... yes
checking whether host toolchain supports AVX2... yes
checking whether host toolchain supports AVX512F... yes
checking whether host toolchain supports AVX512CD... yes
checking whether host toolchain supports AVX512DQ... yes
checking whether host toolchain supports AVX512BW... yes
checking whether host toolchain supports AVX512IFMA... yes
checking whether host toolchain supports AVX512VBMI... yes
checking whether host toolchain supports AVX512PF... yes
checking whether host toolchain supports AVX512ER... yes
checking whether host toolchain supports AVX512VL... yes
checking whether host toolchain supports AES... yes
checking whether host toolchain supports PCLMULQDQ... yes
checking whether host toolchain supports MOVBE... yes
checking whether host toolchain supports XSAVE... yes
checking whether host toolchain supports XSAVEOPT... yes
checking whether host toolchain supports XSAVES... yes
checking for system type (linux-gnu)... Linux
checking for python3... python3
checking for python version... 3.11
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/local/lib/python3.11/dist-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/local/lib/python3.11/dist-packages
checking for python3 module: packaging... yes
checking for python3.11... /usr/bin/python3.11
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python >= '3.6.0'... yes
checking for Python include path... -I/usr/include/python3.11
checking for Python library path... -L/usr/lib/x86_64-linux-gnu -lpython3.11
checking for Python site-packages path... /usr/lib/python3/dist-packages
checking python extra libraries... -ldl -lm
checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
checking consistency of all components of python development environment... yes
checking for python3.11 module: setuptools... yes
checking for python3.11 module: cffi... yes
checking whether to enable pyzfs: ... yes
checking for sed --in-place... --in-place
checking for cppcheck... no
checking for shellcheck... yes
checking for checkbashisms... no
checking for parallel... no
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for CFLocaleCopyPreferredLanguages... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for dracut directory... /usr/lib/dracut
checking for zlib... yes
checking for zlib.h... yes
checking for compress2 in -lz... yes
checking for uncompress in -lz... yes
checking for crc32 in -lz... yes
checking for udev directories... /lib/udev;/lib/udev/rules.d
checking for systemd support... yes
checking for libudev... yes
checking for libudev.h... yes
checking for main in -ludev... yes
checking for udev_device_get_is_initialized... yes
checking for uuid... yes
checking for uuid/uuid.h... yes
checking for uuid_generate in -luuid... yes
checking for uuid_is_null in -luuid... yes
checking for blkid... yes
checking for blkid/blkid.h... yes
checking for main in -lblkid... yes
checking for library containing xdrmem_create... no
checking for libtirpc... yes
checking for rpc/xdr.h... yes
checking for xdrmem_create in -ltirpc... yes
checking for libcrypto... yes
checking for openssl/evp.h... yes
checking for PKCS5_PBKDF2_HMAC_SHA1 in -lcrypto... yes
checking for libaio.h... yes
checking for main in -laio... yes
checking whether -latomic is required... no
checking for libfetch... none
checking for aio.h... yes
checking for lio_listio in -lrt... yes
checking for clock_gettime... yes
checking for security/pam_modules.h... no
checking makedev() is declared in sys/sysmacros.h... yes
checking makedev() is declared in sys/mkdev.h... no
checking for issetugid... no
checking for mlockall... yes
checking for strlcat... yes
checking for strlcpy... yes
checking kernel source and build directories... done
checking kernel source directory... /usr/src/linux-headers-6.5.0-10-generic
checking kernel build directory... /usr/src/linux-headers-6.5.0-10-generic
checking kernel source version... 6.5.0-10-generic
checking for kernel config option compatibility... done
checking whether CONFIG_MODULES is defined... yes
checking whether CONFIG_BLOCK is defined... yes
checking whether mutex_lock() is GPL-only... no
checking whether CONFIG_TRIM_UNUSED_KSYM is disabled... yes
checking whether CONFIG_ZLIB_DEFLATE is defined... yes
checking whether CONFIG_ZLIB_INFLATE is defined... yes
checking kernel file name for module symbols... Module.symvers
checking whether fpu headers are available... asm/fpu/api.h
checking whether objtool header is available... linux/objtool.h
checking whether wait_queue_entry_t exists... yes
checking whether /dev/zfs minor is available... 249
checking whether DECLARE_EVENT_CLASS() is available... no
checking for available kernel interfaces... done
checking whether access_ok() has 'type' parameter... no
checking whether global_node_page_state() exists... yes
checking whether global_zone_page_state() exists... yes
checking whether enum node_stat_item contains NR_FILE_PAGES... yes
checking whether enum node_stat_item contains NR_INACTIVE_ANON... yes
checking whether enum node_stat_item contains NR_INACTIVE_FILE... yes
checking whether enum zone_stat_item contains NR_FILE_PAGES... no
checking whether enum zone_stat_item contains NR_INACTIVE_ANON... no
checking whether enum zone_stat_item contains NR_INACTIVE_FILE... no
checking whether global_page_state enums are sane... yes
checking whether compile-time stack validation (objtool) is available... yes
checking whether STACK_FRAME_NON_STANDARD is defined... yes
checking whether pde_data() is lowercase... yes
checking whether fops->fallocate() exists... yes
checking whether FALLOC_FL_ZERO_RANGE exists... yes
checking whether fops->fadvise() exists... yes
checking whether generic_fadvise() is available... yes
checking whether zlib_deflate_workspacesize() wants 2 args... yes
checking whether struct rw_semaphore has member activity... no
checking whether struct rw_semaphore has atomic_long_t member count... yes
checking whether header linux/sched/rt.h exists... yes
checking whether header linux/sched/signal.h exists... yes
checking whether io_schedule_timeout() is available... yes
checking whether usleep_range() is available... yes
checking whether kmem_cache_create_usercopy() exists... yes
checking whether kvmalloc(ptr, flags) is available... yes
checking whether __vmalloc(ptr, flags, pageflags) is available... no
checking whether wait_on_bit() takes an action... no
checking whether wq_head->head and wq_entry->entry exist... yes
checking whether timestamp_truncate() exists... yes
checking whether inode->i_*time's are timespec64... yes
checking whether inode_get_ctime() exists... no
checking whether inode_set_ctime_to_ts() exists... no
checking whether inode_lock_shared() exists... yes
checking whether group_info->gid exists... yes
checking whether kernel_write() takes loff_t pointer... yes
checking whether kernel_read() takes loff_t pointer... yes
checking whether timer_setup() is available... yes
checking whether timer function expects timer_list... yes
checking whether struct timer_list has flags... yes
checking whether super_block->s_user_ns exists... yes
checking whether proc_ops structure exists... yes
checking whether bops->check_events() exists... yes
checking whether bops->release() is void and takes 2 args... no
checking whether bops->release() is void and takes 1 arg... yes
checking whether bops->revalidate_disk() exists... no
checking whether REQ_FAILFAST_MASK is defined... yes
checking whether REQ_DISCARD is defined... no
checking whether REQ_FLUSH is defined... no
checking whether REQ_PREFLUSH is defined... yes
checking whether REQ_OP_DISCARD is defined... yes
checking whether REQ_OP_SECURE_ERASE is defined... yes
checking whether REQ_OP_FLUSH is defined... yes
checking whether bio->bi_opf is defined... yes
checking whether bio_set_op_attrs is available... no
checking whether bio_set_dev() is available... yes
checking whether bio_set_dev() is GPL-only... yes
checking whether bio_set_dev() is a macro... no
checking whether bio_end_io_t wants 1 arg... yes
checking whether bio->bi_status exists... yes
checking whether bio has bi_iter... yes
checking whether submit_bio() wants 1 arg... yes
checking whether current->bio_list exists... yes
checking whether blkg_tryget() is available... no
checking whether bio->bi_bdev->bd_disk exists... yes
checking whether block_device_operations->submit_bio() returns void... yes
checking whether linux/blk-cgroup.h exists... yes
checking whether bio_alloc() wants 4 args... yes
checking whether blkdev_get_by_path() exists and takes 3 args... no
checking whether blkdev_get_by_path() exists and takes 4 args... yes
checking whether blkdev_put() exists... checking whether blkdev_put() accepts void* as arg 2... yes
checking whether blkdev_reread_part() exists... no
checking whether invalidate_bdev() exists... yes
checking whether lookup_bdev() wants dev_t arg... yes
checking whether bdev_logical_block_size() is available... yes
checking whether bdev_physical_block_size() is available... yes
checking whether check_disk_change() exists... no
checking whether bdev_check_media_change() exists... no
checking whether bdev_whole() is available... yes
checking whether bdevname() exists... no
checking whether blkdev_get_by_path() handles ERESTARTSYS... no
checking whether blkdev_issue_secure_erase() is available... yes
checking whether bdev_kobj() exists... yes
checking whether part_to_dev() exists... no
checking whether disk_check_media_change() exists... yes
checking whether BLK_STS_RESV_CONFLICT is defined... yes
checking whether blk_mode_t is defined... yes
checking whether struct blk_plug is available... yes
checking whether blk_queue bdi is dynamic... no
checking whether blk_queue_update_readahead() exists... no
checking whether disk_update_readahead() exists... yes
checking whether bdev_max_discard_sectors() is available... yes
checking whether bdev_max_secure_erase_sectors() is available... yes
checking whether blk_queue_flag_set() exists... yes
checking whether blk_queue_flag_clear() exists... yes
checking whether blk_queue_flush() is available... no
checking whether blk_queue_write_cache() exists... yes
checking whether blk_queue_write_cache() is GPL-only... yes
checking whether blk_queue_max_hw_sectors() is available... yes
checking whether blk_queue_max_segments() is available... yes
checking whether block multiqueue with blk_status_t is available... yes
checking whether GENHD_FL_EXT_DEVT flag is available... no
checking whether GENHD_FL_NO_PART flag is available... yes
checking whether revalidate_disk_size() is available... no
checking whether revalidate_disk() is available... no
checking whether get_disk_ro() is available... yes
checking whether generic_readlink is global... no
checking whether ql->discard_granularity is available... yes
checking whether inode_owner_or_capable() exists... no
checking whether inode_owner_or_capable() takes user_ns... no
checking whether inode_owner_or_capable() takes mnt_idmap... yes
checking whether super_block uses const struct xattr_handler... yes
checking whether xattr_handler has name... yes
checking whether xattr_handler->get() wants dentry and inode... yes
checking whether xattr_handler->set() wants dentry, inode, and mnt_idmap... yes
checking whether xattr_handler->list() wants simple... yes
checking whether posix_acl_from_xattr() needs user_ns... yes
checking whether generic_setxattr() exists... no
checking whether posix_acl_release() is available... yes
checking whether posix_acl_release() is GPL-only... yes
checking whether set_cached_acl() is usable... yes
checking whether __posix_acl_chmod exists... yes
checking whether posix_acl_equiv_mode() wants umode_t... yes
checking whether posix_acl_valid() wants user namespace... yes
checking whether iops->get_acl() exists... yes
checking whether iops->set_acl() exists... yes
checking whether uncached_acl_sentinel() exists... yes
checking whether posix_acl has refcount_t... yes
checking whether iops->setattr() takes mnt_idmap... yes
checking whether iops->getattr() takes mnt_idmap... yes
checking whether inode_set_flags() exists... yes
checking whether inode_set_iversion() exists... yes
checking whether sops->show_options() wants dentry... yes
checking whether file_inode() is available... yes
checking whether file_dentry() is available... yes
checking whether fops->fsync() wants no dentry... no
checking whether fops->fsync() wants range... range
checking whether fops->aio_fsync() exists... no
checking whether sops->evict_inode() exists... yes
checking whether sops->dirty_inode() wants flags... yes
checking whether super_block has s_shrink... yes
checking whether shrink_control has nid... yes
checking whether new var-arg register_shrinker() exists... yes
checking whether struct shrink_control exists... yes
checking whether iops->mkdir() takes struct mnt_idmap*... yes
checking whether iops->lookup() passes flags... yes
checking whether iops->create() takes struct mnt_idmap*... yes
checking whether iops->permission() takes struct mnt_idmap*... yes
checking whether iops->get_link() passes delayed... yes
checking whether i_op->tmpfile() exists... yes
checking whether dops->d_automount() exists... yes
checking whether eops->encode_fh() wants inode... yes
checking whether eops->commit_metadata() exists... yes
checking whether clear_inode() is available... yes
checking whether setattr_prepare() is available and accepts struct mnt_idmap*... yes
checking whether insert_inode_locked() is available... yes
checking whether d_make_root() is available... yes
checking whether d_obtain_alias() is available... yes
checking whether d_prune_aliases() is available... yes
checking whether d_set_d_op() is available... yes
checking whether dops->d_revalidate() takes struct nameidata... no
checking whether dentry uses const struct dentry_operations... yes
checking whether super_block has s_d_op... yes
checking whether dentry aliases are in d_u member... yes
checking whether truncate_setsize() is available... yes
checking whether security_inode_init_security wants callback... yes
checking whether fst->mount() exists... yes
checking whether super_setup_bdi_name() exists... yes
checking whether set_nlink() is available... yes
checking whether sget() wants 5 args... yes
checking whether lseek_execute() is available... no
checking whether filemap_dirty_folio exists... yes
checking whether read_folio exists... yes
checking whether vfs_getattr() wants 4 args... yes
checking whether vfs_getattr() wants 2 args... no
checking whether vfs_getattr() wants 3 args... no
checking whether vfs_fsync() wants 2 args... yes
checking whether fops->iterate_shared() is available... yes
checking whether aops->direct_IO() uses iov_iter... yes
checking whether aops->readpages exists... no
checking whether __set_page_dirty_nobuffers exists... no
checking whether fops->read/write_iter() are available... yes
checking whether new_sync_read/write() are available... no
checking whether generic_write_checks() takes kiocb... yes
checking whether iov_iter types are available... yes
checking whether iov_iter_advance() is available... yes
checking whether iov_iter_revert() is available... yes
checking whether iov_iter_fault_in_readable() is available... no
checking whether fault_in_iov_iter_readable() is available... yes
checking whether iov_iter_count() is available... yes
checking whether copy_to_iter() is available... yes
checking whether copy_from_iter() is available... yes
checking whether iov_iter_type() is available... yes
checking whether iter_iov() is available... yes
checking whether fops->copy_file_range() is available... yes
checking whether generic_copy_file_range() is available... yes
checking whether fops->remap_file_range() is available... yes
checking whether fops->clone_file_range() is available... no
checking whether fops->dedupe_file_range() is available... no
checking whether file_operations_extend takes .copy_file_range() and .clone_file_range()... no
checking whether kmap_atomic wants 1 args... yes
checking whether follow_down_one() is available... yes
checking whether submit_bio is member of struct block_device_operations... yes
checking whether blk_alloc_disk() exists... yes
checking whether blk_cleanup_disk() exists... no
checking whether 6.3+ bdev_*_io_acct() are available... yes
checking whether kernel fpu is available... internal
checking whether kernel defines fmode_t... yes
checking whether kuid_t/kgid_t is available... yes
checking whether i_(uid|gid)_(read|write) exist... yes
checking whether iops->rename() takes struct mnt_idmap*... yes
checking whether current_time() exists... yes
checking whether ns_capable exists... yes
checking whether has_capability() is available... yes
checking whether cred_t->user_ns exists... yes
checking whether kuid_has_mapping/kgid_has_mapping exist... yes
checking whether in_compat_syscall() is available... yes
checking whether ktime_get_coarse_real_ts64() exists... yes
checking whether ktime_get_raw_ts64() exists... yes
checking whether totalram_pages() exists... yes
checking whether totalhigh_pages() exists... yes
checking whether kstrtoul() exists... yes
checking whether percpu_counter_init() wants gfp_t... yes
checking whether percpu_counter_add_batch() is defined... yes
checking whether is inside percpu_ref.data... yes
checking whether CPU hotplug APIs exist... yes
checking whether generic_fillattr requires struct mnt_idmap* and request_mask... checking whether generic_fillattr requires struct mnt_idmap*... yes
checking whether iops->mknod() takes struct mnt_idmap*... yes
checking whether iops->symlink() takes struct mnt_idmap*... yes
checking whether bio_max_segs() exists... yes
checking whether signal_stop() exists... yes
checking whether kernel_siginfo_t tyepedef exists... yes
checking whether struct kobj_type.default_groups exists... yes
checking whether set_special_state() exists... yes
checking whether standalone <linux/stdarg.h> exists... yes
checking whether folio_wait_bit() exists... yes
checking whether add_disk() returns int... yes
checking whether kthread_complete_and_exit() is available... yes
checking whether dequeue_signal() takes 4 arguments... yes
checking whether ZERO_PAGE() is GPL-only... no
checking whether __copy_from_user_inatomic is available... yes
checking whether user_namespace->ns.inum exists... yes
checking whether APIs for idmapped mount are present... yes
checking whether iattr->ia_vfsuid and iattr->ia_vfsgid exist... yes
checking whether filemap_range_has_page() is available... no
checking whether int (*writepage_t)() takes struct folio*... yes
checking whether struct reclaim_state has reclaimed field... yes
checking whether register_sysctl_table exists... no
checking whether copy_splice_read() exists... yes
checking whether fsync_bdev() exists... yes
checking os distribution... ubuntu
checking default package type... deb
checking default init directory... ${prefix}/etc/init.d
checking default shell... /bin/sh
checking default nfs server init script... nfs
checking default init config directory... /etc/default
checking whether initramfs-tools is available... yes
checking default bash completion directory... /usr/share/bash-completion/completions
checking whether rpm is available... yes (4.18.0)
checking whether rpmbuild is available... yes (4.18.0)
checking whether spec files are available... yes (rpm/generic/*.spec.in)
checking whether dpkg is available... yes (1.22.0)
checking whether dpkg-buildpackage is available... yes (1.22.0.)
checking whether alien is available... yes (8.95.6)
checking whether assertion support will be enabled... no
checking whether debuginfo support will be forced... no
checking whether basic kmem accounting is enabled... no
checking whether detailed kmem tracking is enabled... no
checking whether FreeBSD kernel INVARIANTS checks are enabled... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating contrib/debian/rules
config.status: creating contrib/debian/changelog
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating lib/libzfs/libzfs.pc
config.status: creating lib/libzfs_core/libzfs_core.pc
config.status: creating lib/libzfsbootenv/libzfsbootenv.pc
config.status: creating module/Kbuild
config.status: creating module/Makefile
config.status: creating rpm/generic/zfs-dkms.spec
config.status: creating rpm/generic/zfs-kmod.spec
config.status: creating rpm/generic/zfs.spec
config.status: creating rpm/redhat/zfs-dkms.spec
config.status: creating rpm/redhat/zfs-kmod.spec
config.status: creating rpm/redhat/zfs.spec
config.status: creating tests/zfs-tests/tests/Makefile
config.status: creating zfs.release
config.status: creating zfs_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
cp -r contrib/debian debian; chmod +x debian/rules;
cp contrib/debian/control debian/control; \
dpkg-buildpackage -b -rfakeroot -us -uc;
cp: cannot stat 'contrib/debian/control': No such file or directory
dpkg-buildpackage: error: cannot read debian/control: No such file or directory
make: *** [Makefile:14365: native-deb-utils] Error 255
Error while making native-deb-utils for zfs-2.2.1!
AllKind commented 12 months ago

The file pattern for apt-get is perfectly fine. The problem is the script is in the wrong directory when trying the install. That is why pathname expansion does not work and apt-get gets a list of invalid file names.

vboxadmin@Ubuntu-Jammy:~/Downloads$ pushd /tmp/zfs-2.2.2/
/tmp/zfs-2.2.2 ~/Downloads
vboxadmin@Ubuntu-Jammy:/tmp/zfs-2.2.2$ cd zfs-2.2.2/
vboxadmin@Ubuntu-Jammy:/tmp/zfs-2.2.2/zfs-2.2.2$ popd
~/Downloads

so instead of popd, a cd "${TMP_DIR}/zfs-${OPENZFS_VERSION}" should work. The popd should be moved after the install and before the cleanup.

@FL140 Tried your script on Ubuntu 22.04 (jammy). dh-dkms does not exist yet, so the build dependencies never get installed. https://packages.ubuntu.com/search?keywords=dh-dkms

I'm not sure what the consequences, are regarding the package build, if you try to build it without the dh-dkms package. More of a documentation issue in the Wiki....

Also: install -d -m 0770 -o root -g root "${TMP_DIR}/zfs-${OPENZFS_VERSION}"

results in a permission denied error, when trying to change the user/group. But you don't need to change the user/group to root. So just drop that....

FL140 commented 12 months ago

I can also test yours. Only question is does it build 2.2.2 when checked out from git with the tag? It built 2.2.99 for me, that's why I fell back on the tar tarball which is working (if you download the correct one).

You can pass the version you want to build in as the first parameter, it uses 2.2.2 as default see typeset -r OPENZFS_VERSION=${1:-2.2.2}

I went the git clone path since the tar wasn't working at the time and in addition with the git clone approach it is possible to apply additional commits.

FL140 commented 12 months ago

The file pattern for apt-get is perfectly fine. The problem is the script is in the wrong directory when trying the install. That is why pathname expansion does not work and apt-get gets a list of invalid file names.

vboxadmin@Ubuntu-Jammy:~/Downloads$ pushd /tmp/zfs-2.2.2/
/tmp/zfs-2.2.2 ~/Downloads
vboxadmin@Ubuntu-Jammy:/tmp/zfs-2.2.2$ cd zfs-2.2.2/
vboxadmin@Ubuntu-Jammy:/tmp/zfs-2.2.2/zfs-2.2.2$ popd
~/Downloads

so instead of popd, a cd "${TMP_DIR}/zfs-${OPENZFS_VERSION}" should work. The popd should be moved after the install and before the cleanup.

Well the last minute changes you know ;-), I had the popd exactly before the cleanup, but I moved it with the idea to also clean up the build directory earlier and make an option to keep the deb files. But it was verly late that day... Anyways will have look again over it.

@FL140 Tried your script on Ubuntu 22.04 (jammy). dh-dkms does not exist yet, so the build dependencies never get installed. https://packages.ubuntu.com/search?keywords=dh-dkms

I'm not sure what the consequences, are regarding the package build, if you try to build it without the dh-dkms package. More of a documentation issue in the Wiki....

hmmm, IDK how we handle that on older releases on 23.10 it's there, this will need a bit of investigation if someone needs it. I will also test it on Debian today.

Also: install -d -m 0770 -o root -g root "${TMP_DIR}/zfs-${OPENZFS_VERSION}"

results in a permission denied error, when trying to change the user/group. But you don't need to change the user/group to root. So just drop that....

Well if the script is called as root no, otherwise yes. I had it there to prevent normal users entering the directory. But you are right, it's better to run the build process as normal user and sudo install later.

behlendorf commented 1 month ago

The recently tagged 2.3.0-rc1 release included a couple of fixed. It'd be very helpful if anyone who had issues could try again so we can work through any potential removing issues. We'll backport these for 2.2.7.