Hello community,

here is the log from the commit of package libusbgx for openSUSE:Factory 
checked in at 2019-09-19 15:52:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libusbgx (Old)
 and      /work/SRC/openSUSE:Factory/.libusbgx.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libusbgx"

Thu Sep 19 15:52:01 2019 rev:2 rq:731659 version:0.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libusbgx/libusbgx.changes        2017-01-25 
23:21:54.379707501 +0100
+++ /work/SRC/openSUSE:Factory/.libusbgx.new.7948/libusbgx.changes      
2019-09-19 15:52:02.823278601 +0200
@@ -1,0 +2,23 @@
+Wed Sep 18 07:13:21 UTC 2019 - Fabian Vogt <[email protected]>
+
+- Use %license
+- Use %sover instead of %lname, match .so.%sover only
+- Use #PATCH-FIX-UPSTREAM
+- Run spec-cleaner
+
+-------------------------------------------------------------------
+Fri Aug 23 06:32:10 UTC 2019 - Tuukka Pasanen <[email protected]>
+
+- Update to release 0.2.0
+- Remove unneeded patches
+  - cleanup-return-void.patch
+  - stdio-include.patch
+  - link-correct-library.patch
+
+- Add patches from github master to make this compile with newer Glibc
+  - 0001-libusbgx-Fix-out-of-tree-compilation.patch
+  - 0002-libusbgx-Fix-doc-build-with-new-doxygen-version.patch
+  - 0003-libusbgx-fix-build-with-glibc-2.28-since-sys-sysmacr.patch
+  - 0004-libusbgx-fix-without-libconfig-build-against-glibc-2.patch
+
+-------------------------------------------------------------------

Old:
----
  cleanup-return-void.patch
  libusbgx-0.1.0.tar.xz
  link-correct-library.patch
  stdio-include.patch

New:
----
  0001-libusbgx-Fix-out-of-tree-compilation.patch
  0002-libusbgx-Fix-doc-build-with-new-doxygen-version.patch
  0003-libusbgx-fix-build-with-glibc-2.28-since-sys-sysmacr.patch
  0004-libusbgx-fix-without-libconfig-build-against-glibc-2.patch
  libusbgx-0.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libusbgx.spec ++++++
--- /var/tmp/diff_new_pack.cKBNvu/_old  2019-09-19 15:52:03.527278458 +0200
+++ /var/tmp/diff_new_pack.cKBNvu/_new  2019-09-19 15:52:03.527278458 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libusbgx
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,30 +12,29 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
+%define sover   2
 Name:           libusbgx
-%define lname  libusbgx1
+Version:        0.2.0
+Release:        0
 Summary:        USB gadget device configuration library
-License:        LGPL-2.1+ and GPL-2.0+
+License:        LGPL-2.1-or-later AND GPL-2.0-or-later
 Group:          System/Kernel
-Version:        0.1.0
-Release:        0
-Url:            http://github.com/libusbgx/libusbgx
-Source:         libusbgx-%{version}.tar.xz
-# Upstream
-Patch1:         cleanup-return-void.patch
-Patch2:         link-correct-library.patch
-# Pending on upstream
-Patch10:        stdio-include.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+URL:            https://github.com/libusbgx/libusbgx
+Source:         
https://github.com/libusbgx/libusbgx/archive/libusbgx-v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM
+Patch1:         0001-libusbgx-Fix-out-of-tree-compilation.patch
+Patch2:         0002-libusbgx-Fix-doc-build-with-new-doxygen-version.patch
+Patch3:         0003-libusbgx-fix-build-with-glibc-2.28-since-sys-sysmacr.patch
+Patch4:         0004-libusbgx-fix-without-libconfig-build-against-glibc-2.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  doxygen
 BuildRequires:  libtool >= 2
-BuildRequires:  pkg-config
+BuildRequires:  pkgconfig
 BuildRequires:  xz
 BuildRequires:  pkgconfig(libconfig)
 
