Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37761724
en ru br
Репозитории ALT
S:0.4.1-alt10
5.1: 0.4.1-alt8
4.1: 0.4.1-alt7
4.0: 0.4.1-alt7
3.0: 0.4.1-alt5
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: distribute

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

distribute-0.4.1/0040755000100300000200000000000007555051433012040 5ustar  imzrpmdistribute-0.4.1/etc/0040755000100300000200000000000007350376400012610 5ustar  imzrpmdistribute-0.4.1/etc/distribute/0040755000100300000200000000000007350424530014764 5ustar  imzrpmdistribute-0.4.1/etc/distribute/tasks/0040755000100300000200000000000007511344267016120 5ustar  imzrpmdistribute-0.4.1/etc/distribute/tasks/Sisyphus0100644000100300010070000000315607511323231017667 0ustar  imzimz# Configuration for ./distribute.
#
# When this script will be executed $TASKNAME will be the name of the
# task.

# Many comments on the allowed parameters have been thrown away from
# this file to make it shorter. If you wish to configure other aspects
# of `distribute' behaviour (or learn more about all the parameters and
# their default values), then you should create your own task by invoking
# distribute TASKNAME --gen-taskconf
#
# More info in the output of distribute --help

# The only thing you really need to change here is the location of
# Sisyphus mirror on your machine (look for TYPE_N_LOCALMIRROR_TABLE
# parameter below).

PREFIX=ALTLinux

# This must be here (if you are going to index for APT).
# List of architectures; the first is the main (default) one.
ARCH=(i586 i686)

# type (as well as PREFIX and SUFFIX) is important for how the packages
# will be laid out on the disks; the path to a local mirror specifyies
# how to find the packges of a certain type that you want to put on the
# disks.
TYPE_N_LOCALMIRROR_TABLE="
# Empty lines are ignored; a line _beginning_ with '#' is a comment.

# The smaller collection (i686) comes first.
i686/RPMS /user/ALT/Sisyphus/i686/RPMS

$ARCH/RPMS /user/ALT/Sisyphus/i586/RPMS
# CHANGE THIS ^^^^^^^^^^^^^^^^^^^ !!
######################################

SRPMS /user/ALT/Sisyphus/SRPMS
# AND THIS ^^^^^^^^^^^^^^^^^^^ !!
######################################
"

# You can publish the lists of packages in fixed bases
# (using rsync by default)
# at the specified location:
#if [[ ! "$PUBLIC_SITE" ]]; then
# PUBLIC_SITE=remote:/my_site/some_dir
#fi
distribute-0.4.1/usr/0040755000100300000200000000000007510367604012652 5ustar imzrpmdistribute-0.4.1/usr/bin/0040755000100300000200000000000007600076253013417 5ustar imzrpmdistribute-0.4.1/usr/bin/distribute0100755000100300010070000004672607600076253015546 0ustar imzimz#!/bin/bash

# ALT distribute: distribute pkg collection on multiple CDs with (APT) indices.
# Copyright (C) 2002 Ivan Zakharyaschev <imz@altlinux.ru>.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


#set -x

# Changes:
# <imz@altlinux.ru>, 2002 Oct 21:
# - Fix stopping after clearing is PASSED (nothing to clear):
# + make all echo_*() always return successfully;
# + make passed() return successfully.
# - 0.4.0
#
# <imz@altlinux.ru>, 2002 Oct 7:
# - Rewrite the layouting code (splitMirrorDir()):
# + fix too long args list when creating links
# + fix not counting the first package's size in every disk (that's why they used to be a little larger tahn requested)
# + speed up by means of less calls to getSize() utility (also new)
# and no calls to `basename' (use shell param expansion which I consider
# to be '\n'-safer and faster)
# + use a format-argument for stat (in getSize())
# - more strict error code monitoring (should fail on any errors)
# - add messages to the clearing stage
# - FIXME: now using cp instead of ln in eatFiles() (due to a present bug in ln)
# - 0.3.93
#
# <imz@altlinux.ru>, 2002 Jul 11:
# - fix TERM exporting in functions for tput;
# - remove -speed option when we call cdrecord(1)
# (please use env vars instead!);
# - 0.3.91.
#
# <imz@altlinux.ru>, 2002 Jul 11:
# - fix snap-shooting (fix-base) when the source mirror directory is a symlink;
# - use ncurses tput(1) program to format messages;
# - pass PREFIX and main ARCH to disk-description.php4 (and make use of them);
# - add an optional comment for supplementary archs in disk-description.php4;
# - 0.3.9.
#
# <imz@altlinux.ru>, 2002 Jul 10:
# - 0.3.8.
#
# Look at the output of `distribute --usage' for inforamtion on how to use it.
# Some other documentaion is also supplied with the program
# (look for it in the appropriate directory under /usr/share/doc/).

trap failure ERR
set -o errexit

TASKNAME="$1"

# A rather stupid if-statement. (I think so because unset and zero-length
# variables are handled almost in the same way by Bash.) It is here
# just to remember how important P_ROOT is.
if [[ ! "$P_ROOT" ]]; then
P_ROOT=""
fi

PATHS="$P_ROOT/usr/lib/distribute/system.conf"

function MSourceIfNotEmpty()
{
for f in "$@"; do
if [ -s "$f" ]; then
. "$f"
fi
done
}

function MkAndPushDir()
{
for d in "$@"; do
mkdir -p "$d" && pushd "$d" &>/dev/null || return 1
done
}

##############################
# Reading parameters.

MSourceIfNotEmpty "$PATHS"

# And these paths should be defined in the ditribution specific
# configuration file (have just read it)

MSourceIfNotEmpty "$CONF_DEFAULT"
MSourceIfNotEmpty "$CONF_FROM_ADMIN"
MSourceIfNotEmpty "$CONF_FROM_USER"

BASES_DIR="$D_WORKPLACE/bases"
LAYOUTS_DIR="$D_WORKPLACE/layouts"
ISOS_DIR="$D_WORKPLACE/ISOs"

THIS_BASES_DIR="$BASES_DIR/$TASKSPEC"
THIS_LAYOUTS_DIR="$LAYOUTS_DIR/$TASKSPEC"
THIS_ISOS_DIR="$ISOS_DIR/$TASKSPEC"

# Task specific confgi will be read later

# End of reading params
############################

MSourceIfNotEmpty "$HELPDATA"
MSourceIfNotEmpty "$FUNCTIONS"

# Simple commands:

# The first arg is the name of the task usually; except for a few cases:
case "$1" in

--gen-myconf)
if [[ "$2" ]]; then
if [[ "$2" == "-" ]]; then
where=/dev/stdout
else
where="$2"
fi
else
where="$CONF_FROM_USER"
fi
mkdir -p "$(dirname "$where")" \
&& printf $"Writing an example of general user's configuration to %s.\n" "$where" >&2 \
&& general_conf > "$where" || exit 1
echo $"Edit it to tune your configuration." >&2
exit 0
;;

--usage)
usage
exit 0
;;

--help)
help
exit 0
;;

esac

shift

if [[ "$#" == "0" ]]; then
usage
exit 1
fi

enter_stage $"Configuration"
start_action $"for task %s" "$TASKNAME"
find_and_read_CONF_FOR_TASK \
&& { printf $"read from %s" "$CONF_FOR_TASK"; success; } \
|| { printf $"is supposed to be in %s" "$CONF_FOR_TASK"; failure; }

case "$1" in

--gen-taskconf)
if [[ "$2" ]]; then
if [[ "$2" == "-" ]]; then
where=/dev/stdout
else
where="$2"
fi
else
where="$CONF_FOR_TASK"
fi
mkdir -p "$(dirname "$where")" \
&& printf $"Writing an example of a task configuration to %s.\n" "$where" >&2 \
&& task_conf > "$where" || exit 1
echo $"Edit it to tune the parameters of the task." >&2
exit 0
;;

esac


#################################
# Checking the params

DOT_SUFFIX=${SUFFIX:+".$SUFFIX"}

if [[ "$INDEX_FOR_APT" == "yes" ]]; then
if [[ ! "$SUFFIX" ]]; then
echo $"The suffix is obligatory for CDs indexed for APT! Set it." >&2
exit 1
fi
if echo "$CD_COLLECTION_TITLE" | fgrep --silent '@'; then
echo $"Do not use '@' in the title for a CD that stores pkgs for \
APT -- it does not understand this symbol correctly. If it does \
(already), then fix the script" >&2
exit 1
fi
fi

if [[ ! "$CDVOLUME" ]]; then
CDVOLUME=650000000
fi

# End of checking the params.
#######################################


#####################################
# FUNCTIONS

# Very simple functions, perhaps you will alter them:

function zeroDelimited() {
for p in "$@"; do
printf '%s\000' "$p"
done
}

if [[ "$USE_DU_FOR_SIZE" == "yes" ]]; then
function getSize() {
trap failed ERR
set -o errexit
zeroDelimited "$@" | xargs -0 --no-run-if-empty \
du --dereference-args --dereference --summarize --bytes -- \
| cut --fields=1
#set +o errexit
}
else
function getSize() {
# { oldIFS="$IFS"; IFS=$'\n'; echo "$FUNCNAME: args: " "$*" | head >&2; IFS="$oldIFS"; }
trap failed ERR
set -o errexit
zeroDelimited "$@" | xargs -0 --no-run-if-empty \
stat --dereference --format='%s' --
#set +o errexit
}
fi
export -f getSize

function mkiso() {
enter_stage "Making ISO disk images"
start_action "$1.iso"
mkdir -p "$THIS_ISOS_DIR" \
&& mkisofs -J -r -f -o "$THIS_ISOS_DIR/$1".iso "$THIS_LAYOUTS_DIR/$1" \
&& success || failure
}

function record() {
enter_stage "Recording disks"
start_action $"writing %s" "$1"
cdrecord -v -eject "$THIS_ISOS_DIR/$1"\
&& success || failure
}

function list() {
enter_stage $"Listing layouts"
printf $"The models of the future filesystem of the disks are in %s,\n" "$THIS_LAYOUTS_DIR"
printf $"listing their sizes (per disk):\n"
echo $"Human readable form (units are powers of 1024):"
du --summarize --dereference --human-readable "$THIS_LAYOUTS_DIR"/*
echo
echo $"And now in bytes:"
du --summarize --dereference --bytes "$THIS_LAYOUTS_DIR"/*
}

function clearCDTrees() {
enter_stage $"Clearing layouts"
for cd in "$THIS_LAYOUTS_DIR"/cd[0-9]*; do
start_action $"removing %s" "$(basename "$cd")"
if [[ -d "$cd" ]]; then
rm -rf "$cd" && success || failure
else
passed
fi
done
}

# A bit more complex:

function apt_index() {
if [[ "$INDEX_FOR_APT" != "yes" ]]; then
echo $"Skipping APT indexing stage (as you wanted)." >&2
return
fi
enter_stage $"Indexing"
for cd in "$THIS_LAYOUTS_DIR"/cd*; do
for arch in "${ARCH[@]}"; do
if [[ ! -d "$cd/$PREFIX/$arch/base" ]]; then
start_action $"%s on %s" "$arch" "$cd"
passed
continue
fi
if [[ "$arch" == "$ARCH" ]]; then
start_action $"%s(main: bin +all src) on %s" "$arch" "$cd"
genbasedir --progress --topdir "$cd" "$PREFIX"/"$arch" "$SUFFIX" \
&& success || failure
else
start_action $"%s(other: bin +some src only) on %s" "$arch" "$cd"
genbasedir --mapi --progress --topdir "$cd" "$PREFIX"/"$arch" "$SUFFIX" \
&& success || failure
fi
done
done
}

function makePlainIndex() {
if [[ "$CREATE_PLAIN_INDEX" != "yes" ]]; then
echo $"Skipping plain indexing." >&2
return
fi

enter_stage $"Making plain indices"

if [[ ! "$BASE" ]]; then
echo $"$FUNCNAME: No base name specified!" >&2
exit 1
fi

local ldestdir="$THIS_BASES_DIR/$BASE"
if [[ ! -d "$ldestdir" ]]; then
echo $"$FUNCNAME: destination directory ($ldestdir) doesn't exist!" >&2
exit 1
fi

parse_localmirror_table | while read type mirror; do
start_action $"of the full base-state %s, type %s" "$BASE" "$type"
local plain_index="$ldestdir/plain-index-$(echo "$type" | sed -e 's!/!_!')"
(cd "$THIS_BASES_DIR/$BASE/$type"; find . '(' -type l -o -type f ')' -printf '%f\n') \
| (unset LANG{,UAGE}; sort) | gzip -9 \
> "$plain_index".gz \
&& zme "$plain_index".gz >/dev/null && success \
|| { rm -f "$plain_index".*; failure; }
done
if [[ "$1" ]]; then
cp -i "$THIS_BASES_DIR/$BASE/title" "$ldestdir" ||:
fi
}

# Make a remote copy (publish):
function publishPlainIndex() {
if [[ "$CREATE_PLAIN_INDEX" != "yes" ]]; then
echo $"Skipping publishing the plain indexes." >&2
return
fi

if [[ ! "$1" ]]; then
echo $"Skipping publishing the plain indexes (nowhere to publish)." >&2
return
fi

enter_stage $"Publishing"

if [[ ! "$BASE" ]]; then
echo $"$FUNCNAME: No base name specified!" >&2
exit 1
fi

local ldestdir="$THIS_BASES_DIR/$BASE"
if [[ ! -d "$ldestdir" ]]; then
echo $"$FUNCNAME: destination directory ($ldestdir) doesn't exist!" >&2
exit 1
fi

start_action $"the plain lists of the full base-state %s" "$BASE"
local rdestdir="$1"
"${RSYNC[@]}" -a "$ldestdir"/ \
--include='plain-index-*' --include='title' --exclude='*' \
"$rdestdir" \
&& success || failure
}

# Splitting:

function splitMirrorDir() {
if [[ ! -d "$THIS_BASES_DIR/$BASE/$type" ]]; then
echo $"No base fixed for $type" >&2
exit 1
fi

# Getting the list of all suitable files:
local -a allFiles
let 'no = 0' ||:
allFiles=()
# no points to the next free position in allFiles
# allFiles contains the constructed list
for p in "$THIS_BASES_DIR/$BASE/$type"/*.rpm; do
if [[ ! -e "$p" ]]; then
# fail on non-existent files
echo $"Package file doesn't exist: " "$p" >&2
return 1
fi
if [[ "$ONLY_REAL_FILES" == "yes" && ! -f "$p" ]]; then
continue
fi
if [[ "$DIFF_TO_BASE" ]]; then
older_copy="$DIFF_TO_BASE/$type/${p##*/}" # using shell param expansion instead of `basename' to speed up
if [[ -h "$older_copy" || -a "$older_copy" ]]; then
continue
fi
fi
allFiles[$(( no++ ))]="$p"
done
readonly -a allFiles

