Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I have written an apache2 chroot ebuild
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Thu May 05, 2005 10:36 am    Post subject: I have written an apache2 chroot ebuild Reply with quote

Hi guys,
I have written a section of an apache e-build which chrootes apache2 instalation. I have tried and it works with no problem in my installation 2005.0 . If somebody has any opinion or
suggest me how to improve this ebuild I will be so glad.
Here is the build section which must be appended to the end of apache2 ebuild file;

Code:

pkg_config()
{

CHROOT="/chroot/apache"
apache_bin="/usr/sbin/apache2"

#Check module and binary existence
php_module="/usr/lib/apache2-extramodules/libphp4.so"
ssl_module="/usr/lib/apache2-extramodules/mod_ssl.so"
sendmail="/usr/sbin/sendmail"
MODULES_CHROOT="$php_module $ssl_module $sendmail"

#Warn if there is a previous installation and suggest a flag
        if [ -e $CHROOT/$apache_bin ] && ! use force_apachechroot ; then
                ewarn "Previous apache chroot installation is detected"
                ewarn "If you want to force installation in any way, set"
                ewarn "force_apachechroot flag"
                exit
        fi

for i in $MODULES_CHROOT
do
        if [ -e $i ] ; then
                i=$i
        else
                i=""
        fi
done


#Dependency finder function
copy_dependencies() {

for i in $(ldd $1 |awk -F"=>" {'print $2'}| awk -F" " {'print $1'} | grep -v '^(')
do
   cp --parents $i $CHROOT/
done

#Catch other libraries missed by above loop
for i in $(ldd $1 |awk -F" " {'print $1'}|grep "^/")
do
        cp  --parents $i $CHROOT/
done
}


#Apache is being chrooted so it is not necessary to check its existence
        copy_dependencies $apache_bin
        cp --parents $apache_bin $CHROOT/

if [ ! -z $php_module ] ; then
        copy_dependencies $php_module
        cp --parents $php_module $CHROOT/
fi

if [ ! -z $ssl_module ] ; then
        copy_dependencies $ssl_module
        cp --parents $ssl_module $CHROOT/
fi

if [ ! -z $sendmail ] ; then
        copy_dependencies $sendmail
        cp --parents $sendmail $CHROOT/
fi

#Create directories
einfo "Creating necessary directories for chroot environment"
sleep 2
mkdir -p $CHROOT/{dev,tmp,etc,var,var/run/cache,var/log/apache2,var/cache/apache2}
chmod 1777 $CHROOT/tmp

#Create devices
einfo "Creating device files"
sleep 2
mknod -m 644 $CHROOT/dev/random c 1 8
mknod -m 644 $CHROOT/dev/urandom c 1 9
mknod -m 666 $CHROOT/dev/null c 1 3
mknod -m 666 $CHROOT/dev/zero c 1 5


#Copying necessary conf files
einfo "Copying conf files"
sleep 2
cp /etc/{localtime,ld.so.conf,ld.so.cache,nsswitch.conf,hosts,resolv.conf} $CHROOT/etc
echo "apache:x:200:200:apache:/:/sbin/nologin" > $CHROOT/etc/passwd
echo "apache:x:200:" > $CHROOT/etc/group

#Startup configuration and scripts
cp ${FILESDIR}/apache2_chroot /etc/init.d/
cp -dR --parents /etc/apache2 $CHROOT/
#Create apache2_chroot configuration
cp /etc/conf.d/apache2 /etc/conf.d/apache2_chroot


#Add variables to the new chroot config if it wasn't created before
if [ ! -e /etc/conf.d/apache2_chroot ] || ! $(grep CHROOT /etc/conf.d/apache2_chroot) ; then

        echo "CHROOT=${CHROOT}" >> /etc/conf.d/apache2_chroot
        echo "APACHEBIN=/usr/sbin/apache2" >> /etc/conf.d/apache2_chroot

fi

#Copy apache modules directories with symlinks
einfo "Copying apache root directory"
sleep 2
cp -dR /usr/lib/apache2 $CHROOT/usr/lib
cp -dR --parents ${DATADIR} $CHROOT/


#Detect language
language_extract=$(set | grep "^LANG=")
language=`echo $language_extract |perl -pe 's/.*(.._..).*/$1/'`


if [ -z $language ]; then
        einfo "Copying /usr/lib/locale directory, takes a bit time"
        sleep 2
        #Copy large locale dir :(
        cp --parents -dR /usr/lib/locale $CHROOT/
else
        einfo "Coping $language language files to $CHROOT/usr/lib/locale"
        cp -dR --parents /usr/lib/$language.utf8 $CHROOT
        cp -dR --parents /usr/lib/$language $CHROOT

fi


#Be sure that these libs are copied, chroot will not work even one is missing.
cp /lib/{libnss_dns.so.2,libnss_files.so.2,libnss_compat.so.2} $CHROOT/lib

sleep 2

echo
echo
echo
einfo "You can start new chroot apache with :"
einfo "/etc/init.d/apache2_chroot start"

}


