First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 57912
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Billy Holmes <billy@gonoph.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
cloop-2.01-r4.ebuild my ebuild that works with amd64 and linux 2.6 text/plain Billy Holmes 2004-07-21 16:08 0000 2.05 KB Details
kernel26_amd64.patch a patch that addes 2.6 support and compiler flags for amd64 patch Billy Holmes 2004-07-21 16:09 0000 2.07 KB Details | Diff
cloop-2.01-r4.ebuild new ebuild that fixes compile errors text/plain Billy Holmes 2004-11-22 09:37 0000 2.50 KB Details
kernel-2.6.8-fs_h-fix.patch patch for 2.6.8 and up based systems that fixes code that relies on linux/fs.h patch Billy Holmes 2004-11-22 09:39 0000 759 bytes Details | Diff
cloop-2.01-r5.ebuild cloop-2.01-r5.ebuild for the new cloop text/plain Billy Holmes 2004-11-22 09:58 0000 2.57 KB Details
cloop-2.01.5.ebuild cloop-2.01.5.ebuild text/plain Stefan Schweizer 2004-11-22 11:47 0000 1.61 KB Details
cloop.amd64.patch cloop.amd64.patch text/plain Stefan Schweizer 2004-11-22 11:48 0000 2.02 KB Details
cloop-2.01.5-r1.ebuild ebuild based on 2.01.5 with new patch text/plain Billy Holmes 2004-11-22 13:40 0000 1.65 KB Details
cloop.zlib-amd64.patch cloop.zlib-amd64.patch patch Billy Holmes 2004-11-22 13:42 0000 1.02 KB Details | Diff
cloop-2.01.5-r1.ebuild cloop-2.01.5.ebuild with use amd64 text/plain Billy Holmes 2004-11-23 14:44 0000 1.66 KB Details
cloop.zlib-amd64.patch cloop.zlib-amd64.patch patch Billy Holmes 2004-11-23 15:27 0000 1.07 KB Details | Diff
cloop-2.01.5.ebuild cloop-2.01.5.ebuild - new patches + make clean text/plain Billy Holmes 2004-11-24 08:48 0000 1.71 KB Details
cloop.cplusplus-syntax-fix.patch cloop.cplusplus-syntax-fix.patch patch Billy Holmes 2004-11-24 08:54 0000 2.02 KB Details | Diff
cloop.kern26.patch cloop.kern26.patch patch Billy Holmes 2004-11-24 08:55 0000 3.66 KB Details | Diff
cloop.zlib-amd64.patch cloop.zlib-amd64.patch (cleaned) patch Billy Holmes 2004-11-24 08:56 0000 1.19 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 57912 depends on: Show dependency tree
Show dependency graph
Bug 57912 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-07-21 16:05 0000
Attached you will find my first go at a contributed ebuild. I patched the
vanilla cloop_2.01-4 so that it would compile against my amd64 running
2.6.7-ck5.

Reproducible: Always
Steps to Reproduce:
1. ACCEPT_KEYWORDS="~amd64" emerge cloop
2. modprobe cloop file=/tmp/KNOPPIX
3. mount -t iso9660 /dev/cloop/0 /mnt/cdrom

Actual Results:  
I was able to see my custom KNOPPIX compressed disk perfectly.

Expected Results:  
It should have failed to compile as the other cloop ebuilds don't support Linux
2.6 nor amd64.

The resulting module taints the kernel as there isn't a 'struct_module' in the
versions[] array. I didn't want to add a patch that would create it, as I feel
this module is very unstable, and it should remain tainted until someone with
more kernel knowledge looks at the code.

At one point, I couldn't see any cloop devices, and I had to reboot before I
could see the cloop devices. I am not certain if it's related to the module, or
other dealings that had been done on the machine that day.

------- Comment #1 From Billy Holmes 2004-07-21 16:08:30 0000 -------
Created an attachment (id=35926) [edit]
my ebuild that works with amd64 and linux 2.6

------- Comment #2 From Billy Holmes 2004-07-21 16:09:34 0000 -------
Created an attachment (id=35927) [edit]
a patch that addes 2.6 support and compiler flags for amd64

------- Comment #3 From Danny van Dyk (RETIRED) 2004-10-12 09:32:17 0000 -------
it's up to base-system to decide if this can be used. As soon as it's in, i'll
test it on amd64.

------- Comment #4 From Stefan Schweizer 2004-11-19 14:21:56 0000 -------
bugs 69071 and 69072 are duplicates.
Latest is -5

The latest version does not build for me:

cc -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default -march=i586 -fomit-frame-pointer -pipe -Os -D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop" -D__OPTIMIZE__ compressed_loop.c -c -o compressed_loop.o
compressed_loop.c: In function `clo_read_actor':
compressed_loop.c:205: error: structure has no member named `buf'
compressed_loop.c: In function `clo_read_from_file':
compressed_loop.c:231: error: structure has no member named `buf'
make: *** [compressed_loop.o] Error 1


