Re: Media Packages Vs. Ports
On 25/09/2010 01:10:57, Devin Teske wrote: > 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. Not quite. The make describe output differs from the INDEX entry lines in two important ways: * make describe only includes the immediate dependencies of the port. The INDEX contains the sum, recursively, of the ports dependencies, the dependences of the dependencies, etc. etc. There are some subtleties to do with RUN_DEPENDS or LIB_DEPENDS, compared to BUILD_DEPENDS. * The dependency entries produced in the make describe output are directories in the ports tree, whereas the the INDEX uses the corresponding package names. eg. /usr/ports/www/apache22 vs (at the moment) apache-2.2.16_1 >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. It's pkg_add(1) that does the dependency chasing in general -- and it doesn't need access to an INDEX file: pkg dependencies are recorded in the pkg file itself, and pkg_add knows how to fetch the dependencies from the same place the original pkg file came from. See pkg_add(1), particulary the description of the '-r' option and the ENVIRONMENT section. > === > > 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 The unknown fields here are essentially the contents of the following make variables from the port: EXTRACT_DEPENDS PATCH_DEPENDS FETCH_DEPENDS Like the run and build depends, these are expanded to include the sum of all their dependencies. These fields are frequently empty, but they certainly aren't unused: % cut -d '|' -f 11 < INDEX-8 | grep '.' | wc -l 7129 % cut -d '|' -f 12 < INDEX-8 | grep '.' | wc -l 6173 % cut -d '|' -f 13 < INDEX-8 | grep '.' | wc -l 3 (that's out of about 22000 INDEX entries currently) > 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. I found the best resource was reading the code of the make-index script, here: http://www.freebsd.org/cgi/cvsweb.cgi/ports/Tools/make_index You can also look at my ports-mgmt/p5-FreeBSD-Portindex programs which have quite a lot of explanatory commenting. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Media Packages Vs. Ports
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.
Re: Media Packages Vs. Ports
Rick Miller writes: > On Tue, Sep 21, 2010 at 3:55 PM, Adam Vande More > wrote: >> On Tue, Sep 21, 2010 at 11:41 AM, wrote: >>> >>> Is it possible to take a port, make a package of it and put it in the >>> packages directory of my own media? >> >> Sure it's easy. When build a port you can issue a make package command, or >> you can use pkg_create to create packages from installed ported. A common >> approach to this is build all your updates in a jail, make packages of them, >> then delete package from the host and install the newly built ones from the >> jail. Very small, if any downtime. You can use the jail to create pkg's >> for a custom repository too. > > 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? I'm not sure what you're saying here, but I think what you want is just to set the PACKAGEROOT variable. If you want to create your own install disks, the release(7) manual will point you in the right direction. If you're doing a network install, you need to lay out the package directories the same way as the install media. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Re: Media Packages Vs. Ports
On Sep 24, 2010 10:54am, Rick Miller wrote: On Tue, Sep 21, 2010 at 3:55 PM, Adam Vande More amvandem...@gmail.com> wrote: > On Tue, Sep 21, 2010 at 11:41 AM, vrwmil...@gmail.com> wrote: >> >> Is it possible to take a port, make a package of it and put it in the >> packages directory of my own media? > > Sure it's easy. When build a port you can issue a make package command, or > you can use pkg_create to create packages from installed ported. A common > approach to this is build all your updates in a jail, make packages of them, > then delete package from the host and install the newly built ones from the > jail. Very small, if any downtime. You can use the jail to create pkg's > for a custom repository too. 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? I did figure out one way to get this to work. I copied the entry for the port from the ports index file into the packages index file and it worked. Whether or not it's an appropriate way, I am unsure. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Media Packages Vs. Ports
On Tue, Sep 21, 2010 at 3:55 PM, Adam Vande More wrote: > On Tue, Sep 21, 2010 at 11:41 AM, wrote: >> >> Is it possible to take a port, make a package of it and put it in the >> packages directory of my own media? > > Sure it's easy. When build a port you can issue a make package command, or > you can use pkg_create to create packages from installed ported. A common > approach to this is build all your updates in a jail, make packages of them, > then delete package from the host and install the newly built ones from the > jail. Very small, if any downtime. You can use the jail to create pkg's > for a custom repository too. 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? -- Take care Rick Miller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Re: Media Packages Vs. Ports
Thanks, Adam. This is most helpful. I appreciate it. On Sep 21, 2010 3:55pm, Adam Vande More wrote: On Tue, Sep 21, 2010 at 11:41 AM, vrwmil...@gmail.com> wrote: Hi all, I am performing PXE boots and automated installs of FreeBSD 8.1-RELEASE with a custom sysinstall.cfg file which identifies packages that are to be installed in addition to the distributions. We have need to install compat6x-amd64 and I'd like to have this done during install. Unfortunately, it does not appear that this package exists in the FreeBSD media from which the install occurs. However, it is available through the ports collection. You'll probably want to do something like this: http://bsdbased.com/2010/03/23/freebsd-binary-package-repository-howto FWIW, that's not the end all, be all to setting up your own package repository just a reasonably simple method. What is the relationship between the packages directory on the media and the ports collection? http://www.freebsd.org/doc/handbook/packages-using.html Packages associated with a RELEASE also ultimately come from the ports tree. However, those RELEASE packages come from a ports tree that was put into slush, then frozen. This means those packages had more testing and tweaking. Is it possible to take a port, make a package of it and put it in the packages directory of my own media? Sure it's easy. When build a port you can issue a make package command, or you can use pkg_create to create packages from installed ported. A common approach to this is build all your updates in a jail, make packages of them, then delete package from the host and install the newly built ones from the jail. Very small, if any downtime. You can use the jail to create pkg's for a custom repository too. http://www.mail-archive.com/freebsd-questions@freebsd.org/msg228757.html -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Media Packages Vs. Ports
On Tue, Sep 21, 2010 at 11:41 AM, wrote: > Hi all, > > I am performing PXE boots and automated installs of FreeBSD 8.1-RELEASE > with a custom sysinstall.cfg file which identifies packages that are to be > installed in addition to the distributions. We have need to install > compat6x-amd64 and I'd like to have this done during install. Unfortunately, > it does not appear that this package exists in the FreeBSD media from which > the install occurs. However, it is available through the ports collection. > You'll probably want to do something like this: http://bsdbased.com/2010/03/23/freebsd-binary-package-repository-howto FWIW, that's not the end all, be all to setting up your own package repository just a reasonably simple method. > > What is the relationship between the packages directory on the media and > the ports collection? http://www.freebsd.org/doc/handbook/packages-using.html Packages associated with a RELEASE also ultimately come from the ports tree. However, those RELEASE packages come from a ports tree that was put into slush, then frozen. This means those packages had more testing and tweaking. Is it possible to take a port, make a package of it and put it in the > packages directory of my own media? > Sure it's easy. When build a port you can issue a make package command, or you can use pkg_create to create packages from installed ported. A common approach to this is build all your updates in a jail, make packages of them, then delete package from the host and install the newly built ones from the jail. Very small, if any downtime. You can use the jail to create pkg's for a custom repository too. http://www.mail-archive.com/freebsd-questions@freebsd.org/msg228757.html -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Media Packages Vs. Ports
Hi all, I am performing PXE boots and automated installs of FreeBSD 8.1-RELEASE with a custom sysinstall.cfg file which identifies packages that are to be installed in addition to the distributions. We have need to install compat6x-amd64 and I'd like to have this done during install. Unfortunately, it does not appear that this package exists in the FreeBSD media from which the install occurs. However, it is available through the ports collection. What is the relationship between the packages directory on the media and the ports collection? Is there a process that identifies what ports are made available in the packages directory of the media? Is it possible to take a port, make a package of it and put it in the packages directory of my own media? --Rick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Packages vs Ports
On 12/23/09 18:39, Mel Flynn wrote: On Wednesday 23 December 2009 08:13:21 Adam Vande More wrote: Or set PACKAGESITE to: ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/ See pkg_add(1) for details. This will usually work for legacy stable branches, but you may actually need to update your system to a more recent stable version once in a while. Additionally take a look at the '-P' and '-PP' flags for portupgrade (And I guess the other port upgrade tools have similar options); this way it will use packages for upgrading your software instead of ports. -- - Frank ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Packages vs Ports
On Wednesday 23 December 2009 08:13:21 Adam Vande More wrote: > On Wed, Dec 23, 2009 at 11:06 AM, Arthur Barlow wrote: > > P.S. I'm using FreeBSD 7.2 on an old Gateway Pentium III machine with a > > 40G harddrive. > > pkg's are created at the time of release eg 7.2. They are never updated > for that release. Or set PACKAGESITE to: ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7-stable/Latest/ See pkg_add(1) for details. This will usually work for legacy stable branches, but you may actually need to update your system to a more recent stable version once in a while. -- Mel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Packages vs Ports
On Wed, Dec 23, 2009 at 11:06 AM, Arthur Barlow wrote: > I've recently run into a new problem. Pkg_version show that there is a new > version of Firefox 3.5. However, when I try to recompile it, I get an > error > that the system has run out of swap space, even though I allocated a 512M > slice for a machine with 256M RAM. Anyway, when I used to recompile > Firefox > it would take over 8 hours. So I figured that I would just delete it and > download the new compiled version in a package. But, the package is still > not updated yet, and it's been over a week. How long does it usually take > for packages to catch up to ports? > > P.S. I'm using FreeBSD 7.2 on an old Gateway Pentium III machine with a 40G > harddrive. > > Also as a temp work around you could create a file backed swap. Even slower, but it would work. You sys isn't really a compiling machine though. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Packages vs Ports
On Wed, Dec 23, 2009 at 11:06 AM, Arthur Barlow wrote: > I've recently run into a new problem. Pkg_version show that there is a new > version of Firefox 3.5. However, when I try to recompile it, I get an > error > that the system has run out of swap space, even though I allocated a 512M > slice for a machine with 256M RAM. Anyway, when I used to recompile > Firefox > it would take over 8 hours. So I figured that I would just delete it and > download the new compiled version in a package. But, the package is still > not updated yet, and it's been over a week. How long does it usually take > for packages to catch up to ports? > > P.S. I'm using FreeBSD 7.2 on an old Gateway Pentium III machine with a 40G > harddrive. > > pkg's are created at the time of release eg 7.2. They are never updated for that release. You can easily create your own with make package or pkg_create but that requires a successful recompile -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Packages vs Ports
I've recently run into a new problem. Pkg_version show that there is a new version of Firefox 3.5. However, when I try to recompile it, I get an error that the system has run out of swap space, even though I allocated a 512M slice for a machine with 256M RAM. Anyway, when I used to recompile Firefox it would take over 8 hours. So I figured that I would just delete it and download the new compiled version in a package. But, the package is still not updated yet, and it's been over a week. How long does it usually take for packages to catch up to ports? P.S. I'm using FreeBSD 7.2 on an old Gateway Pentium III machine with a 40G harddrive. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Initial install (packages vs. ports)
On Sun, 2003-12-21 at 06:22, Matthew Seaman wrote: > On Sat, Dec 20, 2003 at 11:13:23PM -0500, Trey Sizemore wrote: > > Just for clarification... > > > > The trade off I see with installing from CD vs. doing a minimal install > > is that when it comes time to upgrade it will cause more issues. > > > > By this I mean that if I do a minimal install and then later install > > from ports it will be more seamless than installing first from packages > > (like KDE, for example) and then trying to upgrade with ports later. > > > > Certainly packages from the CD would be installed quicker than having to > > build from ports, but at the cost of future upgrades. > > Actually, you'll be pleased to hear this is completely false. pkgs > and ports are closely related and there's no problem in installing a > package and then updating it via ports or vice versa. portupgrade(1) > even has the handy -P option to make that sort of thing easier. > > A pkg is nothing more than the result of compiling a port, bundled up > in a tar ball and with a few extra bits'n'bobs to help keep the > administrivia in line. You can build your own packages from the ports > tree simply by typing 'make package' in the appropriate port directory > -- although this will also install the port on your system. > > There are other reasons for doing a minimal install -- generally when > I'm installing a box, I usually want to jump to the latest -STABLE > rather than the -RELEASE version from the CDs, so I tend to do a > minimal install from CD, grab the cvsup-without-gui package off the > CDs or the 'net and from there grab the latest sources into an empty > /usr/src and start building. Similar treatment for ports -- instead > of installing the ports tree from CD, I find it's easier to just > cvsup(1) the whole tree starting with an empty directory. This works > well if you have a decent amount of bandwith, and it avoids the 'adopt > the ports tree into cvsup' problem as described in: > > http://www.cvsup.org/faq.html#caniadopt > http://www.cvsup.org/faq.html#adopt > > Cheers, > > Matthew Thanks, just what I needed to find out. I had been doing some trial installations on a spare laptop over the last few weeks, and now I want to do an install on my primary desktop machine. The way I was going to do the install was: 1 - Perform the install (including X) and include the ports collection along with KDE. This from the 5.2 RC disc. 2 - Install and configure cvsup and portupgrade suing packages (pkg_add -r cvsup-without-gui and pkg_add -r portupgrade) 3 - Update my source tree and ports tree using cvsup and portupgrade (though not sure of the order here). 4 - Make buildworld, build kernel, install kernel, (REBOOT) and installworld. Run portupgrade -a. I assume it is somewhere in here that I would be able to include pcm support for my sound card. 5 - Then update the system to the packages I want. Any pointers or mention of glaring omissions is appreciated. -- Cheers, Trey --- The beauty of the soul shines out when a man bears with composure one heavy mischance after another, not because he does not feel them, but because he is a man of high and heroic temper. - Aristotle signature.asc Description: This is a digitally signed message part
Re: Initial install (packages vs. ports)
On Sat, Dec 20, 2003 at 11:13:23PM -0500, Trey Sizemore wrote: > Just for clarification... > > The trade off I see with installing from CD vs. doing a minimal install > is that when it comes time to upgrade it will cause more issues. > > By this I mean that if I do a minimal install and then later install > from ports it will be more seamless than installing first from packages > (like KDE, for example) and then trying to upgrade with ports later. > > Certainly packages from the CD would be installed quicker than having to > build from ports, but at the cost of future upgrades. Actually, you'll be pleased to hear this is completely false. pkgs and ports are closely related and there's no problem in installing a package and then updating it via ports or vice versa. portupgrade(1) even has the handy -P option to make that sort of thing easier. A pkg is nothing more than the result of compiling a port, bundled up in a tar ball and with a few extra bits'n'bobs to help keep the administrivia in line. You can build your own packages from the ports tree simply by typing 'make package' in the appropriate port directory -- although this will also install the port on your system. There are other reasons for doing a minimal install -- generally when I'm installing a box, I usually want to jump to the latest -STABLE rather than the -RELEASE version from the CDs, so I tend to do a minimal install from CD, grab the cvsup-without-gui package off the CDs or the 'net and from there grab the latest sources into an empty /usr/src and start building. Similar treatment for ports -- instead of installing the ports tree from CD, I find it's easier to just cvsup(1) the whole tree starting with an empty directory. This works well if you have a decent amount of bandwith, and it avoids the 'adopt the ports tree into cvsup' problem as described in: http://www.cvsup.org/faq.html#caniadopt http://www.cvsup.org/faq.html#adopt Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Initial install (packages vs. ports)
Just for clarification... The trade off I see with installing from CD vs. doing a minimal install is that when it comes time to upgrade it will cause more issues. By this I mean that if I do a minimal install and then later install from ports it will be more seamless than installing first from packages (like KDE, for example) and then trying to upgrade with ports later. Certainly packages from the CD would be installed quicker than having to build from ports, but at the cost of future upgrades. Is this true, a little off the mark, or way off? Thanks, ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"