@@ -46,20 +45,20 @@
 It provides routines for creating and parsing USB gadget devices
 using the configfs API.
 
-%package -n %lname
+%package -n %{name}%{sover}
 Summary:        USB gadget device configuration library
-License:        LGPL-2.1+
+License:        LGPL-2.1-or-later
 Group:          System/Libraries
 
-%description -n %lname
+%description -n %{name}%{sover}
 libusbgx is a C library encapsulating the kernel USB gadget-configfs
 userspace API functionality.
 
 %package devel
 Summary:        Development files for the USB gadget configuration library
-License:        LGPL-2.1+
+License:        LGPL-2.1-or-later
 Group:          Development/Libraries/C and C++
-Requires:       %lname = %version
+Requires:       %{name}%{sover} = %{version}
 
 %description devel
 libusbgx is a C library encapsulating the kernel USB gadget-configfs
@@ -74,7 +73,7 @@
 
 %package tools
 Summary:        Utilities to show and configure USB gadget devices
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/Kernel
 Conflicts:      libusbg-tools
 
@@ -86,44 +85,39 @@
 gadget devices.
 
 %prep
-%setup -qn %name
-%patch1 -p1
-%patch2 -p1
-%patch10 -p1
+%autosetup -p1 -n %{name}-%{name}-v%{version}
 
 %build
 if [ ! -e configure ]; then
        autoreconf -fiv
 fi
-%configure --disable-static --includedir="%_includedir/%name"
+%configure --disable-static --includedir="%{_includedir}/%{name}"
 make %{?_smp_mflags}
 
 %install
 %make_install
-rm -f "%buildroot/%_libdir"/*.la
+find %{buildroot} -type f -name "*.la" -delete -print
 
 %check
-make check
+make %{?_smp_mflags} check
 
-%post   -n %lname -p /sbin/ldconfig
-%postun -n %lname -p /sbin/ldconfig
+%post   -n %{name}%{sover} -p /sbin/ldconfig
+%postun -n %{name}%{sover} -p /sbin/ldconfig
 
-%files -n %lname
-%defattr(-,root,root)
-%_libdir/libusbgx.so.1*
-%doc COPYING.LGPL
+%files -n %{name}%{sover}
+%license COPYING.LGPL
+%{_libdir}/libusbgx.so.%{sover}
+%{_libdir}/libusbgx.so.%{sover}.*
 
 %files devel
-%defattr(-,root,root)
-%_includedir/%name/
-%_libdir/libusbgx.so
-%_libdir/pkgconfig/*.pc
+%{_includedir}/%{name}/
+%{_libdir}/libusbgx.so
+%{_libdir}/pkgconfig/libusbgx.pc
 
 %files tools
-%defattr(-,root,root)
-%_bindir/gadget-*
-%_bindir/show-gadgets
-%_bindir/show-udcs
-%doc COPYING
+%license COPYING
+%{_bindir}/gadget-*
+%{_bindir}/show-gadgets
+%{_bindir}/show-udcs
 
 %changelog

++++++ 0001-libusbgx-Fix-out-of-tree-compilation.patch ++++++
>From dccb4f19a654b2832293dbfc15343be238d1b657 Mon Sep 17 00:00:00 2001
From: "ing. Federico Fuga" <[email protected]>
Date: Mon, 12 Mar 2018 15:34:24 +0100
Subject: [PATCH 1/4] libusbgx: Fix out of tree compilation

With the current 0.2.0 (999a6e5) the library can't be compiled
out ofthe tree:

libtool: compile:  gcc -DPACKAGE_NAME=\"libusbgx\" 
-DPACKAGE_TARNAME=\"libusbgx\" -DPACKAGE_VERSION=\"0.2.0\" 
"-DPACKAGE_STRING=\"libusbgx 0.2.0\"" 
-DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"libusbgx\" -DVERSION=\"0.2.0\" "-D_GNU_SOURCE=/**/" 
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. 
-I../../src -I../../include/ -g -O2 -MT function/libusbgx_la-midi.lo -MD -MP 
-MF function/.deps/libusbgx_la-midi.Tpo -c ../../src/function/midi.c  -fPIC 
-DPIC -o function/.libs/libusbgx_la-midi.o
In file included from ../../src/usbg_common.c:13:0:
../../include/usbg/usbg.h:33:26: fatal error: usbg_version.h: File o directory 
non esistente
compilation terminated.

