Date: Fri, 24 Sep 2010 17:10:57 -0700 From: Devin Teske <dteske@vicor.com> To: Rick Miller <vmiller@hostileadmin.com> Cc: Adam Vande More <amvandemore@gmail.com>, Devin Teske <dteske@vicor.com>, freebsd-questions@freebsd.org Subject: Re: Media Packages Vs. Ports Message-ID: <1285373457.15590.3.camel@localhost.localdomain> In-Reply-To: <AANLkTinn0VPb=G7VyZcL2pO1KwmUPCtjgNxP-aCimwpF@mail.gmail.com> References: <90e6ba4883cb50e1500490c7b441@google.com> <AANLkTinOcvO9RsGAAgF0RXd5SYkWvd%2BUBvwqcxK2CyPc@mail.gmail.com> <AANLkTinn0VPb=G7VyZcL2pO1KwmUPCtjgNxP-aCimwpF@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2010-09-24 at 10:54 -0400, Rick Miller wrote: > I've created the package and copied it to the networked media. How do > I edit the INDEX file so that it knows how to get the file? HINT: If you created the package from the ports tree, you can say "make describe" in the package's top-level port directory (e.g. /usr/ports/pkg_origin/some_pkg). This will produce a line that can be added to the INDEX file without much modification, if any. In addition, here's a guide that I wrote long ago: HOWTO: Interpret the obfuscated `INDEX' file located on FreeBSD CD-ROMs. AUTHOR: Devin Teske DATE: January 1st, 2006 LAST MODIFIED: February 24th, 2006 09:45:54 PURPOSE: This file documents the file format of `/packages/INDEX' file located on FreeBSD installation CD-ROMs and conveys what it is used for (and its importance). 1. Foreword 2. The INDEX File 3. The FreeBSD INDEX File Format 3a. FreeBSD-5.2 and FreeBSD-4.10 or Lower 3b. FreeBSD-5.3 and FreeBSD-4.11 or Higher 3c. FreeBSD-6.0 or Higher 4. Field Definitions 5. Field Population 6. References =============================================================================== 1. FOREWORD This document describes the format of the `/packages/INDEX' file located on the FreeBSD installation CD-ROM. Depending on which FreeBSD release version you are working with, the format may vary. Documented below you will find 3 versions commonly used. Common between each version, is that each line (delimited by the new- line character) corresponds to a singl e package (found in `packages/All'). It is possible to have additional fields beyond the last field (for custom purposes) as they will be ignored by sysinstall. =============================================================================== 2. THE INDEX FILE The INDEX file (located on the FreeBSD installation CD-ROMs) is a file that is read by sysinstall (see sysinstall(8)) for the installation of ancillary packages (located in `/packages'). When sysinstall displays an interactive menu for the selection of these packages, it uses the INDEX file (located at `/packages/INDEX') to display information such as the package name, the package description, and what categories to place it in. If sysinstall is scripted, then the interactive menu may or may not be invoked (if not, then the categories/description fields may be omitted). When sysinstall is in the process of installing the packages, it first makes sure that all the run-dependencies (listed in the INDEX file for that package) are installed. If a package that is listed in the `run-deps' field is not installed, sysinstall installs it before installing the requested package. After installing any dependent packages (recursively), sysinstall then unpacks the requested package and reads its packing-list (the `+CONTENTS' file within the package tarball). All package dependencies listed inside the package's packing-list MUST be installed before-hand or else sysinstall will generate an error. Therefore, all package dependencies that appear in the packing list MUST be present in the `run-deps' field of the INDEX file. There reverse is not true, however. A dependency may appear in the INDEX file and not in the package's packing-list. =============================================================================== 3. THE FREEBSD INDEX FILE FORMAT 3a. FREEBSD-5.2 AND FREEBSD-4.10 OR LOWER package|port-origin|install-prefix|comment|port-desc-file|maintainer| \ categories|build-deps|run-deps|www-site 3b. FREEBSD-5.3 AND FREEBSD-4.11 OR HIGHER package|port-origin|install-prefix|comment|port-desc-file|maintainer| \ categories|build-deps|run-deps|www-site|unknown|unknown|unknown I have never seen the 11th, 12th, or 13th field populated. So their purpose remains unknown. 3c. FREEBSD-6.0 OR HIGHER package|port-origin|install-prefix|comment|port-desc-file|maintainer| \ categories|build-deps|run-deps|www-site|unknown|unknown|unknown|disc =============================================================================== 4. FIELD DEFINITIONS package This is the name of the package. This should be the name of the file as it appears in `/packages/All' without the `.tgz' suffix. This value is used for finding the package tarball and is also displayed in the left- hand column of the interactive package selection menu of sysinstall. port-origin The package origin (as a qualified pathname). Basically, this is the origin of the package with a `/usr/ports/' prefix. Even if you do not install the Ports Collection (which installs Makefiles and other infor- mation), this should be populated respectively. install-prefix The base directory where the package will install it's files to. For example, if the package installs files into `/usr/local/bin' and `/usr/local/sbin' then the install-prefix would be `/usr/local'. This is an informational value (the package's packing-list takes precedence). comment This is the one-line comment for the package. This should be the same as the contents of the `+COMMENT' file located within the package tarball. This value is displayed in the right-hand column of the interactive package selection menu of sysinstall. desc-file When you install the Ports Collection the `/usr/ports' directory is populated with Makefiles and other information. This value should be the path to the description file for the package. This is only used when you install the FreeBSD Ports Collection. maintainer The e-mail address of the package maintainer. categories Within the `/packages' directory of the CD-ROM, you will find (besides the INDEX file) several directories. The actual package should always reside in the `All' directory (as this is where sysinstall looks for it) However, finding the package you want/need can become quite cumbersome if you have to sift through every package in one directory. To ease the process of finding a specific package, you can populate this field with several categories (sub-directories) that the package can be found in. When sysinstall's interactive package selection menu is invoked (either by a script or simply interactively) it allows a user to browse several categories to find a specific package. This field dictates to sysinstall which categories (delimited by a space) the package is available in. When you specify a category (sub-directory), the simplest (and most efficient) thing to do is, create a symbolic link in the category directory ( in `/packages' ) pointing to the actual package ( in `/packages/All'). build-deps These are the dependencies (names of packages delimited by a space) that this package requires to be built. This is used if you install the FreeBSD Ports Collection. run-deps These are the dependencies (names of packages delimited by a space) that this package requires to run. Any package listed here will be installed by sysinstall before the package is even attempted to be installed. See section 2 paragraph 3 for more information. www-site Either the website URL of where the package can be obtained, the package maintainer, or the website URL of the item that the package installs. unknown If a field has been marked `unknown' in section 3, it is because I have never seen it populated and thus never used. These fields can be left empty without any recourse. disc The disc that the package can be found on (in a multi-disc distribution of the FreeBSD installation). This is a new feature of FreeBSD-6.0 Other distributions (such as FreeBSD-4.8 and FreeBSD-4.11 do not list packages in the INDEX file unless it appears on the same CD-ROM). =============================================================================== 5. FIELD POPULATION Below you will find various ways that you can use to populate the formats listed in section 3 given nothing more than a package tarball. NOTE: these commands must be run on a FreeBSD distribution (as Linux and other UNIX distributions do not have the `pkg_info' command). package - file_name without `.tgz' suffix port-path - echo /usr/ports/`pkg_info -qo file` install-prefix - pkg_info -qp file | head -n1 | sed -e 's/^@cwd //' comment - pkg_info -qI file desc-file - echo /usr/ports/`pkg_info -qo file`/pkg-descr maintainer - echo ports@FreeBSD.org categories - find . -type l -name FILE | \ sed -e 's/^\.\/\(.*\)\/[^\/]*$/\1/' | tr '\n' ' ' build-deps - pkg_info -qr file | sed -e 's/^@pkgdep //' | tr '\n' ' ' run-deps - pkg_info -qr file | sed -e 's/^@pkgdep //' | tr '\n' ' ' www-site - pkg_info -qd file | grep '^WWW: ' | sed -e 's/^WWW: //' disc - the disc that the package resides on =============================================================================== 6. REFERENCES The information in this document is the result of many hours of reverse- engineering and testing. Little or no sources on this topic have been found online. Even when the subject matter was found online, the amount of information on the topic was anemic. -- Cheers, Devin Teske -> CONTACT INFORMATION <- Business Solutions Consultant II FIS - fisglobal.com 510-735-5650 Mobile 510-621-2038 Office 510-621-2020 Office Fax 909-477-4578 Home/Fax devin.teske@fisglobal.com -> LEGAL DISCLAIMER <- This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. -> FUN STUFF <- -----BEGIN GEEK CODE BLOCK----- Version 3.1 GAT/CS d(+) s: a- C++(++++) UB++++$ P++(++++) L++(++++) !E--- W++ N? o? K- w O M+ V- PS+ PE Y+ PGP- t(+) 5? X+(++) R>++ tv(+) b+(++) DI+(++) D(+) G+>++ e>+ h r>++ y+ ------END GEEK CODE BLOCK------ http://www.geekcode.com/ -> END TRANSMISSION <-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1285373457.15590.3.camel>