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

install path fixes #9087

Merged
merged 2 commits into from
Jul 30, 2019
Merged

Conversation

c0d3z3r0
Copy link
Contributor

@c0d3z3r0 c0d3z3r0 commented Jul 28, 2019

Motivation and Context

This PR fixes some install paths.

Description

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. Installing it elsewhere wouldn't even work since
mkinitramfs does only honor /etc/initramfs-tools and /usr/share/initramfs-tools.
Simply use /usr/share/initramfs-tools as path.

How Has This Been Tested?

Tested locally with different configurations.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

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.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
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.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
@c0d3z3r0 c0d3z3r0 changed the title For upstream/install path fixes install path fixes Jul 28, 2019
@codecov
Copy link

codecov bot commented Jul 29, 2019

Codecov Report

Merging #9087 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9087      +/-   ##
==========================================
- Coverage   79.04%      79%   -0.04%     
==========================================
  Files         401      400       -1     
  Lines      121648   121640       -8     
==========================================
- Hits        96154    96100      -54     
- Misses      25494    25540      +46
Flag Coverage Δ
#kernel 79.68% <ø> (+0.02%) ⬆️
#user 66.73% <ø> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 693c1fc...2c7843e. Read the comment docs.

@c0d3z3r0
Copy link
Contributor Author

That one failing test does not seem to be related to my changes:

ln: failed to create symbolic link '/var/lib/buildbot/slaves/zfs/Fedora_30_x86_64__TEST_/build/tests/full.log': File exists
+ zfs-tests.sh -vx -d /mnt/ -r linux -I 1 -T functional
+ RESULT=1
+ set +x
tar: zts-linux-20190729T071953/core: Cannot open: Permission denied
tar: Exiting with failure status due to previous errors

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all makes sense, and I agree the Fedora build failure was unrelated.

contrib/initramfs/Makefile.am Show resolved Hide resolved
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jul 29, 2019
Copy link
Member

@rlaager rlaager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jul 30, 2019
@ahrens ahrens merged commit a6c8289 into openzfs:master Jul 30, 2019
@c0d3z3r0 c0d3z3r0 deleted the for-upstream/install_path_fixes branch July 31, 2019 18:12
allanjude pushed a commit to allanjude/zfs that referenced this pull request Aug 12, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Aug 13, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Aug 21, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Aug 22, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Aug 23, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
@grahamc
Copy link
Contributor

grahamc commented Sep 21, 2019

It seems this has broken the NixOS build (#9161 (comment)) I wonder why not go for $datadir?

@c0d3z3r0
Copy link
Contributor Author

@grahamc what exactly do you mean by „break“? See description for why I changed this

@Mic92
Copy link
Contributor

Mic92 commented Sep 22, 2019

@c0d3z3r0 we don't install software to /usr in NixOS instead we install all software into /nix/store/<sha256sum>-zfs-<version> so we can achieve our design goals: https://nixos.org/nix/

@c0d3z3r0
Copy link
Contributor Author

@Mic92 ah, thank you! Ok, then it‘s a packaging problem on Nix side pretty sure

@rlaager
Copy link
Member

rlaager commented Sep 22, 2019

Nix is a package manager so it is not using the RPM spec file, correct? So the issue is the other part, the change from $datarootdir to /usr/share for initramfs-tools? If so, what path is NixOS using for initramfs-tools today?

@c0d3z3r0
Copy link
Contributor Author

Oh wait, I was a bit to fast... yes, this is a ZFS issue as the path is hard coded now... oops...

@c0d3z3r0
Copy link
Contributor Author

@Mic92 @rlaager @grahamc #9344

@Mic92
Copy link
Contributor

Mic92 commented Sep 22, 2019

@rlaager we do not have this package. However if we would want to initramfs-tools to find this directory, we would either zfs add to our system packages, which would add symlinks for this directory to /run/current-system/sw/share or we would introduce some sort of shell wrapper. RPM spec file is not used in NixOS.

@Mic92 Mic92 mentioned this pull request Sep 22, 2019
12 tasks
allanjude pushed a commit to allanjude/zfs that referenced this pull request Oct 13, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes openzfs#9087
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
* 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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Closes #9087
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants