[Filesystems-devel] Bug#793863: Add new package f2fs-tools-dev for external development use

殷啟聰 seamlikok at gmail.com
Thu Nov 12 14:38:51 UTC 2015


Hi Vincent,

Sorry for the late reply. I have fixed the FTBFS and it's buildable
now. Please check the patch attached or visit
<https://github.com/seamlik/debianpkg-f2fs-tools/compare/master...modify-autotools>.
Here is the changes:

  * FTBFS because I installed the binaries to /usr/sbin(lib) rather
than /sbin(lib). Actually I did it by mistake. :(
  * Merged all library packages into f2fs-libs and f2fs-libs-dev
  * No longer specify version info in soname

Note that using *.install files and dh-exec makes multi-package more
manageable. It seems quite complicated and tedious to use dh_install
in debian/rules for installing multiple packages. dh-exec method is
also documented and recommended by Debian wikis
<https://wiki.debian.org/Multiarch/Implementation>.

Thank you for reviewing the patch, I hope the package can be ready
soon because Android SDK packages needs this.

Regards,
Kai-Chung Yan
-------------- next part --------------
diff --git a/debian/changelog b/debian/changelog
index 8fb9492..2fbb8bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+f2fs-tools (1.4.1-2) UNRELEASED; urgency=low
+
+  * New packages: f2fs-libs and f2fs-libs-dev
+  * New libf2fs_format.diff: Produce libf2fs_format.so
+
+ -- Kai-Chung Yan <seamlikok at gmail.com>  Thu, 12 Nov 2015 22:05:04 +0800
+
 f2fs-tools (1.4.1-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/control b/debian/control
index d068f6d..680c135 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: admin
 Priority: optional
 Maintainer: Filesystems Group <filesystems-devel at lists.alioth.debian.org>
 Uploaders: Vincent Cheng <vcheng at debian.org>
-Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, uuid-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config, uuid-dev, dh-exec
 Standards-Version: 3.9.6
 Homepage: http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git
 Vcs-Svn: svn://anonscm.debian.org/collab-maint/deb-maint/f2fs-tools/trunk
@@ -28,3 +28,27 @@ Description: Tools for Flash-Friendly File System (debug)
  System (LFS).
  .
  This package contains the debugging symbols.
+
+Package: f2fs-libs
+Section: libs
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Core libraries for Flash-Friendly File System
+ F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage
+ devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File
+ System (LFS).
+ .
+ This package contains the core libraries.
+
+Package: f2fs-libs-dev
+Section: libdevel
+Architecture: linux-any
+Depends: f2fs-libs (= ${binary:Version}),
+         uuid-dev,
+         ${misc:Depends}
+Description: Core libraries for Flash-Friendly File System - Development files
+ F2FS is a new filesystem for Linux aimed at NAND flash memory-based storage
+ devices, such as SSD, eMMC, and SD cards. It is based on Log-structured File
+ System (LFS).
+ .
+ This package contains the development files.
\ No newline at end of file
diff --git a/debian/f2fs-libs-dev.install b/debian/f2fs-libs-dev.install
new file mode 100755
index 0000000..2c2c7fe
--- /dev/null
+++ b/debian/f2fs-libs-dev.install
@@ -0,0 +1,8 @@
+#!/usr/bin/dh-exec
+
+debian/tmp/lib/libf2fs_format.a  lib/${DEB_HOST_MULTIARCH}
+debian/tmp/lib/libf2fs_format.so lib/${DEB_HOST_MULTIARCH}
+debian/tmp/lib/libf2fs.a         lib/${DEB_HOST_MULTIARCH}
+debian/tmp/lib/libf2fs.so        lib/${DEB_HOST_MULTIARCH}
+include/*                        usr/include/f2fs-tools
+mkfs/*.h                         usr/include/f2fs-tools
\ No newline at end of file
diff --git a/debian/f2fs-libs.install b/debian/f2fs-libs.install
new file mode 100755
index 0000000..938382a
--- /dev/null
+++ b/debian/f2fs-libs.install
@@ -0,0 +1,6 @@
+#!/usr/bin/dh-exec
+
+debian/tmp/lib/libf2fs_format.so.0     lib/${DEB_HOST_MULTIARCH}
+debian/tmp/lib/libf2fs_format.so.0.0.0 lib/${DEB_HOST_MULTIARCH}
+debian/tmp/lib/libf2fs.so.0            lib/${DEB_HOST_MULTIARCH}
+debian/tmp/lib/libf2fs.so.0.0.0        lib/${DEB_HOST_MULTIARCH}
\ No newline at end of file
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..57015a9
--- /dev/null
+++ b/debian/install
@@ -0,0 +1 @@
+debian/tmp/sbin/*   sbin
\ No newline at end of file
diff --git a/debian/patches/libf2fs_format.diff b/debian/patches/libf2fs_format.diff
new file mode 100644
index 0000000..81c46fc
--- /dev/null
+++ b/debian/patches/libf2fs_format.diff
@@ -0,0 +1,16 @@
+Description: Upstream does not produce libf2fs_format.so
+Author: Kai-Chung Yan <seamlikok at gmail.com>
+Last-Update: 2015-07-30
+--- a/mkfs/Makefile.am
++++ b/mkfs/Makefile.am
+@@ -5,3 +5,9 @@
+ sbin_PROGRAMS = mkfs.f2fs
+ mkfs_f2fs_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
+ mkfs_f2fs_LDADD = ${libuuid_LIBS} $(top_builddir)/lib/libf2fs.la
++
++lib_LTLIBRARIES = libf2fs_format.la
++libf2fs_format_la_SOURCES = f2fs_format_main.c f2fs_format.c f2fs_format_utils.c
++libf2fs_format_la_CFLAGS = -DWITH_BLKDISCARD
++libf2fs_format_la_CPPFLAGS = -I$(top_srcdir)/include
++libf2fs_format_la_LDFLAGS = -luuid -L$(top_srcdir)/lib -lf2fs
+\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f287fe3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+libf2fs_format.diff
diff --git a/debian/rules b/debian/rules
index 06ec920..9b31125 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,13 @@
 #!/usr/bin/make -f
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog | \
-			  sed -rne 's,^Version: ([^-]+).*,\1,p')
+export DEB_UPSTREAM_VERSION ?= $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
 
 %:
 	dh $@ --with autoreconf
 
 override_dh_auto_configure:
-	dh_auto_configure -- --bindir=/sbin --libdir=/lib/$(DEB_HOST_MULTIARCH)
-
-override_dh_auto_install:
-	dh_auto_install -- DESTDIR="$(CURDIR)/debian/f2fs-tools"
-
-override_dh_install:
-	find $(CURDIR) -name "*.la" -delete
-	dh_install
+	dh_auto_configure -- --bindir=/sbin --libdir=/lib
 
 override_dh_strip:
 	dh_strip --dbg-package=f2fs-tools-dbg


More information about the Filesystems-devel mailing list