# Splitting the list of all files into future disks:
#
local -a filesToEat allSizes
let 'no = 0' ||:
filesToEat=()
allSizes=($(getSize "${allFiles[@]}"))
readonly -a allSizes
# allSizes contains the sizes corrsponding to allFiles
# filesToEat hold the constructed list of files to put on the current disk
# no points to the next free position in filesToEat
# totalSize should hold the sum of the sizes
# of the files already put into filesToEat;
# it is set and reset externally.
for p in "${allFiles[@]}"; do
if (( totalsize + ${allSizes[$(( no ))]} > CDVOLUME )); then
eatFiles "${filesToEat[@]}"
filesToEat=()
finishCD
startTypedCD
fi
let "totalsize += ${allSizes[$(( no ))]}" ||:
filesToEat[$(( no++ ))]="$p"
done
eatFiles "${filesToEat[@]}"
}

function eatFiles() {
#{ oldIFS="$IFS"; IFS=$'\n'; echo "$FUNCNAME: args: " "$*" | head >&2; IFS="$oldIFS"; }
zeroDelimited "$@" | xargs -0 --no-run-if-empty \
cp -s \
--target-dir="$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$type$DOT_SUFFIX"/ \
--
}

function startTypedCD() {
# set -x
mkdir -p "$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$type$DOT_SUFFIX"
start_action $" %s with %s" "$(( cdN ))" "$type"
# set +x
}