We obviously need another patch ;)

The ebuild is a hell of a mess: inheritting twice, kernel-mod_get_version in global context. checks should e done in pkg_setup using the new methods provided by kernel-mod.eclass

------- Comment #5 From Stefan Schweizer 2004-11-20 06:44:01 0000 -------
*** Bug 69072 has been marked as a duplicate of this bug. ***

------- Comment #6 From Stefan Schweizer 2004-11-20 06:44:26 0000 -------
*** Bug 69071 has been marked as a duplicate of this bug. ***

------- Comment #7 From Billy Holmes 2004-11-22 09:37:48 0000 -------
Created an attachment (id=44472) [edit]
new ebuild that fixes compile errors

2.6.8 introduced changes in linux/fs.h. It added an arg union to
read_descriptor_t. Into that union was defined *buf and a new pointer *data.
Thus, old code that referenced ->buf needed to be changed to reference
->arg.buf.

------- Comment #8 From Billy Holmes 2004-11-22 09:39:26 0000 -------
Created an attachment (id=44473) [edit]
patch for 2.6.8 and up based systems that fixes code that relies on linux/fs.h

------- Comment #9 From Billy Holmes 2004-11-22 09:58:11 0000 -------
Created an attachment (id=44475) [edit]
cloop-2.01-r5.ebuild for the new cloop

this ebuild also fixes some ugly displays in the emerge. mainly in the way
kernel-mod_is_2_6_kernel and kernel-mod_is_2_4_kernel from kernel-mod.eclass
call kernel-mod_getversion each time.

------- Comment #10 From Stefan Schweizer 2004-11-22 11:47:07 0000 -------
Created an attachment (id=44486) [edit]
cloop-2.01.5.ebuild

Cleaned-up ebuild

base-system: Can I take this bug?

------- Comment #11 From Stefan Schweizer 2004-11-22 11:48:39 0000 -------
Created an attachment (id=44487) [edit]
cloop.amd64.patch

Additional patch for amd64.

amd64: Can you please verify if this patch is really needed?

------- Comment #12 From Billy Holmes 2004-11-22 13:40:29 0000 -------
Created an attachment (id=44494) [edit]
ebuild based on 2.01.5 with new patch

this ebuild just adds an epatch line to add cloop.zlib-amd64.patch to the
source

------- Comment #13 From Billy Holmes 2004-11-22 13:42:32 0000 -------
Created an attachment (id=44495) [edit]
cloop.zlib-amd64.patch

this patches create_compressed_fs to handle 64-bit integers. zlib on amd64
already handles it, but the source in the cloop module assumes certain things
about bit-ness.

------- Comment #14 From Billy Holmes 2004-11-22 13:46:27 0000 -------
cloop.amd64.patch: I didn't notice anything detrimental by not having this
patch. The patch looks more about fixing C++ syntax than anything else.

------- Comment #15 From Stefan Schweizer 2004-11-23 10:38:44 0000 -------
ok, I talked to vapier, it is my pkg now :)

