summaryrefslogtreecommitdiffstats
path: root/docs/di.example
diff options
context:
space:
mode:
Diffstat (limited to 'docs/di.example')
-rw-r--r--docs/di.example/DI-filter.sh40
-rw-r--r--docs/di.example/README13
-rw-r--r--docs/di.example/distributions23
-rw-r--r--docs/di.example/updates5
4 files changed, 81 insertions, 0 deletions
diff --git a/docs/di.example/DI-filter.sh b/docs/di.example/DI-filter.sh
new file mode 100644
index 0000000..38696a3
--- /dev/null
+++ b/docs/di.example/DI-filter.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Select only debs needed for a D-I netinstall cd
+
+IN="$1"
+OUT="$2"
+
+DIR=`dirname "$IN"`
+FILE=`basename "$IN"`
+CODENAME=`echo $FILE | cut -d"_" -f1`
+COMPONENT=`echo $FILE | cut -d"_" -f4`
+ARCH=`echo $FILE | cut -d"_" -f5`
+
+echo "### $IN"
+echo "# Source: $IN"
+echo "# Debs: $DIR/$FILE.debs"
+echo "# Out: $OUT"
+echo
+
+# generate list of packages needed
+DEBCDDIR="/usr/share/debian-cd"
+export ARCH CODENAME DEBCDDIR DIR
+make -f "$DEBCDDIR/Makefile" \
+ BDIR='$(DIR)' \
+ INSTALLER_CD='2' \
+ TASK='$(DEBCDDIR)/tasks/debian-installer+kernel' \
+ BASEDIR='$(DEBCDDIR)' \
+ forcenonusoncd1='0' \
+ VERBOSE_MAKE='yes' \
+ "$DIR/list"
+
+# hotfix abi name for sparc kernel
+sed -e 's/-1-/-2-/' "$DIR/list" > "$DIR/$FILE.debs"
+rm -f "$DIR/list"
+
+# filter only needed packages
+grep-dctrl `cat "$DIR/$FILE.debs" | while read P; do echo -n " -o -X -P $P"; done | cut -b 5-` "$IN" >"$OUT"
+
+# cleanup
+rm -f "$DIR/$FILE.debs"
diff --git a/docs/di.example/README b/docs/di.example/README
new file mode 100644
index 0000000..983ff5f
--- /dev/null
+++ b/docs/di.example/README
@@ -0,0 +1,13 @@
+This is an example from Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>
+for the ListHook directive.
+
+He describes the example as:
+> attached a sample config that mirrors only packages from the debian-cd
+> netinstall CD image task. I think this would make a usefull example
+> for making a partial mirror by filtering.
+
+The speciality of the example needing the ListHook and not
+easer possible with FilterList is the need for different
+packages in different architectured. (Though extending
+FilterList to support this is on my TODO-List)
+
diff --git a/docs/di.example/distributions b/docs/di.example/distributions
new file mode 100644
index 0000000..316a051
--- /dev/null
+++ b/docs/di.example/distributions
@@ -0,0 +1,23 @@
+Origin: Debian-Installer
+Label: Debian-Installer
+Suite: testing
+Codename: sarge
+Version: 3.1
+Architectures: sparc i386
+Components: main
+UDebComponents: main
+Description: Debian Installer partial mirror
+Update: - debian
+#SignWith: yes
+
+Origin: Debian-Installer
+Label: Debian-Installer
+Suite: unstable
+Codename: sid
+Version: 3.2
+Architectures: sparc i386
+Components: main
+UDebComponents: main
+Description: Debian Installer partial mirror
+Update: - debian
+#SignWith: yes
diff --git a/docs/di.example/updates b/docs/di.example/updates
new file mode 100644
index 0000000..af39f5d
--- /dev/null
+++ b/docs/di.example/updates
@@ -0,0 +1,5 @@
+Name: debian
+Architectures: sparc i386
+Method: http://ftp.de.debian.org/debian
+#VerifyRelease: FBC60EA91B67D3C0
+ListHook: /mnt/mirror/DI/DI-filter.sh