Merge branch '1909_extfs_d'

* 1909_extfs_d:
  Replaced hardcoded '/' symbols.
  Fixed file list in RPM spec file.
  2-level extfs plugin structure.
  extfs.ini file is replaced to extfs.d directory.
  Reimplemented work with plugin info.
  Optimization of symbolic link loop protection.
  Optimization of extfs_get_path_from_entry() function.
  Ticket #1909: easy plugable EXTFS VFS.
This commit is contained in:
Andrew Borodin 2010-02-15 16:10:23 +00:00
commit de0cac20e3
14 changed files with 584 additions and 491 deletions

View File

@ -589,20 +589,20 @@ lib/tty/Makefile
lib/vfs/Makefile lib/vfs/Makefile
lib/vfs/mc-vfs/Makefile lib/vfs/mc-vfs/Makefile
lib/vfs/mc-vfs/extfs/Makefile lib/vfs/mc-vfs/extfs/Makefile
lib/vfs/mc-vfs/extfs/a lib/vfs/mc-vfs/extfs/a+
lib/vfs/mc-vfs/extfs/apt lib/vfs/mc-vfs/extfs/apt+
lib/vfs/mc-vfs/extfs/audio lib/vfs/mc-vfs/extfs/audio
lib/vfs/mc-vfs/extfs/deb lib/vfs/mc-vfs/extfs/deb
lib/vfs/mc-vfs/extfs/deba lib/vfs/mc-vfs/extfs/deba
lib/vfs/mc-vfs/extfs/debd lib/vfs/mc-vfs/extfs/debd
lib/vfs/mc-vfs/extfs/dpkg lib/vfs/mc-vfs/extfs/dpkg+
lib/vfs/mc-vfs/extfs/iso9660 lib/vfs/mc-vfs/extfs/iso9660
lib/vfs/mc-vfs/extfs/hp48 lib/vfs/mc-vfs/extfs/hp48+
lib/vfs/mc-vfs/extfs/lslR lib/vfs/mc-vfs/extfs/lslR
lib/vfs/mc-vfs/extfs/mailfs lib/vfs/mc-vfs/extfs/mailfs
lib/vfs/mc-vfs/extfs/patchfs lib/vfs/mc-vfs/extfs/patchfs
lib/vfs/mc-vfs/extfs/rpms lib/vfs/mc-vfs/extfs/rpms+
lib/vfs/mc-vfs/extfs/s3 lib/vfs/mc-vfs/extfs/s3+
lib/vfs/mc-vfs/extfs/uace lib/vfs/mc-vfs/extfs/uace
lib/vfs/mc-vfs/extfs/ualz lib/vfs/mc-vfs/extfs/ualz
lib/vfs/mc-vfs/extfs/uar lib/vfs/mc-vfs/extfs/uar

View File

@ -122,8 +122,13 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/mcedit %{_bindir}/mcedit
%{_bindir}/mcview %{_bindir}/mcview
%{_bindir}/mcmfmt %{_bindir}/mcmfmt
%dir %{_libexecdir}/mc
%dir %{_libexecdir}/mc/extfs.d
%attr(4511, vcsa, tty) %{_libexecdir}/mc/cons.saver %attr(4511, vcsa, tty) %{_libexecdir}/mc/cons.saver
%{_libexecdir}/mc/mc*sh %{_libexecdir}/mc/mc*sh
%{_libexecdir}/mc/extfs.d/*
%{_mandir}/man1/* %{_mandir}/man1/*
%lang(es) %{_mandir}/es/man1/mc.1* %lang(es) %{_mandir}/es/man1/mc.1*
%lang(hu) %{_mandir}/hu/man1/mc.1* %lang(hu) %{_mandir}/hu/man1/mc.1*
@ -142,17 +147,18 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/mc/mc.ext %config(noreplace) %{_sysconfdir}/mc/mc.ext
%config(noreplace) %{_sysconfdir}/mc/mc.menu %config(noreplace) %{_sysconfdir}/mc/mc.menu
%config(noreplace) %{_sysconfdir}/mc/mc.menu.* %config(noreplace) %{_sysconfdir}/mc/mc.menu.*
%config(noreplace) %{_sysconfdir}/mc/extfs/extfs.ini %config(noreplace) %{_sysconfdir}/mc/sfs.ini
%config(noreplace) %{_sysconfdir}/mc/extfs/sfs.ini
%config(noreplace) %{_sysconfdir}/mc/mc.keymap %config(noreplace) %{_sysconfdir}/mc/mc.keymap
%config(noreplace) %{_sysconfdir}/mc/mc.keymap.* %config(noreplace) %{_sysconfdir}/mc/mc.keymap.*
%dir %{_datadir}/mc %dir %{_datadir}/mc
%{_datadir}/mc/* %{_datadir}/mc/*
%dir %{_libexecdir}/mc
%changelog %changelog
* Tue Feb 09 2010 Andrew Borodin <aborodin@vmail.ru>
- Fixed file list because of EXTFS VFS reorganizing.
* Wed Dec 30 2009 Yury V. Zaytsev <yury@shurup.com> * Wed Dec 30 2009 Yury V. Zaytsev <yury@shurup.com>
- Bumped the epoch again and changed the versioning scheme. - Bumped the epoch again and changed the versioning scheme.
- Thanks to Slava Zanko for all his hard work on m4 vodoo! - Thanks to Slava Zanko for all his hard work on m4 vodoo!

View File

@ -29,6 +29,7 @@
#define CHARSETS_INDEX "mc.charsets" #define CHARSETS_INDEX "mc.charsets"
#define MC_LIB_EXT "mc.ext" #define MC_LIB_EXT "mc.ext"
#define MC_EXTFS_DIR "extfs.d"
#define MC_BASHRC_FILE "bashrc" #define MC_BASHRC_FILE "bashrc"
#define MC_CONFIG_FILE "ini" #define MC_CONFIG_FILE "ini"

View File

@ -8,6 +8,8 @@ DIST_SUBDIRS = extfs
SUBDIRS = extfs $(SAMBA_SUBDIRS) SUBDIRS = extfs $(SAMBA_SUBDIRS)
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(SAMBA_CFLAGS) AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(SAMBA_CFLAGS)
AM_CPPFLAGS = -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\"
BASICFILES = \ BASICFILES = \
cpio.c \ cpio.c \
direntry.c \ direntry.c \

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +1,29 @@
extfsdir = $(pkgdatadir)/extfs extfsdir = $(libexecdir)/@PACKAGE@/extfs.d
EXTFSCONFFILES = extfs.ini sfs.ini EXTFSCONFFILES = sfs.ini
# Files to install and distribute other than extfs scripts # Files to install and distribute other than extfs scripts
EXTFS_MISC = README EXTFS_MISC = README README.extfs
# Scripts hat don't need adaptation to the local system # Scripts hat don't need adaptation to the local system
EXTFS_CONST = bpp rpm trpm u7z ucab EXTFS_CONST = bpp rpm trpm u7z ucab
# Scripts that need adaptation to the local system - source files # Scripts that need adaptation to the local system - source files
EXTFS_IN = \ EXTFS_IN = \
a.in \ a+.in \
apt.in \ apt+.in \
audio.in \ audio.in \
deb.in \ deb.in \
deba.in \ deba.in \
debd.in \ debd.in \
dpkg.in \ dpkg+.in \
iso9660.in \ iso9660.in \
hp48.in \ hp48+.in \
lslR.in \ lslR.in \
mailfs.in \ mailfs.in \
patchfs.in \ patchfs.in \
rpms.in \ rpms+.in \
s3.in \ s3+.in \
uace.in \ uace.in \
ualz.in \ ualz.in \
uar.in \ uar.in \
@ -38,20 +38,20 @@ EXTFS_IN = \
# Scripts that need adaptation to the local system - files to install # Scripts that need adaptation to the local system - files to install
EXTFS_OUT = \ EXTFS_OUT = \
a \ a+ \
apt \ apt+ \
audio \ audio \
deb \ deb \
deba \ deba \
debd \ debd \
dpkg \ dpkg+ \
iso9660 \ iso9660 \
hp48 \ hp48+ \
lslR \ lslR \
mailfs \ mailfs \
patchfs \ patchfs \
rpms \ rpms+ \
s3 \ s3+ \
uace \ uace \
ualz \ ualz \
uar \ uar \
@ -68,7 +68,7 @@ if ENABLE_VFS
extfs_DATA = $(EXTFS_MISC) extfs_DATA = $(EXTFS_MISC)
extfs_SCRIPTS = $(EXTFS_CONST) $(EXTFS_OUT) extfs_SCRIPTS = $(EXTFS_CONST) $(EXTFS_OUT)
extfsconfdir = $(sysconfdir)/@PACKAGE@/extfs extfsconfdir = $(sysconfdir)/@PACKAGE@
extfsconf_DATA = $(EXTFSCONFFILES) extfsconf_DATA = $(EXTFSCONFFILES)
endif endif

View File

@ -1,7 +1,7 @@
# Each external VFS type must be registered here if you want to use it # Each external VFS type must be registered in extfs.d directory if you want to use it.
# Trailing colon means that the filesystem is not tied to a certain file # Trailing plus means that the filesystem is not tied to a certain file.
# Popular pc archivers # Popular PC archivers
uzip uzip
uzoo uzoo
ulha ulha
@ -9,7 +9,7 @@ urar
uha uha
u7z u7z
ualz ualz
# For arj usage you need a special patch to unarj (see unarj.diff) # FIXME: for arj usage you need a special patch to unarj (see unarj.diff)
uarj uarj
uarc uarc
uace uace
@ -24,14 +24,14 @@ uar
rpm rpm
deb deb
# a: - mtools filesystem # a+ - mtools filesystem
a: a+
# For browsing lslR listings (found on many ftp sites) # For browsing lslR listings (found on many ftp sites)
lslR lslR
# Hewlett Packard calculator # Hewlett Packard calculator
hp48: hp48+
# Commodore 64/128 d64/D64 files # Commodore 64/128 d64/D64 files
uc1541 uc1541
@ -43,18 +43,18 @@ patchfs
mailfs mailfs
# List all installed RPM packages on the system # List all installed RPM packages on the system
rpms: rpms+
trpm trpm
# dpkg frontend # dpkg frontend
dpkg: dpkg+
debd debd
# apt frontend # apt frontend
apt: apt+
deba deba
# Simple filesystem for audio cdroms. Use /dev/cdrom#audio (or /#audio). # Simple filesystem for audio cdroms. Use /dev/cdrom#audio (or /#audio)
audio audio
# Package of Bad Penguin (an Italian GNU/Linux distribution) # Package of Bad Penguin (an Italian GNU/Linux distribution)
@ -64,5 +64,4 @@ bpp
iso9660 iso9660
# Amazon S3 # Amazon S3
s3: s3+

View File

@ -344,10 +344,10 @@ static int sfs_init (struct vfs_class *me)
(void) me; (void) me;
mc_sfsini = concat_dir_and_file (mc_home, "extfs" PATH_SEP_STR "sfs.ini"); mc_sfsini = g_build_filename (mc_home, "sfs.ini", (char *) NULL);
cfg = fopen (mc_sfsini, "r"); cfg = fopen (mc_sfsini, "r");
if (!cfg){ if (cfg == NULL) {
fprintf (stderr, _("Warning: file %s not found\n"), mc_sfsini); fprintf (stderr, _("Warning: file %s not found\n"), mc_sfsini);
g_free (mc_sfsini); g_free (mc_sfsini);
return 0; return 0;