NetBSD Problem Report #32835
From smb@cs.columbia.edu Tue Feb 14 14:07:01 2006
Return-Path: <smb@cs.columbia.edu>
Received: from machshav.com (machshav.com [147.28.0.16])
by narn.netbsd.org (Postfix) with ESMTP id 72E2863B879
for <gnats-bugs@gnats.NetBSD.org>; Tue, 14 Feb 2006 14:07:01 +0000 (UTC)
Message-Id: <20060214140651.70C533C0291@berkshire.machshav.com>
Date: Tue, 14 Feb 2006 09:06:51 -0500 (EST)
From: smb@cs.columbia.edu
Reply-To: smb@cs.columbia.edu
To: gnats-bugs@netbsd.org
Subject: rc.d/estd doesn't have the 'x' bit set
X-Send-Pr-Version: 3.95
>Number: 32835
>Category: pkg
>Synopsis: rc.d/estd doesn't have the 'x' bit set
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: rillig
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 14 14:10:00 +0000 2006
>Closed-Date: Wed Sep 20 07:21:21 +0000 2006
>Last-Modified: Wed Sep 20 07:21:21 +0000 2006
>Originator: Steven M. Bellovin
>Release: NetBSD 3.99.15
>Organization:
Department of Computer Science, Columbia University
>Environment:
System: NetBSD berkshire.machshav.com 3.99.15 NetBSD 3.99.15 (BERKSHIRE) #1: Fri Feb 3 16:52:43 EST 2006 smb@berkshire.machshav.com:/usr/BUILD/obj/sys/arch/i386/compile/BERKSHIRE i386
Architecture: i386
Machine: i386
>Description:
sysutils/estd creates /usr/pkg/share/examples/rc.d/estd. This
file is mode 644; it should be 555. This is required to do
'/etc/rc.d/estd restart', for example.
>How-To-Repeat:
See above.
>Fix:
The bypass is to change the modes manually, of course. I'm not
sure where estd.sh is actually copied to rc.d -- in the pkgsrc
structure? -- so I can't fix it, but it's invoking 'install'
with the wrong -m option.
>Release-Note:
>Audit-Trail:
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
Date: Tue, 14 Feb 2006 13:03:10 -0800 (PST)
On Tue, 14 Feb 2006 smb@cs.columbia.edu wrote:
> The bypass is to change the modes manually, of course. I'm not
> sure where estd.sh is actually copied to rc.d -- in the pkgsrc
> structure? -- so I can't fix it, but it's invoking 'install'
> with the wrong -m option.
For now, fix your sysutils/estd/patches/patch-aa and rerun "make
makepatchsum".
(I see the locations for man pages needs to be fixed too, but that is
unrelated to this PR.)
The mk/install/bsd.pkginstall.mk uses:
RCD_SCRIPTS_MODE?= 0755
It creates a script that contains this metadata like:
# FILE: $$file cr $$egfile ${RCD_SCRIPTS_MODE}
Maybe for some reason, the code to use this was removed or is not working.
(But from a quick look, mk/install/files appears to look correct.)
Jeremy C. Reed
technical support & remote administration
http://www.pugetsoundtechnology.com/
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
Date: Tue, 14 Feb 2006 13:11:58 -0800 (PST)
> > The bypass is to change the modes manually, of course. I'm not
> > sure where estd.sh is actually copied to rc.d -- in the pkgsrc
> > structure? -- so I can't fix it, but it's invoking 'install'
> > with the wrong -m option.
Ignore my earlier comments.
mk/install/files does not use install, but uses cp and then chmod.
I just tested by doing:
make PKG_RCD_SCRIPTS=yes install
Everything appeared to be correct.
rainier:/usr/pkgsrc/sysutils/estd$ ls -l /etc/rc.d/estd
-rwxr-xr-x 1 root wheel 322 Feb 14 13:08 /etc/rc.d/estd
rainier:/usr/pkgsrc/sysutils/estd$ ls -l /usr/pkg/share/examples/rc.d/estd
-rw-r--r-- 1 root wheel 322 Feb 14 13:08 /usr/pkg/share/examples/rc.d/estd
Have a look at your work/.install-files file to see if you can notice
anything. Mine has
# FILE: /etc/rc.d/estd cr share/examples/rc.d/estd 0755
near the bottom.
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/
From: "Steven M. Bellovin" <smb@cs.columbia.edu>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
Date: Tue, 14 Feb 2006 16:23:12 -0500
In message <20060214211505.0943963B879@narn.netbsd.org>, "Jeremy C. Reed" write
s:
>The following reply was made to PR pkg/32835; it has been noted by GNATS.
>
>From: "Jeremy C. Reed" <reed@reedmedia.net>
>To: gnats-bugs@netbsd.org
>Cc:
>Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
>Date: Tue, 14 Feb 2006 13:11:58 -0800 (PST)
>
> > > The bypass is to change the modes manually, of course. I'm not
> > > sure where estd.sh is actually copied to rc.d -- in the pkgsrc
> > > structure? -- so I can't fix it, but it's invoking 'install'
> > > with the wrong -m option.
>
> Ignore my earlier comments.
>
> mk/install/files does not use install, but uses cp and then chmod.
>
> I just tested by doing:
>
> make PKG_RCD_SCRIPTS=yes install
>
> Everything appeared to be correct.
>
> rainier:/usr/pkgsrc/sysutils/estd$ ls -l /etc/rc.d/estd
> -rwxr-xr-x 1 root wheel 322 Feb 14 13:08 /etc/rc.d/estd
> rainier:/usr/pkgsrc/sysutils/estd$ ls -l /usr/pkg/share/examples/rc.d/estd
> -rw-r--r-- 1 root wheel 322 Feb 14 13:08 /usr/pkg/share/examples/rc.d/estd
>
> Have a look at your work/.install-files file to see if you can notice
> anything. Mine has
> # FILE: /etc/rc.d/estd cr share/examples/rc.d/estd 0755
> near the bottom.
It has that near the bottom, but a 'make install' shows
===> Installing for estd-0.4nb1
install -d -o root -g wheel -m 0755 /usr/pkg/sbin
install -s -o root -g wheel -m 0755 estd /usr/pkg/sbin/estd
install -d -o root -g wheel -m 0755 /usr/pkg/man/man1
install -o root -g wheel -m 0644 estd.1 /usr/pkg/man/man1/estd.1
install -o root -g wheel -m 0644 estd.sh /usr/pkg/share/examples/rc.d/estd
===> [Automatic manual page handling]
===> Registering installation for estd-0.4nb1
and
# ls -l /usr/pkg/share/examples/rc.d/estd
-rw-r--r-- 1 root wheel 322 Feb 14 16:21 /usr/pkg/share/examples/rc.d/estd
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
Date: Tue, 14 Feb 2006 13:37:25 -0800 (PST)
On Tue, 14 Feb 2006, Steven M. Bellovin wrote:
> It has that near the bottom, but a 'make install' shows
>
> ===> Installing for estd-0.4nb1
> install -d -o root -g wheel -m 0755 /usr/pkg/sbin
> install -s -o root -g wheel -m 0755 estd /usr/pkg/sbin/estd
> install -d -o root -g wheel -m 0755 /usr/pkg/man/man1
> install -o root -g wheel -m 0644 estd.1 /usr/pkg/man/man1/estd.1
> install -o root -g wheel -m 0644 estd.sh /usr/pkg/share/examples/rc.d/estd
> ===> [Automatic manual page handling]
> ===> Registering installation for estd-0.4nb1
>
> and
>
> # ls -l /usr/pkg/share/examples/rc.d/estd
> -rw-r--r-- 1 root wheel 322 Feb 14 16:21 /usr/pkg/share/examples/rc.d/estd
That all looks okay. Although other scripts (on my boxes) do have
executable bit set in the share/examples/rc.d/ directory. I don't see this
as any problem though since it is not ran.
If you really want the example to be an executable, fix your
sysutils/estd/patches/patch-aa and rerun "make makepatchsum". (But I am
not sure why.)
I thought your problem was that the rc.d script was not executable. See
/etc/rc.d/estd. Is it executable?
Are you using PKG_RCD_SCRIPTS=yes? (If not, the install will tell you to
manually install it and shoudl suggest the correct mode.)
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/
From: Johnny Lam <jlam@pkgsrc.org>
To: "Steven M. Bellovin" <smb@cs.columbia.edu>
Cc: gnats-bugs@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
Date: Tue, 14 Feb 2006 16:39:18 -0500
Steven M. Bellovin wrote:
>
> It has that near the bottom, but a 'make install' shows
>
> ===> Installing for estd-0.4nb1
> install -d -o root -g wheel -m 0755 /usr/pkg/sbin
> install -s -o root -g wheel -m 0755 estd /usr/pkg/sbin/estd
> install -d -o root -g wheel -m 0755 /usr/pkg/man/man1
> install -o root -g wheel -m 0644 estd.1 /usr/pkg/man/man1/estd.1
> install -o root -g wheel -m 0644 estd.sh /usr/pkg/share/examples/rc.d/estd
> ===> [Automatic manual page handling]
> ===> Registering installation for estd-0.4nb1
>
> and
>
> # ls -l /usr/pkg/share/examples/rc.d/estd
> -rw-r--r-- 1 root wheel 322 Feb 14 16:21 /usr/pkg/share/examples/rc.d/estd
The sysutils/estd/patches/patch-aa file is incorrect. Firstly, it
should be using the BSD_INSTALL_* macros, otherwise, this package will
not install correctly when UNPRIVILEGED=yes. Secondly, it should be
installing the rc.d script using BSD_INSTALL_SCRIPT instead of
hardcoding to mode 0644.
Cheers,
-- Johnny Lam <jlam@pkgsrc.org>
From: "Steven M. Bellovin" <smb@cs.columbia.edu>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
Date: Tue, 14 Feb 2006 16:46:20 -0500
In message <20060214214002.73EDA63B879@narn.netbsd.org>, "Jeremy C. Reed" write
s:
>The following reply was made to PR pkg/32835; it has been noted by GNATS.
>
>From: "Jeremy C. Reed" <reed@reedmedia.net>
>To: gnats-bugs@netbsd.org
>Cc:
>Subject: Re: pkg/32835: rc.d/estd doesn't have the 'x' bit set
>Date: Tue, 14 Feb 2006 13:37:25 -0800 (PST)
>
> On Tue, 14 Feb 2006, Steven M. Bellovin wrote:
>
> > It has that near the bottom, but a 'make install' shows
> >
> > ===> Installing for estd-0.4nb1
> > install -d -o root -g wheel -m 0755 /usr/pkg/sbin
> > install -s -o root -g wheel -m 0755 estd /usr/pkg/sbin/estd
> > install -d -o root -g wheel -m 0755 /usr/pkg/man/man1
> > install -o root -g wheel -m 0644 estd.1 /usr/pkg/man/man1/estd.1
> > install -o root -g wheel -m 0644 estd.sh /usr/pkg/share/examples/rc.d/estd
> > ===> [Automatic manual page handling]
> > ===> Registering installation for estd-0.4nb1
> >
> > and
> >
> > # ls -l /usr/pkg/share/examples/rc.d/estd
> > -rw-r--r-- 1 root wheel 322 Feb 14 16:21 /usr/pkg/share/examples/rc.d/es
>td
>
> That all looks okay. Although other scripts (on my boxes) do have
> executable bit set in the share/examples/rc.d/ directory. I don't see this
> as any problem though since it is not ran.
>
> If you really want the example to be an executable, fix your
> sysutils/estd/patches/patch-aa and rerun "make makepatchsum". (But I am
> not sure why.)
>
> I thought your problem was that the rc.d script was not executable. See
> /etc/rc.d/estd. Is it executable?
>
> Are you using PKG_RCD_SCRIPTS=yes? (If not, the install will tell you to
> manually install it and shoudl suggest the correct mode.)
>
I manually the rc.d scripts I want into /etc/rc.d. All of the other
examples have the 'x' bit on; this one doesn't, which means it doesn't
work properly if copied over.
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb
From: Roland Illig <rillig@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/32835 CVS commit: pkgsrc/sysutils/estd
Date: Wed, 20 Sep 2006 07:19:59 +0000 (UTC)
Module Name: pkgsrc
Committed By: rillig
Date: Wed Sep 20 07:19:59 UTC 2006
Modified Files:
pkgsrc/sysutils/estd: Makefile distinfo
pkgsrc/sysutils/estd/patches: patch-aa
Log Message:
Made the package work for unprivileged builds.
Fixed the file mode of the example rc.d script. (PR 34564)
This also fixes PR 32835, which had already suggested all the changes I
made, but I've seen it too late. :)
To generate a diff of this commit:
cvs rdiff -r1.9 -r1.10 pkgsrc/sysutils/estd/Makefile
cvs rdiff -r1.7 -r1.8 pkgsrc/sysutils/estd/distinfo
cvs rdiff -r1.4 -r1.5 pkgsrc/sysutils/estd/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: pkg-manager->rillig
Responsible-Changed-By: rillig@netbsd.org
Responsible-Changed-When: Wed, 20 Sep 2006 07:21:21 +0000
Responsible-Changed-Why:
It's mine.
State-Changed-From-To: open->closed
State-Changed-By: rillig@netbsd.org
State-Changed-When: Wed, 20 Sep 2006 07:21:21 +0000
State-Changed-Why:
I applied the changes proposed by jlam.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.