freebsd-libs transition
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: transition
There are a couple of ABI changes coming to freebsd-libs. They're in
soon-to-be-released 10.x branch, so it may yet take a while until we get
them through upstream release upgrade.
However, as they're highly isolated from the codebase, it is trivial to
cherry-pick them. I'm sending this request now so that you have more
room to select the most appropiate time for the transition.
We can even make one transition at a time if you think it's best.
title = "libusb3";
is_affected = .depends ~ /libusb2debian.*/ | .depends ~ /libusb3.*/;
is_good = .depends ~ /libusb3.*/;
is_bad = .depends ~ /libusb2debian.*/;
title = "libkvm6";
is_affected = .depends ~ /libkvm0.*/ | .depends ~ /libkvm6.*/;
is_good = .depends ~ /libkvm6.*/;
is_bad = .depends ~ /libkvm0.*/;
--
Robert Millan
------------------------------------------------------------------------
r253167 | trociny | 2013-07-10 21:44:43 +0200 (dc, 10 jul 2013) | 10 lines
In r227839, when removing libkvm dependency on procfs(5),
kvm_uread() function, used for reading from /proc/pid/mem, was
removed too. But the function declaration remained in kvm.h
public header and the soname was not bumped.
Remove kvm_uread() from kvm.h and bump the soname.
Reported by: rmh
Discussed on: arch
------------------------------------------------------------------------
--- a/lib/libkvm/Makefile
+++ b/lib/libkvm/Makefile
@@ -3,6 +3,7 @@
LIB= kvm
SHLIBDIR?= /lib
+SHLIB_MAJOR= 6
CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
.if exists(${.CURDIR}/kvm_${MACHINE_ARCH}.c)
--- a/lib/libkvm/kvm.h
+++ b/lib/libkvm/kvm.h
@@ -87,8 +87,6 @@
kvm_t *kvm_openfiles
(const char *, const char *, const char *, int, char *);
ssize_t kvm_read(kvm_t *, unsigned long, void *, size_t);
-ssize_t kvm_uread
- (kvm_t *, const struct kinfo_proc *, unsigned long, char *, size_t);
ssize_t kvm_write(kvm_t *, unsigned long, const void *, size_t);
__END_DECLS
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -712,55 +712,3 @@
{
return (kvm_argv(kd, kp, 1, nchr));
}
-
-/*
- * Read from user space. The user context is given by p.
- */
-ssize_t
-kvm_uread(kvm_t *kd, const struct kinfo_proc *kp, u_long uva, char *buf,
- size_t len)
-{
- char *cp;
- char procfile[MAXPATHLEN];
- ssize_t amount;
- int fd;
-
- if (!ISALIVE(kd)) {
- _kvm_err(kd, kd->program,
- "cannot read user space from dead kernel");
- return (0);
- }
-
- sprintf(procfile, "/proc/%d/mem", kp->ki_pid);
- fd = open(procfile, O_RDONLY, 0);
- if (fd < 0) {
- _kvm_err(kd, kd->program, "cannot open %s", procfile);
- return (0);
- }
-
- cp = buf;
- while (len > 0) {
- errno = 0;
- if (lseek(fd, (off_t)uva, 0) == -1 && errno != 0) {
- _kvm_err(kd, kd->program, "invalid address (%lx) in %s",
- uva, procfile);
- break;
- }
- amount = read(fd, cp, len);
- if (amount < 0) {
- _kvm_syserr(kd, kd->program, "error reading %s",
- procfile);
- break;
- }
- if (amount == 0) {
- _kvm_err(kd, kd->program, "EOF reading %s", procfile);
- break;
- }
- cp += amount;
- uva += amount;
- len -= amount;
- }
-
- close(fd);
- return ((ssize_t)(cp - buf));
-}
------------------------------------------------------------------------
r234686 | hselasky | 2012-04-25 23:50:20 +0200 (dc, 25 abr 2012) | 6 lines
Bump the libusb major version due to the last commit, which
changes the libusb 1.0 API. While at it, correct a manual
page symlink.
Suggested by: kib @
------------------------------------------------------------------------
r234684 | hselasky | 2012-04-25 19:54:26 +0200 (dc, 25 abr 2012) | 7 lines
Fix binary compatibility to the official LibUSB 1.0.
This is useful for GNU/kFreeBSD and the libusb2debian port.
Applications using the asynchronous API of LibUSB 1.0 needs
to be recompiled after this update.
Found by: lme @
------------------------------------------------------------------------
--- a/lib/libusb/Makefile
+++ b/lib/libusb/Makefile
@@ -5,7 +5,7 @@
#
LIB= usb
-SHLIB_MAJOR= 2
+SHLIB_MAJOR= 3
SHLIB_MINOR= 0
SRCS= libusb20.c
SRCS+= libusb20_desc.c
--- a/lib/libusb/libusb.h
+++ b/lib/libusb/libusb.h
@@ -340,7 +340,7 @@
typedef struct libusb_transfer {
libusb_device_handle *dev_handle;
uint8_t flags;
- uint32_t endpoint;
+ uint8_t endpoint;
uint8_t type;
uint32_t timeout;
enum libusb_transfer_status status;
@@ -349,7 +349,6 @@
libusb_transfer_cb_fn callback;
void *user_data;
uint8_t *buffer;
- void *os_priv;
int num_iso_packets;
struct libusb_iso_packet_descriptor iso_packet_desc[0];
} libusb_transfer __aligned(sizeof(void *));
--- a/lib/libusb/libusb10.c
+++ b/lib/libusb/libusb10.c
@@ -1343,7 +1343,7 @@
struct libusb20_transfer *pxfer1;
struct libusb_super_transfer *sxfer;
struct libusb_device *dev;
- uint32_t endpoint;
+ uint8_t endpoint;
int err;
if (uxfer == NULL)
@@ -1354,9 +1354,6 @@
endpoint = uxfer->endpoint;
- if (endpoint > 255)
- return (LIBUSB_ERROR_INVALID_PARAM);
-
dev = libusb_get_device(uxfer->dev_handle);
DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_submit_transfer enter");
@@ -1406,7 +1403,7 @@
struct libusb20_transfer *pxfer1;
struct libusb_super_transfer *sxfer;
struct libusb_device *dev;
- uint32_t endpoint;
+ uint8_t endpoint;
int retval;
if (uxfer == NULL)
@@ -1418,9 +1415,6 @@
endpoint = uxfer->endpoint;
- if (endpoint > 255)
- return (LIBUSB_ERROR_INVALID_PARAM);
-
dev = libusb_get_device(uxfer->dev_handle);
DPRINTF(dev->ctx, LIBUSB_DEBUG_FUNCTION, "libusb_cancel_transfer enter");
Reply to: