Date: Sat, 9 Nov 2002 21:10:03 -0800 (PST) From: Mark Linimon <linimon@lonesome.com> To: freebsd-www@FreeBSD.org Subject: Re: www/45169: suggested update for ports index page on web site Message-ID: <200211100510.gAA5A3Ll041662@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR www/45169; it has been noted by GNATS. From: Mark Linimon <linimon@lonesome.com> To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: www/45169: suggested update for ports index page on web site Date: Sun, 10 Nov 2002 00:01:38 -0600 (CST) Here is an updated set of patches that incorporates some suggestions from Bruce A. Mah, as well as some further ideas of my own: - deprecate use of pkg_version -c as a maintenance tool - supply a pointer to freshports.org - add HTML links for manpages and portupgrade - reorganize category section to move the "list of all ports" before the "by categories" list (generalities should come before specifics) - more consistency in style markup - changes to the Perl code in portindex to aid future updates of this page (only useful for debugging -- no effect in production) Interested parties may view a snapshot of the results as http://lonesome.dyndns.org/ports/index.html. --- ports.inc.dist Thu Jul 11 09:51:43 2002 +++ ports.inc Sat Nov 9 20:52:30 2002 @@ -9,16 +9,19 @@ <p>Each ``port'' listed here contains any patches necessary to make the original application source code compile and run on FreeBSD. Installing an application is as -simple as downloading the port, unpacking it and typing <tt>make</tt> -in the port directory. For even greater convenience, you can simply -install the <a href="ftp://ftp.FreeBSD.org/pub/FreeBSD/branches/-current/ports.tar.gz"> -entire ports hierarchy</a> at installation time (or use -<a href="../doc/en_US.ISO8859-1/books/handbook/synching.html#CVSUP">CVSup</a> to track it on -an ongoing basis) and have thousands of applications right at your -fingertips. - -Each port's <tt>Makefile</tt> automatically fetches the -application source code, either from a local disk, CDROM or via ftp, +simple as downloading the port, unpacking it and typing +<a href="http://www.freebsd.org/cgi/man.cgi?query=make"><tt>make</tt></a> +in the port directory. However, the most convenient (and common) method +is to download the framework for the entire list of ports by installing the +<a href="ftp://ftp.FreeBSD.org/pub/FreeBSD/branches/-current/ports.tar.gz"> +ports hierarchy</a> at FreeBSD installation time, and then have thousands of +applications right at your fingertips. You can then use +<a href="../doc/en_US.ISO8859-1/books/handbook/synching.html#CVSUP">CVSup</a> +to track the hierarchy on an ongoing basis.</p> + +<p>Each port's <tt>Makefile</tt> automatically fetches the +application source code, either from a local disk, CDROM or via +<a href="http://www.freebsd.org/cgi/man.cgi?query=ftp"><tt>ftp</tt></a>, unpacks it on your system, applies the patches, and compiles. If all went well, a simple <tt>make install</tt> will install the application and register it with the package system.</p> @@ -26,16 +29,61 @@ <p>For most ports, a precompiled <tt>package</tt> also exists, saving the user the work of having to compile anything at all. Each port contains a link to its corresponding package and you may either simply -download that file and then run the <strong>pkg_add</strong> command -on it or you can simply grab the link location and hand it straight -to <strong>pkg_add</strong> since it's capable of accepting FTP URLs as +download that file and then run the +<a href="http://www.freebsd.org/cgi/man.cgi?query=pkg_add"><tt>pkg_add</tt></a> +command on it or you can simply grab the link location and hand it straight +to <tt>pkg_add</tt> since it's capable of accepting FTP URLs as well as filenames.</p> +<hr> + +<H1 ALIGN="LEFT"><FONT COLOR="#660000">Keeping up-to-date</FONT></H1> + +<p>There are several options to maintain your collection of packages +and ports.</p> +<ul> +<li>One possibility is to stay entirely with binaries and merely + download individual packages as needed.</li> +<li>For those unafraid to compile from source, by far the most popular + method is to download and use the + <a href="http://www.freebsd.org/cgi/url.cgi?ports/sysutils/portupgrade/pkg-descr"> + <tt>portupgrade</tt></a> port. + <tt>portupgrade</tt> works by using the underlying <tt>pkg_*</tt> + commands but hides most of their complexity. There is a handy + option for maintaining and updating all currently installed ports, + in addition to just individual ones. <tt>portupgrade</tt> may be + run interactively or in batch mode; it's not necessary to be tracking + any other FreeBSD sources to use it, either.</li> +<li>For those that are already rebuilding their entire system + from source, they may wish to grab ports via + <a href="../doc/en_US.ISO8859-1/books/handbook/synching.html#CVSUP">CVSup</a>. + </li> +<li>Finally, individual ports may be added via <tt>pkg_add</tt>. + Most people will probably choose one of the above methods; + however, using <tt>pkg_add</tt> can sometimes be necessary, + e.g. in certain rare cases where <tt>portupgrade</tt> is unable + to upgrade itself.</li> +<li>The one method that does <b>not</b> work is to use the unmodified + output of <tt>pkg_version -c</tt> as a maintainence tool.</li> +</ul> + +<p> +The ports listed on these web pages are continually being updated. +It is strongly recommended that you refresh the entire collection +together, as many ports depend on other parts of the tree. If that is +not possible, at least make sure you get the latest make macro files in +<tt>ports/Mk</tt>. (If you are using <tt>cvsup</tt>, this +means you need <tt>ports-base</tt> in your cvsupfile.) If you still +see errors even with the latest <tt>bsd.port.mk</tt> and friends, +please fetch the entire collection. +</p> + <p>For more information about new, changed or removed ports/packages, or if you wish to search for a specific application to see if it's -available as a port/package, please see the +available as a port/package, you may browse the <a href="http://www.FreeBSD.org/cgi/ports.cgi">FreeBSD Ports Changes</a> -page.</p> +on this site; alternatively, you may wish to either browse (or subscribe to) +the lists at <a href="http://www.freshports.org">www.freshports.org</a>.</p> <FORM METHOD="GET" ACTION="http://www.FreeBSD.org/cgi/ports.cgi"> Search for: @@ -60,17 +108,6 @@ <H1 ALIGN="LEFT"><FONT COLOR="#660000">Upgrade kits</FONT></H1> <p> -The ports listed on these web pages are continually being updated. -It is recommended that you refresh the entire collection together, as -many ports depend on other parts of the tree. If that is not -possible, at least make sure you get the latest make macro files in -<tt>ports/Mk</tt>. (If you are using <strong>cvsup</strong>, this -means you need <tt>ports-base</tt> in your cvsupfile.) If you still -see errors even with the latest <tt>bsd.port.mk</tt> and friends, -please fetch the entire collection. -</p> - -<p> The current ports tree officially supports only FreeBSD-current and FreeBSD-stable. @@ -95,7 +132,7 @@ </dl> <p> -These are FreeBSD packages; please use <strong>pkg_add</strong> to install +These are FreeBSD packages; please use <tt>pkg_add</tt> to install them. That should enable you to use all the ports listed here. Note that it will only change just enough files to enable ports/packages to be used; for a full upgrade to -STABLE, please refer to the <a @@ -103,7 +140,7 @@ section of the handbook. The 2.2.x and 3.x branches are officially unsupported by ports-current. While -the ports tree as distributed with previous releases will probably work well +the ports tree as distributed with previous releases will probably work well, these are also unsupported by the ports team, because time is already stretched thin enough supporting ports-current. </p> --- portindex.dist Mon Sep 9 11:59:48 2002 +++ portindex Sat Nov 9 21:55:01 2002 @@ -139,6 +139,7 @@ local($sourcepath) = $loc; $sourcepath =~ s%/usr/%%; + $portnumber = "0"; foreach $i (@cat) { $stats{$i}++; @@ -214,56 +215,63 @@ " -- <EM>$desc</EM><BR>\n"; $portnumber++; } + $portnumber = '0' if !defined $portnumber; open(MOUTF, ">index.sgml"); &header(MOUTF, "FreeBSD Ports"); # print MOUTF "<!--#include virtual=\"./ports.inc\" -->\n"; print MOUTF "&blurb;"; - print MOUTF "<hr><P>There are currently $portnumber ports in the -FreeBSD Ports Collection.<br> <A HREF=\"$baseFTP/ports.tar.gz\">Download -a gzip'd tar file of all $portnumber ports</A> (about 15 megabytes) or -browse the following categories:\n"; + print MOUTF "<hr>\n"; + print MOUTF "<h1 align=\"LEFT\"><font color=\"#660000\">Summary</font></h1>"; + print MOUTF "<P>There are currently $portnumber ports in the FreeBSD Ports Collection.<br>\n"; + print MOUTF "You may download a <A HREF=\"$baseFTP/ports.tar.gz\">\n"; + print MOUTF "gzip'd tar file of all $portnumber ports</A>\n"; + print MOUTF "(about 15 megabytes), view the "; + print MOUTF "<A HREF=\"master-index.html\">alphabetical list of all $portnumber ports</A>,\n"; + print MOUTF "or browse ports in the following categories:\n"; + print MOUTF "<A NAME=\"categories\"></A>\n"; print MOUTF "<UL>\n"; - @foos = sort(keys %stats); - foreach $key (@foos) { - # For the master file... - print MOUTF - "<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>"; - if ($category_description{$key}) { - print MOUTF " -- " . $category_description{$key}; - } + if ($portnumber eq '0') { + print MOUTF "<LI>none found</LI>\n"; + } else { + @foos = sort(keys %stats); + foreach $key (@foos) { + # For the master file... + print MOUTF + "<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>"; + if ($category_description{$key}) { + print MOUTF " -- " . $category_description{$key}; + } - # Someone forgot to add a category to the description file - # or there is a typo in the category field. - else { - warn "No description found for category: ``$key''!\n"; - warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n"; - sleep(3); - } - print MOUTF "</LI>\n"; + # Someone forgot to add a category to the description file + # or there is a typo in the category field. + else { + warn "No description found for category: ``$key''!\n"; + warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n"; + sleep(3); + } + print MOUTF "</LI>\n"; - # Create the category file - open(OUTF, ">$key.sgml"); - &header(OUTF, "FreeBSD Ports: \u$key"); - if ($category_description{$key}) { - print OUTF "<h3>", $category_description{$key}, "</h3>\n"; + # Create the category file + open(OUTF, ">$key.sgml"); + &header(OUTF, "FreeBSD Ports: \u$key"); + if ($category_description{$key}) { + print OUTF "<h3>", $category_description{$key}, "</h3>\n"; + } + print OUTF "<DL>\n"; + $d = join("\n", sort(split(/\n/, $data{$key}))); + $d =~ s/##([^#]*)##/$catkey{$1}/g; + print OUTF $d; + print OUTF "</DL>\n"; + &footer(OUTF, "<p></p><A HREF=\"index.html#categories\">Port Categories</A>" . + " -- <A HREF=\"master-index.html\">Index</A>"); + close(OUTF); } - print OUTF "<DL>\n"; - $d = join("\n", sort(split(/\n/, $data{$key}))); - $d =~ s/##([^#]*)##/$catkey{$1}/g; - print OUTF $d; - print OUTF "</DL>\n"; - &footer(OUTF, "<p></p><A HREF=\"index.html\">Port Categories</A>" . - " -- <A HREF=\"master-index.html\">Index</A>"); - close(OUTF); - } print MOUTF "</UL>\n"; - print MOUTF - "<UL><LI><A HREF=\"master-index.html\">Alphabetical list of all $portnumber ports</A></LI></UL>\n"; &footer(MOUTF, ""); close(MOUTF); @@ -273,7 +281,7 @@ print MINDEX "<P>\n"; print MINDEX sort @master; print MINDEX "</P>"; - &footer(MINDEX, "<A HREF=\"index.html\">Port Categories</A>"); + &footer(MINDEX, "<A HREF=\"index.html#categories\">Port Categories</A>"); close(MINDEX); close(INDEX); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-www" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211100510.gAA5A3Ll041662>