It compiled correctly on 904b04c.

To fix this issue let's add usbg subdirectory to include path.

Signed-off-by: Krzysztof Opasiak <[email protected]>
---
 examples/Makefile.am | 2 +-
 src/Makefile.am      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/Makefile.am b/examples/Makefile.am
index 9934321..e77f92d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -7,5 +7,5 @@ gadget_export_SOURCE = gadget-export.c
 gadget_import_SOURCE = gadget-import.c
 gadget_rndis_os_desc_SOURCES = gadget-rndis-os-desc.c
 show_udcs_SOURCE = show-udcs.c
-AM_CPPFLAGS=-I$(top_srcdir)/include/
+AM_CPPFLAGS=-I$(top_srcdir)/include/ -I$(top_builddir)/include/usbg
 AM_LDFLAGS=-L../src/ -lusbgx
diff --git a/src/Makefile.am b/src/Makefile.am
index 6b2726e..598a713 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,4 +9,4 @@ endif
 libusbgx_la_LDFLAGS = $(LIBCONFIG_LIBS)
 libusbgx_la_LDFLAGS += -version-info 2:0:0
 libusbgx_la_CFLAGS = $(LIBCONFIG_CFLAGS)
-AM_CPPFLAGS=-I$(top_srcdir)/include/
+AM_CPPFLAGS=-I$(top_srcdir)/include/ -I$(top_builddir)/include/usbg
-- 
2.22.0

++++++ 0002-libusbgx-Fix-doc-build-with-new-doxygen-version.patch ++++++
>From 6ffbb215596503de7c81577d48aaa795c77e4357 Mon Sep 17 00:00:00 2001
From: Krzysztof Opasiak <[email protected]>
Date: Wed, 22 Aug 2018 18:30:10 +0200
Subject: [PATCH 2/4] libusbgx: Fix doc build with new doxygen version

Doc build may fail with newest doxygen with error:
error: the type 'dirs' is not supported for the entry tag within a navindex! 
Check your layout file!

Fix this by simply remove the line that caused the error.

Signed-off-by: Krzysztof Opasiak <[email protected]>
---
 DoxygenLayout.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/DoxygenLayout.xml b/DoxygenLayout.xml
index 5b60278..92949fd 100644
--- a/DoxygenLayout.xml
+++ b/DoxygenLayout.xml
@@ -18,7 +18,6 @@
       <tab type="filelist" visible="yes" title="" intro=""/>
       <tab type="globals" visible="yes" title="" intro=""/>
     </tab>
-    <tab type="dirs" visible="yes" title="" intro=""/>
     <tab type="examples" visible="yes" title="" intro=""/>  
   </navindex>
 
-- 
2.22.0

++++++ 0003-libusbgx-fix-build-with-glibc-2.28-since-sys-sysmacr.patch ++++++
>From 45c14ef4d5d7ced0fbf984208de44ced6d5ed898 Mon Sep 17 00:00:00 2001
From: Gwenhael Goavec-Merou <[email protected]>
Date: Mon, 10 Sep 2018 15:52:09 +0200
Subject: [PATCH 3/4] libusbgx: fix build with glibc-2.28 since
 <sys/sysmacros.h> is no more included by <sys/types.h>

