From 9a1516ae8fe7ee4ec0e23ad1feb1394f393118247ed59717341e943cac4c4231 Mon Sep 17 00:00:00 2001 From: Greg Freemyer Date: Wed, 9 Jun 2021 10:19:28 +0000 Subject: [PATCH] Accepting request 898725 from home:jengelh:forensics OBS-URL: https://build.opensuse.org/request/show/898725 OBS-URL: https://build.opensuse.org/package/show/security:forensics/libmodi?expand=0&rev=1 --- .gitattributes | 23 +++++++ .gitignore | 1 + _service | 14 ++++ libmodi-20210513.tar.xz | 3 + libmodi.changes | 6 ++ libmodi.spec | 137 ++++++++++++++++++++++++++++++++++++++++ system-libs.patch | 94 +++++++++++++++++++++++++++ 7 files changed, 278 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 libmodi-20210513.tar.xz create mode 100644 libmodi.changes create mode 100644 libmodi.spec create mode 100644 system-libs.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..16abff3 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git + https://github.com/libyal/libmodi + 5126a6dd7a1b3b6d2ac86260a64e06e9dc06a583 + + 20210513 + + + *.tar + xz + + + diff --git a/libmodi-20210513.tar.xz b/libmodi-20210513.tar.xz new file mode 100644 index 0000000..c7cd0c9 --- /dev/null +++ b/libmodi-20210513.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8c6db335e81076761a85b2020e5466b8f4c3b7e14cf1a7719a0cc2ca01eb019 +size 179360 diff --git a/libmodi.changes b/libmodi.changes new file mode 100644 index 0000000..7ab409c --- /dev/null +++ b/libmodi.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Thu May 13 23:28:14 UTC 2021 - Jan Engelhardt + +- Initial package for build.opensuse.org + (version 20210513/commit 5126a6dd) +- Add system-libs.patch diff --git a/libmodi.spec b/libmodi.spec new file mode 100644 index 0000000..861a6a7 --- /dev/null +++ b/libmodi.spec @@ -0,0 +1,137 @@ +# +# spec file for package libmodi +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: libmodi +%define lname libmodi1 +Version: 20210513 +Release: 0 +Summary: Library and tools to access the Mac OS disk image formats +License: LGPL-3.0-or-later +Group: Development/Libraries/C and C++ +URL: https://github.com/libyal/libmodi +Source: %name-%version.tar.xz +Patch1: system-libs.patch +BuildRequires: c_compiler +BuildRequires: gettext-tools >= 0.18.1 +BuildRequires: libtool +BuildRequires: pkg-config +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(fuse) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(libbfio) >= 20201229 +BuildRequires: pkgconfig(libcaes) >= 20201012 +BuildRequires: pkgconfig(libcdata) >= 20200509 +BuildRequires: pkgconfig(libcdirectory) >= 20200702 +BuildRequires: pkgconfig(libcerror) >= 20201121 +BuildRequires: pkgconfig(libcfile) >= 20201229 +BuildRequires: pkgconfig(libclocale) >= 20200913 +BuildRequires: pkgconfig(libcnotify) >= 20200913 +BuildRequires: pkgconfig(libcpath) >= 20200623 +BuildRequires: pkgconfig(libcsplit) >= 20200703 +BuildRequires: pkgconfig(libcthreads) >= 20200508 +BuildRequires: pkgconfig(libfcache) >= 20200708 +BuildRequires: pkgconfig(libfdata) >= 20201129 +BuildRequires: pkgconfig(libfguid) >= 20180724 +BuildRequires: pkgconfig(libfplist) >= 20210404 +BuildRequires: pkgconfig(libfvalue) >= 20210510 +BuildRequires: pkgconfig(libhmac) >= 20200104 +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libuna) >= 20201204 + +%description +libmodi is a library to access the Mac OS disk image formats. + +Part of the libyal family of libraries. + +%package -n %lname +Summary: Library for accessing Mac OS disk image formats +Group: System/Libraries + +%description -n %lname +libmodi is a library to access the Mac OS disk image formats. + +Supported formats include: + +* Sparse bundle disk image +* Sparse disk image +* Universal Disk Image Format (UDIF) image + * uncompressed + * ADC compressed + * bzip2 compressed + * LZMA compressed + * zlib/DEFLATE compressed + +%package devel +Summary: Development files for libmodi +Group: Development/Libraries/C and C++ +Requires: %lname = %version + +%description devel +libmodi is a library to access the Mac OS disk image formats. + +This subpackage contains libraries and header files for developing +applications that want to make use of libmodi. + +%package tools +Summary: Utilities for reading Mac OS disk image formats +Group: Productivity/File utilities + +%description tools +This subpackage contains the utility programs from libmodi to +read MacOS disk image formats. + +%package -n python3-%name +Summary: Python 3 bindings for libmodi +Group: Development/Languages/Python + +%description -n python3-%{name} +Python 3 bindings for libmodi, which can read MacOS disk image formats. + +%prep +%autosetup -p1 + +%build +if [ ! -e configure ]; then ./autogen.sh; fi +%configure --disable-static --enable-wide-character-type --enable-python3 +%make_build + +%install +%make_install +find "%buildroot" -type f -name "*.la" -delete -print + +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + +%files -n %lname +%license COPYING* +%_libdir/libmodi.so.* + +%files devel +%_includedir/* +%_libdir/*.so +%_libdir/pkgconfig/*.pc +%_mandir/man3/*.3* + +%files tools +%_bindir/modi* +%_mandir/man1/modi* + +%files -n python3-%name +%python3_sitearch/pymodi.so + +%changelog diff --git a/system-libs.patch b/system-libs.patch new file mode 100644 index 0000000..7e06f3a --- /dev/null +++ b/system-libs.patch @@ -0,0 +1,94 @@ +From: Jan Engelhardt +Date: 2021-05-12 17:36:02.536572543 +0200 + +Some dirs are not present in snapshots directly generated from git +(nor are they marked as a submodule). Patch it out, since we have +them as system libs. +--- + Makefile.am | 36 ------------------------------------ + configure.ac | 18 ------------------ + 2 files changed, 54 deletions(-) + +Index: libmodi/Makefile.am +=================================================================== +--- libmodi.orig/Makefile.am ++++ libmodi/Makefile.am +@@ -3,24 +3,6 @@ ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = \ + include \ + common \ +- libcerror \ +- libcthreads \ +- libcdata \ +- libclocale \ +- libcnotify \ +- libcsplit \ +- libuna \ +- libcdirectory \ +- libcfile \ +- libcpath \ +- libbfio \ +- libfcache \ +- libfdata \ +- libfguid \ +- libfvalue \ +- libfplist \ +- libhmac \ +- libcaes \ + libmodi \ + moditools \ + pymodi \ +@@ -83,24 +65,6 @@ lib: library + + library: + (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcdata && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libclocale && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcnotify && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcsplit && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libuna && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcdirectory && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcfile && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcpath && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libbfio && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libfcache && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libfguid && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libfvalue && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libfplist && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libhmac && $(MAKE) $(AM_MAKEFLAGS)) +- (cd $(srcdir)/libcaes && $(MAKE) $(AM_MAKEFLAGS)) + (cd $(srcdir)/libmodi && $(MAKE) $(AM_MAKEFLAGS)) + (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) + +Index: libmodi/configure.ac +=================================================================== +--- libmodi.orig/configure.ac ++++ libmodi/configure.ac +@@ -196,24 +196,6 @@ dnl Generate Makefiles + AC_CONFIG_FILES([Makefile]) + AC_CONFIG_FILES([include/Makefile]) + AC_CONFIG_FILES([common/Makefile]) +-AC_CONFIG_FILES([libcerror/Makefile]) +-AC_CONFIG_FILES([libcthreads/Makefile]) +-AC_CONFIG_FILES([libcdata/Makefile]) +-AC_CONFIG_FILES([libclocale/Makefile]) +-AC_CONFIG_FILES([libcnotify/Makefile]) +-AC_CONFIG_FILES([libcsplit/Makefile]) +-AC_CONFIG_FILES([libuna/Makefile]) +-AC_CONFIG_FILES([libcdirectory/Makefile]) +-AC_CONFIG_FILES([libcfile/Makefile]) +-AC_CONFIG_FILES([libcpath/Makefile]) +-AC_CONFIG_FILES([libbfio/Makefile]) +-AC_CONFIG_FILES([libfcache/Makefile]) +-AC_CONFIG_FILES([libfdata/Makefile]) +-AC_CONFIG_FILES([libfguid/Makefile]) +-AC_CONFIG_FILES([libfvalue/Makefile]) +-AC_CONFIG_FILES([libfplist/Makefile]) +-AC_CONFIG_FILES([libhmac/Makefile]) +-AC_CONFIG_FILES([libcaes/Makefile]) + AC_CONFIG_FILES([libmodi/Makefile]) + AC_CONFIG_FILES([pymodi/Makefile]) + AC_CONFIG_FILES([pymodi-python2/Makefile])