After this appending, it is necessary to create a seperate startup script like below;

Code:

#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

opts="$opts reload"
depend() {
        need net
        use mysql dns logger netmount postgres
        after sshd
        }

start() {
        ebegin "Starting chrooted Apache2"
        chroot $CHROOT ${APACHEBIN} -k start ${APACHE2_OPTS}
        eend $?
}

stop() {
        ebegin "Stopping chrooted Apache2"
        chroot $CHROOT ${APACHEBIN} -k stop ${APACHE2_OPTS}
        eend $?
}

restart() {
        svc_stop
        sleep 5
        svc_start

}

reload() {
        ebegin "Reloading Apache2..."
        kill -1 $(cat $PID)
        eend $?
}


After these steps, running the following command will install apache chroot ;

Code:

ebuild /usr/portage/net-www/apache/apache-2.0.52-r1.ebuild config


Then ;
Code:

/etc/init.d/apache2_chroot start

will start chrooted apache.

I just would like to have your opinion and suggestion about this code.


Last edited by pointers on Sat May 14, 2005 11:19 am; edited 1 time in total
Back to top
View user's profile Send private message
manicman
n00b
n00b


Joined: 30 Jun 2004
Posts: 19

PostPosted: Sat May 07, 2005 12:28 pm    Post subject: Reply with quote

i have followed your howto and appended your ebuild script to the ebuild of apache.
after that i have created the startupscript and did
Code:

ebuild /usr/portage/net-www/apache/apache-2.0.54.ebuild config

while running this i got the following errors:
Code:

root@manicman-mobile - Sa Mai 07 14:17:50 - /usr/portage/net-www/apache
>ebuild /usr/portage/net-www/apache/apache-2.0.54.ebuild config
ldd: /usr/lib/apache2-extramodules/mod_ssl.so: Datei oder Verzeichnis nicht gefunden
ldd: /usr/lib/apache2-extramodules/mod_ssl.so: Datei oder Verzeichnis nicht gefunden
cp: Aufruf von stat für „/usr/lib/apache2-extramodules/mod_ssl.so“ nicht möglich: Datei oder Verzeichnis nicht gefunden
 * Creating necessary directories for chroot environment
 * Creating device files
 * Copying conf files
cp: Aufruf von stat für „/usr/portage/net-www/apache/files/apache2_chroot“ nicht möglich: Datei oder Verzeichnis nicht gefunden
 * Copying apache root directory
cp: Fehlende Zieldatei
„cp --help“ gibt weitere Informationen.
 * Copying /usr/lib/locale directory, takes a bit time



 * You can start new chroot apache with :
 * /etc/init.d/apache2_chroot start

anyway i tried to start the chrooted apache and got this:
Code:

root@manicman-mobile - Sa Mai 07 14:21:00 - /etc/init.d
>/etc/init.d/apache.chrooted start
 * Caching service dependencies ...                                                                      [ ok ]
 * Starting chrooted Apache2 ...
chroot: Es ist nicht möglich, das Wurzelverzeichnis in -k zu ändern: Datei oder Verzeichnis nicht gef  [ !! ]

chroot says in english it is not possible to change the root dir in -k: file or directory has not been found.

any ideas?
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Sun May 08, 2005 1:38 pm    Post subject: a mistake Reply with quote

