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

qbittorrent: 4.1.0 -> 4.1.1 #41252

Merged
merged 6 commits into from Jun 1, 2018
Merged

Conversation

Anton-Latukha
Copy link
Contributor

@Anton-Latukha Anton-Latukha commented May 30, 2018

Motivation for this change
  • qBittorrent 4.1.0 -> 4.1.1
  • SourceForge -> GitHub (development moved to GH long ago)
  • Updated description
  • Clean-up
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Anton-Latukha Anton-Latukha changed the title qbittorrent: 4.1.0 -> 4.1.1 [WIP] qbittorrent: 4.1.0 -> 4.1.1 May 30, 2018
@Anton-Latukha Anton-Latukha changed the title [WIP] qbittorrent: 4.1.0 -> 4.1.1 qbittorrent: 4.1.0 -> 4.1.1 May 30, 2018
@Anton-Latukha
Copy link
Contributor Author

Something in upstream broke bot evaluation for all new PRs.

@orivej
Copy link
Contributor

orivej commented May 30, 2018

@GrahamcOfBorg build qbittorrent

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: qbittorrent

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1
shrinking /nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1/bin/qbittorrent
gzipping man pages under /nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1/share/man/
strip is /nix/store/92d2ifxcni4n3zx9s8wnkcjlvnx5ajlc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1/bin
patching script interpreter paths in /nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1
checking for references to /build in /nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1...
postPatchMkspecs
/nix/store/0wpx62wfs6ih1gm5bajkym6gc53r4aqx-qbittorrent-4.1.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: qbittorrent

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1
shrinking /nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1/bin/qbittorrent
gzipping man pages under /nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1/share/man/
strip is /nix/store/8yfik687kfccisxnad42j19lfb7ij9b4-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1/bin
patching script interpreter paths in /nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1
checking for references to /build in /nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1...
postPatchMkspecs
/nix/store/awxq7y2krci5jzkwlhmzxcy5qnx0yy9h-qbittorrent-4.1.1

buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
++ optional guiSupport dbus_libs;
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg
(if guiSupport then [ dbus_libs ] else [ ]) # D(esktop)-Bus depends on GUI support
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't nest arrays in buildInputs. The old buildInputs are correct (and with stdenv.lib at the top is ok; alternatively you can add lib argument and write lib.optional).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I included what previously was list concatenation into list.
Fixing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since optional in the source code is

{
  optionals = cond: elems: if cond then elems else [];
}

I prefer to use if then else for uniformal look, when there are already if then else needed in the code.

, boost, libtorrentRasterbar, qtbase, qttools, qtsvg
, debugSupport ? false # Debugging
, guiSupport ? true, dbus_libs ? null # GUI (disable to run headless)
, webuiSupport ? true # WebUI
}:

assert guiSupport -> (dbus_libs != null);
Copy link
Contributor

Choose a reason for hiding this comment

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

If you remove this assertion, you should also make dbus_libs non-optional above; and please rename them to dbus.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. No way to avoid assertion here.

Reverted.

rev = "release-${version}";
owner = "qbittorrent";
repo = "qbittorrent";
sha256 = "09bf1jr2sfdps8cb154gjw7zhdcpsamhnfbgacdmkfyd7qgcbykf";
Copy link
Contributor

Choose a reason for hiding this comment

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

The usual and expected order is owner, repo, rev, sha256.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@orivej orivej requested a review from viric May 30, 2018 21:01
@Anton-Latukha Anton-Latukha force-pushed the qbittorrent-4.11 branch 2 times, most recently from 4fda877 to fc373fa Compare May 30, 2018 21:35
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
++ optional guiSupport dbus_libs;
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg
(if guiSupport then dbus else [] ) # D(esktop)-Bus depends on GUI support
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still a nested array. The package may build like this, but such anomalies do cause issues, e.g. cross compilation support expects that all elements of buildInputs are derivations (and [] is not).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I thought "[]" evaluates to something primitive.
Worth a try 8)

homepage = https://www.qbittorrent.org/;
license = licenses.gpl2;
platforms = platforms.linux;
platforms = with platforms; unix;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not extend the list of supported platforms without testing that they are actually supported, otherwise we will likely just burden macOS Hydra builders with an always broken build. I have asked GrahamcOfBorg to build this for Mac too; if it does not report success and no one else confirms that this builds on Darwin, the platforms should be restricted back to Linux.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is why I do it so.
I also do not have Darwin. So ask bot to build.

Probably should look to run macOS on QEMU for testing.

Copy link
Contributor

Choose a reason for hiding this comment

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

The bot has attempted to build qbittorrent on Darwin and it did not succeed: #41252 (comment), https://logs.nix.ci/?key=nixos/nixpkgs.41252&attempt_id=ca7f7512-a616-42ca-bb60-f50432dc9303 . Supporting Darwin requires additional work, and it is out of scope of this PR.

@Anton-Latukha
Copy link
Contributor Author

Please make GrahamcOfBorg build for Darwin, if it successful - we would leave unix platform.

buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
++ optional guiSupport dbus_libs;
buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg
] ++ (if guiSupport then [ dbus ] else []); # D(esktop)-Bus depends on GUI support
Copy link
Contributor

Choose a reason for hiding this comment

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

This evaluates correctly.

The comment should be the other way around, "GUI support depends on dbus", but assert guiSupport -> (dbus != null); above says exactly this, so the comment is redundant.

Please understand that the old version,

buildInputs = [ boost libtorrentRasterbar qtbase qttools qtsvg ]
  ++ optional guiSupport dbus;

is the most usual in Nixpkgs and it is more readable once you get accustomed. You may like the new version more now, but you will probably prefer the old version in the future, and in such cases as this essentially everyone writes optional. The way you've made configureFlags consistent is fine (although going in the other direction with optionals (!guiSupport) [ "--disable-gui --enable-systemd" ] ++ optional (!webuiSupport) "--disable-webui" is more conventional; this is a good example: https://github.com/NixOS/nixpkgs/blob/18.03/pkgs/applications/networking/mailreaders/claws-mail/default.nix#L69), but the old buildInputs are perfect and can not be improved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. D-Bus features is additional option to the GUI build.
There are --disable-qt-dbus for Autotools and DBUS={ON,OFF} option for CMake, and that only for GUI build.

About optionals I agree.

@orivej
Copy link
Contributor

orivej commented May 30, 2018

I suppose it is in the process of building, but just in case:
@GrahamcOfBorg build qbittorrent

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: qbittorrent

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1
shrinking /nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1/bin/qbittorrent
gzipping man pages under /nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1/share/man/
strip is /nix/store/92d2ifxcni4n3zx9s8wnkcjlvnx5ajlc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1/bin
patching script interpreter paths in /nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1
checking for references to /build in /nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1...
postPatchMkspecs
/nix/store/b2rqg320hdblzb1jc6fxmlpg7v8vinsj-qbittorrent-4.1.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: qbittorrent

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1
shrinking /nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1/bin/qbittorrent
gzipping man pages under /nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1/share/man/
strip is /nix/store/8yfik687kfccisxnad42j19lfb7ij9b4-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1/bin
patching script interpreter paths in /nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1
checking for references to /build in /nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1...
postPatchMkspecs
/nix/store/64kgdm1hl0p8c87pv13r8s39dps8brwb-qbittorrent-4.1.1

@Anton-Latukha Anton-Latukha force-pushed the qbittorrent-4.11 branch 2 times, most recently from 3f7ccd4 to 7f5edc7 Compare May 31, 2018 00:45
@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: qbittorrent

Partial log (click to expand)

checking pkg-config is at least version 0.23... yes
checking whether to enable the Debug build... no
checking whether to enable the stacktrace feature... yes
checking whether to enable the GUI... yes
checking whether to install the systemd service file... no
checking whether to enable the WebUI... yes
checking for Qt5 qmake >= 5.5.1... not found
configure: error: Could not find qmake
builder for '/nix/store/2f4cfh2gsrdr3nrly5ijsjk045nj3xsg-qbittorrent-4.1.1.drv' failed with exit code 1
error: build of '/nix/store/2f4cfh2gsrdr3nrly5ijsjk045nj3xsg-qbittorrent-4.1.1.drv' failed

Copy link
Contributor

@orivej orivej left a comment

Choose a reason for hiding this comment

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

Thank you! This is almost ready.


# Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
# HACK: 2018-05-31: Otherwise qm_gen.pri assumes lrelease-qt5, which does not exist.
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this is not a hack, since this is how we are supposed to configure the path to lrelease: qbittorrent/qBittorrent@f4dc5c6

homepage = https://www.qbittorrent.org/;
license = licenses.gpl2;
platforms = platforms.linux;
platforms = with platforms; unix;
Copy link
Contributor

Choose a reason for hiding this comment

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

The bot has attempted to build qbittorrent on Darwin and it did not succeed: #41252 (comment), https://logs.nix.ci/?key=nixos/nixpkgs.41252&attempt_id=ca7f7512-a616-42ca-bb60-f50432dc9303 . Supporting Darwin requires additional work, and it is out of scope of this PR.

(if webuiSupport then "" else "--disable-webui")
] ++ optional debugSupport "--enable-debug";
"--with-boost=${boost.dev}" ]
++ optional (!guiSupport) "--disable-gui --enable-systemd" # Also place qbittorrent-nox systemd service files
Copy link
Contributor

Choose a reason for hiding this comment

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

@orivej
Copy link
Contributor

orivej commented May 31, 2018

@Anton-Latukha Would you add yourself to the maintainers of qbittorrent?

@Anton-Latukha
Copy link
Contributor Author

@orivej Thank you.
All - done.

@xeji
Copy link
Contributor

xeji commented May 31, 2018

@GrahamcOfBorg build qbittorrent

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: qbittorrent

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: qbittorrent

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1
shrinking /nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1/bin/qbittorrent
gzipping man pages under /nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1/share/man/
strip is /nix/store/92d2ifxcni4n3zx9s8wnkcjlvnx5ajlc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1/bin
patching script interpreter paths in /nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1
checking for references to /build in /nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1...
postPatchMkspecs
/nix/store/s65mrynh9mlp0wqgxr8clq7px2si5fif-qbittorrent-4.1.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: qbittorrent

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1
shrinking /nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1/bin/qbittorrent
gzipping man pages under /nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1/share/man/
strip is /nix/store/8yfik687kfccisxnad42j19lfb7ij9b4-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1/bin
patching script interpreter paths in /nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1
checking for references to /build in /nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1...
postPatchMkspecs
/nix/store/dywlskjx3rfqr03iffcia7mgn52lc14a-qbittorrent-4.1.1

@orivej orivej merged commit c97fcb4 into NixOS:master Jun 1, 2018
@Anton-Latukha Anton-Latukha deleted the qbittorrent-4.11 branch June 1, 2018 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants