version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=w3m/0.5.3+git20210102 author=jrmu charset=UTF-8 csum= ctime=1634191933 host=38.87.162.47 name=Cvs.Cvsweb rev=20 targets=Openhttpd.Perl text=[@%0a$ doas pkg_add cvsweb%0a@]%0a%0aAfter installation, make sure to read [[Attach:cvsweb-readme.txt|/usr/local/share/doc/pkg-readmes/cvsweb]]%0a%0aThen we need to set up a chroot for CVSweb in /var/www. You will%0afirst need to install [[openhttpd/perl|perl inside the chroot]]. Afterwards,%0awe run:%0a%0a[@%0acp -p /usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} /var/www/usr/bin/%0amkdir -p /var/www/cvs%0achown $USER:commit /var/www/cvs%0a@]%0a%0a!! Sync the repos%0a%0a[@%0a$ openrsync -a --delete --rsync-path=/usr/bin/openrsync /CVS/ /var/www/cvs/%0a@]%0a%0aIn crontab -e:%0a%0a[@%0a@daily -s /usr/bin/openrsync -a --delete --rsync-path=/usr/bin/openrsync /CVS/ /var/www/cvs/%0a@]%0a%0a!! Configuration%0a%0acvsweb assumes it is running chrooted and the configuration file is %0ahard-coded to use /conf/cvsweb/cvsweb.conf. /var/www/conf/cvsweb/cvsweb.conf%0awill serve the repository /var/www/cvs/, which should contain CVSROOT%0aand the module directories.%0a%0aOther repositories, each containing CVSROOT and modules, can%0abe added to the @CVSrepositories array.%0a%0aAdd this to the end of /etc/httpd.conf:%0a%0aserver "example.com" {%0a listen on * port 80%0a location "/cgi-bin/*" {%0a fastcgi%0a root "/"%0a }%0a location match "/" {%0a request rewrite "/cgi-bin/cvsweb"%0a }%0a location "/.well-known/acme-challenge/*" {%0a root "/acme"%0a request strip 2%0a }%0a}%0a time=1634441301 author:1634441301=jrmu diff:1634441301:1634440762:=46,48d45%0a%3c }%0a%3c location match "/" {%0a%3c request rewrite "/cgi-bin/cvsweb"%0a host:1634441301=38.87.162.47 author:1634440762=jrmu diff:1634440762:1634440376:=43c43%0a%3c location "/cgi-bin/*" {%0a---%0a> location "*" {%0a45c45%0a%3c root "/"%0a---%0a> root "/cgi-bin/cvsweb"%0a host:1634440762=38.87.162.47 author:1634440376=jrmu diff:1634440376:1634433111:=43c43%0a%3c location "*" {%0a---%0a> location "/cgi-bin/*" {%0a45c45%0a%3c root "/cgi-bin/cvsweb"%0a---%0a> root "/"%0a host:1634440376=38.87.162.47 author:1634433111=jrmu diff:1634433111:1634228065:= host:1634433111=38.87.162.47 author:1634228065=jrmu diff:1634228065:1634227908:=21,25c21%0a%3c @]%0a%3c %0a%3c In crontab -e:%0a%3c %0a%3c [@%0a---%0a> %0a host:1634228065=38.87.162.47 author:1634227908=jrmu diff:1634227908:1634226689:=13,14d12%0a%3c mkdir -p /var/www/cvs%0a%3c chown $USER:commit /var/www/cvs%0a host:1634227908=38.87.162.47 author:1634226689=jrmu diff:1634226689:1634226104:=11a12,14%0a> mkdir -p /var/www/{tmp,dev}%0a> chown www:daemon /var/www/tmp%0a> touch /var/www/dev/null%0a12a16%0a> cp -p /usr/lib/lib{c,m,perl,pthread,util,z}.so* /var/www/usr/lib/%0a host:1634226689=38.87.162.47 author:1634226104=jrmu diff:1634226104:1634224398:=49a50%0a> %0a host:1634226104=38.87.162.47 author:1634224398=jrmu diff:1634224398:1634224139:=16a17,24%0a> cp -p /usr/libexec/ld.so /var/www/usr/libexec/%0a> @]%0a> %0a> Enable slowcgi:%0a> %0a> [@%0a> rcctl enable slowcgi%0a> rcctl start slowcgi%0a host:1634224398=38.87.162.47 author:1634224139=jrmu diff:1634224139:1634223274:=12c12%0a%3c mkdir -p /var/www/{tmp,dev}%0a---%0a> mkdir -p /var/www/{tmp,usr,dev}%0a13a14,17%0a> mkdir -p /var/www/usr/libdata/perl5%0a> cd /var/www/usr/libdata/perl5%0a> mkdir -p File IPC Time warnings `arch -s`-openbsd/auto/{Cwd,Fcntl} unicore%0a> %0a14a19%0a> %0a host:1634224139=38.87.162.47 author:1634223274=jrmu diff:1634223274:1634223202:=5c5%0a%3c After installation, make sure to read [[Attach:cvsweb-readme.txt|/usr/local/share/doc/pkg-readmes/cvsweb]]%0a---%0a> After installation, make sure to read [[Attach:cvsweb-readme|/usr/local/share/doc/pkg-readmes/cvsweb]]%0a host:1634223274=38.87.162.47 author:1634223202=jrmu diff:1634223202:1634222803:=5c5%0a%3c After installation, make sure to read [[Attach:cvsweb-readme|/usr/local/share/doc/pkg-readmes/cvsweb]]%0a---%0a> After installation, make sure to read /usr/local/share/doc/pkg-readmes/cvsweb%0a host:1634223202=38.87.162.47 author:1634222803=jrmu diff:1634222803:1634222037:=32,33c32,62%0a%3c !! Sync the repos%0a%3c %0a---%0a> %0a> # Editing cvsweb and cvsweb.conf%0a> # ------------------------------%0a> # The cvsweb program already assumes that it is running chrooted,%0a> # and the location of the configuration file is hardcoded to%0a> # /conf/cvsweb/cvsweb.conf, so usually there is no need to edit%0a> # the cvsweb program itself.%0a> %0a> # By default, /var/www/conf/cvsweb/cvsweb.conf configures one%0a> # repository to be served: /var/www/cvs/, which should contain%0a> # the subdirectory CVSROOT and one or more module directories.%0a> # Additional repositories, each containing their own CVSROOT%0a> # subdirectory, can be added to the @CVSrepositories array.%0a> %0a> # Example httpd.conf(5) for cvsweb%0a> # --------------------------------%0a> # server "domain.tld" {%0a> # listen on * port 80%0a> # #listen on egress tls port 443%0a> #%0a> # #tls {%0a> # #certificate "/etc/ssl/domain.tld_fullchain.pem"%0a> # #key "/etc/ssl/private/domain.tld_private.pem"%0a> # #}%0a> #%0a> # location "/cgi-bin/*" {%0a> # fastcgi%0a> # root "/"%0a> # }%0a> # }%0a> %0a39,63d67%0a%3c %0a%3c !! Configuration%0a%3c %0a%3c cvsweb assumes it is running chrooted and the configuration file is %0a%3c hard-coded to use /conf/cvsweb/cvsweb.conf. /var/www/conf/cvsweb/cvsweb.conf%0a%3c will serve the repository /var/www/cvs/, which should contain CVSROOT%0a%3c and the module directories.%0a%3c %0a%3c Other repositories, each containing CVSROOT and modules, can%0a%3c be added to the @CVSrepositories array.%0a%3c %0a%3c Add this to the end of /etc/httpd.conf:%0a%3c %0a%3c server "example.com" {%0a%3c listen on * port 80%0a%3c location "/cgi-bin/*" {%0a%3c fastcgi%0a%3c root "/"%0a%3c }%0a%3c location "/.well-known/acme-challenge/*" {%0a%3c root "/acme"%0a%3c request strip 2%0a%3c }%0a%3c }%0a%3c %0a host:1634222803=38.87.162.47 author:1634222037=jrmu diff:1634222037:1634221886:=11a12%0a> cd /var/www%0a14c15,16%0a%3c mkdir -p /var/www/usr/libdata/perl5%0a---%0a> cd /var/www/usr%0a> mkdir -p /var/www/usr/{bin,lib,libdata/perl5,libexec}%0a host:1634222037=38.87.162.47 author:1634221886=jrmu diff:1634221886:1634221568:=24a25,45%0a> %0a> cd /var/www/usr/libdata/perl5%0a> cp -p /usr/libdata/perl5/{Carp,Exporter,Symbol,base,integer,parent}.pm .%0a> cp -p /usr/libdata/perl5/{strict,warnings,vars,constant,utf8}.pm .%0a> cp -p /usr/libdata/perl5/utf8_heavy.pl .%0a> cp -p /usr/libdata/perl5/unicore/Heavy.pl ./unicore/%0a> cp -p /usr/libdata/perl5/File/Basename.pm ./File/%0a> cp -p /usr/libdata/perl5/IPC/Open{2,3}.pm ./IPC/%0a> cp -p /usr/libdata/perl5/Time/Local.pm ./Time/%0a> cp -p /usr/libdata/perl5/warnings/register.pm ./warnings/%0a> cp -p /usr/libdata/perl5/XSLoader.pm .%0a> %0a> %0a> cd /var/www/usr/libdata/perl5/`arch -s`-openbsd%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/Config.pm .%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/Config_{git,heavy}.pl .%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/Cwd.pm .%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/auto/Cwd/Cwd.so ./auto/Cwd/%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/DynaLoader.pm .%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/Fcntl.pm .%0a> cp -p /usr/libdata/perl5/`arch -s`-openbsd/auto/Fcntl/Fcntl.so ./auto/Fcntl/%0a host:1634221886=38.87.162.47 author:1634221568=jrmu diff:1634221568:1634221379:=7,9c7%0a%3c Then we need to set up a chroot for CVSweb in /var/www. You will%0a%3c first need to install [[openhttpd/perl|perl inside the chroot]]. Afterwards,%0a%3c we run:%0a---%0a> Then we need to set up a chroot for CVSweb in /var/www. We run this as root:%0a host:1634221568=38.87.162.47 author:1634221379=jrmu diff:1634221379:1634193193:=7,9c7,17%0a%3c Then we need to set up a chroot for CVSweb in /var/www. We run this as root:%0a%3c %0a%3c [@%0a---%0a> Then%0a> %0a> %0a> # In order to make CVSweb operate in a chroot environment, it is%0a> # necessary to copy all of the relevant tools, libraries, and perl modules%0a> # that CVSweb employs into /var/www.%0a> #%0a> # NOTE: You can run this README directly with sh(1).%0a> #%0a> # First, create the basic directory structure:%0a> %0a11,12c19,21%0a%3c mkdir -p /var/www/{tmp,usr,dev}%0a%3c chown www:daemon /var/www/tmp%0a---%0a> mkdir -p tmp usr dev%0a> chown www:www tmp # needs to be writeable for the www user%0a> %0a14c23,25%0a%3c mkdir -p /var/www/usr/{bin,lib,libdata/perl5,libexec}%0a---%0a> mkdir -p bin lib libdata/perl5 libexec%0a> %0a> %0a18,23c29,58%0a%3c touch /var/www/dev/null%0a%3c %0a%3c cp -p /usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} /var/www/usr/bin/%0a%3c cp -p /usr/lib/lib{c,m,perl,pthread,util,z}.so* /var/www/usr/lib/%0a%3c cp -p /usr/libexec/ld.so /var/www/usr/libexec/%0a%3c %0a---%0a> # The "annotate" function requires this empty file:%0a> #%0a> # NOTE: You can create an actual null device instead, but that will%0a> # not work if the filesystem is mounted with the nodev option, and%0a> # it is not required for cvsweb.%0a> %0a> cd /var/www/dev%0a> touch null%0a> %0a> # Now, the required binaries:%0a> %0a> cd /var/www/usr/bin%0a> cp -p /usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} .%0a> %0a> # Next, the libraries that the binaries are linked to:%0a> #%0a> # NOTE: Wildcards will, of course, copy any old, unused libraries that are%0a> # lurking around (for example, from an upgrade):%0a> %0a> %0a> cd /var/www/usr/lib%0a> cp -p /usr/lib/lib{c,m,perl,pthread,util,z}.so* .%0a> %0a> # Now, the run-time link-editor:%0a> %0a> cd /var/www/usr/libexec%0a> cp -p /usr/libexec/ld.so .%0a> %0a> # And finally, the perl modules:%0a> %0a44,48c79,81%0a%3c @]%0a%3c %0a%3c Enable slowcgi:%0a%3c %0a%3c [@%0a---%0a> %0a> # You also need to enable slowcgi(8):%0a> %0a51d83%0a%3c @]%0a host:1634221379=38.87.162.47 author:1634193193=jrmu diff:1634193193:1634191954:=1,115d0%0a%3c [@%0a%3c $ doas pkg_add cvsweb%0a%3c @]%0a%3c %0a%3c After installation, make sure to read /usr/local/share/doc/pkg-readmes/cvsweb%0a%3c %0a%3c Then%0a%3c %0a%3c %0a%3c # In order to make CVSweb operate in a chroot environment, it is%0a%3c # necessary to copy all of the relevant tools, libraries, and perl modules%0a%3c # that CVSweb employs into /var/www.%0a%3c #%0a%3c # NOTE: You can run this README directly with sh(1).%0a%3c #%0a%3c # First, create the basic directory structure:%0a%3c %0a%3c cd /var/www%0a%3c mkdir -p tmp usr dev%0a%3c chown www:www tmp # needs to be writeable for the www user%0a%3c %0a%3c cd /var/www/usr%0a%3c mkdir -p bin lib libdata/perl5 libexec%0a%3c %0a%3c %0a%3c cd /var/www/usr/libdata/perl5%0a%3c mkdir -p File IPC Time warnings `arch -s`-openbsd/auto/{Cwd,Fcntl} unicore%0a%3c %0a%3c # The "annotate" function requires this empty file:%0a%3c #%0a%3c # NOTE: You can create an actual null device instead, but that will%0a%3c # not work if the filesystem is mounted with the nodev option, and%0a%3c # it is not required for cvsweb.%0a%3c %0a%3c cd /var/www/dev%0a%3c touch null%0a%3c %0a%3c # Now, the required binaries:%0a%3c %0a%3c cd /var/www/usr/bin%0a%3c cp -p /usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} .%0a%3c %0a%3c # Next, the libraries that the binaries are linked to:%0a%3c #%0a%3c # NOTE: Wildcards will, of course, copy any old, unused libraries that are%0a%3c # lurking around (for example, from an upgrade):%0a%3c %0a%3c %0a%3c cd /var/www/usr/lib%0a%3c cp -p /usr/lib/lib{c,m,perl,pthread,util,z}.so* .%0a%3c %0a%3c # Now, the run-time link-editor:%0a%3c %0a%3c cd /var/www/usr/libexec%0a%3c cp -p /usr/libexec/ld.so .%0a%3c %0a%3c # And finally, the perl modules:%0a%3c %0a%3c cd /var/www/usr/libdata/perl5%0a%3c cp -p /usr/libdata/perl5/{Carp,Exporter,Symbol,base,integer,parent}.pm .%0a%3c cp -p /usr/libdata/perl5/{strict,warnings,vars,constant,utf8}.pm .%0a%3c cp -p /usr/libdata/perl5/utf8_heavy.pl .%0a%3c cp -p /usr/libdata/perl5/unicore/Heavy.pl ./unicore/%0a%3c cp -p /usr/libdata/perl5/File/Basename.pm ./File/%0a%3c cp -p /usr/libdata/perl5/IPC/Open{2,3}.pm ./IPC/%0a%3c cp -p /usr/libdata/perl5/Time/Local.pm ./Time/%0a%3c cp -p /usr/libdata/perl5/warnings/register.pm ./warnings/%0a%3c cp -p /usr/libdata/perl5/XSLoader.pm .%0a%3c %0a%3c %0a%3c cd /var/www/usr/libdata/perl5/`arch -s`-openbsd%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/Config.pm .%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/Config_{git,heavy}.pl .%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/Cwd.pm .%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/auto/Cwd/Cwd.so ./auto/Cwd/%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/DynaLoader.pm .%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/Fcntl.pm .%0a%3c cp -p /usr/libdata/perl5/`arch -s`-openbsd/auto/Fcntl/Fcntl.so ./auto/Fcntl/%0a%3c %0a%3c # You also need to enable slowcgi(8):%0a%3c %0a%3c rcctl enable slowcgi%0a%3c rcctl start slowcgi%0a%3c %0a%3c %0a%3c # Editing cvsweb and cvsweb.conf%0a%3c # ------------------------------%0a%3c # The cvsweb program already assumes that it is running chrooted,%0a%3c # and the location of the configuration file is hardcoded to%0a%3c # /conf/cvsweb/cvsweb.conf, so usually there is no need to edit%0a%3c # the cvsweb program itself.%0a%3c %0a%3c # By default, /var/www/conf/cvsweb/cvsweb.conf configures one%0a%3c # repository to be served: /var/www/cvs/, which should contain%0a%3c # the subdirectory CVSROOT and one or more module directories.%0a%3c # Additional repositories, each containing their own CVSROOT%0a%3c # subdirectory, can be added to the @CVSrepositories array.%0a%3c %0a%3c # Example httpd.conf(5) for cvsweb%0a%3c # --------------------------------%0a%3c # server "domain.tld" {%0a%3c # listen on * port 80%0a%3c # #listen on egress tls port 443%0a%3c #%0a%3c # #tls {%0a%3c # #certificate "/etc/ssl/domain.tld_fullchain.pem"%0a%3c # #key "/etc/ssl/private/domain.tld_private.pem"%0a%3c # #}%0a%3c #%0a%3c # location "/cgi-bin/*" {%0a%3c # fastcgi%0a%3c # root "/"%0a%3c # }%0a%3c # }%0a%3c %0a host:1634193193=38.87.162.47 author:1634191954=jrmu diff:1634191954:1634191933:=1d0%0a%3c [@%0a3d1%0a%3c %0a5d2%0a%3c @]%0a host:1634191954=38.87.162.47 author:1634191933=jrmu diff:1634191933:1634191933:=1,2d0%0a%3c $ openrsync -a --delete --rsync-path=/usr/bin/openrsync /CVS/ /var/www/cvs/%0a%3c @daily -s /usr/bin/openrsync -a --delete --rsync-path=/usr/bin/openrsync /CVS/ /var/www/cvs/%0a host:1634191933=38.87.162.47