Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 234521 - net-analyzer/snortsam-2.50-r1 fails to compile with sys-apps/openrc
Summary: net-analyzer/snortsam-2.50-r1 fails to compile with sys-apps/openrc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-12 02:08 UTC by Olivier Huber
Modified: 2008-09-16 10:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2008-08-12 02:08:24 UTC
makesnortsam.sh: line 14: /sbin/functions.sh: Aucun fichier ou dossier de ce type

It complains because functions.sh is no more in /sbin, but now in /lib/rc/sh/
I don't know when portage has begun to install this file in /lib/rc/sh.

I think something like that should do the trick :

--- /usr/portage/net-analyzer/snortsam/snortsam-2.50-r1.ebuild  2007-11-06 18:36:16.000000000 +0100
+++ snortsam-2.50-r1.ebuild     2008-08-12 04:04:10.000000000 +0200
@@ -21,6 +21,11 @@
        unpack ${A}
        cd "${S}"
        epatch "${FILESDIR}"/${PN}-2.29-no-ugly----lines.diff
+       if has_version ">=sys-apps/portage-XXXX" ; then
+               sed -i -e "s,sbin/functions.sh,lib/rc/sh/functions.sh," \
+               makesnortsam.sh
+       fi
+
        # bug 155955, ciscoacl segfaults with gcc-4.1.1
        epatch "${DISTDIR}"/${PN}-2.50-ciscoacl.diff.bz2
 }
Comment 1 Michal Kurgan (RETIRED) gentoo-dev 2008-08-12 05:11:47 UTC
/lib/rc/sh/functions.sh is owned by sys-apps/openrc.

do you have it installed?
could you post emerge --info?

reopen with additional info.
Comment 2 Olivier Huber 2008-08-12 12:18:07 UTC
Sorry for not providing the needed info. 

/sbin/function.sh seems to be owned by <sys-apps/baselayout-2.0.0 and this has move to /lib/rc/sh/functions.sh with openrc.

I think that something like that in src_unpack should do it

if has_version ">=sys-apps/baselayout-2.0.0" ; then
   sed -i -e "s,sbin/functions.sh,lib/rc/sh/functions.sh," \
   makesnortsam.sh
fi

emerge --info :

