Dr. Werner Fink 2012-05-09 10:15:47 +00:00 committed by Git OBS Bridge
commit 52de6de0d1
6 changed files with 544 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

373
avfs-1.0.0.dif Normal file
View File

@ -0,0 +1,373 @@
--- configure
+++ configure 2012-05-08 14:31:28.342565884 +0000
@@ -23705,7 +23705,7 @@ if test "${ac_cv_lib_xml_xmlCreatePushPa
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lxml $LIBS"
+LIBS="-lxml2 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -24294,7 +24294,7 @@ if test -z "`echo "$LIBS"|grep pthread`"
LIBS="$LIBS -pthread"
fi
-moduledir='${libdir}/avfs'
+moduledir='${libexecdir}/avfs'
--- extfs/extfs.ini
+++ extfs/extfs.ini 2012-05-09 08:33:29.650565308 +0000
@@ -10,6 +10,8 @@ ulha .lha .lhz
uha
# For arj usage you need special patch to unarj
uarj .arj
+ext-uzip
+ext-urar
# ar is used for static libraries
# uar .a
--- extfs/ftplist
+++ extfs/ftplist 2012-05-09 07:07:47.490354977 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
# This fs implements a simple database of your favourite ftp servers.
# The `archive' is a text file containing a list of ftp URL's one per line
# like this (followed optionaly by name under which the link will be
--- extfs/u7z.in
+++ extfs/u7z.in 2012-05-09 07:12:11.246444915 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
#
# u7z - 7zip file archive Virtual File System for Midnight Commander ( ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/ )
#
@@ -76,7 +76,7 @@ mc7zfs_copyin ()
pwd=`pwd`
# Create a directory and copy in it the tmp file with the random name
dir="$3".dir
- mkdir "$dir"
+ mkdir "$dir" || exit 1
cd "$dir"
mv "$1" .
arname=`basename "$1"`
@@ -84,7 +84,7 @@ mc7zfs_copyin ()
# if file is to be written upper in the archive tree, make fake dir
if test "$di" != "${2##*/}" ; then
# echo asdsad 1>&2
- mkdir -p "$di"
+ mkdir -p "$di" || exit 1
fi
# pwd > /tmp/cdir
# echo "$arname $2" > /tmp/ters
@@ -121,11 +121,11 @@ mc7zfs_mkdir ()
pwd=`pwd`
# Create a directory and create in it a tmp directory with the good name
dir=tmpdir.${RANDOM}
- mkdir $dir
+ mkdir $dir || exit 1
cd $dir
mv "$1" .
arname=`basename "$1"`
- mkdir -p "$2"
+ mkdir -p "$2" || exit 1
# 7z cannot create an empty directory
# touch "$2"/.emptydir
$SEVENZ a -r "$arname" "$2" >/dev/null 2>/dev/null
--- extfs/uarj.in
+++ extfs/uarj.in 2012-05-09 07:09:32.574065543 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
#
# Written by Viatcheslav Odintsov (2:5020/181)
# (C) 2002 ARJ Software Russia.
--- extfs/ucpio
+++ extfs/ucpio 2012-05-09 07:09:57.618565568 +0000
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Written by Stas Maximov 1998 SVR4 (UnixWare)
# stmax@u213.srcc.msu.su
@@ -22,7 +22,7 @@ uni_cat ()
mccpiofs_list ()
# $1 is the archive name
{
- uni_cat "$1" | cpio -itv | /bin/awk '
+ uni_cat "$1" | cpio -itv | /usr/bin/awk '
{
if (substr($9,length($9),1) == ",")
{
--- extfs/uha.in
+++ extfs/uha.in 2012-05-09 07:10:24.826565466 +0000
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# It is the uhafs Valery Kornienkov vlk@st.simbirsk.su 2:5051/30@fidonet
# ver 0.1 Thu Apr 6 12:05:08 2000
--- extfs/uimg
+++ extfs/uimg 2012-05-08 11:52:30.094065735 +0000
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# This is a parser for DOS/Atari disk images in Midnight Commander. You
# need the GPL mtools program (version >= 3.9.9) written by Emmet P. Gray,
--- extfs/urar.in
+++ extfs/urar.in 2012-05-09 08:52:50.774565342 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
#
# Written by andrey joukov
# (C) 1996 2:5020/337.13@fidonet.org
@@ -54,12 +54,12 @@ mcrarfs_copyin ()
# preserve pwd. It is clean, but is it necessary?
pwd=`pwd`
# Create a directory and copy in it the tmp file with the good name
- mkdir "$3.dir"
+ mkdir "$3.dir" || exit 1
cd "$3.dir"
di="${2%/*}"
# if file is to be written upper in the archive tree, make fake dir
if test x"$di" != x"${2##*/}" ; then
- mkdir -p "$di"
+ mkdir -p "$di" || exit 1
fi
cp -fp "$3" "$3.dir/$2"
$RAR a "$1" "$2" >/dev/null
@@ -79,7 +79,7 @@ mcrarfs_mkdir ()
# Create a directory and create in it a tmp directory with the good name
dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-urar.XXXXXX"` || exit 1
cd "$dir"
- mkdir -p "$2"
+ mkdir -p "$2" || exit 1
# rar cannot create an empty directory
touch "$2"/.rarfs
$RAR a -r "$1" "$2" >/dev/null
--- fuse/Makefile.in
+++ fuse/Makefile.in 2012-05-09 07:37:43.666565745 +0000
@@ -53,7 +53,7 @@ PROGRAMS = $(bin_PROGRAMS)
am__avfsd_SOURCES_DIST = avfsd.c
@INSTALL_FUSE_TRUE@am_avfsd_OBJECTS = avfsd.$(OBJEXT)
avfsd_OBJECTS = $(am_avfsd_OBJECTS)
-@INSTALL_FUSE_TRUE@avfsd_DEPENDENCIES = ../lib/libavfs_static.la
+@INSTALL_FUSE_TRUE@avfsd_DEPENDENCIES = ../lib/libavfs.la
avfsd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(avfsd_LDFLAGS) \
$(LDFLAGS) -o $@
@@ -228,7 +228,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@INSTALL_FUSE_TRUE@AM_CFLAGS = -I$(top_srcdir)/include @CFLAGS@ @CPPFLAGS@
@INSTALL_FUSE_TRUE@avfsd_LDFLAGS = @LDFLAGS@ @LIBS@ @FUSELIBS@
-@INSTALL_FUSE_TRUE@avfsd_LDADD = ../lib/libavfs_static.la
+@INSTALL_FUSE_TRUE@avfsd_LDADD = ../lib/libavfs.la
@INSTALL_FUSE_TRUE@avfsd_SOURCES = avfsd.c
all: all-am
--- fuse/avfsd.c
+++ fuse/avfsd.c 2012-05-09 07:02:42.506565094 +0000
@@ -314,5 +314,3 @@ int main(int argc, char *argv[])
fuse_main(argc, argv, &avfsd_oper, NULL);
return 0;
}
-
-
--- libneon/hip_xml.c
+++ libneon/hip_xml.c 2012-05-08 10:55:29.068171004 +0000
@@ -47,7 +47,7 @@ typedef XML_Char hip_xml_char;
# ifdef HAVE_LIBXML
/******** libxml **********/
-# include <parser.h>
+# include <libxml/parser.h>
typedef xmlChar hip_xml_char;
# else /* not HAVE_LIBXML */
--- modules/Makefile.in
+++ modules/Makefile.in 2012-05-09 08:39:46.266065312 +0000
@@ -34,6 +34,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@USE_LIBLZMA_TRUE@am__append_1 = uxz.c
+@USE_LIBLZMA_FALSE@am__append_1 = uxze.c
@BUILD_DAVSUPPORT_TRUE@am__append_2 = dav.c
@BUILD_DAVSUPPORT_TRUE@am__append_3 = dav.c dav_ls.c
subdir = modules
@@ -57,10 +58,11 @@ am__libmodules_la_SOURCES_DIST = volatil
ubz2.c ugzip.c ubzip2.c gz.c bz2.c uz.c uar.c utar.c urar.c \
uzip.c floppy.c extfs.c ucftp.c uxze.c uxz.c dav.c dav_ls.c
@USE_LIBLZMA_TRUE@am__objects_1 = uxz.lo
+@USE_LIBLZMA_FALSE@am__objects_1 = uxze.lo
@BUILD_DAVSUPPORT_TRUE@am__objects_2 = dav.lo
am__objects_3 = volatile.lo rsh.lo http.lo ftp.lo ugz.lo ubz2.lo \
ugzip.lo ubzip2.lo gz.lo bz2.lo uz.lo uar.lo utar.lo urar.lo \
- uzip.lo floppy.lo extfs.lo ucftp.lo uxze.lo $(am__objects_1) \
+ uzip.lo floppy.lo extfs.lo ucftp.lo $(am__objects_1) \
$(am__objects_2)
@BUILD_DAVSUPPORT_TRUE@am__objects_4 = dav.lo dav_ls.lo
am_libmodules_la_OBJECTS = $(am__objects_3) $(am__objects_4)
@@ -246,7 +248,7 @@ EXTRA_DIST = make_initmod
libmodules_la_LDFLAGS = -module
modules = volatile.c rsh.c http.c ftp.c ugz.c ubz2.c ugzip.c ubzip2.c \
gz.c bz2.c uz.c uar.c utar.c urar.c uzip.c floppy.c extfs.c \
- ucftp.c uxze.c $(am__append_1) $(am__append_2)
+ ucftp.c $(am__append_1) $(am__append_2)
libmodules_la_SOURCES = $(modules) $(am__append_3)
nodist_libmodules_la_SOURCES = \
mod_static.c
--- modules/ubz2.c
+++ modules/ubz2.c 2012-05-09 08:05:23.566065867 +0000
@@ -231,13 +231,14 @@ int av_init_module_ubz2(struct vmodule *
{
int res;
struct avfs *avfs;
- struct ext_info ubz_exts[5];
+ struct ext_info ubz_exts[6];
- ubz_exts[0].from = ".bz2", ubz_exts[0].to = NULL;
- ubz_exts[1].from = ".bz", ubz_exts[1].to = NULL;
- ubz_exts[2].from = ".tbz2", ubz_exts[2].to = ".tar";
- ubz_exts[3].from = ".tbz", ubz_exts[3].to = ".tar";
- ubz_exts[4].from = NULL;
+ ubz_exts[0].from = ".tar.bz2", ubz_exts[0].to = ".tar";
+ ubz_exts[1].from = ".bz2", ubz_exts[1].to = NULL;
+ ubz_exts[2].from = ".bz", ubz_exts[2].to = NULL;
+ ubz_exts[3].from = ".tbz2", ubz_exts[3].to = ".tar";
+ ubz_exts[4].from = ".tbz", ubz_exts[4].to = ".tar";
+ ubz_exts[5].from = NULL;
res = av_new_avfs("ubz2", ubz_exts, AV_VER, AVF_NOLOCK, module, &avfs);
if(res < 0)
--- modules/urar.c
+++ modules/urar.c 2012-05-08 11:47:51.434565584 +0000
@@ -587,7 +587,7 @@ static int do_unrar(ventry *ve, struct a
if(res < 0)
return res;
- fd = open(tmpfile, O_RDWR | O_CREAT | O_TRUNC);
+ fd = open(tmpfile, O_RDWR | O_CREAT | O_TRUNC, 0644);
if(fd == -1) {
res = -errno;
av_log(AVLOG_ERROR, "RAR: Could not open %s: %s", tmpfile,
--- modules/uxz.c
+++ modules/uxz.c 2012-05-09 08:34:00.010065370 +0000
@@ -231,11 +231,13 @@ int av_init_module_uxz(struct vmodule *m
{
int res;
struct avfs *avfs;
- struct ext_info uxz_exts[3];
+ struct ext_info uxz_exts[5];
- uxz_exts[0].from = ".xz", uxz_exts[0].to = NULL;
+ uxz_exts[0].from = ".tar.xz", uxz_exts[0].to = ".tar";
uxz_exts[1].from = ".txz", uxz_exts[1].to = ".tar";
- uxz_exts[2].from = NULL;
+ uxz_exts[2].from = ".xz", uxz_exts[2].to = NULL;
+ uxz_exts[3].from = ".lzma", uxz_exts[3].to = NULL;
+ uxz_exts[4].from = NULL;
res = av_new_avfs("uxz", uxz_exts, AV_VER, AVF_NOLOCK, module, &avfs);
if(res < 0)
--- modules/uxze.c
+++ modules/uxze.c 2012-05-09 08:51:32.922065346 +0000
@@ -18,7 +18,7 @@ int av_init_module_uxze(struct vmodule *
struct avfs *avfs;
const char *uxze_args[3];
const char *xze_args[2];
- struct ext_info uxze_exts[2];
+ struct ext_info uxze_exts[5];
uxze_args[0] = "xz";
uxze_args[1] = "-d";
@@ -27,8 +27,11 @@ int av_init_module_uxze(struct vmodule *
xze_args[0] = "xz";
xze_args[1] = NULL;
- uxze_exts[0].from = ".lzma", uxze_exts[0].to = NULL;
- uxze_exts[1].from = NULL;
+ uxze_exts[0].from = ".tar.xz", uxze_exts[0].to = ".tar";
+ uxze_exts[1].from = ".txz", uxze_exts[1].to = ".tar";
+ uxze_exts[2].from = ".xz", uxze_exts[2].to = NULL;
+ uxze_exts[3].from = ".lzma", uxze_exts[3].to = NULL;
+ uxze_exts[4].from = NULL;
return av_init_filt(module, AV_VER, "uxze", uxze_args, xze_args,
uxze_exts, &avfs);
--- scripts/mountavfs
+++ scripts/mountavfs 2012-05-09 09:29:19.258565511 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
# mountavfs -- program to mount avfs file system
# and load avfsd daemon.
# companion program to umountavfs
@@ -14,7 +14,7 @@ else
MntDir=${HOME}/.avfs
fi
-grep -q "avfsd ${MntDir}" /proc/mounts || {
+grep -qE "avfsd ${MntDir}" /proc/mounts || {
if [ ! -e "$MntDir" ]; then
mkdir -p "$MntDir"
fi
@@ -24,6 +24,7 @@ grep -q "avfsd ${MntDir}" /proc/mounts |
fi
echo Mounting AVFS on $MntDir...
avfsd "$MntDir"
- echo "1" >"$MntDir/#avfsstat/symlink_rewrite"
+ while test ! -e "$MntDir/#avfsstat/symlink_rewrite"
+ do sleep 0.5 ; done
+ echo "1" >| "$MntDir/#avfsstat/symlink_rewrite"
}
-
--- scripts/umountavfs
+++ scripts/umountavfs 2012-05-09 09:26:37.134565350 +0000
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
# umountavfs -- program to unmount avfs file system
# and unload avfsd daemon.
# companion program to mountavfs
@@ -14,8 +14,11 @@ else
MntDir="${HOME}/.avfs"
fi
-grep -q "avfsd ${MntDir}" /proc/mounts && {
+grep -qE "${MntDir}.*avfsd" /proc/mounts && {
echo unMounting AVFS on $MntDir...
- fusermount -u "$MntDir"
+ if type -p fusermount > /dev/null 2>&1 ; then
+ fusermount -u -z "$MntDir"
+ else
+ umount -l "$MntDir"
+ fi
}
-
--- src/sysdeps.c
+++ src/sysdeps.c 2012-05-08 11:54:50.286065462 +0000
@@ -209,7 +209,7 @@ void av_log(int type, const char *format
va_end(ap);
if(logfile == NULL)
- syslog(LOG_INFO, buf);
+ syslog(LOG_INFO, "%s", buf);
else
filelog(buf);
AV_UNLOCK(loglock);
--- src/xzread.c
+++ src/xzread.c 2012-05-09 08:49:03.974065380 +0000
@@ -20,7 +20,7 @@
#define INBUFSIZE 16384
#define OUTBUFSIZE 32768
-#define INITIAL_MEMLIMIT ( 25 * 1024 * 1024 )
+#define INITIAL_MEMLIMIT (100<<20)
struct xzstreamcache {
int id;

3
avfs-1.0.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9305146b8693d0c9ad662682eb2009ecc1342a4254b0984e9c597776d2aaf0d9
size 678756

5
avfs.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Tue May 8 12:15:54 UTC 2012 - werner@suse.de
- First initial package for mounting tar and other bells and whistles

139
avfs.spec Normal file
View File

@ -0,0 +1,139 @@
#
# spec file for package avfs
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: avfs
Version: 1.0.0
Release: 0
Summary: AVFS - A Virtual File System
Group: Productivity/Archiving/Compression
License: LGPL-2.1+
Url: http://avf.sourceforge.net/
BuildRequires: fuse-devel
BuildRequires: help2man
BuildRequires: libbz2-devel
BuildRequires: libexpat-devel
BuildRequires: libext2fs-devel
BuildRequires: libneon-devel
BuildRequires: libopenssl-devel
BuildRequires: libxml2-devel
BuildRequires: pkg-config
BuildRequires: xz-devel
Source: avfs-1.0.0.tar.bz2
Patch: avfs-1.0.0.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
AVFS is a system, which enables all programs to look inside archived or
compressed files, or access remote files without recompiling the programs
or changing the kernel.
%package devel
Summary: AVFS - the development part
Group: Development/Libraries/C and C++
Requires: libavfs0
%description devel
This package includes the development file for the package avfs.
AVFS is a system, which enables all programs to look inside archived or
compressed files, or access remote files without recompiling the programs
or changing the kernel.
%package -n libavfs0
Summary: AVFS - the shared library
Group: System/Libraries
%description -n libavfs0
This package includes the runtime shared library for the package avfs.
AVFS is a system, which enables all programs to look inside archived or
compressed files, or access remote files without recompiling the programs
or changing the kernel.
%prep
%setup -q
%patch
%build
%global optflags %{optflags} -D_REENTRANT -pipe
%configure \
--disable-avfscoda \
--enable-library \
--enable-fuse \
--disable-static \
--enable-shared \
--with-system-zlib \
--with-system-bzlib \
--with-gnu-ld \
--with-pic \
--with-ssl \
--with-xz
make %{?_smp_mflags}
%install
%makeinstall
pushd %{buildroot}/%{_libexecdir}/avfs/extfs/
mv uzip ext-uzip
mv urar ext-urar
popd
mkdir -p %{buildroot}/%{_mandir}/man1/
pushd %{buildroot}/%{_mandir}/man1/
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} \
PATH=%{buildroot}/%{_bindir}:$PATH \
help2man -s 1 -N --no-discard-stderr avfsd | \
sed 's/^FUSE \\- .*/AVFS - A Virtual File System/' > \
avfsd.1
popd
rm -vf %{buildroot}/%{_libdir}/libavfs.la
%clean
rm -rf %{buildroot}
%post -n libavfs0 -p /sbin/ldconfig
%postun -n libavfs0 -p /sbin/ldconfig
%files
%defattr(-,root,root,0755)
%doc ChangeLog README COPYING NEWS TODO
%doc doc/api-overview
%doc doc/background
%doc doc/FORMAT
%doc doc/README.avfs-fuse
%{_bindir}/avfsd
%{_bindir}/davpass
%{_bindir}/ftppass
%{_bindir}/mountavfs
%{_bindir}/umountavfs
%dir %{_libexecdir}/avfs
%dir %{_libexecdir}/avfs/extfs
%{_libexecdir}/avfs/extfs/*
%doc /%{_mandir}/man1/avfsd.1*
%files devel
%defattr(-,root,root,0755)
%{_bindir}/avfs-config
%{_includedir}/avfs.h
%{_includedir}/virtual.h
%{_libdir}/libavfs.so
%files -n libavfs0
%defattr(-,root,root,0755)
%{_libdir}/libavfs.so.0
%{_libdir}/libavfs.so.0.0.2
%changelog