Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jan 2000 00:02:46 -0600 (CST)
From:      Igor Roshchin <igor@physics.uiuc.edu>
To:        andrews@TECHNOLOGIST.COM
Cc:        igor@physics.uiuc.edu, ports@FreeBSD.ORG
Subject:   Re: Port-maintenance
Message-ID:  <200001090602.AAA12547@alecto.physics.uiuc.edu>
In-Reply-To: <XFMail.000108232537.andrews@TECHNOLOGIST.COM> from "Will Andrews" at "Jan 8, 2000 11:25:37 pm"

next in thread | previous in thread | raw e-mail | index | archive | help


Thanks, Will, for your response.

(One can skip explanations and speculations and jump to SUMMARY)

I completely agree that your scripts do most of the job
(and I could have come up with something similar).

However, (sorry for not being clear enough at the very beginning)
my point is that doing it this way (manually) is 
a) NOT the most effective:
 - just imagine repeating all those scripts, manually typing in the ports
 names after getting them from the pkg list, on several machines.
 - imagine N (5, 10, 20) machines to do the complete cvsup of ports 
  (time and load) ?  NFS mounted /usr/ports sometimes is just not an option.
 - ..
b) NOT the most convinient.
 - Try to have all this scripts (as a separate additional script)
   handy on each machine, or otherwise to recreate them again each time
   you do update/upgrade. 
After all, that's why we have /usr/ports/Mk/bsd.port*.mk :) 
 
 
SUMMARY
-------
1. So, the suggestions were to add functionality to the Mk/bsd.port*.mk
and (may be) ports[/packages] -related utilites (as discussed below).

2. I suggest to implement (if possible) some type of
"partial cvsup" - which would update  the source only for 
the base portion (such as Mk/, dependencies ), 
and the desired (already installed) ports,
without updated the whole colletion.
(Just to clarify: "update" in Problem #1a means "source_update")

The new corresponding targets in /usr/ports/Makefile should be something like: 
	update-source-installed       (partial cvsup)
and optional
	update-source-all 
which would be equivivalent to the full cvsup source-update)

4. in Problem #2 - "update" means recompilation and reinstallation
 of the installed ports.
Possible targets for /usr/ports/Makefile are:
	rebuild-installed (rebuild of all installed ports with 
				the existing source)  
	reinstall-installed (reinstall of all installed ports without 
				rebuilding them)
	install-installed :	rebuild-installed, reinstall-installed
	update-installed :	update-source-installed, rebuild-installed,
				reinstall-installed

5. A target "update-source" for an individual port.
It should do the partial cvsup - "Mk/", dependencies and the port itself.

6. Separation in the list  of the packages installed via
 pkg_add and  port compilation

7. Possibility of automated package upgrade via pkg_add for
all the packages already installed [via pkg_add]



Igor



Will Andrews wrote:

> On 09-Jan-00 Igor Roshchin wrote:
> > Situation:
> > ---------
> > Consider that you have a set of ports that you install on a particular
> > computer (one of many boxes). Time-to-time, after the system is upgraded, 
> > especially, in case of a major upgrade that includes kernel and/or library 
> > format change,
> > (consider both, update/upgrade via cvsup and make world, and via binaries - 
> > /stand/sysinstall)
> > you'd like to update the ports.
> > This has two parts to it: 
> > 1) to make sure that the sources are fresh
> > (especially if you don't run cvsup regularly e.g. on a production machine,
> > or on a machine with a slow connection), and 
> > 2) recompile on the new system.
> 
> # cvsup -g -L 2 -h cvsupX.freebsd.org /usr/share/examples/cvsup/ports-supfile
> # for i in "list of ports here"; do pkg_delete `ls /var/db/pkg/ | grep $[i}`;cd
> /usr/ports/*/${i} && make install;done
> 
> ..should handle the majority of your ports. Some, like Apache, need special
> handling.
> 
> > Problem #1:
> > ---------
> > I don't want to refresh ALL port source tree,
> > or, if I've choosen just some categories, - ALL ports in the choosen
> > categories - just only those which I already have on my computer,
> > and dependencies.
> > (insert list of reasons here: slow link, limited time, ... )
> 
> You can choose which ports to upgrade.
> 
> > Suggestion #1:
> > To have a list of the "already-used ports" -
> > so that cvsup  can fetch/update only those. 
> > This list should be automatically updated (new ports addedd)
> > when a new port is compiled.
> > Suggestion #1.a
> > Probably "update" target (analogous to one in /usr/src/Makefile)
> > that would update the particular port, would be nice.
> > (i.e to update Makefile itself, pkg, files, ...)
> > ---
> > 
> > Ok, say we have fresh sources
> > 
> > What do you do ?
> > You hardly remember _all_ ports and packages you've installed
> > from the FreeBSD collection. You can look through the list of
> > packages installed, using pkg_info, then go to the appropriate
> > subdirectories in /usr/ports and type "make install".
> 
> $ pkg_info -Ia
> 
> OR
> 
> $ ls /var/db/pkg
> 
> will list all installed ports (plus their COMMENT in the former case).
> 
> > If you had installed ALL possible ports (if you are release engineer or 
> > just crazy)
> > - you could just go to the /usr/ports directory and type "make install",
> > and it should compile and install ALL ports.
> 
> Huh? Maybe you mean we should have an update target in /usr/ports/Makefile that
> automagically updates the currently installed ports?
> 
> > Problem #2
> > -----------
> > How to compile/install only the ports that have been compiled/installed
> > on this computer earlier.
> 
> for i in `pkg_info -Ia | awk '{print $1}'`; do cd /usr/ports/*/${i} && make
> install....
> 
> > Possible hack:
> > Edit Makefile in the /usr/ports/${CATEGORY} directory, removing
> > all SUBDIRs, and adding only those that one wants to keep and use in the
> > future.
> > Disdvantage:
> > Clamsy, and is not automated - would be nice to add/delete port names
> > from the list at during post-install or deinstall.
> 
> See script above.
> 
> > Suggestion #2
> > To have a list maintained as described above with a possible additional
> > target for ports that would allow [re-]compile/install only already installed
> > ports. It should allow "update" target as suggested in "Suggestion #1.a"
> 
> I can probably write this kind of thing. It'll probably not go in
> /usr/ports/Makefile before 4.0-RELEASE (unless a committer takes up the job /
> commits my patches).
> 
> > Problem #3
> > ----------
> > Much like the Problem #2, except for the case when one wants
> > to use "pkg_add" to install precompiled packages, and not
> > to compile them locally for one or another reason.
> > 
> > Suggestion #3
> > Would be nice to have a menu - much like in sysinstall -
> > which reads in the list of existing packages and allows you to
> > do mass-upgrade, probably with an additional possibility to
> > "uncheck" some of the ports from that list.
> > Note: sysinstall itself would be too bulky and AFAIK can not
> > upgrade existing packages - it will show them as already installed.
> 
> for i in `pkg_info -Ia | awk '{print $1}'`; do dialog_script();done
> dialog_script () {
> 
>         blah blah
> 
> }
> 
> can accomplish this.
> 
> > Problem and Suggestion #4
> > ----------
> > (somewhat of an aesthetic thing)
> > It would be nice to distinguish between ports installed via "add_pkg"
> > (including sysinstall) and via compiling port.
> > This way functionality described in #2 and #3 can be 
> > (probably as an option) kept separately.
> 
> I agree. This is something I can't provide a solution for with existing tools.
> Perhaps a simple /var/db/pkg/<port>/PACKAGE file or something to indicate this?
> 
> --
> Will Andrews <andrews@technologist.com>
> GCS/E/S @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?
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001090602.AAA12547>