FreeBSD Port: mpack-1.6

Boris Samorodov bsam at ipt.ru
Wed Mar 1 12:13:09 PST 2006


On Wed, 01 Mar 2006 13:27:25 -0600 Paul Schmehl wrote:
> --On Wednesday, March 01, 2006 22:21:35 +0300 Boris Samorodov
>   <bsam at ipt.ru> wrote:
> >> >
> >> I've already incorporated that patch in to the other one and deleted
> >> it, but that doesn't fix this bug.
> >
> > Hm:
> >
> > -----
> ># uname -a
> > FreeBSD srv.sem.ipt.ru 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Tue Feb
> > 28 22:21:02 MSK 2006     bsam at srv.sem.ipt.ru:/usr/obj/usr/src/sys/SRV
> > i386
> >
> ># cd /usr/ports/converters/mpack
> ># rm files/patch-unixpk_c
> > (Makefile,v 1.18)
> ># make
> > ...
> ># cd work/mpack-1.6
> ># mkdir /usr/tmp
> ># ./mpack -s "test" Makefile bsam at ipt.ru
> >#
> > -----
> >
> > That's it. With that patch I've got "File exists" error.
> > Double check you additional patches?
> >
> Again, all the patches do is change a hard-coded path for TMPDIR
> from

Again, did you try to do what I wrote? Did you get errors?

> "/usr/tmp" to "/tmp".  They don't change anything else.  The program,
> bulit from source, fails with a "File or directory not found" error
> because the hard-coded path, "/usr/tmp", does not exist.  When you fix
> *that* problem (by applying my patches), you get a different error,
> "File already exists", in the same place in the code.

Yes. And I show you how to override that error. Just delete the patch
file.

BTW if you read README.unix at the sources you may see that one can
change the hard-coded path. Just define environment variable
TMPDIR=/tmp. No C-coding. Just simple. Test it! (I did)

> There's a bug in the program that is not allowing the program to open
> a file in "/tmp" and write to it, then complete its work and exit
> successfully.

The bug is introduced by the patch. Restore the port from cvs (cvsup)
and just delete the patch. And define TMPDIR.

> My problem is, I'm not a programmer, and my C skills are not that
> good, so I'm having problems figuring out what's causing the error
> (other than the fact that I know it creates the file, and then, when
> it tries to write to it, complains that the file already exists (which
> seems kind of silly to me.)

> There's not a problem with my patches, AFAICT, there's a problem with
> the program.  If there's any programmers on this list, who have the

There is no problem with the program. There is a problem with your
patches.

> time, I could use some help tracking this down.  I emailed the
> developers, but I don't know if they'll get back to me or not.

I'm also not a C programmer. But here is the patch you asked for:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpack.patch
Type: text/x-patch
Size: 1209 bytes
Desc: mpack patch
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060301/d2c2f49a/mpack.bin
-------------- next part --------------

What it does:
1. Rewrites "/usr/tmp" to "/tmp".
2. Deletes changes from previous files/patch-unixpk_c.

Just what I told you to do.

To use the patch:

# cd /usr/ports/converters
# patch -p0 < _the_patch_
(delete files/*.orig files)
# make all install clean


WBR
-- 
Boris B. Samorodov, Research Engineer
InPharmTech Co,     http://www.ipt.ru
Telephone & Internet Service Provider


More information about the freebsd-ports mailing list