Package: apt; Maintainer for apt is APT Development Team <deity@lists.debian.org>; Source for apt is src:apt (PTS, buildd, popcon).
Reported by: "Matthew S. Wood" <matt@realmsys.com>
Date: Wed, 15 Jun 2005 19:18:02 UTC
Severity: wishlist
Tags: patch
Found in version 0.5.28.6
Fixed in version apt/0.7.26~exp3
Done: Michael Vogt <mvo@debian.org>
Bug is archived. No further changes may be made.
View this report as an mbox folder, status mbox, maintainer mbox
Report forwarded to debian-bugs-dist@lists.debian.org, thayne@realmsys.com, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to "Matthew S. Wood" <matt@realmsys.com>:
New Bug report received and forwarded. Copy sent to thayne@realmsys.com, APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: apt
Version: 0.5.28.6
Severity: important
Tags: patch
APT doesn't work on filesystems which don't support shared writable mmap. This is significant for hand-held devices which use NAND flash as a data store. These devices typically use a filesystem like JFFS2, which lacks shared writable mmap support.
The attached patch optionally implements [at compile time] support for mmap() emulation within APT. In order for this support to properly function, a modification to the FileFd class was required. This modification makes the FileFd class keep a cache of open files, such that if two contexts both hold the same file descriptor, the file descriptor isn't closed until both FileFd destructors are called.
The aforementioned patch corrects this issue.
-- Package-specific info:
-- /etc/apt/preferences --
Package: *
Pin: release a=experimental
Pin-Priority: 101
Package: libgcc1-powerpc-cross
Pin: release v=3.4.3-1
Pin-Priority: 1001
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.11.msw3
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages apt depends on:
ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an
ii libgcc1 1:3.4.3-12 GCC support library
ii libstdc++5 1:3.3.5-12 The GNU Standard C++ Library v3
-- no debconf information
--- PATCH HERE ---
diff -urp apt-0.6.25.orig/apt-pkg/contrib/fileutl.cc apt-0.6.25/apt-pkg/contrib/fileutl.cc
--- apt-0.6.25.orig/apt-pkg/contrib/fileutl.cc 2002-09-13 23:29:22.000000000 -0600
+++ apt-0.6.25/apt-pkg/contrib/fileutl.cc 2005-06-13 10:49:02.000000000 -0600
@@ -36,6 +36,9 @@
using namespace std;
+
+map<int, int> FileFd::ref_count_map;
+
// CopyFile - Buffered copy of a file /*{{{*/
// ---------------------------------------------------------------------
/* The caller is expected to set things so that failure causes erasure */
@@ -415,6 +418,7 @@ bool FileFd::Open(string FileName,OpenMo
if (iFd < 0)
return _error->Errno("open",_("Could not open file %s"),FileName.c_str());
+ inc_ref(iFd);
this->FileName = FileName;
SetCloseExec(iFd,true);
@@ -573,13 +577,11 @@ unsigned long FileFd::Size()
bool FileFd::Close()
{
bool Res = true;
- if ((Flags & AutoClose) == AutoClose)
- if (iFd >= 0 && close(iFd) != 0)
- Res &= _error->Errno("close",_("Problem closing the file"));
+
+ Res &= dec_ref(iFd);
iFd = -1;
- if ((Flags & Fail) == Fail && (Flags & DelOnFail) == DelOnFail &&
- FileName.empty() == false)
+ if ((Flags & Fail) && (Flags & DelOnFail) && !FileName.empty())
if (unlink(FileName.c_str()) != 0)
Res &= _error->WarningE("unlnk",_("Problem unlinking the file"));
return Res;
diff -urp apt-0.6.25.orig/apt-pkg/contrib/fileutl.h apt-0.6.25/apt-pkg/contrib/fileutl.h
--- apt-0.6.25.orig/apt-pkg/contrib/fileutl.h 2001-05-06 23:06:52.000000000 -0600
+++ apt-0.6.25/apt-pkg/contrib/fileutl.h 2005-06-13 11:43:35.000000000 -0600
@@ -1,4 +1,4 @@
-// -*- mode: cpp; mode: fold -*-
+// -*- mode: cpp; mode: fold; c-basic-offset: 3 -*-
// Description /*{{{*/
// $Id: fileutl.h,v 1.26 2001/05/07 05:06:52 jgg Exp $
/* ######################################################################
@@ -25,12 +25,51 @@
#pragma interface "apt-pkg/fileutl.h"
#endif
+#include <apt-pkg/error.h>
+
+#include <apti18n.h>
+
#include <string>
+#include <map>
+#include <cassert>
using std::string;
+using std::map;
class FileFd
{
+ private:
+ /*
+ * Helpers to impelment reference counting on file descriptors.
+ * This is done to avoid closing a file descriptor which is shared
+ * by two different scopes. If this is to be made thread-safe,
+ * a mutex must be in place. - MSW 06/10/2005
+ */
+ typedef int fd_t;
+ static map<fd_t, int> ref_count_map;
+ void inc_ref(int fd) {
+ if (fd >= 0) {
+ if (ref_count_map.find(fd) == ref_count_map.end())
+ ref_count_map[fd] = 1;
+ else
+ ref_count_map[fd] += 1;
+ }
+ }
+ bool dec_ref(int fd) {
+ int ret = true;
+ if (fd >= 0) {
+ assert(ref_count_map.find(fd) != ref_count_map.end());
+ ref_count_map[fd] -= 1;
+ if (ref_count_map[fd] == 0 && Flags & AutoClose) {
+ if (close(fd) < 0)
+ ret = _error->Errno("close",
+ _("Problem closing the file"));
+ ref_count_map.erase(fd);
+ }
+ }
+ return ret;
+ }
+
protected:
int iFd;
@@ -62,12 +101,13 @@ class FileFd
// Simple manipulators
inline int Fd() {return iFd;};
- inline void Fd(int fd) {iFd = fd;};
+ inline void Fd(int fd) {dec_ref(iFd); iFd = fd; inc_ref(iFd);};
inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;};
inline void EraseOnFailure() {Flags |= DelOnFail;};
inline void OpFail() {Flags |= Fail;};
inline bool Eof() {return (Flags & HitEof) == HitEof;};
+ inline void SetAutoClose() {Flags |= AutoClose;};
inline string &Name() {return FileName;};
FileFd(string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(-1),
@@ -75,8 +115,8 @@ class FileFd
{
Open(FileName,Mode,Perms);
};
- FileFd(int Fd = -1) : iFd(Fd), Flags(AutoClose) {};
- FileFd(int Fd,bool) : iFd(Fd), Flags(0) {};
+ FileFd(int Fd = -1) : iFd(Fd), Flags(AutoClose) { inc_ref(Fd); };
+ FileFd(int Fd,bool) : iFd(Fd), Flags(0) { inc_ref(Fd); };
virtual ~FileFd();
};
diff -urp apt-0.6.25.orig/apt-pkg/contrib/mmap.cc apt-0.6.25/apt-pkg/contrib/mmap.cc
--- apt-0.6.25.orig/apt-pkg/contrib/mmap.cc 2001-05-26 23:19:30.000000000 -0600
+++ apt-0.6.25/apt-pkg/contrib/mmap.cc 2005-06-14 16:53:11.000000000 -0600
@@ -1,4 +1,4 @@
-// -*- mode: cpp; mode: fold -*-
+// -*- mode: cpp; mode: fold; c-basic-offset: 3 -*-
// Description /*{{{*/
// $Id: mmap.cc,v 1.22 2001/05/27 05:19:30 jgg Exp $
/* ######################################################################
@@ -33,9 +33,117 @@
#include <sys/mman.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
- /*}}}*/
+#include <errno.h>
+
+#ifdef USE_NO_MMAP_FALLBACK
+map<struct key, struct mem_cache, stat_eq > MMap::cached_mem;
+
+
+/*
+ * buf_read and buf_write initially called one common function to do the
+ * real loop, because the code is so similar. This was abandoned, however,
+ * due to C++ type strictness and the slightly different function signatures
+ * of read and write.
+ */
+static inline bool buf_write(int fd, const void *buf, size_t count)
+{
+ size_t bytes_rem = count;
+ ssize_t ret;
+ while (bytes_rem > 0) {
+ int offset = count - bytes_rem;
+ ret = write(fd, ((const char *) buf) + offset, bytes_rem);
+ if (ret < 0)
+ return _error->Errno("write", _("Short write returned on fd %d.\n"), fd);
+ bytes_rem -= ret;
+ }
+ return true;
+}
+
+static inline bool buf_read(int fd, void *buf, size_t count)
+{
+ size_t bytes_rem = count;
+ ssize_t ret;
+ while (bytes_rem > 0) {
+ int offset = count - bytes_rem;
+ ret = read(fd, ((char *) buf) + offset, bytes_rem);
+ if (ret < 0)
+ return _error->Errno("read",
+ _("Short read returned on fd %d.\n"), fd);
+ bytes_rem -= ret;
+ }
+ return true;
+}
+
+bool MMap::fill_buffer(int fd, void **buf, unsigned long size)
+{
+ // First, see if the file has already been 'mapped'
+ struct mem_cache cache;
+ struct stat st_buf;
+ if (fstat(fd, &st_buf) < 0)
+ return _error->Errno("stat", _("Couldn't get file information."));
+
+ my_key.inode = st_buf.st_ino;
+ my_key.device = st_buf.st_dev;
+
+ /* We already have a cache of this file. */
+ if (cached_mem.find(my_key) != cached_mem.end()) {
+ cache = cached_mem[my_key];
+ if (cache.len < size)
+ return _error->Errno("virtual_mmap",
+ _("Virtual mmap can't grow shared memory"));
+ (*buf) = cache.ptr;
+ cache.ref_count++;
+ cached_mem[my_key] = cache;
+ return true;
+ }
+
+ /* There is no cache of this file */
+ (*buf) = malloc(size);
+ if (!(*buf))
+ return _error->Errno("malloc", _("Couldn't allocate %lu bytes memory"),
+ size);
+ /*
+ * If the file is newly created, seek to the size we're requesting,
+ * then write a byte to make it a sparse file.
+ */
+ if (st_buf.st_size < (long) size) {
+ if (lseek(fd, SEEK_SET, size) < 0) {
+ free(*buf);
+ return _error->Errno("lseek", _("couldn't create sparse file."));
+ }
+
+ char eof = 0;
+ if (!buf_write(fd, &eof, 1)) {
+ free(*buf);
+ return false;
+ }
+ } else {
+ lseek(fd, SEEK_SET, 0);
+ if (!buf_read(fd, *buf, size)) {
+ free(*buf);
+ return false;
+ }
+ }
+
+ cache.ptr = (*buf);
+ cache.len = size;
+ cache.ref_count = 1;
+ cached_mem[my_key] = cache;
+ return true;
+}
+
+# define PRINT_MMAP_WARNING()
+#else
+# define PRINT_MMAP_WARNING() \
+ if (errno == EINVAL) \
+ fprintf(stderr, "W: It is possible, though not likely, that your " \
+ "filesystem does not support shared writable mmap. If this is " \
+ "truely the case, recompile apt with --enable-mmap-fallback.\n")
+#endif /* USE_NO_MMAP_FALLBACK */
+
// MMap::MMap - Constructor /*{{{*/
// ---------------------------------------------------------------------
@@ -43,6 +151,9 @@
MMap::MMap(FileFd &F,unsigned long Flags) : Flags(Flags), iSize(0),
Base(0)
{
+#ifdef USE_NO_MMAP_FALLBACK
+ baseMalloced = false;
+#endif
if ((Flags & NoImmMap) != NoImmMap)
Map(F);
}
@@ -53,6 +164,9 @@ MMap::MMap(FileFd &F,unsigned long Flags
MMap::MMap(unsigned long Flags) : Flags(Flags), iSize(0),
Base(0)
{
+#ifdef USE_NO_MMAP_FALLBACK
+ baseMalloced = false;
+#endif
}
/*}}}*/
// MMap::~MMap - Destructor /*{{{*/
@@ -80,12 +194,28 @@ bool MMap::Map(FileFd &Fd)
if (iSize == 0)
return _error->Error(_("Can't mmap an empty file"));
-
- // Map it.
- Base = mmap(0,iSize,Prot,Map,Fd.Fd(),0);
- if (Base == (void *)-1)
- return _error->Errno("mmap",_("Couldn't make mmap of %lu bytes"),iSize);
+#ifdef USE_NO_MMAP_FALLBACK
+ if (!(Map & MAP_SHARED)) {
+#endif
+ // Map it.
+ Base = mmap(0,iSize,Prot,Map,Fd.Fd(),0);
+ if (Base == (void *)-1) {
+ PRINT_MMAP_WARNING();
+ return _error->Errno("mmap", _("Couldn't make mmap of %lu bytes"),
+ iSize);
+ }
+#ifdef USE_NO_MMAP_FALLBACK
+ } else {
+ // Save off the passed file descriptor in case the caller closes it.
+ savedFd.Fd(Fd.Fd());
+ savedFd.SetAutoClose();
+
+ if (fill_buffer(savedFd.Fd(), &Base, iSize) < 0)
+ return false;
+ baseMalloced = true;
+ }
+#endif
return true;
}
/*}}}*/
@@ -96,12 +226,29 @@ bool MMap::Close(bool DoSync)
{
if ((Flags & UnMapped) == UnMapped || Base == 0 || iSize == 0)
return true;
-
+
if (DoSync == true)
Sync();
-
- if (munmap((char *)Base,iSize) != 0)
- _error->Warning("Unable to munmap");
+
+#ifdef USE_NO_MMAP_FALLBACK
+ if (baseMalloced) {
+ /*
+ * We always Sync in the case of malloc()'d memory because a
+ * free() won't sync to disk the way an munmap will.
+ */
+ if (!DoSync)
+ Sync();
+
+ cached_mem[my_key].ref_count--;
+ if (!cached_mem[my_key].ref_count) {
+ cached_mem.erase(my_key);
+ free(Base);
+ baseMalloced = false;
+ }
+ } else
+#endif
+ if (munmap((char *)Base,iSize) != 0)
+ _error->Warning("Unable to munmap");
iSize = 0;
Base = 0;
@@ -116,12 +263,21 @@ bool MMap::Sync()
{
if ((Flags & UnMapped) == UnMapped)
return true;
-
+
+#ifdef USE_NO_MMAP_FALLBACK
+ if (baseMalloced) {
+ if (Flags & ReadOnly)
+ return true;
+
+ lseek(savedFd.Fd(), 0, SEEK_SET);
+ return buf_write(savedFd.Fd(), Base, iSize);
+ }
+#endif
#ifdef _POSIX_SYNCHRONIZED_IO
- if ((Flags & ReadOnly) != ReadOnly)
- if (msync((char *)Base,iSize,MS_SYNC) != 0)
- return _error->Errno("msync","Unable to write mmap");
-#endif
+ if ((Flags & ReadOnly) != ReadOnly)
+ if (msync((char *)Base,iSize,MS_SYNC) != 0)
+ return _error->Errno("msync","Unable to write mmap");
+#endif
return true;
}
/*}}}*/
@@ -133,12 +289,22 @@ bool MMap::Sync(unsigned long Start,unsi
if ((Flags & UnMapped) == UnMapped)
return true;
+#ifdef USE_NO_MMAP_FALLBACK
+ if (baseMalloced) {
+ if (Flags & ReadOnly)
+ return true;
+ unsigned long sz = Stop - Start;
+ lseek(savedFd.Fd(), Start, SEEK_SET);
+ return buf_write(savedFd.Fd(), ((char *) Base) + Start, sz);
+ }
+#endif
#ifdef _POSIX_SYNCHRONIZED_IO
- unsigned long PSize = sysconf(_SC_PAGESIZE);
- if ((Flags & ReadOnly) != ReadOnly)
- if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
- return _error->Errno("msync","Unable to write mmap");
-#endif
+ if ((Flags & ReadOnly) != ReadOnly) {
+ unsigned long PSize = sysconf(_SC_PAGESIZE);
+ if (msync((char *)Base+(int)(Start/PSize)*PSize,Stop - Start,MS_SYNC) != 0)
+ return _error->Errno("msync","Unable to write mmap");
+ }
+#endif
return true;
}
/*}}}*/
diff -urp apt-0.6.25.orig/apt-pkg/contrib/mmap.h apt-0.6.25/apt-pkg/contrib/mmap.h
--- apt-0.6.25.orig/apt-pkg/contrib/mmap.h 2001-05-13 23:16:43.000000000 -0600
+++ apt-0.6.25/apt-pkg/contrib/mmap.h 2005-06-14 16:49:21.000000000 -0600
@@ -32,6 +32,39 @@
#include <string>
#include <apt-pkg/fileutl.h>
+#include <config.h>
+
+#ifdef USE_NO_MMAP_FALLBACK
+# include <map>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+
+# include <iostream>
+
+struct key {
+ ino_t inode;
+ dev_t device;
+};
+
+struct mem_cache {
+ void *ptr;
+ size_t len;
+ short ref_count;
+};
+
+
+struct stat_eq {
+ bool operator()(struct key k1, struct key k2) const {
+ if (k1.inode == k2.inode)
+ return (k1.device < k2.device);
+ return (k1.inode < k2.inode);
+ }
+};
+
+using std::map;
+#endif
+
using std::string;
/* This should be a 32 bit type, larger tyes use too much ram and smaller
@@ -41,6 +74,17 @@ typedef unsigned int map_ptrloc;
class MMap
{
+#ifdef USE_NO_MMAP_FALLBACK
+ private:
+
+ static map<struct key, struct mem_cache, stat_eq > cached_mem;
+
+ bool baseMalloced;
+ FileFd savedFd;
+ struct key my_key;
+ bool fill_buffer(int fd, void **buf, unsigned long size);
+#endif
+
protected:
unsigned long Flags;
diff -urp apt-0.6.25.orig/apt-pkg/pkgcachegen.cc apt-0.6.25/apt-pkg/pkgcachegen.cc
--- apt-0.6.25.orig/buildlib/config.h.in 2002-11-22 00:15:23.000000000 -0700
+++ apt-0.6.25/buildlib/config.h.in 2005-06-14 17:05:20.000000000 -0600
@@ -43,3 +43,6 @@
/* The package name string */
#undef PACKAGE
+
+/* Define if mmap() emulation is needed. */
+#undef USE_NO_MMAP_FALLBACK
diff -urp apt-0.6.25.orig/configure.in apt-0.6.25/configure.in
--- apt-0.6.25.orig/configure.in 2004-06-09 06:30:22.000000000 -0600
+++ apt-0.6.25/configure.in 2005-06-14 17:00:49.000000000 -0600
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.25")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.25-realm1")
PACKAGE="apt"
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
AC_SUBST(PACKAGE)
@@ -189,6 +189,11 @@ rc_GLIBC_VER
rc_LIBSTDCPP_VER
ah_GCC3DEP
+AC_ARG_ENABLE(mmap-fallback,
+ [ --enable-mmap-fallback Support emulation of mmap() ],
+ AC_DEFINE(USE_NO_MMAP_FALLBACK, 1,
+ ["Define if mmap() emulation is needed"]))
+
dnl It used to be that the user could select translations and that could get
dnl passed to the makefiles, but now that can only work if you use special
dnl gettext approved makefiles, so this feature is unsupported by this.
diff -urp apt-0.6.25.orig/debian/changelog apt-0.6.25/debian/changelog
--- apt-0.6.25.orig/debian/changelog 2004-06-09 06:33:17.000000000 -0600
+++ apt-0.6.25/debian/changelog 2005-06-14 16:54:13.000000000 -0600
@@ -1,4 +1,11 @@
+apt (0.6.25-realm1) experimental; urgency=low
+
+ * Add mmap() emulation to apt for platforms which don't support
+ shared writable mmap.
+
+ -- Matthew S. Wood <matt@realmsys.com> Tue, 14 Jun 2005 16:53:42 -0600
+
apt (0.6.25) experimental; urgency=low
* Fix handling of two-part sources for sources.list deb-src entries in
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to Matt Zimmerman <mdz@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #10 received at 314334@bugs.debian.org (full text, mbox, reply):
severity 314334 wishlist thanks On Wed, Jun 15, 2005 at 01:14:13PM -0600, Matthew S. Wood wrote: > Package: apt > Version: 0.5.28.6 > Severity: important > Tags: patch > > APT doesn't work on filesystems which don't support shared writable mmap. > This is significant for hand-held devices which use NAND flash as a data > store. These devices typically use a filesystem like JFFS2, which lacks > shared writable mmap support. > > The attached patch optionally implements [at compile time] support for > mmap() emulation within APT. In order for this support to properly > function, a modification to the FileFd class was required. This > modification makes the FileFd class keep a cache of open files, such that > if two contexts both hold the same file descriptor, the file descriptor > isn't closed until both FileFd destructors are called. Thanks for the patch. I am hesitant to complicate the code in this way in order to implement such a workaround, though (especially with preprocessor macros). I expect it would be more gracefully implemented as a derived class. What do you think? -- - mdz
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to "James Harper" <james.harper@bendigoit.com.au>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #15 received at 314334@bugs.debian.org (full text, mbox, reply):
I'm just testing OCFS2 as a root filesystem, and apt breaks because OCFS2 (and probably GFS) don't support shared writable mmap's. For OCFS2 at least, this support is on the todo list but not really near the top. Any chance of an updated patch or, even better, something that detects at runtime what the underlying filesystem supports and adjusts accordingly? Thanks James
Severity set to `wishlist'.
Request was from Matt Zimmerman <mdz@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to Paul Sladen <debian@paul.sladen.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #22 received at 314334@bugs.debian.org (full text, mbox, reply):
Hit this "apt relying on shared writeable" issue today with a jffs2 issue. N800/Maemo seem to have got around this by (I think using an older version of apt?); it's all a bit messy and could really do with handling transparently within apt. First messages I found on this were from 2001, over at handhelds.org. Another option may just be to skipping the cacheing completely---it's probably a bit unnecessary on flash devices with (relatively low) seek times. -Paul -- Why do one side of a triangle when you can do all three. Helsinki, FI.
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to "Lord of, St. Luke Valor" <lord.of.valor@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #27 received at 314334@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Dear M Sladen: Is it possible to respond with a more specific description of the jfs2/apt conflict? Any response is beneficial. Due to the distributed nature of Bug Responses, someone may already be developing a patch. Thank you for your contribution. Luke On 11/28/07, Paul Sladen <debian@paul.sladen.org> wrote: > > Hit this "apt relying on shared writeable" issue today with a jffs2 issue. > > N800/Maemo seem to have got around this by (I think using an older version > of apt?); it's all a bit messy and could really do with handling > transparently within apt. > > First messages I found on this were from 2001, over at handhelds.org. > Another option may just be to skipping the cacheing completely---it's > probably a bit unnecessary on flash devices with (relatively low) seek > times. > > -Paul > -- > Why do one side of a triangle when you can do all three. Helsinki, FI. > > > > > -- > To UNSUBSCRIBE, email to deity-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact > listmaster@lists.debian.org > >
[Message part 2 (text/html, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to Daniel Burrows <dburrows@debian.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #32 received at 314334@bugs.debian.org (full text, mbox, reply):
On Wed, Nov 28, 2007 at 12:10:14PM -0500, "Lord of, St. Luke Valor" <lord.of.valor@gmail.com> was heard to say: > Is it possible to respond with a more specific description of the jfs2/apt > conflict? Any response is beneficial. The conflict is described in the bug log, along with some commentary on possible solutions. Basically, some filesystem drivers that are used for embedded devices don't support shared writable mmaps, but apt requires them. Daniel
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to Petr Cervenka <Petr.Cervenka@interzonegames.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #37 received at 314334@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi i have same problem with OCFS2, in chroot environment I can not do any work with apt, is there some option that allowed me to switch of mmap? Is there any solution for this in debian etch? Thanks Petr Cervenka IZ Linux System Administrator
[Message part 2 (text/html, inline)]
Information forwarded to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(full text, mbox, link).
Acknowledgement sent to Andres Salomon <dilinger@queued.net>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(full text, mbox, link).
Message #42 received at 314334@bugs.debian.org (full text, mbox, reply):
Hi,
Here's a workaround; keep the package caches on tmpfs.
dilinger@fred:~$ grep cache /etc/fstab
tmpfs /var/cache/apt/cache tmpfs defaults 0 0
dilinger@fred:~$ cat /etc/apt/apt.conf
Dir {
Cache "var/cache/apt/" {
srcpkgcache "cache/srcpkgcache.bin";
pkgcache "cache/pkgcache.bin";
};
};
tmpfs is capable of shared writeable mmap, so with this apt is usable
on jffs2.
Information forwarded
to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(Fri, 26 Feb 2010 21:36:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Loïc Minier <lool@dooz.org>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(Fri, 26 Feb 2010 21:36:03 GMT) (full text, mbox, link).
Message #47 received at 314334@bugs.debian.org (full text, mbox, reply):
Hi I was pointed at this patch by an Ubuntu user: http://www.mail-archive.com/maemo-commits@maemo.org/msg00201.html http://gitorious.org/mamona/openembedded/commit/4d4933fd97b85a52e48a5fa1a97bd34532864e32 apparently developed for Maemo (I guess before switching to ubifs) and then picked up for mamona. Cheers -- Loïc Minier
Information forwarded
to debian-bugs-dist@lists.debian.org, APT Development Team <deity@lists.debian.org>:
Bug#314334; Package apt.
(Sat, 27 Feb 2010 01:03:03 GMT) (full text, mbox, link).
Acknowledgement sent
to David Kalnischkies <kalnischkies+debian@gmail.com>:
Extra info received and forwarded to list. Copy sent to APT Development Team <deity@lists.debian.org>.
(Sat, 27 Feb 2010 01:03:03 GMT) (full text, mbox, link).
Message #52 received at 314334@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hi Loïc Minier! 2010/2/26 Loïc Minier <lool@dooz.org>: > I was pointed at this patch by an Ubuntu user: > http://www.mail-archive.com/maemo-commits@maemo.org/msg00201.html > http://gitorious.org/mamona/openembedded/commit/4d4933fd97b85a52e48a5fa1a97bd34532864e32 Thanks for the pointers, unfortunately the patches never reached "upstream" before - very bad as it is already three years old… I have no facility to test it but at least it was tested by maemo and openembedded so it can't be that bad and even if it would be bad it can't be more bad than a failing apt anyway. ;) Attach is a refreshed patch which should apply fine on top of the recent apt's in version 0.7.25 or 0.7.26~exp2 -- and it would be brilliant if someone could test it. :) Thanks again and Best regards / Mit freundlichen Grüßen, David Kalnischkies
[fallback-for-filesystem-without-mmap.patch (application/octet-stream, attachment)]
Added tag(s) pending.
Request was from David Kalnischkies <kalnischkies+debian@gmail.com>
to control@bugs.debian.org.
(Thu, 01 Apr 2010 21:27:11 GMT) (full text, mbox, link).
Reply sent
to Michael Vogt <mvo@debian.org>:
You have taken responsibility.
(Sat, 03 Apr 2010 13:42:08 GMT) (full text, mbox, link).
Notification sent
to "Matthew S. Wood" <matt@realmsys.com>:
Bug acknowledged by developer.
(Sat, 03 Apr 2010 13:42:08 GMT) (full text, mbox, link).
Message #59 received at 314334-close@bugs.debian.org (full text, mbox, reply):
Source: apt
Source-Version: 0.7.26~exp3
We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive:
apt-doc_0.7.26~exp3_all.deb
to main/a/apt/apt-doc_0.7.26~exp3_all.deb
apt-transport-https_0.7.26~exp3_i386.deb
to main/a/apt/apt-transport-https_0.7.26~exp3_i386.deb
apt-utils_0.7.26~exp3_i386.deb
to main/a/apt/apt-utils_0.7.26~exp3_i386.deb
apt_0.7.26~exp3.dsc
to main/a/apt/apt_0.7.26~exp3.dsc
apt_0.7.26~exp3.tar.gz
to main/a/apt/apt_0.7.26~exp3.tar.gz
apt_0.7.26~exp3_i386.deb
to main/a/apt/apt_0.7.26~exp3_i386.deb
libapt-pkg-dev_0.7.26~exp3_i386.deb
to main/a/apt/libapt-pkg-dev_0.7.26~exp3_i386.deb
libapt-pkg-doc_0.7.26~exp3_all.deb
to main/a/apt/libapt-pkg-doc_0.7.26~exp3_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 314334@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Vogt <mvo@debian.org> (supplier of updated apt package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Thu, 01 Apr 2010 17:30:43 +0200
Source: apt
Binary: apt apt-doc libapt-pkg-dev libapt-pkg-doc apt-utils apt-transport-https
Architecture: source all i386
Version: 0.7.26~exp3
Distribution: experimental
Urgency: low
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Michael Vogt <mvo@debian.org>
Description:
apt - Advanced front-end for dpkg
apt-doc - Documentation for APT
apt-transport-https - APT https transport
apt-utils - APT utility programs
libapt-pkg-dev - Development files for APT's libapt-pkg and libapt-inst
libapt-pkg-doc - Documentation for APT development
Closes: 314334 316390 351056 352667 383257 486222 500560 512046 512318 536029 558103 567669 570962 571037 572259 572364 572615 573293 573592 573946 574558 574944 574962
Changes:
apt (0.7.26~exp3) experimental; urgency=low
.
[ Christian Perrier ]
* German translation update. Closes: #571037
* Spanish manpages translation update. Closes: #573293
* Dutch translation update. Closes: #573946
* Polish manpages translation update. Closes: #574558
* Add "manpages-pl (<< 20060617-3~)" to avoid file conflicts with
that package that was providing some manpages for APT utilities.
.
[ David Kalnischkies ]
* [BREAK] merge MultiArch-ABI. We don't support MultiArch,
but we support the usage of the new ABI so libapt users
can start to prepare for MultiArch (Closes: #536029)
* Ignore :qualifiers after package name in build dependencies
in the library by default, but try to honour them in apt-get
as we have some sort of MultiArch support ready (Closes: #558103)
* add translation of the manpages to PT (portuguese)
Thanks to Américo Monteiro!
* Switch to dpkg-source 3.0 (native) format
* apt-pkg/depcache.cc:
- remove Auto-Installed information from extended_states
together with the package itself (Closes: #572364)
* cmdline/apt-mark:
- don't crash if no arguments are given (Closes: #570962)
* debian/control:
- remove some years old and obsolete Replaces
- add automake/conf build-depends/conflicts as recommend by
the autotools-dev README (Closes: #572615)
* apt-pkg/contrib/mmap.{h,cc}:
- add char[] fallback for filesystems without shared writable
mmap() like JFFS2. Thanks to Marius Vollmer for writing
and to Loïc Minier for pointing to the patch! (Closes: #314334)
* doc/apt_preferences.5.xml:
- fix two typos and be more verbose in the novice warning.
Thanks to Osamu Aoki for pointing it out! (Closes: #567669)
- fix a=sid vs. n=sid typo, thanks Ansgar Burchardt!
- origin can be used to match a hostname (Closes: #352667)
- remove wrong pin-priority is optional remark (Closes: #574944)
* apt-pkg/deb/dpkgpm.cc:
- fix error message construction in OpenLog()
- if available store the Commandline in the history
* cmdline/apt-get.cc:
- add a --only-upgrade flag to install command (Closes: #572259)
- fix memory leaks in error conditions in DoSource()
- try version match in FindSrc first exact than fuzzy (LP: #551178)
* apt-pkg/contrib/cmndline.cc:
- save Commandline in Commandline::AsString for logging
* apt-pkg/deb/debversion.cc:
- consider absent of debian revision equivalent to 0 (Closes: #573592)
* doc/makefile, doc/*:
- generate subdirectories for building the manpages in on the fly
depending on the po files we have.
* apt-pkg/pkgcachegen.cc:
- merge versions correctly even if multiple different versions
with the same version number are available.
Thanks to Magnus Holmgren for the patch! (Closes: #351056)
* ftparchive/writer.cc:
- write LongDescriptions if they shouldn't be included in Packages
file into i18n/Translation-en by default.
* doc/po/de.po:
- correct a few typos in the german manpage translation.
Thanks to Chris Leick and Georg Koppen! (Closes: #574962)
* apt-pkg/contrib/strutl.cc:
- convert all toupper calls to tolower_ascii for a little speedup
.
[ Jean-Baptiste Lallement ]
* apt-pkg/contrib/strutl.cc:
- always escape '%' (LP: #130289) (Closes: #500560)
- unescape '%' sequence only if followed by 2 hex digit
- username/password are urlencoded in proxy string (RFC 3986)
.
[ Julian Andres Klode ]
* cmdline/apt-cache.cc:
- Change behavior of showsrc to match the one of show (Closes: #512046).
* cmdline/apt-key:
- Honor Apt::GPGV::TrustedKeyring (Closes: #316390)
* cmdline/apt-mark:
- Use the new python-apt API (and conflict with python-apt << 0.7.93.2).
* apt-inst/contrib/arfile.h:
- Add public ARArchive::Members() which returns the list of members.
* apt-pkg/policy.cc:
- Always return a candidate if there is at least one version pinned > 0
(Closes: #512318)
* ftparchive/apt-ftparchive.cc:
- Read default configuration (Closes: #383257)
* debian/rules:
- Fix the libraries name to be e.g. libapt-pkg4.9 instead of
libapt-pkg-4.9.
.
[ Michael Vogt ]
* apt-pkg/deb/dpkgpm.cc:
- fix backgrounding when dpkg runs (closes: #486222)
* cmdline/apt-mark:
- show error on incorrect aguments (LP: #517917), thanks to
Torsten Spindler
* cmdline/apt-get.cc:
- if apt-get source foo=version or foo/distro can not be found,
error out (LP: #502641)
* apt-pkg/packagemanager.cc:
- better debug output
* doc/examples/configure-index:
- add missing Debug::pkgPackageManager option
Checksums-Sha1:
e7c360358322b886317869d8e030eb42935b6088 1296 apt_0.7.26~exp3.dsc
6dc73a06690e4e7d9489c03434c2d712cc202f46 2797544 apt_0.7.26~exp3.tar.gz
eeda8472a6f0a1448f6d2ea598d12a5cbed07a78 224746 apt-doc_0.7.26~exp3_all.deb
4ce0cd85664685b49055714988434f0c436d5b62 136328 libapt-pkg-doc_0.7.26~exp3_all.deb
bec8e4527083d53a1c7dbebcf49ff2ae0402f5c6 1958384 apt_0.7.26~exp3_i386.deb
30abc1070ba1b9a6e4c4b25c702f5b8a9d010c5c 127168 libapt-pkg-dev_0.7.26~exp3_i386.deb
1184ac795005a143bb53e531e657427150e62a9c 256662 apt-utils_0.7.26~exp3_i386.deb
83a38f7c40ce1e5d56b06bddfee1ffc28011433a 72390 apt-transport-https_0.7.26~exp3_i386.deb
Checksums-Sha256:
74eafab3c250e7880e13c84cce5979e752ab3724a040272df1e22ed7341a1f0c 1296 apt_0.7.26~exp3.dsc
4d6d202a11fe19fd3adf1796cc5a7ca5272422fa59f3bc42fa856adb36c53f17 2797544 apt_0.7.26~exp3.tar.gz
8f7099fef8a1fade01e59d58c9a2fa8d5089951d3c967654d91779fda41081aa 224746 apt-doc_0.7.26~exp3_all.deb
d365f216c36731928b8c9dd215a746d0b4e3618e7d4cf9df5cd6309beac18709 136328 libapt-pkg-doc_0.7.26~exp3_all.deb
fe0565c7142c56880c7cdd4e01a0507f98ed49311883e4f812b0c4b58309f737 1958384 apt_0.7.26~exp3_i386.deb
9ad110fdca7bb756688eba867eca70aee035161f45d00cf89c3cfc4e07383120 127168 libapt-pkg-dev_0.7.26~exp3_i386.deb
9a73543c7929be398c58cf31ec68afee128d6474894675c92dd60a489aabe211 256662 apt-utils_0.7.26~exp3_i386.deb
93ab85d709d3c9fa16d780f4aafdb72f18fd62c3c053043896954434f67a73b9 72390 apt-transport-https_0.7.26~exp3_i386.deb
Files:
c415727401d80f152aaeb5daecbb8289 1296 admin important apt_0.7.26~exp3.dsc
60435d361e1290399cab52351d249427 2797544 admin important apt_0.7.26~exp3.tar.gz
e81fffc8223066b10fc783ecfd8c6c8a 224746 doc optional apt-doc_0.7.26~exp3_all.deb
5cfab1c47b528eeefe199474c0eac0c9 136328 doc optional libapt-pkg-doc_0.7.26~exp3_all.deb
43dc64a1652cf39bc76b9417f2b625f6 1958384 admin important apt_0.7.26~exp3_i386.deb
f02a3c41eeb1d7ed37f9f2f6d5c1b21f 127168 libdevel optional libapt-pkg-dev_0.7.26~exp3_i386.deb
d4a5c686ce77e840ec38d1524ec96ab7 256662 admin important apt-utils_0.7.26~exp3_i386.deb
83a40028a4a41ae2ecdc3fb668abcd05 72390 admin optional apt-transport-https_0.7.26~exp3_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAku0xOEACgkQliSD4VZixzSJywCgh+y8pcjt/Aj6fnTLJbLaM/QC
tWgAnA/t4+t8N/eNz2M6rg790S3NJdiU
=QUUE
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sun, 02 May 2010 07:32:48 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.