bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-xorriso] documents, etc. (Re: building libisofs-1.4.4, libburn-1.4


From: SASANO Takayoshi
Subject: [Bug-xorriso] documents, etc. (Re: building libisofs-1.4.4, libburn-1.4.4, libisoburn-1.4.4 on OpenBSD)
Date: Tue, 02 Aug 2016 05:45:30 +0900
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-unknown-openbsd) MULE/6.0 (HANACHIRUSATO)

Hi,

Before testing no-immed-bit version of xorriso, I have to do my homework.
Details are attached at the end of this mail.

> more things to check for documentation and build system:
> - What permissions are needed to operate a drive ?

Simply add OpenBSD next to NetBSD.

> - How to persistently set these permissions ?

NetBSD/OpenBSD no longer have group "floppy".
Please use "operator" instead.

NetBSD uses /dev/cd0d, OpenBSD uses /dev/cd0c.
                    ~                       ~

> - Weren't there preparations necessary for #include and linking ?

OpenBSD needs to add path to /usr/local/include and /usr/local/lib,
respectively.

> - In what range of OpenBSD versions is libburn/sg-netbsd.c supposed to work ?

We are now testing with OpenBSD-5.9, so this version and later.

> - Are there special precautions needed to mount regular files ?
> - How to mount a ISO 9660 CD/DVD/BD with offset ?

These are same as NetBSD.
But, 

>   /sbin/mount_cd9660 -o noexec,nosuid -s 0 /dev/cd0
> mount the CD drive which has burner address /dev/rcd0c ?

the answer of this question is "only /dev/cd0c is accepted".

  # /sbin/mount_cd9660 -o noexec,nosuid -s 0 /dev/rcd0c /mnt
  mount_cd9660: /dev/rcd0c on /mnt: Block device required
  # /sbin/mount_cd9660 -o noexec,nosuid -s 0 /dev/cd0c /mnt
  # umount /mnt
  # /sbin/mount_cd9660 -o noexec,nosuid -s 0 /dev/rcd0 /mnt
  mount_cd9660: /dev/rcd0 on /mnt: No such file or directory
  # /sbin/mount_cd9660 -o noexec,nosuid -s 0 /dev/cd0 /mnt
  mount_cd9660: /dev/cd0 on /mnt: No such file or directory
  #

I haven't tested with multi session ISO, sorry.

--
SASANO Takayoshi <address@hidden>

-----
The spots where the answers will matter are:

---------------------------------------------------------------------
What permissions are needed to operate a drive ?
---------------------------------------------------------------------

libisoburn-*/README:
"On Linux, FreeBSD, NetBSD, OpenBSD this means -rw-permissions, even if
 only reading is intended. On Solaris one needs privileges "basic,sys_devices"
 and r-permission,
"

libisoburn-*/xorriso/README_gnu_xorriso:
"On Linux, FreeBSD, NetBSD, and OpenBSD, rw-permissions are needed.
 On Solaris, the privilege "sys_devices" and r-permission are needed."

libisoburn-*/xorriso/xorrecord.texi:
"On GNU/Linux, FreeBSD, NetBSD, and OpenBSD, the user needs rw-permission
 for the device file."

libisoburn-*/xorriso/xorriso.texi:
"On Linux, FreeBSD, NetBSD, or OpenBSD consider to give rw-permissions to
 those users or groups which shall be able to use the drives with
 @command{xorriso}."

libisoburn-*/xorriso/xorriso_eng.html:
"GNU/Linux, FreeBSD, NetBSD, OpenBSD demand rw-permission."

libburn-*/cdrskin/README:
"On FreeBSD, device rw-permissions are to be set in /etc/devfs.rules.
 On Solaris, pfexec privileges may be restricted to "basic,sys_devices".
 On NetBSD and OpenBSD, rw-permission may be granted by chmod a+rw /dev/rcd?d."

libburn-*/cdrskin/README:
"Linux, FreeBSD, NetBSD and OpenBSD demand rw-permission."

libburn-*/cdrskin/cdrskin_eng.html
"Linux, FreeBSD, NetBSD and OpenBSD demand rw-permission."

---------------------------------------------------------------------
How to persistently set these permissions ?
---------------------------------------------------------------------

libisoburn-*/xorriso/README_gnu_xorriso:
libburn-*/cdrskin/README:
"On NetBSD:
  Allow rw-access to the drives
  chgrp operator /dev/rcd[01]d
  chmod g+rw   /dev/rcd[01]d
"
"On OpenBSD:
  Allow rw-access to the drives
  chgrp operator /dev/rcd[01]c
  chmod g+rw   /dev/rcd[01]c
"

---------------------------------------------------------------------
Weren't there preparations necessary for #include and linking ?
---------------------------------------------------------------------

libisoburn-*/acinclude.m4 has:

netbsd*)
        LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/pkg/lib"
        CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/pkg/include"

openbsd*)
        LDFLAGS="$LDFLAGS -L/usr/local/lib"
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"

---------------------------------------------------------------------
In what range of OpenBSD versions is libburn/sg-netbsd.c supposed to work ?
---------------------------------------------------------------------

(not changed)

libburn-*/libburn/sg-netbsd.c:
"Present implementation: NetBSD 6, ioctl SCIOCCOMMAND
                         OpenBSD 5.9, ioctl SCIOCCOMMAND
"

libburn-*/libburn/os-netbsd.h
"   Operating system specific libburn definitions and declarations. Included
    by os.h in case of compilation for
            NetBSD 6 or OpenBSD 5.9
            with  MMC transport adapter sg-netbsd.c
"

(This state has been preliminarily commited by:
   http://libburnia-project.org/changeset/5723
)

---------------------------------------------------------------------
Are there special precautions needed to mount regular files ?
---------------------------------------------------------------------

(not changed)

libisoburn-*/xorriso/disk_ops.c:

     Xorriso_msgs_submit(xorriso, 0,
           "Detected regular file as mount device with BSD style command.",
           0, "FAILURE", 0);
     if(sys_code == 2) {
       Xorriso_msgs_submit(xorriso, 0,
"Command mdconfig -a -t vnode -f can create a device node which uses the file",
                         0, "HINT", 0);
     } else {
       Xorriso_msgs_submit(xorriso, 0,
     "Command  vnconfig -c vndX  can create a device node which uses the file",
                         0, "HINT", 0);
     }

(sys_code==2 is FreeBSD, syscode==3 is NetBSD.)

---------------------------------------------------------------------
How to mount a ISO 9660 CD/DVD/BD with offset ?
---------------------------------------------------------------------

(not changed)

libisoburn-*/xorriso/disk_ops.c:

     if(sys_code == 3 && strncmp(devadr, "/dev/rcd", 8) == 0) {
       sprintf(cooked_dev, "/dev/cd%s", devadr + 8);
       eff_dev= cooked_dev;
     }
     sprintf(form,
         "%smount_cd9660 -o noexec,nosuid -s %%sbsector%% %%device%% %s",
         (flag & 1 ? "/sbin/" : ""), Text_shellsafe(cpt, sfe, 0));

I.e. would

  /sbin/mount_cd9660 -o noexec,nosuid -s 0 /dev/cd0

mount the CD drive which has burner address /dev/rcd0c ?

(Best would be a test with a multi session ISO and non-0 -s argument.)

---------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]