[Debpool-commits] [SCM] Debpool Project Repository branch, master, updated. 0.2.3-63-g38a32aa
ceros-guest
ceros-guest at alioth.debian.org
Tue Jun 3 07:07:11 UTC 2008
The following commit has been merged in the master branch:
commit 34800270f7848710ab5577cbba1d70c45975c1e6
Author: ceros-guest <ceros-guest>
Date: Fri Jan 11 00:41:22 2008 +0000
Include a better example configuration for multiple OS distributions.
diff --git a/debian/changelog b/debian/changelog
index 25982a4..d7e21b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -34,8 +34,8 @@ debpool (0.2.4~unreleased0) experimental; urgency=low
* Fixed problem where debpool doesn't recover from power failure.
+ Closes: #412090
* Fixed problem with debpool not reaping its gzip children. Closes: #415204
- * Included example configuration file for use in installing a pool layout for
- another OS distribution. Closes: #455439
+ * Included example configuration files for use in installing a pool layout
+ for another multiple distributions. Closes: #455439
* Have debpool check for Proc::Daemon before attempting to run as daemon.
+ Closes: #455449
* Have debpool handle bzip2 compression as well as gzip in dynamical fasion.
diff --git a/examples/multiple_debpools/README b/examples/multiple_debpools/README
new file mode 100644
index 0000000..da6cc26
--- /dev/null
+++ b/examples/multiple_debpools/README
@@ -0,0 +1,28 @@
+Users of other archive managers may have used a setup where they
+were allowed to upload packages of the same version for multiple
+distributions. The behavior in debpool however is that it will
+keep the last package that was uploaded (when the 'rollback'
+option is set) for a particular distribution, if it's using the same
+version from another upload to a different distribution.
+This is because of the nature of a pool based archive manager,
+where all files for a package are kept in the same directory.
+
+For anyone wanting to use debpool to host a repository of their
+packages for multiple distributions, one way to do this is to add
+a '~distro1' to the version of their package. For example, for a
+package 'foo-1.0-1', the package can have its version set as
+'1.0-1~etch1' to specify that it's a package built for Debian etch.
+If a package gets accepted into Debian, the extra tag can be removed,
+the packages reuploaded, and any users of the repository will receive
+a notice that an update is available from the debpool repository.
+(See Debian Policy 5.6.12 on why/how this would work.)
+
+Another way to use debpool for packages built for different distros
+is to use different directories that will contain its own debpool
+setup. This can be useful for anyone who maintain packages for both
+Debian and another OS distribution (like Ubuntu). The example
+configuration file, init script, and default configuration file from
+this directory can be used for such a case. Rename the distro part of
+the files to the distro they'll be used for and change the variable
+used to set the distribution in the files to the distro they'll be used for.
+(The configuration file may need more modification.)
diff --git a/debian/debpool.default b/examples/multiple_debpools/debpool-distro.default
similarity index 78%
copy from debian/debpool.default
copy to examples/multiple_debpools/debpool-distro.default
index 7760eaa..ce5682d 100644
--- a/debian/debpool.default
+++ b/examples/multiple_debpools/debpool-distro.default
@@ -6,14 +6,14 @@ ENABLED="0"
# Parameters passed to debpool. See DebPool::Config(5). You don't have
# to specify --daemon.
-OPTIONS=""
+OPTIONS="--config /etc/debpool/$DISTRO-Config.pm"
# User or user:group to run debpool as. If you leave it empty, debpool
# will run as root.
DEBPOOL_USER=""
# Specify a path for the log file
-LOGFILE="/var/log/$NAME.log"
+LOGFILE="/var/log/$NAME-$DISTRO.log"
# Specify a path for the lock file
-LOCKFILE="/var/run/$NAME.pid"
+LOCKFILE="/var/run/$NAME-$DISTRO.pid"
diff --git a/debian/debpool.init b/examples/multiple_debpools/debpool-distro.init
similarity index 92%
copy from debian/debpool.init
copy to examples/multiple_debpools/debpool-distro.init
index 4405cc8..65aa07d 100644
--- a/debian/debpool.init
+++ b/examples/multiple_debpools/debpool-distro.init
@@ -9,14 +9,18 @@
# Short-Description: Debian package archiver
### END INIT INFO
-# Basing script off of /etc/init.d/skeleton
+# This is an example init script for use with multiple debpool setups.
+# This example uses a debpool setup for Debian 'unstable'.
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Debian package archiver"
NAME=debpool
DAEMON=/usr/bin/$NAME
-SCRIPTNAME=/etc/init.d/$NAME
-DEFAULT=/etc/default/$NAME
+# DISTRO should be the only variable that will need its value changed
+# for use with multiple debpool setups.
+DISTRO=unstable
+SCRIPTNAME=/etc/init.d/$NAME-$DISTRO
+DEFAULT=/etc/default/$NAME-$DISTRO
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
diff --git a/examples/Config.pm b/examples/multiple_debpools/distro-Config.pm
similarity index 86%
copy from examples/Config.pm
copy to examples/multiple_debpools/distro-Config.pm
index 7d4471b..d90219f 100644
--- a/examples/Config.pm
+++ b/examples/multiple_debpools/distro-Config.pm
@@ -1,4 +1,6 @@
-# DebPool configuration file
+# DebPool example configuration file for use with multiple debpool setups
+# for different distributions. This example setups debpool for use with
+# Debian 'unstable' along with the 'experimental' distribution.
package DebPool::Config;
@@ -23,7 +25,12 @@ package DebPool::Config;
# (even if you simply use the default value of 'archive_dir'/<dirname>) so
# that they use the new definition of archive_dir.
-#$Options{'archive_dir'} = '/var/cache/debpool';
+# Distribution this configuration will be used for. Be sure to change the
+# values for '$Options{'dists'}' if you change the value provided by this
+# example configuration.
+#my $distribution = 'unstable';
+
+#$Options{'archive_dir'} = '/var/cache/debpool-'.$distribution;
#$Options{'db_dir'} = "$Options{'archive_dir'}/db";
#$Options{'db_dir_mode'} = 0750;
#$Options{'db_file_mode'} = 0640;
@@ -57,10 +64,8 @@ package DebPool::Config;
# archive will support.
#$Options{'dists'} = {
-# 'stable' => 'etch',
-# 'testing' => 'lenny',
-# 'unstable' => 'sid',
-# 'experimental' => 'experimental'
+# $distribution => 'sid',
+# 'experimental' => 'experimental',
# };
#$Options{'virtual_dists'} = {};
#$Options{'sections'} = [ 'main', 'contrib', 'non-free', 'debian-installer' ];
@@ -106,7 +111,7 @@ package DebPool::Config;
# These are values which control the logging system.
-#$Options{'log_file'} = $ENV{'HOME'}.'/.debpool/debpool.log';
+#$Options{'log_file'} = $ENV{'HOME'}.'/.debpool/debpool-'.$distribution.'.log';
# Misc. configuration
--
Debpool Project Repository
More information about the Debpool-commits
mailing list