diff options
author | Erich Ritz <erich.public@protonmail.com> | 2022-04-01 11:46:18 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-02 18:19:03 +0700 |
commit | 3490e261887aa4e209164e817a1f72efa7a0a894 (patch) | |
tree | 2ac925139ceae4fc05c93f8aa2b303515a467f59 | |
parent | 0c458bed262f4f5f2dc3505cfb2d94baef2578d6 (diff) | |
download | slackbuilds-3490e261887aa4e209164e817a1f72efa7a0a894.tar.gz |
system/duperemove: Added (Find duplicate extents).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/duperemove/README | 20 | ||||
-rw-r--r-- | system/duperemove/duperemove.SlackBuild | 95 | ||||
-rw-r--r-- | system/duperemove/duperemove.info | 10 | ||||
-rw-r--r-- | system/duperemove/slack-desc | 19 |
4 files changed, 144 insertions, 0 deletions
diff --git a/system/duperemove/README b/system/duperemove/README new file mode 100644 index 0000000000..8cb82b560c --- /dev/null +++ b/system/duperemove/README @@ -0,0 +1,20 @@ +Duperemove is a simple tool for finding duplicated extents and +submitting them for deduplication. When given a list of files it will +hash their contents on a block by block basis and compare those hashes +to each other, finding and categorizing blocks that match each other. +When given the -d option, duperemove will submit those extents for +deduplication using the Linux kernel extent-same ioctl. + +Duperemove can store the hashes it computes in a 'hashfile'. If given an +existing hashfile, duperemove will only compute hashes for those files +which have changed since the last run. Thus you can run duperemove +repeatedly on your data as it changes, without having to re-checksum +unchanged data. + +Duperemove can also take input from the fdupes program. + +Deduplication is currently only supported by the btrfs and xfs +filesystems. + +fdupes is an optional runtime dependency (allows the use of the --fdupes +command line option). diff --git a/system/duperemove/duperemove.SlackBuild b/system/duperemove/duperemove.SlackBuild new file mode 100644 index 0000000000..c1ae5ae811 --- /dev/null +++ b/system/duperemove/duperemove.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/bash + +# Slackware build script for duperemove + +# Copyright 2022 Erich Ritz, Jenks, Oklahoma, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=duperemove +VERSION=${VERSION:-0.11.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# No need to add "-O2"; it is set in the Makefile. +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-Wall -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-Wall -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-Wall -fPIC" +else + SLKCFLAGS="-Wall" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +make CFLAGS="$SLKCFLAGS" +make install PREFIX=/usr MANDIR=/usr/man DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + README.md LICENSE LICENSE.xxhash SubmittingPatches rbtree.txt docs \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/duperemove/duperemove.info b/system/duperemove/duperemove.info new file mode 100644 index 0000000000..058b065af1 --- /dev/null +++ b/system/duperemove/duperemove.info @@ -0,0 +1,10 @@ +PRGNAM="duperemove" +VERSION="0.11.3" +HOMEPAGE="https://markfasheh.github.io/duperemove/" +DOWNLOAD="https://github.com/markfasheh/duperemove/archive/refs/tags/v0.11.3/duperemove-0.11.3.tar.gz" +MD5SUM="7709d318cd67d2d080b87a6d410323b7" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Erich Ritz" +EMAIL="erich.public@protonmail.com" diff --git a/system/duperemove/slack-desc b/system/duperemove/slack-desc new file mode 100644 index 0000000000..af0530208e --- /dev/null +++ b/system/duperemove/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +duperemove: duperemove (find duplicated extents and submit for deduplication) +duperemove: +duperemove: Duperemove is a simple tool for finding duplicated extents and +duperemove: submitting them for deduplication. When given a list of files it will +duperemove: hash their contents on a block by block basis and compare those hashes +duperemove: to each other, finding and categorizing extents that match each other. +duperemove: When given the -d option, duperemove will submit those extents for +duperemove: deduplication using the Linux kernel extent-same ioctl. +duperemove: +duperemove: Homepage: https://markfasheh.github.io/duperemove/ +duperemove: |