Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Feb 2012 20:01:33 -0800 (PST)
From:      Joel Ray Holveck <joelh@piquan.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/165483: [patch] graphics/sane-backends creates a circular rcorder - can break system boot
Message-ID:  <201202260401.q1Q41XoY010223@thor.piquan.org>
Resent-Message-ID: <201202260410.q1Q4ADRY003866@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         165483
>Category:       ports
>Synopsis:       [patch] graphics/sane-backends creates a circular rcorder - can break system boot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 26 04:10:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Joel Ray Holveck
>Release:        FreeBSD 8.3-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD thor.piquan.org 8.3-PRERELEASE FreeBSD 8.3-PRERELEASE #2: Sat Feb 25 15:52:16 PST 2012 root@thor.piquan.org:/usr/obj/usr/src/sys/THOR i386

Port: graphics/sane-backends as of 2012/02/19

>Description:
The saned rc script specifies:

    # REQUIRE: LOGIN netif routing mountcritlocal
    # BEFORE:  NETWORKING

Since NETWORKING is a prerequisite of LOGIN, this creates a circular
dependency at boot time.  rcorder(8) will behave unpredictably for
anything between NETWORKING and LOGIN (which is almost half the base
system).

In my case, for example, this caused ldconfig to be run far too late,
preventing many services (unrelated to saned) from starting correctly.

This can break the startup order for many users, since sane-backends
is (by default) a prerequisite for KDE.

>How-To-Repeat:
Install graphics/sane-backends.

To verify the problem, run:

    $ rcorder /etc/rc.d/* /usr/local/etc/rc.d/* >/dev/null
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/accounting'.
    rcorder: Circular dependency on provision `ldconfig' in file `/etc/rc.d/amd'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/devfs'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/mdconfig2'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/newsyslog'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/syslogd'.
    rcorder: Circular dependency on provision `ldconfig' in file `/etc/rc.d/SERVERS'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/archdep'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/SERVERS'.
    rcorder: Circular dependency on provision `NETWORKING' in file `/etc/rc.d/ntpdate'.
    rcorder: Circular dependency on provision `NETWORKING' in file `/etc/rc.d/rpcbind'.
    rcorder: Circular dependency on provision `mountcritremote' in file `/etc/rc.d/nfsclient'.
[snip]

>Fix:
A patch is attached.

The REQUIRE: LOGIN was added recently and deliberately, whereas
BEFORE: NETWORKING is two years old and may have been copied from a
different rc script.  The REQUIRE: LOGIN seems more likely to be
necessary than the other, so that's what I preserve in this patch.

The attached patch will:
- Remove BEFORE: NETWORKING from rc.d script to break circularity
- Bump PORTREVISION

As a workaround, users can remove the "BEFORE: NETWORKING" line from
/usr/local/etc/rc.d/saned.  However, it may be difficult for users to
identify why their systems are not loading some services properly,
since saned is not necessarily going to be referred to in any errors.

--- sane-backends.patch begins here ---
diff -ur -x'*~' sane-backends.orig/Makefile sane-backends/Makefile
--- sane-backends.orig/Makefile	2012-02-20 12:26:04.000000000 -0800
+++ sane-backends/Makefile	2012-02-25 19:21:29.000000000 -0800
@@ -7,7 +7,7 @@
 
 PORTNAME=	sane-backends
 PORTVERSION=	1.0.22
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
 MASTER_SITES=	http://alioth.debian.org/frs/download.php/3503/ \
 		ftp://ftp2.sane-project.org/pub/sane/%SUBDIR%/
diff -ur -x'*~' sane-backends.orig/files/saned.in sane-backends/files/saned.in
--- sane-backends.orig/files/saned.in	2012-02-20 12:26:04.000000000 -0800
+++ sane-backends/files/saned.in	2012-02-25 19:21:23.000000000 -0800
@@ -4,7 +4,6 @@
 #
 # PROVIDE: saned
 # REQUIRE: LOGIN netif routing mountcritlocal
-# BEFORE:  NETWORKING
 #
 # A sample saned startup script.
 #
--- sane-backends.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202260401.q1Q41XoY010223>