Portage 2.2_rc7 (default/linux/amd64/2008.0/developer, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo x86_64)
=================================================================
System uname: Linux-2.6.26-gentoo-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Mon, 11 Aug 2008 12:19:02 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r4, 2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -pipe -O2 -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -pipe -O2 -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect cvs distlocks multilib-strict parallel-fetch preserve-libs sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo "
LANG="fr_FR.utf-8"
LC_ALL="fr_FR.utf-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common"
LINGUAS="fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/proaudio/proaudio/trunk/overlays/proaudio /usr/local/overlays/nouveau-overlay /usr/local/overlays/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3d 3dnow 3dnowext X X509 Xaw3d a52 aac aalib accessibility ace acl acpi ada adns aio akode alsa amarok amd64 amr amrnb amrwb animation annotate ao apache2 apm aqsis ares arts artswrappersuid asf async atm audacious audiofile automount avahi avi background bash-completion bashlogger bench berkdb bidi bitmap-fonts bl blas blender-game bluetooth bonjour boost border branding browserplugin bs bzip2 ca0106 cairo caps cdda cddb cdio cdr cgkit chardet chipcard chroot cjk cli compress copacity corba cpio cpudetection cracklib crashhandler crypt cscope css ctype cups curl d daap dba dbus dedicated device-mapper directfb disk-partition divx djbfft djvu dlloader dmi dri dts dv dvb dvd dvdnav dvdr dvdread dvi dynamic emboss emovix enca encode enscript escreen esd evo exif expat exscalibar extensions extra-algorithms extrafilters fam fame fastbuild fbcon fbcondecor fbdev ffmpeg fftw filepicker firectfb firefox fits flac flash float font-server fontconfig foomaticdb force-cgi-redirect fortran fping fpx freetype2 ftp fuse gadu gcj gd gdbm geoip ggi gif gimp gimpprint glibc-omitfp glitz glut gmedia gmp gnokii gnuplot gnutls gpac gpg gpm graphics graphviz group gs gstreamer gtk gtk2 gtkhtml gts hal hardened hbci hdf5 howl howl-compat httpd hybrid icecast iconv icu id3 idea idn ifc ifp ilbc imagemagick imlib immqt inotify intl ip2200 iproute2 ipv6 irc isdnlog ithreads jack jack-tmpfs java javascript jbig jce jingle jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kerberos kpathsea ladsp ladspa lame lapack lash lcms ldap lesstif libaa libcaca libg++ libgcrypt libnotify libsamplerate live lm_sensors logitech-mouse logrotate loop-aes lucene lzo lzw lzw-tiff macmenu mad mailwrapper maps math matroska md5sum mdnsresponder-compat meanwhile memlimit midi mikmod miniwin mjpeg mktemp mmap mmx mmxext mng mod modplug mono motif mozbranding mozilla mozsha1 mozsvg mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer msn mtp mudflap mule multilib multislot multitarget musepack music musicbrainz mysql nas nat ncurses neXt neg nemesi net nethack netjack network network-cron nextaw nfs nls nntp nossp nouveau nptl nptlonly nsplugin nss nv nvidia objc objc++ objc-gc odbc ofx ogg openal openexr opengl openmp openntpd openssl ortp osd oss pam parse-clocks pascal passwdqc pcapnav pch pcre pdf pdflib perl perlsuid pertty pg-hier pg-intdatetime php physfs pic pkcs11 player plib plotutils png pnm portaudio posix postgres povray ppds pppd profile pstricks pulseaudio put python qmail qq qt qt-copy qt3 qt3support qt4 quicktime quotes radio rar rc5 readline realmedia reflection resolvconf risky rpm rsync rtc rtsp ruby rubytests samba sasl scanner science sdl sdl-image sensord server session sftp sftplogging shorten shout showdesktop simplexml skey slang slp sndfile snmp soap sockets soundtouch sox speex spell spl spoof-source sqlite sqlite3 srt sse sse2 ssl startup-notification state stream subtitles subversion suhosin svg swat sysfs taglib tcltk tcpd teletext test tetex tga theora threads tiff tivo tokenizer tools tordns trailfocus truetype truetype-fonts type1-fonts udev unicode unstablecups upnp usb utils uuencode v4l v4l2 vcd verse vhosts vidcap vim-syntax vim-with-x visualization vlm vorbis wallpaper wavpack webdav widget wifi wma wmf wmp wxwindows x264 xanim xattr xcb xchatdccserver xchattext xcomposite xetex xface xine xinerama xml xml2 xorg xosd xpm xprint xsl xulrunner xv xvid xvmc yafray yp yv12 zeroconf zip zlib" ALSA_CARDS="ca0106 intel8x0 intel8x0m bt87x" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_defaultauthn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="vesa nvidia v4l fbdev nouveau"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Olivier Huber 2008-08-12 12:29:01 UTC
btw this ebuild lack a DEPEND="sys-apps/baselayout". Since openrc is in PDEPEND in >=sys-apps/baselayout-2.0.0, it should be correct.
Comment 4 Peter Volkov (RETIRED) gentoo-dev 2008-09-15 18:57:49 UTC
Well we should always use /etc/init.d/functions.sh not depending on any version. Both openrc and baselayout-1 proved this file.
Comment 5 Olivier Huber 2008-09-15 21:48:08 UTC
(In reply to comment #4)
> Well we should always use /etc/init.d/functions.sh not depending on any
> version. Both openrc and baselayout-1 proved this file.
> 
I think you are right. This works for me :

--- /usr/portage/net-analyzer/snortsam/snortsam-2.50-r1.ebuild  2007-11-06 18:36:16.000000000 +0100
+++ snortsam-2.50-r1.ebuild     2008-09-15 23:46:59.000000000 +0200
@@ -21,6 +21,9 @@
        unpack ${A}
        cd "${S}"
        epatch "${FILESDIR}"/${PN}-2.29-no-ugly----lines.diff
+      sed -i -e "s,sbin/functions.sh,etc/init.d/functions.sh," \
+      makesnortsam.sh
+
        # bug 155955, ciscoacl segfaults with gcc-4.1.1
        epatch "${DISTDIR}"/${PN}-2.50-ciscoacl.diff.bz2
 }
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2008-09-16 10:42:10 UTC
Thank you for report and fix, Olivier Huber. Fixed in the tree without version bump as it affects only build process. Also added fix to respect LDFLAGS.