Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308687 - sys-apps/tcp-wrappers patch needed for Solaris
Summary: sys-apps/tcp-wrappers patch needed for Solaris
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Solaris
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 16:59 UTC by Eric Meddaugh
Modified: 2014-01-14 20:20 UTC (History)
1 user (show)

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


Attachments
Solaris ebuild diff file (solaris.ebuild,715 bytes, patch)
2010-03-17 16:48 UTC, Eric Meddaugh
Details | Diff
Solaris tcp wrapper patch (RIT.solaris.patch,461 bytes, patch)
2010-03-17 16:49 UTC, Eric Meddaugh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Meddaugh 2010-03-09 16:59:35 UTC
I got the TCP Wrappers (7.6-r8) for Solaris (sparc and x86)working.

I had to add a patch in and a sunos line to get it to work:

$ diff -u ${PORTDIR_OVERLAY}/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild ${EPREFIX}/usr/portage/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild
--- /sys_tools/usr/local/portage/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild       2009-12-04 10:39:16.000000000 -0500
+++ /sys_tools/usr/portage/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild     2009-07-28 10:31:58.000000000 -0400
@@ -27,9 +27,6 @@
        chmod ug+w Makefile
 
        EPATCH_SUFFIX="patch"
-# RIT -- Solaris
-       epatch /sys_tools/usr/local/portage/sys-apps/tcp-wrappers/files/RIT.solaris.patch
-
        PATCHDIR=${WORKDIR}/${PV}
        epatch ${PATCHDIR}/${P}-makefile.patch
        epatch ${PATCHDIR}/generic
@@ -55,7 +52,7 @@
                REAL_DAEMON_DIR=/usr/sbin \
                GENTOO_OPT="${myconf}" \
                MAJOR=0 MINOR=${PV:0:1} REL=${PV:2:3} \
-               sunos5 || die "emake linux failed"
+               linux || die "emake linux failed"
 }
 
 src_install() {


$ cat ${PORTDIR_OVERLAY}/sys-apps/tcp-wrappers/files/RIT.solaris.patch
*** tcpdORIG.c  Fri Dec  4 10:28:22 2009
--- tcpd.c      Fri Dec  4 10:28:45 2009
***************
*** 21,27 ****
  #include <sys/param.h>
  #include <sys/stat.h>
  #include <sys/socket.h>
! #include <netinet/in.h>
  #include <stdio.h>
  #include <syslog.h>
  #include <string.h>
--- 21,27 ----
  #include <sys/param.h>
  #include <sys/stat.h>
  #include <sys/socket.h>
! #include <netinet/ip_compat.h>
  #include <stdio.h>
  #include <syslog.h>
  #include <string.h>
Comment 1 Eric Meddaugh 2010-03-09 16:59:47 UTC
$ emerge --info
Portage 2.2.00.15754-prefix (prefix/sunos/solaris/5.10/x86, gcc-4.4.3, unavailable, 5.10 i86pc)
=================================================================
System uname: Solaris-2.10-i86pc-i386-32bit-ELF
Timestamp of tree: Tue, 09 Mar 2010 16:06:32 +0000
app-shells/bash:     4.0_p37
dev-lang/python:     2.6.4
dev-util/cmake:      2.8.0-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.10.2-r00.1, 1.11.1
sys-devel/binutils:  2.20.51.0.4
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6b
ACCEPT_KEYWORDS="~x86-solaris"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i386-pc-solaris2.10"
CFLAGS="-O2 -pipe"
CHOST="i386-pc-solaris2.10"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CPPFLAGS="-I/sys_tools/usr/include"
CXXFLAGS="-O2 -pipe"
DISTDIR="/sys_tools/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-L/sys_tools/usr/lib -R/sys_tools/usr/lib -L/sys_tools/lib -R/sys_tools/lib"
PKGDIR="/sys_tools/usr/portage/packages"
PORTAGE_CONFIGROOT="/sys_tools/"
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="/sys_tools/var/tmp"
PORTDIR="/sys_tools/usr/portage"
PORTDIR_OVERLAY="/sys_tools/usr/local/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="cracklib cxx kerberos modules ncurses nls prefix readline ssl unicode x86-solaris zlib" 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 authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http auth_digest" ELIBC="SunOS" INPUT_DEVICES="keyboard mouse" KERNEL="SunOS" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" 
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Eric Meddaugh 2010-03-09 17:01:48 UTC
Ok...so I did the diff -u backwards...sorry about that, here's the correct diff -u for the ebuild.  I know something else will have to be adjusted to get it to work for linux as I removed that part...

$ diff -u ${EPREFIX}/usr/portage/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild ${PORTDIR_OVERLAY}/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild
--- /sys_tools/usr/portage/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild     2009-07-28 10:31:58.000000000 -0400
+++ /sys_tools/usr/local/portage/sys-apps/tcp-wrappers/tcp-wrappers-7.6-r8.ebuild       2009-12-04 10:39:16.000000000 -0500
@@ -27,6 +27,9 @@
        chmod ug+w Makefile
 
        EPATCH_SUFFIX="patch"
+# RIT -- Solaris
+       epatch /sys_tools/usr/local/portage/sys-apps/tcp-wrappers/files/RIT.solaris.patch
+
        PATCHDIR=${WORKDIR}/${PV}
        epatch ${PATCHDIR}/${P}-makefile.patch
        epatch ${PATCHDIR}/generic
@@ -52,7 +55,7 @@
                REAL_DAEMON_DIR=/usr/sbin \
                GENTOO_OPT="${myconf}" \
                MAJOR=0 MINOR=${PV:0:1} REL=${PV:2:3} \
-               linux || die "emake linux failed"
+               sunos5 || die "emake linux failed"
 }
 
 src_install() {
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-03-16 16:43:27 UTC
Please attach your diff -u so it can be applied, thanks.
Comment 4 Eric Meddaugh 2010-03-16 16:44:57 UTC
I put 2 different diff -u, one for the tcp-wrappers code itself, and one for the ebuild, which did you want?

Thanks.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-03-16 16:46:46 UTC
(In reply to comment #4)
> I put 2 different diff -u, one for the tcp-wrappers code itself, and one for
> the ebuild, which did you want?
> 
> Thanks.
> 

Attach both please, it is useful for historical reasons.
Comment 6 Eric Meddaugh 2010-03-17 16:48:51 UTC
Created attachment 224025 [details, diff]
Solaris ebuild diff file

I do know this takes out the linux build, so it'll have to be fixed...
Comment 7 Eric Meddaugh 2010-03-17 16:49:43 UTC
Created attachment 224027 [details, diff]
Solaris tcp wrapper patch

Patch that will apply and allow tcp wrappers to build for Solaris
Comment 8 Fabian Groffen gentoo-dev 2010-04-03 12:30:09 UTC
Did you know that ${FILESDIR} points to the location to the files directory in the ebuild dir?  That makes it possible not to hardcode the absolute path in your installation to it.
Comment 9 Fabian Groffen gentoo-dev 2014-01-14 20:20:26 UTC
7.22 should give more luck