Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using yaourt to automatically compile Apache from source every time there’s an update available from extra. I am doing this so that I can have a custom suexec docroot (/srv/www rather than the default /srv/http). This has worked flawlessly for several updates, until now.

$ yaourt -S apache
==> Building apache from sources.

==> Retrieving PKGBUILD and local sources...
receiving file list ... done
./
PKGBUILD
apache.conf.d
apache.install
apache.tmpfiles.conf
apachectl-confd.patch
arch.layout
httpd
httpd.logrotate
pcre_info.patch

sent 199 bytes  received 10416 bytes  7076.67 bytes/sec
total size is 9809  speedup is 0.92
=> removes/replaces '--with-suexec-docroot=\/srv\/http' by '--with-suexec-docroot=\/srv\/www' in global
--- ./PKGBUILD  2012-07-06 00:02:13.000000000 -0400
+++ ./PKGBUILD.custom   2012-07-06 15:49:03.000000000 -0400
@@ -102,7 +102,7 @@
            --enable-so \
            --enable-suexec \
            --with-suexec-caller=http \
-           --with-suexec-docroot=/srv/http \
+           --with-suexec-docroot=/srv/www \
            --with-suexec-logfile=/var/log/httpd/suexec.log \
            --with-suexec-bin=/usr/sbin/suexec \
            --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
==> Edit PKGBUILD ? [y/N] ("A" to abort)
==> ------------------------------------
==> n

==> apache dependencies:
 - openssl (already installed)
 - zlib (already installed)
 - apr-util (already installed)
 - pcre (already installed)


==> Edit apache.install ? [y/N] ("A" to abort)
==> ------------------------------------------
==> n

==> Continue building apache ? [Y/n]
==> --------------------------------
==> 
==> Building and installing package
==> Making package: apache 2.2.22-4 (Thu Jul  5 14:47:33 EDT 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Downloading httpd-2.2.22.tar.bz2...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5252k  100 5252k    0     0  93231      0  0:00:57  0:00:57 --:--:-- 93283
  -> Downloading httpd-2.2.22.tar.bz2.asc...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   835  100   835    0     0   5191      0 --:--:-- --:--:-- --:--:-- 10437
  -> Downloading 02-rename-prefork-to-itk.patch...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:01:06 --:--:--     0curl: (7)     couldn't connect to host
==> ERROR: Failure while downloading 02-rename-prefork-to-itk.patch
    Aborting...
==> ERROR: Makepkg was unable to build apache.
==> Restart building apache ? [y/N]
==> -------------------------------
==> 

The problem seems to be that curl can’t find 02-rename-prefork-to-itk.patch. I don’t know what URL that’s located at, in what file it’s specified, or how I might find an alternate location for it. Any idea what is going on/how to troubleshoot?

share|improve this question
    
See this thread on the Arch boards... –  jasonwryan Jul 5 '12 at 19:15
    
@jasonwryan When I try to view the thread I get an error, Bad request. The link you followed is incorrect or outdated.. –  Bryan Dunsmore Jul 5 '12 at 19:27
    
My bad: I assumed you were a registered user. Essentially, Apache is outdated, you have to wait until all the modules are built against the newer version (a non-trivial task). –  jasonwryan Jul 5 '12 at 20:01
    
So, is this unfixable in the interim? –  Hugh Guiney Jul 5 '12 at 21:35
    
@jasonwryan It's okay. I actually have an account but I wasn't logged in on this computer. =P –  Bryan Dunsmore Jul 5 '12 at 21:46
show 3 more comments

4 Answers 4

up vote 1 down vote accepted

The host where some patches are located is down. But we can change it to another one.

First. Just download the PKGBUILD with yaourt:

yaourt -G apache

Change the following lines in PKGBUILD:

_itkurl=http://mpm-itk.sesse.net/apache2.2-mpm-itk-2.2.17-01

To:

_itkurl=http://distfiles.alpinelinux.org/distfiles/

Also, the patch 03-add-mpm-to-build-system.patch has a different md5, so we fix it. Just change the 4th line in the array "md5sums"

'cdfa04985a0efa850976aef01c2a0c40'

To:

'131408ad4dc7b18547b4e062e7e495ab'

The working PKGBUILD is here: http://pastebin.com/iK48xx8f

You can just replace it, if you want. And build apache with:

makepkg -i
share|improve this answer
    
While the problem had previously seemed to go away, it reappeared after I followed your instructions… which I did modify slightly, using yaourt -S apache rather than makepkg -i, because I need customizepkg to take effect (or the SuExec docroot would be /srv/http rather than /srv/www), but I doubt that would have made a difference. –  Hugh Guiney Jul 16 '12 at 22:00
    
OK, so, looks like when I did yaourt -S apache, that re-downloaded the PKGBUILD, which undid the previous steps. But I don’t know how to get it to not do this. –  Hugh Guiney Jul 16 '12 at 22:54
    
Got it to work! Just added your instructions as replace commands to /etc/customizepkg.d/apache. Thank you! –  Hugh Guiney Jul 16 '12 at 23:58
    
Glad you did! Just as a side note. When you do 'yaourt -G apache' (I mean "-G" not "-S") yaourt downloads the PKGBUILD, patches and install files into a new directory, in our case, named "apache". So you can manually customize any package before you build it. It's useful if you want to have the freedom to tweak the package or just to debug it as I did, for example. –  Aline Jul 17 '12 at 4:03
add comment
curl: (7)     couldn't connect to host

According to curl, it couldn't connect to the host. There may be many reasons for this, such as the file not being located on the server. My advice would be to try again later and if that doesn't work then to contact the host where the file is being downloaded from.

share|improve this answer
    
I did notice that, but I don’t know where curl’s trying to get the file from… I should have specified in my question, but I’m looking for how to troubleshoot this with regard to Arch Linux. –  Hugh Guiney Jul 5 '12 at 21:34
add comment

Wait, why are you trying to download the apache sources from AUR?? apache is definitely packaged in Arch.

pierre@bar code % pacman -Si apache
Repository     : extra
Name           : apache
Version        : 2.2.22-4
[...]

Verify that you have in /etc/pacman.conf:

[extra]
Include = /etc/pacman.d/mirrorlist

and at least a few mirrors uncommented in /etc/pacman.d/mirrorlist, then:

# pacman -Sy apache

and it should install just fine.

share|improve this answer
    
I’m not. I have a custom build of Apache that yaourt compiles on the fly whenever there’s an upgrade available from extra. –  Hugh Guiney Jul 6 '12 at 5:10
    
Would you care to provide more details about it? Sounds like it's broken. –  Pierre Carrier Jul 6 '12 at 8:48
    
Modified my post with more detail. –  Hugh Guiney Jul 6 '12 at 20:03
add comment

So, I’m not sure if this was due to my recent full system upgrade, or the URL being restored independently of that, but trying again later seemed to get rid of this particular error. However, I still can not build Apache, as I’ve now run into a new error, but that’s a separate issue.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.