Hi,
upon your message, I have realized my mistake in the ebuild and I changed it a little bit. I have tried this in my 2005.0
again and I got no error. If you again receive any errors even if you apply the steps written below, pls let me know.

Here is the bottom section of apache ebuild.

Code:

pkg_config()
{

CHROOT="/chroot/apache"
apache_bin="/usr/sbin/apache2"

#Check module and binary existence
php_module="/usr/lib/apache2-extramodules/libphp4.so"
ssl_module="/usr/lib/apache2-extramodules/mod_ssl.so"
sendmail="/usr/sbin/sendmail"

#Warn if there is a previous installation and suggest a flag
        if [ -e $CHROOT/$apache_bin ] && ! use force_apachechroot ; then
                ewarn "Previous apache chroot installation is detected"
                ewarn "If you want to force installation in any way, set"
                ewarn "force_apachechroot flag"
                exit
        fi




#Dependency finder function
copy_dependencies() {

for i in $(ldd $1 |awk -F"=>" {'print $2'}| awk -F" " {'print $1'} | grep -v '^(')
do
   cp --parents $i $CHROOT/
done

#Catch other libraries missed by above loop
for i in $(ldd $1 |awk -F" " {'print $1'}|grep "^/")
do
        cp  --parents $i $CHROOT/
done
}

#Creaye chroot dir firs
mkdir -p $CHROOT

#Apache is being chrooted so it is not necessary to check its existence
                copy_dependencies $apache_bin
                cp --parents $apache_bin $CHROOT/

if [ -e $php_module ] ; then
        copy_dependencies $php_module
        cp --parents $php_module $CHROOT/
fi

if [ -e $ssl_module ] ; then
        copy_dependencies $ssl_module
        cp --parents $ssl_module $CHROOT/
fi

if [ -e $sendmail ] ; then
        copy_dependencies $sendmail
        cp --parents $sendmail $CHROOT/
fi

#Create directories
einfo "Creating necessary directories for chroot environment"
sleep 2
mkdir -p $CHROOT/{dev,tmp,etc,var,var/run/cache,var/log/apache2,var/cache/apache2}
chmod 1777 $CHROOT/tmp

#Create devices
einfo "Creating device files"
sleep 2
mknod -m 644 $CHROOT/dev/random c 1 8
mknod -m 644 $CHROOT/dev/urandom c 1 9
mknod -m 666 $CHROOT/dev/null c 1 3
mknod -m 666 $CHROOT/dev/zero c 1 5


#Copying necessary conf files
einfo "Copying conf files"
sleep 2
cp /etc/{localtime,ld.so.conf,ld.so.cache,nsswitch.conf,hosts,resolv.conf} $CHROOT/etc
echo "apache:x:81:81:apache:/:/sbin/nologin" > $CHROOT/etc/passwd
echo "apache:x:81:" > $CHROOT/etc/group

#Startup configuration and scripts
einfo "Copying startup script into /etc/init.d/apache2_chroot"
sleep 1
cp -f ${FILESDIR}/apache2_chroot /etc/init.d/
chmod 755 /etc/init.d/apache2_chroot
cp -dR --parents /etc/apache2 $CHROOT/
#Create apache2_chroot configuration
cp /etc/conf.d/apache2 /etc/conf.d/apache2_chroot


#Add variables to the new chroot config if it wasn't created before
if [ ! -e /etc/conf.d/apache2_chroot ] || ! $(grep CHROOT /etc/conf.d/apache2_chroot) ; then

        echo "CHROOT=${CHROOT}" >> /etc/conf.d/apache2_chroot
        echo "APACHEBIN=/usr/sbin/apache2" >> /etc/conf.d/apache2_chroot

fi

#Copy apache modules directories with symlinks
einfo "Copying apache root directory"
sleep 2
cp -dR /usr/lib/apache2 $CHROOT/usr/lib
cp -dR --parents ${DATADIR} $CHROOT/


#Detect language
language_extract=$(set | grep "^LANG=")
language=`echo $language_extract |perl -pe 's/.*(.._..).*/$1/'`


if [ -z $language ]; then
        einfo "Copying /usr/lib/locale directory, takes a bit time"
        sleep 2
        #Copy large locale dir :(
        cp --parents -dR /usr/lib/locale $CHROOT/
else
        einfo "Coping $language language files to $CHROOT/usr/lib/locale"
        cp -dR --parents /usr/lib/$language.utf8 $CHROOT
        cp -dR --parents /usr/lib/$language $CHROOT

fi


#Be sure that these libs are copied, chroot will not work even one is missing.
cp /lib/{libnss_dns.so.2,libnss_files.so.2,libnss_compat.so.2} $CHROOT/lib

sleep 2
echo
echo
echo
einfo "You can start new chroot apache with :"
einfo "/etc/init.d/apache2_chroot start"

}