function finishCD() {
# set -x

if [[ "$INDEX_FOR_APT" == yes ]]; then
for arch in "${ARCH[@]}"; do
if [[ -d "$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$arch"
|| "$arch" == "$ARCH"
]]; then
mkdir -p "$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$arch/base"
fi
done
parse_localmirror_table | while read type mirror; do
mkdir -p "$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$type$DOT_SUFFIX"
done
fi
mkdir -p "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/.disk
{
##################################
# DO NOT USE "@" synbol in the disk identfication string! -- it is not understood well by APT!
echo -e "$CD_COLLECTION_TITLE; CD $(( cdN ))" \
> "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/.disk/info
for f in "$THIS_BASES_DIR/$BASE"/plain-index-*; do
[[ -f "$f" ]] && cp "$f" \
"$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$ARCH/base/full-$(basename "$f")"
done
#set -x
other_archs_array=(
$(for arch in "${ARCH[@]}"; do
if [[ -d "$THIS_LAYOUTS_DIR/cd$(( cdN ))/$PREFIX/$arch/base"
&& "$arch" != "$ARCH"
]]; then
echo "$arch"
fi
done)
)
# Debug:
#echo "${other_archs_array[@]}"
other_archs=""
export other_archs # the parameter for php.
if (( ${#other_archs[@]} > 1 )); then
other_archs="{$(IFS=','; echo "${other_archs_array[@]}";)}"
else
other_archs="$other_archs_array"
fi
# Debug:
#echo "${other_archs}"
#set +x
for f in "$DISK_DESCRIPTION_SOURCE"*.php4; do
ext="${f%%.php4}"
ext="${ext##"$DISK_DESCRIPTION_SOURCE"}"
title="$(< "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/.disk/info)" \
PREFIX="$PREFIX" \
ARCH="$ARCH" \
php -q -d short_open_tag=Off "$f" \
> "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/index"$ext".html
done
for f in "$DISK_DESCRIPTION_SOURCE"*.css; do
ext="${f%%.css}"
ext="${ext##"$DISK_DESCRIPTION_SOURCE"}"
cp -f "$f" "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/disk-description"$ext".css
done
}
let 'cdN++' ||:
let 'totalsize = 0' ||:
# set +x
success
return 0
}

function parse_localmirror_table() {
if [[ ! "$TYPE_N_LOCALMIRROR_TABLE" ]]; then
echo $"TYPE_N_LOCALMIRROR_TABLE empty; nothing to do! Set it before \
calling again." >&2
exit 1
fi
echo "$TYPE_N_LOCALMIRROR_TABLE" \
| sed -e 's/^#.*$//' | sed -e '/^$/d'
}

function split() {
enter_stage $"Splitting"
printf $"(CDVOLUME=%s bytes are allocated for packages on each \
disk; you can change CDVOLUME parameter), disks:\n" "$CDVOLUME"

echo D >&2
let 'totalsize = 0' ||:
let 'cdN = 1' ||:
parse_localmirror_table \
| while read type mirror || { type="$last_type"; finishCD; false; }; do
startTypedCD
splitMirrorDir "$type" || return 1
last_type="$type"
done
}

function fix_base() {
enter_stage $"Fixing (\`snap-shooting')"
if [[ ! "$BASE" ]]; then
echo $"No base name specified." >&2
exit 1
fi

parse_localmirror_table \
| while read type mirror;
do
start_action $"base-state %s for %s" "$BASE" "$type"
mkdir -p "$(dirname "$THIS_BASES_DIR/$BASE/$type")" \
&& cp -R --symbolic-link "$mirror" "$THIS_BASES_DIR/$BASE/$type" \
&& success || failure
done

( unset LANG{,UAGE}; export LANG{,UAGE}; \
echo "$TASKNAME $(date +'%Y/%m (%b%d %H:%M%Z)')" > "$THIS_BASES_DIR/$BASE/title" \
)
# the title will be like this: Sisyphus 2002/02: February, 13 23:21 MSK
}

function rm_base() {
enter_stage $"Removing"
if [[ ! "$BASE" ]]; then
echo $"No base name specified." >&2
exit 1
fi
if ! read \
-p $"Do you really want to remove all data stored for base-state $BASE?[y/N]" \
-r -n 1 \
|| [[ "$(echo "$REPLY" | tr [[:upper:]] [[:lower:]])" != y ]]; then
echo
return
fi
echo

start_action $"all data associated with base state %s" "$BASE"
rm -rf "$THIS_BASES_DIR/$BASE" && success || failure
}

function ls_base() {
enter_stage $"Listing base state"
ls -d "$THIS_BASES_DIR"/$BASE
}


# End of FUNCTIONS
#####################

mkdir -p "$D_WORKPLACE" \
&& case "$1" in

# Base states manipulation:
--fix-base)
BASE="$2"
fix_base
makePlainIndex
#set -x
if [[ "$PUBLIC_SITE" ]]; then
publishPlainIndex "$PUBLIC_SITE"/"$BASE"
fi
#set +x
;;
--rm-base)
BASE="$2"
if [[ "$BASE" == '*' ]]; then
for d in "$THIS_BASES_DIR"/*; do
BASE="$(basename "$d")"
rm_base
done
else
rm_base
fi
;;
--ls-base)
BASE="$2"
ls_base
;;
--make-plain-index) # a remote destination can be given
BASE="$2"
if [[ "$BASE" == '*' ]]; then
for d in "$THIS_BASES_DIR"/*; do
BASE="$(basename "$d")"
CREATE_PLAIN_INDEX=yes makePlainIndex
# if [[ "$3" && ! "$PUBLIC_SITE" ]]; then
# PUBLIC_SITE="$3"/"$BASE"
# fi
if [[ "$PUBLIC_SITE" ]]; then
publishPlainIndex "$PUBLIC_SITE"/"$BASE"
fi
done
else
CREATE_PLAIN_INDEX=yes makePlainIndex
# if [[ "$3" && ! "$PUBLIC_SITE" ]]; then
# PUBLIC_SITE="$3"
# fi
if [[ "$PUBLIC_SITE" ]]; then
publishPlainIndex "$PUBLIC_SITE"/"$BASE"
fi
fi
;;

# Laying out the future CD filesystem:
--split-full)
BASE="$2"
CD_COLLECTION_TITLE="Full $(<"$THIS_BASES_DIR/$BASE/title")"
split
;;
--split-diff)
BASE="$2"
DIFF_TO_BASE="$BASES_DIR/$3"
CD_COLLECTION_TITLE="Diff $(<"$DIFF_TO_BASE/title") -> $(<"$THIS_BASES_DIR/$BASE/title")"
split
;;
--index)
#plain_index
apt_index
;;
--clear)
clearCDTrees
;;

# Operating with ISOs:
--mkiso)
# List it before to check whether all link targets are there:
list
# Make the ISO(s):
if [[ -z "$2" ]]; then
echo $"Making all ISOs:"
for cd in "$THIS_LAYOUTS_DIR"/cd[0-9]*; do [ -d "$cd" ] && mkiso "$(basename "$cd")"; done
else
mkiso cd"$2"
fi
;;
--record)
if [[ -z "$2" ]]; then
echo $"Writing all ISOs:"
for cd in "$THIS_ISOS_DIR"/cd*.iso; do record "$(basename "$cd")"; done
else
record cd"$2".iso
fi
;;
--rmiso)
enter_stage $"Removing disk images"
if [[ -z "$2" ]]; then
echo $"Removing all ISOs..."
for cd in "$THIS_ISOS_DIR"/cd*.iso; do
action "$(basename "$cd")" "rm -f '$cd'"
done
else
action cd"$2".iso "rm -f '$THIS_ISOS_DIR/cd$2.iso'"
fi
;;

--lsiso)
enter_stage $"Listing disk images"
du --human-readable --summarize "$THIS_ISOS_DIR"/cd*.iso
du --summarize --bytes "$THIS_ISOS_DIR"/cd*.iso
;;

# List the sizes of objects:
--list)
list
;;

# A short command to pass the layouting stage
--LAYOUT-FULL)
BASE="$2"
CD_COLLECTION_TITLE="Full $(<"$THIS_BASES_DIR/$BASE/title")"
clearCDTrees
split \
&& apt_index \
&& echo $"Successfully laid out the future disks, listing:" \
&& list \
&& printf $"\nNow you can move around and copy links and \
files in %s as you like. When creating the images of the disks, all the links \
will be replaced by real files.\n" "$THIS_LAYOUTS_DIR" \
|| { echo $"Failed to lay out"; exit 1; }
;;

--LAYOUT-DIFF)
if [[ ! "$2" || ! "$3" ]]; then
echo $"Error: No dest or src base!" >&2
usage
exit 1
fi
BASE="$2"
DIFF_TO_BASE="$BASES_DIR/$3"
CD_COLLECTION_TITLE="Diff $(<"$DIFF_TO_BASE/title") -> $(<"$THIS_BASES_DIR/$BASE/title")"
clearCDTrees
split \
&& apt_index \
&& echo $"Successfully laid out the future disks, listing:" \
&& list \
&& printf $"\nNow you can move around and copy links and \
files in %s as you like. When creating the images of the disks, all the links \
will be replaced by real files.\n" "$THIS_LAYOUTS_DIR" \
|| { echo $"Failed to lay out"; exit 1; }
;;

*)
usage
exit 1
;;
esac
distribute-0.4.1/usr/lib/0040755000100300000200000000000007350376400013414 5ustar imzrpmdistribute-0.4.1/usr/lib/distribute/0040755000100300000200000000000007555054614015601 5ustar imzrpmdistribute-0.4.1/usr/lib/distribute/defaults.conf0100644000100300000200000000076707550377421020265 0ustar imzrpm#-*- Shell-script -*-
# Default values:

SUFFIX="${TASKNAME:+"$TASKNAME"$(date +%Y%m%d)}"
INDEX_FOR_APT=yes
CREATE_PLAIN_INDEX=yes
CD_COLLECTION_TITLE="$TASKNAME"
ONLY_REAL_FILES=no
TASKSPEC="$TASKNAME"
DISK_DESCRIPTION_SOURCE="$D_LIBDIR"/disk-description
if [[ ! "$USE_DU_FOR_SIZE" ]]; then
USE_DU_FOR_SIZE=no
fi
distribute-0.4.1/usr/lib/distribute/disk-description.css0100644000100300000200000000170207510363501021550 0ustar imzrpmbody { background-color: white; }

kbd.shell-cmd { color: maroon; background-color: gray; }
kbd.shell-cmd { color: white; background-color: black; }

code.soft-component { font-style: italic; font-family: sans-serif; }
code.program { font-variant: normal; font-style: normal; font-family: serif; }
code.program:before { content: open-quote; }
code.program:after { content: close-quote; }
code.program { quotes: "`" "'"; }

dl.dirtree > dt { font-weight: bolder; }

dl.dirtree dt.file:after { content: ": "; }
dl.dirtree dt.file + dd:after { content: "; "; }
dl.dirtree dt.file + dd:last-child:after { content: ". "; }

dl.dirtree dt:not([class]) code:not([class]),
code.dirname { font-family: normal; font-style: normal; }
dl.dirtree dt:not([class]) code:not([class]):after,
code.dirname:after { content: "/"; }

dl.dirtree dt.file code:not([class]),
code.filename { font-family: normal; font-style: italic; color: green; }

p.marks { text-align: right; }
distribute-0.4.1/usr/lib/distribute/functions0100644000100300010070000000702007555054614017537 0ustar imzimz# -*- Shell-script -*-
# Basic functions (particularly formatting) used in ALT distribute.

# Copyright (C) 2002 Ivan Zakharyaschev <imz@altlinux.ru>.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# Function names similar to those in on /etc/init.d/functions.
# For changelog see the main script.
# Last change: 2002 Oct 21.


# ncurses progs require a set TERM
[ -n "$TERM" ] || TERM=dumb
export TERM

# Obsolete: we'll use tput to get it everytime we need.
# Get a sane screen width
#[ -n "$COLUMNS" ] || COLUMNS=80

# Taken from /etc/sysconfig/init:

# offset from right margin of the screen to start status labels at.
RES_OFFSET=8

# The cmd names and color codes used as arguments for tput(1)
# were taken from terminfo(5).

# terminal sequence to move to that position.
MOVE_TO_COL(){
# `tput cols` reports 80 on dumb terms, the real width when appropriate;
# `tput hpa N` moves to col N; on dumb terms does nothing.
tput hpa $(( $(tput cols) - RES_OFFSET )) # Horizontal Position Absolute
}

# Enumerate colors
let BLACK=0 RED=1 GREEN=2 YELLOW=3 BLUE=4 MAGENTA=5 CYAN=6 WHITE=7

# set 'success' color (currently: green)
SETCOLOR_SUCCESS(){ tput bold; tput setaf $GREEN; }

# set 'failure' color (currently: red)
SETCOLOR_FAILURE(){ tput bold; tput setaf $RED; }

# set 'warning' color (currently: yellow)
SETCOLOR_WARNING(){ tput bold; tput setaf $YELLOW; }

# set 'info' color (currently: cyan)
SETCOLOR_INFO(){ tput bold; tput setaf $CYAN; }

# set 'banner' color (currently: blue on yellow)
SETCOLOR_BANNER(){ tput setaf $BLUE; tput setab $YELLOW; }

# terminal sequence to reset to the default color.
SETCOLOR_NORMAL(){
tput op # set Original color Pair
tput sgr0 # turn off all special graphics mode (bold in our case)
}

echo_success()
{
MOVE_TO_COL
echo -n '[ '
SETCOLOR_SUCCESS
echo -n 'OK'
SETCOLOR_NORMAL
echo ' ]'
return 0
}

echo_failure()
{
MOVE_TO_COL
echo -n '['
SETCOLOR_FAILURE
echo -n 'FAILED'
SETCOLOR_NORMAL
echo ']'
return 0
}

echo_passed()
{
MOVE_TO_COL
echo -n '['
SETCOLOR_WARNING
echo -n 'PASSED'
SETCOLOR_NORMAL
echo ']'
return 0
}

# Log that something succeeded
success()
{
echo_success
return 0
}

# Log that something failed
failure()
{
rc=$?
echo_failure
return $rc
}

# I change the sematics, now it is not:
# Log that something passed, but may have had errors. Useful for fsck
# anymore; return 'no failure' always (as success() does).
passed()
{
#local rc=$?
echo_passed
return 0
}

# Run some action. Log its output.

start_action()
{
local action="$1"
shift
SETCOLOR_INFO
printf "$action" "$@"
SETCOLOR_NORMAL
echo -n ": "
ACTION="$STAGE $action"
}

action()
{
start_action "$1"
shift
bash -c "$*" && success "$STRING" || failure "$STRING"
local rc=$?
#echo -e '\r'
return $rc
}

enter_stage()
{
if [[ "$STAGE" == "$1" ]]; then
return
fi
STAGE="$1"
shift
SETCOLOR_BANNER
printf "$STAGE" "$@"
SETCOLOR_NORMAL
echo
}

distribute-0.4.1/usr/lib/distribute/disk-description.php40100755000100300010070000000711507513322162021652 0ustar imzimz<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

<head>
<title><?php echo($title); ?></title>
<link rel="stylesheet" type="text/css" href="disk-description.css" />
</head>

<body>
<h3><?php echo($title); ?></h3>

<p>To access the packages on this CD with
<code class="soft-component">APT</code>, you just have to run
<kbd class="shell-cmd">apt-cdrom add</kbd> on your computer (and know how
to use <code class="program">apt-get</code>).</p>

<h4>How the contents is arranged</h4>
<p>Here is a short description of the types of the contents of this disk,
per directory.
In brackets, you can find commands that are commonly used to handle the
files of the listed type (if you don't know how to use them, read the
corresponding <code class="soft-component">man</code>-
&amp; <code class="soft-component">info</code>-pages).</p>

<dl class="dirtree">

<dt><code>.disk</code></dt>
<dd><dl>

<dt class="file"><code>info</code></dt><dd>disk identification</dd>

</dl></dd>

<dt><code><?php echo($PREFIX); ?>/SRPMS.*</code></dt>
<dd><dl>

<dt class="file"><code>*.src.rpm</code></dt>
<dd>source packages
(<kbd class="shell-cmd">rpm -ihv</kbd>,
<kbd class="shell-cmd">rpm --rebuild</kbd>)
</dd>

</dl></dd>

<dt><code><?php echo($PREFIX); ?>/<?php echo($ARCH); ?>/RPMS.*</code></dt>
<dd><dl>

<dt class="file"><code>*.<?php echo($ARCH); ?>.rpm</code>, <code>*.noarch.rpm</code></dt>
<dd>binary packages
(<kbd class="shell-cmd">rpm -[iUF]hv</kbd>,
<kbd class="shell-cmd">rpm -qp</kbd>,
<kbd class="shell-cmd">rpm -K</kbd>)
</dd>

</dl></dd>

<dt><code><?php echo($PREFIX); ?>/<?php echo($ARCH); ?>/base</code></dt>
<dd><dl>

<dt class="file"><code>pkglist*</code>, <code>srclist*</code>,
<code>hashfile</code>, <code>release*</code></dt>
<dd>indices of the contents of <code class="dirname"><?php echo($PREFIX); ?></code>
directory on this CD &mdash; for <code class="soft-component">APT</code>
(<kbd class="shell-cmd">apt-cdrom add</kbd>)</dd>

<dt class="file"><code>full-plain-index-*</code></dt>
<dd>full lists of the collection of package-files this CD distribution is based on (<kbd class="shell-cmd">diff</kbd>,
<kbd class="shell-cmd">grep</kbd>,
<kbd class="shell-cmd">xargs</kbd>, ...).
If this CD set
contains only the updates (the difference) between two states of the
full collection, then these plain lists contain the names of all the
files from the last state of the collection, not only the difference</dd>

</dl></dd>

</dl>

<?php if ( $other_archs != "" ) { ?><p>
There are also supplementary directories with some packages targeted
for other architectures: <code class="dirname"><?php echo($PREFIX); ?>/<?php
echo($other_archs); ?></code>. Their structure is basically the same
as of <code class="dirname"><?php echo($PREFIX); ?>/<?php
echo($ARCH); ?></code>, but, of course, the
<code class="filename">srclist*</code> files are not so long, and
<code class="filename">full-plain-index-*</code> are not there (all of
them are placed to the directory for the main architecture:
<code class="dirname"><?php echo($PREFIX); ?>/<?php
echo($ARCH); ?></code>).
</p><?php } ?>


<address>
<acronym>ALT</acronym> Linux Team
&lt;<a href="http://www.altlinux.ru/">http://www.altlinux.ru/</a>&gt;
</address>

<p class="marks">
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-xhtml11"
alt="Valid XHTML 1.1!" height="31" width="88" /></a>
</p>

</body>
</html>
<!-- Local Variables: -->
<!-- mode: Html -->
<!-- End: -->
distribute-0.4.1/usr/lib/distribute/system.conf0100644000100300010070000000362307555052106017776 0ustar imzimz# -*- mode: shell-script; -*-

# system.conf:
# Set the default common paths to places used by `distribute'
# in this kind of system/distribution.
#
# This file is a part of ALT distribute program (licensed under GPL).
# imz@altlinux.ru
# last change: 2002 June 10

PROGNAME=distribute
PROGVERSION=0.4.0

# P_* variables specify absolute paths to the standard
# locations of the FS hierarchy where distribute is installed.
# The standard locations are: the Root (/), /etc and /usr/lib.
# (Remember: they can be relocated from the absolute root to
# another place, e.g. a place in a user's home directory.)
#
# P_ROOT should be set externally. (Empty string if `distribute'
# has been installed without relocation, i.e. the installation root
# is the absolute system root (/).)
if [[ ! "$P_SYSCONFDIR" ]]; then
P_SYSCONFDIR="$P_ROOT/etc"
fi
P_LIBDIR="$P_ROOT/usr/lib"

# D_* variables specify the places in hte FS which `distribute' is
# allowed to use: some analogues of the standard general locations
# and other places.
D_SYSCONFDIR="$P_SYSCONFDIR/$PROGNAME"
D_USERCONFDIR="$HOME/.etc/$PROGNAME"
if [[ ! "$D_WORKPLACE" ]]; then D_WORKPLACE="$HOME/.var/$PROGNAME"; fi
D_LIBDIR="$P_LIBDIR/$PROGNAME"

# CONF_* variables specify the loactions of different kinds of
# configuration files for `distribute'.
CONF_DEFAULT="$D_LIBDIR/defaults.conf"
CONF_FROM_ADMIN="$D_SYSCONFDIR/general.conf"
CONF_FROM_USER="$D_USERCONFDIR/general.conf"
#CONF_FROM_USER="$HOME/.$PROGNAME"
HELPDATA="$D_LIBDIR/helpdata"
FUNCTIONS="$D_LIBDIR/functions"

function find_and_read_CONF_FOR_TASK() {
for f in {"$D_USERCONFDIR","$D_SYSCONFDIR"}/tasks/"$TASKNAME"; do
CONF_FOR_TASK="$f"
if [[ -r "$CONF_FOR_TASK" ]]; then
MSourceIfNotEmpty "$CONF_FOR_TASK"
return 0
fi
CONF_FOR_TASK=
done
CONF_FOR_TASK="$D_USERCONFDIR"/tasks/"$TASKNAME"
return 1
}

RSYNC=(rsync -vz -essh --progress)

# end of /usr/lib/distribute/system.conf
distribute-0.4.1/usr/lib/distribute/helpdata0100644000100300010070000002143407513060062017302 0ustar imzimz# -*- Shell-script -*-
# This file contains data that is used by ALT `distribute' program
# to explain something to the user.
#
# This is a part of ALT `distribute' program
# by Ivan Zakharyaschev <imz@altlinux.ru>
# licensed to you under the terms of GPL version 2.
#
# Last change: 2002 Jul 10
#################################


# Configuration patterns:

function general_conf() {

cat <<EOF
# Configuration for $0.
#
# When this script will be executed \$TASKNAME will be the name of the
# task.
#
# In bytes; this is the space you allocate for the packages on a disk --
# remember: the directories and the indexes also consume some space.
# default:
#CDVOLUME=650000000
# another example:
#CDVOLUME=100000000

# Default:
#ONLY_REAL_FILES=yes

# Default:
#INDEX_FOR_APT=yes
#CREATE_PLAIN_INDEX=yes

EOF

}

function task_conf() {

general_conf
cat <<EOF
# Set this to the suffix
# (that is appended to the distribution name to indentify a variant of it)
#
#SUFFIX=sisyphus\$(date +%Y%m%d)
# or (default):
#SUFFIX="\$TASKNAME"\$(date +%Y%m%d)
# or (to disable it -- not for APT):
#SUFFIX=

# A general name for the collection
#PREFIX=Mandrake
#PREFIX=RedHat
PREFIX=ALTLinux

# This must be here (if you are going to index for APT).
ARCH=i586

# type (as well as PREFIX and SUFFIX) is important for how the packages
# will be laid out on the disks; the path to a local mirror specifyies
# how to find the packges of a certain type that you want to put on the
# disks.
TYPE_N_LOCALMIRROR_TABLE="
# Empty lines are ignored; a line _beginning_ with '#' is a comment.
\$ARCH/RPMS /user/ALT/Sisyphus/i586/Mandrake/RPMS
SRPMS /user/ALT/Sisyphus/SRPMS

# \$ARCH/RPMS /var/cache/apt/archives
"


# Every CD in the set will be label with the title and some other info.
#
#CD_COLLECTION_TITLE='Sysiphus snapshot'
# or (default):
#CD_COLLECTION_TITLE='\$TASKNAME'
# or:
#CD_COLLECTION_TITLE='$TASKNAME'

# You can publish the lists of packages in fixed bases
# (using rsync by default)
# at the specified location:
#PUBLIC_SITE=remote:my_site/some_dir
EOF

}

# Help:

function help() {
echo "$0: Distribute a collection of packages on multiple CDs, issue updates to the released distribution."
echo "Especially good at distributing such collections for future use \
by APT."
echo
echo "This is '$PROGNAME' version $PROGVERSION,"
echo " Copyright (C) 2002 Ivan Zakharyaschev <imz@altlinux.ru>."
echo "'$PROGNAME' comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
certain conditions; see /usr/share/doc/$PROGNAME-$PROGVERSION/COPYING
for details."
echo
echo "The ways of how you can use this script are summarized here"
echo
echo "You have just made an error or called smth like:"
echo " $0 (--usage|--help)"
echo
echo "First of all, you should set up a new 'task'. Or, you can use one of the already set up tasks (system-wide or your own; this program comes with an example of a system-wide task configuration: Sisyphus)."
echo "To set up a new task, think of a good name \
for it, then print out the \
example of a task configuration and edit it. (The simplest way is to invoke this mode without the optional FILENAME.):"
echo " $0 TASKNAME --gen-taskconf [ FILENAME ]"
echo
echo The configuration file should define a table of locations of packages you want to distribute.
echo
echo "The first step in creating a distribution is to fixate the state of the collections of packages. The fixed state will be called 'base'. To perform this initial step, run:"
echo " $0 TASKNAME --fix-base STATE_ID"
echo ", where STATE_ID will be used in future to refer to this fixed state."
echo "You can give a special title to the fixed collection of packages (it's the title, not the identifier/name; there is a default value for the title that should be OK): to do this, edit a file called 'title' in the directory where distribute has stored the base (smth like '~/.var/distribute/bases/TASKNAME/STATE_ID/)."
echo
echo " $0 TASKNAME (--ls-base | --rm-base) STATE_ID_PATTERN"
echo ", where STATE_ID_PATTERN (i.e. '*') matches state IDs fixed before."
echo
echo "After that you may lay out the future disks (this won't take much \
time because no actual copying is made):"
echo " $0 TASKNAME --LAYOUT-FULL STATE_ID"
echo
echo "Smaller steps that are done when you call --LAYOUT can also be \
performed by you by invoking one of these:"
echo " $0 TASKNAME (--clear | --split-full STATE_ID | --index | --list)"
echo
echo "When you have laid out the future disks, you will probably want \
to manipulate the ISOs for them:"
echo " $0 TASKNAME (--mkiso | --record | --rmiso | --lsiso) [ N ]"
echo
echo
echo
echo "There is also another mode of splitting the collection of packages into disks: the one that you have been already told about is called 'full', which means that it puts ALL packages from the fixed base (identified by STATE_ID) onto the disks (the correcponding commands are '--LAYOUT-FULL' and '--split-full'). The other mode is putting only the difference between the given base and another base that was fixed some time ago and has another identifier (that's mainly what we need the bases for!). This mode is called 'diff'. The corresponding commands, as you can guess, are '--LAYOUT-DIFF' and '--split-diff'. Here is the way you can invoke them:"
echo
echo " $0 TASKNAME --LAYOUT-DIFF STATE_ID ANOTHER_BASE_ID"
echo ", where ANOTHER_BASE_ID identifies the base from which the difference has to be calculated. ANOTHER_BASE_ID is of the form: ANOTHER_TASKNAME/ANOTHER_STATE_ID, where ANOTHER_TASKNAME may be equal to TASKNAME if you have fixed the previous state for the same task (task determines the original locations of the packages)."
echo
echo "Fixing the state of a collection of packages by calling --fix-base is good for collections that change with the flow of time (like Sisyphus). But if you want to deal with a fixed collection that won't change in future (such as a released distribution like ALTLInux Junior), then you can just link the location of it inside the directory for distribute's bases and do not call '--fix-base'. (Look inside the directory to understand how it is organized.)"
echo
echo
echo
echo "There are more supplementary commands to operate on a base state:"
echo " $0 TASKNAME --make-plain-index STATE_ID "
echo ", which dumps lists of package-filenames fixed in this base to several files at the place where the base STATE_ID is stored (the last is done by --fix-base by default). If your PUBLIC_SITE parameter is not empty, they will be published into a subdirectory of your site with the name of this base. These lists are put in .disk/ on every CD, generated from this base."
echo "And: "
echo " $0 TASKNAME --rm-base STATE_ID"
echo "to remove all data that stores the base STATE_ID."
echo
echo "In these two commands STATE_ID can have a special value '*', which means that this command will be applied to each of your bases."
echo
echo
echo "You can change some parameters of distribute by setting corresponding environment variables (either in command line or in a config file). The most useful is probably CDVOLUME (in bytes)."
echo
echo "If you are not happy with the settings your administrator or \
distribution packgers have done for you, and you do not want to change \
them in every task configuration (created by --gen-taskconf) or in every command line invokation of distribute, then you \
can create your own global confgiuration file by invoking:"
echo " $0 --gen-myconf [ FILENAME ]"
echo
echo "Report bugs to the author: Ivan Zakharyaschev <imz@altlinux.ru>"
echo "Last change: February 2002."
echo "You may use ALT 'distribute' under the terms of GPL version 2."
}

function usage() {
echo "$0: Distribute a collection of packages on multiple CDs, issue updates to the released distribution."
echo "Especially good at distributing such collections for future use \
by APT."
echo
echo "This is '$PROGNAME' version $PROGVERSION,"
echo " Copyright (C) 2002 Ivan Zakharyaschev <imz@altlinux.ru>."
echo "'$PROGNAME' comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
certain conditions; see /usr/share/doc/$PROGNAME-$PROGVERSION/COPYING
for details."
echo
echo " $0 (--usage|--help) for more detailed help"
echo " $0 TASKNAME --gen-taskconf [ FILENAME ]"
echo " $0 TASKNAME --fix-base STATE_ID"
echo " $0 TASKNAME (--ls-base | --rm-base) STATE_ID_PATTERN"
echo " $0 TASKNAME --LAYOUT-FULL STATE_ID"
echo " $0 TASKNAME (--clear | --split-full STATE_ID | --index | --list)"
echo " $0 TASKNAME (--mkiso | --record | --rmiso | --lsiso) [ N ]"
echo " $0 TASKNAME --LAYOUT-DIFF STATE_ID ANOTHER_BASE_ID"
echo " $0 TASKNAME --rm-base STATE_ID"
echo " $0 TASKNAME --make-plain-index STATE_ID [ DEST_DIR ]"
echo " $0 --gen-myconf [ FILENAME ]"
echo
echo "Report bugs to the author: Ivan Zakharyaschev <imz@altlinux.ru>"
echo "Last change: February 2002."
echo "You may use ALT 'distribute' under the terms of GPL version 2."
}

distribute-0.4.1/NEWS0100644000100300010070000000334107513060057012540 0ustar imzimz
Date: Wed, 3 Jul 2002 22:12:47 +0400 (MSD)
From: Ivan Zakharyaschev <imz@altlinux.ru>

Появилась новая версия distribute (0.3.6), программы, с помощью которой
делаются диски с Sisyphus. Там учтено пожелание (давным-давно
прозвучавшее в sisyphus@altlinux.ru) класть на диски с updates списки
соответствующего полного Сизифа -- они сжимаются и кладутся в .disk/ на
каждом диске. Еще изменен формат названий для snapshots: теперь он более
краток, и лучше приспособлен для упорядочивания (по алфавиту), а также
на каждый диск в корень будет класться index.html, кратко рассказывающий
о том, какие файла есть на диске и как ими пользоваться. И еще мелкие
исправления.

Никаких серьезных изменений в структуре программы нет, так что ждать
глюков не надо (тем более я ее потестировал); но все-таки при создании
очередных дисков хорошо бы на них повнимательнее посмотреть.

Можно выложить списки ко всем предыдущим выпускам примерно так:

$ ssh lrn.ru mkdir -p public_html/lists
$ PUBLIC_SITE=lrn.ru:public_html/lists \
distribute Sisyphus --make-plain-index '*'

Если установить переменную PUBLIC_SITE в конфигурации, то каждый раз при
создании очередного снимка Sisyphus (fix-base) списки пакетов будут
публиковаться на том сайте, в поддиректории, совпадающей по имени с
именем снимка (base state).

Я предлагаю публиковать такие списки: они небольшие, дают людям
представление о точных версиях пакетов, попавших на диски. (Не знаю, где
лучше: на ftp или http.) Можно будет участвовать в сравнении snapshots,
проводимом на distrowatch.com.

Ещё мне кажется, что на сайте altlinux.ru не хватает информации о том,
что такие snapshots и updates выпускаются: нет нигде ссылки на
linux-online.ru, кроме старой новости об этом.

--
Best regards,
Ivan Z.
distribute-0.4.1/Sisyphus0100644000100300010070000000037607513060060013612 0ustar imzimzRead the configuration for task `sisyphus' in
/etc/distribute/tasks/Sisyphus,
~/.opt/distribute/etc/distribute/tasks/Sisyphus, or where ever else you
have installed it.

This is a task that every user in the system can use when running
`distribute'.
distribute-0.4.1/ABOUT0100644000100300010070000000053107555051433012640 0ustar imzimzName: distribute
Desc: can be used to disrtibute a collection of packages on a set of CDs
and to issue updates to the initial distribution.
Particularly for the use by APT.
Author: Ivan Zakharyaschev <imz@altlinux.ru>, ALT Linux Team.
License: GPL version 2 (see COPYING or http://www.gnu.org/licenses/gpl.html)
Version: 0.4.0
Date: 2002 Oct 21
distribute-0.4.1/example.ru0100644000100300010070000000320607513060056014043 0ustar imzimzDate: Wed, 19 Sep 2001 00:11:18 +0400 (MSD)
From: Ivan Zakharyaschev <imz@altlinux.ru>

ВОЗМОЖНО, ЭТОТ ПРИМЕР УСТАРЕЛ! (2002 Jul 10)

Надеюсь, distribute --help и --uasge можно читать. Тем не менее привожу
пример использования этого инструмента (distribute).

Для работы с Sisyphus на altair/basalt (машины в офисе ALTLinux) ничего
настраивать не надо (task Sisyphus уже предназначен для них)
-- можно просто последовательно пользоваться
командами, первая из которых должна зафиксировать текущее состояние:

distribute Sisyphus --fix-base September

Для изготовления разницы между Junior и Sisyphus удобнее
всего сделать ссылки, как у меня в
basalt:/raid/imz/DISTRIBUTE/bases/ (в обычной конфигурации это
~/.var/distribute/bases/): там должна быть директория для общего "задания" Junior,
в ней поддиректория его состояния 1.1, а в ней ссылки SRPMS и i586/RPMS на
соответствующие директории в месте, где лежит Junior. Тогда разница делается так:

distribute Sisyphus --LAYOUT-DIFF September Junior/1.1

Если в потом нужно будет сделать разницу между зафиксированным сегодня
состоянием Сизифа и тем, которое будет, нужно будет зафиксировать то
состояние:

distribute Sisyphus --fix-base November

и разложить разницу:

distribute Sisyphus --LAYOUT-DIFF November Sysiphus/September


Делать образы и записывать их можно простыми командами (они перечислены
в distribute --usage).

Чтобы на диски влезало чуть побольше, можно менять значение CDVOLUME.
Напимер, чтобы разница между Sisyphus и Junior поместилась на 4 диска, в
пятницу пришлось вызвать так:

CDVOLUME=660000000 distribute Sisyphus --LAYOUT-DIFF now Junior/1.1

Regards,
Ivan Zakharyaschev <imz@altlinux.ru>
distribute-0.4.1/I_am_not_the_admin0100644000100300010070000000270707513060057015526 0ustar imzimzHow to use it if oyu are not the admin (but a simple user)?


Extract the whole directory tree with `distribute' (as found in an RPM
or tarball) somewhere into your home directory (for example,
~/.opt/distribute/; so you'll have ~/.opt/distribute/etc/,
~/.opt/distribute/usr/).

Then you have three options how to run it:

1. run `distribute' with environment variable P_ROOT set to the path to
where you have just installed the directory tree; example:

$ P_ROOT=~/.opt/distribute ~/.opt/distribute/usr/bin/distribute OPTIONS


2. create a simple script that does what was described in 1. and that
is easy to access; for example:
$ cat > ~/bin/distribute <<'EOF'
#!/bin/bash

P_ROOT=~/.opt/distribute ~/.opt/distribute/usr/bin/distribute "$@"
EOF
$ chmod a+x ~/bin/distribute

If ~/bin is in your $PATH, then you will be able to call `distribute'
directly from the command line:

$ distribute OPTIONS


3. Change ~/.opt/distribute/usr/bin/distribute a bit in the beginning
of the script: set the right value to P_ROOT.


(The task configuration for Sisyphus distribution will be found in
~/.opt/distribute/etc/distribute/tasks/sisyphus.)


Remarks:

There is also a confgiurable P_SYSCONFDIR parameter. If you don't set it
explicitly, it uses the prefix from P_ROOT. If you set it, it overrides
that P_ROOT-derived value. So you could use /etc as your conf-dir, but
~/.opt/distribute as the installation location (P_ROOT) for distribute.

imz@altlinux.ru, 2002 Jul 10.
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin