forked from pool/erofs-utils
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
This commit is contained in:
commit
db479c5e0d
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
14
_service
Normal file
14
_service
Normal file
@ -0,0 +1,14 @@
|
||||
<services>
|
||||
<service mode="disabled" name="tar_scm">
|
||||
<param name="url">https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">mkfs-dev</param>
|
||||
<param name="parent-tag">dfb7ee1144ec47df68e823105cd0cea8cffcd1dc</param>
|
||||
<param name="versionformat">0.0.1~@TAG_OFFSET@</param>
|
||||
</service>
|
||||
<service mode="disabled" name="recompress">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service mode="disabled" name="set_version"/>
|
||||
</services>
|
42
constant.diff
Normal file
42
constant.diff
Normal file
@ -0,0 +1,42 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
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)]))
|
3
erofs-utils-0.0.1~4.tar.xz
Normal file
3
erofs-utils-0.0.1~4.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ac09d5cefbfa0d2fc0b17c93c5c5ea2481b346ff7841638b720441431508c7e
|
||||
size 27008
|
5
erofs-utils.changes
Normal file
5
erofs-utils.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 19 20:57:48 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Initial version (0.0.1~4 / 4f437e3) for build.opensuse.org
|
||||
- Add constant.diff, no-static.diff, no-date.diff
|
71
erofs-utils.spec
Normal file
71
erofs-utils.spec
Normal file
@ -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
|
3
lz4-1.8.3.tar.gz
Normal file
3
lz4-1.8.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:33af5936ac06536805f9745e0b6d61da606a1f8b4cc5c04dd3cbaca3b9b4fc43
|
||||
size 327897
|
20
no-date.diff
Normal file
20
no-date.diff
Normal file
@ -0,0 +1,20 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
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)
|
22
no-static.diff
Normal file
22
no-static.diff
Normal file
@ -0,0 +1,22 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user