Bug 100039 - linux_base-fc4 not upgradable with portupgrade -s
Summary: linux_base-fc4 not upgradable with portupgrade -s
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-10 19:40 UTC by Stefan Sperling
Modified: 2006-07-10 23:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Sperling 2006-07-10 19:40:15 UTC
Running 'portupgrade -sf linux_base-fc-4_6' as user in group wheel with the line '%wheel          ALL = (ALL) NOPASSWD: ALL' in the sudoers file fails with a couple of error messages by brandelf:

brandelf: error opening file /usr/mylocal/workdir/usr/ports/emulators/linux_base-fc4/work/usr/bin/db42_checkpoint: Permission denied

The reason seems to be that some files unpacked from the db42 rpm package are not writable:
[stsp@dice /usr/mylocal/workdir/usr/ports/emulators/linux_base-fc4/work/usr/bin]$ ls -l db*
-r-xr-xr-x  1 stsp  wsrc   6.2K 10 Jul 20:34 db41_archive*
-r-xr-xr-x  1 stsp  wsrc   7.7K 10 Jul 20:34 db41_checkpoint*
etc.



I originally noticed this error while upgrading all my ports with 'portupgrade -saP'. It has been present since the switch from linux_base-8 to linux_base-fc-4.

Upgrading the package as root works fine.

Fix: 

Maybe a simple chmod after unpacking the rpm could fix this.
Comment 1 Erwin Lansing freebsd_committer freebsd_triage 2006-07-10 19:54:45 UTC
Responsible Changed
From-To: freebsd-ports-bugs->emulation

Over to maintainers
Comment 2 Boris B.Samorodov 2006-07-10 22:11:30 UTC
Please, check out if the patch helps:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/emulators/linux_base-fc4/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	9 Jul 2006 20:50:07 -0000	1.15
+++ Makefile	10 Jul 2006 21:06:37 -0000
@@ -172,6 +172,9 @@
 #
 	@${MV} ${WRKSRC}/etc/nsswitch.conf ${WRKSRC}/etc/nsswitch.conf.dist
 
+# Fix usr/bin/*db4* permissions to allow "portupgrade -s"
+	@${CHMOD} u+w ${WRKSRC}/usr/bin/*db4*
+
 	@${FIND} ${WRKSRC}/bin ${WRKSRC}/sbin/ ${WRKSRC}/usr/bin \
 		${WRKSRC}/usr/sbin -type f -print0 | ${XARGS} -0 ${FILE} \
 		| ${GREP} ELF | ${CUT} -d : -f 1 \

WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve
Comment 3 Boris Samorodov freebsd_committer freebsd_triage 2006-07-10 23:04:36 UTC
State Changed
From-To: open->feedback

Awaiting for a feedback.
Comment 4 Boris Samorodov freebsd_committer freebsd_triage 2006-07-10 23:49:11 UTC
State Changed
From-To: feedback->open

A feedback received by email. The patch should be committed.
Comment 5 Boris Samorodov freebsd_committer freebsd_triage 2006-07-10 23:52:01 UTC
State Changed
From-To: open->closed

A patch with chmod before branding and returning the status quo after 
branding was committed. 

Thanks for the report!