Bug 875 - rpmbuild on Red Hat 7.2 does not create symlinks in rc?.d directories
Summary: rpmbuild on Red Hat 7.2 does not create symlinks in rc?.d directories
Status: RESOLVED INVALID
Alias: None
Product: xprint
Classification: Unclassified
Component: Build config (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Roland Mainz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-15 20:40 UTC by Mark Roberts
Modified: 2004-07-24 00:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Mark Roberts 2004-07-15 20:40:22 UTC
An rpmbuild against the 009.001 SRPM (with no modifications) deletes but fails
to re-create the startup symlinks. These links have to be re-created manually.

The links as given in the xprint.spec file are:

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

Workaround: Create links manually.

Build: 009.001, from SRPM on a Red Hat 7.2 system, kernel 2.4.20-28.7, gcc
2.96.3, glibc 2.2.4. The binary RPM from mozdev.org did not work because of a
call to a glibc 2.3 library.

Also note bug #873, which may possibly be related.
Comment 1 Roland Mainz 2004-07-15 21:18:22 UTC
Weired... or not... the lowest RedHat version we ever tested was RedHat 8... ;-(

By default the xprint.spec executes the following sequence:
-- 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 --
but somehow this doesn't catch your case... ;-(

Mark:
What does
% ls -la /etc/redhat-release /sbin/chkconfig /etc/rc.d/rc2.d/ # say ?
Comment 2 Andrew Schultz 2004-07-15 22:34:52 UTC
Red Hat 7.2 should have /etc/redhat-release
note that the links shouldn't be created with an upgrade.  they should already
be there and not removed.  And they're created during installation, not during
the build process.
Comment 3 Mark Roberts 2004-07-16 19:33:03 UTC
Command output:

[root@markhost root]# ls -la /etc/redhat-release /sbin/chkconfig /etc/rc.d/rc2.d/ 
-rw-r--r--    1 root     root           35 Sep  9  2001 /etc/redhat-release
-rwxr-xr-x    1 root     root        27404 Aug 27  2001 /sbin/chkconfig

/etc/rc.d/rc2.d/:
total 8
drwxr-xr-x    2 root     root         4096 Jul 16 18:59 .
drwxr-xr-x   10 root     root         4096 Mar 16  2002 ..
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K03rhnsd -> ../init.d/rhnsd
lrwxrwxrwx    1 root     root           13 Oct 30  2001 K05atd -> ../init.d/atd
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K15httpd -> ../init.d/httpd
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K20rwhod -> ../init.d/rwhod
lrwxrwxrwx    1 root     root           17 Apr 13  2003 K35winbind ->
../init.d/winbind
lrwxrwxrwx    1 root     root           20 Oct 30  2001 K44rawdevices ->
../init.d/rawdevices
lrwxrwxrwx    1 root     root           18 Oct 30  2001 K45arpwatch ->
../init.d/arpwatch
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K46radvd -> ../init.d/radvd
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K50snmpd -> ../init.d/snmpd
lrwxrwxrwx    1 root     root           19 Oct 22  2002 K50snmptrapd ->
../init.d/snmptrapd
lrwxrwxrwx    1 root     root           13 Oct 30  2001 K50tux -> ../init.d/tux
lrwxrwxrwx    1 root     root           16 Oct 30  2001 K50xinetd ->
../init.d/xinetd
lrwxrwxrwx    1 root     root           16 Oct 30  2001 K65identd ->
../init.d/identd
lrwxrwxrwx    1 root     root           17 Nov  9  2002 K70aep1000 ->
../init.d/aep1000
lrwxrwxrwx    1 root     root           16 Oct 30  2001 K72autofs ->
../init.d/autofs
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K75netfs -> ../init.d/netfs
lrwxrwxrwx    1 root     root           17 Oct 30  2001 K87portmap ->
../init.d/portmap
lrwxrwxrwx    1 root     root           15 Oct 30  2001 K95kudzu -> ../init.d/kudzu
lrwxrwxrwx    1 root     root           18 Oct 30  2001 K95reconfig ->
../init.d/reconfig
lrwxrwxrwx    1 root     root           18 Oct 30  2001 S08ipchains ->
../init.d/ipchains
lrwxrwxrwx    1 root     root           18 Oct 30  2001 S08iptables ->
../init.d/iptables
lrwxrwxrwx    1 root     root           14 Oct 30  2001 S09isdn -> ../init.d/isdn
lrwxrwxrwx    1 root     root           17 Oct 30  2001 S10network ->
../init.d/network
lrwxrwxrwx    1 root     root           16 Oct 30  2001 S12syslog ->
../init.d/syslog
lrwxrwxrwx    1 root     root           18 Oct 30  2001 S17keytable ->
../init.d/keytable
lrwxrwxrwx    1 root     root           16 Oct 30  2001 S20random ->
../init.d/random
lrwxrwxrwx    1 root     root           14 Oct 30  2001 S26apmd -> ../init.d/apmd
lrwxrwxrwx    1 root     root           14 Oct 30  2001 S55sshd -> ../init.d/sshd
lrwxrwxrwx    1 root     root           13 Oct 30  2001 S60lpd -> ../init.d/lpd
lrwxrwxrwx    1 root     root           16 Jul 16 18:59 S61xprint ->
../init.d/xprint
lrwxrwxrwx    1 root     root           18 Oct 30  2001 S80sendmail ->
../init.d/sendmail
lrwxrwxrwx    1 root     root           13 Oct 30  2001 S85gpm -> ../init.d/gpm
lrwxrwxrwx    1 root     root           15 Oct 30  2001 S90crond -> ../init.d/crond
lrwxrwxrwx    1 root     root           13 Oct 30  2001 S90xfs -> ../init.d/xfs
lrwxrwxrwx    1 root     root           17 Oct 30  2001 S95anacron ->
../init.d/anacron
lrwxrwxrwx    1 root     root           19 Oct 30  2001 S99linuxconf ->
../init.d/linuxconf
lrwxrwxrwx    1 root     root           11 Mar 16  2002 S99local -> ../rc.local
[root@markhost root]# 

For Andrew:
This installation was replacing an Xprint 008 installation. I didn't
specifically check to see if the symlinks were there before, but since xprint
started up at boot time, I'm making the assumption that they were there before.
I suppose I could always force an rpm install of the earlier Xprint to see what
it does.

For Roland:
It also appears that Xprt isn't picking up some or all font paths. I have not
analyzed this further yet. Some, but not all, fonts are showing up as bitmaps.
When I have conducted more analysis, I will file a separate bug report for it.
Comment 4 Mark Roberts 2004-07-24 17:07:03 UTC
Recompiled to a new RPM, which did not exhibit this symptom. Thus, I am unable
to reproduce the problem.

(Oddly, the two binary RPMs are of different sizes.)


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.