From db479c5e0d22cc973e8e598f3eb47a24d03acff2089cbceec91bee171a71ee8b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 6 Dec 2018 12:46:50 +0000 Subject: [PATCH] Accepting request 650306 from home:jengelh:dev OBS-URL: https://build.opensuse.org/request/show/650306 OBS-URL: https://build.opensuse.org/package/show/filesystems/erofs-utils?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + _service | 14 ++++++++ constant.diff | 42 ++++++++++++++++++++++ erofs-utils-0.0.1~4.tar.xz | 3 ++ erofs-utils.changes | 5 +++ erofs-utils.spec | 71 ++++++++++++++++++++++++++++++++++++++ lz4-1.8.3.tar.gz | 3 ++ no-date.diff | 20 +++++++++++ no-static.diff | 22 ++++++++++++ 10 files changed, 204 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 constant.diff create mode 100644 erofs-utils-0.0.1~4.tar.xz create mode 100644 erofs-utils.changes create mode 100644 erofs-utils.spec create mode 100644 lz4-1.8.3.tar.gz create mode 100644 no-date.diff create mode 100644 no-static.diff 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..2f14cf5 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/ + git + mkfs-dev + dfb7ee1144ec47df68e823105cd0cea8cffcd1dc + 0.0.1~@TAG_OFFSET@ + + + *.tar + xz + + + diff --git a/constant.diff b/constant.diff new file mode 100644 index 0000000..72c95f7 --- /dev/null +++ b/constant.diff @@ -0,0 +1,42 @@ +From: Jan Engelhardt +Date: 2018-11-19 22:07:39.047450605 +0100 +--- + erofs_types.h | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +Index: erofs-utils-0.0.1~4/erofs_types.h +=================================================================== +--- erofs-utils-0.0.1~4.orig/erofs_types.h ++++ erofs-utils-0.0.1~4/erofs_types.h +@@ -26,13 +26,24 @@ + #define s32 int32_t + #define s64 int64_t + +-#define cpu_to_le16(X) htole16(X) +-#define cpu_to_le32(X) htole32(X) +-#define cpu_to_le64(X) htole64(X) +- +-#define le16_to_cpu(X) le16toh(X) +-#define le32_to_cpu(X) le32toh(X) +-#define le64_to_cpu(X) le64toh(X) ++#if (defined(__BYTE_ORDER) && __BYTE_ORDER == __BIG_ENDIAN) || \ ++ (defined(_BYTE_ORDER) && _BYTE_ORDER == _BIG_ENDIAN) ++ /* We need to use constexpr functions, and htole16 unfortunately is not. */ ++# define cpu_to_le16(x) __builtin_bswap16(x) ++# define cpu_to_le32(x) __builtin_bswap32(x) ++# define cpu_to_be64(x) (x) ++# define le16_to_cpu(x) __builtin_bswap16(x) ++# define le32_to_cpu(x) __builtin_bswap32(x) ++# define be64_to_cpu(x) (x) ++#else ++# define cpu_to_le16(x) (x) ++# define cpu_to_le32(x) (x) ++# define cpu_to_le64(x) (x) ++# define cpu_to_be64(x) __builtin_bswap64(x) ++# define le16_to_cpu(x) (x) ++# define le32_to_cpu(x) (x) ++# define be64_to_cpu(x) __builtin_bswap64(x) ++#endif + + #ifndef __OPTIMIZE__ + #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) diff --git a/erofs-utils-0.0.1~4.tar.xz b/erofs-utils-0.0.1~4.tar.xz new file mode 100644 index 0000000..74869f9 --- /dev/null +++ b/erofs-utils-0.0.1~4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ac09d5cefbfa0d2fc0b17c93c5c5ea2481b346ff7841638b720441431508c7e +size 27008 diff --git a/erofs-utils.changes b/erofs-utils.changes new file mode 100644 index 0000000..89136ef --- /dev/null +++ b/erofs-utils.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Nov 19 20:57:48 UTC 2018 - Jan Engelhardt + +- Initial version (0.0.1~4 / 4f437e3) for build.opensuse.org +- Add constant.diff, no-static.diff, no-date.diff diff --git a/erofs-utils.spec b/erofs-utils.spec new file mode 100644 index 0000000..f46072c --- /dev/null +++ b/erofs-utils.spec @@ -0,0 +1,71 @@ +# +# spec file for package erofs-utils +# +# Copyright (c) 2018 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 +# 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: erofs-utils +Version: 0.0.1~4 +Release: 0 +Summary: Utilities for the Extendable Read-Only Filesystem (EROFS) +License: GPL-2.0-or-later +Group: System/Filesystems +URL: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/ +Source: %name-%version.tar.xz +Source2: https://github.com/lz4/lz4/archive/v1.8.3.tar.gz#/lz4-1.8.3.tar.gz +Patch1: constant.diff +Patch2: no-static.diff +Patch3: no-date.diff +BuildRequires: autoconf >= 2.69 +BuildRequires: automake +BuildRequires: liblz4-devel +BuildRequires: libtool +BuildRequires: xz +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Supplements: filesystem(erofs) +# erofs depends on an unstable nonexported API (and at the same time the headers from liblz4-devel...) +Provides: bundled(lz4) = 1.8.3 + +%description +mkfs.erofs is a user-space tool to create erofs filesystem images. It +can create two main types of erofs images, compressed and +uncompressed: + + * For compressed images, it is able to integrate several compression + algorithms, LZ4 is supported according to the current erofs kernel + implementation. + * For uncompressed images, it can decide whether the last page of a + file should be inlined or not properly. + +%prep +%setup -qa2 +%patch -P 1 -P 2 -P 3 -p1 + +%build +pushd lz4-1.8.3/ +make %{?_smp_mflags} CFLAGS="%{optflags}" V=1 +popd +autoreconf -fiv +%configure --disable-static --with-lz4="$PWD/lz4-1.8.3/lib" --bindir="%_sbindir" +make %{?_smp_mflags} + +%install +%make_install + +%files +%license COPYING +%_sbindir/mkfs* + +%changelog diff --git a/lz4-1.8.3.tar.gz b/lz4-1.8.3.tar.gz new file mode 100644 index 0000000..4cb82ff --- /dev/null +++ b/lz4-1.8.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33af5936ac06536805f9745e0b6d61da606a1f8b4cc5c04dd3cbaca3b9b4fc43 +size 327897 diff --git a/no-date.diff b/no-date.diff new file mode 100644 index 0000000..71b8873 --- /dev/null +++ b/no-date.diff @@ -0,0 +1,20 @@ +From: Jan Engelhardt +Date: 2018-11-20 00:09:16.003548811 +0100 + +--- + erofs_config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: erofs-utils-0.0.1~4/erofs_config.c +=================================================================== +--- erofs-utils-0.0.1~4.orig/erofs_config.c ++++ erofs-utils-0.0.1~4/erofs_config.c +@@ -19,7 +19,7 @@ void mkfs_init_configure(void) + memset(&erofs_cfg, 0, sizeof(erofs_cfg)); + erofs_cfg.c_alg_name = "none"; + erofs_cfg.c_dbg_lvl = 0; +- erofs_cfg.c_version = EROFS_MKFS_VERSION " " __DATE__ " " __TIME__; ++ erofs_cfg.c_version = EROFS_MKFS_VERSION; + } + + void mkfs_dump_config(void) diff --git a/no-static.diff b/no-static.diff new file mode 100644 index 0000000..ff66dbe --- /dev/null +++ b/no-static.diff @@ -0,0 +1,22 @@ +From: Jan Engelhardt +Date: 2018-11-20 00:03:33.951298480 +0100 + +The flag is just completely wrong (it's supposed to be "-static", duh), and it +is not needed because LIBLZ4_STATIC is always specified as an .a file anyway. + +--- + Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +Index: erofs-utils-0.0.1~4/Makefile.am +=================================================================== +--- erofs-utils-0.0.1~4.orig/Makefile.am ++++ erofs-utils-0.0.1~4/Makefile.am +@@ -25,7 +25,6 @@ noinst_HEADERS = erofs_config.h \ + mkfs_file.h + + mkfs_erofs_CFLAGS = -Wall -Werror -DEROFS_MKFS_VERSION=\"v1.0\" +-mkfs_erofs_LDFLAGS = --static + mkfs_erofs_LDADD = $(LIBLZ4_STATIC) + ACLOCAL_AMFLAGS = -I m4 +