Noticed that apache 2 ebuild is hard masked and am trying to patch the 2.2.9-r1 ebuild to work on Solaris (prefix). Looking for a mentor/collaborator and uploading work-in-progress patches. ebuild now succeeds but runscript doesn't yet work. Reproducible: Always Steps to Reproduce: 1. ebuild /apps/gpp/usr/portage/www-servers/apache/apache-2.2.9-r1.ebuild clean merge 2. $EPREFIX/etc/init.d/apache2 start
Created attachment 166295 [details, diff] patch for apache-2.2.9-r1.ebuild
We wouldn't really expect the init files to work (nor would it really be possible). Does everything else work?
Created attachment 166299 [details, diff] patch for apache-2.eclass
Created attachment 166301 [details, diff] patch file for 2.2.9-r1 apache ebuild. goes in the files directory.
What is the state of baselayout for the Prefixed portage? Can you point me in the right direction in this regard? As for the resulting apache2 binary, it is not yet working. It reads some configuration, makes it as far as the first fork(), loads libz and then fails right after accessing the Solaris Name Service door. /apps/gpp/usr/sbin/apache2 -V Server version: Apache/2.2.9 (Unix) Server built: Sep 24 2008 12:57:07 Server's Module Magic Number: 20051115:15 Server loaded: APR 1.3.2, APR-Util 1.3.2 Compiled using: APR 1.3.2, APR-Util 1.3.2 Architecture: 64-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FCNTL_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/apps/gpp/usr" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="/apps/gpp/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/apps/gpp/var/run/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/apps/gpp/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/apps/gpp/etc/apache2/httpd.conf"
(In reply to comment #5) > What is the state of baselayout for the Prefixed portage? Can you point me in > the right direction in this regard? bug 196294
Created attachment 166421 [details, diff] Updated ebuild patch
Created attachment 166422 [details, diff] updated eclass patch
Created attachment 166423 [details] updated prefix patch for the files directory
The install is cleaner now. Fixed a autoconf bug present in the 2.2.9-r1 gentoo prefix patch. Apache server binary still does not start. Will look into bind() code next. (125)Address already in use: make_sock: could not bind to address [::]:80
I made the appropriate changes to the apache-2.eclass file. However, it is important to know that we want to remain as similar as possible to the original. As such, we shouldn't be adding einfo's or ebeep's etc. I think you might want to look at lines 258-267 as well.
(In reply to comment #10) > The install is cleaner now. Fixed a autoconf bug present in the 2.2.9-r1 > gentoo prefix patch. > > Apache server binary still does not start. Will look into bind() code next. > > (125)Address already in use: make_sock: could not bind to address [::]:80 > Can you bind to an unpriveleged port, eg 8080?
It turns out that manually building this same apache package but to a different prefix does not exhibit the behavior. When built with the ebuild prefix, at startup apache mistakenly trys to listen twice on the same TCP port. This is due to finding two Modules's worth of configuration directives for the Listener configuration node in the ap_walk_config_sub() function when calling apr_hash_get(). ml = apr_hash_get(ap_config_hash, dir, APR_HASH_KEY_STRING); Above, ml returns a linked list with two entries (two modules). Both modules are the Listen so a duplication seems to be happening. If I run "apache -X -L" to list the available configuration directive, the Listen module is listed twice. Many other modules are also listed twice. I suspect the configuration routines at startup are picking up modules from another installation of apache (perhaps the one that comes bundled with Solaris).
At startup, the apache binary contains multiple copies of mod_http and other (normally dynamically loaded) modules. Found that the autoconf-generated configure script will erroneously assign duplicate module names to BUILTIN_LIBS, MODULE_CLEANDIRS and MODULE_DIRS environment variables as seen in config.log. This results in the module names going into modules.c more than once and thus they are listed multiple times at link time.
It turned out the ebuild unpack step was causing the confusion for autoconf/configure. Maybe the previous prefix patch predated the apache-2.eclass? I will upload new ebuild and eclass patches for review. I addressed suexec prefix paths as requested. I'll be doing my testing on sparc64-solaris and x64-solaris architectures including testing Subversion 1.5.2 dav_svn and authz_svn modules.
Created attachment 170138 [details, diff] working patch for apache-2.2.9-r1.ebuild
Created attachment 170140 [details, diff] working patch for apache-2.eclass
Created attachment 170141 [details, diff] eclass patch relative to 20081028 rsync mirror
Created attachment 170143 [details, diff] ebuild patch relative to 20081028 rsync mirror
(In reply to comment #17) > Created an attachment (id=170140) [edit] > working patch for apache-2.eclass > Why do you suggest to do stuff like: - MY_CONF="${MY_CONF} --with-ssl="${EPREFIX}/usr" --enable-ssl=${mod_type}" + MY_CONF="${MY_CONF} --with-ssl=${EROOT}usr --enable-ssl=${mod_type}" EPREFIX is proper here and EROOT is not. I already made changes to the apache-2 eclass to with regards to your last patch (see comment #11).
Good point on EPREFIX vs. EROOT. I missed that rule initially and appreciate the guidance. I will update the patch attachments now based on 10.28 rsync mirror of portage. Sniff testing on AMD64 and SPARC Solaris 10 looks good. I did not text suexec.
Created attachment 170253 [details, diff] eclass patch relative to 20081028 rsync mirror
Created attachment 170254 [details, diff] ebuild patch relative to 20081028 rsync mirror
Created attachment 170259 [details, diff] ebuild patch relative to 20081028 rsync mirror
Created attachment 170266 [details, diff] ebuild patch relative to 20081028 rsync mirror
(In reply to comment #22) > Created an attachment (id=170253) [edit] > eclass patch relative to 20081028 rsync mirror > Still not perfect. Can I ask you to do two things: point 1: %% echo $EPREFIX /home/jolexa/portage/linux-64 EPREFIX does not contain a trailing "/" so fix things like: + elog " SUEXEC_SAFEPATH: Default PATH for suexec (default: ${EPREFIX}usr/local/bin:${EPREFIX}usr/bin:${EPREFIX}bin)" point 2: You should quote ${EPREFIX} - Technically, you can have a space in it. So, + --sysconfdir=${EPREFIX}etc/apache2 \ is wrong because of point 1 above and it should be "${EPREFIX}/etc/apache2" - notice the quotes. Lastly, I suggest that you make the eclass changes and then recompile apache ;) You would have caught point 1 yourself. thx
Did you grab one of the obsoleted patch attachments? The ebuilds succeed with attachments 166423 and 170253. In any case I updated the eclass with EPREFIX quoted. A Good Idea. I am adding a patch for the depend.apache.eclass file. I will upload ebuild, eclasses and fresh "latest" patches based on today's RSYNC.
Created attachment 170931 [details, diff] eclass/depend.apache.eclass patch
Created attachment 170932 [details, diff] app-admin/apache-tools/apache-tools-2.2.9.ebuild patch
Created attachment 170934 [details, diff] latest apache-2.eclass patch
Created attachment 170935 [details, diff] latest apache-2.2.9-r1 ebuild patch
(In reply to comment #30) > Created an attachment (id=170934) [edit] > latest apache-2.eclass patch > Good, nothing stands out at me right now. I will scrutinize more and test soon here. =)
Created attachment 170937 [details] apache-2.2.9-r1.ebuild
Created attachment 170938 [details] apache-2.eclass
Alrighty, committed to the tree. I will lift the mask next week after I can test it. Thanks for your hard work and timely responses.
Of course...The day after I commit this, we have apache 2.2.10 in the tree. This is not good, in apache-2.eclass because it doesn't apply to 2.2.10 =/ apache-2_src_unpack() { unpack ${A} cd "${S}" pushd "${GENTOO_PATCHDIR}" epatch "${FILESDIR}"/${PN}-2.2.9-r1-prefix.patch eprefixify \ conf/httpd.conf \ <snip>
Additionally, 2.2.9-r1 compiles for me just fine. So, I will mask 2.2.10 and unmask 2.2.9. Please, if you desire, post a solution in a new bug for 2.2.10. Thanks.