Open FL140 opened 1 year 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....
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.
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
, acd "${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.
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.
System information
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:
contrib/debian/control
is missing in the release tar package.zfs-${OPENZFS_VERSION}
notzfs
alien
package (and others?) should no longer be needed since 2.2.0 (if I understand the instructions correctly). (Note: The control file not found error pops up with and without packagealien
installed.)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:
The command
make native-deb-utils
triggers the error:Include any warning/errors/backtraces from the system logs
Script output: