summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-05-10 08:40:01 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-05-10 08:40:01 +0000
commit53fc42dd19e14154042e1fbe82ea0d5fc5a5e2f1 (patch)
tree148de82cf3714d16ae0de33204718f36f3483574
parentdc9545e4c654c0112c18be0444c75e2c4dc9bc09 (diff)
downloaddrakx-53fc42dd19e14154042e1fbe82ea0d5fc5a5e2f1.tar
drakx-53fc42dd19e14154042e1fbe82ea0d5fc5a5e2f1.tar.gz
drakx-53fc42dd19e14154042e1fbe82ea0d5fc5a5e2f1.tar.bz2
drakx-53fc42dd19e14154042e1fbe82ea0d5fc5a5e2f1.tar.xz
drakx-53fc42dd19e14154042e1fbe82ea0d5fc5a5e2f1.zip
create install-xml-file-list and use it to replace share/list and share/list.ARCH with share/list.xml
-rw-r--r--perl-install/Makefile111
-rw-r--r--perl-install/lang.pm5
-rw-r--r--perl-install/share/list205
-rw-r--r--perl-install/share/list.alpha13
-rw-r--r--perl-install/share/list.i38621
-rw-r--r--perl-install/share/list.ia64122
-rw-r--r--perl-install/share/list.ppc34
-rw-r--r--perl-install/share/list.sparc84
-rw-r--r--perl-install/share/list.x86_6423
-rw-r--r--perl-install/share/list.xml343
-rwxr-xr-xtools/install-xml-file-list279
11 files changed, 636 insertions, 604 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 7327a65df..af9e2ffa2 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -98,133 +98,50 @@ install_pms: $(DIRS)
mo_files : $(MOFILES)
get_needed_files: $(DIRS) mo_files
- eval `perl -V:version`; \
- cat share/list `../tools/specific_arch share/list` | \
- perl -pe "s/ARCH/$(ARCH)/g ; s/PERL_VERSION/$$version/g ; s|/LIB/|/$(LIB)/|g " | \
- perl -lpe '@l = glob; m|\*.*/| && @l != 1 and die "no/multiple match for $$_\n"; $$_ = join("\n", @l)' > $(TMPDIR)/list
- rpm -ql perl-Gtk2 perl-Glib | perl -lne 'print if m!^/usr/lib/perl5! && !/\.pod$$/ && ! -d' >> $(TMPDIR)/list
+ REP4PMS=$(REP4PMS) ../tools/install-xml-file-list share/list.xml $(DEST)
- @missing=`perl -lne 'print if !-e $$_' $(TMPDIR)/list`; [ -z "$$missing" ] || { echo "missing or multiple files vvvvvvvvvvvvvvvvvvvvvvvvvv" ; echo "$$missing" ; echo "missing or multiple files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" ; exit 1; }
-
- find auto -follow -name "*.so" >> $(TMPDIR)/list
-
- for i in $(LOCALFILES) `cat $(TMPDIR)/list` ; do \
- ldd $$i 2>/dev/null | grep "=>" | perl -pe 's/.*=> //; s/ .*//; s,^/(lib(64)?)/.*?/,/\1/,' | sort | uniq >> $(TMPDIR)/list; \
- done
-
- install -d $(DEST)/etc
- install -d $(DEST)/etc/sysconfig/network-scripts
- install -d $(DEST)/lib
- install -d $(DEST)/$(LIB)
- install -d $(DEST)/bin
- install -d $(DEST)/usr/bin
- install -d $(DEST)/usr/lib
- install -d $(DEST)/usr/$(LIB)
- install -d $(DEST)/usr/share
- install -d $(DEST)/usr/share/langs
- install -d $(DEST)/usr/share/gtk
- install -d $(DEST)/usr/share/xmodmap
- install -d $(DEST)/usr/X11R6/lib/X11/locale
- install -d $(MEDIA_INFO_DEST)
- install -s $(LOCALFILES) $(DEST)/usr/bin
-
- cp -a /usr/lib/X11 $(DEST)/usr/lib
-ifeq (sparc,$(ARCH))
- cp -a /usr/X11R6/lib/X11/xkb $(DEST)/usr/X11R6/lib/X11
- rm -f $(DEST)/usr/X11R6/lib/X11/xkb/compiled
- ln -s /tmp $(DEST)/usr/X11R6/lib/X11/xkb/compiled
- ln -s /usr/X11R6/lib/X11/xkb/xkbcomp $(DEST)/usr/bin/xkbcomp
-endif
- cp -a /usr/X11R6/lib/X11/locale/{C,en_US.UTF-8,iso8859-1} $(DEST)/usr/X11R6/lib/X11/locale
-
-ifeq (y,$(USE_PCMCIA))
- install -s /sbin/cardmgr $(DEST)/usr/bin
-endif
-
- perl -Mlang -I. -e 'print "$$_\n" foreach lang::console_font_files()' | cpio -pdu $(DEST)
-
- for i in `cat $(TMPDIR)/list`; do \
- if (echo $$i | grep -q "lib/[^/]*\.so"); then \
- install -s $$i $(DEST)/lib; \
- elif (echo $$i | grep -q "lib64/[^/]*\.so"); then \
- install -s $$i $(DEST)/lib64; \
- else \
- d=$$i; \
- (echo $$d | grep -q "^[^/]") && d="$(REP4PMS)/$$d"; \
- d=`echo $(DEST)/$$d | sed 's/\/usr\/local\//\/usr\//'`; \
- install -d `dirname $$d` && \
- if (echo $$i | grep -q "\.pm"); then \
- perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \
- elif (echo $$i | grep -q "\.so"); then \
- install -s $$i $$d; \
- else \
- cp -f $$i $$d; \
- fi; \
- fi; \
- done
+ mv -f $(DEST)/{bin,sbin}/* $(DEST)/usr/bin
+ mv -f $(DEST)/usr/{lib,X11R6/lib}/*.so* $(DEST)/lib
+ rmdir $(DEST)/{bin,sbin}
+ cd $(DEST)/usr/bin ; mv insmod insmod_
../tools/simplify-drakx-modules $(DEST)/usr/*/*/*/utf8_heavy.pl
- mv -f $(DEST)/bin/* $(DEST)/sbin/* $(DEST)/usr/bin
- rmdir $(DEST)/bin $(DEST)/sbin
- cd $(DEST)/usr/bin ; mv insmod insmod_
+ cp -f $(STAGE1)/init-stage2 $(DEST)/etc/init
- perl -pe 's!^echo!/usr/bin/echo!' /bin/unicode_start > $(DEST)/usr/bin/unicode_start
- chmod a+x $(DEST)/usr/bin/unicode_start
+ cat share/symlinks `../tools/specific_arch share/symlinks` > $(DEST)/usr/share/symlinks
- perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' share/aliases
+ perl -I. -Mlang -e 'symlink "UTF-8", "$(DEST)/usr/share/locale/$$_" foreach lang::list_langs()'
-ifeq (i386,$(ARCH))
- cp ../tools/i386/busybox $(DEST)/usr/bin
-endif
-ifeq (x86_64,$(ARCH))
- cp ../tools/x86_64/busybox $(DEST)/usr/bin/
-endif
+ perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' share/aliases
ifeq (ia64,$(ARCH))
ln -sf bash $(DEST)/usr/bin/sh
else
ln -sf ash $(DEST)/usr/bin/sh
endif
- for i in fonts keyboards locales-skeleton keymaps; do tar xfj share/$$i.tar.bz2 -C $(DEST); done
-
- cp /usr/X11R6/lib/X11/fonts/misc/cursor.pcf.gz /usr/X11R6/lib/X11/fonts/TTF/{Vera,VeraBd}.ttf $(DEST)/usr/X11R6/lib/X11/fonts
mkfontdir $(DEST)/usr/X11R6/lib/X11/fonts
fc-cache -f $(DEST)/usr/X11R6/lib/X11/fonts
- grep ChangeLog CVS/Entries > $(STAGE2_DEST)/VERSION
-
- gzip -9f $(DEST)/usr/share/ldetect-lst/*
-
- cd share ; cp -a consolefonts devices $(DEST)/usr/share
- cat share/symlinks `../tools/specific_arch share/symlinks` > $(DEST)/usr/share/symlinks
- -cd share ; cp -f *.png $(DEST)/usr/share
- -cd pixmaps ; cp -af *.png *.xpm $(DEST)/usr/share ; rm -f $(DEST)/usr/share/wiz_*
- cp `perl -I. -Mlang -e 'lang::png_lang_files()'` $(DEST)/usr/share/langs
- cd share ; cp compssUsers.pl* rpmsrate $(MEDIA_INFO_DEST)
-
- perl -I. -Mlang -e 'symlink "UTF-8", "$(DEST)/usr/share/locale/$$_" foreach lang::list_langs()'
-
- clean-rpmsrate $(MEDIA_INFO_DEST)/rpmsrate $(MAIN_RPMS_DIR)
-
- cp -f ../kernel/modules.description $(DEST)/lib/
for i in `ls ../kernel/all.kernels`; do cp -f ../kernel/all.kernels/$$i/modules.cz $(DEST)/lib/modules.cz-$$i; done
ls ../kernel/all.kernels | grep '^2' > $(STAGE2_DEST)/mdkinst.kernels
$(MAKE) -C share/po install SUDO= NAME=libDrakX LOCALEDIR=$(DEST)/usr/share/locale_special
-
# POFILES to disable for installation:
# be,fur: too few messages translated;
# ta: font problem
rm -rf $(DEST)/usr/share/locale_special/{be,fur,ta}
ifeq (y,$(USE_PCMCIA))
+ install -s /sbin/cardmgr $(DEST)/usr/bin
cp -a /etc/pcmcia $(DEST)/etc
../tools/patch_pcmcia_config.pl $(DEST)/etc/pcmcia/config ../kernel/all.kernels/`cat ../kernel/all.kernels/.main`/modules.dep
endif
- cp -f $(STAGE1)/init-stage2 $(DEST)/etc/init
+ install -d $(MEDIA_INFO_DEST)
+ grep ChangeLog CVS/Entries > $(STAGE2_DEST)/VERSION
- find $(DEST) -name CVS | xargs rm -rf
+ cd share ; cp compssUsers.pl* rpmsrate $(MEDIA_INFO_DEST)
+# clean-rpmsrate $(MEDIA_INFO_DEST)/rpmsrate $(MAIN_RPMS_DIR)
full_stage2:
$(MAKE) stage2
diff --git a/perl-install/lang.pm b/perl-install/lang.pm
index 5e50f37f9..cf54cd29d 100644
--- a/perl-install/lang.pm
+++ b/perl-install/lang.pm
@@ -1309,11 +1309,6 @@ sub during_install__l2charset {
uc($c);
}
-#- used in Makefile
-sub png_lang_files() {
- print join(' ', map { "pixmaps/langs/lang-$_.png" } list_langs());
-}
-
sub check() {
$^W = 0;
my ($warnings, $errors) = (0, 0);
diff --git a/perl-install/share/list b/perl-install/share/list
deleted file mode 100644
index 1899a00ac..000000000
--- a/perl-install/share/list
+++ /dev/null
@@ -1,205 +0,0 @@
-/bin/ash
-/bin/cpio
-/bin/echo
-/bin/gzip
-/LIB/libnss_nis.so.2
-/LIB/libnss_files.so.2
-/LIB/libnss_dns.so.2
-/LIB/libresolv.so.2
-/LIB/ld-linux*.so.2
-/etc/fonts/fonts.conf
-/etc/protocols
-/etc/imrc
-/etc/im_palette.pal
-/etc/X11/xserver/SecurityPolicy
-/sbin/badblocks
-/sbin/e2fsck
-/sbin/tune2fs
-/sbin/fdisk
-/sbin/insmod
-/sbin/insmod.old
-/sbin/losetup
-/sbin/lvm2
-/sbin/mdadm
-/sbin/mke2fs
-/sbin/mkswap
-/sbin/modinfo
-/sbin/resize2fs
-/sbin/dumpe2fs
-/sbin/dmraid
-/sbin/modinfo
-/sbin/rmmod
-/usr/bin/bzip2
-/usr/bin/consolechars
-/usr/bin/fb2png
-/usr/bin/kbd_mode
-/usr/bin/packdrake
-/usr/bin/parsehdlist
-/usr/bin/perl
-/usr/bin/monitor-parse-edid
-/usr/sbin/monitor-edid
-/usr/sbin/monitor-get-edid
-
-/usr/LIB/gconv/BIG5.so
-/usr/LIB/gconv/EUC-JP.so
-/usr/LIB/gconv/libGB.so
-/usr/LIB/gconv/libJIS.so
-/usr/LIB/gconv/libKSC.so
-/usr/LIB/gconv/EUC-KR.so
-/usr/LIB/gconv/ISO8859-15.so
-/usr/LIB/gconv/ISO8859-14.so
-/usr/LIB/gconv/ISO8859-13.so
-/usr/LIB/gconv/ISO8859-9E.so
-/usr/LIB/gconv/ISO8859-9.so
-/usr/LIB/gconv/ISO8859-7.so
-/usr/LIB/gconv/ISO8859-5.so
-/usr/LIB/gconv/ISO8859-3.so
-/usr/LIB/gconv/ISO8859-2.so
-/usr/LIB/gconv/ISO8859-1.so
-/usr/LIB/gconv/KOI8-K.so
-/usr/LIB/gconv/KOI8-U.so
-/usr/LIB/gconv/KOI8-R.so
-/usr/LIB/gconv/TIS-620.so
-/usr/LIB/gconv/CP1251.so
-/usr/LIB/gconv/GEORGIAN-PS.so
-/usr/LIB/gconv/EUC-CN.so
-/usr/LIB/gconv/gconv-modules
-
-/etc/gtk-2.0/gdk-pixbuf.loaders.*
-/etc/gtk-2.0/gtk.immodules.*
-/etc/pango/ARCH/pango.modules
-/usr/LIB/gtk-2.0/*/loaders/libpixbufloader-xpm.so
-/usr/LIB/gtk-2.0/*/loaders/libpixbufloader-png.so
-/usr/LIB/gtk-2.0/*/immodules/im-cedilla.so
-/usr/LIB/gtk-2.0/*/engines/libgalaxy.so
-/usr/LIB/pango/*/modules/pango-basic-fc.so
-/usr/LIB/pango/*/modules/pango-arabic-fc.so
-/usr/LIB/pango/*/modules/pango-hangul-fc.so
-/usr/LIB/pango/*/modules/pango-hebrew-fc.so
-/usr/LIB/pango/*/modules/pango-indic-fc.so
-/usr/LIB/pango/*/modules/pango-thai-fc.so
-
-/usr/lib/perl5/PERL_VERSION/AutoLoader.pm
-/usr/lib/perl5/PERL_VERSION/Carp.pm
-/usr/lib/perl5/PERL_VERSION/Carp/Heavy.pm
-/usr/lib/perl5/PERL_VERSION/Exporter.pm
-/usr/lib/perl5/PERL_VERSION/Exporter/Heavy.pm
-/usr/lib/perl5/PERL_VERSION/FileHandle.pm
-/usr/lib/perl5/PERL_VERSION/File/Basename.pm
-/usr/lib/perl5/PERL_VERSION/File/Path.pm
-/usr/lib/perl5/PERL_VERSION/File/Spec.pm
-/usr/lib/perl5/PERL_VERSION/File/Spec/Unix.pm
-/usr/lib/perl5/PERL_VERSION/File/Temp.pm
-/usr/lib/perl5/PERL_VERSION/Getopt/Long.pm
-/usr/lib/perl5/PERL_VERSION/PerlIO.pm
-/usr/lib/perl5/PERL_VERSION/SelectSaver.pm
-/usr/lib/perl5/PERL_VERSION/SelfLoader.pm
-/usr/lib/perl5/PERL_VERSION/Symbol.pm
-/usr/lib/perl5/PERL_VERSION/Time/Local.pm
-/usr/lib/perl5/PERL_VERSION/IO/Socket/INET.pm
-/usr/lib/perl5/PERL_VERSION/IO/Socket/UNIX.pm
-/usr/lib/perl5/PERL_VERSION/base.pm
-/usr/lib/perl5/PERL_VERSION/constant.pm
-/usr/lib/perl5/PERL_VERSION/locale.pm
-/usr/lib/perl5/PERL_VERSION/utf8.pm
-/usr/lib/perl5/PERL_VERSION/utf8_heavy.pl
-/usr/lib/perl5/PERL_VERSION/unicore/Exact.pl
-/usr/lib/perl5/PERL_VERSION/unicore/Canonical.pl
-/usr/lib/perl5/PERL_VERSION/unicore/PVA.pl
-/usr/lib/perl5/PERL_VERSION/unicore/To/Lower.pl
-/usr/lib/perl5/PERL_VERSION/unicore/To/Fold.pl
-/usr/lib/perl5/PERL_VERSION/unicore/To/Upper.pl
-/usr/lib/perl5/PERL_VERSION/unicore/lib/gc_sc/Word.pl
-/usr/lib/perl5/PERL_VERSION/unicore/lib/gc_sc/Digit.pl
-/usr/lib/perl5/PERL_VERSION/dumpvar.pl
-/usr/lib/perl5/PERL_VERSION/warnings.pm
-/usr/lib/perl5/PERL_VERSION/warnings/register.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/File/Glob.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/File/Glob/Glob.so
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/Config.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/Data/Dumper.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/DynaLoader.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/Errno.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/Fcntl.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/XSLoader.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/Fcntl/Fcntl.so
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/IO.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/IO/File.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/IO/Handle.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/IO/Seekable.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/IO/Select.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/IO/Socket.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/Socket.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/_h2ph_pre.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/asm/unistd.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/Data/Dumper/Dumper.so
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/IO/IO.so
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/Socket/Socket.so
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/bits/syscall.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/bits/wordsize.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/sys/syscall.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/syscall.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/DynaLoader/dl_findfile.al
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/lib.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/re.pm
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/POSIX/autosplit.ix
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/POSIX/load_imports.al
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/auto/POSIX/POSIX.so
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/POSIX.pm
-/usr/lib/perl5/PERL_VERSION/bytes.pm
-/usr/lib/perl5/PERL_VERSION/integer.pm
-/usr/lib/perl5/PERL_VERSION/overload.pm
-/usr/lib/perl5/PERL_VERSION/strict.pm
-/usr/lib/perl5/PERL_VERSION/vars.pm
-/usr/lib/perl5/PERL_VERSION/Net/Cmd.pm
-/usr/lib/perl5/PERL_VERSION/Net/Config.pm
-/usr/lib/perl5/PERL_VERSION/Net/FTP.pm
-/usr/lib/perl5/PERL_VERSION/Net/FTP/A.pm
-/usr/lib/perl5/PERL_VERSION/Net/FTP/I.pm
-/usr/lib/perl5/PERL_VERSION/Net/FTP/dataconn.pm
-/usr/lib/perl5/PERL_VERSION/Net/Netrc.pm
-/usr/lib/perl5/vendor_perl/*/packdrake.pm
-/usr/lib/perl5/vendor_perl/*/Packdrakeng.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/DataStructure.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/File.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/Func.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/Globals.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/Math.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/String.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/System.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common/Various.pm
-/usr/lib/perl5/vendor_perl/*/MDK/Common.pm
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/URPM.pm
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/URPM/Build.pm
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/URPM/Resolve.pm
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/URPM/Signature.pm
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/auto/URPM/URPM.so
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/Gtk2.pm
-/usr/lib/perl5/vendor_perl/*/ARCH-linux/auto/Gtk2/Gtk2.so
-/usr/lib/rpm/rpmrc
-/usr/lib/rpm/macros
-/sbin/rescuept
-/usr/share/ldetect-lst/Cards+
-/usr/share/ldetect-lst/MonitorsDB
-/usr/share/ldetect-lst/isdn.db
-/usr/share/ldetect-lst/dmitable
-/usr/share/ldetect-lst/pcitable
-/usr/share/ldetect-lst/usbtable
-/usr/share/locale/UTF-8/LC_ADDRESS
-/usr/share/locale/UTF-8/LC_COLLATE
-/usr/share/locale/UTF-8/LC_CTYPE
-/usr/share/locale/UTF-8/LC_IDENTIFICATION
-/usr/share/locale/UTF-8/LC_MEASUREMENT
-/usr/share/locale/UTF-8/LC_MONETARY
-/usr/share/locale/UTF-8/LC_NAME
-/usr/share/locale/UTF-8/LC_NUMERIC
-/usr/share/locale/UTF-8/LC_PAPER
-/usr/share/locale/UTF-8/LC_TELEPHONE
-/usr/share/locale/UTF-8/LC_TIME
-/usr/share/locale/UTF-8/LC_MESSAGES/SYS_LC_MESSAGES
-/usr/share/terminfo/l/linux
-/usr/share/themes/Galaxy/gtk-2.0/gtkrc
-/bin/brltty
-/etc/brltty/text.*.tbl
-/etc/brltty/brltty-??.hlp
-/lib/brltty/libbrlttyb??.so
diff --git a/perl-install/share/list.alpha b/perl-install/share/list.alpha
deleted file mode 100644
index 7ce1a1fee..000000000
--- a/perl-install/share/list.alpha
+++ /dev/null
@@ -1,13 +0,0 @@
-/sbin/mkraid
-/sbin/mkreiserfs
-/sbin/raidstart
-/sbin/ifport
-/sbin/mkdosfs
-/usr/X11R6/bin/XF86_FBDev
-/usr/X11R6/bin/XF86_VGA16
-/usr/X11R6/bin/XF86_3DLabs
-/usr/X11R6/bin/XF86_SVGA
-/usr/X11R6/bin/XF86_TGA
-/usr/X11R6/bin/XF86_S3
-/usr/X11R6/bin/XF86_Mach64
-/usr/X11R6/bin/xmodmap
diff --git a/perl-install/share/list.i386 b/perl-install/share/list.i386
deleted file mode 100644
index 01b7fca2d..000000000
--- a/perl-install/share/list.i386
+++ /dev/null
@@ -1,21 +0,0 @@
-/sbin/mkreiserfs
-/sbin/mkfs.jfs
-/sbin/mkfs.xfs
-/sbin/fsck.jfs
-/sbin/ifport
-/sbin/mkdosfs
-/sbin/resize_reiserfs
-/usr/sbin/ntfsresize
-/usr/sbin/dmidecode
-/usr/X11R6/bin/Xorg
-/usr/X11R6/bin/xmodmap
-/usr/X11R6/lib/modules/libpcidata.a
-/usr/X11R6/lib/modules/drivers/fbdev_drv.o
-/usr/X11R6/lib/modules/input/wacom_drv.o
-/usr/X11R6/lib/modules/input/mouse_drv.o
-/usr/X11R6/lib/modules/input/keyboard_drv.o
-/usr/X11R6/lib/modules/fonts/libbitmap.a
-/usr/X11R6/lib/modules/linux/libfbdevhw.a
-/usr/X11R6/lib/modules/libfb.a
-/usr/X11R6/lib/modules/libshadow.a
-/usr/X11R6/bin/xset
diff --git a/perl-install/share/list.ia64 b/perl-install/share/list.ia64
deleted file mode 100644
index 158ac8387..000000000
--- a/perl-install/share/list.ia64
+++ /dev/null
@@ -1,122 +0,0 @@
-/sbin/mkraid
-/sbin/mkreiserfs
-/sbin/mkfs.xfs
-/sbin/raidstart
-/sbin/mkdosfs
-/sbin/resize_reiserfs
-/usr/bin/strace
-/bin/bash
-/bin/vim-minimal
-/usr/sbin/parted
-/usr/sbin/efibootmgr
-/var/log/XFree86.0.log
-/usr/X11R6/bin/XFree86
-/usr/X11R6/bin/xmodmap
-/usr/X11R6/lib/modules/
-/usr/X11R6/lib/modules/codeconv
-/usr/X11R6/lib/modules/codeconv/libARABIC.a
-/usr/X11R6/lib/modules/codeconv/libARMSCII8.a
-/usr/X11R6/lib/modules/codeconv/libBIG5.a
-/usr/X11R6/lib/modules/codeconv/libDOSENCODING.a
-/usr/X11R6/lib/modules/codeconv/libGB2312.a
-/usr/X11R6/lib/modules/codeconv/libGEORGIAN.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_1.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_10.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_11.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_14.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_15.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_2.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_3.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_4.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_5.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_6.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_7.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_8.a
-/usr/X11R6/lib/modules/codeconv/libISO8859_9.a
-/usr/X11R6/lib/modules/codeconv/libJISX0201.a
-/usr/X11R6/lib/modules/codeconv/libJISX0208.a
-/usr/X11R6/lib/modules/codeconv/libJISX0212.a
-/usr/X11R6/lib/modules/codeconv/libKOI8.a
-/usr/X11R6/lib/modules/codeconv/libKSC5601.a
-/usr/X11R6/lib/modules/codeconv/libKSCJOHAB.a
-/usr/X11R6/lib/modules/codeconv/libMULEENCODING.a
-/usr/X11R6/lib/modules/codeconv/libTCVN.a
-/usr/X11R6/lib/modules/codeconv/libVISCII.a
-/usr/X11R6/lib/modules/dri
-/usr/X11R6/lib/modules/dri/gamma_dri.so
-/usr/X11R6/lib/modules/dri/i810_dri.so
-/usr/X11R6/lib/modules/dri/mga_dri.so
-/usr/X11R6/lib/modules/dri/r128_dri.so
-/usr/X11R6/lib/modules/dri/sis_dri.so
-/usr/X11R6/lib/modules/drivers
-/usr/X11R6/lib/modules/drivers/ati_drv.o
-/usr/X11R6/lib/modules/drivers/atimisc_drv.o
-/usr/X11R6/lib/modules/drivers/fbdev_drv.o
-/usr/X11R6/lib/modules/drivers/glint_drv.o
-/usr/X11R6/lib/modules/drivers/i740_drv.o
-/usr/X11R6/lib/modules/drivers/linux
-/usr/X11R6/lib/modules/drivers/linux/v4l_drv.o
-/usr/X11R6/lib/modules/drivers/mga_drv.o
-/usr/X11R6/lib/modules/drivers/nv_drv.o
-/usr/X11R6/lib/modules/drivers/r128_drv.o
-/usr/X11R6/lib/modules/drivers/radeon_drv.o
-/usr/X11R6/lib/modules/drivers/rendition_drv.o
-/usr/X11R6/lib/modules/drivers/s3virge_drv.o
-/usr/X11R6/lib/modules/drivers/sis_drv.o
-/usr/X11R6/lib/modules/drivers/tdfx_drv.o
-/usr/X11R6/lib/modules/drivers/vga_drv.o
-/usr/X11R6/lib/modules/extensions
-/usr/X11R6/lib/modules/extensions/libGLcore.a
-/usr/X11R6/lib/modules/extensions/libdbe.a
-/usr/X11R6/lib/modules/extensions/libdri.a
-/usr/X11R6/lib/modules/extensions/libextmod.a
-/usr/X11R6/lib/modules/extensions/libglx.a
-/usr/X11R6/lib/modules/extensions/librecord.a
-/usr/X11R6/lib/modules/fonts
-/usr/X11R6/lib/modules/fonts/libbitmap.a
-/usr/X11R6/lib/modules/fonts/libfreetype.a
-/usr/X11R6/lib/modules/fonts/libspeedo.a
-/usr/X11R6/lib/modules/fonts/libtype1.a
-/usr/X11R6/lib/modules/fonts/libxtt.a
-/usr/X11R6/lib/modules/input
-/usr/X11R6/lib/modules/input/citron_drv.o
-/usr/X11R6/lib/modules/input/digitaledge_drv.o
-/usr/X11R6/lib/modules/input/dynapro_drv.o
-/usr/X11R6/lib/modules/input/elographics_drv.o
-/usr/X11R6/lib/modules/input/microtouch_drv.o
-/usr/X11R6/lib/modules/input/mouse_drv.o
-/usr/X11R6/lib/modules/input/mutouch_drv.o
-/usr/X11R6/lib/modules/input/spaceorb_drv.o
-/usr/X11R6/lib/modules/input/summa_drv.o
-/usr/X11R6/lib/modules/input/void_drv.o
-/usr/X11R6/lib/modules/input/wacom_drv.o
-/usr/X11R6/lib/modules/libafb.a
-/usr/X11R6/lib/modules/libcfb.a
-/usr/X11R6/lib/modules/libcfb16.a
-/usr/X11R6/lib/modules/libcfb24.a
-/usr/X11R6/lib/modules/libcfb32.a
-/usr/X11R6/lib/modules/libddc.a
-/usr/X11R6/lib/modules/libfb.a
-/usr/X11R6/lib/modules/libi2c.a
-/usr/X11R6/lib/modules/libint10.a
-/usr/X11R6/lib/modules/libmfb.a
-/usr/X11R6/lib/modules/libpcidata.a
-/usr/X11R6/lib/modules/librac.a
-/usr/X11R6/lib/modules/libramdac.a
-/usr/X11R6/lib/modules/libscanpci.a
-/usr/X11R6/lib/modules/libshadow.a
-/usr/X11R6/lib/modules/libshadowfb.a
-/usr/X11R6/lib/modules/libvbe.a
-/usr/X11R6/lib/modules/libvgahw.a
-/usr/X11R6/lib/modules/libxaa.a
-/usr/X11R6/lib/modules/libxf1bpp.a
-/usr/X11R6/lib/modules/libxf24_32bpp.a
-/usr/X11R6/lib/modules/libxf4bpp.a
-/usr/X11R6/lib/modules/libxf8_16bpp.a
-/usr/X11R6/lib/modules/libxf8_32bpp.a
-/usr/X11R6/lib/modules/linux
-/usr/X11R6/lib/modules/linux/libdrm.a
-/usr/X11R6/lib/modules/linux/libfbdevhw.a
-/usr/X11R6/lib/modules/v10002d.uc
-/usr/X11R6/lib/modules/v20002d.uc
-/usr/lib/perl5/PERL_VERSION/ARCH-linux-thread-multi/asm/break.ph
diff --git a/perl-install/share/list.ppc b/perl-install/share/list.ppc
deleted file mode 100644
index d940c90f2..000000000
--- a/perl-install/share/list.ppc
+++ /dev/null
@@ -1,34 +0,0 @@
-/sbin/mkraid
-/sbin/mkreiserfs
-/sbin/raidstart
-/usr/bin/hformat
-/usr/bin/hmount
-/usr/bin/humount
-/usr/bin/hattrib
-/usr/bin/hcopy
-/usr/bin/hcd
-/sbin/pdisk
-/usr/X11R6/bin/Xorg
-/usr/X11R6/bin/xmodmap
-/sbin/mkfs.xfs
-/sbin/mkfs.jfs
-/usr/X11R6/lib/modules/input/wacom_drv.o
-/usr/X11R6/lib/modules/libpcidata.a
-/usr/X11R6/lib/modules/fonts/libbitmap.a
-/usr/X11R6/lib/modules/libscanpci.a
-/usr/X11R6/lib/modules/libfb.a
-/usr/X11R6/lib/modules/linux/libfbdevhw.a
-/usr/X11R6/lib/modules/libshadow.a
-/usr/X11R6/lib/modules/input/mouse_drv.o
-/usr/X11R6/lib/modules/drivers/fbdev_drv.o
-/usr/X11R6/lib/modules/drivers/ati_drv.o
-/usr/X11R6/lib/modules/drivers/r128_drv.o
-/usr/X11R6/lib/modules/drivers/radeon_drv.o
-/usr/X11R6/lib/modules/drivers/atimisc_drv.o
-/usr/X11R6/lib/modules/libxaa.a
-/usr/X11R6/lib/modules/libramdac.a
-/usr/X11R6/lib/modules/libi2c.a
-/usr/X11R6/lib/modules/libddc.a
-/usr/X11R6/lib/modules/libint10.a
-/usr/X11R6/lib/modules/libvbe.a
-/usr/X11R6/lib/modules/libvgahw.a
diff --git a/perl-install/share/list.sparc b/perl-install/share/list.sparc
deleted file mode 100644
index b597a10ce..000000000
--- a/perl-install/share/list.sparc
+++ /dev/null
@@ -1,84 +0,0 @@
-/bin/cpio
-/lib/libnss_nis.so.2
-/lib/libnss_files.so.2
-/lib/libnss_dns.so.2
-/lib/libresolv.so.2
-/etc/protocols
-/sbin/mkreiserfs
-/sbin/fdisk
-/sbin/ifport
-/sbin/insmod
-/sbin/mkraid
-/sbin/rmmod
-/sbin/mkdosfs
-/sbin/mke2fs
-/sbin/raidstart
-/sbin/losetup
-/usr/bin/genromfs
-/usr/bin/bzip2
-/usr/bin/perl
-/usr/lib/libimlib-png.so
-/usr/lib/gtk/themes/engines/libpixmap.so
-/usr/lib/gtk/themes/engines/libpixmap.la
-/usr/lib/libimlib-png.so
-/usr/lib/perl5/PERL_VERSION/AutoLoader.pm
-/usr/lib/perl5/PERL_VERSION/Carp.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/Data/Dumper.pm
-/usr/lib/perl5/PERL_VERSION/Exporter.pm
-/usr/lib/perl5/PERL_VERSION/Carp/Heavy.pm
-/usr/lib/perl5/PERL_VERSION/Exporter/Heavy.pm
-/usr/lib/perl5/PERL_VERSION/FileHandle.pm
-/usr/lib/perl5/PERL_VERSION/SelectSaver.pm
-/usr/lib/perl5/PERL_VERSION/SelfLoader.pm
-/usr/lib/perl5/PERL_VERSION/Symbol.pm
-/usr/lib/perl5/PERL_VERSION/Time/Local.pm
-/usr/lib/perl5/PERL_VERSION/dumpvar.pl
-/usr/lib/perl5/PERL_VERSION/warnings.pm
-/usr/lib/perl5/PERL_VERSION/warnings/register.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/File/Glob.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/File/Glob/Glob.bs
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/File/Glob/Glob.so
-/usr/lib/perl5/PERL_VERSION/sparc-linux/Config.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/XSLoader.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/DynaLoader.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/Fcntl.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/Fcntl/Fcntl.bs
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/Fcntl/Fcntl.so
-/usr/lib/perl5/PERL_VERSION/sparc-linux/IO/File.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/IO/Handle.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/IO/Seekable.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/IO/Socket.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/Socket.pm
-/usr/lib/perl5/PERL_VERSION/sparc-linux/_h2ph_pre.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/asm/unistd.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/asm-sparc/unistd.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/asm-sparc64/unistd.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/Data/Dumper/Dumper.bs
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/Data/Dumper/Dumper.so
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/IO/IO.so
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/Socket/Socket.bs
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/Socket/Socket.so
-/usr/lib/perl5/PERL_VERSION/sparc-linux/bits/syscall.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/sys/syscall.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/syscall.ph
-/usr/lib/perl5/PERL_VERSION/sparc-linux/auto/DynaLoader/dl_findfile.al
-/usr/lib/perl5/PERL_VERSION/lib.pm
-/usr/lib/perl5/PERL_VERSION/overload.pm
-/usr/lib/perl5/PERL_VERSION/strict.pm
-/usr/lib/perl5/PERL_VERSION/vars.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Gtk.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Gtk/Types.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/Cmd.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/Config.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/FTP.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/FTP/A.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/FTP/I.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/FTP/dataconn.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/Net/Netrc.pm
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/auto/Gtk/Gtk.bs
-/usr/lib/perl5/site_perl/PERL_VERSION/sparc-linux/auto/Gtk/Gtk.so
-/usr/lib/rpm/rpmrc
-/usr/X11R6/bin/Xsun24
-/usr/X11R6/bin/XF86_Mach64
-/usr/X11R6/bin/XF86_3DLabs
-/usr/X11R6/bin/xmodmap
diff --git a/perl-install/share/list.x86_64 b/perl-install/share/list.x86_64
deleted file mode 100644
index c38f93ad1..000000000
--- a/perl-install/share/list.x86_64
+++ /dev/null
@@ -1,23 +0,0 @@
-/bin/bash
-/sbin/ifport
-/sbin/mkdosfs
-/sbin/mkraid
-/sbin/mkreiserfs
-/sbin/mkfs.xfs
-/sbin/raidstart
-/sbin/resize_reiserfs
-/usr/sbin/ntfsresize
-/usr/sbin/dmidecode
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/asm-i386/unistd.ph
-/usr/lib/perl5/PERL_VERSION/ARCH-linux/asm-x86_64/unistd.ph
-/usr/X11R6/bin/Xorg
-/usr/X11R6/bin/xmodmap
-/usr/X11R6/lib64/modules/libpcidata.a
-/usr/X11R6/lib64/modules/drivers/fbdev_drv.o
-/usr/X11R6/lib64/modules/input/wacom_drv.o
-/usr/X11R6/lib64/modules/input/mouse_drv.o
-/usr/X11R6/lib64/modules/input/keyboard_drv.o
-/usr/X11R6/lib64/modules/fonts/libbitmap.a
-/usr/X11R6/lib64/modules/linux/libfbdevhw.a
-/usr/X11R6/lib64/modules/libfb.a
-/usr/X11R6/lib64/modules/libshadow.a
diff --git a/perl-install/share/list.xml b/perl-install/share/list.xml
new file mode 100644
index 000000000..59e798352
--- /dev/null
+++ b/perl-install/share/list.xml
@@ -0,0 +1,343 @@
+<list no-arch-libraries="on">
+
+<from expand="binary">
+ ash echo
+ cpio gzip bzip2
+ <if-not ARCH="ppc">
+ fdisk
+ </if-not>
+ <if ARCH="ppc">
+ pdisk
+ </if>
+ insmod insmod.old modinfo rmmod
+ losetup
+ lvm2 mdadm
+
+ badblocks
+ mkswap
+ mke2fs e2fsck tune2fs dumpe2fs resize2fs
+
+ mkreiserfs
+ mkfs.xfs
+ resize_reiserfs
+ <if ARCH="i.86|x86_64|ia64">
+ mkdosfs
+ ntfsresize
+ dmraid
+ </if>
+ <if ARCH="i.86">
+ mkfs.jfs fsck.jfs
+ </if>
+
+ consolechars kbd_mode
+ Xorg xmodmap xset
+ fb2png
+ packdrake parsehdlist
+ perl
+ monitor-edid monitor-parse-edid monitor-get-edid
+
+ <filter subst="s!^echo!/usr/bin/echo!">
+ unicode_start
+ </filter>
+
+ <if ARCH="i.86|x86_64|ia64">
+ ifport
+ </if>
+ <if ARCH="i.86|x86_64|ia64">
+ dmidecode
+ </if>
+ <if ARCH="ia64">
+ efibootmgr
+ </if>
+
+ <if ARCH="ppc">
+ hattrib hcopy hcd
+ hformat hmount humount
+ </if>
+</from>
+
+<from dir="/usr/X11R6/LIB/modules">
+ libpcidata.a
+ drivers/fbdev_drv.o
+ input/wacom_drv.o
+ input/mouse_drv.o
+ input/keyboard_drv.o
+ fonts/libbitmap.a
+ linux/libfbdevhw.a
+ libfb.a
+ libshadow.a
+</from>
+
+<from dir="/usr/X11R6/lib/X11/fonts">
+ <to flatten="on">
+ misc/cursor.pcf.gz
+ TTF/Vera.ttf
+ TTF/VeraBd.ttf
+ </to>
+</from>
+
+<from dir="/usr/X11R6/lib/X11/locale">
+ C
+ en_US.UTF-8
+ iso8859-1
+</from>
+
+<filter command="strip">
+<from dir="/LIB">
+ libnss_nis.so.2
+ libnss_files.so.2
+ libnss_dns.so.2
+ libresolv.so.2
+ ld-linux*.so.2
+</from>
+</filter>
+
+<from>
+ /etc/fonts/fonts.conf
+ /etc/protocols
+ /etc/imrc
+ /etc/im_palette.pal
+ /etc/X11/xserver/SecurityPolicy
+ /etc/gtk-2.0/gdk-pixbuf.loaders.*
+ /etc/gtk-2.0/gtk.immodules.*
+ /etc/pango/ARCH/pango.modules
+ /usr/LIB/gtk-2.0/*/loaders/libpixbufloader-xpm.so
+ /usr/LIB/gtk-2.0/*/loaders/libpixbufloader-png.so
+ /usr/LIB/gtk-2.0/*/immodules/im-cedilla.so
+ /usr/LIB/gtk-2.0/*/engines/libgalaxy.so
+
+ /usr/lib/rpm/rpmrc
+ /usr/lib/rpm/macros
+ /sbin/rescuept
+ /usr/share/locale/UTF-8
+ /usr/share/terminfo/l/linux
+ /usr/share/themes/Galaxy/gtk-2.0/gtkrc
+ /bin/brltty
+
+ <from expand="glob">
+ /etc/brltty/text.*.tbl
+ /etc/brltty/brltty-??.hlp
+ /lib/brltty/libbrlttyb??.so
+ </from>
+
+ <mode copy="keep-links">
+ /usr/lib/X11
+ </mode>
+
+ <from expand="command">
+ perl -Mlang -I. -le 'print foreach lang::console_font_files()'
+ </from>
+</from>
+
+<from dir="/usr/share/ldetect-lst">
+ <filter command="gzip">
+ Cards+ MonitorsDB isdn.db
+ dmitable pcitable usbtable
+ </filter>
+</from>
+
+<from dir="/usr/LIB/pango/*/modules">
+ pango-basic-fc.so
+ pango-arabic-fc.so
+ pango-hangul-fc.so
+ pango-hebrew-fc.so
+ pango-indic-fc.so
+ pango-thai-fc.so
+</from>
+
+<from dir="/usr/LIB/gconv">
+ BIG5.so
+ EUC-JP.so
+ libGB.so
+ libJIS.so
+ libKSC.so
+ EUC-KR.so
+ ISO8859-15.so
+ ISO8859-14.so
+ ISO8859-13.so
+ ISO8859-9E.so
+ ISO8859-9.so
+ ISO8859-7.so
+ ISO8859-5.so
+ ISO8859-3.so
+ ISO8859-2.so
+ ISO8859-1.so
+ KOI8-K.so
+ KOI8-U.so
+ KOI8-R.so
+ TIS-620.so
+ CP1251.so
+ GEORGIAN-PS.so
+ EUC-CN.so
+ gconv-modules
+</from>
+
+<filter subst="/^__END__/ and $_ = '', close ARGV">
+<from expand="main-perl">
+ AutoLoader.pm
+ Carp.pm
+ Carp/Heavy.pm
+ Exporter.pm
+ Exporter/Heavy.pm
+ FileHandle.pm
+ File/Basename.pm
+ File/Path.pm
+ File/Spec.pm
+ File/Spec/Unix.pm
+ File/Temp.pm
+ Getopt/Long.pm
+ PerlIO.pm
+ SelectSaver.pm
+ SelfLoader.pm
+ Symbol.pm
+ Time/Local.pm
+ IO/Socket/INET.pm
+ IO/Socket/UNIX.pm
+ base.pm
+ constant.pm
+ locale.pm
+ utf8.pm
+ utf8_heavy.pl
+ unicore/Exact.pl
+ unicore/Canonical.pl
+ unicore/PVA.pl
+ unicore/To/Lower.pl
+ unicore/To/Fold.pl
+ unicore/To/Upper.pl
+ unicore/lib/gc_sc/Word.pl
+ unicore/lib/gc_sc/Digit.pl
+ dumpvar.pl
+ warnings.pm
+ warnings/register.pm
+ ARCH-linux/File/Glob.pm
+ ARCH-linux/auto/File/Glob/Glob.so
+ ARCH-linux/Config.pm
+ ARCH-linux/Data/Dumper.pm
+ ARCH-linux/DynaLoader.pm
+ ARCH-linux/Errno.pm
+ ARCH-linux/Fcntl.pm
+ ARCH-linux/XSLoader.pm
+ ARCH-linux/auto/Fcntl/Fcntl.so
+ ARCH-linux/IO.pm
+ ARCH-linux/IO/File.pm
+ ARCH-linux/IO/Handle.pm
+ ARCH-linux/IO/Seekable.pm
+ ARCH-linux/IO/Select.pm
+ ARCH-linux/IO/Socket.pm
+ ARCH-linux/Socket.pm
+ ARCH-linux/_h2ph_pre.ph
+ ARCH-linux/asm/unistd.ph
+ <if ARCH="ia64">
+ ARCH-linux/asm-i386/unistd.ph
+ ARCH-linux/asm-x86_64/unistd.ph
+ ARCH-linux/asm/break.ph
+ </if>
+ ARCH-linux/auto/Data/Dumper/Dumper.so
+ ARCH-linux/auto/IO/IO.so
+ ARCH-linux/auto/Socket/Socket.so
+ ARCH-linux/bits/syscall.ph
+ ARCH-linux/bits/wordsize.ph
+ ARCH-linux/sys/syscall.ph
+ ARCH-linux/syscall.ph
+ ARCH-linux/auto/DynaLoader/dl_findfile.al
+ ARCH-linux/lib.pm
+ ARCH-linux/re.pm
+ ARCH-linux/auto/POSIX/autosplit.ix
+ ARCH-linux/auto/POSIX/load_imports.al
+ ARCH-linux/auto/POSIX/POSIX.so
+ ARCH-linux/POSIX.pm
+ bytes.pm
+ integer.pm
+ overload.pm
+ strict.pm
+ vars.pm
+ Net/Cmd.pm
+ Net/Config.pm
+ Net/FTP.pm
+ Net/FTP/A.pm
+ Net/FTP/I.pm
+ Net/FTP/dataconn.pm
+ Net/Netrc.pm
+</from>
+
+<from expand="perl">
+ packdrake.pm
+ Packdrakeng.pm
+ MDK/Common
+ MDK/Common.pm
+ ARCH-linux/URPM.pm
+ ARCH-linux/URPM/Build.pm
+ ARCH-linux/URPM/Resolve.pm
+ ARCH-linux/URPM/Signature.pm
+ ARCH-linux/auto/URPM/URPM.so
+</from>
+
+<from expand="rpm" matching="m!^/usr/lib/perl5! and !/\.pod$/">
+ perl-Gtk2
+ perl-Glib
+</from>
+</filter>
+
+<from dir=".">
+ <to dir="REP4PMS">
+ <filter command="strip">
+ <from expand="command">
+ find auto -follow -name "*.so"
+ </from>
+ </filter>
+ </to>
+</from>
+
+<from dir="../tools">
+ <to dir="/usr/bin" flatten="on">
+ serial_probe/serial_probe
+ xhost+
+
+ <mode on-error="ignore">
+ ARCH/busybox
+ </mode>
+ </to>
+
+</from>
+
+<from dir="../kernel">
+ <to dir="/lib">
+ modules.description
+ </to>
+</from>
+
+<from dir="share">
+ <from expand="tar">
+ fonts.tar.bz2
+ keyboards.tar.bz2
+ locales-skeleton.tar.bz2
+ keymaps.tar.bz2
+ </from>
+
+ <to dir="/usr/share">
+ consolefonts devices
+
+ <from expand="glob">
+ *.png
+ </from>
+ </to>
+</from>
+
+<from dir="pixmaps">
+ <to dir="/usr/share">
+ <from expand="glob" matching="!/^wiz_/">
+ *.png
+ *.xpm
+ </from>
+ </to>
+</from>
+
+<from dir="pixmaps/langs">
+ <to dir="/usr/share/langs">
+ <from expand="command">
+ perl -I. -Mlang -le 'print "lang-$_.png" foreach lang::list_langs()'
+ </from>
+ </to>
+</from>
+
+</list>
diff --git a/tools/install-xml-file-list b/tools/install-xml-file-list
new file mode 100755
index 000000000..0cd1fc1cc
--- /dev/null
+++ b/tools/install-xml-file-list
@@ -0,0 +1,279 @@
+#!/usr/bin/perl
+
+use MDK::Common;
+use XML::Parser;
+use Data::Dumper;
+use Config;
+use Cwd 'cwd';
+
+@ARGV == 2 or die "usage: install-xml-file-list <xml file> <destination>\n";
+my ($xml_file_list, $DEST) = @ARGV;
+
+my $initial_dir = cwd();
+my $ARCH = arch() =~ /i.86/ ? 'i386' : arch();
+my $LIB = arch() =~ /x86_64/ ? "lib64" : "lib";
+
+my $base_cpio_options = '-pumd --quiet';
+
+system("rm -rf $DEST");
+
+my $tree = XML::Parser->new(Style => 'Tree')->parsefile($xml_file_list);
+
+my $main_node = decompose($tree);
+
+$main_node->{tag} eq 'list' or die "bad file $xml_file_list (main tag should be <list>)\n";
+
+handle_nodes({}, $main_node);
+
+install_needed_libraries();
+
+final_cleanup();
+
+sub final_cleanup() {
+ #- cpio creates directory 700, that's not nice
+ system("find $DEST -type d | xargs chmod 755");
+}
+
+sub handle_nodes {
+ my ($env, $e) = @_;
+ handle_node($env, decompose($_)) foreach @{$e->{l}};
+}
+sub handle_node {
+ my ($env, $node) = @_;
+
+ if (!$node->{tag} && $node->{text} !~ /\S/) {
+ } elsif (!$node->{tag}) {
+ install($env, $node->{text});
+ } elsif ($node->{tag} eq 'if') {
+ my $cond = valid_cond($node->{attr});
+ handle_nodes($env, $node) if $cond;
+ } elsif ($node->{tag} eq 'if-not') {
+ my $cond = valid_cond($node->{attr});
+ handle_nodes($env, $node) if !$cond;
+ } elsif (member($node->{tag}, 'from', 'to', 'mode', 'filter')) {
+ handle_nodes(add_to_env($env, $node->{tag} => $node->{attr}), $node);
+ } else {
+ warn "expecting tag <from>, not <$node->{tag}>\n";
+ }
+}
+
+sub valid_cond {
+ my ($attr) = @_;
+ every {
+ if ($_ eq 'ARCH') {
+ $ARCH =~ /$attr->{$_}/;
+ } else {
+ die "<if>: unknown condition $_\n";
+ }
+ } keys %$attr;
+}
+
+sub add_to_env {
+ my ($env, $tag, $attr) = @_;
+ my %env = map_each { $::a => +{%$::b} } %$env;
+ foreach (keys %$attr) {
+ !$env{$tag}{$_} or die qq(overriding attribute <$tag $_="$env{$tag}{$_}"> with $_="$attr->{$_}"\n);
+ $env{$tag}{$_} = $attr->{$_};
+ }
+ \%env;
+}
+
+sub group_by_n {
+ my ($n, $l) = @_;
+ my (@r, $subl);
+ my $i = 0;
+ foreach (@$l) {
+ if ($i % $n == 0) {
+ push @r, $subl = [];
+ }
+ push @$subl, $_;
+ $i++;
+ }
+ @r;
+}
+
+sub all_files_rec_ {
+ my ($d) = @_;
+
+ $d, -d $d && ! -l $d ? map { all_files_rec_("$d/$_") } all($d) : ();
+}
+
+sub expand_macros {
+ my ($f) = @_;
+ $f =~ s!\bLIB\b!$LIB!g;
+ $f =~ s!\bARCH\b!$ARCH!ge;
+ $f =~ s!\bREP4PMS\b!$ENV{REP4PMS} || die "REP4PMS undefined\n"!ge;
+ $f;
+}
+
+my %needed_libraries;
+sub collect_needed_libraries {
+ my (@to_check) = @_;
+ while (@to_check) {
+ my $to_check = join(' ', @to_check);
+ my @l = `ldd $to_check 2>/dev/null` =~ m! => (/\S+)!g;
+ foreach (@l) {
+ s!^(/lib(64)?/).*?/!$1! if $main_node->{attr}{'no-arch-libraries'}; #- replace /lib/tls or /lib/i686 with /lib
+ }
+ @to_check = grep { !$needed_libraries{$_}++ } @l;
+ @to_check = ();
+ }
+}
+sub install_needed_libraries {
+ copy_files('', $DEST, [ keys %needed_libraries ], '', '--dereference');
+}
+
+sub copy_files {
+ my ($working_dir, $to_dir, $files, $b_flatten, @options) = @_;
+
+ if ($b_flatten) {
+ mkdir_p($to_dir);
+ my $options = join(' ', '-r', @options);
+ foreach (group_by_n(20, $files)) {
+ warn "cp $options to_dir $to_dir from $working_dir: @$_\n" if $verbose;
+ system("cd $working_dir ; cp $options @$_ $to_dir");
+ }
+ } else {
+ my $options = join(' ', $base_cpio_options, @options);
+ warn "cpio $options to_dir $to_dir from $working_dir: @$files\n" if $verbose;
+ open(my $F, "| cd $working_dir ; cpio $options $to_dir");
+ print $F "$_\n" foreach @$files;
+ close($F) or die "cpio $to_dir failed\n";
+ }
+}
+
+sub install {
+ my ($env, $text) = @_;
+
+ my $from_dir = $env->{from}{dir};
+ my $to_dir = $DEST . expand_macros($env->{to}{dir} || $env->{to}{flatten} && $from_dir || '');
+ my $working_dir = '.';
+
+ my $expand = $env->{from}{expand} || '';
+
+ my $disallow_from_dir = sub {
+ !$from_dir or die "from dir not allowed with $expand binary\n";
+ };
+
+ my $from_file = sub {
+ my ($rel, $b_full_glob, $b_recursive_dirs) = @_;
+ my $f = expand_macros($from_dir ? "$from_dir/$rel" : $rel);
+ my @l = $f;
+ chdir $working_dir;
+ if ($f =~ /\*/ || $b_full_glob) {
+ @l = glob($f) or die "no match for $f\n";
+
+ @l == 1 || $b_full_glob or die "multiple match for $f\n";
+ } else {
+ -e $f or die "missing file $f\n";
+ }
+ if (@l == 1 && -d $l[0] && $b_recursive_dirs) {
+ @l = all_files_rec_($l[0]);
+ }
+ @l = grep { !m!/CVS($|/)! } @l;
+ if (my $re = $env->{from}{matching}) {
+ @l = grep { eval $re } @l;
+ }
+
+ collect_needed_libraries(grep { -x $_ } @l);
+
+ chdir $initial_dir;
+ @l;
+ };
+
+ my @files;
+ if ($expand eq 'tar') {
+ foreach (split(' ', $text)) {
+ system('tar', 'xfj', $from_file->($_), '-C', $to_dir);
+ }
+ # not filling @files, things are already done
+
+ } elsif ($expand eq 'command') {
+ @files = chomp_(`$text`);
+
+ } elsif ($expand eq 'glob') {
+ #- glob done in $from_file
+ @files = split(' ', $text);
+
+ } elsif ($expand eq 'binary') {
+ $disallow_from_dir->();
+ my @PATH = qw(/sbin /bin /usr/bin /usr/sbin /usr/X11R6/bin);
+ foreach my $name (split(' ', $text)) {
+ my @l = grep { -x $_ } map { "$_/$name" } @PATH;
+ @l or die "can't find binary $name\n";
+ if (my @m = grep { ! -l $_ } @l) {
+ @l = @m;
+ }
+ @l == 1 or die "many matches for binary $name: " . join(' ', @l) . "\n";
+ push @files, @l;
+ }
+ $env->{filter}{command} ||= 'strip';
+
+ } elsif ($expand eq 'rpm') {
+ $disallow_from_dir->();
+ foreach my $rpm (split(' ', $text)) {
+ my @l = chomp_(`rpm -ql $rpm`) or die "rpm $rpm must be installed\n";
+ push @files, @l;
+ }
+
+ } elsif ($expand eq 'perl') {
+ $disallow_from_dir->();
+ $from_dir = '/usr/lib/perl5/vendor_perl/*';
+ @files = split(' ', $text);
+ } elsif ($expand eq 'main-perl') {
+ $disallow_from_dir->();
+ $from_dir = $Config{privlib};
+ @files = split(' ', $text);
+ } elsif ($expand) {
+ die "unknown expand method $expand\n";
+ } else {
+ @files = split(' ', $text);
+
+ $env->{filter}{command} ||= 'strip' if $to_dir =~ m!/bin$!;
+ }
+
+ if ($env->{to}{dir} && $from_dir) {
+ $working_dir = $from_dir;
+ undef $from_dir;
+ }
+
+ my @all_files = map { $from_file->($_, $expand eq 'glob', $expand ne 'rpm') } @files;
+
+
+ my $copy_mode = $env->{mode}{copy} || '';
+ my @options = (
+ if_($copy_mode ne 'keep-links', '--dereference'),
+ );
+ copy_files($working_dir, $to_dir, \@all_files, $env->{to}{flatten}, @options);
+
+ {
+ chdir $to_dir;
+ foreach (group_by_n(20, \@all_files)) {
+ my @l = $env->{to}{flatten} ? (map { basename($_) } @$_) : (map { "./$_" } @$_);
+ @l = grep { ! -d $_ } @l;
+
+ if (my $subst = $env->{filter}{subst}) {
+ system('perl', '-pi', '-e', $subst, @l);
+ }
+ if (my $command = $env->{filter}{command}) {
+ my @options = (
+ if_($command eq 'gzip', '-9'),
+ if_($command eq 'strip', '2>/dev/null'),
+ );
+ system(join(' ', $command, @options, @l));
+ }
+ }
+ chdir $initial_dir;
+ }
+}
+
+sub decompose {
+ my ($tree) = @_;
+ my ($tag, $val) = @$tree;
+ if ($tag eq '0') {
+ { text => $val };
+ } else {
+ my ($attr, @l) = @$val;
+ { tag => $tag, attr => $attr, l => [ group_by2(@l) ] };
+ }
+}