Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579126 - x11-misc/xkeyboard-config-2.17: remove unused X11 dependency
Summary: x11-misc/xkeyboard-config-2.17: remove unused X11 dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Matt Turner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 611056
  Show dependency tree
 
Reported: 2016-04-06 02:31 UTC by cl91tp
Modified: 2017-03-04 07:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for xkeyboard-config-2.17 without libX11 dependency (xkeyboard-config-2.17.ebuild,1.14 KB, text/plain)
2016-04-06 02:31 UTC, cl91tp
Details
patch file for removing X11 dependency from xkeyboard-config-2.17 (remove-X11-dependency-xkeyboard-config.patch,395 bytes, patch)
2016-04-06 02:32 UTC, cl91tp
Details | Diff
Patch for removing X11 dependencies from xkeyboard-config (remove-X11-dependency-xkeyboard-config.patch,445 bytes, patch)
2016-04-07 06:12 UTC, cl91tp
Details | Diff
resulting ebuild (xkeyboard-config-2.17.ebuild,1.12 KB, text/plain)
2016-04-07 06:12 UTC, cl91tp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cl91tp 2016-04-06 02:31:18 UTC
Created attachment 429728 [details]
ebuild for xkeyboard-config-2.17 without libX11 dependency

x11-misc/xkeyboard-config-2.17 does not actually depend on libX11. We should remove it in the ebuild.

The attached patch is tested on a libX11-free system with weston as the display server.
Comment 1 cl91tp 2016-04-06 02:32:00 UTC
Created attachment 429730 [details, diff]
patch file for removing X11 dependency from xkeyboard-config-2.17
Comment 2 Felix Janda 2016-04-06 06:39:41 UTC
The upstream configure.ac contains the comment

# xkeyboard-config does not have build-time dependencies. However, it does
# have run-time dependencies and keyboard layouts may not work without the
# right libX11 or xproto installed.
# By default, we enable these run-time dependencies as build-time
# dependencies so that those building on their local machines are warned
# that the resulting build may not work.

and later (conditionally) checks for >=libxproto-7.0.20 and >=libx11-1.4.3.

Is wayland/weston a substitute for these runtime dependencies?
Comment 3 cl91tp 2016-04-07 06:09:49 UTC
We already set --disable-runtime-deps in the gentoo-stock ebuild when building xkeyboard-config. So we are not checking these run-time dependencies as build dependencies, as opposed to what upstream configure.ac said.

Anyway, Weston only use xkeyboard-config for the (static) xkb definition files, and does not require any runtime dependencies at all (for xkeyboard-config). Only 

If a system does not have libX11 and friends installed, then it surely cannot have an xserver, and in this case it would be fairly safe to assume that it is either a headless server or an X11-free system (for instance, a Wayland-only system), in which case I believe it is safe to not having these dependencies.
Comment 4 cl91tp 2016-04-07 06:12:10 UTC
Created attachment 429808 [details, diff]
Patch for removing X11 dependencies from xkeyboard-config

Also I forgot to remove xproto from the original patch. This one is the corrected one.
Comment 5 cl91tp 2016-04-07 06:12:47 UTC
Created attachment 429810 [details]
resulting ebuild
Comment 6 Felix Janda 2016-04-07 06:45:04 UTC
The point of checking the runtime dependencies is that on systems using
X with older versions of libX11 and xproto the keymaps/rules won't work.
So we want to ensure that libX11 and xproto are of high enough version
when X is used. On the other hand, all versions in the tree are
sufficient for that.
Comment 7 cl91tp 2016-04-08 07:48:14 UTC
Maybe add USE flag X?
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2016-04-09 13:45:42 UTC
It might work to block older versions that are incompatible.
Comment 9 Matt Turner gentoo-dev 2017-03-04 07:04:59 UTC
(In reply to Chí-Thanh Christopher Nguyễn from comment #8)
> It might work to block older versions that are incompatible.

Which you did in

commit e66751674fba6abf1926db5a1fec6e75cdb8b2fe
Author: Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
Date:   Sat Jun 4 11:41:47 2016 +0200

    x11-misc/xkeyboard-config: Version bump
    
    Also block incompatible libX11 and xkbcomp instead of depending on them.

so all that's left is the dependency on xproto. configure.ac lumps xproto in with libX11 in that it's required at runtime to have such-and-such version, but it doesn't actually have a build-time dependence on it. That seems impossible for a package like xproto, which is nothing but headers.

Fixed by

commit ab0bede71310a0a6a691b540758ffe5d9b757935
Author: Matt Turner <mattst88@gentoo.org>
Date:   Fri Mar 3 22:59:47 2017 -0800

    x11-misc/xkeyboard-config: Drop dependence on xproto.