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

The RPM spec files should Obsolete the old package names of version 4 of the ZFS libraries #11844

Closed
siebenmann opened this issue Apr 5, 2021 · 5 comments
Labels
Component: Packaging custom packages

Comments

@siebenmann
Copy link
Contributor

System information

Type Version/Name
Distribution Name Fedora
Distribution Version 33
Linux Kernel 5.11.10-200.fc33.x86_64
Architecture x86_64
ZFS Version git tip, currently zfs-2.1.0-rc1-20-gec580225d
SPL Version git tip, currently zfs-2.1.0-rc1-20-gec580225d

Describe the problem you're observing

Commit fe6babc changes the RPM spec files so that they now produce libzfs5 and libzpool5 RPMs (and shared library versions), instead of libzfs4 and libzpool4 RPMs. However, the RPM spec files don't Obsoletes the old versions, leading to upgrade time conflicts. This is a rerun of issue #11230 from the previous library version bump.

This time around there appear to be no conflicts between libzpool5 and libzpool4, but it's probably a good thing to Obsolete that one too. Also, the fact that there are conflicts between libzfs5 and libzfs4 may be a sign that some shared libraries have not had their versions increased when they should have.

Describe how to reproduce the problem

Install a Fedora system with RPMs built from ZFS git tip before this commit, pull, rebuild the RPMs, and attempt to update with `dnf update *.rpm'. For me, this produces:

# dnf update *.rpm
Upgrading:
 libnvpair3        x86_64        2.1.99-1.fc33        @commandline         40 k
 libuutil3         x86_64        2.1.99-1.fc33        @commandline         32 k
 zfs               x86_64        2.1.99-1.fc33        @commandline        660 k
 zfs-dkms          noarch        2.1.99-1.fc33        @commandline         29 M
Installing dependencies:
 libzfs5           x86_64        2.1.99-1.fc33        @commandline        237 k
 libzpool5         x86_64        2.1.99-1.fc33        @commandline        1.3 M

Transaction Summary
================================================================================
Install  2 Packages
Upgrade  4 Packages

Total size: 32 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /lib64/libzfs.so.4 from install of libzfs5-2.1.99-1.fc33.x86_64 conflicts with file from package libzfs4-2.0.0-rc1_471_g38280c352.fc33.x86_64
  file /lib64/libzfs_core.so.3.0.0 from install of libzfs5-2.1.99-1.fc33.x86_64 conflicts with file from package libzfs4-2.0.0-rc1_471_g38280c352.fc33.x86_64
  file /lib64/libzfsbootenv.so.1.0.0 from install of libzfs5-2.1.99-1.fc33.x86_64 conflicts with file from package libzfs4-2.0.0-rc1_471_g38280c352.fc33.x86_64
@siebenmann siebenmann added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Apr 5, 2021
behlendorf added a commit to behlendorf/zfs that referenced this issue Apr 6, 2021
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 <behlendorf1@llnl.gov>
Closes openzfs#11844
@behlendorf
Copy link
Contributor

@siebenmann thanks for catching this again. I've opened #11847 to obsolete the old packages.

there are conflicts between libzfs5 and libzfs4 may be a sign that some shared libraries have not had their versions increased when they should have.

The conflicting libraries didn't need a version bump in this case since they were unchanged. However, I do think this points out a possible issue in the packaging since the libzfs5 package includes more than just that one library.

@behlendorf behlendorf added Component: Packaging custom packages and removed Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Apr 6, 2021
behlendorf added a commit to behlendorf/zfs that referenced this issue Apr 6, 2021
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 <behlendorf1@llnl.gov>
Closes openzfs#11844
behlendorf added a commit that referenced this issue Apr 7, 2021
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 <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11844
Closes #11847
mcmilk pushed a commit to mcmilk/zfs that referenced this issue Apr 10, 2021
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 <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844
Closes openzfs#11847
adamdmoss pushed a commit to adamdmoss/zfs that referenced this issue Apr 10, 2021
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 <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844
Closes openzfs#11847
mcmilk pushed a commit to mcmilk/zfs that referenced this issue Apr 10, 2021
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 <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844
Closes openzfs#11847
@siebenmann
Copy link
Contributor Author

Unfortunately it looks like at least one RPM was missed, libzfs5-devel, which needs to obsolete libzfs4-devel (I didn't notice this immediately because I don't have the -devel package installed on all of my machines).

@behlendorf
Copy link
Contributor

behlendorf commented Apr 13, 2021

Thanks I'll open a PR for it. Sorry I'm not sure how I overlooked that
.

@siebenmann
Copy link
Contributor Author

I think it's just hard to remember. Perhaps a comment block in the zfs.spec.in is called for, with a 'do this if you're increasing the .so version'. There will be future times and people's memories for infrequent procedures are always imperfect.

(And I missed the -devel package myself when I was looking at the zfs.spec.in for the first bug report.)

behlendorf added a commit to behlendorf/zfs that referenced this issue Apr 13, 2021
Follow up to d5ef91a which adds a missing 'obsoletes' for the
libzfs-devel package.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#11844
behlendorf added a commit to behlendorf/zfs that referenced this issue Apr 13, 2021
Follow up to d5ef91a 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.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue openzfs#11844
@behlendorf
Copy link
Contributor

Good idea, I've opened #11895 which adds the missing obsoletes and a comment.

behlendorf added a commit that referenced this issue Apr 13, 2021
Follow up to d5ef91a 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 <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11844 
Closes #11895
behlendorf added a commit to behlendorf/zfs that referenced this issue Apr 14, 2021
Follow up to d5ef91a 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 <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844 
Closes openzfs#11895
mcmilk pushed a commit to mcmilk/zfs that referenced this issue Apr 15, 2021
Follow up to d5ef91a 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 <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844 
Closes openzfs#11895
sempervictus pushed a commit to sempervictus/zfs that referenced this issue May 31, 2021
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 <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844
Closes openzfs#11847
sempervictus pushed a commit to sempervictus/zfs that referenced this issue May 31, 2021
Follow up to d5ef91a 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 <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#11844 
Closes openzfs#11895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Packaging custom packages
Projects
None yet
Development

No branches or pull requests

2 participants