On Fri, 9 Mar 2001, Michael Brown wrote:
> On Thu, 8 Mar 2001, Prana wrote:
> > SAP is a very well known RDBMS for large scale database (not for
> > lightweight MySQL stuff), and now it's GPL-ed!! I hope Mandrake 8.1 (not
> > 8.0) will include this http://freshmeat.net/projects/sapdb/, at least in
> > the contrib :-)
> It's not completely released yet (they are releasing the source code in
> stages, presumably because they're tidying it up before public release),
> but everything should be out by sometime in April.
> I volunteer to package it up for Mandrake - I've been waiting for SAP to
> go GPL ever since I discovered that the PostgreSQL team decided not to
> make their replication server properly "free".

OK - I'm getting there.  They use their own make tool and build
environment, which has made it a bit more complicated than "normal" RPMS.  
(The Pascal source code that didn't translate into correct assembler
didn't help either, but I've fixed that problem now).

The major problem at the moment is that the path "/usr/spool/sql" is
hardcoded into lots of the SAP source files and development tools.  This
is not a problem once the system is installed, but it does cause a problem
while building; during the build process, it will expect to be able to
write to /usr/spool/sql (and will sulk if it can't).

I have come up with the following solution:

The sapdb-devtools package, which provides the several Perl scripts
required to build the sapdb package, creates an empty directory
/usr/spool/sql with owner root and permissions rwxrwxrwx.

The sapdb package has a buildRequires:sapdb-devtools, so when building the
sapdb package, /usr/spool/sql is publicly writable and the build process
is happy.

In the %install section, the files in /usr/spool/sql will be parsed for
sensible values and then copied to $RPM_BUILD_ROOT/usr/spool/sql, which
will have owner sapdb and permissions rwxr-xr-x.

The sapdb package has a Conflicts:sapdb-devtools, which forces the
publicly writable /usr/spool/sql from sabdb-devtools to be removed before
the sapdb package is installed.

There is a mild security problem in that /usr/spool/sql remains publicly
writable while sapdb is being built.

Can anyone think of a more elegant solution to this problem?

Michael



Reply via email to