"make install" in the Xorg trunk does not create the startup links for /etc/init.d/xprint in the single runlevel dirs, e.g. /etc/init.d/rc3.d/ etc. Two problems: 1. The installation procedure dramatically differs between the single Linux and Unix versions 2. Some official tools like the LSB /usr/lib/lsb/install_initd seem to have no way to specify an alternative "root" dir, e.g. installing into a temporary localtion using "make install DESTDIR=/tmp/xptestinstall002" does not work... ;-( Right now the xprint.spec for RPM uses the following sequence to create the neccesary links: -- snip -- %post if [ -x /usr/lib/lsb/install_initd ] ; then # (hopefully) LSB-compliant distribution /usr/lib/lsb/install_initd /etc/init.d/xprint else if [ -f /etc/redhat-release ] ; then if [ $1 = 1 ]; then /sbin/chkconfig --add xprint fi else # SuSE(-like) ? if [ -d /etc/rc.d/rc2.d/ ] ; then echo "# Detected SuSE(-like) distribution" echo "# Creating links..." ln -sf ../xprint /etc/rc.d/rc2.d/K21xprint ln -sf ../xprint /etc/rc.d/rc2.d/S21xprint ln -sf ../xprint /etc/rc.d/rc3.d/K21xprint ln -sf ../xprint /etc/rc.d/rc3.d/S21xprint # Older SuSE versions (like SuSE 6.4) do not have /etc/init.d/ if [ ! -f /etc/rc.d/xprint ] ; then echo "# Creating old SuSE compatibility link..." ln -s /etc/init.d/xprint /etc/rc.d/xprint fi else # RedHat(-like) ? if [ -d "/etc/rc1.d" -a -d "/etc/init.d/" ] ; then echo "# Detected RedHat(-like) distribution" echo "# Creating links..." ln -sf /etc/init.d/xprint /etc/rc.d/rc0.d/K61xprint ln -sf /etc/init.d/xprint /etc/rc.d/rc1.d/K61xprint ln -sf /etc/init.d/xprint /etc/rc.d/rc2.d/S61xprint ln -sf /etc/init.d/xprint /etc/rc.d/rc3.d/S61xprint ln -sf /etc/init.d/xprint /etc/rc.d/rc4.d/S61xprint ln -sf /etc/init.d/xprint /etc/rc.d/rc5.d/S61xprint ln -sf /etc/init.d/xprint /etc/rc.d/rc6.d/K61xprint else echo "# Unsupported version of Linux, cannot create links for /etc/init.d/." exit 1 fi fi fi fi -- snip -- It seems we have to stick something similar into the Imakefile build system.. ;-/ Egbert/Drew: Any suggestions/ideas ? Are there any standard tools in LSB and/or Debian which work even with the installation to a temporary location ?
...
Created attachment 469 [details] [review] Patch for 2004-07-12-trunk (work-in-progress)
Attachment attachment 469 [details] [review] checked-in... /cvs/xorg/xc/ChangeLog,v <-- ChangeLog new revision: 1.90; previous revision: 1.89 /cvs/xorg/xc/programs/Xserver/Xprint/etc/init.d/Imakefile,v <-- Imakefile new revision: 1.3; previous revision: 1.2 ... leaving bug open for now until we figured-out a solution to do this in a LSB-compilant way (right now the LSB script to create links for /etc/init.d scripts only works as user "root" and only changes links in /etc/init./, not relative to a given base dir... ;-(( ).
Created attachment 471 [details] [review] Patch for 2004-07.13-trunk to fix "make install" bustage on Linux
attachment 471 [details] [review] checked-in: /cvs/xorg/xc/programs/Xserver/Xprint/etc/init.d/Imakefile,v <-- Imakefile new revision: 1.4; previous revision: 1.3
Someone on IRC pointed out that /usr/lib/lsb/install_initd accepts no-/etc paths, too - which means we could simply use... -- snip -- /usr/lib/lsb/install_initd $(DESTDIR)/etc/init.d/xprint -- snip -- ...on LSB-compilant Linux distributions. sndirsch/egbert: Is this a non-standard feature of the SuSE version of /usr/lib/lsb/install_initd or is that supported by all LSB implementations ?
Roland, I can't comment on LSB as I'm not an expert in this area, but for SuSE Linux it's sufficient to install a init script to /etc/init.d and to call "insserv -d <scripname>" after this, which will create the according symlinks depending on the definitions in the header of the script. Your xprint script already has such a header. I'm already calling insserv in the %post of SuSE's next xorg-x11-Xprt package and it seems to work fine.
Sorry I didn't comment on this earlier. Debian has a standard tool for setting up the links: update-rc.d. It's invoked in the installation scripts (postinst, etc). To make my life even easier, we have a commonly used debhelper tool, (dh_installinit), which places the code into postinst automatically when I create the binary deb files. update-rc.d is provided by the sysvinit package.
Looks like building xprint is no longer possible. ==> WONTFIX
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.