Andre Noll [Wed, 19 Apr 2017 13:49:38 +0000 (15:49 +0200)]
build: Fix dependencies for oslfsck.
The autogenerated Makefile.deps does not work for the oslfsck
exectutable because we compile the object files for oslfsck without
-fPIC to generate more performant code, and name them e.g. util.fsck.o
instead of util.o.
Geting rid of this optimization not only fixes the dependencies but
also simplifies the Makefile and speeds up the build.
Andre Noll [Thu, 21 Apr 2016 09:09:39 +0000 (11:09 +0200)]
Convert README and INSTALL to markdown.
The grutatxt project is dead, so we need to switch to something else
eventually. Fortunately, only little changes are required for the
switch to the markdown markup language as there are only two files in
the source tree which are formated with grutatxt. This patch converts
both files and adjusts the Makefile to run the markdown converter
instead of the grutatxt script.
Andre Noll [Wed, 13 Jan 2016 14:35:36 +0000 (15:35 +0100)]
web: Create man page with groff rather than man2html.
The man2html project is dead, as is the link on the osl web page. The
URL mentioned in the info of the man2html package for Ubuntu-14.04
still works but might not be the most up to date page on the planet
any more:
In any case, it's a funny read. Needless to say that the link to the
sunsite FTP server is also dead.
This commit makes osl independent of man2html, simply by running groff
-Thtml instead of man2html. This even simplifies the Makefile a bit.
The patch also removes the dead link on the osl main page. We don't
need a replacement reference to groff because groff should be installed
on all systems anyway.
Andre Noll [Wed, 13 Jan 2016 14:12:02 +0000 (15:12 +0100)]
web: Update Doxyfile.
This file was created long ago with doxygen version 1.5.4. The system
on which the public web pages are generated runs Ubuntu 14.04 which
ships doxygen-1.8.6. This doxygen version complains as follows:
Warning: Tag `DETAILS_AT_TOP' at line 162 of file web/Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `SHOW_DIRECTORIES' at line 424 of file web/Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `HTML_ALIGN_MEMBERS' at line 727 of file web/Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
This patch is the result of running doxygen -u web/Doxyfile. With the
updated file the above warnings go away, and the pages look identical.
Andre Noll [Mon, 26 Oct 2015 14:38:09 +0000 (15:38 +0100)]
web: Switch to UTF-8 encoding.
Probably doesn't matter at all since there isn't a single text file in
the repo which is not pure ASCII. But still, in 2016 iso-8859 should
not be used any more..
Andre Noll [Sat, 9 Aug 2014 13:21:50 +0000 (15:21 +0200)]
Add make target www.
The new target allows to update the web page with "make www", followed
by a suitable command to copy the "web" directory to the server. That's
as easy as it gets.
Andre Noll [Thu, 22 Jan 2015 12:58:20 +0000 (13:58 +0100)]
web: Remove SSI for last modification in footer.html.
The footer.html file is is only used for the doxygen pages. It contains
a server side include directive although SSI is not activated on the
people.tuebingen.mpg.de web server and probably will never be.
This commit gets rid of the SSI and also removes the end tags </td>
and </table> from footer.html as these elements are not open at this
point of the document. This was found by the w3c validator.
Removes also the link to the W2C validator. Nobody wants to see this,
and doxygen does not even create valid html anyway..
Andre Noll [Mon, 24 Aug 2015 15:34:28 +0000 (17:34 +0200)]
Explain the osl_strerror dance.
It's not completely obvious what is going on here and *why* we not
just go with a simple pointer array for the messages returned by
osl_strerror(). This commit explains why pointer arrays are bad
in DSOs.
Andre Noll [Mon, 24 Aug 2015 15:35:08 +0000 (17:35 +0200)]
Fix comment on SHA1 implementation.
The dependency on openssl was dropped six years ago in commit f0884471. This commit corrects the stale comment that still says we
use openssl's sha1 implementation.
Andre Noll [Sat, 13 Jun 2015 18:47:33 +0000 (20:47 +0200)]
osl_get_nth_row(): Always initialize result pointer.
We buy into Postel's prescription and try to be liberal in what we
accept, and conservative in what we send. This patch makes sure the
result pointer is set to NULL on failure, and documents this fact.
Andre Noll [Sun, 4 Jan 2015 00:34:26 +0000 (00:34 +0000)]
osl_update_object(): Honor OSL_DONT_FREE.
When osl_update_object() is called to replace an object of
an OSL_NO_STORAGE column, it frees the old object even if the
OSL_DONT_FREE flag is set for the column, which is wrong. This patch
changes the function to call free() only if OSL_DONT_FREE is unset.
Andre Noll [Sun, 4 Jan 2015 00:33:35 +0000 (00:33 +0000)]
Mention that OSL_RBTREE implies OSL_UNIQUE.
Also print a warning when a table is opened or created which contains
a column description with OSL_RBTREE set but OSL_UNIQUE unset. Future
versions of osl might reject such table descriptions. But in order
to not break existing applications, we can not make such a change
without a deprecation period. So a warning has to suffice for now.
Andre Noll [Mon, 11 Aug 2014 09:13:25 +0000 (11:13 +0200)]
Install relative links to the soname.
On make install, the library is installed to $(libdir)/$(realname)
(e.g. /usr/local/lib/libosl.so.0.1.2), and a link is created to
map $(linkername) to $(soname) (e.g. /usr/local/lib/libosl.so ->
/usr/local/lib/libosl.so.0).
This changes the ln command to create a relative link rather than an
absolute link. For example, /usr/local/lib/libosl.so now points to
libosl.so.0 without the leading directory. This shouldn't matter much
but it allows to move both files elsewhere without breaking the link.
Andre Noll [Tue, 14 Jan 2014 14:11:12 +0000 (15:11 +0100)]
Fix adu link.
After the upgrade of the servers at systemlinux.org last week, the web
service is no longer available through http://systemlinux.org. Adjust
the link to the adu page accordingly.
Andre Noll [Tue, 22 May 2012 15:55:10 +0000 (17:55 +0200)]
Allow to build a static version of libosl.
This adds the new target libosl.a which creates an archive that can
be statically linked into applications. Currently this works only on
ELF-based systems including Linux, FreeBSD and NetBSD, but fails on
MacOS. So it is not built automatically.
Unfortunately, creating libosl.a turned out to be trickier than
expected, because -fvisibility=hidden works only for dynamic libraries.
So we need a different method to hide non-static internal symbols
like make_message() which must not be global (external) because they
might clash with symbols used in the application.
objcopy(1) does the trick but we must provide a list of exceptional
symbols that should not be made local. This list is generated from
the osl.h header file.
Andre Noll [Wed, 25 Nov 2009 09:40:08 +0000 (10:40 +0100)]
Split install target.
As proposed by Sebastian Stark, this introduces the install-lib,
install-bin and install-man targets. The simple "make install" still
installs everything, but splitting the target allows people to install
for example only the library if they do not have all tools available
which are necessary to build the oslfsck binary or its man page.
Andre Noll [Fri, 20 Nov 2009 08:38:56 +0000 (09:38 +0100)]
Drop dependency on openssl.
This patch adds git's implementation of the sha1 hash algorithm. This
makes osl more self-contained as it allows to build osl without
openssl being installed.
It should also reduce the startup time of applications that link
against libosl.
Andre Noll [Mon, 2 Nov 2009 13:39:16 +0000 (14:39 +0100)]
Set CC to gcc by default.
On systems where cc != gcc, compilation likely fails because we are
using quite some gccisms in osl. So default to gcc but let the user
override the default by setting CC manually.
The straight-forward CC ?= gcc does not work with gnu make as make
assigns CC the default value "cc".
Thanks to Steffen Schmidt for pointing out this shortcoming.
Andre Noll [Mon, 3 Aug 2009 09:31:49 +0000 (11:31 +0200)]
README: Clarify red-black tree statements.
As noted by Sebastian Stark, the old text was a bit misleading. So
make it clear that no special linux files are necessary to compile
the library.
Also, the sentence on table locking was not quite true: There's the
dirty bit in each osl table which is some kind of locking. Correct that
statement as well.
Andre Noll [Sun, 2 Aug 2009 10:31:07 +0000 (12:31 +0200)]
Improve table versioning.
This patch changes the way table version numbers are stored on disk.
Two version numbers instead of only one are stored in the table header:
The version of the lib that created the table, and the lowest version
number of the lib that can read the table.
As the latter is currently 0, it has no effect so far, i.e. tables
created with previous versions of the library still work fine. However,
with this change future versions of the library can detect from the
on-disk versions and the library version numbers if table and library
are compatible.
Andre Noll [Sat, 11 Jul 2009 21:24:02 +0000 (23:24 +0200)]
fsck: Fix a serious bug in prune_mapped_column().
This function still contained a relict from the old database format that was changed in commit 6d7dce7f277fc8606fb8d5ed6360660c13a218af. This caused prune_mapped_column()
to write one byte too much to the data file of a mapped column for each removed row.
Running the buggy oslfsck on a table with mapped columns where rows have been deleted
likely results in data corruption to objects adjacent to the deleted objects.
Worst of all, since only the data files but not the index is affected, the corruption will not
immediately be noticed, which is probably why it took one year to find this bug. Kill it with
pleasure.
Andre Noll [Sun, 10 May 2009 19:36:18 +0000 (21:36 +0200)]
rbtree: Add const qualifier to some functions.
The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls take a pointer
to an RB node or RB root. They do not change the pointed objects, so add a
'const' qualifier.