Above code is the new ebuild. After you have written this code to the bottom of
Quote:
/usr/portage/net-www/apache/apache-2.0.52-r1.ebuild
file.

Then write startup script apache2_chroot file which is written below to the location:
Quote:
/usr/portage/net-www/apache/files/


apache2_chroot startup script
Code:

#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

opts="$opts reload"
depend() {
        need net
        use mysql dns logger netmount postgres
        after sshd
        }

start() {
        ebegin "Starting chrooted Apache2"
        chroot $CHROOT ${APACHEBIN} -k start ${APACHE2_OPTS}
        eend $?
}

stop() {
        ebegin "Stopping chrooted Apache2"
        chroot $CHROOT ${APACHEBIN} -k stop ${APACHE2_OPTS}
        eend $?
}

restart() {
        svc_stop
        sleep 5
        svc_start

}

reload() {
        ebegin "Reloading Apache2..."
        kill -1 $(cat $PID)
        eend $?
}


Now it is time to start installation;
Code:

ebuild /usr/portage/net-www/apache/apache-2.0.52-r1.ebuild config


All the commands in this ebuild works for me. If you get any errors, I will look at it.
Now start chrooted apache.
Code:
/etc/init.d/apache2_chroot start

Now all the configuration files and virtualhosts must be defined under /chroot/apache directory. It is our new dir.

Here is the output from my installation stage with no problem.

Code:
kenny apache # ebuild apache-2.0.52-r1.ebuild config
 * Creating necessary directories for chroot environment
 * Creating device files
 * Copying conf files
 * Copying startup script into /etc/init.d/apache2_chroot
 * Copying apache root directory
 * Copying /usr/lib/locale directory, takes a bit time



 * You can start new chroot apache with :
 * /etc/init.d/apache2_chroot start
kenny apache # /etc/init.d/apache2_chroot start
 * Re-caching dependency info (mtimes differ)...
 * Starting chrooted Apache2...                                                                                                     [ ok ]
kenny apache # ps auwx|grep apache
root     12352  0.0  2.5  26616  9848 ?        Ss   16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
apache   12354  0.0  2.1  26032  8336 ?        S    16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
apache   12355  0.0  2.5  26616  9880 ?        S    16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
apache   12356  0.0  2.5  26616  9880 ?        S    16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
apache   12357  0.0  2.5  26616  9880 ?        S    16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
apache   12358  0.0  2.5  26616  9880 ?        S    16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
apache   12359  0.0  2.5  26616  9880 ?        S    16:16   0:00 /usr/sbin/apache2 -k start -D PHP4
root     12375  0.0  0.1   1468   452 pts/4    R+   16:16   0:00 grep apache
kenny apache #
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Mon May 09, 2005 7:37 am    Post subject: deleting old files Reply with quote

Before applying the new ebuild,
it is better to remove old directory with;
Code:

#rm -rf /chroot/apache
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Sat May 14, 2005 11:17 am    Post subject: php mail function Reply with quote

I have discovered that php mail function does not work if you don't do something special. I have changed my ebuild
and removed sendmail. Then provide instructions to use mini_sendmail package. After applying this new ebuild,
and instructions we can use php mail function in apache chroot. Here is the ebuild page:

Here is the config section of the ebuild.

Code:

