Ticket #22470: www-yaws.diff

File www-yaws.diff, 18.1 KB (added by d.nezhinsky@…, 15 years ago)

Patch for upgrade yaws-1.76 to yaws-1.85

  • Portfile

    diff -ur yaws.orig/Portfile yaws/Portfile
    old new  
    22
    33PortSystem                      1.0
    44name                            yaws
    5 version                         1.76
     5version                         1.85
    66categories                      www
    77maintainers                     nomaintainer
    88platforms                       darwin
     
    1212                                        code. Yaws also features a built-in Wiki.
    1313homepage                        http://yaws.hyber.org/
    1414master_sites            http://yaws.hyber.org/download/
    15 checksums                       md5 c6072c4dc6664fa8be88e12baa458eaf \
    16                                         sha1 a2517bc95bde181561a2214329f5fcc80ded3c38 \
    17                                         rmd160 8107c46d7b4b34e1662e7aa585f2722da1d021b2
     15checksums                       md5 6941ea52638805246973bf94fd6e9a52 \
     16                                        sha1 2d6bd52af002f356d6738900a67550c5531a0b4a \
     17                                        rmd160 5be8e85019aade9d7e2213b981f27cc59995aecc
    1818
    1919depends_build           port:erlang
    2020
     
    5353post-destroot {
    5454        xinstall -d "${destroot}${prefix}/var/log/yaws/"
    5555        system "touch ${destroot}${prefix}/var/log/yaws/.turd"
    56         file rename "${destroot}${prefix}/etc/yaws.conf" "${destroot}${prefix}/etc/yaws.conf.template"
     56        file rename "${destroot}${prefix}/etc/yaws/yaws.conf" "${destroot}${prefix}/etc/yaws/yaws.conf.template"
    5757}
    5858
    5959post-install {
    60         ui_msg "Copy and customize ${prefix}/etc/yaws.conf.template to ${prefix}/etc/yaws.conf"
     60        ui_msg "Copy and customize ${prefix}/etc/yaws/yaws.conf.template to ${prefix}/etc/yaws/yaws.conf"
    6161}
    6262
    6363startupitem.create      yes
    6464startupitem.name        yaws
    65 startupitem.start       "${prefix}/bin/yaws --daemon --heart --conf ${prefix}/etc/yaws.conf"
     65startupitem.start       "${prefix}/bin/yaws --daemon --heart --conf ${prefix}/etc/yaws/yaws.conf"
    6666startupitem.stop        "${prefix}/bin/yaws --stop"
    6767
    6868livecheck.type  regex
  • files/patch-man-yaws.1

    diff -ur yaws.orig/files/patch-man-yaws.1 yaws/files/patch-man-yaws.1
    old new  
    1 --- man/yaws.1.orig     2006-04-28 04:25:10.000000000 +0900
    2 +++ man/yaws.1  2006-07-22 17:37:47.000000000 +0900
    3 @@ -39,9 +39,10 @@
     1--- man/yaws.1.orig     2009-11-09 10:01:46.000000000 +0200
     2+++ man/yaws.1  2009-11-09 10:01:51.000000000 +0200
     3@@ -54,9 +54,9 @@
    44 .TP
    55 \fB\--conf file\fR
    66 Use a different configuration file than the default. The default configuration file
    7 -when running as root is /etc/yaws.conf. When running as a non priviliged user, yaws
    8 -will search for its configuration file in the following order. First in
    9 -$HOME/yaws.conf, then in ./yaws.conf and finally in /etc/yaws.conf
    10 +when running as root is __PREFIX/etc/yaws.conf. When running as a non
    11 +priviliged user, yaws will search for its configuration file in the following order.
    12 +First in $HOME/yaws.conf, then in ./yaws.conf and
    13 +finally in __PREFIX/etc/yaws.conf
     7-when running as root is /etc/yaws/yaws.conf. When running as a non priviliged user, yaws
     8+when running as root is __PREFIX/etc/yaws/yaws.conf. When running as a non priviliged user, yaws
     9 will search for its configuration file in the following order. First in
     10-$HOME/yaws.conf, then in ./yaws.conf and finally in /etc/yaws/yaws.conf
     11+$HOME/yaws.conf, then in ./yaws.conf and finally in __PREFIX/etc/yaws/yaws.conf
    1412 .TP
    1513 \fB\--runmod module\fR
    1614 Tells yaws to call \fImodule:start/0\fR at startup. This makes it possible
  • files/patch-man-yaws.conf.5

    diff -ur yaws.orig/files/patch-man-yaws.conf.5 yaws/files/patch-man-yaws.conf.5
    old new  
    1 --- man/yaws.conf.5.orig        2008-04-03 23:27:18.000000000 +0200
    2 +++ man/yaws.conf.5     2008-04-13 22:13:23.000000000 +0200
     1--- man/yaws.conf.5.orig        2009-11-09 10:02:37.000000000 +0200
     2+++ man/yaws.conf.5     2009-11-09 10:03:31.000000000 +0200
    33@@ -1,6 +1,6 @@
    44 .TH YAWS.CONF "5" "" "" "User Commands"
    55 .SH NAME
    6 -/etc/yaws.conf \- Configuration file for the yaws webserver
    7 +__PREFIX/etc/yaws.conf \- Configuration file for the yaws webserver
     6-/etc/yaws/yaws.conf \- Configuration file for the yaws webserver
     7+__PREFIX/etc/yaws/yaws.conf \- Configuration file for the yaws webserver
    88 .SH DESCRIPTION
    99 .\" Add any additional description here
    1010 .PP
    11 @@ -506,11 +506,11 @@
    12  The following example defines a single server on port 80.
    13  .nf
    14  
    15 -logdir = /var/log/yaws
    16 +logdir = __PREFIX/var/log/yaws
    17  <server www.mydomain.org>
    18          port = 80
    19          listen = 192.168.128.31
    20 -        docroot = /var/yaws/www
    21 +        docroot = __PREFIX/var/yaws/www
    22  </server>
    23  .fi
    24  
    25 @@ -519,17 +519,17 @@
    26  
    27  .nf
    28  
    29 -logdir = /var/log/yaws
    30 +logdir = __PREFIX/var/log/yaws
    31  <server www.mydomain.org>
    32          port = 80
    33          listen = 192.168.128.31
    34 -        docroot = /var/yaws/www
    35 +        docroot = __PREFIX/var/yaws/www
    36  </server>
    37  
    38  <server www.funky.org>
    39          port = 80
    40          listen = 192.168.128.31
    41 -        docroot = /var/yaws/www_funky_org
    42 +        docroot = __PREFIX/var/yaws/www_funky_org
    43  </server>
    44  
    45  
    46 @@ -543,7 +543,7 @@
    47  <server www.mydomain.org>
    48          port = 80
    49          listen = 192.168.128.31
    50 -        docroot = /var/yaws/www
    51 +        docroot = __PREFIX/var/yaws/www
    52          access_log = false
    53          <auth>
    54              dir = secret/dir1
    55 @@ -568,7 +568,7 @@
    56  <server www.funky.org>
    57          port = 80
    58          listen = 192.168.128.31
    59 -        docroot = /var/yaws/www_funky_org
    60 +        docroot = __PREFIX/var/yaws/www_funky_org
    61          start_mod = btt
     11@@ -698,7 +698,7 @@
     12                 dir = secret/dir1
     13         </auth>
    6214         <opaque>
    63                  mydbdir = /tmp
    64 @@ -618,14 +618,14 @@
    65  
    66  .nf
    67  
    68 -logdir = /var/log/yaws
    69 +logdir = __PREFIX/var/log/yaws
    70  max_num_cached_files = 8000
    71  max_num_cached_bytes = 6000000
    72  
    73  <server www.mydomain.org>
    74          port = 80
    75          listen = 192.168.128.31
    76 -        docroot = /var/yaws/www
    77 +        docroot = __PREFIX/var/yaws/www
    78  </server>
    79  
    80  
    81 @@ -633,16 +633,16 @@
    82  <server www.funky.org>
    83          port = 80
    84          listen = 192.168.128.31
    85 -        docroot = /var/yaws/www_funky_org
    86 +        docroot = __PREFIX/var/yaws/www_funky_org
     15-                keytab = /etc/yaws/http.keytab
     16+                keytab = __PREFIX/etc/yaws/http.keytab
     17         </opaque>
    8718 </server>
    8819 
    89  <server www.funky.org>
    90          port = 443
     20@@ -740,8 +740,8 @@
    9121         listen = 192.168.128.32
    92 -        docroot = /var/yaws/www_funky_org
    93 +        docroot = __PREFIX/var/yaws/www_funky_org
     22         docroot = /var/yaws/www_funky_org
    9423         <ssl>
    9524-           keyfile = /etc/funky.key
    9625-           certfile = /etc/funky.cert
  • files/patch-man-yaws_api.5

    diff -ur yaws.orig/files/patch-man-yaws_api.5 yaws/files/patch-man-yaws_api.5
    old new  
    1 --- man/yaws_api.5.orig 2008-02-14 17:57:23.000000000 +0100
    2 +++ man/yaws_api.5      2008-04-13 22:17:31.000000000 +0200
    3 @@ -312,8 +312,8 @@
     1--- man/yaws_api.5.orig 2009-11-09 10:04:05.000000000 +0200
     2+++ man/yaws_api.5      2009-11-09 10:04:21.000000000 +0200
     3@@ -379,7 +379,7 @@
    44 .TP
    55 \fBsetconf(Gconf, Groups)\fR
    66 This function is intended for embedded mode in yaws. It makes it possible
    77-to load a yaws configuration from another data source than /etc/yaws.conf, such
    8 -as a database.
    9 +to load a yaws configuration from another data source than
    10 +__PREFIX/etc/yaws.conf, such as a database.
     8+to load a yaws configuration from another data source than __PREFIX/etc/yaws.conf, such
     9 as a database.
    1110 If yaws is started with the environment \fI{embedded, true}\fR, yaws will
    1211 start with an empty default configuration, and wait for some other
    13  program to execute a \fIsetconf/2\fR
  • files/patch-scripts-Install

    diff -ur yaws.orig/files/patch-scripts-Install yaws/files/patch-scripts-Install
    old new  
    1 --- scripts/Install.orig        2007-09-07 14:33:43.000000000 +0200
    2 +++ scripts/Install     2008-04-13 22:15:56.000000000 +0200
    3 @@ -36,58 +36,58 @@
     1--- scripts/Install.orig        2009-11-09 10:04:44.000000000 +0200
     2+++ scripts/Install     2009-11-09 10:08:54.000000000 +0200
     3@@ -37,58 +37,58 @@
    44 
    55 ## seems gentoo don't like to be installed in /usr/local/etc
    66 ## since /sbin/runscript still reads /etc/conf.d
    77-if [ -f /etc/gentoo-release ]; then
    8 -    install -d ${destdir}/${etcdir}/init.d/
    9 -    install -d ${destdir}/${etcdir}/conf.d/
    10 -    install -d ${destdir}/${vardir}/run/yaws
    11 -    chmod a+rwx ${destdir}/${vardir}/run/yaws
     8-    install -d ${destdir}${etcdir}/init.d/
     9-    install -d ${destdir}${etcdir}/conf.d/
     10-    install -d ${destdir}${vardir}/run/yaws
     11-    chmod a+rwx ${destdir}${vardir}/run/yaws
    1212-    sed -e  "s;%prefix%;$p;g"  \
    13 -       -e "s;%etcdir%;$e;g" gentoo/init.d.yaws > ${destdir}/${etcdir}/init.d/yaws
    14 -    chmod +x ${destdir}/${etcdir}/init.d/yaws
     13-       -e "s;%etcdir%;$e;g" gentoo/init.d.yaws > ${destdir}${etcdir}/init.d/yaws
     14-    chmod +x ${destdir}${etcdir}/init.d/yaws
    1515-elif [ -f /etc/redhat-release ]; then
    16 -    install -d ${destdir}/${etcdir}/init.d
     16-    install -d ${destdir}${etcdir}/init.d
    1717-    sed -e "s;%prefix%;$p;g" \
    18 -       -e "s;%etcdir%;$e;g" redhat/yaws.init.d >  ${destdir}/${etcdir}/init.d/yaws
    19 -    chmod +x ${destdir}/${etcdir}/init.d/yaws
    20 -    install -d ${destdir}/${vardir}/run/yaws
    21 -    chmod a+rwx ${destdir}/${vardir}/run/yaws
     18-       -e "s;%etcdir%;$e;g" redhat/yaws.init.d >  ${destdir}${etcdir}/init.d/yaws
     19-    chmod +x ${destdir}${etcdir}/init.d/yaws
     20-    install -d ${destdir}${vardir}/run/yaws
     21-    chmod a+rwx ${destdir}${vardir}/run/yaws
    2222-elif [ -f /etc/suseservers ]; then
    23 -    install -d ${destdir}/${etcdir}/init.d
     23-    install -d ${destdir}${etcdir}/init.d
    2424-    sed -e "s;%prefix%;$p;g" \
    25 -       -e "s;%etcdir%;$e;g" suse/yaws.init.d/ > ${destdir}/${etcdir}/init.d/yaws
    26 -    chmod +x ${destdir}/${etcdir}/init.d/yaws
    27 -    install -d ${destdir}/${vardir}/run/yaws
    28 -    chmod a+rwx ${destdir}/${vardir}/run/yaws
     25-       -e "s;%etcdir%;$e;g" suse/yaws.init.d/ > ${destdir}${etcdir}/init.d/yaws
     26-    chmod +x ${destdir}${etcdir}/init.d/yaws
     27-    install -d ${destdir}${vardir}/run/yaws
     28-    chmod a+rwx ${destdir}${vardir}/run/yaws
    2929-elif [ -f /etc/debian_version ]; then
    30 -    install -d ${destdir}/${etcdir}/init.d
     30-    install -d ${destdir}${etcdir}/init.d
    3131-    sed -e "s;%prefix%;$p;g" \
    32 -       -e "s;%etcdir%;$e;g" debian/yaws.init.d >  ${destdir}/${etcdir}/init.d/yaws
    33 -    chmod +x ${destdir}/${etcdir}/init.d/yaws
    34 -    install -d ${destdir}/${vardir}/run/yaws
    35 -    chmod a+rwx ${destdir}/${vardir}/run/yaws
     32-       -e "s;%etcdir%;$e;g" debian/yaws.init.d >  ${destdir}${etcdir}/init.d/yaws
     33-    chmod +x ${destdir}${etcdir}/init.d/yaws
     34-    install -d ${destdir}${vardir}/run/yaws
     35-    chmod a+rwx ${destdir}${vardir}/run/yaws
    3636-
    3737-elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
    3838-     startupdir="/Library/StartupItems/Yaws"
     
    4848-      # MacOS is particular about the ownership of startup items.
    4949-     chown -R root:wheel ${startupdir}
    5050-elif [ "`uname -s`" = "FreeBSD" ]; then
    51 -    sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}/${etcdir}/rc.d/yaws.sh
     51-    sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}${etcdir}/rc.d/yaws.sh
    5252-elif [ "`uname -s`" = "NetBSD" ]; then
    5353-    sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" netbsd/yaws.sh > /etc/rc.d/yaws
    5454-else   
    55 -    install -d ${destdir}/${etcdir}
     55-    install -d ${destdir}${etcdir}
    5656-    echo "Don't know how to make /etc/init scrips for this system"
    5757-    echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
    5858-fi
    5959+# if [ -f /etc/gentoo-release ]; then
    60 +#     install -d ${destdir}/${etcdir}/init.d/
    61 +#     install -d ${destdir}/${etcdir}/conf.d/
    62 +#     install -d ${destdir}/${vardir}/run/yaws
    63 +#     chmod a+rwx ${destdir}/${vardir}/run/yaws
     60+#     install -d ${destdir}${etcdir}/init.d/
     61+#     install -d ${destdir}${etcdir}/conf.d/
     62+#     install -d ${destdir}${vardir}/run/yaws
     63+#     chmod a+rwx ${destdir}${vardir}/run/yaws
    6464+#     sed -e  "s;%prefix%;$p;g"  \
    65 +#      -e "s;%etcdir%;$e;g" gentoo/init.d.yaws > ${destdir}/${etcdir}/init.d/yaws
    66 +#     chmod +x ${destdir}/${etcdir}/init.d/yaws
     65+#      -e "s;%etcdir%;$e;g" gentoo/init.d.yaws > ${destdir}${etcdir}/init.d/yaws
     66+#     chmod +x ${destdir}${etcdir}/init.d/yaws
    6767+# elif [ -f /etc/redhat-release ]; then
    68 +#     install -d ${destdir}/${etcdir}/init.d
     68+#     install -d ${destdir}${etcdir}/init.d
    6969+#     sed -e "s;%prefix%;$p;g" \
    70 +#      -e "s;%etcdir%;$e;g" redhat/yaws.init.d >  ${destdir}/${etcdir}/init.d/yaws
    71 +#     chmod +x ${destdir}/${etcdir}/init.d/yaws
    72 +#     install -d ${destdir}/${vardir}/run/yaws
    73 +#     chmod a+rwx ${destdir}/${vardir}/run/yaws
     70+#      -e "s;%etcdir%;$e;g" redhat/yaws.init.d >  ${destdir}${etcdir}/init.d/yaws
     71+#     chmod +x ${destdir}${etcdir}/init.d/yaws
     72+#     install -d ${destdir}${vardir}/run/yaws
     73+#     chmod a+rwx ${destdir}${vardir}/run/yaws
    7474+# elif [ -f /etc/suseservers ]; then
    75 +#     install -d ${destdir}/${etcdir}/init.d
     75+#     install -d ${destdir}${etcdir}/init.d
    7676+#     sed -e "s;%prefix%;$p;g" \
    77 +#      -e "s;%etcdir%;$e;g" suse/yaws.init.d/ > ${destdir}/${etcdir}/init.d/yaws
    78 +#     chmod +x ${destdir}/${etcdir}/init.d/yaws
    79 +#     install -d ${destdir}/${vardir}/run/yaws
    80 +#     chmod a+rwx ${destdir}/${vardir}/run/yaws
     77+#      -e "s;%etcdir%;$e;g" suse/yaws.init.d/ > ${destdir}${etcdir}/init.d/yaws
     78+#     chmod +x ${destdir}${etcdir}/init.d/yaws
     79+#     install -d ${destdir}${vardir}/run/yaws
     80+#     chmod a+rwx ${destdir}${vardir}/run/yaws
    8181+# elif [ -f /etc/debian_version ]; then
    82 +#     install -d ${destdir}/${etcdir}/init.d
     82+#     install -d ${destdir}${etcdir}/init.d
    8383+#     sed -e "s;%prefix%;$p;g" \
    84 +#      -e "s;%etcdir%;$e;g" debian/yaws.init.d >  ${destdir}/${etcdir}/init.d/yaws
    85 +#     chmod +x ${destdir}/${etcdir}/init.d/yaws
    86 +#     install -d ${destdir}/${vardir}/run/yaws
    87 +#     chmod a+rwx ${destdir}/${vardir}/run/yaws
     84+#      -e "s;%etcdir%;$e;g" debian/yaws.init.d >  ${destdir}${etcdir}/init.d/yaws
     85+#     chmod +x ${destdir}${etcdir}/init.d/yaws
     86+#     install -d ${destdir}${vardir}/run/yaws
     87+#     chmod a+rwx ${destdir}${vardir}/run/yaws
    8888+#
    8989+# elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
    9090+#      startupdir="/Library/StartupItems/Yaws"
     
    100100+#       # MacOS is particular about the ownership of startup items.
    101101+#      chown -R root:wheel ${startupdir}
    102102+# elif [ "`uname -s`" = "FreeBSD" ]; then
    103 +#     sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}/${etcdir}/rc.d/yaws.sh
     103+#     sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}${etcdir}/rc.d/yaws.sh
    104104+# elif [ "`uname -s`" = "NetBSD" ]; then
    105105+#     sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" netbsd/yaws.sh > /etc/rc.d/yaws
    106106+# else   
    107 +#     install -d ${destdir}/${etcdir}
     107+#     install -d ${destdir}${etcdir}
    108108+#     echo "Don't know how to make /etc/init scrips for this system"
    109109+#     echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
    110110+# fi
  • files/patch-scripts-Makefile

    diff -ur yaws.orig/files/patch-scripts-Makefile yaws/files/patch-scripts-Makefile
    old new  
    1 --- scripts/Makefile.orig       Wed Sep 29 13:27:28 2004
    2 +++ scripts/Makefile    Wed Sep 29 13:27:48 2004
     1--- scripts/Makefile.orig       2009-11-09 10:08:37.000000000 +0200
     2+++ scripts/Makefile    2009-11-09 10:10:14.000000000 +0200
    33@@ -1,3 +1,5 @@
    4 +.PHONY : install
     4+.PHONY : install
    55+
    66 include ../include.mk
    77 
  • files/patch-scripts-yaws.conf.template

    diff -ur yaws.orig/files/patch-scripts-yaws.conf.template yaws/files/patch-scripts-yaws.conf.template
    old new  
    1 --- scripts/yaws.conf.template.orig     2008-03-10 19:09:22.000000000 +0100
    2 +++ scripts/yaws.conf.template  2008-04-13 22:22:43.000000000 +0200
     1--- scripts/yaws.conf.template.orig     2009-11-11 12:59:41.000000000 +0200
     2+++ scripts/yaws.conf.template  2009-11-11 13:08:39.000000000 +0200
    33@@ -15,7 +15,7 @@
    44 # beam code can be placed. The daemon will add this
    55 # directory to its search path
     
    1616-include_dir = %yawsdir%/examples/include
    1717+include_dir = %yawsdir%/include
    1818 
     19 # Set this to an integer value to control
     20 # max number of connections from clients into the server
     21@@ -123,34 +123,34 @@
     22         appmods = <cgi-bin, yaws_appmod_cgi>       
     23 </server>
     24 
     25-<server localhost>
     26-        port = %port%
     27-        listen = 0.0.0.0
     28-        docroot = /tmp
     29-        dir_listings = true
     30-        statistics = true
     31-        <auth>
     32-                realm = foobar
     33-                dir = /
     34-                user = foo:bar
     35-                user = baz:bar
     36-        </auth>
     37-</server>
     38-
     39+# <server localhost>
     40+#         port = %port%
     41+#         listen = 0.0.0.0
     42+#         docroot = __PREFIX/tmp
     43+#         dir_listings = true
     44+#         statistics = true
     45+#         <auth>
     46+#                 realm = foobar
     47+#                 dir = /
     48+#                 user = foo:bar
     49+#                 user = baz:bar
     50+#         </auth>
     51+# </server>
    1952 
    2053 
    21 @@ -131,7 +131,7 @@
    22  <server localhost>
    23          port = %port%
    24          listen = 0.0.0.0
    25 -        docroot = /tmp
    26 +        docroot = __PREFIX/tmp
    27          dir_listings = true
    28          <auth>
    29                  realm = foobar
    30 @@ -147,7 +147,7 @@
     54-# And then an ssl server
    3155 
    32  <server %host%>
    33          port = %sslport%
     56-<server %host%>
     57-        port = %sslport%
    3458-        docroot = /tmp
    35 +        docroot = __PREFIX/tmp
    36          listen = 0.0.0.0
    37          dir_listings = true
    38          <ssl> 
     59-        listen = 0.0.0.0
     60-        dir_listings = true
     61-        <ssl> 
     62-                keyfile = %certdir%/yaws-key.pem
     63-                certfile = %certdir%/yaws-cert.pem
     64-        </ssl>
     65-</server>
     66+# # And then an ssl server
     67+#
     68+# <server %host%>
     69+#         port = %sslport%
     70+#         docroot = __PREFIX/tmp
     71+#         listen = 0.0.0.0
     72+#         dir_listings = true
     73+#         <ssl> 
     74+#                 keyfile = %certdir%/yaws-key.pem
     75+#                 certfile = %certdir%/yaws-cert.pem
     76+#         </ssl>
     77+# </server>
     78                                 
     79         
     80