pkg_info on -current returns permission denied on uninstalled packages

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

pkg_info on -current returns permission denied on uninstalled packages

janus
Hi bugs@,

I would like to report a bug.
I've just upgraded my ERL (octeon) box to latest -current and running
pkg_info on package that is not installed returns "permission denied".
Behaves the same with root and unprivileged user. Reproducible always.

Thank you,
Jan


### HOW TO REPRODUCE
$ ls -l /var/db/pkg/emacs*
ls: /var/db/pkg/emacs*: No such file or directory

$ pkg_info emacs
Information for http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/packages/mips64/emacs-26.1p5-no_x11.tgz

Comment:
Permission denied at /usr/libdata/perl5/OpenBSD/PackageLocation.pm line 160.

### KTRACE section ( $ ktrace pkg_info emacs ; kdump -f ktrace.out )
<...>
 67916 perl     RET   read 8192/0x2000
 67916 perl     CALL  mquery(0x386510c000,0x4000,0x3<PROT_READ|PROT_WRITE>,0x1012<MAP_PRIVATE|MAP_FIXED|MAP_ANON>,-1,0)
 67916 perl     RET   mquery 242213765120/0x386510c000
 67916 perl     CALL  mmap(0x386510c000,0x4000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
 67916 perl     RET   mmap 242213765120/0x386510c000
 67916 perl     CALL  mquery(0x389a08c000,0x1c000,0x3<PROT_READ|PROT_WRITE>,0x1012<MAP_PRIVATE|MAP_FIXED|MAP_ANON>,-1,0)
 67916 perl     RET   mquery 243102433280/0x389a08c000
 67916 perl     CALL  mmap(0x389a08c000,0x1c000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
 67916 perl     RET   mmap 243102433280/0x389a08c000
 67916 perl     CALL  mmap(0,0x504000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
 67916 perl     RET   mmap 240892674048/0x3816528000
 67916 perl     CALL  mmap(0,0x78000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
 67916 perl     RET   mmap 241230102528/0x382a6f4000
 67916 perl     CALL  mmap(0,0x78000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
 67916 perl     RET   mmap 241830805504/0x384e3d4000
 67916 perl     CALL  stat(0x384f303900,0x38fc1ca5e8)
 67916 perl     NAMI  "1/+CONTENTS"
 67916 perl     RET   stat -1 errno 2 No such file or directory
 67916 perl     CALL  open(0x38bf3aac20,0x10601<O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC>,0666<S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH>)
 67916 perl     NAMI  "1/+CONTENTS"
 67916 perl     RET   open -1 errno 2 No such file or directory
 67916 perl     CALL  write(2,0x38650fc000,0x4d)
 67916 perl     GIO   fd 2 wrote 77 bytes
       "Permission denied at /usr/libdata/perl5/OpenBSD/PackageLocation.pm line 160.
       "
 67916 perl     RET   write 77/0x4d
<...>

### DMESG
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2019 OpenBSD. All rights reserved.  https://www.OpenBSD.org

OpenBSD 6.5-current (GENERIC.MP) #0: Thu Jul  4 21:42:52 UTC 2019
    visa@octeon:/usr/src/sys/arch/octeon/compile/GENERIC.MP
real mem = 536870912 (512MB)
avail mem = 507379712 (483MB)
mainbus0 at root: board 20002 rev 2.18
cpu0 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP emulation
cpu0: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
cpu1 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP emulation
cpu1: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
clock0 at mainbus0: int 5
octcrypto0 at mainbus0
iobus0 at mainbus0
simplebus0 at iobus0: "soc"
octciu0 at simplebus0
cn30xxsmi0 at simplebus0
com0 at simplebus0: ns16550a, 64 byte fifo
com0: console
dwctwo0 at iobus0 base 0x1180068000000 irq 56
usb0 at dwctwo0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Octeon DWC2 root hub" rev 2.00/1.00 addr 1
octrng0 at iobus0 base 0x1400000000000 irq 0
cn30xxgmx0 at iobus0 base 0x1180008000000
cnmac0 at cn30xxgmx0: RGMII, address 80:2a:a8:f1:19:06
atphy0 at cnmac0 phy 7: AR8035 10/100/1000 PHY, rev. 2
cnmac1 at cn30xxgmx0: RGMII, address 80:2a:a8:f1:19:07
atphy1 at cnmac1 phy 6: AR8035 10/100/1000 PHY, rev. 2
cnmac2 at cn30xxgmx0: RGMII, address 80:2a:a8:f1:19:08
atphy2 at cnmac2 phy 5: AR8035 10/100/1000 PHY, rev. 2
/dev/ksyms: Symbol table not valid.
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <KINGSTON, SA400S37120G, SBFK> SCSI2 0/direct fixed serial.152d232950026B76829C
sd0: 114473MB, 512 bytes/sector, 234441648 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
boot device: sd0
root on sd0a (28c7bb4bb814f2ea.a) swap on sd0b dump on sd0b
WARNING: No TOD clock, believing file system.
WARNING: CHECK AND RESET THE DATE!

Reply | Threaded
Open this post in threaded view
|

Re: pkg_info on -current returns permission denied on uninstalled packages

Daniel Jakots-6
On Fri, 5 Jul 2019 23:01:10 +0200, Jan Vlach <[hidden email]> wrote:

> Comment:
> Permission denied at /usr/libdata/perl5/OpenBSD/PackageLocation.pm
> line 160.


I think it has been fixed with
https://github.com/openbsd/src/commit/2619906e705af8847358c6a636c25ad351dc3064

Cheers,
Daniel

Reply | Threaded
Open this post in threaded view
|

Re: pkg_info on -current returns permission denied on uninstalled packages

janus
Hi Daniel,

On Fri, Jul 05, 2019 at 05:20:31PM -0400, Daniel Jakots wrote:

> On Fri, 5 Jul 2019 23:01:10 +0200, Jan Vlach <[hidden email]> wrote:
>
> > Comment:
> > Permission denied at /usr/libdata/perl5/OpenBSD/PackageLocation.pm
> > line 160.
>
>
> I think it has been fixed with
> https://github.com/openbsd/src/commit/2619906e705af8847358c6a636c25ad351dc3064
>
> Cheers,
> Daniel

Applying this manually to /usr/libdata/perl5/OpenBSD/Temp.pm, I can
confirm that it indeed works:

Thank you and sorry for the noise.
Jan

###
$ pkg_info emacs
Information for http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/packages/mips64/emacs-26.1p5-no_x11.tgz

Comment:
GNU editor: extensible, customizable, self-documenting

Description:
GNU Emacs is an extensible, customizable text editor - and more. At its
core is an interpreter for Emacs Lisp, a dialect of the Lisp
programming language with extensions to support text editing. The
features of GNU Emacs include:

  - Content-sensitive editing modes, including syntax coloring, for a
    variety of file types including plain text, source code, and HTML.
  - Complete built-in documentation, including a tutorial for new
    users.
  - Full Unicode support for nearly all human languages and their
    scripts.
  - Highly customizable, using Emacs Lisp code or a graphical
    interface.
  - A large number of extensions that add other functionality,
    including a project planner, mail and news reader, debugger
    interface, calendar, and more. Many of these extensions are
    distributed with GNU Emacs; others are available separately.

This package now includes the Elisp source files previously available in
the emacs-el package.

Flavors:
        no_x11     - build without X11 support
        athena     - build with athena toolkit instead of gtk3
        gtk2   - build with gtk2 instead of gtk3
        gtk3       - build with gtk3 (default)

Maintainer: Jeremie Courreges-Anglas <[hidden email]>

WWW: https://www.gnu.org/software/emacs/