pkg_config()
{

CHROOT="/chroot/apache"
apache_bin="/usr/sbin/apache2"

#Check module and binary existence
php_module="/usr/lib/apache2-extramodules/libphp4.so"
ssl_module="/usr/lib/apache2-extramodules/mod_ssl.so"

#Warn if there is a previous installation and suggest a flag
        if [ -e $CHROOT/$apache_bin ] && ! use force_apachechroot ; then
                ewarn "Previous apache chroot installation is detected"
                ewarn "If you want to force installation in any way, set"
                ewarn "force_apachechroot flag"
                exit
        fi




#Dependency finder function
copy_dependencies() {

for i in $(ldd $1 |awk -F"=>" {'print $2'}| awk -F" " {'print $1'} | grep -v '^(')
do
   cp --parents $i $CHROOT/
done

#Catch other libraries missed by above loop
for i in $(ldd $1 |awk -F" " {'print $1'}|grep "^/")
do
        cp  --parents $i $CHROOT/
done
}

#Creaye chroot dir firs
mkdir -p $CHROOT

#Apache is being chrooted so it is not necessary to check its existence
                copy_dependencies $apache_bin
                cp --parents $apache_bin $CHROOT/

if [ -e $php_module ] ; then
        copy_dependencies $php_module
        cp --parents $php_module $CHROOT/
fi

if [ -e $ssl_module ] ; then
        copy_dependencies $ssl_module
        cp --parents $ssl_module $CHROOT/
fi


#Create directories
einfo "Creating necessary directories for chroot environment"
sleep 2
mkdir -p $CHROOT/{dev,tmp,etc,var,var/run/cache,var/log/apache2,var/cache/apache2}
chmod 1777 $CHROOT/tmp

#Create devices
einfo "Creating device files"
sleep 2
mknod -m 644 $CHROOT/dev/random c 1 8
mknod -m 644 $CHROOT/dev/urandom c 1 9
mknod -m 666 $CHROOT/dev/null c 1 3
mknod -m 666 $CHROOT/dev/zero c 1 5


#Copying necessary conf files
einfo "Copying conf files"
sleep 2
cp /etc/{localtime,ld.so.conf,ld.so.cache,nsswitch.conf,hosts,resolv.conf} $CHROOT/etc
echo "apache:x:81:81:apache:/:/sbin/nologin" > $CHROOT/etc/passwd
echo "apache:x:81:" > $CHROOT/etc/group

#PHP
cp -R --parents /etc/php $CHROOT/
cp -R --parents  /usr/lib/php $CHROOT
#copy sh, it is necessary for php mail function to work.
cp --parents /bin/sh $CHROOT   


#Startup configuration and scripts
einfo "Copying startup script into /etc/init.d/apache2_chroot"
sleep 1
cp -f ${FILESDIR}/apache2_chroot /etc/init.d/
chmod 755 /etc/init.d/apache2_chroot
cp -dR --parents /etc/apache2 $CHROOT/
#Create apache2_chroot configuration
cp /etc/conf.d/apache2 /etc/conf.d/apache2_chroot


#Add variables to the new chroot config if it wasn't created before
if [ ! -e /etc/conf.d/apache2_chroot ] || ! $(grep CHROOT /etc/conf.d/apache2_chroot) ; then

        echo "CHROOT=${CHROOT}" >> /etc/conf.d/apache2_chroot
        echo "APACHEBIN=/usr/sbin/apache2" >> /etc/conf.d/apache2_chroot
        echo "PID=$CHROOT/var/run/apache2.pid" >> /etc/conf.d/apache2_chroot

fi

#Copy apache modules directories with symlinks
einfo "Copying apache root directory"
sleep 2
cp -dR /usr/lib/apache2 $CHROOT/usr/lib
cp -dR --parents ${DATADIR} $CHROOT/


#Detect language
language_extract=$(set | grep "^LANG=")
language=`echo $language_extract |perl -pe 's/.*(.._..).*/$1/'`


if [ -z $language ]; then
        einfo "Copying /usr/lib/locale directory, takes a bit time"
        sleep 2
        #Copy large locale dir
        cp --parents -dR /usr/lib/locale $CHROOT/
else
        einfo "Coping $language language files to $CHROOT/usr/lib/locale"
        cp -dR --parents /usr/lib/$language.utf8 $CHROOT
        cp -dR --parents /usr/lib/$language $CHROOT

fi


#Be sure that these libs are copied, chroot will not work even one is missing.
cp /lib/{libnss_dns.so.2,libnss_files.so.2,libnss_compat.so.2} $CHROOT/lib

sleep 2
echo
einfo "For the php mail function to work properly get mini_sendmail software from:"
einfo "http://www.acme.com/software/mini_sendmail/mini_sendmail-1.3.5.tar.gz"
einfo "and  copy mini_sendmail binary to $CHROOT/usr/sbin/mini_sendmail"
einfo "Then change sendmail_path in $CHROOT/etc/php/apache2-php4/php.ini into;"
einfo "sendmail_path = /usr/sbin/mini_sendmail -t -i "
echo
ewarn "To be able to reach mysql in chroot, change mysql socket path into "
ewarn "$CHROOT/tmp/mysqld.sock in /etc/mysql/my.cnf"
echo
einfo "You can start new chroot apache with :"
einfo "/etc/init.d/apache2_chroot start"

}


