Skip to content

Commit c1c3497

Browse files
author
Max Horn
committed
added a simple HOWTO; fixed some scripts to work with spaces in the give paths; some other tweaks
1 parent ad470b2 commit c1c3497

File tree

10 files changed

+448
-38
lines changed

10 files changed

+448
-38
lines changed

bindist/HOWTO

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
This is an attempt to explain how to use the binary distro related scripts in
2+
this directory. I had to discover this on my own, so it might not always be
3+
fully correct or complete, but it should at least help to start using them.
4+
5+
Note that these tools can and should be improved, they are not set in stone.
6+
They are meant to ease controlling the binary distro, and that can't be made
7+
simple & fail-safe enough.
8+
9+
10+
---------------------------------------------------------------------------------
11+
12+
Environment variables:
13+
14+
BDBASE
15+
Description:
16+
Set to the location where you store the bindist tree on you local HD.
17+
The online bindist will be synced using rsync against this tree.
18+
Example:
19+
/bindist
20+
21+
BDDATA
22+
Description:
23+
The location in which these scripts and some auxillary files are stored.
24+
I.e. it points to your checkout of the Fink scripts module, subdir "bindist"
25+
Example:
26+
/Users/maxhorn/Documents/fink-cvs/scripts/bindist
27+
28+
---------------------------------------------------------------------------------
29+
30+
bdadd
31+
Adds a list of packages to the binary distro. These files are taken from
32+
your active fink installation. You invoke it with a list of package specs,
33+
similiar to the "fink install" command. An invocation could look like this:
34+
./bdadd xfree86-rootless automake debianutils-1.15-4
35+
It copies the .deb files into your local bindist tree, so be prepared to
36+
have a lot of disk space being taken.
37+
38+
TODO: right now the path "/sw" is hard coded into the script. This is not
39+
that bad since the bindist is always for /sw; but if somebody wants to make
40+
a bindist for say /usr/local, it's bad. Shouldn't be hard to fix.
41+
42+
bdclean
43+
???
44+
45+
bdindex
46+
Creates index.php files in the various directories of the local bindist.
47+
They will be synced to the online version by the bdsync command, and
48+
then allow there to browse the bindist in any web browser. Usually it is
49+
sufficient to run it once after bdnewrel.
50+
51+
bdlist
52+
Lists all .debs currently in the local bindist tree, for the current release.
53+
54+
bdnewrel
55+
Prepares a new Fink binary release, by creating the appropriate file
56+
structure. You call it with two parameters: the name of the new release,
57+
and the name of the previous release (this is used to shared old .debs
58+
without the need to recreate them). A typical invocation would be:
59+
./bdnewrel 0.4.0 0.3.2a
60+
61+
After running this command, verify that all went right and that the tree
62+
it generated looks OK. You may also run the "bdindex" command just after
63+
this one.
64+
65+
TODO: should be extended to automatically retrieve the .info files from CVS
66+
based on the release tags in CVS.
67+
TODO: should be enhanced to handle "crypto" tree correctly
68+
69+
70+
bdscan
71+
Scans your local bindist tree using dpk-scanpackages, creating the Packages.gz
72+
files required by apt-get/dselect.
73+
74+
75+
bdsync
76+
Syncs your local bindist tree at $BDBASE against the online one (you will have
77+
to edit it if your SF username is not "fingolfin").
78+
This will not delete files missing in your local tree from the online tree.
79+
If you have to remove things again from the online tree, you have to do
80+
so manually (for security reasons, so you don't wipe out by accident the whole
81+
online bindist)
82+
83+
84+
---------------------------------------------------------------------------------
85+
86+
Q: How do I make a new binary release of the Fink distribution?
87+
88+
A: Use the bdnewrel command, as described above.
89+
90+
---------------------------------------------------------------------------------
91+
92+
Q: How do I add a package to the bindist?
93+
94+
A: Assuming your local bindist tree and the environment variables are setup,
95+
adding a new package FOO to the bindist works like this:
96+
97+
98+
# Copy over the .deb file(s)
99+
./bdadd FOO
100+
# Ensure all .deb's etc are uploaded
101+
./bdsync
102+
# Make sure the files are referenced
103+
./bdscan
104+
# Get the Package.gz files are online
105+
./bdsync
106+
107+
You could do it with the last .bdsync call only, and that would be a bit faster;
108+
but by using two calls, we ensure the online Package.gz files never refer to
109+
files that are not yet online. Not really that important, but playing it safe
110+
won't hurt here.
111+
112+
---------------------------------------------------------------------------------
113+
114+
Q: Once the new bindist is online, how can I enable it so that people can
115+
use it via dselect?
116+
117+
A: In the web CVS module, modify the "LATEST-FINK" file to contain the new
118+
version. Then, ssh into shell.sourceforge.net and run this script:
119+
/home/groups/f/fi/fink/htdocs/update.sh
120+
121+
---------------------------------------------------------------------------------
122+

bindist/bdadd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22

33
$| = 1;
4-
use v5.6.0; # perl 5.6.0 or newer required
4+
require 5.006; # perl 5.6.0 or newer required
55
use strict;
66

77
my $base = $ENV{BDBASE};
@@ -77,5 +77,5 @@ foreach $pkgspec (@ARGV) {
7777
}
7878
}
7979
}
80-
80+
&execute("chmod -R g+w ".$dest);
8181
exit 0;

bindist/bdclean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22

33
$| = 1;
4-
use v5.6.0; # perl 5.6.0 or newer required
4+
require 5.006; # perl 5.6.0 or newer required
55
use strict;
66

77
use File::Find;

bindist/bdlist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ -z "$BDBASE" ]; then
55
echo "BDBASE not set"
66
exit 1
77
fi
8-
cd $BDBASE
8+
cd "$BDBASE"
99

1010
showall=0
1111
if [ "x$1" = "x-a" ]; then
@@ -24,14 +24,14 @@ if [ ! -d "dists/$tree" ]; then
2424
exit 1
2525
fi
2626

27-
basedir=dists/$tree/main/binary-darwin-powerpc
28-
if [ ! -d $basedir ]; then
27+
basedir="dists/$tree/main/binary-darwin-powerpc"
28+
if [ ! -d "$basedir" ]; then
2929
echo "ERROR: no binary directory for $tree/main"
3030
elif [ $showall -eq 1 ]; then
31-
find $basedir -name \*.deb -print | \
31+
find "$basedir" -name \*.deb -print | \
3232
sed -e 's,.*/,,' -e 's,_darwin-powerpc.deb,,' | sort
3333
else
34-
find $basedir -type f -and -name \*.deb -print | \
34+
find "$basedir" -type f -and -name \*.deb -print | \
3535
sed -e 's,.*/,,' -e 's,_darwin-powerpc.deb,,' | sort
3636
fi
3737

bindist/bdnewrel

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ -z "$BDBASE" ]; then
66
echo "BDBASE not set"
77
exit 1
88
fi
9-
cd $BDBASE
9+
cd "$BDBASE"
1010

1111
release=$1
1212
if [ -z "$release" ]; then
@@ -23,32 +23,35 @@ fi
2323
for dist in fink-$release fink-$release-updates ; do
2424
mkdir -p dists/$dist
2525
for tree in main crypto ; do
26-
mkdir -p dists/$dist/$tree/finkinfo
27-
mkdir -p dists/$dist/$tree/binary-darwin-powerpc
28-
mkdir -p dists/$dist/$tree/source
26+
mkdir -p "dists/$dist/$tree/finkinfo"
27+
mkdir -p "dists/$dist/$tree/binary-darwin-powerpc"
28+
mkdir -p "dists/$dist/$tree/source"
2929
( echo "Archive: $dist"
3030
echo "Component: $tree"
3131
echo "Origin: Fink"
3232
echo "Label: Fink"
3333
echo "Architecture: darwin-powerpc"
34-
) | sed 's/fink-//' >dists/$dist/$tree/binary-darwin-powerpc/Release
34+
) | sed 's/fink-//' > "dists/$dist/$tree/binary-darwin-powerpc/Release"
3535
done
3636
done
3737

3838
# symlink old packages in the main tree (not updates, not crypto)
3939
from="fink-$prevrel/main"
4040
to="fink-$release/main"
41-
cd $BDBASE/dists/$from/binary-darwin-powerpc
41+
cd "$BDBASE/dists/$from/binary-darwin-powerpc"
4242

