Skip to content

Commit

Permalink
btrfs-progs: update to 5.16.1
Browse files Browse the repository at this point in the history
Disable libudev to avoid dependency.

Backport patch to fix 64-bit int types under ppc64 and mips64.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb authored and Beginner-Go committed Feb 15, 2022
1 parent 15f73af commit 00972ca
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
7 changes: 4 additions & 3 deletions utils/btrfs-progs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=btrfs-progs
PKG_VERSION:=5.11
PKG_RELEASE:=1
PKG_VERSION:=5.16.1
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/kdave/btrfs-progs
PKG_HASH:=d41961b0a92160c80f894ad9a1882822889c2e1d084cbf3e08b8c214a5cf0137
PKG_HASH:=3da4da5361cf86bddda80edb4c4f30ea076cb4ebec29904fa08afc930ef9e1a8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)

PKG_MAINTAINER:=Karel Kočí <karel.koci@nic.cz>
Expand Down Expand Up @@ -65,6 +65,7 @@ CONFIGURE_ARGS += \
--disable-backtrace \
--disable-convert \
--disable-documentation \
--disable-libudev \
--disable-python
ifneq ($(CONFIG_BTRFS_PROGS_ZSTD),y)
CONFIGURE_ARGS += --disable-zstd
Expand Down
43 changes: 43 additions & 0 deletions utils/btrfs-progs/patches/010-64bit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From b5159062f079d451f23d7f2a0e7d9e2f84934f94 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sat, 29 Jan 2022 17:09:56 -0800
Subject: [PATCH] btrfs-progs: fix 64-bit mips and powerpc types

The kernel uses 'unsigned long' for u64 specifically for ppc64 and
mips64.

Remove asm/types.h include as it will get included properly later.

Fixe -Wformat warnings.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
---
cmds/receive-dump.c | 1 -
kerncompat.h | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)

--- a/cmds/receive-dump.c
+++ b/cmds/receive-dump.c
@@ -31,7 +31,6 @@
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
-#include <asm/types.h>
#include <uuid/uuid.h>
#include "common/utils.h"
#include "cmds/commands.h"
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -19,6 +19,11 @@
#ifndef __KERNCOMPAT_H__
#define __KERNCOMPAT_H__

+#ifndef __SANE_USERSPACE_TYPES__
+/* For PPC64 to get LL64 types */
+#define __SANE_USERSPACE_TYPES__
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

10 comments on commit 00972ca

@helmiau
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neheb @Beginner-Go i've received some errors after compiling btrfs-progs with this commit

2022-02-15T21:46:04.1754587Z checking for struct blk_zone.capacity... no
2022-02-15T21:46:04.1949501Z checking for BLKGETZONESZ defined in linux/blkzoned.h... yes
2022-02-15T21:46:04.1950243Z configure: error: linux/blkzoned.h does not provide blk_zone.capacity
2022-02-15T21:46:04.2232061Z Makefile:96: recipe for target '/home/runner/work/HelmiWrt-OS/HelmiWrt-OS/openwrt/build_dir/target-aarch64_cortex-a72_musl/btrfs-progs-v5.16.1/.configured_68b329da9893e34099c7d8ad5cb9c940' failed
2022-02-15T21:46:04.2233430Z make[2]: *** [/home/runner/work/HelmiWrt-OS/HelmiWrt-OS/openwrt/build_dir/target-aarch64_cortex-a72_musl/btrfs-progs-v5.16.1/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1
2022-02-15T21:46:04.2237330Z make[2]: Leaving directory '/home/runner/work/HelmiWrt-OS/HelmiWrt-OS/openwrt/customfeeds/packages/utils/btrfs-progs'
2022-02-15T21:46:04.2238126Z time: package/feeds/packages/btrfs-progs/compile#1.23#0.60#1.54
2022-02-15T21:46:04.2240190Z     ERROR: package/feeds/packages/btrfs-progs failed to build.
2022-02-15T21:46:04.2287240Z make[1]: *** [package/feeds/packages/btrfs-progs/compile] Error 1
2022-02-15T21:46:04.2287752Z package/Makefile:114: recipe for target 'package/feeds/packages/btrfs-progs/compile' failed
2022-02-15T21:46:04.2293180Z make: *** [package/compile] Error 2
2022-02-15T21:46:04.2293660Z make[1]: Leaving directory '/home/runner/work/HelmiWrt-OS/HelmiWrt-OS/openwrt'
2022-02-15T21:46:04.2294410Z /home/runner/work/HelmiWrt-OS/HelmiWrt-OS/openwrt/include/toplevel.mk:228: recipe for target 'package/compile' failed
2022-02-15T21:46:04.2348247Z ##[error]Process completed with exit code 2.

can you give me some advice. Thank's.

@neheb
Copy link
Contributor Author

@neheb neheb commented on 00972ca Feb 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you trying to run this on an old kernel?

@helmiau
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is 5.4 kernel old? if yes, then i run this on an old kernel.

@neheb
Copy link
Contributor Author

@neheb neheb commented on 00972ca Feb 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original commit is for kernel openwrt 22.x, not 21.x. 22.x will be 5.10 only.

@helmiau
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then what should i do now? reverting this commit on my build or what?

@Mousehk
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 5.4 kernel has the same problem

@neheb
Copy link
Contributor Author

@neheb neheb commented on 00972ca Feb 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess? I have no idea what repository is.

@Mousehk
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem compiling the previous version,the 5.16.1 compilation error.

@breakings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WYC-2020
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.