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

xvfb-run: clean up and update package #74499

Closed
wants to merge 5 commits into from

Conversation

B4dM4n
Copy link
Contributor

@B4dM4n B4dM4n commented Nov 28, 2019

Motivation for this change

#72906

Things done

In addition to updating the package I also renamed it from xvfb_run to xvfb-run and added a backwards compatible alias, as xvfb_run is not an intuitive package name to install when trying to run the xvfb-run script.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nix-review --run "nix-review wip"
nix-review result
builder for '/nix/store/5807p8q8islcjxvk7nqziw0frld2pjv4-ping-0.6.0.drv' failed with exit code 1; last 10 log lines:
                    if(tempDataList.contains(variableName)){
                       ^^^^^^^^^^^^
../src/Application.vala:868.25-868.36: error: The name `tempDataList' does not exist in the context of `PingApp.setupSignals._lambda34_'
                        tempDataList[variableName] = new_text;
                        ^^^^^^^^^^^^
../src/Application.vala:869.67-869.78: error: The name `tempDataList' does not exist in the context of `PingApp.setupSignals._lambda34_'
                        testObjs[id].data = Soup.Form.encode_hash(tempDataList);
                                                                  ^^^^^^^^^^^^
Compilation failed: 36 error(s), 8 warning(s)
ninja: build stopped: subcommand failed.
cannot build derivation '/nix/store/m141iwy3anw90ygsrp243kva1xlljkbp-env.drv': 1 dependencies couldn't be built
[1 built (1 failed)]
error: build of '/nix/store/m141iwy3anw90ygsrp243kva1xlljkbp-env.drv' failed
1 package failed to build:
ping

102 package were built:
adapta-gtk-theme almanah amtk autokey balsa calls chrome-gnome-shell contrast coq_8_10 denemo empathy ephemeral epiphany flent fractal gImageReader gajim girara gitg glom gnome-builder gnome-latex gnome-photos gnome-podcasts gnome-usage gnome3.anjuta gnome3.cheese gnome3.devhelp gnome3.geary gnome3.gedit gnome3.gnome-calculator gnome3.gnome-calendar gnome3.gnome-contacts gnome3.gnome-control-center gnome3.gnome-music gnome3.gnome-session gnome3.gnome-shell gnome3.gnome-terminal gnome3.gnome-tweak-tool gnome3.gpaste gnome3.gtksourceview gnome3.gtksourceview4 gnome3.gtksourceviewmm gnome3.libdazzle gnome3.meld gnome3.mutter gnome3.nemiver gnome3.pomodoro gnome3.sushi gnome3.totem gnomeExtensions.gsconnect gobby5 gscan2pdf gtkd gtkpod gtksourceviewmm4 gtranslator gupnptools i3 i3-gaps i3-layout-manager i3-wk-switch jucipp kmymoney libhandy lutris lutris-free mate.mate-applets mate.pluma nasc notejot notes-up ocamlPackages.lablgtk3-sourceview3 pantheon.elementary-code pantheon.elementary-gsettings-schemas pantheon.elementary-onboarding pantheon.elementary-session-settings pantheon.notes-up paperwork polybarFull pspp python27Packages.cartopy python27Packages.i3ipc python27Packages.py3status python37Packages.dogtail python37Packages.i3ipc python37Packages.py3status python38Packages.dogtail python38Packages.i3ipc python38Packages.py3status pytrainer quilter rednotebook sequeler sysprof tepl tilix virtmanager xfce.mousepad xpad xvfb-run zathura
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after) (210.2M -> 210.1M)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @davidak

@worldofpeace
Copy link
Contributor

Hmm, I'm not sure why this is in my memory, but I thought that xvfb-run actually came from an arch linux developer.

@B4dM4n
Copy link
Contributor Author

B4dM4n commented Nov 28, 2019

It looks like the first release is in Debian was in 2006 (commit). Arch Linux included the same version in 2009 via c9f8fec3 (related issue) from Debian.

The current version in Arch Linux comes from The T2 SDE Project which is also the current source for this package.
Debian still maintains its own version (history) actively.

Functionally should be still equivalent, but the Debian version uses a more reliable cleanup function and has an improved startup speed.

I just noticed that the Debian version uses a different license (MIT) which needs to be changed.

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

Looks good.

Only the description could be improved i think.

See what others are using: https://repology.org/project/xvfb-run/information

Thanks for your contribution!

inherit (src.meta) homepage;
license = licenses.gpl2;
description = "A wrapper for the Xvfb command which simplifies the task of running commands";
homepage = src.meta.homepage + "debian/local";
Copy link
Member

Choose a reason for hiding this comment

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

It's good to be able to just read the URL there...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw the usage of inherit (src.meta) homepage; in some packages lately and I liked the style.

In this case, the homepage line gets noticeably shorter, from 107 (when using the full path to debian/local) to 74 characters.

    homepage = "https://salsa.debian.org/xorg-team/xserver/xorg-server/tree/debian-unstable/debian/local";

vs

    homepage = src.meta.homepage +  "/tree/debian-unstable/debian/local";

(current version is incomplete, will be fixed)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. Personally, I am not a fan of src.meta.homepage either. I frequently click on meta.homepage URL when reviewing PRs and this prevents this use case without evaluation the expression.

@B4dM4n
Copy link
Contributor Author

B4dM4n commented Nov 28, 2019

Only the description could be improved i think.

Good point, I updated the meta values to match the information found on repology.

I also updated the source revision to use the Debian release tag. This gives the version number a better meaning and makes it more relatable to the used commit.

'';

meta = with stdenv.lib; {
description = "A wrapper for the Xvfb command which simplifies the task of running commands";
homepage = src.meta.homepage + "debian/local";
license = licenses.mit;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where did you find this? Are you sure that is not just a license of Xorg? The manpage contains gpl2Plus.

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 the repository is a fork of the Xorg tree and the script itself has no license notice, it is distributed under the Xorg license, right?

The Xorg license is a slight variant of the common MIT license form.

The xorg.xorgserver package currently has no license (see https://nixos.org/nixos/packages.html?attr=xorg.xorgserver&channel=nixos-19.09) but the xwayland package build from the same source is declared a licenses.mit (see https://nixos.org/nixos/packages.html?attr=xwayland&channel=nixos-19.09), so I thought licenses.mit would be correct.

I didn't notice the GPL license in the manpage.

Which license is the correct one now?

Copy link
Member

Choose a reason for hiding this comment

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

Since the script itself has no license information, the general license for the repo applies.

https://salsa.debian.org/xorg-team/xserver/xorg-server/blob/debian-unstable/COPYING

But the manpage is GPL ;)

Which seems messed up and unintended... maybe open an issue upstream to clearify.

@jtojnar
Copy link
Contributor

jtojnar commented Nov 28, 2019

Hmm, the T2 version seems to have introduced an --auto-display flag.

It would be nice if we managaed to upstream the script into xorg itself.

@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@davidak
Copy link
Member

davidak commented Jun 1, 2020

can we get this merged?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@stale
Copy link

stale bot commented Jun 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 7, 2021
@Artturin Artturin closed this May 17, 2022
@B4dM4n B4dM4n deleted the xvfb-run-cleanup branch March 22, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: python 8.has: clean-up 8.has: package (new) 10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants