www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Pulling Xorg dependencies on headless machine

reply "nazriel" <spam dzfl.pl> writes:
What are the rationales for pulling in Xorg dependencies on 
headless machines like web server?

I am installing DMD on Debian machine from D-APT but I guess 
installing from dlang.org dpkg would result in the same behaviour.

Packages like noveau, readeon, intel drivers and other Xorg 
utilis are not very useful in such scenario.

Any way to fix it?
Jul 27 2013
next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sun, Jul 28, 2013 at 12:27:20AM +0200, nazriel wrote:
 What are the rationales for pulling in Xorg dependencies on headless
 machines like web server?
 
 I am installing DMD on Debian machine from D-APT but I guess
 installing from dlang.org dpkg would result in the same behaviour.
 
 Packages like noveau, readeon, intel drivers and other Xorg utilis
 are not very useful in such scenario.
 
 Any way to fix it?

That depends on whether the DMD packages explicitly depend on X11 stuff. If not, you might want to try 'apt-get install --no-install-recommends', to see if you can evade X11 stuff, since most likely, some package somewhere in the dependency chain recommends core X11 packages, which will in turn pull in a whole bunch of other stuff. If there *is* some X11 dependency somewhere, you can probably get away with installing only x11-common just to satisfy dynamic library requirements, and then use --no-install-recommends to evade having to pull in a full Xorg server installation. Basically x11-common pulls in some libraries that you may need for dynamic linking to work on some program linked against X11 libraries, but it won't give you a functional X11 installation so you can't actually use any X11 functionality. If all else fails, there's always dpkg --force-depends, but I wouldn't do that unless you *absolutely* can't get things to work otherwise. T -- People say I'm arrogant, and so I am!!
Jul 27 2013
prev sibling next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
I don't know much about debian, but dmd itself doesn't need X, 
nor should phobos. I compile and run D programs on headless web 
servers every day.

If you can't ignore the dependencies with the apt, downloading 
the dmd zip file should be just about as easy and it doesn't pull 
anything else with it.
Jul 27 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Saturday, 27 July 2013 at 23:46:34 UTC, Adam D. Ruppe wrote:
 I don't know much about debian, but dmd itself doesn't need X, 
 nor should phobos. I compile and run D programs on headless web 
 servers every day.

 If you can't ignore the dependencies with the apt, downloading 
 the dmd zip file should be just about as easy and it doesn't 
 pull anything else with it.

I am afraid that DMD is the one pulling in X stuff. I suspect it may be because of -man switch. That would explain why dmd wants xdg-open on Debian. Yeah, I am familiar with building dmd from git/using packages by Walter. I am just thrilled that package for debian, which is quite frequently used as a base for headless servers requires Xorg deps. The "Any way to fix it?" is more about doing something about this dependency, not guiding me how to make workarounds. But still thank you H. S. Teoh and Adam for your feedback! I need to make myself more clear next time hehe
Jul 27 2013
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sun, Jul 28, 2013 at 01:46:31AM +0200, Adam D. Ruppe wrote:
 I don't know much about debian, but dmd itself doesn't need X, nor
 should phobos. I compile and run D programs on headless web servers
 every day.
 
 If you can't ignore the dependencies with the apt, downloading the
 dmd zip file should be just about as easy and it doesn't pull
 anything else with it.

OK, I just checked the .deb from dlang.org. It has a dependency on xdg-utils, which Recommends: x11-utils and x11-server-utils. That's the culprit; installing x11-utils and x11-server-utils will pull in a truckload of X11 stuff. Running apt-get with --no-install-recommends should avoid the problem. On that note, though, why on earth are we depending on xdg-utils? The package description says: xdg-utils contains utilities for integrating applications with the desktop environment, regardless of which desktop environment is used. They are part of freedesktop.org's Portland project. Why does DMD need desktop integration?? At most, xdg-utils should be a Recommends:, if not outright removed from the dependency list. It doesn't belong in Depends:, for sure. T -- Guns don't kill people. Bullets do.
Jul 27 2013
prev sibling next sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sun, Jul 28, 2013 at 02:03:47AM +0200, nazriel wrote:
[...]
 I am afraid that DMD is the one pulling in X stuff.
 
 I suspect it may be because of -man switch. That would explain why
 dmd wants xdg-open on Debian.

Gah. I say the .deb should just Recommends: xdg-utils, not Depends:. As far as compiling D code is concerned, dmd works just fine without ever using the -man option. Having xdg-open installed is a *recommendation*, not a requirement for compiling D code! As for what to do with this dependency, just use apt-get --no-install-recommends. :) T -- Creativity is not an excuse for sloppiness.
Jul 27 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Sunday, 28 July 2013 at 00:09:04 UTC, H. S. Teoh wrote:
 On Sun, Jul 28, 2013 at 02:03:47AM +0200, nazriel wrote:
 [...]
 I am afraid that DMD is the one pulling in X stuff.
 
 I suspect it may be because of -man switch. That would explain 
 why
 dmd wants xdg-open on Debian.

Gah. I say the .deb should just Recommends: xdg-utils, not Depends:. As far as compiling D code is concerned, dmd works just fine without ever using the -man option. Having xdg-open installed is a *recommendation*, not a requirement for compiling D code! As for what to do with this dependency, just use apt-get --no-install-recommends. :) T

Will you do the honors for D-Programming-Language/installers or should I? Or maybe we should wait for others opinion on that? Tho it is no-brainer.
Jul 27 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Sunday, 28 July 2013 at 00:16:54 UTC, nazriel wrote:
 On Sunday, 28 July 2013 at 00:09:04 UTC, H. S. Teoh wrote:
 On Sun, Jul 28, 2013 at 02:03:47AM +0200, nazriel wrote:
 [...]
 I am afraid that DMD is the one pulling in X stuff.
 
 I suspect it may be because of -man switch. That would 
 explain why
 dmd wants xdg-open on Debian.

Gah. I say the .deb should just Recommends: xdg-utils, not Depends:. As far as compiling D code is concerned, dmd works just fine without ever using the -man option. Having xdg-open installed is a *recommendation*, not a requirement for compiling D code! As for what to do with this dependency, just use apt-get --no-install-recommends. :) T

Will you do the honors for D-Programming-Language/installers or should I? Or maybe we should wait for others opinion on that? Tho it is no-brainer.

Err its installer not installers, pardon. https://github.com/D-Programming-Language/installer/blob/master/linux/dmd_deb.sh#L269
Jul 27 2013
prev sibling next sibling parent "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Sunday, 28 July 2013 at 00:06:32 UTC, H. S. Teoh wrote:
 On that note, though, why on earth are we depending on 
 xdg-utils?

For xdg-open, which is used in std.process.browse, and the dman utility.
Jul 27 2013
prev sibling parent Jordi Sayol <g.sayol yahoo.es> writes:
On 28/07/13 02:04, H. S. Teoh wrote:
 On Sun, Jul 28, 2013 at 01:46:31AM +0200, Adam D. Ruppe wrote:
 I don't know much about debian, but dmd itself doesn't need X, nor
 should phobos. I compile and run D programs on headless web servers
 every day.

 If you can't ignore the dependencies with the apt, downloading the
 dmd zip file should be just about as easy and it doesn't pull
 anything else with it.

OK, I just checked the .deb from dlang.org. It has a dependency on xdg-utils, which Recommends: x11-utils and x11-server-utils. That's the culprit; installing x11-utils and x11-server-utils will pull in a truckload of X11 stuff. Running apt-get with --no-install-recommends should avoid the problem. On that note, though, why on earth are we depending on xdg-utils? The package description says: xdg-utils contains utilities for integrating applications with the desktop environment, regardless of which desktop environment is used. They are part of freedesktop.org's Portland project. Why does DMD need desktop integration?? At most, xdg-utils should be a Recommends:, if not outright removed from the dependency list. It doesn't belong in Depends:, for sure.

As Vladimir Panteleev said, dman utility needs xdg-utils installed to run. I think that moving xdg-utils from Depends: to Recommends: will worsen the problem. xdg-utils has not Depends: packages, only Recommends: and Suggests: Recommends: libfile-mimeinfo-perl, libnet-dbus-perl, libx11-protocol-perl, x11-utils, x11-xserver-utils Suggests: gvfs-bin So, if we move xdg-utils to Recommends:, and the system is set to install the Recommends: packages, the behavior will not change at all, but in a system that is not set to install Recommends: packages, dman should not work. Regards, -- Jordi Sayol
Jul 27 2013