Signed-off-by: Sid Spry [email protected]
Signed-off-by: Gwenhael Goavec-Merou [email protected]
[Copy sign-offs from pull requst to commit msg]
Signed-off-by: Krzysztof Opasiak <[email protected]>
---
 examples/gadget-acm-ecm.c              | 1 +
 examples/gadget-import.c               | 1 +
 examples/gadget-ms.c                   | 1 +
 examples/show-gadgets.c                | 1 +
 examples/show-udcs.c                   | 1 +
 include/usbg/usbg_internal_libconfig.h | 1 +
 6 files changed, 6 insertions(+)

diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
index 1c5e2ca..29360da 100644
--- a/examples/gadget-acm-ecm.c
+++ b/examples/gadget-acm-ecm.c
@@ -20,6 +20,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <linux/usb/ch9.h>
 #include <usbg/usbg.h>
 
diff --git a/examples/gadget-import.c b/examples/gadget-import.c
index e684fdb..63df449 100644
--- a/examples/gadget-import.c
+++ b/examples/gadget-import.c
@@ -25,6 +25,7 @@
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <usbg/usbg.h>
 
 int main(int argc, char **argv)
diff --git a/examples/gadget-ms.c b/examples/gadget-ms.c
index 478c370..a5c6681 100644
--- a/examples/gadget-ms.c
+++ b/examples/gadget-ms.c
@@ -23,6 +23,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <linux/usb/ch9.h>
 #include <usbg/usbg.h>
 #include <usbg/function/ms.h>
diff --git a/examples/show-gadgets.c b/examples/show-gadgets.c
index 707d448..a2a21c8 100644
--- a/examples/show-gadgets.c
+++ b/examples/show-gadgets.c
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/sysmacros.h>
 #include <netinet/ether.h>
 #include <usbg/usbg.h>
 #include <usbg/function/ms.h>
diff --git a/examples/show-udcs.c b/examples/show-udcs.c
index 66e950f..2f5cc45 100644
--- a/examples/show-udcs.c
+++ b/examples/show-udcs.c
@@ -23,6 +23,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <sys/sysmacros.h>
 #include <usbg/usbg.h>
 
 int main(void)
diff --git a/include/usbg/usbg_internal_libconfig.h 
b/include/usbg/usbg_internal_libconfig.h
index ac51758..3fa55c0 100644
--- a/include/usbg/usbg_internal_libconfig.h
+++ b/include/usbg/usbg_internal_libconfig.h
@@ -12,6 +12,7 @@
 #ifndef USBG_INTERNAL_LIBCONFIG_H
 #define USBG_INTERNAL_LIBCONFIG_H
 
+#include <sys/sysmacros.h>
 #include <libconfig.h>
 #ifdef __cplusplus
 extern "C" {
-- 
2.22.0

++++++ 0004-libusbgx-fix-without-libconfig-build-against-glibc-2.patch ++++++
>From 283879d01773175d8c69acaaaa1c9faf8b173200 Mon Sep 17 00:00:00 2001
From: Ahmad Fatoum <[email protected]>
Date: Wed, 27 Mar 2019 14:31:28 +0100
Subject: [PATCH 4/4] libusbgx: fix --without-libconfig build against
 glibc-2.28

Commit 45c14ef4d5 ("libusbgx: fix build with glibc-2.28 since
<sys/sysmacros.h> is no more included by <sys/types.h>")
fixed this issue for the (default) --with-libconfig configuration,
but building --without-libconfig still throws a linker error
because makedev was assumed to be an external symbol in
usbg_common.c.

Include <sys/sysmacros.h> there to address this.

Signed-off-by: Ahmad Fatoum <[email protected]>
Signed-off-by: Krzysztof Opasiak <[email protected]>
---
 src/usbg_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/usbg_common.c b/src/usbg_common.c
index f8822fc..6f12a38 100644
--- a/src/usbg_common.c
+++ b/src/usbg_common.c
@@ -15,6 +15,7 @@
 
 #include <errno.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <malloc.h>
 #include <stdio.h>
-- 
2.22.0


Reply via email to