• Bug#245801: 2 patches needed, actually

    From Richard Atterer@1:229/2 to All on Sun Aug 15 18:50:04 2004
    From: [email protected]

    On Sun, Aug 15, 2004 at 05:24:54PM +0200, Cyrille Ch?p?lov wrote:
    ... the kernel patch (apparently went in around 2.6.7), and a userland
    patch as well. Both come from Peter Osterlund, <[email protected]>. He
    sent me a copy of the userland patch, and gave me the go-ahead to
    forward it here.

    Thanks for doing so!

    So this means that I will have to tell people in README.Debian to fetch
    their kernel patch from the following page, right?

    http://w1.894.telia.com/~u89404340/patches/packet/

    For what it's worth, the result seems to work, though the Debian-specific parts of the package (init.d script) will have use for some updates.

    Can you be more specific? What needs to change?

    Cheers,

    Richard

    --
    __ _
    |_) /| Richard Atterer
    | \/�| http://atterer.net
    � '` �

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?ISO-8859-15?Q?Cyrille_Ch=E9p=E9lo@1:229/2 to Richard Atterer on Sun Aug 15 19:30:10 2004
    From: [email protected]

    Richard Atterer wrote:
    On Sun, Aug 15, 2004 at 05:24:54PM +0200, Cyrille Ch?p?lov wrote:

    ... the kernel patch (apparently went in around 2.6.7), and a userland >>patch as well. Both come from Peter Osterlund, <[email protected]>. He
    sent me a copy of the userland patch, and gave me the go-ahead to
    forward it here.


    Thanks for doing so!

    So this means that I will have to tell people in README.Debian to fetch
    their kernel patch from the following page, right?

    http://w1.894.telia.com/~u89404340/patches/packet/

    Yes, except that for sufficiently recent versions of the kernel (perhaps
    as old as 2.6.7, the 2.6.8-rcX series are definitely OK), the patch has
    been included. I don't know what older versions of the 2.6 kernel are
    doing;
    they probably lack the driver entirely, and aren't that relevant anyway.

    For what it's worth, the result seems to work, though the Debian-specific >>parts of the package (init.d script) will have use for some updates.


    Can you be more specific? What needs to change?

    The new pktsetup does the following:
    1. If called the old way, eg:
    pktsetup /dev/pktcdvd0 /dev/hdc
    it uses the old (2.4) ioctl.
    2. If called the new way, eg:
    pktsetup 0 /dev/hdc
    (where 0 really is any arbitrary name), then it uses the new (2.6)
    ioctl, which triggers a dynamic allocation of a minor code within the dynamically-allocated major for pktcdvd, which causes udev to add a node
    called "0" within /dev/pktcdvd/. Then, the user can mount the new block
    device /dev/pktcdvd/0.

    I guess a sensible way to do it in Debian, would be to keep doing what's
    been done until today, as long as udev is not detected. As soon as /dev
    is detected as a mount point for some file system, use the new interface
    (first modprobe "pktcdvd", just in case).

    Next, how to name the packet devices. A sensible way might be to take
    the basename of the underlying device, except when it's "control"
    (collides with /dev/pktcdvd/control) or "disc" (devs-like naming sceme,
    every device will have the same base name), in which case a sequential
    name will help. In the general case, users end up with /dev/hdc for the
    bare device, and /dev/pktcdvd/hdc for the packet driver.

    -- Cyrille


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

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Richard Atterer@1:229/2 to All on Sun Aug 15 23:30:10 2004
    From: [email protected]

    Hi Cyrille (and Samuele, Ian, if you're interested),

    please test the udftools package at <http://atterer.net/debian/> and tell
    me whether it works! *Please* test both with and without udev installed!! Sorry, this package is completely untested - I really depend on your help
    to get everything working.

    On Sun, Aug 15, 2004 at 07:04:18PM +0200, Cyrille Ch�p�lov wrote:
    Yes, except that for sufficiently recent versions of the kernel (perhaps
    as old as 2.6.7, the 2.6.8-rcX series are definitely OK), the patch has
    been included. I don't know what older versions of the 2.6 kernel are
    doing;
    they probably lack the driver entirely, and aren't that relevant anyway.

    OK, I've change README.Debian to recommend 2.6.8+ and to point to Peter Osterlund's homepage for the patches for earlier versions. The patch to pktsetup is applied.

    The new pktsetup does the following:
    1. If called the old way, eg:
    pktsetup /dev/pktcdvd0 /dev/hdc
    it uses the old (2.4) ioctl.
    2. If called the new way, eg:
    pktsetup 0 /dev/hdc
    (where 0 really is any arbitrary name), then it uses the new (2.6)
    ioctl, which triggers a dynamic allocation of a minor code within the dynamically-allocated major for pktcdvd, which causes udev to add a node called "0" within /dev/pktcdvd/. Then, the user can mount the new block device /dev/pktcdvd/0.

    I guess a sensible way to do it in Debian, would be to keep doing what's been done until today, as long as udev is not detected. As soon as /dev
    is detected as a mount point for some file system, use the new interface (first modprobe "pktcdvd", just in case).

    udev is no filesystem, it's a user-space program run via hotplug. I'm
    detecting it by the presence of /dev/.udev* - I couldn't find anything
    official about this though, I hope it'll continue working in the future.

    The init script does a "modprobe pktcdvd", although I'm not sure whether it should be doing such a thing...

    Next, how to name the packet devices. A sensible way might be to take
    the basename of the underlying device, except when it's "control"
    (collides with /dev/pktcdvd/control) or "disc" (devs-like naming sceme, every device will have the same base name), in which case a sequential
    name will help.

    Too complicated, and it'll lead to completely different names the moment
    people install udev, which is not desirable IMHO.

    When udev is detected, the init script now by default sets up the devices
    as /dev/pktcdvd/0, /dev/pktcdvd/1 etc - but see /etc/udftools/default for a
    way to override the names "0", "1" with names of your choice.

    Cheers,

    Richard

    --
    __ _
    |_) /| Richard Atterer
    | \/�| http://atterer.net
    � '` �

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Richard Atterer@1:229/2 to All on Mon Aug 16 12:40:13 2004
    From: [email protected]

    Hi Cyrille,

    again, check http://atterer.net/debian/ - it's the same version number, but
    a different package.

    The name of PDEVICES in the default file changed to DEVICENAMES - this
    allowed me to get rid of the "if" construct. Also, it made it possible to execute modprobe 1) only if DEVICES is non-empty, and 2) before scanning
    the contents of /proc/mounts - I also changed that check.

    This time, I actually installed the package myself and tested it as far as
    I could - sorry for the problem with the previous version!

    Cheers,

    Richard

    --
    __ _
    |_) /| Richard Atterer
    | \/�| http://atterer.net
    � '` �

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?ISO-8859-15?Q?Cyrille_Ch=E9p=E9lo@1:229/2 to Richard Atterer on Mon Aug 16 08:00:09 2004
    From: [email protected]

    Richard Atterer wrote:
    Hi Cyrille (and Samuele, Ian, if you're interested),

    please test the udftools package at <http://atterer.net/debian/> and tell
    me whether it works! *Please* test both with and without udev installed!! Sorry, this package is completely untested - I really depend on your help
    to get everything working.

    I will test with udev installed -- at this point my machines aren't much 2.4-capable anymore, well, except for an old sparc.

    On Sun, Aug 15, 2004 at 07:04:18PM +0200, Cyrille Ch�p�lov wrote:

    Yes, except that for sufficiently recent versions of the kernel (perhaps
    as old as 2.6.7, the 2.6.8-rcX series are definitely OK), the patch has >>been included. I don't know what older versions of the 2.6 kernel are >>doing;
    they probably lack the driver entirely, and aren't that relevant anyway.

    OK, I've change README.Debian to recommend 2.6.8+ and to point to Peter Osterlund's homepage for the patches for earlier versions. The patch to pktsetup is applied.

    thanks!

    I guess a sensible way to do it in Debian, would be to keep doing what's >>been done until today, as long as udev is not detected. As soon as /dev
    is detected as a mount point for some file system, use the new interface >>(first modprobe "pktcdvd", just in case).


    udev is no filesystem, it's a user-space program run via hotplug. I'm detecting it by the presence of /dev/.udev* - I couldn't find anything official about this though, I hope it'll continue working in the future.

    udev is indeed no file system, but it starts by mounting a tmpfs on
    /dev. The presence of /dev/.udev.tdb proves nothing, and in al fairness
    neither does the fact tha /dev is a mount point for a tmpfs, but that's
    what the Debian udev init script is doing:

    if grep -E -q "^[^[:space:]]+ /dev tmpfs" /proc/mounts; then
    return 0
    fi

    The init script does a "modprobe pktcdvd", although I'm not sure whether it should be doing such a thing...

    I'm not sure either -- though if the user is asking for the pktsetup associations, I fail to see how he could mind udftools loading the module...

    Next, how to name the packet devices. A sensible way might be to take
    the basename of the underlying device, except when it's "control"
    (collides with /dev/pktcdvd/control) or "disc" (devs-like naming sceme, >>every device will have the same base name), in which case a sequential
    name will help.


    Too complicated, and it'll lead to completely different names the moment people install udev, which is not desirable IMHO

    Udev/hotplug is a quasi-requirement of a well-formed 2.6 system. Well,
    it's not actually mandatory yet, but things are definitely starting to
    depend on it.

    When udev is detected, the init script now by default sets up the devices
    as /dev/pktcdvd/0, /dev/pktcdvd/1 etc - but see /etc/udftools/default for a way to override the names "0", "1" with names of your choice.

    OK.

    -- Cyrille


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

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?ISO-8859-15?Q?Cyrille_Ch=E9p=E9lo@1:229/2 to All on Mon Aug 16 08:00:09 2004
    From: [email protected]

    Hi Richard,

    here's what I get upon installing your updated .deb:

    /etc/init.d/udftools: /etc/default/udftools: line 16: syntax error near unexpected token `fi'
    invoke-rc.d: initscript udftools, action "start" failed.

    This is the default /etc/default/udftools as provided now by the
    package. I wonder if the cause is that the shell doesn't like having
    only comments between "if .. then" and "fi" ?

    Anyway, I uncommented the "PDEVICES=" line (indeed, the DEVICES/PDEVICES
    thing is good enough for the purpose of choosing more descriptive names
    for the contents of /dev/pktcdvd), restarted the package, and ended up with:

    brw-rw---- 1 root cdrom 254, 0 2004-08-16 07:38 /dev/pktcdvd0

    /dev/pktcdvd:
    total 0
    brw-r----- 1 root root 254, 0 2004-08-16 07:38 0
    crw-r--r-- 1 root root 10, 63 2004-08-16 07:38 control

    which looks like what I was looking for. Not sure exactly what causes /dev/pktcdvd0 to appear, probably the hotplug/udev compat scripts, but
    that doesn't hurt.

    Thanks a lot!

    -- Cyrille


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

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From =?ISO-8859-15?Q?Cyrille_Ch=E9p=E9lo@1:229/2 to Richard Atterer on Mon Aug 16 21:10:11 2004
    From: [email protected]

    Richard Atterer wrote:

    again, check http://atterer.net/debian/ - it's the same version number, but
    a different package.

    The name of PDEVICES in the default file changed to DEVICENAMES - this allowed me to get rid of the "if" construct. Also, it made it possible to execute modprobe 1) only if DEVICES is non-empty, and 2) before scanning
    the contents of /proc/mounts - I also changed that check.

    Seems to work perfectly here!

    Thanks a lot!

    -- Cyrille



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

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)