wok rev 15824

Up: btrfs-progs to 3.12.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Jan 24 10:09:14 2014 +0000 (2014-01-24)
parents a0881230bdd1
children f651da5c6b43
files btrfs-progs/receipt btrfs-progs/stuff/btrfs-progs-build-fixes.patch btrfs-progs/stuff/btrfs-snapshot
line diff
     1.1 --- a/btrfs-progs/receipt	Fri Jan 24 14:19:06 2014 +0000
     1.2 +++ b/btrfs-progs/receipt	Fri Jan 24 10:09:14 2014 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="btrfs-progs"
     1.7 -VERSION="20120423"
     1.8 +VERSION="3.12"
     1.9  CATEGORY="system-tools"
    1.10  SHORT_DESC="Btrfs Filesystem user space tools."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
    1.12 @@ -12,14 +12,13 @@
    1.13  TAGS="filesystem fault-tolerance"
    1.14  
    1.15  DEPENDS="util-linux-uuid zlib acl"
    1.16 -BUILD_DEPENDS="e2fsprogs-dev zlib-dev acl-dev git util-linux-uuid-dev"
    1.17 +BUILD_DEPENDS="util-linux-uuid-dev e2fsprogs e2fsprogs-dev zlib-dev acl-dev git"
    1.18  
    1.19  # Rules to configure and make the package.
    1.20  compile_rules()
    1.21  {
    1.22  	cd $src
    1.23 -	#patch -Np1 -i $stuff/btrfs-progs-build-fixes.patch
    1.24 -	make all &&
    1.25 +	make CFLAGS="${CFLAGS}" &&
    1.26  	make DESTDIR=$DESTDIR prefix=/usr install
    1.27  }
    1.28  
    1.29 @@ -28,7 +27,6 @@
    1.30  {
    1.31  	mkdir -p $fs/usr
    1.32  	cp -a $install/usr/bin $fs/usr
    1.33 -	cp -a $stuff/btrfs-snapshot $fs/usr/bin
    1.34  	# Split mkfs --> btrfs-mkfs
    1.35  	rm $fs/usr/bin/mkfs.btrfs
    1.36  }
     2.1 --- a/btrfs-progs/stuff/btrfs-progs-build-fixes.patch	Fri Jan 24 14:19:06 2014 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,32 +0,0 @@
     2.4 ---- btrfs-progs-0.19/btrfsck.c	
     2.5 -+++ btrfs-progs-0.19/btrfsck.c	
     2.6 -@@ -21,6 +21,9 @@ 
     2.7 - #include <stdio.h>
     2.8 - #include <stdlib.h>
     2.9 - #include <fcntl.h>
    2.10 -+#include <sys/types.h>
    2.11 -+#include <sys/stat.h>
    2.12 -+#include <unistd.h>
    2.13 - #include "kerncompat.h"
    2.14 - #include "ctree.h"
    2.15 - #include "disk-io.h"
    2.16 ---- btrfs-progs-0.19/mkfs.c	
    2.17 -+++ btrfs-progs-0.19/mkfs.c	
    2.18 -@@ -341,7 +341,7 @@ int main(int ac, char **av)
    2.19 - 	u64 alloc_start = 0;
    2.20 - 	u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP;
    2.21 - 	u64 data_profile = BTRFS_BLOCK_GROUP_RAID0;
    2.22 --	u32 leafsize = getpagesize();
    2.23 -+	u32 leafsize = sysconf(_SC_PAGESIZE);
    2.24 - 	u32 sectorsize = 4096;
    2.25 - 	u32 nodesize = leafsize;
    2.26 - 	u32 stripesize = 4096;
    2.27 -@@ -398,7 +398,7 @@ int main(int ac, char **av)
    2.28 - 				print_usage();
    2.29 - 		}
    2.30 - 	}
    2.31 --	sectorsize = max(sectorsize, (u32)getpagesize());
    2.32 -+	sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
    2.33 - 	if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) {
    2.34 - 		fprintf(stderr, "Illegal leafsize %u\n", leafsize);
    2.35 - 		exit(1);
     3.1 --- a/btrfs-progs/stuff/btrfs-snapshot	Fri Jan 24 14:19:06 2014 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,25 +0,0 @@
     3.4 -#!/bin/sh
     3.5 -
     3.6 -# Keep last 30 daily snapshots with crontab
     3.7 -# Note: do not create 2 snapshots simultaneously (break btrfs mountage)
     3.8 -#0 * * * * /usr/bin/btrfs-snapshot 5  -hourly
     3.9 -#1 0 * * * /usr/bin/btrfs-snapshot 30 -daily
    3.10 -#2 0 1 * * /usr/bin/btrfs-snapshot 12 -monthly
    3.11 -#3 0 1 1 * /usr/bin/btrfs-snapshot 99 -yearly
    3.12 -
    3.13 -btrfs_list()
    3.14 -{
    3.15 -	awk '/ btrfs / { if (fs[$1] == "") { fs[$1] = $2; print $2 }}' \
    3.16 -		< /proc/mounts
    3.17 -}
    3.18 -
    3.19 -which btrfs > /dev/null && for root in $(btrfs_list) ; do
    3.20 -	dir=${root%/}/.snapshots$2
    3.21 -	[ -d $dir ] || mkdir $dir
    3.22 -	cd $dir
    3.23 -	i=0
    3.24 -	for s in $(ls -r); do
    3.25 -		[ $((i++)) -ge ${1:-10} ] && btrfs subvolume delete $s
    3.26 -	done
    3.27 -	btrfs subvolume snapshot -r / $(date +%Y%m%d%H%M%S)
    3.28 -done