4343
for file in * ; do
44-
if [ -d $file ]; then
45-
mkdir -p $BDBASE/dists/$to/binary-darwin-powerpc/$file
44+
if [ -d "$file" ]; then
45+
mkdir -p "$BDBASE/dists/$to/binary-darwin-powerpc/$file"
4646
fi
4747
done
4848
for file in */*.deb ; do
49-
ln -s ../../../../$from/binary-darwin-powerpc/$file ../../../$to/binary-darwin-powerpc/$file
49+
ln -s "../../../../$from/binary-darwin-powerpc/$file" "../../../$to/binary-darwin-powerpc/$file"
5050
done
5151

52+
# Update "current" with the new version
53+
echo "$release" > "$BDDATA/current"
54+
5255
# TODO: copy source symlinks
5356
# TODO: where do we get the content for finkinfo?
5457

bindist/bdscan

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ -z "$BDBASE" ]; then
55
echo "BDBASE not set"
66
exit 1
77
fi
8-
cd $BDBASE
8+
cd "$BDBASE"
99

1010
tree=$1
1111
if [ -z "$tree" ]; then
@@ -19,12 +19,12 @@ if [ ! -d "dists/$tree" ]; then
1919
fi
2020

2121
for dir in main crypto ; do
22-
basedir=dists/$tree/$dir/binary-darwin-powerpc
22+
basedir="dists/$tree/$dir/binary-darwin-powerpc"
2323
if [ ! -d $basedir ]; then
2424
echo "ERROR: no binary directory for $tree/$dir"
2525
else
2626
echo "Scanning $basedir"
27-
dpkg-scanpackages $basedir override | gzip >$basedir/Packages.gz
27+
dpkg-scanpackages "$basedir" "$BDDATA/override" | gzip > "$basedir/Packages.gz"
2828
fi
2929
done
3030

bindist/bdsync

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,18 @@ cd $BDBASE
99

1010
# locations
1111
source=$BDBASE
12-
destination='shell1:/home/groups/f/fi/fink/htdocs'
13-
if [ "$1" = "pippin" ]; then
14-
shift
15-
destination='pippin:/home/chrisp/fink/web'
16-
fi
12+
destination='[email protected]:/home/groups/f/fi/fink/htdocs/bindist'
1713

1814
# rsync options
1915
options="-e ssh -av --partial --progress"
20-
options="$options --delete"
2116
# NOTE: data isn't compressed on the fly as practically all data is
2217
# already gzip-compressed
2318

2419
# make sure every directory has a index.php
2520
$BDDATA/bdindex
2621

2722
# upload
23+
echo rsync "$@" $options $source $destination
2824
rsync "$@" $options $source $destination
2925

3026
exit 0

bindist/current

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.1
1+
0.3.2a

bindist/fit

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ control-center
2424
cpio
2525
curl
2626
daemonic
27+
db3
2728
ddd
2829
debianutils 1.15-4
2930
dia
@@ -38,11 +39,15 @@ emacs-nox
3839
enlightenment
3940
esound
4041
eterm
42+
ethereal
43+
expat
44+
fileutils
4145
findutils
4246
fink
4347
flex 2.5.4a
4448
fnlib
4549
fortune-mod
50+
freeciv
4651
freetype 1.3.1-3
4752
freetype2
4853
frotz 2.41-3
@@ -51,36 +56,39 @@ fvwm-common
5156
fvwm-icons
5257
fvwm2
5358
fvwm2-no-gnome
54-
gal 0.11.2-1
59+
gal
5560
gawk
56-
gconf 1.0.1-2
61+
gconf
5762
gd 1.8.4-3
5863
gdbm
5964
gdk-pixbuf
6065
gettext
6166
ghostscript
6267
ghostscript-fonts 6.0-2
6368
ghostscript-nox
69+
ghostscript6
70+
ghostscript6-nox
6471
gimp 1.2.2-4
6572
glib
6673
glibwww 0.2-3
6774
gnome-applets
68-
gnome-audio 1.4.0-3
75+
gnome-audio
6976
gnome-core
70-
gnome-games 1.4.0.3-2
77+
gnome-games
7178
gnome-libs
72-
gnome-print 0.29-2
73-
gnome-user-docs 1.4.1-1
79+
gnome-print
80+
gnome-user-docs
7481
gnome-utils
75-
gnome-vfs 1.0.1-6
82+
gnome-vfs
7683
grep
84+
gnomemm
7785
gtk+
78-
gtkhtml 0.11.1-2
86+
gtkhtml
7987
gtkmm
8088
guile
8189
gzip
8290
icewm
83-
imagemagick 5.3.9-2
91+
imagemagick
8492
imlib
8593
indent
8694
ispell
@@ -105,13 +113,15 @@ libvorbis
105113
libwww 5.3.2-2
106114
libxml
107115
libxml2
116+
links
108117
lynx
109118
m4
110119
mc
111120
mesa 3.5-1
112121
mtr
113122
mutt
114123
mysql 3.23.42-1
124+
nano
115125
ncurses
116126
nedit
117127
netcat
@@ -123,6 +133,7 @@ oroborus 1.14.0-3
123133
passwd
124134
patch
125135
pcre
136+
pdksh
126137
php 4.0.6-4
127138
pkgconfig 0.8.0-3
128139
popt 1.6.2-1
@@ -133,9 +144,11 @@ python-nox
133144
readline
134145
rep-gtk
135146
rman
147+
ruby
136148
sawfish
137-
screen 3.9.9-1
138-
scrollkeeper 0.2-4
149+
screen
150+
scrollkeeper
151+
sdl
139152
sed
140153
slang
141154
system-libgl

0 commit comments

Comments
 (0)