Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169670 - slang-1.4.9-r2 produces broken library which needs setfsuid and setfsgid functions
Summary: slang-1.4.9-r2 produces broken library which needs setfsuid and setfsgid func...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: x86 FreeBSD
: High normal
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 20:59 UTC by Sergey Belyashov
Modified: 2007-03-12 11:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixed sys-libs/slang-1.4.9-r2.ebuild (slang-1.4.9-r2.ebuild,2.00 KB, text/plain)
2007-03-06 21:00 UTC, Sergey Belyashov
Details
sys-libs/slang-1.4.9-r2.ebuild (slang-1.4.9-r2.ebuild,1.94 KB, text/plain)
2007-03-07 21:56 UTC, Sergey Belyashov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Belyashov 2007-03-06 20:59:17 UTC
slang-1.4.9-r2 merging without any errors. But linking of any package (for example app-misc/mc with USE="slang") which need this library failed. Caused error about unresolved symbol 'setfsuid' in libslang.

Reproducible: Always

Steps to Reproduce:
1. USE="slang unicode" emerge slang
2. echo "int main(){}" >test.c
3. cc -lslang test.c
Actual Results:  
Unresolved simbol sefsuid in libslang.

Expected Results:  
a.out

# emerge --info
Portage 2.1.2.1 (default-bsd/fbsd/6.2/x86, gcc-4.1.1, freebsd-lib-6.2-r0, 6.2-RELEASE i386)
=================================================================
System uname: 6.2-RELEASE i386 i386
Gentoo Base System release 1.13.0_alpha12
Timestamp of tree: Mon, 05 Mar 2007 20:50:01 +0000
ccache version 2.4 [enabled]
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-devel/autoconf:  2.61
sys-devel/automake:  1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.23b
virtual/os-headers:  6.2
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
AUTOCLEAN="yes"
CBUILD="i486-gentoo-freebsd6.2"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-gentoo-freebsd6.2"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks metadata-transfer parallel-fetch sfperms strict"
GENTOO_MIRRORS="ftp://192.168.14.25/os/Unix/Linux/Gentoo/mirror"
LINGUAS="en ru"
MAKEOPTS="-j2 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.14.25/gentoo-portage"
USE="berkdb bzip2 cli crypt cups dri gdbm iconv java5 libg++ midi ncurses nls oss pam pcre perl ppds python readline reflection session slang spl ssl tcpd unicode utf8 x86-fbsd xorg zlib" ALSA_PCM_PLUGINS="shm" ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD" LINGUAS="en ru" USERLAND="BSD" VIDEO_CARDS="vmware"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sergey Belyashov 2007-03-06 21:00:01 UTC
Created attachment 112326 [details]
fixed sys-libs/slang-1.4.9-r2.ebuild

This issue is caused by slang-1.4.9-fsuid.patch. This patch adds some calls to linux specific functions (setfsuid, for example) and rule for autoconf to test possibility of building. But original ebuild does not rebuild configure script. In this cause checking don't use new rules and after merging system contain broken libslang.so.
To fix this issue I add to original ebuild:
1. autotools to inherit list
2. new use flag to IUSE: userland_BSD
3. new condition before call to epatch slang-1.4.9-fsuid.patch
4. rebuilding of configure script
Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2007-03-07 21:19:47 UTC
(In reply to comment #1)
> To fix this issue I add to original ebuild:
> 1. autotools to inherit list
> 2. new use flag to IUSE: userland_BSD
> 3. new condition before call to epatch slang-1.4.9-fsuid.patch
> 4. rebuilding of configure script
> 

Thanks for the report.Some thoughts:
Is there a reason (ie: anything else fails?) for using eautoreconf here?
Besides that the other thing i would change is using elibc_FreeBSD if you are not sure if those fsuid functions are implemented in other non-FreeBSD userlands (i bet they're not, but better be sure).
Other than that, looks good to me, cjk can you review/apply later?
Comment 3 Sergey Belyashov 2007-03-07 21:56:02 UTC
Created attachment 112481 [details]
sys-libs/slang-1.4.9-r2.ebuild

(In reply to comment #2)
> Thanks for the report.Some thoughts:
> Is there a reason (ie: anything else fails?) for using eautoreconf here?
Yes. You are right. It is bad idea use it.

> Besides that the other thing i would change is using elibc_FreeBSD if you are
> not sure if those fsuid functions are implemented in other non-FreeBSD
> userlands (i bet they're not, but better be sure).
man 2 setfsuid:
       setfsuid()  is  Linux  specific  and  should  not  be  used in programs
       intended to be portable.  It is present since Linux 1.1.44 and in  libc
       since libc 4.7.6.

> Other than that, looks good to me, cjk can you review/apply later?
> 
Yes, I try to do it with new ebuild. Previous ebuild is broken (I remove eautoconf).
Comment 4 Javier Villavicencio (RETIRED) gentoo-dev 2007-03-12 11:42:39 UTC
Thanks!, fixed in cvs.