[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg for FreeBSD

On Sat, 6 Nov 1999, Piotr Roszatycki wrote:

> Yesterday I experimented with dpkg on FreeBSD and I've ported
> dpkg to FreeBSD.
> Please, note, I'm telling about porting a _program_, not _whole distribution_.

You aren't the first.  I don't remember the specifics, but dpkg has been
ported to Solaris and HP/UX, and, I speculate, to at least some version of
Darwin/Mac OS X.

You don't say which dpkg version you ported.  There are, I believe, some
significant differences in recent versions.

> RPM is ported to many systems, even commercial Solaris, etc.
> dpkg is still too Debian specific. I think it is wrong because I know
> people who use RPM on many different OS-es, but dpkg can be used
> only on Linux system (or GNU/HURD).

You're right.  Making it more portable is good.

> My laboratory:
> * FreeBSD-3.3
> * autoconf/automake
> * bash as /bin/sh
> * gmake as /usr/bin/make (but it is no good!)
> * libgnugetopt
> My report:
> * dpkg detects an architecture by executing 'gcc -print-libgcc-file-name'.
>   This is wrong on FreeBSD, because this file is simply /usr/lib/libgcc.a
>   I suggest if this check is failed, dpkg should have a reasonable default
>   value. This value could be set by ./configure --with-default-arch=XXX.
>   I've done workaround in dpkg-gencontrol, etc. scripts but modifing
>   dpkg binary is necessary.

Yup.  Something is wrong there.  I suppose if we're using configure, we
should use configure's host-type stuff.


> * debian/rules file uses /usr/bin/make program. This is correct if make
>   is GNU make! I suggest the rules file should use i.e. /usr/bin/dpkg-make
>   which is a symlink to real GNU make (at FreeBSD this is /usr/local/bin/gmake).

dpkg is written for the GNU system.  So, it assumes GNU make, GNU mv, GNU
xargs, etc...

Removing these dependencies is desirable in some ways, but may make things
more complex..

> * Similar problem with /bin/sh which wasn't compatible with bash. I replaced
>   /bin/sh by /usr/local/bin/bash. I'm afraid dpkg scripts use bashizm.

the scripts shouldn't have bashisms in, if they say /bin/sh.  These could
be reported as bugs.

A more serious problem, perhaps, is that Debian policy states that bash is
found as /bin/bash.  Therefore many debian components use this as an
absolute path - a problem if bash is in /usr/local. (solvable by a

> * In FreeBSD the "mv" doesn't have '-v' option and "xargs" doesn't have
>   '-r0' option. I had to modified debian/rules.

See above.

> * After touching /var/lib/dpkg/status and /usr/var/dpkg/status 
>   I could run "dpkg -i dpkg_*.deb" :-) Then dpkg told me 
>   (probably postinst script) I hadn't /etc/rc0.d directory. Damn, right!
>   This is FreeBSD and there is no /etc/rc0.d directory ;-)
> * Well done. "dpkg --list" told me I had dpkg package installed. It was
>   exciting four hours.


> I think it could be possible to port dpkg on win32 platform with cygwin
> library, but Solaris could be another step.

I believe solaris has been done.


|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |

Reply to: