Version 19 (modified by jmpalacios (Juan Manuel Palacios), 17 years ago) (diff) |
---|
STATUS
The dp2mp-move branch has been merged back into trunk and all the changes listed here will be passed down to users in the next MacPorts release, 1.5, no ETA yet.
Rationale
Upon migrating away from the defunct OpenDarwin community, the MacPorts project also changed its name from the long standing "DarwinPorts", in order to better reflect its aim to refocus support solely on Mac OS X.
This change brought about great mixture between the old and new names at various aspects of the project, like chosen installation paths, internal routines naming and many others, as every naming decision up to the point of migration had naturally been based on the old project name. When first moving to our new name great effort was put into updating most of the user visible stuff to the implied new namespace, but many "under the hood" things were left behind in the old namespace due to time constraints in getting MacPorts 1.4 out the door, including every single user-side installation path.
It is the aim of the dp2mp-move branch to complete the migration to the new MacPorts namespace at every single level of the project:
- source level layout, e.g. moving
base/src/darwinports1.0
tobase/src/macports1.0
in svn and adapting files therein accordingly; - internal routines naming, e.g. renaming
dportinit
tomportinit
and many other examples in this category; - installation paths, e.g. going from a
${prefix}/share/darwinports
MacPorts base installation path at the host level to${prefix}/share/macports
; - distribution means, e.g. by moving to the
rsync.macports.org
server name for source and ports distribution and updating corresponding options in existing configuration files to reflect the change; - any other relevant aspect missing from this list...
MacPorts' new look
Needless to say, changes in this branch have major implications not only in the inner workings of MacPorts, but also on some user visible aspects of our software. WIth respect to installation paths, a default MacPorts installation upgraded to this branch would experience the following sequential moves:
/Library/Tcl/darwinports1.0 -----> /Library/Tcl/macports1.0 /opt/local/etc/ports/ports.conf -----> /opt/local/etc/ports/macports.conf /opt/local/etc/ports/dp_version -----> /opt/local/etc/ports/mp_version /opt/local/etc/ports -----> /opt/local/etc/macports /opt/local/share/darwinports -----> /opt/local/share/macports /opt/local/share/man/man5/ports.conf -----> /opt/local/share/man/man5/macports.conf /opt/local/var/db/dports -----> /opt/local/var/macports
The last entry in the list above represents an important and delicate move, since MacPorts operates inside the /opt/local/var/db/dports
directory for many of its internal operations, like fetching Portfiles and building ports, among many other activities. Previously, MacPorts would fetch its own sources and the ports tree through the selfupdate
and/or sync
routines into an /opt/local/var/db/dports/sources/rsync.<rsync_server>_<rsync_module>
skeleton, replacing dots and other characters in server/module names with _
in some parts of the resulting directory name. Therefore the most common and default paths for the rsync based MacPorts sources and ports tree would look like:
/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate1/base /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports
selfupdate
and sync
routines in this branch, however, have been upgraded and refactored to work with a much more flexible and cleaner skeleton: sources are now fetched into an /opt/local/var/macports/sources/<server>/<rsync_module>
hierarchy. This may not seem like much at first, but closer inspection reveals this approach allows room to grow in every custom way users might need while also preserving a sense of order. Default paths will now look like:
/opt/local/var/macports/sources/rsync.macports.org/release/base /opt/local/var/macports/sources/rsync.macports.org/release/ports
Here release/base
and release/ports
are the new default rsync modules for both MacPorts base sources and the ports tree, respectively. This allows us, for example, to distribute trunk's base sources through a much more logical and self explanatory naming:
/opt/local/var/macports/sources/rsync.macports.org/trunk/base
trunk/base
being the corresponding rsync module that in this case would come to replace the old and confusing /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate/base
directory.
This new structure also allows us to distribute a new and custom ports tree under an entirely different rsync module if we so wish, while still preserving order. An example of this would look like, for a hypothetical ports tree with Portfiles still in testing:
/opt/local/var/macports/sources/rsync.macports.org/testing/ports
MacPorts users catering to the varied needs of clients on large networks, who might have needs for multiple ports trees, would instantly see the benefits of this approach:
/opt/local/var/macports/sources/<your_server>/module1/ports /opt/local/var/macports/sources/<your_server>/module2/ports /opt/local/var/macports/sources/<your_server>/module3/ports
Upgrading existing installations
An upgrade target in the main Makefile takes care of moving everything that's "old" in an existing MacPorts installation into its new location (as detailed in the moves dialog above) before regular installation of the new sources begins. Also, among the rules in this target there are a set of sed
calls that act on existing configuration files to upgrade them to the new conventions. For the new system-widw and user specific macpors.conf
files (/opt/local/etc/macports/macports.conf
and ~/.macports/macports.conf
, respectively), these are:
- new default path up to the configuration files is inserted,
/opt/local/etc/ports ---> /opt/local/etc/macports
; - new default path for the portdbpath variable is inserted,
/opt/local/var/db/dports ---> /opt/local/var/macports
; - new MacPorts rsync server is inserted,
rsync.darwinports.org ---> rsync.macports.org
; - new default value for the base tree,
dpupdate1/base/ ---> release/base/
; - new value for trunk's base sources,
dpupdate/base/ ---> trunk/base/
anddpupdate/base ---> trunk/base/
; - stray quotes are removed from the value of the rsync_options key in old conf files,
"-rtzv --delete --delete-after" ---> -rtzv --delete --delete-after
; - useless --delete option is removed from the default rsync flags (--delete is implied by --delete-after);
- comment references to the old ports.conf(5) man page are upgraded to the new macports.conf(5) page,
ports.conf(5) ---> macports.conf(5)
; - remaining comments in the DarwinPorts namespace are also upgraded to the MacPorts namespace.
And for sources.conf
:
- new MacPorts rsync server,
rsync.darwinports.org ---> rsync.macports.org
; - new default value for the ports tree,
dpupdate/dports ---> release/ports/
.
This takes care of selfupdate
and source based existing MacPorts installations. Users installing from the pkg installer distributed through our dmgs will also experience the exact same upgrade through the included preflight script.
Pending
- Everything is done except releasing the code to users as MacPorts 1.5!