Re: [kde-freebsd] k3b freebsd contact
On Saturday 17 October 2009 08:50:32 Andriy Gapon wrote: > on 15/10/2009 00:48 Jason E. Hale said the following: > > I'm attaching a shar containing what I have done so far for the k3b-kde4 > > port. I included Andriy's fix for cdrecord not being found as well. I > > came up with the same patch for the cd device not being found, but it > > seems like that may not be the right way to go according to Heiner. I am > > not much of a programmer, so I don't know. I just thought I would give > > this port a go since I didn't hear anything about it until a few days > > ago. I actually started doing this a while back but lost interest since > > K3B had terrible trouble with QT 4.4. Anyways, the port should at least > > build, run, and install and deinstall cleanly. I have only tried this > > with FreeBSD 7.2 i386 though. It should at least provide a good starting > > point. > > Jason, > > several mostly stylistic notes: > 1. Makefile header should be reset, all fields (Whom, Date, etc), because > this is going to be a new port. CVS version string should be reset to > $FreeBSD:$ I put this in shar form so it would be easier for people to test out. It really should be repocopied from the KDE3 version and updated from there, so the header should stay the same. > 2. I think that there should be a run dependency on cdrecord, > because k3b insists so strongly on having it. (Perhaps with alternative > choice of cdrecord-devel and cdrkit). I think it would be a good idea to try adding support for cdrkit. Adding support for cdrtools-devel might be a little more difficult since the USE_CDRTOOLS macro only supports plain cdrtools and cdrtools-cjk. Personally, I feel that if a user wants a -devel version of something they should handle that on their own (e.g. a port requiring MySQL is going to pull in the default version unless the user already installed the version they want). > BTW, it's interesting situation, this page says that cdrecord is a > mandatory dependency and cdrdao is an option one: > http://k3b.plainblack.com/requirements > But our port requires cdrdao and not mentions cdrecord at all :) The OPTIONS probably need a little work. I suppose cdrdao could be made optional. Taglib theoretically could be made optional, but since kdemultimedia4 is a requirement and it requires taglib, there is no point in disabling it. Musicbrainz support is in the same category, but there is still an option for it. Otherwise, I tried to be sensible with the defaults (e.g. enable anything that kdemultimedia4 would have already installed anyways). > 3. upstream now seems to be at version k3b-1.68.0alpha3 and > k3b-1.66.0alpha2 is not available > > The port looks great! Thank you! > I will try to post a new version soon, but I work 14+ hours a day so it might be not be until Wednesday or Thursday. In the meantime, it looks like k3b-1.66.0alpha2.tar.bz2 is still on Sourceforge, though: http://sourceforge.net/projects/k3b/files/k3b/1.66.0alpha2/k3b-1.66.0alpha2.tar.bz2/download In the port Makefile, change: MASTER_SITES= SF to: MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION} and it should fetch. Other thoughts: Since KDE4 is only for FreeBSD 7+ the FreeBSD 5.x and 6.x pkg-message can be dropped. pkg-descr and pkg-message-7 probably need touching up too (they are from the KDE3 version). Thanks for the feedback! - Jason ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
on 17/10/2009 15:50 Andriy Gapon said the following: > 2. I think that there should be a run dependency on cdrecord, because k3b > insists so strongly on having it. (Perhaps with alternative choice of > cdrecord-devel and cdrkit). > BTW, it's interesting situation, this page says that cdrecord is a mandatory > dependency and cdrdao is an option one: > http://k3b.plainblack.com/requirements > But our port requires cdrdao and not mentions cdrecord at all :) I was either stupid or temporarily blind: USE_CDRTOOLS= yes -- Andriy Gapon ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
on 15/10/2009 00:48 Jason E. Hale said the following: > > I'm attaching a shar containing what I have done so far for the k3b-kde4 > port. > I included Andriy's fix for cdrecord not being found as well. I came up with > the same patch for the cd device not being found, but it seems like that may > not be the right way to go according to Heiner. I am not much of a > programmer, so I don't know. I just thought I would give this port a go > since > I didn't hear anything about it until a few days ago. I actually started > doing this a while back but lost interest since K3B had terrible trouble with > QT 4.4. Anyways, the port should at least build, run, and install and > deinstall cleanly. I have only tried this with FreeBSD 7.2 i386 though. It > should at least provide a good starting point. Jason, several mostly stylistic notes: 1. Makefile header should be reset, all fields (Whom, Date, etc), because this is going to be a new port. CVS version string should be reset to $FreeBSD:$ 2. I think that there should be a run dependency on cdrecord, because k3b insists so strongly on having it. (Perhaps with alternative choice of cdrecord-devel and cdrkit). BTW, it's interesting situation, this page says that cdrecord is a mandatory dependency and cdrdao is an option one: http://k3b.plainblack.com/requirements But our port requires cdrdao and not mentions cdrecord at all :) 3. upstream now seems to be at version k3b-1.68.0alpha3 and k3b-1.66.0alpha2 is not available The port looks great! Thank you! -- Andriy Gapon ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
on 15/10/2009 13:15 Andriy Gapon said the following: > There is the following note in that manual page: > cam_open_device() is rather simple > to use, but it is not really suitable for general use because its behav‐ > ior is not necessarily deterministic. Programmers writing new applica‐ > tions should make the extra effort to use one of the other open routines > documented below. > But I am not sure now valid it is. Because I can't imagine that it is > principally > impossible to put the same code into libcam that a programmer would put in > his > code. I.e. I don't think that I could do cdX to passX any smarter than > cam_open_device does it. And if I could, then I'd rather put that code into > cam_open_device anyway, so that everyone could benefit from it. BTW, I talked to Scott Long about this note and he said that it is about the case when the path provided is not a full path, i.e. just "cd0". And it comes from pre-devfs MAKEDEV days, when one could have /dev/cd0 and /mydev/cd0 devices and they would refer to different physical devices. Nowadays, it should be entirely safe to use cam_open_device(). -- Andriy Gapon ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
on 14/10/2009 23:24 Heiner said the following: > On Wednesday 14 October 2009, Andriy Gapon wrote: >> 1. Without this k3b doesn't find my DVD writer. It seems that it tries >> cam_open_pass on /dev/cd0 which fails. >> Index: libk3bdevice/k3bdevice.cpp >> === >> --- libk3bdevice/k3bdevice.cpp (revision 1034980) >> +++ libk3bdevice/k3bdevice.cpp (working copy) >> @@ -157,7 +157,7 @@ >> #ifdef Q_OS_FREEBSD >> K3b::Device::Device::Handle K3b::Device::openDevice( const char* name, >> bool write ) { >> -K3b::Device::Device::Handle handle = cam_open_pass (name, O_RDWR,0 /* >> NULL */); +K3b::Device::Device::Handle handle = cam_open_device( name, >> O_RDWR ); kDebug() << "(K3b::Device::openDevice) open device " << name << >> ((handle)?" succeeded.":" failed.") << endl; >> return handle; > > Hi! > > I am not sure, if this is a good idea. FreeBSD requires two devices to access > the CD: the /dev/cdX and the /dev/passX device (and sometimes the bus, targt, > lun ids). On the console, I read during the k3b startup: Heiner, I think that what you wrote is not entirely correct. We don't have to access /dev/passX explicitly, passX is a pass-through companion of a "real" device like cdX or daX. We can access cdX for reading and writing. For sending custom SCSI command we need to use pass device. We can manually find out which passX corresponds to cd0 and then use cam_open_pass - this what your code does in current version of k3b in ports, I think. But we also can simply call cam_open_device on cd0 and it would find appropriate passX device internally. Resulting cam(3) 'handle' will be the same in both cases. Bus, target, lun are available from the handle (struct cam_device), of course. See descriptions of cam_open_pass() and cam_open_device() in cam(3). There is the following note in that manual page: cam_open_device() is rather simple to use, but it is not really suitable for general use because its behav‐ ior is not necessarily deterministic. Programmers writing new applica‐ tions should make the extra effort to use one of the other open routines documented below. But I am not sure now valid it is. Because I can't imagine that it is principally impossible to put the same code into libcam that a programmer would put in his code. I.e. I don't think that I could do cdX to passX any smarter than cam_open_device does it. And if I could, then I'd rather put that code into cam_open_device anyway, so that everyone could benefit from it. > (BSDDeviceScan) number of matches 23 > (BSDDeviceScan) periph: cd0 > (BSDDeviceScan) periph: pass0 > (BSDDeviceScan) add device /dev/cd0:2:0:0 (/dev/pass0) > (K3bDevice::Device) /dev/cd0: init() > (K3bDevice::openDevice) open device /dev/pass0 succeeded. > > This means, that my /dev/cd0 is aquivalent to /dev/pass1 and has the ids > 2:0:0. From your error description, I guess, that on your system the cdX and > passX are mixed. So I expect the following on your console: > > (BSDDeviceScan) number of matches 23 > (BSDDeviceScan) periph: pass0 <- should be cd0 > (BSDDeviceScan) periph: cd0 <- should be pass0 > (BSDDeviceScan) add device /dev/pass0:2:0:0 (/dev/cd0)<- wrong!! > (K3bDevice::Device) /dev/pass0: init() <- should be cd0 > (K3bDevice::openDevice) open device /dev/cd0 failed. <- should be pass0 No, this is not what happens. > Your patch would make init run on your system but break it on other systems. No, everything works OK. > Furthermore other things won't work on your system as well (if cdX is > expected). Not sure what things you mean. Haven't noticed any problems so far. > I would recommend to look at K3bDevice::DeviceManager::BSDDeviceScan(). > Obvioulsy in FreeBSD 8 the cam has changed and the devices might be ordered > differently. The code you see there was initially taken from the camcontrol > sources, so looking, what "camcontrol devlist" in its sources does is a good > start. I guess, that something has changed here since FreeBSD 7.x A fix > should make sure, that device->m_passDevice always points to a passX and > cddev to the cdX. The thing is that there is no BSDDeviceScan in the latest version of k3b (e.g. in svn or 1.66.0). The way of discovering devices is different now. -- Andriy Gapon ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Wednesday 14 October 2009 12:02:16 Rusty Nejdl wrote: > On Fri, 9 Oct 2009 17:15:33 -0400, "Jason E. Hale" > > wrote: > > On Friday 09 October 2009 15:42:38 Heiner wrote: > >> That's me, although I am planning to retire here: I have currently not > >> enought resources to move to KDE4 so that I will most likley be unable > >> to > >> do the KDE4 port of k3b once it is available. Is anybody here who > > wants > > >> to > >> take the k3b port? > > > > I have been working the KDE4 version of the K3B port, so I would be > > willing to > > talk with anyone who has ideas for that. So far what I have pretty much > > > > works, except K3B can never find the cdrecord executable even though the > > KDE3 > > version works just fine. As soon as I figure that one out, I may submit > > the > > port. I would prefer to wait until there is at least a beta release, > > but > > > they > > haven't exactly been pushing releases out the door. > > Jason, > > I would be interested in seeing what you have so far. I got completely > stuck on the k3b side and glad to see you have made so much progress. > > Thanks! > Rusty Nejdl > http://networking.ringofsaturn.com > I'm attaching a shar containing what I have done so far for the k3b-kde4 port. I included Andriy's fix for cdrecord not being found as well. I came up with the same patch for the cd device not being found, but it seems like that may not be the right way to go according to Heiner. I am not much of a programmer, so I don't know. I just thought I would give this port a go since I didn't hear anything about it until a few days ago. I actually started doing this a while back but lost interest since K3B had terrible trouble with QT 4.4. Anyways, the port should at least build, run, and install and deinstall cleanly. I have only tried this with FreeBSD 7.2 i386 though. It should at least provide a good starting point. - Jason k3b-kde4.shar Description: Unix shell archive ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Wednesday 14 October 2009, Andriy Gapon wrote: > 1. Without this k3b doesn't find my DVD writer. It seems that it tries > cam_open_pass on /dev/cd0 which fails. > Index: libk3bdevice/k3bdevice.cpp > === > --- libk3bdevice/k3bdevice.cpp(revision 1034980) > +++ libk3bdevice/k3bdevice.cpp(working copy) > @@ -157,7 +157,7 @@ > #ifdef Q_OS_FREEBSD > K3b::Device::Device::Handle K3b::Device::openDevice( const char* name, > bool write ) { > -K3b::Device::Device::Handle handle = cam_open_pass (name, O_RDWR,0 /* > NULL */); +K3b::Device::Device::Handle handle = cam_open_device( name, > O_RDWR ); kDebug() << "(K3b::Device::openDevice) open device " << name << > ((handle)?" succeeded.":" failed.") << endl; > return handle; Hi! I am not sure, if this is a good idea. FreeBSD requires two devices to access the CD: the /dev/cdX and the /dev/passX device (and sometimes the bus, targt, lun ids). On the console, I read during the k3b startup: (BSDDeviceScan) number of matches 23 (BSDDeviceScan) periph: cd0 (BSDDeviceScan) periph: pass0 (BSDDeviceScan) add device /dev/cd0:2:0:0 (/dev/pass0) (K3bDevice::Device) /dev/cd0: init() (K3bDevice::openDevice) open device /dev/pass0 succeeded. This means, that my /dev/cd0 is aquivalent to /dev/pass1 and has the ids 2:0:0. From your error description, I guess, that on your system the cdX and passX are mixed. So I expect the following on your console: (BSDDeviceScan) number of matches 23 (BSDDeviceScan) periph: pass0 <- should be cd0 (BSDDeviceScan) periph: cd0 <- should be pass0 (BSDDeviceScan) add device /dev/pass0:2:0:0 (/dev/cd0)<- wrong!! (K3bDevice::Device) /dev/pass0: init() <- should be cd0 (K3bDevice::openDevice) open device /dev/cd0 failed. <- should be pass0 Your patch would make init run on your system but break it on other systems. Furthermore other things won't work on your system as well (if cdX is expected). I would recommend to look at K3bDevice::DeviceManager::BSDDeviceScan(). Obvioulsy in FreeBSD 8 the cam has changed and the devices might be ordered differently. The code you see there was initially taken from the camcontrol sources, so looking, what "camcontrol devlist" in its sources does is a good start. I guess, that something has changed here since FreeBSD 7.x A fix should make sure, that device->m_passDevice always points to a passX and cddev to the cdX. > 2. Without this k3b doesn't find cdrecord and mkisofs (what Jason said). It looks > that if k3b doesn't find cdrecord at the first path it tries (in my case it was Which k3b version you are working on? Best regards, Heiner ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
on 14/10/2009 19:02 Rusty Nejdl said the following: > On Fri, 9 Oct 2009 17:15:33 -0400, "Jason E. Hale" > wrote: >> On Friday 09 October 2009 15:42:38 Heiner wrote: >> >>> That's me, although I am planning to retire here: I have currently not >>> enought resources to move to KDE4 so that I will most likley be unable >>> to >>> do the KDE4 port of k3b once it is available. Is anybody here who > wants >>> to >>> take the k3b port? >>> >> I have been working the KDE4 version of the K3B port, so I would be >> willing to >> talk with anyone who has ideas for that. So far what I have pretty much > >> works, except K3B can never find the cdrecord executable even though the >> KDE3 >> version works just fine. As soon as I figure that one out, I may submit >> the >> port. I would prefer to wait until there is at least a beta release, > but >> they >> haven't exactly been pushing releases out the door. >> > > Jason, > > I would be interested in seeing what you have so far. I got completely > stuck on the k3b side and glad to see you have made so much progress. Guys, I also did some hacking on KDE4 k3b and here are some diffs that could be useful: 1. Without this k3b doesn't find my DVD writer. It seems that it tries cam_open_pass on /dev/cd0 which fails. Index: libk3bdevice/k3bdevice.cpp === --- libk3bdevice/k3bdevice.cpp (revision 1034980) +++ libk3bdevice/k3bdevice.cpp (working copy) @@ -157,7 +157,7 @@ #ifdef Q_OS_FREEBSD K3b::Device::Device::Handle K3b::Device::openDevice( const char* name, bool write ) { -K3b::Device::Device::Handle handle = cam_open_pass (name, O_RDWR,0 /* NULL */); +K3b::Device::Device::Handle handle = cam_open_device( name, O_RDWR ); kDebug() << "(K3b::Device::openDevice) open device " << name << ((handle)?" succeeded.":" failed.") << endl; return handle; 2. Without this k3b doesn't find cdrecord and mkisofs (what Jason said). It looks that if k3b doesn't find cdrecord at the first path it tries (in my case it was /usr/bin), then it gets confused and begins to think that cdrkit is installed (not sure what it is) and searches for programs with names "wodim" and "genisoimage" instead of "cdrecord" and "mkisofs". Index: libk3b/core/k3bdefaultexternalprograms.cpp === --- libk3b/core/k3bdefaultexternalprograms.cpp (revision 1034980) +++ libk3b/core/k3bdefaultexternalprograms.cpp (working copy) @@ -128,10 +128,14 @@ QFileInfo(K3b::resolveLink( cdrtoolsPath )).baseName() != m_cdrkitAlt ) { m_usingCdrkit = false; path = cdrtoolsPath; +#ifdef Q_OS_WIN32 + setVersionIdentifier( name() ); +#endif } else if( QFile::exists( cdrkitPath ) ) { m_usingCdrkit = true; path = cdrkitPath; +setVersionIdentifier( m_cdrkitAlt ); } #ifndef Q_OS_WIN32 @@ -140,13 +144,6 @@ } #endif -if ( m_usingCdrkit ) -setVersionIdentifier( m_cdrkitAlt ); -#ifdef Q_OS_WIN32 -else - setVersionIdentifier( name() ); -#endif - return path; } I also have an uncompleted major change (half a re-write) for libk3bdevice/k3bscsicommand_bsd.cpp that allows k3b to correctly work when ahci(4) driver is used (in 8.0/CURRENT). -- Andriy Gapon ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Fri, 9 Oct 2009 17:15:33 -0400, "Jason E. Hale" wrote: > On Friday 09 October 2009 15:42:38 Heiner wrote: > >> That's me, although I am planning to retire here: I have currently not >> enought resources to move to KDE4 so that I will most likley be unable >> to >> do the KDE4 port of k3b once it is available. Is anybody here who wants >> to >> take the k3b port? >> > > I have been working the KDE4 version of the K3B port, so I would be > willing to > talk with anyone who has ideas for that. So far what I have pretty much > works, except K3B can never find the cdrecord executable even though the > KDE3 > version works just fine. As soon as I figure that one out, I may submit > the > port. I would prefer to wait until there is at least a beta release, but > they > haven't exactly been pushing releases out the door. > Jason, I would be interested in seeing what you have so far. I got completely stuck on the k3b side and glad to see you have made so much progress. Thanks! Rusty Nejdl http://networking.ringofsaturn.com ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Fri, Oct 9, 2009 at 6:15 PM, Jason E. Hale wrote: > On Friday 09 October 2009 15:42:38 Heiner wrote: > >> That's me, although I am planning to retire here: I have currently not >> enought resources to move to KDE4 so that I will most likley be unable to >> do the KDE4 port of k3b once it is available. Is anybody here who wants to >> take the k3b port? >> > > I have been working the KDE4 version of the K3B port, so I would be willing to > talk with anyone who has ideas for that. So far what I have pretty much > works, except K3B can never find the cdrecord executable even though the KDE3 > version works just fine. As soon as I figure that one out, I may submit the > port. I would prefer to wait until there is at least a beta release, but they > haven't exactly been pushing releases out the door. Are you making these changes only to the port or are you trying to push them upstream? ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Friday 09 October 2009 15:42:38 Heiner wrote: > That's me, although I am planning to retire here: I have currently not > enought resources to move to KDE4 so that I will most likley be unable to > do the KDE4 port of k3b once it is available. Is anybody here who wants to > take the k3b port? > I have been working the KDE4 version of the K3B port, so I would be willing to talk with anyone who has ideas for that. So far what I have pretty much works, except K3B can never find the cdrecord executable even though the KDE3 version works just fine. As soon as I figure that one out, I may submit the port. I would prefer to wait until there is at least a beta release, but they haven't exactly been pushing releases out the door. - Jason ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Friday 09 October 2009, Andy Fawcett wrote: > On Friday 09 October 2009 19:05:26 Andriy Gapon wrote: > > Who would be the best person to discuss some things in > > k3bscsicommand_bsd.cpp? > > that would be the port maintainer, I think. He did virtually all the > work getting it to even work on FreeBSD. Hi! That's me, although I am planning to retire here: I have currently not enought resources to move to KDE4 so that I will most likley be unable to do the KDE4 port of k3b once it is available. Is anybody here who wants to take the k3b port? I have indeed written all FreeBSD specifc code of k3b. I can try to answer some questions about k3bscsicommand_bsd.cpp but I have to admit, that I wrote that although I did not understand cam at all. k3bscsicommand_bsd.cpp is the result of code grabbing from other programs, internet research and user feedback. So if your questions are about cam details I guess it is better to ask an cam expert. freebsd-scsi might be a better mailing list in this case. Best regards, Heiner ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Friday 09 October 2009 19:05:26 Andriy Gapon wrote: > Who would be the best person to discuss some things in > k3bscsicommand_bsd.cpp? that would be the port maintainer, I think. He did virtually all the work getting it to even work on FreeBSD. Andy ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
Re: [kde-freebsd] k3b freebsd contact
On Friday 09 October 2009 13:05:26 you wrote: > > Who would be the best person to discuss some things in k3bscsicommand_bsd.cpp? > > svn log doesn't help much, so I suggest talking to K3B's main developer (he doesn't use BSD, but he may point you to someone more appropriate for what you want), Sebastian Trueg or (possibly) . ___ kde-freebsd mailing list kde-freebsd@kde.org https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information