Update of /cvsroot/fink/scripts/bindist
In directory sc8-pr-cvs1:/tmp/cvs-serv8442

Modified Files:
      Tag: remis-bindist
        HOWTO 
Added Files:
      Tag: remis-bindist
        README 
Log Message:
New documentation

--- NEW FILE: README ---
This file describes the scripts found in this directory.

---------------------------------------------------------------------------------

Environment:

bdenv.csh (do we need a sh version, too???)
  Must be sourced to set up the environment before any other scripts
  can be run. This file holds the site specific settings for making a
  binary distribution. The environment variables are described in the
  file.

---------------------------------------------------------------------------------

Scripts:

bdnewrel
  Prepares a new Fink binary release, by creating the appropriate file
  structure and cleaning the existing fink installation to ensure a
  proper build later on. It is called with one parameter specifying
  the new release number. This release number must correspond to the
  cvs tag used for tagging the packages going into the binary
  distribution.

bdsource
  It synchronizes the local fink tree as specified by the environment
  variable BDTREE with the cvs server using the release tag. It copies
  the sources into the release file structure omitting sources which
  may not be distributed as binaries (see licensecheck).

bdbuild
  Builds all packages found in $BDBASE/dists/$BDTREE using the
  'buildone' script. Once the deb is build correctly (verified by
  'buildcheck'), it is added into the binary distribution structure
  using the script 'bdadd'. 
  It builds first the main tree with the crypto tree disabled to
  ensure that no packages from crypto are picked up accidentally. In
  an automatic second pass the crypto tree is build, too. This scripts
  obviously runs for a long time, i.e. several days.
  The order in which the categories of the main tree are build is
  defined inside the script.
  This script must be run with sudo as the fink build is done as root. 

---------------------------------------------------------------------------------

Helper scripts called by above scripts 

bdadd Adds a list of packages to the binary distribution. These files
  are taken from your active fink installation. The binary packages
  have to exist beforehand. You invoke it with a list of package
  specs, similar to the "fink install" command. An invocation could
  look like this: ./bdadd xfree86-rootless automake debianutils-1.15-4
  It copies the .deb files including the split-offs into your local
  binary distribution tree, so be prepared to have a lot of disk space
  being taken.  You can set the environment variable BDCOPY to 'ln' to
  save disk space. However, this requires to have root privileges and
  it  might change file owner ships in your active fink installation.

buildone
  Builds the package given as argument. It removes all non-essential
  packages before building the package, thus assuring that only those
  packages are on the system which the given package depends on. It
  forces the rebuild of each package to assure a proper build. After
  building the package, it runs 'buildcheck' and if successful adds
  the package into the binary distribution. 

buildcheck
  Checks if the package given as argument was built correctly,
  i.e. the deb file was created.

licensecheck
  Takes one or more package names or package info files as arguments
  and prints the current license for these packages. Packages with
  licenses not allowing a binary distribution are written into two
  exclude files. exclude-RELEASE holds the package names in the form
  of an exclude file usable by rsync, while the exclude-RELEASE.log
  specifies the package name with its license in a more human readable
  form. The exclusion is overridden if the package name is listed in
  the optional includes-RELEASE file.

purge-nonbase.sh
  Called by 'buildone'. It removes all non-essential packages from the
  build system.

pkgversion
  Takes the full path of the info file and returns the full qualified
  package name including version, revision and if necessary epoch.

bdlist 
  Lists all .debs currently in the local binary distribution tree, for
  the current release. 

bdscan
  Scans your local binary distribution tree using dpk-scanpackages,
  creating the Packages.gz files required bye apt-get/dselect.

---------------------------------------------------------------------------------

Obsolete scripts:

bdindex 
  Creates index.php files in the various directories of the local
  binary distribution.  They will be synced to the online version by
  the bdsync command, and  then allow there to browse the binary
  distribution in any web browser. Usually it is sufficient to run it
  once after bdnewrel. 

bdsync
  Syncs your local binary distribution tree at $BDBASE against the
  online one using the SourceForge username defined in $SFSUER. This
  will not delete files missing in your local tree from the online
  tree. If you have to remove things again from the online tree, you
  have to do so manually (for security reasons, so you don't wipe out
  by accident the whole online bindist)

bdclean
  ???

---------------------------------------------------------------------------------

Index: HOWTO
===================================================================
RCS file: /cvsroot/fink/scripts/bindist/HOWTO,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- HOWTO       26 Jul 2002 17:03:25 -0000      1.3
+++ HOWTO       21 Dec 2003 23:46:12 -0000      1.3.2.1
@@ -1,138 +1,71 @@
-This is an attempt to explain how to use the binary distro related scripts in
-this directory. I had to discover this on my own, so it might not always be
-fully correct or complete, but it should at least help to start using them.
-
-Note that these tools can and should be improved, they are not set in stone.
-They are meant to ease controlling the binary distro, and that can't be made
-simple & fail-safe enough.
-
-
----------------------------------------------------------------------------------
-
-Environment variables:
-
-BDBASE
-  Description:
-    Set to the location where you store the bindist tree on you local HD.
-    The online bindist will be synced using rsync against this tree.  Note
-    that bdsync will probably not work correctly if you don't have the
-    trailing slash.
-  Example:
-    /bindist/
-
-BDDATA
-  Description:
-    The location in which these scripts and some auxillary files are stored.
-    I.e. it points to your checkout of the Fink scripts module, subdir "bindist"
-  Example:
-    /Users/maxhorn/Documents/fink-cvs/scripts/bindist
-
-SFUSER
-  Description:
-    Your SourceForge username -- used to sync the sources to the public binary
-    distribution.  Defaults to the current dist maintainer.
-  Example:
-    fingolfin
+This file describes the procedure to make a new binary distribution
+of fink on the local machine. The upload to SourceForge.net must be
+handled by the fink-core team and is not documented here.
 
-CURREL
-  Description:
-    The release number (or name) to place the dist under.  "fink-" will be
-    prepended to this name.
-  Example:
-    0.4.0 (will make a dists/fink-0.4.0/ directory)
+A detailed description of the scripts can be found in the README.
 
 ---------------------------------------------------------------------------------
 
-bdadd
-  Adds a list of packages to the binary distro. These files are taken from
-  your active fink installation. You invoke it with a list of package specs,
-  similiar to the "fink install" command. An invocation could look like this:
-    ./bdadd xfree86-rootless automake debianutils-1.15-4
-  It copies the .deb files into your local bindist tree, so be prepared to
-  have a lot of disk space being taken.
-  
-  TODO: right now the path "/sw" is hard coded into the script. This is not
-  that bad since the bindist is always for /sw; but if somebody wants to make
-  a bindist for say /usr/local, it's bad. Shouldn't be hard to fix.
-
-bdclean
-  ???
-
-bdindex
-  Creates index.php files in the various directories of the local bindist.
-  They will be synced to the online version by the bdsync command, and 
-  then allow there to browse the bindist in any web browser. Usually it is
-  sufficient to run it once after bdnewrel.
-
-bdlist
-  Lists all .debs currently in the local bindist tree, for the current release.
-
-bdnewrel
-  Prepares a new Fink binary release, by creating the appropriate file
-  structure. You call it with two parameters: the name of the new release,
-  and the name of the previous release (this is used to shared old .debs
-  without the need to recreate them). A typical invocation would be:
-    ./bdnewrel 0.4.0 0.3.2a
-
-  After running this command, verify that all went right and that the tree
-  it generated looks OK. You may also run the "bdindex" command just after
-  this one.
-  
-  TODO: should be extended to automatically retrieve the .info files from CVS
-  based on the release tags in CVS.
-  TODO: should be enhanced to handle "crypto" tree correctly
-
-
-bdscan
-  Scans your local bindist tree using dpk-scanpackages, creating the Packages.gz
-  files required by apt-get/dselect.
-
-
-bdsync
-  Syncs your local bindist tree at $BDBASE against the online one (you will have
-  to edit it if your SF username is not "fingolfin").
-  This will not delete files missing in your local tree from the online tree.
-  If you have to remove things again from the online tree, you have to do
-  so manually (for security reasons, so you don't wipe out by accident the whole
-  online bindist)
+Q: What is needed before I can start making a binary distribution?
 
