Initial commit

This commit is contained in:
2025-08-30 22:29:39 +03:00
commit d6788062f0
5 changed files with 101 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Exclude bpm archives
*.bpm
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# Git repository
REPO="git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git"
# Get tag name using 'git ls-remote'
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep -E 'v[0-9]{1,}.[0-9]{1,}.[0-9]{1,}' | tail -1)
# Trim 'v' character in TAG_NAME variable
VERSION=$(echo "$TAG_NAME" | tr -d 'v')
echo "$VERSION"
+8
View File
@@ -0,0 +1,8 @@
name: f2fs-tools
description: Userland tools for the f2fs filesystem
version: 1.16.0
url: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/
license: GPL2-only
architecture: any
depends: ["util-linux","glibc"]
type: source
+38
View File
@@ -0,0 +1,38 @@
From 6617d15a660becc23825007ab3fc2d270b5b250f Mon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Thu, 24 Oct 2024 20:33:38 +0000
Subject: f2fs-tools: use stdbool.h instead of bool
The existing bool definition is broken for c23, where bool is now a keyword.
Signed-off-by: Elliott Hughes <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
---
include/f2fs_fs.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 9534da98..0cb92282 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -28,6 +28,7 @@
#include <stddef.h>
#include <string.h>
#include <time.h>
+#include <stdbool.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -119,9 +120,6 @@ typedef uint16_t u16;
typedef uint8_t u8;
typedef u32 block_t;
typedef u32 nid_t;
-#ifndef bool
-typedef u8 bool;
-#endif
typedef unsigned long pgoff_t;
typedef unsigned short umode_t;
--
cgit 1.2.3-korg
+41
View File
@@ -0,0 +1,41 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
DOWNLOAD="https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/f2fs-tools-${BPM_PKG_VERSION}.tar.gz"
FILENAME="${DOWNLOAD##*/}"
# The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
cd "$BPM_SOURCE"
# Apply patches
patch -Np1 -i "$BPM_WORKDIR"/gcc-15-fix.patch
autoreconf -fi
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
./configure --prefix=/usr --disable-static
make
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
make check
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make DESTDIR="$BPM_OUTPUT" install
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/f2fs-tools/COPYING
}