Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libpciaccess for openSUSE:Factory checked in at 2026-03-15 14:31:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libpciaccess (Old) and /work/SRC/openSUSE:Factory/.libpciaccess.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libpciaccess" Sun Mar 15 14:31:55 2026 rev:20 rq:1338989 version:0.19 Changes: -------- --- /work/SRC/openSUSE:Factory/libpciaccess/libpciaccess.changes 2024-03-25 21:08:25.493682434 +0100 +++ /work/SRC/openSUSE:Factory/.libpciaccess.new.8177/libpciaccess.changes 2026-03-15 14:32:03.346619609 +0100 @@ -1,0 +2,14 @@ +Sat Mar 14 18:48:04 UTC 2026 - Stefan Dirsch <[email protected]> + +- Update to version 0.19 + * This release adds a new pci_device_is_boot_display() API, with + support currently implemented only for Linux systems using sysfs. + * It also adds a -Dinstall-scanpci option to the meson + configuration for those who want to install this version of + scanpci. + * In addition, it corrects build issues on FreeBSD 15 and DragonFly, + and fixes a long-standing bug if there were multiple users of + libpciaccess in the same process and one called pci_system_cleanup + before the others were done using pciaccess. + +------------------------------------------------------------------- Old: ---- libpciaccess-0.18.1.tar.xz New: ---- libpciaccess-0.19.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libpciaccess.spec ++++++ --- /var/tmp/diff_new_pack.lJcveT/_old 2026-03-15 14:32:04.678674440 +0100 +++ /var/tmp/diff_new_pack.lJcveT/_new 2026-03-15 14:32:04.690674934 +0100 @@ -1,7 +1,7 @@ # # spec file for package libpciaccess # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: libpciaccess %define lname libpciaccess0 -Version: 0.18.1 +Version: 0.19 Release: 0 Summary: Generic PCI access library License: MIT ++++++ libpciaccess-0.18.1.tar.xz -> libpciaccess-0.19.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/.gitlab-ci.yml new/libpciaccess-0.19/.gitlab-ci.yml --- old/libpciaccess-0.18.1/.gitlab-ci.yml 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/.gitlab-ci.yml 2026-03-14 18:55:47.000000000 +0100 @@ -50,21 +50,6 @@ reports: junit: results.xml -# -# Verify that the merge request has the allow-collaboration checkbox ticked -# -check-merge-request: - extends: - - .fdo.ci-fairy - stage: deploy - script: - - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml - artifacts: - when: on_failure - reports: - junit: results.xml - allow_failure: true - # # Build a container with the given tag and the packages pre-installed. @@ -88,10 +73,15 @@ stage: build parallel: matrix: - - MESON_OPTIONS: ['-Dzlib=disabled', '-Dzlib=enabled'] + - MESON_OPTIONS: ['-Dzlib=disabled', '-Dzlib=enabled', '-Dinstall-scanpci=true'] script: - mkdir -p ../_inst - meson setup builddir --prefix="$PWD/../_inst" -Dwarning_level=3 -Ddefault_library=both $MESON_OPTIONS - meson configure builddir - ninja -C builddir test - ninja -C builddir install + +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + - if: $CI_PIPELINE_SOURCE == 'push' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/include/pciaccess.h new/libpciaccess-0.19/include/pciaccess.h --- old/libpciaccess-0.18.1/include/pciaccess.h 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/include/pciaccess.h 2026-03-14 18:55:47.000000000 +0100 @@ -60,9 +60,9 @@ #include <inttypes.h> #if (__GNUC__ >= 3) || (__SUNPRO_C >= 0x5130) -#define __deprecated __attribute__((deprecated)) +#define PCIACCESS_DEPRECATED __attribute__((deprecated)) #else -#define __deprecated +#define PCIACCESS_DEPRECATED #endif typedef uint64_t pciaddr_t; @@ -80,12 +80,14 @@ int pci_device_is_boot_vga(struct pci_device *dev); +int pci_device_is_boot_display(struct pci_device *dev); + int pci_device_read_rom(struct pci_device *dev, void *buffer); -int __deprecated pci_device_map_region(struct pci_device *dev, +int PCIACCESS_DEPRECATED pci_device_map_region(struct pci_device *dev, unsigned region, int write_enable); -int __deprecated pci_device_unmap_region(struct pci_device *dev, +int PCIACCESS_DEPRECATED pci_device_unmap_region(struct pci_device *dev, unsigned region); int pci_device_map_range(struct pci_device *dev, pciaddr_t base, @@ -94,10 +96,10 @@ int pci_device_unmap_range(struct pci_device *dev, void *memory, pciaddr_t size); -int __deprecated pci_device_map_memory_range(struct pci_device *dev, +int PCIACCESS_DEPRECATED pci_device_map_memory_range(struct pci_device *dev, pciaddr_t base, pciaddr_t size, int write_enable, void **addr); -int __deprecated pci_device_unmap_memory_range(struct pci_device *dev, +int PCIACCESS_DEPRECATED pci_device_unmap_memory_range(struct pci_device *dev, void *memory, pciaddr_t size); int pci_device_probe(struct pci_device *dev); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/man/meson.build new/libpciaccess-0.19/man/meson.build --- old/libpciaccess-0.18.1/man/meson.build 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/man/meson.build 2026-03-14 18:55:47.000000000 +0100 @@ -23,10 +23,9 @@ input : 'scanpci.man', output : 'scanpci.1', command : [ - find_program('sed'), '-e', 's/__xorgversion__/X Version 11/', '@INPUT@', + find_program('sed'), '-e', 's/__xorgversion__/"libpciaccess @0@" "X Version 11"/'.format(meson.project_version()), '@INPUT@', ], capture : true, - install : false, + install : get_option('install-scanpci'), install_dir : join_paths(get_option('prefix'), get_option('mandir'), 'man1'), ) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/man/scanpci.man new/libpciaccess-0.19/man/scanpci.man --- old/libpciaccess-0.18.1/man/scanpci.man 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/man/scanpci.man 2026-03-14 18:55:47.000000000 +0100 @@ -22,23 +22,21 @@ .\" dealings in this Software without prior written authorization from the .\" XFree86 Project. .\" -.TH SCANPCI 1 __xorgversion__ +.TH SCANPCI 1 2008-10-17 __xorgversion__ .SH NAME scanpci - scan/probe PCI buses .SH SYNOPSIS .B scanpci .RB [ \-v ] .SH DESCRIPTION -.I Scanpci +.B Scanpci is a utility that can be used to scan PCI buses and report information about the configuration space settings for each PCI device. On most platforms, -.I scanpci +.B scanpci can only be run by the root user. .SH OPTIONS .TP 8 .B \-v -Print the configuration space information for each device in a verbose -format. Without this option, only a brief description is printed for -each device. - +Print the configuration space information for each device in a verbose format. +Without this option, only a brief description is printed for each device. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/meson.build new/libpciaccess-0.19/meson.build --- old/libpciaccess-0.18.1/meson.build 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/meson.build 2026-03-14 18:55:47.000000000 +0100 @@ -21,7 +21,7 @@ project( 'libpciaccess', ['c'], - version : '0.18.1', + version : '0.19', license : 'MIT', meson_version : '>= 0.48.0', default_options : ['buildtype=debugoptimized'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/meson_options.txt new/libpciaccess-0.19/meson_options.txt --- old/libpciaccess-0.18.1/meson_options.txt 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/meson_options.txt 2026-03-14 18:55:47.000000000 +0100 @@ -35,3 +35,9 @@ type : 'feature', description : 'Enable zlib support to read gzip compressed pci.ids.', ) +option( + 'install-scanpci', + type : 'boolean', + value : false, + description : 'Install scanpci program and man page', +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/scanpci/meson.build new/libpciaccess-0.19/scanpci/meson.build --- old/libpciaccess-0.18.1/scanpci/meson.build 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/scanpci/meson.build 2026-03-14 18:55:47.000000000 +0100 @@ -22,4 +22,5 @@ 'scanpci', 'scanpci.c', dependencies : [dep_pciaccess], + install : get_option('install-scanpci'), ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/common_init.c new/libpciaccess-0.19/src/common_init.c --- old/libpciaccess-0.18.1/src/common_init.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/common_init.c 2026-03-14 18:55:47.000000000 +0100 @@ -39,6 +39,7 @@ #include "pciaccess_private.h" _pci_hidden struct pci_system * pci_sys; +static int pci_sys_refcnt = 0; /** * Initialize the PCI subsystem for access. @@ -55,6 +56,11 @@ { int err = ENOSYS; + if ( pci_sys_refcnt > 0 ) { + pci_sys_refcnt++; + return 0; + } + #ifdef __linux__ err = pci_system_linux_sysfs_create(); #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) @@ -73,6 +79,10 @@ # error "Unsupported OS" #endif + if ( pci_sys != NULL ) { + pci_sys_refcnt = 1; + } + return err; } @@ -100,6 +110,11 @@ return; } + if ( pci_sys_refcnt > 1 ) { + pci_sys_refcnt--; + return; + } + pci_io_cleanup(); if ( pci_sys->devices ) { @@ -130,4 +145,5 @@ free( pci_sys ); pci_sys = NULL; + pci_sys_refcnt = 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/common_interface.c new/libpciaccess-0.19/src/common_interface.c --- old/libpciaccess-0.18.1/src/common_interface.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/common_interface.c 2026-03-14 18:55:47.000000000 +0100 @@ -145,6 +145,21 @@ } /** + * Probe a PCI (Display) device to determine if its the boot display device + * + * \param dev Device whose display status to query + * \return + * Zero if not the boot display, 1 if the boot display. + */ +int +pci_device_is_boot_display( struct pci_device * dev ) +{ + if (!pci_sys->methods->boot_display) + return 0; + return pci_sys->methods->boot_display( dev ); +} + +/** * Probe a PCI device to determine if a kernel driver is attached. * * \param dev Device to query diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/common_vgaarb.c new/libpciaccess-0.19/src/common_vgaarb.c --- old/libpciaccess-0.18.1/src/common_vgaarb.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/common_vgaarb.c 2026-03-14 18:55:47.000000000 +0100 @@ -47,6 +47,7 @@ { char *tok; char *input_sp = NULL, *count_sp, *pci_sp; + unsigned long ul; char tmp[32]; tok = strtok_r(input,",",&input_sp); @@ -63,9 +64,11 @@ if (!tok) goto fail; - *vga_count = strtoul(tok, NULL, 10); - if (*vga_count == LONG_MAX) + errno = 0; + ul = strtoul(tok, NULL, 10); + if ((ul >= INT_MAX) || (errno != 0)) goto fail; + *vga_count = (int) ul; #ifdef DEBUG fprintf(stderr,"vga count is %d\n", *vga_count); @@ -238,6 +241,8 @@ len = snprintf(buf, BUFSIZE, "target PCI:%04x:%02x:%02x.%x", dev->domain, dev->bus, dev->dev, dev->func); + if (len < 0 || len >= BUFSIZE) + return -1; ret = vgaarb_write(pci_sys->vgaarb_fd, buf, len); if (ret) @@ -268,6 +273,9 @@ return 0; len = snprintf(buf, BUFSIZE, "decodes %s", rsrc_to_str(new_vgaarb_rsrc)); + if (len < 0 || len >= BUFSIZE) + return -1; + ret = vgaarb_write(pci_sys->vgaarb_fd, buf, len); if (ret == 0) dev->vgaarb_rsrc = new_vgaarb_rsrc; @@ -297,6 +305,8 @@ return 0; len = snprintf(buf, BUFSIZE, "lock %s", rsrc_to_str(dev->vgaarb_rsrc)); + if (len < 0 || len >= BUFSIZE) + return -1; return vgaarb_write(pci_sys->vgaarb_fd, buf, len); } @@ -315,6 +325,8 @@ return 0; len = snprintf(buf, BUFSIZE, "trylock %s", rsrc_to_str(dev->vgaarb_rsrc)); + if (len < 0 || len >= BUFSIZE) + return -1; return vgaarb_write(pci_sys->vgaarb_fd, buf, len); } @@ -333,6 +345,8 @@ return 0; len = snprintf(buf, BUFSIZE, "unlock %s", rsrc_to_str(dev->vgaarb_rsrc)); + if (len < 0 || len >= BUFSIZE) + return -1; return vgaarb_write(pci_sys->vgaarb_fd, buf, len); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/freebsd_pci.c new/libpciaccess-0.19/src/freebsd_pci.c --- old/libpciaccess-0.18.1/src/freebsd_pci.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/freebsd_pci.c 2026-03-14 18:55:47.000000000 +0100 @@ -573,6 +573,7 @@ .fill_capabilities = pci_fill_capabilities_generic, .enable = NULL, .boot_vga = NULL, + .boot_display = NULL, .has_kernel_driver = pci_device_freebsd_has_kernel_driver, .open_device_io = pci_device_freebsd_open_io, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/linux_sysfs.c new/libpciaccess-0.19/src/linux_sysfs.c --- old/libpciaccess-0.18.1/src/linux_sysfs.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/linux_sysfs.c 2026-03-14 18:55:47.000000000 +0100 @@ -772,19 +772,20 @@ return pci_device_linux_sysfs_set_enable(dev, 0); } -static int pci_device_linux_sysfs_boot_vga(struct pci_device *dev) +static int pci_device_linux_sysfs_file(struct pci_device *dev, const char *fname) { char name[256]; char reply[3]; int fd, bytes_read; int ret = 0; - snprintf( name, 255, "%s/%04x:%02x:%02x.%1u/boot_vga", + snprintf( name, 255, "%s/%04x:%02x:%02x.%1u/%s", SYS_BUS_PCI, dev->domain, dev->bus, dev->dev, - dev->func ); + dev->func, + fname ); fd = open( name, O_RDONLY | O_CLOEXEC); if (fd == -1) @@ -800,6 +801,23 @@ return ret; } +static int pci_device_linux_sysfs_boot_vga(struct pci_device *dev) +{ + return pci_device_linux_sysfs_file(dev, "boot_vga"); +} + +static int pci_device_linux_sysfs_boot_display(struct pci_device *dev) +{ + char card[256]; + + for (int i = 0; i < 3; i++) { + snprintf(card, 255, "drm/card%d/boot_display", i); + if (pci_device_linux_sysfs_file(dev, card)) + return 1; + } + return 0; +} + static int pci_device_linux_sysfs_has_kernel_driver(struct pci_device *dev) { char name[256]; @@ -1054,6 +1072,7 @@ .enable = pci_device_linux_sysfs_enable, .disable = pci_device_linux_sysfs_disable, .boot_vga = pci_device_linux_sysfs_boot_vga, + .boot_display = pci_device_linux_sysfs_boot_display, .has_kernel_driver = pci_device_linux_sysfs_has_kernel_driver, .open_device_io = pci_device_linux_sysfs_open_device_io, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/meson.build new/libpciaccess-0.19/src/meson.build --- old/libpciaccess-0.18.1/src/meson.build 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/meson.build 2026-03-14 18:55:47.000000000 +0100 @@ -22,7 +22,7 @@ _pci_access_host_files = [] if host == 'linux' _pci_access_host_files += ['linux_sysfs.c', 'linux_devmem.c', 'common_vgaarb.c'] -elif host == 'freebsd' +elif ['freebsd', 'dragonfly'].contains(host) _pci_access_host_files += ['freebsd_pci.c', 'common_vgaarb_stub.c'] elif host == 'netbsd' _pci_access_host_files += ['netbsd_pci.c', 'common_vgaarb_stub.c'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/netbsd_pci.c new/libpciaccess-0.19/src/netbsd_pci.c --- old/libpciaccess-0.18.1/src/netbsd_pci.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/netbsd_pci.c 2026-03-14 18:55:47.000000000 +0100 @@ -881,6 +881,7 @@ #else .boot_vga = NULL, #endif + .boot_display = NULL, .open_legacy_io = pci_device_netbsd_open_legacy_io, .read32 = pci_device_netbsd_read32, .read16 = pci_device_netbsd_read16, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/pciaccess_private.h new/libpciaccess-0.19/src/pciaccess_private.h --- old/libpciaccess-0.18.1/src/pciaccess_private.h 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/pciaccess_private.h 2026-03-14 18:55:47.000000000 +0100 @@ -78,6 +78,7 @@ void (*enable)( struct pci_device *dev ); void (*disable)( struct pci_device *dev ); int (*boot_vga)( struct pci_device *dev ); + int (*boot_display)( struct pci_device *dev ); int (*has_kernel_driver)( struct pci_device *dev ); struct pci_io_handle *(*open_device_io)( struct pci_io_handle *handle, struct pci_device *dev, int bar, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libpciaccess-0.18.1/src/solx_devfs.c new/libpciaccess-0.19/src/solx_devfs.c --- old/libpciaccess-0.18.1/src/solx_devfs.c 2024-03-23 23:32:20.000000000 +0100 +++ new/libpciaccess-0.19/src/solx_devfs.c 2026-03-14 18:55:47.000000000 +0100 @@ -1047,6 +1047,7 @@ .fill_capabilities = pci_fill_capabilities_generic, .boot_vga = pci_device_solx_devfs_boot_vga, + .boot_display = NULL, .open_legacy_io = pci_device_solx_devfs_open_legacy_io, .read32 = pci_device_solx_devfs_read32,