I hope this ebuild will help those who wants to install apache in chroot.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sat May 14, 2005 11:19 am    Post subject: Reply with quote

Moved from Portage & Programming.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Sun May 15, 2005 10:10 am    Post subject: new project page Reply with quote

Hi,
I have created a project page for this apache2 chroot ebuild. I have made my latest test on this ebuild and will use it in a production server nearly. So I will test it more deeply. I have eliminated php mail function problem. Since apache chroot environment
was causing problems in sending mail through php. This ebuild doesnt have any function detrimental to any system. It does all of the things under /chroot/apache directory just copiying real binary programs and configuration files. So if you want to remove chroot, it is enough to delete /chroot/apache :)

Here is the project page. Any comments are welcomed which lead this
ebuild into a stable one. Project page: http://www.genco.gen.tc/gentoo_chroot_apache2.html
By the way , page name genco.gen.tc has not any relation with gentoo. genco is my real name.


Best Regards.
Back to top
View user's profile Send private message
manicman
n00b
n00b


Joined: 30 Jun 2004
Posts: 19

PostPosted: Sun May 15, 2005 11:52 am    Post subject: Reply with quote

I have the problem that i need a apache and a tomcat with a sun jdk in a chroot if i wanna run the apache chrooted. i think i have to learn how to write ebuilds to chroot everything i need.
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Sun May 15, 2005 12:03 pm    Post subject: tomcat Reply with quote

actually yes,
chroot requires all dependent files in the chroot environment.
Back to top
View user's profile Send private message
tfunk
n00b
n00b


Joined: 06 Apr 2004
Posts: 67

PostPosted: Wed May 18, 2005 1:55 am    Post subject: Reply with quote

I just wanted to thank you for your effort on this...As a noob it's great that the heavy lifting to chroot apache2 has been done already!

I know a bunch of us noobs will really appreciate it!!!!
_________________
========================================================
ILLEGITIMUS NON CARBORUNDUM
========================================================
Back to top
View user's profile Send private message
pointers
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2004
Posts: 123

PostPosted: Wed May 18, 2005 6:01 am    Post subject: thanks Reply with quote

hi,
thanks for your nice words friend. I have been working on this chrooting for a long time. I had really needed this automation.
Gentoo also has some differences in chrooting. It requires additonal operation. I hope everyone will use it and like it:)

I started to use this chrooted in a test server which will be a production server nearly. I will update ebuild if any change is necessary.


best regards.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Fri Nov 25, 2005 3:56 pm    Post subject: Reply with quote

For people looking for a clean way to install mini_sendmail; here is a ebuild that does just that:
Code:
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="Extremely simple dummy-MTA to get mail delivered to the LOCAL MTA"
HOMEPAGE="Extremely simple MTA to get mail off the system to a Mailhub"
SRC_URI="http://www.acme.com/software/mini_sendmail/${P}.tar.gz"

LICENSE=""
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND=""
RDEPEND=""

src_install() {
        dodir /usr/sbin
        dosbin mini_sendmail
        chmod 755 ${D}/usr/sbin/mini_sendmail

        doman mini_sendmail.8
        dodoc README
}

This works with me... but I probabely forgot hundreds of things
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum