Re: Bug#476340: ITP: datapacker -- Tool to pack files into minimum number of CDs/DVDs/etc

2008-04-16 Thread Jon Leonard
On Wed, Apr 16, 2008 at 12:21:51PM +, brian m. carlson wrote:
 On Tue, Apr 15, 2008 at 10:50:23PM -0500, John Goerzen wrote:
 Package: wnpp
 Severity: wishlist
 Owner: John Goerzen [EMAIL PROTECTED]

 * Package name: datapacker
  Version : 1.0.0
  Upstream Author : John Goerzen [EMAIL PROTECTED]
 * URL : http://software.complete.org/datapacker
 * License : GPL
  Programming Lang: Haskell
  Description : Tool to pack files into minimum number of CDs/DVDs/etc
 datapacker is a tool to group files by size. It is
 designed to group files such that they fill fixed-size containers
 (called bins) using the minimum number of containers.

 This sounds suspiciously like the knapsack problem, which is in NP.  Is  
 it guaranteed to use the minimum number, or are there cases when it  
 would not?  If the former, I'm sure Merkle and Hellman would like to  
 hear from you. ;-)

If all the items to be packed are multiples of a common size (say, one
sector on a CD), then it is instead an instance of integer knapsack,
which has a dynamic programming algorithm of reasonable complexity.
(That is, number of items times bin size.)

It's entirely possible that datapacker solves the problem that way.

Jon Leonard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Packaging a library that requires cross-compiled code

2007-09-26 Thread Jon Leonard
On Thu, Sep 27, 2007 at 02:59:16AM +0200, David Anderson wrote:
[how best to package a stub for which the cross-compiler isn't in Debian]

[possible solution 1]
 1) Ship a built copy of the code in the package's .diff.gz, and DTRT
 at package creation time to move the .bin from debian/ to the right
 place in the staging tree. The source code for the .bin is in
 .orig.tar.gz, under a free license. Anyone is free to modify or
 rebuild the .bin, provided they obtain an arm7 cross-compiler by
 non-debian means (instructions provided). People who just want to
 rebuild the package can do so, without caring that there is
 cross-compiled code involved.
 
 Pro: dead simple, the packaging problem goes away. Con: means shipping
 a binary blob in the source distribution, which appears to be frowned
 upon, regardless of whether the source is also freely available in the
 source distribution.

A slight variant on this would be to ship assembly source (the output of
gcc -S) instead of a binary blob, and cross-assemble that.  If the stub
is 136 bytes long, assembly isn't too bad, and it's a step away from a
binary blob.  This presumes that the cross-tools in Debian can correctly
assemble arm7, which I haven't verified.

But the binary-blob variant is probably simplest, and I'd recommend going
with that to get packaging done and the package in Debian.  Alternately,
check for the compiler, and use it if it's installed.  (And fall back to
the binary blob if it's not there.)

Jon Leonard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]