Bug#49395: dpkg: -X user error reports about --vextract

1999-11-06 Thread Julian Gilbey
Package: dpkg
Version: 1.4.1.19

It would be nice if the error message better matched the command in
the following situation:

polya:~ $ dpkg -X /var/cache/apt/archives/passwd_19990827-8_i386.deb 
dpkg-deb: --vextract needs a target directory.
Perhaps you should be using dpkg --install ?
polya:~ $ 

   Julian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  Julian Gilbey, Dept of Maths, QMW, Univ. of London. [EMAIL PROTECTED]
Debian GNU/Linux Developer,  see http://www.debian.org/~jdg



Re: dpkg for FreeBSD

1999-11-06 Thread Wichert Akkerman
Previously Jules Bean wrote:
> 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.

All of the above actually. I've redone the dpkg buildprocess to no
longer use automake. I'll see if I can add configure options to not
build things like dselect, md5sum and start-stop-daemon and try to get
it working on other OS'es.. that will take a while though, so don't 
expect miracles soon.

Wichert.

-- 
   
 / Generally uninteresting signature - ignore at your convenience  \
| [EMAIL PROTECTED]http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |


pgp2enrqnKGvG.pgp
Description: PGP signature


Re: dpkg for FreeBSD

1999-11-06 Thread Piotr Roszatycki
On Sat, 6 Nov 1999, Jules Bean wrote:

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

Ah, sorry.
It was dpkg 1.4.1.19 from CVS repo.

I'm afraid dpkg 1.4.1 is stable version and couldn't be modified.
Should I take experimental dpkg 1.5.1?

> > * 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.

I think it is done for cross compiled packages. Is any possible solution
for this incopability? It makes dpkg useless for other platforms.

> > * 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..

I think the dpkg as standalone program should be portable to system without
GNU utils (like mv, xargs). Of course GNU make is required, but it could be
easly resolved by /usr/bin/dpkg-make symlink.

-- 

Piotr "Dexter" Roszatycki
mailto:[EMAIL PROTECTED]



Re: dpkg for FreeBSD

1999-11-06 Thread Jules Bean
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.


[snip]

>   
> * 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
symlink)

>   
> * 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.

Cool!

> 
> 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.

Jules

/+---+-\
|  Jelibean aka  | [EMAIL PROTECTED] |  6 Evelyn Rd|
|  Jules aka | [EMAIL PROTECTED]  |  Richmond, Surrey   |
|  Julian Bean   | [EMAIL PROTECTED]|  TW9 2TF *UK*   |
++---+-+
|  War doesn't demonstrate who's right... just who's left. |
|  When privacy is outlawed... only the outlaws have privacy.  |
\--/



dpkg for FreeBSD

1999-11-06 Thread Piotr Roszatycki
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_.

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).

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.

* I had to add some new options to configure.in, but it worked. This was
  ptrdiff_t for enquiry.c and 
  
* On FreeBSD some includes and libraries are located at /usr/include tree. 
  I've adaptaded Makefile manually. Is it possible to do autodetection?
  I guess autoconf can do it but I know this tool a little.
  
* How to detect an current OS from compilator? #ifdef linux and #ifdef __GNU__
  worked for linux and hurd, but I didn't know how to detect FreeBSD.
  I think it could be exported from ./configure detection, not hardcoded
  in this way.
  
* start-stop-daemon is too OS specific so I don't know if it works on FreeBSD.
  Maybe some BSD-guru could port this tool?
  
* dselect didn't compile at all. I can live without it but I'd like to
  have ./configure --without-dselect option.
  
* I had to compile dpkg twice time. First: "make; make install", second:
  "debian/rules binary". But these methods generated completly different code!
  I.e. "make" generated ADMINDIR="/usr/var/dpkg" (!??).
  
* "make install" didn't create /var/lib/dpkg/{status|availables} empty files,
  so I had to create them manually. Really, I had to create them twice,
  in /usr/var/dpkg and /var/lib/dpkg directories.. (?)
  
* 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).
  
* 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.
  
* In FreeBSD the "mv" doesn't have '-v' option and "xargs" doesn't have
  '-r0' option. I had to modified debian/rules.

* I was suprised that after "debian/rules binary" I've lost some files
  from debian/ directory, i.e. debian/dev-* scripts.
  
* 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.
  

Why did I ported dpkg on BSD-like system? It was an experiment, but I think
dpkg could be useful on non-Linux platforms. I hope the dpkg became 
universal package manager which isn't specific for one system.

I could attach my patch if you are interested in. It can be probably
included to official version, but it required some modification in
current version which I can't do:

* default architecture or workaround for "gcc -print-libgcc-file-name"
* ./configure --without-dselect
* detecting of architecture in C code (#ifdef )
* start-stop-daemon ported to FreeBSD.
* "#!/usr/bin/dpkg-make -f" in debian/rules ?? Maybe 
  "./configure --with-gnu-make=/usr/local/bin/gmake" ?
  

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

Piotr "Dexter" Roszatycki
mailto:[EMAIL PROTECTED]



Updates to cvs.debian.org:/var/cvs/dpkg/dpkg-iwj

1999-11-06 Thread Ian Jackson
building file list ... done
attic/
attic/doc/
attic/dpkg/
attic/dpkg-deb/
attic/dselect/
attic/scripts/
attic/split/
automake/
debian/
doc/
doc/internals.html/
doc/obsolete/
doc/packaging.html/
dpkg-deb/
dselect/
examples/
include/
intl/
lib/
main/
md5sum/
methods/
po/
scripts/
split/
wrote 8102 bytes  read 16 bytes  492.00 bytes/sec
total size is 5050331  speedup is 622.12