------- Comment #16 From Stefan Schweizer 2004-11-23 14:01:21 0000 -------
make[1]: Entering directory `/var/tmp/portage/cloop-2.01.5/work/cloop-2.01/advancecomp-1.9_create_compressed_fs'
g++ -DHAVE_CONFIG_H -I. -I. -I.      -g -O3 -DUSE_ERROR_SILENT -DUSE_COMPRESS -c -o advfs.o `test -f 'advfs.cc' || echo './'`advfs.cc
cc -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default -march=i586 -fomit-frame-pointer -pipe -Os -D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop" -D__OPTIMIZE__ compressed_loop.c -c -o compressed_loop.o
advfs.cc:33:1: warning: "__OPTIMIZE__" redefined
<built-in>:64:1: warning: this is the location of the previous definition
advfs.cc: In function `cb_list* create_compressed_blocks(int, long unsigned int, long unsigned int*, int)':
advfs.cc:114: error: invalid initialization of non-const reference of type 'unsigned int&' from a temporary of type 'unsigned int'
compress.h:60: error: in passing argument 3 of `bool compress_zlib(shrink_t, unsigned char*, unsigned int&, const unsigned char*, unsigned int)'
cc -o extract_compressed_fs extract_compressed_fs.o -lz
make[1]: *** [advfs.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/cloop-2.01.5/work/cloop-2.01/advancecomp-1.9_create_compressed_fs'
make: *** [advancecomp-1.9_create_compressed_fs/advfs] Error 2
make: *** Waiting for unfinished jobs....

Compile error with your last patch

------- Comment #17 From Billy Holmes 2004-11-23 14:38:27 0000 -------
I'm thinking that's a gcc type casting issue. gcc probably has changed the way
it type casts between certain versions. The reason I believe that is I can't
get that particular object file advfs.o to fail on any of my gentoo boxes:

amd64 2.6.9-ck3 (also tried in chroot)
i686  2.6.8-gentoo-r2
i686  2.6.9-ck1

In addition, I tried the patched source on a SUSE 9 box:

i686  2.4.18

on all the Gentoo machines, I'm running gcc 3.3.4

on the SUSE box I'm running gcc 2.95.3

I'm going to patch the ebuild and add a "use amd64" before that last patch. It
should fix the problem and allow it to compile. However, the cloop package
itself needs some serious patching as the author enjoys type casting.

I would like to figure out the issue with the patch installed, however, without
more information I'm unable to reproduce the failure.

------- Comment #18 From Billy Holmes 2004-11-23 14:44:48 0000 -------
Created an attachment (id=44606) [edit]
cloop-2.01.5.ebuild with use amd64

I'd like to keep the old ebuild, once I figure out the bug in the
cloop.zlib-amd64.patch, I'll obsolete this one.

------- Comment #19 From Stefan Schweizer 2004-11-23 14:51:48 0000 -------
I tested with gcc-3.4.3 here, I committed the ebuild without your zlib patch
for now, because gcc-3.4 is something that we currently have on many gentoo
machines and I do not know if it fails for amd64 with gcc 3.4.

------- Comment #20 From Billy Holmes 2004-11-23 15:27:01 0000 -------
Created an attachment (id=44608) [edit]
cloop.zlib-amd64.patch

gcc 3.4 must have become more strict in the way it handles C++ type casting.

[advancecomp-1.9_create_compressed_fs/compress.h] defines compress_zlib() with
: unsigned& out_size

This worked fine in older gcc versions, but 3.4 tries to type cast it out as if
it was called like so:

compress_zlib(level, out_data, &out_size, in_data, in_size);

instead of without the '&' as is in the source:

compress_zlib(level, out_data, out_size, in_data, in_size);

so, I added an interm variable to make 3.4 happy since the type casting happens
before it's c++ casting takes place.

Test on 3.4 and let me know if that fixes your compile error.

This patch is critical for the create_compressed_fs command to work on amd64.
Otherwise it segfaults.

------- Comment #21 From Stefan Schweizer 2004-11-24 06:46:24 0000 -------
thanks, I added your corrected patch.

Is this still needed for amd64 with your latest patch?

I would like to get everything for advfs in one patch to send it upstream.

diff -ru cloop-2.01/advancecomp-1.9_create_compressed_fs/advfs.cc cloop-2.01.new/advancecomp-1.9_create_compressed_fs/advfs.cc
--- cloop-2.01/advancecomp-1.9_create_compressed_fs/advfs.cc	2004-04-18 15:33:29.000000000 -0500
+++ cloop-2.01.new/advancecomp-1.9_create_compressed_fs/advfs.cc	2004-07-20 11:55:28.000000000 -0500
@@ -30,6 +30,7 @@
 #include "utility.h"
 #include "compress.h"
 #include "siglock.h"
+#define __OPTIMIZE__
 #include <netinet/in.h>
 
 #include "lib/mng.h"



PLease also look at how debian shipps the pkg:
(Only the last two diffs are important)
http://http.us.debian.org/debian/pool/main/c/cloop/cloop_2.01.5-1.diff.gz

I think it is better to do it in the same way as debian for the 2.6 kernel compatibility.

------- Comment #22 From Billy Holmes 2004-11-24 08:48:36 0000 -------
Created an attachment (id=44643) [edit]
cloop-2.01.5.ebuild - new patches + make clean

- merged the debian patch (last two diffs)
- added a make clean to the ebuild, because the package tarball has a Makefile
that was created via ./configure from the author's development box.
- moved the __OPTIMIZE__ patch in advfs.cc into the parent Makefile - it's
purpose is to fix 2.6 systems with broken headers or with 2.4 headers.

------- Comment #23 From Billy Holmes 2004-11-24 08:54:00 0000 -------
Created an attachment (id=44645) [edit]
cloop.cplusplus-syntax-fix.patch

- I wanted to give the patch a better name than cloop.amd64.patch
- this patch corrects some c++ syntax that gcc 3.4 might complain about

------- Comment #24 From Billy Holmes 2004-11-24 08:55:35 0000 -------
Created an attachment (id=44646) [edit]
cloop.kern26.patch

- merged patch from debian and obsoleted patch.
- fixes code that relies on linux/fs.h
- addes amd64 kernel flags to Makefile
- checks for 2.6 kernel

------- Comment #25 From Billy Holmes 2004-11-24 08:56:59 0000 -------
Created an attachment (id=44648) [edit]
cloop.zlib-amd64.patch (cleaned)

old cloop.zlib-amd64.patch is now off by one line. It will still patch, but
this one will patch without warnings.

First Last Prev Next    No search results available      Search page      Enter new bug