Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133797 - sysfsutils-2 breaks gnbd, multipath-tools
Summary: sysfsutils-2 breaks gnbd, multipath-tools
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Henrik Brix Andersen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-19 11:08 UTC by Andrej Filipcic
Modified: 2006-05-29 12:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Filipcic 2006-05-19 11:08:49 UTC
sys-cluster/gnbd-1.02.00 and sys-fs/multipath-tools-0.4.6.1-r1 do not compile with sys-fs/sysfsutils-2.0.0 when using revdep-rebuild. Maybe sysfsutils-2 should be masked until this issue is resolved
Comment 1 Henrik Brix Andersen 2006-05-19 12:16:21 UTC
Please provide relevant compilation errors.
Comment 2 Andrej Filipcic 2006-05-19 12:33:09 UTC
For example, in multipath-tools:

x86_64-pc-linux-gnu-gcc -pipe -g -Wall -Wunused -Wstrict-prototypes   -c -o discovery.o discovery.c
discovery.c: In function `path_discovery':
discovery.c:67: warning: implicit declaration of function `sysfs_open_directory'
discovery.c:67: warning: assignment makes pointer from integer without a cast
discovery.c:72: warning: implicit declaration of function `sysfs_read_directory'
discovery.c:74: error: dereferencing pointer to incomplete type
discovery.c:74: error: dereferencing pointer to incomplete type
discovery.c:74: error: dereferencing pointer to incomplete type
discovery.c:74: error: dereferencing pointer to incomplete type
discovery.c:74: error: dereferencing pointer to incomplete type
discovery.c:78: error: dereferencing pointer to incomplete type
discovery.c:81: error: dereferencing pointer to incomplete type
discovery.c:84: warning: implicit declaration of function `sysfs_close_directory'
discovery.c:91: error: dereferencing pointer to incomplete type
discovery.c:99: error: dereferencing pointer to incomplete type
discovery.c: In function `sysfs_get_vendor':
discovery.c:179: warning: implicit declaration of function `sysfs_read_attribute_value'
discovery.c: In function `devt2devname':
discovery.c:240: warning: assignment makes pointer from integer without a cast
discovery.c:243: error: dereferencing pointer to incomplete type
discovery.c:243: error: dereferencing pointer to incomplete type
discovery.c:243: error: dereferencing pointer to incomplete type
discovery.c:243: error: dereferencing pointer to incomplete type
discovery.c:243: error: dereferencing pointer to incomplete type
discovery.c:244: error: dereferencing pointer to incomplete type
discovery.c:259: error: dereferencing pointer to incomplete type
make[2]: *** [discovery.o] Error 1

where a part of discovery.c is:
 67         sdir = sysfs_open_directory(path);
 68
 69         if (!sdir)
 70                 return 1;
 71
 72         sysfs_read_directory(sdir);
 73
 74         dlist_for_each_data(sdir->subdirs, devp, struct sysfs_directory) {
 75                 if (!devp)
 76                         continue;
 77
 78                 if (blacklist(conf->blist, devp->name))
 79                         continue;



and for gnbd:


cc -O2 -pipe -Wall -I../../include -I../../server -I../../utils -I../../config -I//usr/include -O2 -DGNBD_RELEASE_NAME=\"1.02.00\"  gnbd_export.c ../../utils/gnbd_utils.c ../../utils/trans.c  -L//usr/lib -lmagma -ldl -lpthread -lsysfs -o gnbd_export
gnbd_export.c: In function `get_sysfs_name':
gnbd_export.c:358: warning: implicit declaration of function `sysfs_open_directory'
gnbd_export.c:358: warning: assignment makes pointer from integer without a cast
gnbd_export.c:364: warning: implicit declaration of function `sysfs_get_dir_subdirs'
gnbd_export.c:364: warning: assignment makes pointer from integer without a cast
gnbd_export.c:372: warning: implicit declaration of function `sysfs_get_directory_attribute'
gnbd_export.c:372: warning: assignment makes pointer from integer without a cast
gnbd_export.c:384: error: dereferencing pointer to incomplete type
gnbd_export.c:384: error: dereferencing pointer to incomplete type
gnbd_export.c:384: error: dereferencing pointer to incomplete type
gnbd_export.c:384: error: dereferencing pointer to incomplete type
gnbd_export.c:384: error: dereferencing pointer to incomplete type
gnbd_export.c:384: error: dereferencing pointer to incomplete type
gnbd_export.c:392: warning: implicit declaration of function `sysfs_close_directory'


where a part of gnbd_export.c is:

346 char *get_sysfs_name(char *dev_t){
347   unsigned char path[SYSFS_PATH_MAX], *name;
348   struct sysfs_directory *dir, *devdir;
349   struct dlist *devlist;
350
351   name = NULL;
352   if (sysfs_get_mnt_path(path, SYSFS_PATH_MAX) < 0){
353     printe("cannot get sysfs mount path for get_uid command : %s\n",
354            strerror(errno));
355     exit(1);
356   }
357   strcat(path, "/block");
358   dir = sysfs_open_directory(path);
359   if (!dir) {
360     printe("cannot open sysfs directory '%s' for get_uid command : %s\n",
361            path, strerror(errno));
362     exit(1);
363   }
364   devlist = sysfs_get_dir_subdirs(dir);
365   if (!devlist){
366     printe("cannot read sysfs subdirs for get_uid command : %s\n",
367            strerror(errno));
368     exit(1);
369   }
370   dlist_for_each_data(devlist, devdir, struct sysfs_directory) {
371     struct sysfs_attribute *attr;
372     attr = sysfs_get_directory_attribute(devdir, "dev");
373     if (!attr){
374       printe("cannot get 'dev' sysfs attribute for get_uid command : %s\n",
375              strerror(errno));
376       exit(1);
377     }
378     if (sysfs_read_attribute(attr) < 0){
379       printe("cannot get sysfs attribute data for get_uid command : %s\n",
380              strerror(errno));
381       exit(1);
382     }
383     if (strcmp(dev_t, attr->value) == 0){
384       name = strdup(devdir->name);
385       break;
386     }
387   }
388   if (!name){
389     printe("cannot find a sysfs block device for get_uid command\n");
390     exit(1);
391   }
392   sysfs_close_directory(dir);
393   return name;
394 }




Comment 3 Henrik Brix Andersen 2006-05-19 13:38:08 UTC
(In reply to comment #2)
> For example, in multipath-tools:

This should be fixed in multipath-tools-0.4.7, which is not yet in portage. Adding base-system to CC.

> and for gnbd:

I haven't been able to locate a patch for this package yet, but it shouldn't be hard to port is to libsysfs-2. Adding cluster to CC.
Comment 4 Henrik Brix Andersen 2006-05-27 13:16:00 UTC
I've p.masked sysfsutils-2.0.0 for now.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2006-05-28 07:40:09 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > For example, in multipath-tools:
> 
> This should be fixed in multipath-tools-0.4.7, which is not yet in portage.
> Adding base-system to CC.
> 

I added it the 22nd, so this should not be an issue any more ...
Comment 6 Henrik Brix Andersen 2006-05-28 07:47:27 UTC
(In reply to comment #5)
> I added it the 22nd, so this should not be an issue any more ...

Thanks. Still needs to get gnbd fixed...

Comment 7 Doug Goldstein (RETIRED) gentoo-dev 2006-05-29 11:16:59 UTC
Brix,

gnbd doesn't even list sysfsutils as a DEPEND or RDEPEND... which firstly means their package is broken.

Secondly, why couldn't that package just have a proper (R)DEPEND of "<catagory/sysfsutils-2.0.0"
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2006-05-29 11:18:13 UTC
Reason I say this Brix is because anytime we do an update that requires a revdep-rebuild and then people do it and then say "Just KIDDING!" and downgrade people... it requires another revdep-rebuild and then we release it again and it requires another revdep-rebuild... that's 3 in a row.. not good.
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2006-05-29 12:02:06 UTC
Brix and I talked about this.. multipath-tools is already set... gndb just needs a proper depend... and it's better not to force 3 revdep-rebuilds... so I'm unmasking.

Reopen as needed..

cluster herd: please look into gnbd.
Comment 10 Henrik Brix Andersen 2006-05-29 12:15:48 UTC
(In reply to comment #9)
> Brix and I talked about this.. multipath-tools is already set... gndb just
> needs a proper depend... and it's better not to force 3 revdep-rebuilds... so
> I'm unmasking.

Thank you for taking care of this, Doug. I appreciate your help.