+A: - You need a working fink installation. However during the build
+     phase all but the essential packages will be purged. Thus DON'T
+     DO IT on a production system where you relay on certain fink
+     packages. 
+   - The user building the binary distribution must be able to get
+     root privileges on the build machine using 'sudo'
+   - Enough disk space to hold the local binary distribution
+     (quantify???) 
+   - Before making a new binary distribution, the packages used must
+     be tagged in cvs with the release number used. This allows to
+     have a consistent set of packages for the binary distribution
+     while not forcing the corresponding trees to be freezed during
+     the compilation.
+   - On Mac OS 10.3 we must build against Apple's X11 because the
+     xfree86 4.4 is not backwards compatible with Apple's X11. Thus
+     make sure that you do have Apple's X11 and not xfree86 installed.
 
 ---------------------------------------------------------------------------------
 
-Q: How do I make a new binary release of the Fink distribution?
-
-A: Use the bdnewrel command, as described above.
+Q: What scripts need to be run to make a binary distribution?
 
----------------------------------------------------------------------------------
+A: # First edit bdenv.csh to set up the site specific settings
+   # Then source the file to set up the environment
+   source bdenv.csh
 
-Q: How do I add a package to the bindist?
+   # Create the directory structure for a new release, f.e. 7.0. This
+   # assumes that the packages in cvs used for the binary distribution
+   # are cvs tagged to 7.0 
+   ./bdnewrel 7.0
 
-A: Assuming your local bindist tree and the environment variables are setup,
-adding a new package FOO to the bindist works like this:
+   # Get the sources from cvs and copy them into the binary
+   # distribution structure excluding those packages which may not be
+   # distributed as binaries  
+   ./bdsource
 
+   # Next build the deb files for the sources copied in the previous
+   # step. Successfully compiled packages are copied into the binary
+   # distribution structure, including the source files.
+   sudo ./bdbuild
 
-# Copy over the .deb file(s)
-./bdadd FOO
-# Ensure all .deb's etc are uploaded
-./bdsync
-# Make sure the files are referenced
-./bdscan
-# Get the Package.gz files are online
-./bdsync
+   # After the previous step finished, check the $BDLOG directory for
+   # any packages which failed to build (stored in NotBuilt). See
+   # below how to handle any failed packages
 
-You could do it with the last .bdsync call only, and that would be a bit faster;
-but by using two calls, we ensure the online Package.gz files never refer to
-files that are not yet online. Not really that important, but playing it safe
-won't hurt here.
+   # Finally create the Packages.gz files needed by apt-get
+   ./bdscan
 
 ---------------------------------------------------------------------------------
 
-Q: Once the new bindist is online, how can I enable it so that people can
-use it via dselect?
+Q: How do I recover packages failing during the build process?
 
-A: In the web CVS module, modify the "LATEST-FINK" file to contain the new
-version. Then, ssh into shell.sourceforge.net and run this script:
-  /home/groups/f/fi/fink/htdocs/update.sh
+A: - Fix the package info/patch file
+   - Commit it and move the release tag to the current version
+     'cvs tag -F RELEASE_TAG FIXED_PACKAGE_FILE'
+   - execute 'bdsource' to resync the binary distribution sources with
+     the modified cvs version
+   - 'buildone FIXED_PACKAGE_NAME' which adds the package to the
+     binary distribution.
 
 ---------------------------------------------------------------------------------
 




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to