@ -0,0 +1,3 @@ | |||
Vreixo Formoso | |||
Mario Danic | |||
Thomas Schmitt |
@ -0,0 +1,280 @@ | |||
GNU GENERAL PUBLIC LICENSE | |||
Version 2, June 1991 | |||
Copyright (C) 1989, 1991 Free Software Foundation, Inc. | |||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
Everyone is permitted to copy and distribute verbatim copies | |||
of this license document, but changing it is not allowed. | |||
Preamble | |||
The licenses for most software are designed to take away your | |||
freedom to share and change it. By contrast, the GNU General Public | |||
License is intended to guarantee your freedom to share and change free | |||
software--to make sure the software is free for all its users. This | |||
General Public License applies to most of the Free Software | |||
Foundation's software and to any other program whose authors commit to | |||
using it. (Some other Free Software Foundation software is covered by | |||
the GNU Library General Public License instead.) You can apply it to | |||
your programs, too. | |||
When we speak of free software, we are referring to freedom, not | |||
price. Our General Public Licenses are designed to make sure that you | |||
have the freedom to distribute copies of free software (and charge for | |||
this service if you wish), that you receive source code or can get it | |||
if you want it, that you can change the software or use pieces of it | |||
in new free programs; and that you know you can do these things. | |||
To protect your rights, we need to make restrictions that forbid | |||
anyone to deny you these rights or to ask you to surrender the rights. | |||
These restrictions translate to certain responsibilities for you if you | |||
distribute copies of the software, or if you modify it. | |||
For example, if you distribute copies of such a program, whether | |||
gratis or for a fee, you must give the recipients all the rights that | |||
you have. You must make sure that they, too, receive or can get the | |||
source code. And you must show them these terms so they know their | |||
rights. | |||
We protect your rights with two steps: (1) copyright the software, and | |||
(2) offer you this license which gives you legal permission to copy, | |||
distribute and/or modify the software. | |||
Also, for each author's protection and ours, we want to make certain | |||
that everyone understands that there is no warranty for this free | |||
software. If the software is modified by someone else and passed on, we | |||
want its recipients to know that what they have is not the original, so | |||
that any problems introduced by others will not reflect on the original | |||
authors' reputations. | |||
Finally, any free program is threatened constantly by software | |||
patents. We wish to avoid the danger that redistributors of a free | |||
program will individually obtain patent licenses, in effect making the | |||
program proprietary. To prevent this, we have made it clear that any | |||
patent must be licensed for everyone's free use or not licensed at all. | |||
The precise terms and conditions for copying, distribution and | |||
modification follow. | |||
GNU GENERAL PUBLIC LICENSE | |||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |||
0. This License applies to any program or other work which contains | |||
a notice placed by the copyright holder saying it may be distributed | |||
under the terms of this General Public License. The "Program", below, | |||
refers to any such program or work, and a "work based on the Program" | |||
means either the Program or any derivative work under copyright law: | |||
that is to say, a work containing the Program or a portion of it, | |||
either verbatim or with modifications and/or translated into another | |||
language. (Hereinafter, translation is included without limitation in | |||
the term "modification".) Each licensee is addressed as "you". | |||
Activities other than copying, distribution and modification are not | |||
covered by this License; they are outside its scope. The act of | |||
running the Program is not restricted, and the output from the Program | |||
is covered only if its contents constitute a work based on the | |||
Program (independent of having been made by running the Program). | |||
Whether that is true depends on what the Program does. | |||
1. You may copy and distribute verbatim copies of the Program's | |||
source code as you receive it, in any medium, provided that you | |||
conspicuously and appropriately publish on each copy an appropriate | |||
copyright notice and disclaimer of warranty; keep intact all the | |||
notices that refer to this License and to the absence of any warranty; | |||
and give any other recipients of the Program a copy of this License | |||
along with the Program. | |||
You may charge a fee for the physical act of transferring a copy, and | |||
you may at your option offer warranty protection in exchange for a fee. | |||
2. You may modify your copy or copies of the Program or any portion | |||
of it, thus forming a work based on the Program, and copy and | |||
distribute such modifications or work under the terms of Section 1 | |||
above, provided that you also meet all of these conditions: | |||
a) You must cause the modified files to carry prominent notices | |||
stating that you changed the files and the date of any change. | |||
b) You must cause any work that you distribute or publish, that in | |||
whole or in part contains or is derived from the Program or any | |||
part thereof, to be licensed as a whole at no charge to all third | |||
parties under the terms of this License. | |||
c) If the modified program normally reads commands interactively | |||
when run, you must cause it, when started running for such | |||
interactive use in the most ordinary way, to print or display an | |||
announcement including an appropriate copyright notice and a | |||
notice that there is no warranty (or else, saying that you provide | |||
a warranty) and that users may redistribute the program under | |||
these conditions, and telling the user how to view a copy of this | |||
License. (Exception: if the Program itself is interactive but | |||
does not normally print such an announcement, your work based on | |||
the Program is not required to print an announcement.) | |||
These requirements apply to the modified work as a whole. If | |||
identifiable sections of that work are not derived from the Program, | |||
and can be reasonably considered independent and separate works in | |||
themselves, then this License, and its terms, do not apply to those | |||
sections when you distribute them as separate works. But when you | |||
distribute the same sections as part of a whole which is a work based | |||
on the Program, the distribution of the whole must be on the terms of | |||
this License, whose permissions for other licensees extend to the | |||
entire whole, and thus to each and every part regardless of who wrote it. | |||
Thus, it is not the intent of this section to claim rights or contest | |||
your rights to work written entirely by you; rather, the intent is to | |||
exercise the right to control the distribution of derivative or | |||
collective works based on the Program. | |||
In addition, mere aggregation of another work not based on the Program | |||
with the Program (or with a work based on the Program) on a volume of | |||
a storage or distribution medium does not bring the other work under | |||
the scope of this License. | |||
3. You may copy and distribute the Program (or a work based on it, | |||
under Section 2) in object code or executable form under the terms of | |||
Sections 1 and 2 above provided that you also do one of the following: | |||
a) Accompany it with the complete corresponding machine-readable | |||
source code, which must be distributed under the terms of Sections | |||
1 and 2 above on a medium customarily used for software interchange; or, | |||
b) Accompany it with a written offer, valid for at least three | |||
years, to give any third party, for a charge no more than your | |||
cost of physically performing source distribution, a complete | |||
machine-readable copy of the corresponding source code, to be | |||
distributed under the terms of Sections 1 and 2 above on a medium | |||
customarily used for software interchange; or, | |||
c) Accompany it with the information you received as to the offer | |||
to distribute corresponding source code. (This alternative is | |||
allowed only for noncommercial distribution and only if you | |||
received the program in object code or executable form with such | |||
an offer, in accord with Subsection b above.) | |||
The source code for a work means the preferred form of the work for | |||
making modifications to it. For an executable work, complete source | |||
code means all the source code for all modules it contains, plus any | |||
associated interface definition files, plus the scripts used to | |||
control compilation and installation of the executable. However, as a | |||
special exception, the source code distributed need not include | |||
anything that is normally distributed (in either source or binary | |||
form) with the major components (compiler, kernel, and so on) of the | |||
operating system on which the executable runs, unless that component | |||
itself accompanies the executable. | |||
If distribution of executable or object code is made by offering | |||
access to copy from a designated place, then offering equivalent | |||
access to copy the source code from the same place counts as | |||
distribution of the source code, even though third parties are not | |||
compelled to copy the source along with the object code. | |||
4. You may not copy, modify, sublicense, or distribute the Program | |||
except as expressly provided under this License. Any attempt | |||
otherwise to copy, modify, sublicense or distribute the Program is | |||
void, and will automatically terminate your rights under this License. | |||
However, parties who have received copies, or rights, from you under | |||
this License will not have their licenses terminated so long as such | |||
parties remain in full compliance. | |||
5. You are not required to accept this License, since you have not | |||
signed it. However, nothing else grants you permission to modify or | |||
distribute the Program or its derivative works. These actions are | |||
prohibited by law if you do not accept this License. Therefore, by | |||
modifying or distributing the Program (or any work based on the | |||
Program), you indicate your acceptance of this License to do so, and | |||
all its terms and conditions for copying, distributing or modifying | |||
the Program or works based on it. | |||
6. Each time you redistribute the Program (or any work based on the | |||
Program), the recipient automatically receives a license from the | |||
original licensor to copy, distribute or modify the Program subject to | |||
these terms and conditions. You may not impose any further | |||
restrictions on the recipients' exercise of the rights granted herein. | |||
You are not responsible for enforcing compliance by third parties to | |||
this License. | |||
7. If, as a consequence of a court judgment or allegation of patent | |||
infringement or for any other reason (not limited to patent issues), | |||
conditions are imposed on you (whether by court order, agreement or | |||
otherwise) that contradict the conditions of this License, they do not | |||
excuse you from the conditions of this License. If you cannot | |||
distribute so as to satisfy simultaneously your obligations under this | |||
License and any other pertinent obligations, then as a consequence you | |||
may not distribute the Program at all. For example, if a patent | |||
license would not permit royalty-free redistribution of the Program by | |||
all those who receive copies directly or indirectly through you, then | |||
the only way you could satisfy both it and this License would be to | |||
refrain entirely from distribution of the Program. | |||
If any portion of this section is held invalid or unenforceable under | |||
any particular circumstance, the balance of the section is intended to | |||
apply and the section as a whole is intended to apply in other | |||
circumstances. | |||
It is not the purpose of this section to induce you to infringe any | |||
patents or other property right claims or to contest validity of any | |||
such claims; this section has the sole purpose of protecting the | |||
integrity of the free software distribution system, which is | |||
implemented by public license practices. Many people have made | |||
generous contributions to the wide range of software distributed | |||
through that system in reliance on consistent application of that | |||
system; it is up to the author/donor to decide if he or she is willing | |||
to distribute software through any other system and a licensee cannot | |||
impose that choice. | |||
This section is intended to make thoroughly clear what is believed to | |||
be a consequence of the rest of this License. | |||
8. If the distribution and/or use of the Program is restricted in | |||
certain countries either by patents or by copyrighted interfaces, the | |||
original copyright holder who places the Program under this License | |||
may add an explicit geographical distribution limitation excluding | |||
those countries, so that distribution is permitted only in or among | |||
countries not thus excluded. In such case, this License incorporates | |||
the limitation as if written in the body of this License. | |||
9. The Free Software Foundation may publish revised and/or new versions | |||
of the General Public License from time to time. Such new versions will | |||
be similar in spirit to the present version, but may differ in detail to | |||
address new problems or concerns. | |||
Each version is given a distinguishing version number. If the Program | |||
specifies a version number of this License which applies to it and "any | |||
later version", you have the option of following the terms and conditions | |||
either of that version or of any later version published by the Free | |||
Software Foundation. If the Program does not specify a version number of | |||
this License, you may choose any version ever published by the Free Software | |||
Foundation. | |||
10. If you wish to incorporate parts of the Program into other free | |||
programs whose distribution conditions are different, write to the author | |||
to ask for permission. For software which is copyrighted by the Free | |||
Software Foundation, write to the Free Software Foundation; we sometimes | |||
make exceptions for this. Our decision will be guided by the two goals | |||
of preserving the free status of all derivatives of our free software and | |||
of promoting the sharing and reuse of software generally. | |||
NO WARRANTY | |||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | |||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | |||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | |||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED | |||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS | |||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE | |||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, | |||
REPAIR OR CORRECTION. | |||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | |||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | |||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | |||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING | |||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED | |||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY | |||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER | |||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE | |||
POSSIBILITY OF SUCH DAMAGES. | |||
END OF TERMS AND CONDITIONS |
@ -0,0 +1,19 @@ | |||
Vreixo Formoso <metalpain2002@yahoo.es>, | |||
Mario Danic <mario.danic@gmail.com>, | |||
Thomas Schmitt <scdbackup@gmx.net> | |||
Copyright (C) 2007-2008 Vreixo Formoso, Mario Danic, Thomas Schmitt | |||
This program is free software; you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation; either version 2 of the License, or | |||
(at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program; if not, write to the Free Software | |||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
@ -0,0 +1 @@ | |||
@ -0,0 +1,234 @@ | |||
Installation Instructions | |||
************************* | |||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, | |||
2006 Free Software Foundation, Inc. | |||
This file is free documentation; the Free Software Foundation gives | |||
unlimited permission to copy, distribute and modify it. | |||
Basic Installation | |||
================== | |||
Briefly, the shell commands `./configure; make; make install' should | |||
configure, build, and install this package. The following | |||
more-detailed instructions are generic; see the `README' file for | |||
instructions specific to this package. | |||
The `configure' shell script attempts to guess correct values for | |||
various system-dependent variables used during compilation. It uses | |||
those values to create a `Makefile' in each directory of the package. | |||
It may also create one or more `.h' files containing system-dependent | |||
definitions. Finally, it creates a shell script `config.status' that | |||
you can run in the future to recreate the current configuration, and a | |||
file `config.log' containing compiler output (useful mainly for | |||
debugging `configure'). | |||
It can also use an optional file (typically called `config.cache' | |||
and enabled with `--cache-file=config.cache' or simply `-C') that saves | |||
the results of its tests to speed up reconfiguring. Caching is | |||
disabled by default to prevent problems with accidental use of stale | |||
cache files. | |||
If you need to do unusual things to compile the package, please try | |||
to figure out how `configure' could check whether to do them, and mail | |||
diffs or instructions to the address given in the `README' so they can | |||
be considered for the next release. If you are using the cache, and at | |||
some point `config.cache' contains results you don't want to keep, you | |||
may remove or edit it. | |||
The file `configure.ac' (or `configure.in') is used to create | |||
`configure' by a program called `autoconf'. You need `configure.ac' if | |||
you want to change it or regenerate `configure' using a newer version | |||
of `autoconf'. | |||
The simplest way to compile this package is: | |||
1. `cd' to the directory containing the package's source code and type | |||
`./configure' to configure the package for your system. | |||
Running `configure' might take a while. While running, it prints | |||
some messages telling which features it is checking for. | |||
2. Type `make' to compile the package. | |||
3. Optionally, type `make check' to run any self-tests that come with | |||
the package. | |||
4. Type `make install' to install the programs and any data files and | |||
documentation. | |||
5. You can remove the program binaries and object files from the | |||
source code directory by typing `make clean'. To also remove the | |||
files that `configure' created (so you can compile the package for | |||
a different kind of computer), type `make distclean'. There is | |||
also a `make maintainer-clean' target, but that is intended mainly | |||
for the package's developers. If you use it, you may have to get | |||
all sorts of other programs in order to regenerate files that came | |||
with the distribution. | |||
Compilers and Options | |||
===================== | |||
Some systems require unusual options for compilation or linking that the | |||
`configure' script does not know about. Run `./configure --help' for | |||
details on some of the pertinent environment variables. | |||
You can give `configure' initial values for configuration parameters | |||
by setting variables in the command line or in the environment. Here | |||
is an example: | |||
./configure CC=c99 CFLAGS=-g LIBS=-lposix | |||
*Note Defining Variables::, for more details. | |||
Compiling For Multiple Architectures | |||
==================================== | |||
You can compile the package for more than one kind of computer at the | |||
same time, by placing the object files for each architecture in their | |||
own directory. To do this, you can use GNU `make'. `cd' to the | |||
directory where you want the object files and executables to go and run | |||
the `configure' script. `configure' automatically checks for the | |||
source code in the directory that `configure' is in and in `..'. | |||
With a non-GNU `make', it is safer to compile the package for one | |||
architecture at a time in the source code directory. After you have | |||
installed the package for one architecture, use `make distclean' before | |||
reconfiguring for another architecture. | |||
Installation Names | |||
================== | |||
By default, `make install' installs the package's commands under | |||
`/usr/local/bin', include files under `/usr/local/include', etc. You | |||
can specify an installation prefix other than `/usr/local' by giving | |||
`configure' the option `--prefix=PREFIX'. | |||
You can specify separate installation prefixes for | |||
architecture-specific files and architecture-independent files. If you | |||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses | |||
PREFIX as the prefix for installing programs and libraries. | |||
Documentation and other data files still use the regular prefix. | |||
In addition, if you use an unusual directory layout you can give | |||
options like `--bindir=DIR' to specify different values for particular | |||
kinds of files. Run `configure --help' for a list of the directories | |||
you can set and what kinds of files go in them. | |||
If the package supports it, you can cause programs to be installed | |||
with an extra prefix or suffix on their names by giving `configure' the | |||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. | |||
Optional Features | |||
================= | |||
Some packages pay attention to `--enable-FEATURE' options to | |||
`configure', where FEATURE indicates an optional part of the package. | |||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE | |||
is something like `gnu-as' or `x' (for the X Window System). The | |||
`README' should mention any `--enable-' and `--with-' options that the | |||
package recognizes. | |||
For packages that use the X Window System, `configure' can usually | |||
find the X include and library files automatically, but if it doesn't, | |||
you can use the `configure' options `--x-includes=DIR' and | |||
`--x-libraries=DIR' to specify their locations. | |||
Specifying the System Type | |||
========================== | |||
There may be some features `configure' cannot figure out automatically, | |||
but needs to determine by the type of machine the package will run on. | |||
Usually, assuming the package is built to be run on the _same_ | |||
architectures, `configure' can figure that out, but if it prints a | |||
message saying it cannot guess the machine type, give it the | |||
`--build=TYPE' option. TYPE can either be a short name for the system | |||
type, such as `sun4', or a canonical name which has the form: | |||
CPU-COMPANY-SYSTEM | |||
where SYSTEM can have one of these forms: | |||
OS KERNEL-OS | |||
See the file `config.sub' for the possible values of each field. If | |||
`config.sub' isn't included in this package, then this package doesn't | |||
need to know the machine type. | |||
If you are _building_ compiler tools for cross-compiling, you should | |||
use the option `--target=TYPE' to select the type of system they will | |||
produce code for. | |||
If you want to _use_ a cross compiler, that generates code for a | |||
platform different from the build platform, you should specify the | |||
"host" platform (i.e., that on which the generated programs will | |||
eventually be run) with `--host=TYPE'. | |||
Sharing Defaults | |||
================ | |||
If you want to set default values for `configure' scripts to share, you | |||
can create a site shell script called `config.site' that gives default | |||
values for variables like `CC', `cache_file', and `prefix'. | |||
`configure' looks for `PREFIX/share/config.site' if it exists, then | |||
`PREFIX/etc/config.site' if it exists. Or, you can set the | |||
`CONFIG_SITE' environment variable to the location of the site script. | |||
A warning: not all `configure' scripts look for a site script. | |||
Defining Variables | |||
================== | |||
Variables not defined in a site shell script can be set in the | |||
environment passed to `configure'. However, some packages may run | |||
configure again during the build, and the customized values of these | |||
variables may be lost. In order to avoid this problem, you should set | |||
them in the `configure' command line, using `VAR=value'. For example: | |||
./configure CC=/usr/local2/bin/gcc | |||
causes the specified `gcc' to be used as the C compiler (unless it is | |||
overridden in the site shell script). | |||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to | |||
an Autoconf bug. Until the bug is fixed you can use this workaround: | |||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash | |||
`configure' Invocation | |||
====================== | |||
`configure' recognizes the following options to control how it operates. | |||
`--help' | |||
`-h' | |||
Print a summary of the options to `configure', and exit. | |||
`--version' | |||
`-V' | |||
Print the version of Autoconf used to generate the `configure' | |||
script, and exit. | |||
`--cache-file=FILE' | |||
Enable the cache: use and save the results of the tests in FILE, | |||
traditionally `config.cache'. FILE defaults to `/dev/null' to | |||
disable caching. | |||
`--config-cache' | |||
`-C' | |||
Alias for `--cache-file=config.cache'. | |||
`--quiet' | |||
`--silent' | |||
`-q' | |||
Do not print messages saying which checks are being made. To | |||
suppress all normal output, redirect it to `/dev/null' (any error | |||
messages will still be shown). | |||
`--srcdir=DIR' | |||
Look for the package's source code in directory DIR. Usually | |||
`configure' can determine that directory automatically. | |||
`configure' also accepts some other, not widely useful, options. Run | |||
`configure --help' for more details. | |||
@ -0,0 +1,180 @@ | |||
pkgconfigdir=$(libdir)/pkgconfig | |||
libincludedir=$(includedir)/libisofs | |||
lib_LTLIBRARIES = libisofs/libisofs.la | |||
## ========================================================================= ## | |||
# Build libraries | |||
libisofs_libisofs_la_LDFLAGS = \ | |||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) | |||
libisofs_libisofs_la_SOURCES = \ | |||
libisofs/builder.h \ | |||
libisofs/builder.c \ | |||
libisofs/node.h \ | |||
libisofs/node.c \ | |||
libisofs/tree.h \ | |||
libisofs/tree.c \ | |||
libisofs/image.h \ | |||
libisofs/image.c \ | |||
libisofs/fsource.h \ | |||
libisofs/fsource.c \ | |||
libisofs/fs_local.c \ | |||
libisofs/fs_image.c \ | |||
libisofs/messages.h \ | |||
libisofs/messages.c \ | |||
libisofs/libiso_msgs.h \ | |||
libisofs/libiso_msgs.c \ | |||
libisofs/stream.h \ | |||
libisofs/stream.c \ | |||
libisofs/util.h \ | |||
libisofs/util.c \ | |||
libisofs/util_rbtree.c \ | |||
libisofs/util_htable.c \ | |||
libisofs/filesrc.h \ | |||
libisofs/filesrc.c \ | |||
libisofs/ecma119.h \ | |||
libisofs/ecma119.c \ | |||
libisofs/ecma119_tree.h \ | |||
libisofs/ecma119_tree.c \ | |||
libisofs/writer.h \ | |||
libisofs/buffer.h \ | |||
libisofs/buffer.c \ | |||
libisofs/rockridge.h \ | |||
libisofs/rockridge.c \ | |||
libisofs/rockridge_read.c \ | |||
libisofs/joliet.h \ | |||
libisofs/joliet.c \ | |||
libisofs/eltorito.h \ | |||
libisofs/eltorito.c \ | |||
libisofs/iso1999.h \ | |||
libisofs/iso1999.c \ | |||
libisofs/data_source.c | |||
libinclude_HEADERS = \ | |||
libisofs/libisofs.h | |||
## ========================================================================= ## | |||
## Build demo applications | |||
noinst_PROGRAMS = \ | |||
demo/lsl \ | |||
demo/cat \ | |||
demo/catbuffer \ | |||
demo/tree \ | |||
demo/ecma119tree \ | |||
demo/iso \ | |||
demo/isoread \ | |||
demo/isocat \ | |||
demo/isomodify \ | |||
demo/isoms \ | |||
demo/isogrow | |||
demo_lsl_CPPFLAGS = -Ilibisofs | |||
demo_lsl_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_lsl_SOURCES = demo/lsl.c | |||
demo_cat_CPPFLAGS = -Ilibisofs | |||
demo_cat_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_cat_SOURCES = demo/cat.c | |||
demo_catbuffer_CPPFLAGS = -Ilibisofs | |||
demo_catbuffer_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_catbuffer_SOURCES = demo/cat_buffer.c | |||
demo_tree_CPPFLAGS = -Ilibisofs | |||
demo_tree_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_tree_SOURCES = demo/tree.c | |||
demo_ecma119tree_CPPFLAGS = -Ilibisofs | |||
demo_ecma119tree_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_ecma119tree_SOURCES = demo/ecma119_tree.c | |||
demo_iso_CPPFLAGS = -Ilibisofs | |||
demo_iso_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_iso_SOURCES = demo/iso.c | |||
demo_isoread_CPPFLAGS = -Ilibisofs | |||
demo_isoread_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_isoread_SOURCES = demo/iso_read.c | |||
demo_isocat_CPPFLAGS = -Ilibisofs | |||
demo_isocat_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_isocat_SOURCES = demo/iso_cat.c | |||
demo_isomodify_CPPFLAGS = -Ilibisofs | |||
demo_isomodify_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_isomodify_SOURCES = demo/iso_modify.c | |||
demo_isoms_CPPFLAGS = -Ilibisofs | |||
demo_isoms_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) | |||
demo_isoms_SOURCES = demo/iso_ms.c | |||
demo_isogrow_CPPFLAGS = -Ilibisofs -Ilibburn | |||
demo_isogrow_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) -lburn | |||
demo_isogrow_SOURCES = demo/iso_grow.c | |||
## Build unit test | |||
check_PROGRAMS = \ | |||
test/test | |||
test_test_CPPFLAGS = -Ilibisofs | |||
test_test_LDADD = $(libisofs_libisofs_la_OBJECTS) $(THREAD_LIBS) -lcunit | |||
test_test_LDFLAGS = -L.. -lm | |||
test_test_SOURCES = \ | |||
test/test.h \ | |||
test/test.c \ | |||
test/test_node.c \ | |||
test/test_image.c \ | |||
test/test_tree.c \ | |||
test/test_util.c \ | |||
test/test_rockridge.c \ | |||
test/test_stream.c \ | |||
test/mocked_fsrc.h \ | |||
test/mocked_fsrc.c | |||
## ========================================================================= ## | |||
## Build documentation (You need Doxygen for this to work) | |||
docdir = $(DESTDIR)$(prefix)/share/doc/$(PACKAGE)-$(VERSION) | |||
doc: doc/html | |||
doc/html: doc/doxygen.conf | |||
$(RM) -r doc/html; \ | |||
doxygen doc/doxygen.conf; | |||
install-data-local: | |||
if [ -d doc/html ]; then \ | |||
$(mkinstalldirs) $(docdir)/html; \ | |||
$(INSTALL_DATA) doc/html/* $(docdir)/html; \ | |||
fi | |||
uninstall-local: | |||
rm -rf $(docdir) | |||
## ========================================================================= ## | |||
# Extra things | |||
nodist_pkgconfig_DATA = \ | |||
libisofs-1.pc | |||
EXTRA_DIST = \ | |||
libisofs-1.pc.in \ | |||
version.h.in \ | |||
doc/doxygen.conf.in \ | |||
doc/Tutorial \ | |||
README \ | |||
AUTHORS \ | |||
COPYRIGHT \ | |||
COPYING \ | |||
NEWS \ | |||
INSTALL \ | |||
TODO \ | |||
ChangeLog \ | |||
Roadmap | |||
@ -0,0 +1,20 @@ | |||
== unknown == | |||
Libisofs v0.6.4 | |||
=============== | |||
- | |||
== Fri Feb 22 2008 == | |||
Libisofs v0.6.2.1 | |||
================= | |||
- FIX: missing buffer.h in tarball | |||
== Thu Feb 14 2008 == | |||
Libisofs v0.6.2 | |||
================ | |||
- Initial release |
@ -0,0 +1,341 @@ | |||
------------------------------------------------------------------------------ | |||
libisofs | |||
------------------------------------------------------------------------------ | |||
Released under GPL (see COPYING file for details). | |||
Copyright (C) 2008 Vreixo Formoso, Mario Danic, Thomas Schmitt | |||
libisofs is part of the libburnia project (libburnia-project.org) | |||
------------------------------------------------------------------------------ | |||
libisofs is a library to create an ISO-9660 filesystem, and supports extensions | |||
like RockRidge or Joliet. It is also a full featured ISO-9660 editor, allowing | |||
you to modify an ISO image or multisession disc, including file addition and | |||
removal, change of file names and attributes, etc | |||
Features: | |||
--------- | |||
- Image creation | |||
- Creates ISO-9660 images from local files. | |||
- Support for RockRidge and Joliet extensions. | |||
- Support for ISO-9660:1999 (version 2) | |||
- Support for El-Torito bootable images. | |||
- Full featured edition of file names and attributes on the image. | |||
- Several options to relax ISO-9660 constraints. | |||
- Special options for images intended for distribution (suitable default | |||
modes for files, hiding of real timestamps...) | |||
- Multisession | |||
- Support for growing an existing image | |||
- Full-featured edition of the image files, including: addition of new | |||
files, removing of existent files, moving files, renaming files, | |||
change file attributes (permissions, timestamps...) | |||
- Support for "emulated multisession" or image growing, suitable for non | |||
multisession media such as DVD+RW | |||
- Image modification | |||
- It can create a completely new image from files on another image. | |||
- Full-featured edition of image contents | |||
- Others | |||
- Handling of different input and output charset | |||
- Good integration with libburn for image burning. | |||
- Reliable, good handling of different kind of errors. | |||
Requirements: | |||
------------- | |||
- libburn 0.4.2 headers must be installed at compile time. It is not required | |||
at runtime. | |||
Know bugs: | |||
---------- | |||
Multisession and image growing can lead to undesired results in several cases: | |||
a) Images with unsupported features, such as: | |||
- UDF. | |||
- HSF/HFS+ or other Mac extensions. | |||
- El-Torito with multiple entries. | |||
- ECMA-119 with extended attributes, multiple extends per file. | |||
- Non El-Torito boot info. | |||
- zisofs compressed images. | |||
- ... | |||
In all these cases, the resulting new image (or new session) could lack some | |||
features of the original image. | |||
In some cases libisofs will issue warning messages, or even refuse to grow | |||
or modify the image. Others remain undetected. Images created with libisofs | |||
do not have this problems. | |||
b) Bootable El-Torito images may have several problems, that result in a new | |||
image that is not bootable, or that boots from an outdated session. In many | |||
cases it is recommended to add boot info again in the new session. | |||
- isolinux images won't be bootable after a modify. This is because | |||
isolinux images need to have hardcoded the root dir lba. libisofs cannot | |||
know whether an image is an isolinux image or not, so the user is | |||
responsible to tell libisofs that it must patch the image, with the | |||
el_torito_patch_isolinux_image() function. This problem could also exists | |||
on other boot images. | |||
- Most boot images are highly dependent of the image contents, so if the | |||
user moves or removes some files on image it is possible they won't boot | |||
anymore. | |||
- There is no safer way to modify hidden boot images, as the size of the | |||
boot image can't be figured out. | |||
c) Generated images could have different ECMA-119 low level names, due to | |||
different way to mangle names, to new files added that force old files to | |||
be renamed, to different relaxed contraints... This only affect the | |||
ISO-9660 info, not the RR names, so it shouldn't be a problem in most | |||
cases. If your app. relies on low level ISO-9660 names, you will need to | |||
ensure all node names are valid ISO names (maybe together with some | |||
relaxed contraints), otherwise libisofs might arbitrarily change the names. | |||
------------------------------------------------------------------------------ | |||
Download, Build and Installation | |||
libisofs code is mantained in a Bazaar repository at Launchpad | |||
(https://launchpad.net/libisofs/). You can download it with: | |||
$ bzr branch lp:libisofs | |||
Our build system is based on autotools. For preparing the build you will need | |||
autotools of at least version 1.7. If you have download the code from the | |||
repository, first of all you need to execute | |||
./autogen.sh | |||
on toplevel dir to execute autotools. | |||
Alternatively you may unpack a release tarball for which you do not need | |||
autotools installed. | |||
To build libisofs it should be sufficient to go into its toplevel directory | |||
and execute | |||
./configure --prefix=/usr | |||
make | |||
To make the libraries accessible for running resp. developing applications | |||
make install | |||
See INSTALL file for further details. | |||
------------------------------------------------------------------------------ | |||
Overview of libburnia-project.org | |||
libburnia-project.org is an open-source software project for reading, mastering | |||
and writing optical discs. | |||
For now this means only CD media and all single layer DVD media except DVD+R. | |||
The project comprises of several more or less interdependent parts which | |||
together strive to be a usable foundation for application development. | |||
These are libraries, language bindings, and middleware binaries which emulate | |||
classical (and valuable) Linux tools. | |||
Our scope is currently Linux 2.4 and 2.6 only. For ports to other systems | |||
we would need : login on a development machine resp. a live OS on CD or DVD, | |||
advise from a system person about the equivalent of Linux sg or FreeBSD CAM, | |||
volunteers for testing of realistic use cases. | |||
We have a workable code base for burning CD and most single layer DVD. | |||
The burn API is quite comprehensively documented and can be used to build a | |||
presentable application. | |||
We have a functional binary which emulates parts of cdrecord in order to | |||
prove that usability, and in order to allow you to explore libburnia's scope | |||
by help of existing cdrecord frontends. | |||
The project components (list subject to growth, hopefully): | |||
- libburn is the library by which preformatted data get onto optical media. | |||
It uses either /dev/sgN (e.g. on kernel 2.4 with ide-scsi) or | |||
/dev/hdX (e.g. on kernel 2.6). | |||
libburn is the foundation of our cdrecord emulation. Its code is | |||
independent of cdrecord. Its DVD capabilities are learned from | |||
studying the code of dvd+rw-tools and MMC-5 specs. No code but only | |||
the pure SCSI knowledge has been taken from dvd+rw-tools, though. | |||
- libisofs is the library to pack up hard disk files and directories into a | |||
ISO 9660 disk image. This may then be brought to media via libburn. | |||
libisofs is to be the foundation of our upcoming mkisofs emulation. | |||
- cdrskin is a limited cdrecord compatibility wrapper for libburn. | |||
Cdrecord is a powerful GPL'ed burn program included in Joerg | |||
Schilling's cdrtools. cdrskin strives to be a second source for | |||
the services traditionally provided by cdrecord. Additionally it | |||
provides libburn's DVD capabilities, where only -sao is compatible | |||
with cdrecord. | |||
cdrskin does not contain any bytes copied from cdrecord's sources. | |||
Many bytes have been copied from the message output of cdrecord | |||
runs, though. | |||
See cdrskin/README and man cdrskin/cdrskin.1 for more. | |||
- test is a collection of application gestures and examples given by the | |||
authors of the library features. The main API example for libburn | |||
is test/libburner.c . | |||
Explore these examples if you look for inspiration. | |||
We plan to be a responsive upstream. Bear with us. We are still practicing. | |||
------------------------------------------------------------------------------ | |||
Project history as far as known to me: | |||
- Founded in 2002 as it seems. See mailing list archives | |||
http://lists.freedesktop.org/archives/libburn/ | |||
The site of this founder team is reachable and offers download of a | |||
(somewhat outdated) tarball and from CVS : | |||
http://icculus.org/burn/ | |||
Copyright holders and most probably founders: | |||
Derek Foreman and Ben Jansens. | |||
- I came to using libburn in 2005. Founded the cdrskin project and submitted | |||
necessary patches which were accepted or implemented better. Except one | |||
remaining patch which prevented cdrskin from using vanilla libburn from CVS. | |||
The cdrskin project site is reachable and offers download of the heavily | |||
patched (elsewise outdated) tarball under the name cdrskin-0.1.2 : | |||
http://scdbackup.sourceforge.net/cdrskin_eng.html | |||
It has meanwhile moved to use vanilla libburn.pykix.org , though. | |||
Version 0.1.4 constitutes the first release of this kind. | |||
- In July 2006 our team mate Mario Danic announced a revival of libburn | |||
which by about nearly everybody else was perceived as unfriendly fork. | |||
Derek Foreman four days later posted a message which expressed his | |||
discontent. | |||
The situation first caused me to publically regret it and then - after i | |||
got the opportunity to move in with cdrskin - gave me true reason to | |||
personally apologize to Derek Foreman, Ben Jansens and the contibutors at | |||
icculus.org/burn. Posted to both projects: | |||
http://lists.freedesktop.org/archives/libburn/2006-August/000446.html | |||
http://mailman-mail1.webfaction.com/pipermail/libburn-hackers/2006-August/000024.html | |||
- Mid August 2006 project cdrskin established a branch office in | |||
libburn.pykix.org so that all maintainers of our tools have one single place | |||
to get the current (at least slightely) usable coordinated versions of | |||
everything. | |||
Project cdrskin will live forth independendly for a while but it is committed | |||
to stay in sync with libburn.pykix.org (or some successor, if ever). | |||
cdrskin is also committed to support icculus.org/burn if the pending fork | |||
is made reality by content changes in that project. It will cease to maintain | |||
a patched version of icculus.org/burn though. Precondition for a new | |||
release of cdrskin on base of icculus.org/burn would be the pending | |||
"whitelist patch" therefore. | |||
I would rather prefer if both projects find consense and merge, or at least | |||
cooperate. I have not given up hope totally, yet. | |||
I, personally, will honor any approach. | |||
- 2nd September 2006 the decision is made to strive for a consolidation of | |||
copyright and a commitment to GPL in a reasonable and open minded way. | |||
This is to avoid long term problems with code of unknown origin and | |||
with finding consense among the not so clearly defined group of copyright | |||
claimers and -holders. | |||
libisofs is already claimed sole copyright Mario Danic. | |||
cdrskin and libburner are already claimed sole copyright Thomas Schmitt. | |||
Rewrites of other components will follow and concluded by claiming full | |||
copyright within the group of libburn.pykix.org-copyright holders. | |||
- 16th September 2006 feature freeze for release of libburn-0.2.2 . | |||
- 20th September 2006 release of libburn-0.2.2 . | |||
- 26th October 2006 feature freeze for cdrskin-0.2.4 based on libburn-0.2.3 . | |||
This version of cdrskin is much more cdrecord compatible in repect | |||
to drive addressing and audio features. | |||
- 30th October 2006 release of cdrskin-0.2.4 . | |||
- 13th November 2006 splitting releases of libburn+cdrskin from libisofs. | |||
- 24th November 2006 release of libburn-0.2.6 and cdrskin-0.2.6 . cdrskin has | |||
become suitable for unaware frontends as long as they perform only the core | |||
of cdrecord use cases (including open-ended input streams, audio, and | |||
multi-session). | |||
- 28th November 2006 the umbrella project which encloses both, libisofs and | |||
libburn, is now called libburnia. For the origin of this name, see | |||
http://en.wikipedia.org/wiki/Liburnians . | |||
- 16th January 2007 release of libburn-0.3.0 and cdrskin-0.3.0 . Now the scope | |||
is widened to a first class of DVD media: overwriteable single layer types | |||
DVD-RAM, DVD+RW, DVD-RW. This is not a cdrecord emulation but rather inspired | |||
by dvd+rw-tools' "poor man" writing facility for this class of media. | |||
Taking a bow towards Andy Polyakov. | |||
- 11th February 2007 version 0.3.2 covers sequential DVD-RW and DVD-R with | |||
multi-session and with DAO. | |||
- 12th March 2007 version 0.3.4 supports DVD+R and thus covers all single layer | |||
DVD media. Code for double layer DVD+/-R is implemented but awaits a tester | |||
yet. | |||
- 23th April 2007 version 0.3.6 follows the unanimous opinion of Linux kernel | |||
people that one should not use /dev/sg on kernel 2.6. | |||
- 31st July 2007 version 0.3.8 marks the first anniversary of libburn revival. | |||
We look back on improved stability, a substantially extended list of media | |||
and write modes, and better protection against typical user mishaps. | |||
- 24th October 2007 version 0.4.0 is the foundation of new library libisoburn | |||
and an upcomming integrated application for manipulating and writing | |||
ISO 9660 + Rock Ridge images. cdrskin-0.4.0 got capabilities like growisofs | |||
by these enhancements: growing of overwriteable media and disk files. | |||
Taking again a bow towards Andy Polyakov. | |||
- 26th Januar 2008 version 0.4.2 rectifies the version numbering so that we | |||
reliably release libburn.so.4 as should have been done since libburn-0.3.2. | |||
cdrskin now is by default linked dynamically and does a runtime check | |||
to ensure not to be started with a libburn which is older than itself. | |||
------------------------------------------------------------------------------ | |||
This program is free software; you can redistribute it and/or modify | |||
it under the terms of the GNU General Public License as published by | |||
the Free Software Foundation. To be exact: version 2 of that License. | |||
This program is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
GNU General Public License for more details. | |||
You should have received a copy of the GNU General Public License | |||
along with this program; if not, write to the Free Software | |||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |||
------------------------------------------------------------------------------ | |||
Clarification in my name and in the name of Mario Danic, upcoming copyright | |||
holders on toplevel of libburnia. To be fully in effect after the remaining | |||
other copyrighted code has been replaced by ours and by copyright-free | |||
contributions of our friends: | |||
------------------------------------------------------------------------------ | |||
We, the copyright holders, agree on the interpretation that | |||
dynamical linking of our libraries constitutes "use of" and | |||
not "derivation from" our work in the sense of GPL, provided | |||
those libraries are compiled from our unaltered code. | |||
Thus you may link our libraries dynamically with applications | |||
which are not under GPL. You may distribute our libraries and | |||
application tools in binary form, if you fulfill the usual | |||
condition of GPL to offer a copy of the source code -altered | |||
or unaltered- under GPL. | |||
We ask you politely to use our work in open source spirit | |||
and with the due reference to the entire open source community. | |||
If there should really arise the case where above clarification | |||
does not suffice to fulfill a clear and neat request in open source | |||
spirit that would otherwise be declined for mere formal reasons, | |||
only in that case we will duely consider to issue a special license | |||
covering only that special case. | |||
It is the open source idea of responsible freedom which will be | |||
decisive and you will have to prove that you exhausted all own | |||
means to qualify for GPL. | |||
For now we are firmly committed to maintain one single license: GPL. | |||
signed: Mario Danic, Thomas Schmitt | |||
@ -0,0 +1,33 @@ | |||
>>>>>>>>>> RELEASE 0.6.1 (development) >>>>>>>>>>>>>>>>>>>>> | |||
- Review error severities | |||
OK - Prepare API for stability and compatibility check | |||
- Documentation | |||
>>>>>>>>>> RELEASE 0.6.2 (stable) >>>>>>>>>>>>>>>>>>>>>>>>>> | |||
- Intensive testing and bug fixing | |||
>>>>>>>>>> RELEASE 0.6.3 (development) >>>>>>>>>>>>>>>>>>>>> | |||
- Improves to public tree | |||
-> Expose node extended info. Always compile it. | |||
(little memory cost) | |||
-> Review builder / tree / node relation | |||
-> Optimize storage of children in node? | |||
-> Inode object? | |||
- Expose Builder and Streams | |||
- Implement filters: compression, encryption... | |||
- Consider some kind of plugin system for Builders, Filesystems and Filters. | |||
- ECMA-119, Joliet, and ISO-9660:1999 writers can share most of the code. | |||
Create a new writer as a generalization of these. | |||
- Update Java bindings | |||
>>>>>>>>>>> ...... | |||
>>>>>>>>>>> RELEASE 1.0.0 (stable) >>>>>>>>>>>>>>>>>>>>>>>>>> | |||
- UDF | |||
- HFS | |||
@ -0,0 +1,35 @@ | |||
FEATURES | |||
======== | |||
TODO | |||
==== | |||
#00001 (node.h) -> consider adding new timestamps to IsoTreeNode | |||
#00004 (libisofs.h) -> Add a get_mime_type() function. | |||
#00005 (node.c) -> optimize iso_dir_iter_take. | |||
#00006 (libisofs.h) -> define more replace values when adding a node to a dir | |||
#00007 (libisofs.h) -> expose iso_tree_add_new_file | |||
#00008 (data_dource.c) -> guard against partial reads | |||
#00009 (ecma119_tree.c/h) -> add true support for harlinks and inode numbers | |||
#00010 (buffer.c) -> optimize ring buffer | |||
#00011 (ecma119.c) -> guard against bad path table usage with more than 65535 dirs | |||
#00012 (fs_image.c) -> support follow symlinks on imafe filesystem | |||
#00013 (fs_image.c) -> check for unsupported flags when reading a dir record | |||
#00014 (fs_image.c) -> more sanity checks to ensure dir record info is valid | |||
#00015 (fs_image.c) -> take care of CD-ROM XA discs when reading SP entry | |||
#00016 (fs_image.c) -> handle non RR ER entries | |||
#00017 (fs_image.c) -> take advantage of other atts of PVD | |||
#00018 (fs_image.c) -> check if there are more entries in the boot catalog | |||
#00019 (fs_image.c) -> set IsoImage attribs from Joliet SVD? | |||
#00020 (fs_image.c) -> handle RR info in Joliet tree | |||
#00021 (fs_image.c) -> handle RR info in ISO 9660:1999 tree | |||
#00022 (joliet.c) -> support relaxed constraints in joliet filenames | |||
#00024 (libisofs.h) -> option to convert names to lower case for iso reading | |||
#00025 (libisofs.h) -> support for merging old image files | |||
#00026 (libisofs.h) -> add support for "hidden" bootable images. | |||
#00027 (iso1999.h) -> Follow ISO 9660:1999 specs when sorting files | |||
FIXME | |||
===== | |||
@ -0,0 +1,22 @@ | |||
AC_DEFUN([TARGET_SHIZZLE], | |||
[ | |||
ARCH="" | |||
AC_MSG_CHECKING([target operating system]) | |||
case $target in | |||
*-*-linux*) | |||
ARCH=linux | |||
LIBBURN_ARCH_LIBS= | |||
;; | |||
*-*-freebsd*) | |||
ARCH=freebsd | |||
LIBBURN_ARCH_LIBS=-lcam | |||
;; | |||
*) | |||
AC_ERROR([You are attempting to compile for an unsupported platform]) | |||
;; | |||
esac | |||
AC_MSG_RESULT([$ARCH]) | |||
]) |
@ -0,0 +1,10 @@ | |||
#!/bin/sh -x | |||
aclocal | |||
libtoolize --copy --force | |||
autoconf | |||
# ts A61101 : libburn is not prepared for config.h | |||
# autoheader | |||
automake --foreign --add-missing --copy --include-deps |
@ -0,0 +1,155 @@ | |||
AC_INIT([libisofs], [0.6.3], [http://libburnia-project.org]) | |||
AC_PREREQ([2.50]) | |||
dnl AC_CONFIG_HEADER([config.h]) | |||
AC_CANONICAL_HOST | |||
AC_CANONICAL_TARGET | |||
AM_INIT_AUTOMAKE([subdir-objects]) | |||
dnl A61101 This breaks Linux build (makes 32 bit off_t) | |||
dnl http://sourceware.org/autobook/autobook/autobook_96.html says | |||
dnl one must include some config.h and this was a pitfall. | |||
dnl So why dig the pit at all ? | |||
dnl AM_CONFIG_HEADER(config.h) | |||
dnl | |||
dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match | |||
dnl | |||
dnl CURRENT and AGE describe the binary compatibility interval of a | |||
dnl dynamic library. | |||
dnl See also http://www.gnu.org/software/libtool/manual.html#Interfaces | |||
dnl | |||
dnl The name of the library will be libisofs.so.$CURRENT-$AGE.$AGE.$REV | |||
dnl In the terminology of this file: | |||
dnl CURRENT = LT_CURRENT | |||
dnl REV = LT_REVISION | |||
dnl AGE = LT_AGE | |||
dnl | |||
dnl LT_CURRENT, LT_REVISION and LT_AGE get set directly now. | |||
dnl | |||
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE. | |||
dnl The linker will do no finer checks. Especially no age range check for | |||
dnl the cdrskin binary. If SONAME matches, then the couple starts. | |||
dnl | |||
dnl Therefore a run time check is provided by libisofs function | |||
dnl iso_lib_version(). It returns the major, minor and micro revision of the | |||
dnl library. This means LIBISOFS_*_VERSION kept its second job which does not | |||
dnl comply to the usual ways of configure.ac . I.e. now *officially* this is | |||
dnl the source code release version as announced to the public. It has no | |||
dnl conection to SONAME or libtool version numbering. | |||
dnl It rather feeds the API function iso_lib_version(). | |||
dnl | |||
dnl If LIBISOFS_*_VERSION changes, be sure to change AC_INIT above to match. | |||
dnl | |||
LIBISOFS_MAJOR_VERSION=0 | |||
LIBISOFS_MINOR_VERSION=6 | |||
LIBISOFS_MICRO_VERSION=3 | |||
LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION | |||
AC_SUBST(LIBISOFS_MAJOR_VERSION) | |||
AC_SUBST(LIBISOFS_MINOR_VERSION) | |||
AC_SUBST(LIBISOFS_MICRO_VERSION) | |||
AC_SUBST(LIBISOFS_VERSION) | |||
dnl Libtool versioning | |||
LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION | |||
# SONAME = 6 - 0 = 6 . Library name = libisofs.6.0.0 | |||
LT_CURRENT=6 | |||
LT_REVISION=0 | |||
LT_AGE=0 | |||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` | |||
AC_SUBST(LT_RELEASE) | |||
AC_SUBST(LT_CURRENT) | |||
AC_SUBST(LT_REVISION) | |||
AC_SUBST(LT_AGE) | |||
AC_SUBST(LT_CURRENT_MINUS_AGE) | |||
AC_PREFIX_DEFAULT([/usr/local]) | |||
test "$prefix" = "NONE" && prefix=$ac_default_prefix | |||
AM_MAINTAINER_MODE | |||
AM_PROG_CC_C_O | |||
AC_C_CONST | |||
AC_C_INLINE | |||
AC_C_BIGENDIAN | |||
dnl Large file support | |||
AC_SYS_LARGEFILE | |||
AC_FUNC_FSEEKO | |||
AC_CHECK_FUNC([fseeko]) | |||
if test ! $ac_cv_func_fseeko; then | |||
AC_MSG_ERROR([Libisofs requires largefile support.]) | |||
fi | |||
AC_PROG_LIBTOOL | |||
AC_SUBST(LIBTOOL_DEPS) | |||
LIBTOOL="$LIBTOOL --silent" | |||
AC_PROG_INSTALL | |||
AC_CHECK_HEADERS() | |||
dnl Use GNU extensions if available | |||
AC_DEFINE(_GNU_SOURCE, 1) | |||
dnl Check for tm_gmtoff field in struct tm | |||
AC_CHECK_MEMBER([struct tm.tm_gmtoff], | |||
[AC_DEFINE(HAVE_TM_GMTOFF, 1, | |||
[Define this if tm structure includes a tm_gmtoff entry.])], | |||
, | |||
[#include <time.h>]) | |||
dnl Check if non standard timegm() function is available | |||
AC_CHECK_DECL([timegm], | |||
[AC_DEFINE(HAVE_TIMEGM, 1, [Define this if timegm function is available])], | |||
, | |||
[#include <time.h>]) | |||
dnl Check if non standard eaccess() function is available | |||
AC_CHECK_DECL([eaccess], | |||
[AC_DEFINE(HAVE_EACCESS, 1, [Define this if eaccess function is available])], | |||
, | |||
[#include <unistd.h>]) | |||
THREAD_LIBS=-lpthread | |||
AC_SUBST(THREAD_LIBS) | |||
TARGET_SHIZZLE | |||
AC_SUBST(ARCH) | |||
AC_SUBST(LIBBURN_ARCH_LIBS) | |||
dnl Add compiler-specific flags | |||
dnl See if the user wants aggressive optimizations of the code | |||
AC_ARG_ENABLE(debug, | |||
[ --enable-debug Disable aggressive optimizations [default=yes]], | |||
, enable_debug=yes) | |||
if test x$enable_debug != xyes; then | |||
if test x$GCC = xyes; then | |||
CFLAGS="$CFLAGS -O3" | |||
CFLAGS="$CFLAGS -fexpensive-optimizations" | |||
fi | |||
CFLAGS="$CFLAGS -DNDEBUG" | |||
else | |||
if test x$GCC = xyes; then | |||
CFLAGS="$CFLAGS -g -pedantic -Wall" | |||
fi | |||
CFLAGS="$CFLAGS -DDEBUG" | |||
fi | |||
dnl Verbose debug to make libisofs issue more debug messages | |||
AC_ARG_ENABLE(verbose-debug, | |||
[ --enable-verbose-debug Enable verbose debug messages [default=no]], | |||
AC_DEFINE(LIBISOFS_VERBOSE_DEBUG, 1)) | |||
AC_CONFIG_FILES([ | |||
Makefile | |||
doc/doxygen.conf | |||
version.h | |||
libisofs-1.pc | |||
]) | |||
AC_OUTPUT |
@ -0,0 +1,74 @@ | |||
/* | |||
* Copyright (c) 2007 Vreixo Formoso | |||
* | |||
* This file is part of the libisofs project; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License version 2 as | |||
* published by the Free Software Foundation. See COPYING file for details. | |||
*/ | |||
#include "libisofs.h" | |||
#include "fsource.h" | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
/* | |||
* Little test program to test filesystem implementations. | |||
* Outputs file contents to stdout! | |||
*/ | |||
int main(int argc, char **argv) | |||
{ | |||
int res; | |||
IsoFilesystem *fs; | |||
IsoFileSource *file; | |||
struct stat info; | |||
if (argc != 2) { | |||
fprintf(stderr, "Usage: cat /path/to/file\n"); | |||
return 1; | |||
} | |||
/* create filesystem object */ | |||
res = iso_local_filesystem_new(&fs); | |||
if (res < 0) { | |||
fprintf(stderr, "Can't get local fs object, err = %d\n", res); | |||
return 1; | |||
} | |||
res = fs->get_by_path(fs, argv[1], &file); | |||
if (res < 0) { | |||
fprintf(stderr, "Can't get file, err = %d\n", res); | |||
return 1; | |||
} | |||
res = iso_file_source_lstat(file, &info); | |||
if (res < 0) { | |||
fprintf(stderr, "Can't stat file, err = %d\n", res); | |||
return 1; | |||
} | |||
if (S_ISDIR(info.st_mode)) { | |||
fprintf(stderr, "Path refers to a directory!!\n"); | |||
return 1; | |||
} else { | |||
char buf[1024]; | |||
res = iso_file_source_open(file); | |||
if (res < 0) { | |||
fprintf(stderr, "Can't open file, err = %d\n", res); | |||
return 1; | |||
} | |||
while ((res = iso_file_source_read(file, buf, 1024)) > 0) { | |||
fwrite(buf, 1, res, stdout); | |||
} | |||
if (res < 0) { | |||
fprintf(stderr, "Error reading, err = %d\n", res); | |||
return 1; | |||
} | |||
iso_file_source_close(file); | |||
} | |||
iso_file_source_unref(file); | |||
iso_filesystem_unref(fs); | |||
return 0; | |||
} |
@ -0,0 +1,127 @@ | |||
/* | |||
* Copyright (c) 2007 Vreixo Formoso | |||
* | |||
* This file is part of the libisofs project; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License version 2 as | |||
* published by the Free Software Foundation. See COPYING file for details. | |||
*/ | |||
#include "libisofs.h" | |||
#include "buffer.h" | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <pthread.h> | |||
#include <sys/types.h> | |||
#include <sys/stat.h> | |||
#include <fcntl.h> | |||
#include <unistd.h> | |||
/* | |||
* Little test program that reads a file and outputs it to stdout, using | |||
* the libisofs ring buffer as intermediate memory | |||
*/ | |||
struct th_data | |||
{ | |||
IsoRingBuffer *rbuf; | |||
char *path; | |||
}; | |||
#define WRITE_CHUNK 2048 | |||
#define READ_CHUNK 2048 | |||
static | |||
void *write_function(void *arg) | |||
{ | |||
ssize_t bytes; | |||
int res; | |||
unsigned char tmp[WRITE_CHUNK]; | |||
struct th_data *data = (struct th_data *) arg; | |||
int fd = open(data->path, O_RDONLY); | |||
if (fd < 0) { | |||
fprintf(stderr, "Writer thread error: Can't open file"); | |||
iso_ring_buffer_writer_close(data->rbuf, 1); | |||
pthread_exit(NULL); | |||
} | |||
res = 1; | |||
while ( (bytes = read(fd, tmp, WRITE_CHUNK)) > 0) { | |||
res = iso_ring_buffer_write(data->rbuf, tmp, bytes); | |||
if (res <= 0) { | |||
break; | |||
} | |||
/* To test premature reader exit >>>>>>>>>>> | |||
iso_ring_buffer_writer_close(data->rbuf); | |||
pthread_exit(NULL); | |||
<<<<<<<<<<<<<<<<<<<<<<<<< */ | |||
// if (rand() > 2000000000) { | |||
// fprintf(stderr, "Writer sleeping\n"); | |||
// sleep(1); | |||
// } | |||
} | |||
fprintf(stderr, "Writer finish: %d\n", res); | |||
close(fd); | |||
iso_ring_buffer_writer_close(data->rbuf, 0); | |||
pthread_exit(NULL); | |||
} | |||
static | |||
void *read_function(void *arg) | |||
{ | |||
unsigned char tmp[READ_CHUNK]; | |||
int res = 1; | |||
struct th_data *data = (struct th_data *) arg; | |||
while ( (res = iso_ring_buffer_read(data->rbuf, tmp, READ_CHUNK)) > 0) { | |||
write(1, tmp, READ_CHUNK); | |||
/* To test premature reader exit >>>>>>>>>>> | |||
iso_ring_buffer_reader_close(data->rbuf); | |||
pthread_exit(NULL); | |||
<<<<<<<<<<<<<<<<<<<<<<<<< */ | |||
// if (rand() > 2000000000) { | |||
// fprintf(stderr, "Reader sleeping\n"); | |||
// sleep(1); | |||
// } | |||
} | |||
fprintf(stderr, "Reader finish: %d\n", res); | |||
iso_ring_buffer_reader_close(data->rbuf, 0); | |||
pthread_exit(NULL); | |||
} | |||
int main(int argc, char **argv) | |||
{ | |||
int res; | |||
struct th_data data; | |||
pthread_t reader; | |||
pthread_t writer; | |||
if (argc != 2) { | |||
fprintf(stderr, "Usage: catbuffer /path/to/file\n"); | |||
return 1; | |||
} | |||
res = iso_ring_buffer_new(1024, &data.rbuf); | |||
if (res < 0) { | |||
fprintf(stderr, "Can't create buffer\n"); | |||
return 1; | |||
} | |||
data.path = argv[1]; | |||
res = pthread_create(&writer, NULL, write_function, (void *) &data); | |||
res = pthread_create(&reader, NULL, read_function, (void *) &data); | |||
pthread_join(writer, NULL); | |||
pthread_join(reader, NULL); | |||
fprintf(stderr, "Buffer was %d times full and %d times empty.\n", | |||
iso_ring_buffer_get_times_full(data.rbuf), | |||
iso_ring_buffer_get_times_empty(data.rbuf)); | |||
free(data.rbuf); | |||
return 0; | |||
} |
@ -0,0 +1,136 @@ | |||
/* | |||
* Little program that imports a directory to iso image, generates the | |||
* ecma119 low level tree and prints it. | |||
* Note that this is not an API example, but a little program for test | |||
* purposes. | |||
*/ | |||
#include "libisofs.h" | |||
#include "ecma119.h" | |||
#include "ecma119_tree.h" | |||
#include "util.h" | |||
#include "filesrc.h" | |||
#include "node.h" | |||
#include <stdio.h> | |||
#include <stdlib.h> | |||
#include <string.h> | |||
#include <sys/types.h> | |||
#include <sys/stat.h> | |||
#include <unistd.h> | |||
static void | |||
print_permissions(mode_t mode) | |||
{ | |||
char perm[10]; | |||
//TODO suid, sticky... | |||
perm[9] = '\0'; | |||
perm[8] = mode & S_IXOTH ? 'x' : '-'; | |||
perm[7] = mode & S_IWOTH ? 'w' : '-'; | |||
perm[6] = mode & S_IROTH ? 'r' : '-'; | |||
perm[5] = mode & S_IXGRP ? 'x' : '-'; | |||
perm[4] = mode & S_IWGRP ? 'w' : '-'; | |||
perm[3] = mode & S_IRGRP ? 'r' : '-'; | |||
perm[2] = mode & S_IXUSR ? 'x' : '-'; | |||
perm[1] = mode & S_IWUSR ? 'w' : '-'; | |||
perm[0] = mode & S_IRUSR ? 'r' : '-'; | |||
printf("[%s]",perm); | |||
} | |||
static void | |||
print_dir(Ecma119Node *dir, int level) | |||
{ | |||
int i; | |||
char *sp = alloca(level * 2 + 1); | |||
for (i = 0; i < level * 2; i += 2) { | |||
sp[i] = '|'; | |||
sp[i+1] = ' '; | |||
} | |||
sp[level * 2-1] = '-'; | |||
sp[level * 2] = '\0'; | |||
for (i = 0; i < dir->info.dir->nchildren; i++) { | |||
Ecma119Node *child = dir->info.dir->children[i]; | |||
if (child->type == ECMA119_DIR) { | |||
printf("%s+[D] ", sp); | |||
print_permissions(iso_node_get_permissions(child->node)); | |||
printf(" %s\n", child->iso_name); | |||
print_dir(child, level+1); | |||
} else if (child->type == ECMA119_FILE) { | |||
printf("%s-[F] ", sp); | |||
print_permissions(iso_node_get_permissions(child->node)); | |||
printf(" %s {%p}\n", child->iso_name, (void*)child->info.file); | |||
} else if (child->type == ECMA119_SYMLINK) { | |||
printf("%s-[L] ", sp); | |||
print_permissions(iso_node_get_permissions(child->node)); | |||
printf(" %s -> %s\n", child->iso_name, | |||
((IsoSymlink*)child->node)->dest); | |||
} else if (child->type == ECMA119_SPECIAL) { | |||
printf("%s-[S] ", sp); | |||
print_permissions(iso_node_get_permissions(child->node)); | |||
printf(" %s\n", child->iso_name); | |||
} else if (child->type == ECMA119_PLACEHOLDER) { | |||
printf("%s-[RD] ", sp); | |||
print_permissions(iso_node_get_permissions(child->node)); | |||
printf(" %s\n", child->iso_name); | |||
} else { | |||
printf("%s-[????] ", sp); | |||
} | |||
} | |||
} | |||
int main(int argc, char **argv) | |||
{ | |||
int result; | |||
IsoImage *image; | |||
Ecma119Image *ecma119; | |||
if (argc != 2) { | |||
printf ("You need to specify a valid path\n"); | |||
return 1; | |||
} | |||
iso_init(); | |||
iso_set_msgs_severities("NEVER", "ALL", ""); | |||
result = iso_image_new("volume_id", &image); | |||
if (result < 0) { | |||
printf ("Error creating image\n"); | |||
return 1; | |||
} | |||
result = iso_tree_add_dir_rec(image, iso_image_get_root(image), argv[1]); | |||
if (result < 0) { | |||
printf ("Error adding directory %d\n", result); | |||
return 1; | |||
} | |||
ecma119 = calloc(1, sizeof(Ecma119Image)); | |||
iso_rbtree_new(iso_file_src_cmp, &(ecma119->files)); | |||
ecma119->iso_level = 1; | |||
ecma119->rockridge = 1; | |||
ecma119->image = image; | |||
ecma119->input_charset = strdup("UTF-8"); | |||
/* create low level tree */ | |||
result = ecma119_tree_create(ecma119); | |||
if (result < 0) { | |||
printf ("Error creating ecma-119 tree: %d\n", result); | |||
return 1; | |||
} | |||
printf("================= ECMA-119 TREE =================\n"); | |||
print_dir(ecma119->root, 0); | |||
printf("\n\n"); | |||
ecma119_node_free(ecma119->root); | |||
iso_rbtree_destroy(ecma119->files, iso_file_src_free); | |||
free(ecma119->input_charset); | |||
free(ecma119); | |||
iso_image_unref(image); | |||
iso_finish(); | |||
return 0; | |||
} |
@ -0,0 +1,176 @@ | |||
/* | |||
* Little program to show how to create an iso image from a local | |||
* directory. | |||
*/ | |||
#include "libisofs.h" | |||
#include "libburn/libburn.h" | |||
#include <stdio.h> | |||
#include <getopt.h> | |||
#include <stdlib.h> | |||
#include <string.h> | |||
#include <sys/types.h> | |||
#include <sys/stat.h> | |||
#include <unistd.h> | |||
#include <fcntl.h> | |||
#include <err.h> | |||
const char * const optstring = "JRIL:b:hV:"; | |||
extern char *optarg; | |||
extern int optind; | |||
void usage(char **argv) | |||
{ | |||
printf("%s [OPTIONS] DIRECTORY OUTPUT\n", argv[0]); | |||
} | |||
void help() | |||
{ | |||
printf( | |||
"Options:\n" | |||
" -J Add Joliet support\n" | |||
" -R Add Rock Ridge support\n" | |||
" -I Add ISO 9660:1999 support\n" | |||
" -V label Volume Label\n" | |||
" -L <num> Set the ISO level (1 or 2)\n" | |||
" -b file Specifies a boot image to add to image\n" | |||
" -h Print this message\n" | |||
); | |||
} | |||
int callback(IsoFileSource *src) | |||
{ | |||
char *path = iso_file_source_get_path(src); | |||
printf("CALLBACK: %s\n", path); | |||
free(path); | |||
return 1; | |||
} | |||
int main(int argc, char **argv) | |||
{ | |||
int result; | |||
int c; | |||
IsoImage *image; | |||
struct burn_source *burn_src; | |||
unsigned char buf[2048]; | |||
FILE *fd; | |||
IsoWriteOpts *opts; | |||
char *volid = "VOLID"; | |||
char *boot_img = NULL; | |||
int rr = 0, j = 0, iso1999 = 0, level = 1; | |||
while ((c = getopt(argc, argv, optstring)) != -1) { | |||
switch(c) { | |||
case 'h': | |||
usage(argv); | |||
help(); | |||
exit(0); | |||
break; | |||
case 'J': | |||
j = 1; | |||
break; | |||
case 'R': | |||
rr = 1; | |||
break; | |||
case 'I': | |||
iso1999 = 1; | |||
break; | |||
case 'L': | |||
level = atoi(optarg); | |||
break; | |||
case 'b': | |||
boot_img = optarg; | |||
break; | |||
case 'V': | |||
volid = optarg; | |||
break; | |||
case '?': | |||
usage(argv); | |||
exit(1); | |||
break; | |||
} | |||
} | |||
if (argc < 2) { | |||
printf ("Please pass directory from which to build ISO\n"); | |||
usage(argv); | |||
return 1; | |||
} | |||
if (argc < 3) { | |||
printf ("Please supply output file\n"); | |||
usage(argv); | |||
return 1; | |||
} | |||
fd = fopen(argv[optind+1], "w"); | |||
if (!fd) { | |||
err(1, "error opening output file"); | |||
} | |||