Package: module-assistant
Version: 0.10.4-1.1
Severity: wishlist
Tags: patch
At my work, we need to use the cisco-vnp software. This require a kernel
module that cisco (as far as I can say) does not allow to redistribute.
I prepared a private debian package that is 'compatible' with
module-assistant so that users at my work can easily install it.
However, I cannot add this private debian package to the list of
module-assistant complient packages (nor make a request for it to be
added in module-assistant as my package is private).
So, I patched module-assistant so that it reads the list of complient
packages from its building list (ie from file
/usr/share/modass/compliant.list), but also from all files
/etc/modass/compliant.list (for use by the sysadmin) and
/usr/share/modass/compliant.d/*.list (for use by external packages such
as my private one)
Of course, requiring a module package to put a file in
/usr/share/modass/compliant.d/ is worst than having the package listed
in /usr/share/modass/compliant.list: when we want to use
module-assistant with a module package declared in theses new files,
this require this new file to be installed prior to run
module-assistant.
However, this allows a site-admin to either:
- create a local package that will provide this file and that all local
machine must install
- create a module package that can be used with module-assistant once it
is installed
So, I would be very pleased if you consider applying my patch for the
next module-assistant release.
Best regards
Vincent Danjean
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Versions of packages module-assistant depends on:
ii libtext-wrapi18n-perl 0.06-4 internationalized substitute of Te
ii perl 5.8.8-4 Larry Wall's Practical Extraction
Versions of packages module-assistant recommends:
ii liblocale-gettext-perl 1.05-1 Using libc functions for internati
-- no debconf information
--- module-assistant-0.10.4.orig/debian/rules
+++ module-assistant-0.10.4/debian/rules
@@ -52,7 +52,7 @@
dh_installdirs
# Add here commands to install the package into
debian/modules-assistant.
- dh_installdirs usr/share var/cache/modass usr/bin etc/bash_completion.d
+ dh_installdirs usr/share var/cache/modass usr/bin etc/bash_completion.d
etc/modass
# chgrp src debian/module-assistant/var/cache/modass
# chmod g+s debian/module-assistant/var/cache/modass
cp -a modass debian/module-assistant/usr/share/
@@ -69,6 +69,10 @@
# for x in debian/module-assistant/usr/share/modass/include/*.mk ; do ln
-s `basename $$x` $${x%mk}make; done
cp -a module-assistant debian/module-assistant/usr/bin
cp -a m-a debian/module-assistant/etc/bash_completion.d
+ echo "# local m-a aware debian packages can be listed here" \
+ > debian/module-assistant/etc/modass/compliant.list
+ echo "# (one per line)"
+ >> debian/module-assistant/etc/modass/compliant.list
ln -sf module-assistant debian/module-assistant/usr/bin/m-a
dh_installman module-assistant.8
ln -sf module-assistant.8.gz
debian/module-assistant/usr/share/man/man8/m-a.8.gz
--- module-assistant-0.10.4.orig/module-assistant
+++ module-assistant-0.10.4/module-assistant
@@ -45,6 +45,7 @@
use Cwd;
$res = (defined($ENV{"MA_DIR"})) ? $ENV{"MA_DIR"} : "/usr/share/modass";
+$etc = (defined($ENV{"MA_ETCDIR"})) ? $ENV{"MA_ETCDIR"} : "/etc/modass";
$var= (defined($ENV{"MA_VARDIR"})) ? $ENV{"MA_VARDIR"} : "/var/cache/modass";
$main::Author = "Eduard Bloch";
@@ -179,14 +180,26 @@
$modloc=$ENV{"MODULE_LOC"} ? $ENV{"MODULE_LOC"}:"$usrc/modules";
-if(open(complist, "$res/compliant.list")) {
- for(<complist>) {
- chomp;
- next if !$_;
- print "Known compliant: $_\n" if $opt_debug;
- #$packs{$_}="MA_SOURCE_PKG=$_ $res/packages/default.sh";
- $packs{$_}="$res/packages/default.sh";
- $compliant{$_}=1;
[EMAIL PROTECTED]("$res/compliant.list", "$etc/compliant.list");
+if (opendir($resdir, $res."/compliant.d")) {
+ push @complistfiles,
+ map { $res."/compliant.d/".$_ }
+ grep(/\.list$/, readdir($resdir));
+}
+for $complistfile (@complistfiles) {
+ print "Looking for compliant in '$complistfile'\n" if $opt_debug;
+ if(open(complist, $complistfile)) {
+ for(<complist>) {
+ chomp;
+ next if (/^#/);
+ next if (/^\s*$/);
+ next if !$_;
+ print "Known compliant: $_\n" if $opt_debug;
+ #$packs{$_}="MA_SOURCE_PKG=$_ $res/packages/default.sh";
+ $packs{$_}="$res/packages/default.sh";
+ $compliant{$_}=1;
+ }
+ close(complist);
}
}