summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/archivemount/Manifest3
-rw-r--r--sys-fs/archivemount/archivemount-0.8.3.ebuild18
-rw-r--r--sys-fs/archivemount/archivemount-0.8.4.ebuild18
-rw-r--r--sys-fs/archivemount/archivemount-0.8.5.ebuild18
-rw-r--r--sys-fs/archivemount/metadata.xml8
-rw-r--r--sys-fs/arm-fdisk/Manifest3
-rw-r--r--sys-fs/arm-fdisk/arm-fdisk-3.0.6-r1.ebuild44
-rw-r--r--sys-fs/arm-fdisk/arm-fdisk-3.0.6.ebuild37
-rw-r--r--sys-fs/arm-fdisk/metadata.xml5
-rw-r--r--sys-fs/atari-fdisk/Manifest2
-rw-r--r--sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.1.ebuild42
-rw-r--r--sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild42
-rw-r--r--sys-fs/atari-fdisk/metadata.xml7
-rw-r--r--sys-fs/aufs-headers/Manifest3
-rw-r--r--sys-fs/aufs-headers/aufs-headers-3.19_p20150323.ebuild28
-rw-r--r--sys-fs/aufs-headers/aufs-headers-3.19_p20150420.ebuild28
-rw-r--r--sys-fs/aufs-headers/aufs-headers-4.0_p20150420.ebuild28
-rw-r--r--sys-fs/aufs-headers/metadata.xml7
-rw-r--r--sys-fs/aufs-util/Manifest3
-rw-r--r--sys-fs/aufs-util/aufs-util-3.19_p20150323.ebuild46
-rw-r--r--sys-fs/aufs-util/aufs-util-3.19_p20150420.ebuild46
-rw-r--r--sys-fs/aufs-util/aufs-util-4.0_p20150420.ebuild47
-rw-r--r--sys-fs/aufs-util/files/aufs-util-4.0_p20150420-version.patch16
-rw-r--r--sys-fs/aufs-util/metadata.xml7
-rw-r--r--sys-fs/aufs3/Manifest8
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150406.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150420.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150504.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150511.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150518.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150525.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150608.ebuild172
-rw-r--r--sys-fs/aufs3/aufs3-3_p20150622.ebuild172
-rw-r--r--sys-fs/aufs3/files/README.gentoo20
-rw-r--r--sys-fs/aufs3/files/pax-3.11.patch89
-rw-r--r--sys-fs/aufs3/files/pax-3.patch90
-rw-r--r--sys-fs/aufs3/metadata.xml17
-rw-r--r--sys-fs/aufs4/Manifest8
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150420.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150504.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150511.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150518.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150525.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150608.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150622.ebuild164
-rw-r--r--sys-fs/aufs4/aufs4-0_pre20150629.ebuild164
-rw-r--r--sys-fs/aufs4/files/README.gentoo20
-rw-r--r--sys-fs/aufs4/files/pax-4.patch89
-rw-r--r--sys-fs/aufs4/metadata.xml17
-rw-r--r--sys-fs/autorun/Manifest1
-rw-r--r--sys-fs/autorun/autorun-3.17.ebuild36
-rw-r--r--sys-fs/autorun/files/autorun-3.17-headers.patch13
-rw-r--r--sys-fs/autorun/metadata.xml8
-rw-r--r--sys-fs/avfs/Manifest3
-rw-r--r--sys-fs/avfs/avfs-1.0.1.ebuild61
-rw-r--r--sys-fs/avfs/avfs-1.0.2.ebuild61
-rw-r--r--sys-fs/avfs/avfs-1.0.3.ebuild61
-rw-r--r--sys-fs/avfs/metadata.xml13
-rw-r--r--sys-fs/bashmount/Manifest1
-rw-r--r--sys-fs/bashmount/bashmount-3.2.0.ebuild30
-rw-r--r--sys-fs/bashmount/metadata.xml10
-rw-r--r--sys-fs/bcache-tools/Manifest3
-rw-r--r--sys-fs/bcache-tools/bcache-tools-0_pre20130627-r1.ebuild43
-rw-r--r--sys-fs/bcache-tools/bcache-tools-1.0.4.ebuild52
-rw-r--r--sys-fs/bcache-tools/bcache-tools-1.0.5.ebuild52
-rw-r--r--sys-fs/bcache-tools/bcache-tools-9999.ebuild58
-rw-r--r--sys-fs/bcache-tools/metadata.xml7
-rw-r--r--sys-fs/bedup/Manifest1
-rw-r--r--sys-fs/bedup/bedup-0.9.0_p20140413-r1.ebuild28
-rw-r--r--sys-fs/bedup/bedup-9999.ebuild38
-rw-r--r--sys-fs/bedup/metadata.xml11
-rw-r--r--sys-fs/bindfs/Manifest4
-rw-r--r--sys-fs/bindfs/bindfs-1.12.2.ebuild32
-rw-r--r--sys-fs/bindfs/bindfs-1.12.3.ebuild32
-rw-r--r--sys-fs/bindfs/bindfs-1.12.5.ebuild31
-rw-r--r--sys-fs/bindfs/bindfs-1.12.6.ebuild31
-rw-r--r--sys-fs/bindfs/files/bindfs-1.10.7-cflags.patch16
-rw-r--r--sys-fs/bindfs/files/bindfs-1.12.2-ac-config-headers.patch25
-rw-r--r--sys-fs/bindfs/metadata.xml15
-rw-r--r--sys-fs/btrfs-progs/Manifest9
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-3.14.2.ebuild62
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-3.16.2.ebuild63
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-3.17.3.ebuild63
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-3.18.2.ebuild63
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-3.19.1.ebuild80
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-4.0.1.ebuild80
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-4.0.ebuild80
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-4.1.2.ebuild81
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-4.1.ebuild81
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-9999.ebuild81
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch30
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch11
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch17
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch78
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch111
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch146
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch13
-rw-r--r--sys-fs/btrfs-progs/metadata.xml15
-rw-r--r--sys-fs/cachefilesd/Manifest1
-rw-r--r--sys-fs/cachefilesd/cachefilesd-0.10.5-r4.ebuild57
-rw-r--r--sys-fs/cachefilesd/files/0.10.1-makefile.patch21
-rw-r--r--sys-fs/cachefilesd/files/0.10.4-makefile.patch24
-rw-r--r--sys-fs/cachefilesd/files/cachefilesd-2.init54
-rw-r--r--sys-fs/cachefilesd/files/cachefilesd-3.init56
-rw-r--r--sys-fs/cachefilesd/files/cachefilesd-tmpfiles.d1
-rw-r--r--sys-fs/cachefilesd/files/cachefilesd.conf8
-rw-r--r--sys-fs/cachefilesd/files/cachefilesd.init52
-rw-r--r--sys-fs/cachefilesd/metadata.xml7
-rw-r--r--sys-fs/clamfs/Manifest1
-rw-r--r--sys-fs/clamfs/clamfs-1.0.1-r1.ebuild43
-rw-r--r--sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch15
-rw-r--r--sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch12
-rw-r--r--sys-fs/clamfs/files/clamfs.confd1
-rw-r--r--sys-fs/clamfs/files/clamfs.initd22
-rw-r--r--sys-fs/clamfs/metadata.xml15
-rw-r--r--sys-fs/cloudfuse/Manifest1
-rw-r--r--sys-fs/cloudfuse/cloudfuse-1.0.ebuild24
-rw-r--r--sys-fs/cloudfuse/metadata.xml20
-rw-r--r--sys-fs/copyfs/Manifest1
-rw-r--r--sys-fs/copyfs/copyfs-1.0.1.ebuild44
-rw-r--r--sys-fs/copyfs/files/copyfs-1.0-unlink.patch158
-rw-r--r--sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch46
-rw-r--r--sys-fs/copyfs/metadata.xml8
-rw-r--r--sys-fs/cramfs/Manifest1
-rw-r--r--sys-fs/cramfs/cramfs-1.1.ebuild26
-rw-r--r--sys-fs/cramfs/metadata.xml8
-rw-r--r--sys-fs/cryptsetup/Manifest4
-rw-r--r--sys-fs/cryptsetup/cryptsetup-1.6.2.ebuild122
-rw-r--r--sys-fs/cryptsetup/cryptsetup-1.6.5.ebuild124
-rw-r--r--sys-fs/cryptsetup/cryptsetup-1.6.6.ebuild130
-rw-r--r--sys-fs/cryptsetup/cryptsetup-1.6.7.ebuild103
-rw-r--r--sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd105
-rwxr-xr-xsys-fs/cryptsetup/files/1.5.1-dmcrypt.rc335
-rw-r--r--sys-fs/cryptsetup/files/1.6.7-dmcrypt.confd111
-rwxr-xr-xsys-fs/cryptsetup/files/1.6.7-dmcrypt.rc340
-rw-r--r--sys-fs/cryptsetup/files/cryptsetup-1.6.1-openssl-static.patch13
-rw-r--r--sys-fs/cryptsetup/metadata.xml17
-rw-r--r--sys-fs/davl/Manifest1
-rw-r--r--sys-fs/davl/davl-1.2.4-r1.ebuild36
-rw-r--r--sys-fs/davl/files/davl-1.2.1-asneeded.patch41
-rw-r--r--sys-fs/davl/files/davl-1.2.4-fragment.patch20
-rw-r--r--sys-fs/davl/metadata.xml10
-rw-r--r--sys-fs/dd-rescue/Manifest6
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.28.ebuild45
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.33.ebuild45
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.40.ebuild45
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.44.ebuild45
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.45.ebuild82
-rw-r--r--sys-fs/dd-rescue/dd-rescue-1.46.ebuild84
-rw-r--r--sys-fs/dd-rescue/metadata.xml5
-rw-r--r--sys-fs/ddrescue/Manifest3
-rw-r--r--sys-fs/ddrescue/ddrescue-1.16.ebuild40
-rw-r--r--sys-fs/ddrescue/ddrescue-1.18.1.ebuild42
-rw-r--r--sys-fs/ddrescue/ddrescue-1.19.ebuild43
-rw-r--r--sys-fs/ddrescue/metadata.xml8
-rw-r--r--sys-fs/devfsd/Manifest1
-rw-r--r--sys-fs/devfsd/devfsd-1.3.25-r9.ebuild60
-rwxr-xr-xsys-fs/devfsd/files/devfs-start.sh28
-rwxr-xr-xsys-fs/devfsd/files/devfs-stop.sh16
-rw-r--r--sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch131
-rw-r--r--sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch69
-rw-r--r--sys-fs/devfsd/files/devfsd-1.3.25-pic.patch16
-rw-r--r--sys-fs/devfsd/files/devfsd.conf139
-rw-r--r--sys-fs/devfsd/metadata.xml5
-rw-r--r--sys-fs/dfc/Manifest1
-rw-r--r--sys-fs/dfc/dfc-3.0.5-r1.ebuild36
-rw-r--r--sys-fs/dfc/metadata.xml8
-rw-r--r--sys-fs/diskdev_cmds/Manifest3
-rw-r--r--sys-fs/diskdev_cmds/diskdev_cmds-332.14.ebuild41
-rw-r--r--sys-fs/diskdev_cmds/diskdev_cmds-332.14_p1.ebuild47
-rw-r--r--sys-fs/diskdev_cmds/files/diskdev_cmds-respect-cflags.patch9
-rw-r--r--sys-fs/diskdev_cmds/metadata.xml14
-rw-r--r--sys-fs/dmg2img/Manifest5
-rw-r--r--sys-fs/dmg2img/dmg2img-1.6.1.ebuild36
-rw-r--r--sys-fs/dmg2img/dmg2img-1.6.2.ebuild36
-rw-r--r--sys-fs/dmg2img/dmg2img-1.6.4.ebuild36
-rw-r--r--sys-fs/dmg2img/dmg2img-1.6.5.ebuild36
-rw-r--r--sys-fs/dmg2img/dmg2img-1.6.ebuild36
-rw-r--r--sys-fs/dmg2img/metadata.xml13
-rw-r--r--sys-fs/dmraid/Manifest3
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild72
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild72
-rw-r--r--sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild99
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch24
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch13
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch11
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch11
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch110
-rw-r--r--sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch13
-rw-r--r--sys-fs/dmraid/files/dmraid-destdir-fix.patch34
-rw-r--r--sys-fs/dmraid/metadata.xml16
-rw-r--r--sys-fs/dosfstools/Manifest3
-rw-r--r--sys-fs/dosfstools/dosfstools-3.0.26.ebuild28
-rw-r--r--sys-fs/dosfstools/dosfstools-3.0.27.ebuild28
-rw-r--r--sys-fs/dosfstools/dosfstools-3.0.28.ebuild29
-rw-r--r--sys-fs/dosfstools/files/dosfstools-3.0.20-name-ext.patch29
-rw-r--r--sys-fs/dosfstools/metadata.xml8
-rw-r--r--sys-fs/duperemove/Manifest5
-rw-r--r--sys-fs/duperemove/duperemove-0.09.1.ebuild26
-rw-r--r--sys-fs/duperemove/duperemove-0.09.2.ebuild36
-rw-r--r--sys-fs/duperemove/duperemove-0.09.3.ebuild31
-rw-r--r--sys-fs/duperemove/duperemove-0.09.4.ebuild31
-rw-r--r--sys-fs/duperemove/duperemove-0.09.5.ebuild31
-rw-r--r--sys-fs/duperemove/metadata.xml15
-rw-r--r--sys-fs/e2fsprogs/Manifest4
-rw-r--r--sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild138
-rw-r--r--sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild126
-rw-r--r--sys-fs/e2fsprogs/e2fsprogs-1.42.13.ebuild126
-rw-r--r--sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch45
-rw-r--r--sys-fs/e2fsprogs/files/e2fsck.conf6
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.38-tests-locale.patch26
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch11
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.41.5-makefile.patch91
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.41.8-makefile.patch10
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-e2fsck-fix-makefile-dependency.patch28
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-fix-build-cflags.patch13
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch13
-rw-r--r--sys-fs/e2fsprogs/files/fsck_ext2fs.896
-rw-r--r--sys-fs/e2fsprogs/files/fsck_ext2fs.c147
-rw-r--r--sys-fs/e2fsprogs/metadata.xml9
-rw-r--r--sys-fs/e2tools/Manifest1
-rw-r--r--sys-fs/e2tools/e2tools-0.0.16.ebuild22
-rw-r--r--sys-fs/e2tools/metadata.xml5
-rw-r--r--sys-fs/e4rat/Manifest2
-rw-r--r--sys-fs/e4rat/e4rat-0.2.3-r1.ebuild61
-rw-r--r--sys-fs/e4rat/e4rat-0.2.4_pre20141201.ebuild64
-rw-r--r--sys-fs/e4rat/files/e4rat-0.2.2-libdir.patch14
-rw-r--r--sys-fs/e4rat/files/e4rat-0.2.2-shared-build.patch74
-rw-r--r--sys-fs/e4rat/files/e4rat-0.2.3-boostfsv3.patch86
-rw-r--r--sys-fs/e4rat/files/e4rat-libdir.patch26
-rw-r--r--sys-fs/e4rat/files/e4rat-shared-build.patch96
-rw-r--r--sys-fs/e4rat/metadata.xml8
-rw-r--r--sys-fs/ecryptfs-utils/Manifest1
-rw-r--r--sys-fs/ecryptfs-utils/ecryptfs-utils-104.ebuild134
-rw-r--r--sys-fs/ecryptfs-utils/metadata.xml17
-rw-r--r--sys-fs/encfs/Manifest2
-rw-r--r--sys-fs/encfs/encfs-1.7.5.ebuild44
-rw-r--r--sys-fs/encfs/encfs-1.8.1.ebuild50
-rw-r--r--sys-fs/encfs/files/encfs-1.7.5-fix-pod.patch16
-rw-r--r--sys-fs/encfs/metadata.xml12
-rw-r--r--sys-fs/etcd-fs/Manifest1
-rw-r--r--sys-fs/etcd-fs/etcd-fs-0_p20140620.ebuild32
-rw-r--r--sys-fs/etcd-fs/metadata.xml13
-rw-r--r--sys-fs/eudev/Manifest7
-rw-r--r--sys-fs/eudev/eudev-1.10-r2.ebuild301
-rw-r--r--sys-fs/eudev/eudev-1.3.ebuild279
-rw-r--r--sys-fs/eudev/eudev-1.5.3-r1.ebuild286
-rw-r--r--sys-fs/eudev/eudev-1.9-r2.ebuild302
-rw-r--r--sys-fs/eudev/eudev-2.1.1.ebuild296
-rw-r--r--sys-fs/eudev/eudev-3.0.ebuild274
-rw-r--r--sys-fs/eudev/eudev-3.1.2-r10.ebuild270
-rw-r--r--sys-fs/eudev/eudev-3.1.2.ebuild274
-rw-r--r--sys-fs/eudev/eudev-9999.ebuild274
-rw-r--r--sys-fs/eudev/files/40-gentoo.rules10
-rw-r--r--sys-fs/eudev/files/eudev-exclude-MD.patch53
-rw-r--r--sys-fs/eudev/files/eudev-fix-selinux-headers.patch32
-rw-r--r--sys-fs/eudev/files/eudev-fix-selinux-linking.patch30
-rw-r--r--sys-fs/eudev/files/eudev-selinux-timespan.patch27
-rwxr-xr-xsys-fs/eudev/files/udev-postmount55
-rw-r--r--sys-fs/eudev/metadata.xml23
-rw-r--r--sys-fs/exfat-utils/Manifest3
-rw-r--r--sys-fs/exfat-utils/exfat-utils-1.0.1.ebuild29
-rw-r--r--sys-fs/exfat-utils/exfat-utils-1.1.0.ebuild29
-rw-r--r--sys-fs/exfat-utils/exfat-utils-1.1.1.ebuild29
-rw-r--r--sys-fs/exfat-utils/metadata.xml12
-rw-r--r--sys-fs/ext3grep/Manifest1
-rw-r--r--sys-fs/ext3grep/ext3grep-0.10.2.ebuild38
-rw-r--r--sys-fs/ext3grep/files/ext3grep-0.10.1-gcc44.patch197
-rw-r--r--sys-fs/ext3grep/files/ext3grep-0.10.2-include-unistd_h-for-sysconf.patch15
-rw-r--r--sys-fs/ext3grep/files/ext3grep-0.10.2-new-e2fsprogs.diff34
-rw-r--r--sys-fs/ext3grep/metadata.xml10
-rw-r--r--sys-fs/ext4magic/Manifest1
-rw-r--r--sys-fs/ext4magic/ext4magic-0.3.2.ebuild34
-rw-r--r--sys-fs/ext4magic/metadata.xml22
-rw-r--r--sys-fs/extundelete/Manifest3
-rw-r--r--sys-fs/extundelete/extundelete-0.2.0-r1.ebuild27
-rw-r--r--sys-fs/extundelete/extundelete-0.2.0-r2.ebuild30
-rw-r--r--sys-fs/extundelete/extundelete-0.2.4.ebuild21
-rw-r--r--sys-fs/extundelete/files/extundelete-0.2.0-build.patch23
-rw-r--r--sys-fs/extundelete/metadata.xml12
-rw-r--r--sys-fs/f2fs-tools/Manifest5
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.1.0-r1.ebuild19
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.2.0.ebuild26
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.3.0.ebuild26
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.4.0.ebuild26
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.4.1.ebuild26
-rw-r--r--sys-fs/f2fs-tools/metadata.xml8
-rw-r--r--sys-fs/fatsort/Manifest1
-rw-r--r--sys-fs/fatsort/fatsort-1.3.ebuild40
-rw-r--r--sys-fs/fatsort/files/fatsort-1.2-tests.patch30
-rw-r--r--sys-fs/fatsort/metadata.xml17
-rw-r--r--sys-fs/fur/Manifest1
-rw-r--r--sys-fs/fur/fur-0.5.ebuild34
-rw-r--r--sys-fs/fur/metadata.xml11
-rw-r--r--sys-fs/fuse-convmvfs/Manifest1
-rw-r--r--sys-fs/fuse-convmvfs/files/mount.convmvfs8
-rw-r--r--sys-fs/fuse-convmvfs/fuse-convmvfs-0.2.6.ebuild25
-rw-r--r--sys-fs/fuse-convmvfs/metadata.xml10
-rw-r--r--sys-fs/fuse-exfat/Manifest2
-rw-r--r--sys-fs/fuse-exfat/files/99-exfat.rules1
-rw-r--r--sys-fs/fuse-exfat/fuse-exfat-1.0.1.ebuild38
-rw-r--r--sys-fs/fuse-exfat/fuse-exfat-1.1.0.ebuild35
-rw-r--r--sys-fs/fuse-exfat/metadata.xml12
-rw-r--r--sys-fs/fuse-zip/Manifest4
-rw-r--r--sys-fs/fuse-zip/files/fuse-zip-0.2.13-as-needed.patch11
-rw-r--r--sys-fs/fuse-zip/files/libzip-fix-0.10.patch24
-rw-r--r--sys-fs/fuse-zip/fuse-zip-0.2.12.ebuild30
-rw-r--r--sys-fs/fuse-zip/fuse-zip-0.2.13.ebuild42
-rw-r--r--sys-fs/fuse-zip/fuse-zip-0.3.0.ebuild39
-rw-r--r--sys-fs/fuse-zip/fuse-zip-0.4.0.ebuild37
-rw-r--r--sys-fs/fuse-zip/metadata.xml13
-rw-r--r--sys-fs/fuse/Manifest2
-rw-r--r--sys-fs/fuse/files/fuse-2.9.3-kernel-types.patch19
-rw-r--r--sys-fs/fuse/files/fuse-fbsd.init23
-rw-r--r--sys-fs/fuse/files/fuse.init35
-rw-r--r--sys-fs/fuse/fuse-2.9.3.ebuild88
-rw-r--r--sys-fs/fuse/fuse-2.9.4.ebuild88
-rw-r--r--sys-fs/fuse/metadata.xml9
-rw-r--r--sys-fs/fuse4bsd/Manifest4
-rw-r--r--sys-fs/fuse4bsd/files/fuse4bsd-0.3.0-gcc4.patch12
-rw-r--r--sys-fs/fuse4bsd/files/fuse4bsd-0.3.0-ports.patch491
-rw-r--r--sys-fs/fuse4bsd/files/fuse4bsd-0.3.9_pre1-fbsd91.patch15
-rw-r--r--sys-fs/fuse4bsd/files/fuse4bsd-0.3.9_pre1-ports.patch475
-rw-r--r--sys-fs/fuse4bsd/fuse4bsd-0.3.0.ebuild51
-rw-r--r--sys-fs/fuse4bsd/fuse4bsd-0.3.9_pre1.ebuild72
-rw-r--r--sys-fs/fuse4bsd/metadata.xml5
-rw-r--r--sys-fs/fuseiso/Manifest1
-rw-r--r--sys-fs/fuseiso/files/fuseiso-20070708-fix-typo.patch12
-rw-r--r--sys-fs/fuseiso/files/fuseiso-20070708-largeiso.patch48
-rw-r--r--sys-fs/fuseiso/fuseiso-20070708-r1.ebuild29
-rw-r--r--sys-fs/fuseiso/metadata.xml8
-rw-r--r--sys-fs/genext2fs/Manifest4
-rw-r--r--sys-fs/genext2fs/genext2fs-1.3-r1.ebuild33
-rw-r--r--sys-fs/genext2fs/genext2fs-1.4.1.ebuild19
-rw-r--r--sys-fs/genext2fs/genext2fs-1.4.ebuild19
-rw-r--r--sys-fs/genext2fs/metadata.xml8
-rw-r--r--sys-fs/gfs2-utils/Manifest3
-rw-r--r--sys-fs/gfs2-utils/gfs2-utils-3.1.2.ebuild50
-rw-r--r--sys-fs/gfs2-utils/gfs2-utils-3.1.3.ebuild50
-rw-r--r--sys-fs/gfs2-utils/gfs2-utils-3.1.5.ebuild52
-rw-r--r--sys-fs/gfs2-utils/metadata.xml6
-rw-r--r--sys-fs/go-mtpfs/go-mtpfs-9999.ebuild49
-rw-r--r--sys-fs/go-mtpfs/metadata.xml13
-rw-r--r--sys-fs/gt5/Manifest1
-rw-r--r--sys-fs/gt5/files/gt5-1.4.0-bash-shabang.patch9
-rw-r--r--sys-fs/gt5/files/gt5-1.4.0-empty-dirs.patch11
-rw-r--r--sys-fs/gt5/gt5-1.4.0-r2.ebuild32
-rw-r--r--sys-fs/gt5/metadata.xml11
-rw-r--r--sys-fs/hfsplusutils/Manifest1
-rw-r--r--sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-errno.patch19
-rw-r--r--sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-gcc4.patch132
-rw-r--r--sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-glob.patch12
-rw-r--r--sys-fs/hfsplusutils/files/hfsplusutils-1.0.4-string.patch11
-rw-r--r--sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild36
-rw-r--r--sys-fs/hfsplusutils/metadata.xml5
-rw-r--r--sys-fs/hfsutils/Manifest1
-rw-r--r--sys-fs/hfsutils/files/hfsutils-3.2.6-errno.patch13
-rw-r--r--sys-fs/hfsutils/files/hfsutils-3.2.6-fix-tcl-8.6.patch8
-rw-r--r--sys-fs/hfsutils/files/largerthan2gb.patch14
-rw-r--r--sys-fs/hfsutils/hfsutils-3.2.6-r5.ebuild51
-rw-r--r--sys-fs/hfsutils/metadata.xml5
-rw-r--r--sys-fs/inotify-tools/Manifest2
-rw-r--r--sys-fs/inotify-tools/inotify-tools-3.13-r1.ebuild34
-rw-r--r--sys-fs/inotify-tools/inotify-tools-3.14.ebuild34
-rw-r--r--sys-fs/inotify-tools/metadata.xml16
-rw-r--r--sys-fs/iprutils/Manifest5
-rwxr-xr-xsys-fs/iprutils/files/iprdump16
-rwxr-xr-xsys-fs/iprutils/files/iprdump-r116
-rwxr-xr-xsys-fs/iprutils/files/iprinit20
-rwxr-xr-xsys-fs/iprutils/files/iprinit-r120
-rwxr-xr-xsys-fs/iprutils/files/iprupdate11
-rwxr-xr-xsys-fs/iprutils/files/iprupdate-r111
-rw-r--r--sys-fs/iprutils/files/iprutils-2.4.7-tinfo.patch14
-rw-r--r--sys-fs/iprutils/files/iprutils-2.4.8-tinfo.patch14
-rw-r--r--sys-fs/iprutils/iprutils-2.3.13.ebuild41
-rw-r--r--sys-fs/iprutils/iprutils-2.3.18.ebuild56
-rw-r--r--sys-fs/iprutils/iprutils-2.3.9.ebuild41
-rw-r--r--sys-fs/iprutils/iprutils-2.4.7.ebuild46
-rw-r--r--sys-fs/iprutils/iprutils-2.4.8-r1.ebuild51
-rw-r--r--sys-fs/iprutils/metadata.xml8
-rw-r--r--sys-fs/jdiskreport-bin/Manifest3
-rw-r--r--sys-fs/jdiskreport-bin/jdiskreport-bin-1.2.5-r1.ebuild32
-rw-r--r--sys-fs/jdiskreport-bin/jdiskreport-bin-1.3.0.ebuild32
-rw-r--r--sys-fs/jdiskreport-bin/jdiskreport-bin-1.4.1.ebuild32
-rw-r--r--sys-fs/jdiskreport-bin/metadata.xml11
-rw-r--r--sys-fs/jfsutils/Manifest1
-rw-r--r--sys-fs/jfsutils/files/jfsutils-1.1.15-linux-headers.patch12
-rw-r--r--sys-fs/jfsutils/jfsutils-1.1.15.ebuild38
-rw-r--r--sys-fs/jfsutils/metadata.xml9
-rw-r--r--sys-fs/jmtpfs/Manifest1
-rw-r--r--sys-fs/jmtpfs/jmtpfs-0.5.ebuild30
-rw-r--r--sys-fs/jmtpfs/metadata.xml10
-rw-r--r--sys-fs/ldapfuse/Manifest1
-rw-r--r--sys-fs/ldapfuse/ldapfuse-1.0.ebuild23
-rw-r--r--sys-fs/ldapfuse/metadata.xml10
-rw-r--r--sys-fs/lde/Manifest1
-rw-r--r--sys-fs/lde/files/lde-2.6.1-no-shadowing.patch39
-rw-r--r--sys-fs/lde/lde-2.6.1.ebuild33
-rw-r--r--sys-fs/lde/metadata.xml8
-rw-r--r--sys-fs/lessfs/Manifest2
-rw-r--r--sys-fs/lessfs/lessfs-1.5.13.ebuild49
-rw-r--r--sys-fs/lessfs/lessfs-1.7.0.ebuild51
-rw-r--r--sys-fs/lessfs/metadata.xml19
-rw-r--r--sys-fs/libeatmydata/Manifest3
-rw-r--r--sys-fs/libeatmydata/files/libeatmydata-105-undpkg.patch14
-rw-r--r--sys-fs/libeatmydata/libeatmydata-105-r1.ebuild33
-rw-r--r--sys-fs/libeatmydata/libeatmydata-65.ebuild30
-rw-r--r--sys-fs/libeatmydata/libeatmydata-82-r1.ebuild27
-rw-r--r--sys-fs/libeatmydata/libeatmydata-82.ebuild30
-rw-r--r--sys-fs/libeatmydata/metadata.xml15
-rw-r--r--sys-fs/libfat/Manifest1
-rw-r--r--sys-fs/libfat/libfat-0.3a.ebuild21
-rw-r--r--sys-fs/libfat/metadata.xml11
-rw-r--r--sys-fs/loop-aes/Manifest2
-rw-r--r--sys-fs/loop-aes/files/loop-aes-3.7c-linux4.patch45
-rw-r--r--sys-fs/loop-aes/loop-aes-3.7b.ebuild82
-rw-r--r--sys-fs/loop-aes/loop-aes-3.7c.ebuild83
-rw-r--r--sys-fs/loop-aes/metadata.xml15
-rw-r--r--sys-fs/lsscsi/Manifest4
-rw-r--r--sys-fs/lsscsi/lsscsi-0.25.ebuild19
-rw-r--r--sys-fs/lsscsi/lsscsi-0.26.ebuild14
-rw-r--r--sys-fs/lsscsi/lsscsi-0.27.ebuild13
-rw-r--r--sys-fs/lsscsi/lsscsi-0.28.ebuild13
-rw-r--r--sys-fs/lsscsi/metadata.xml5
-rw-r--r--sys-fs/lufis/Manifest2
-rw-r--r--sys-fs/lufis/files/lufis-0.2-lufs.patch250
-rw-r--r--sys-fs/lufis/files/lufis-allow-uid-and-gid-addon.patch29
-rw-r--r--sys-fs/lufis/lufis-0.2.ebuild34
-rw-r--r--sys-fs/lufis/lufis-0.3.ebuild30
-rw-r--r--sys-fs/lufis/metadata.xml8
-rw-r--r--sys-fs/lufs/Manifest1
-rw-r--r--sys-fs/lufs/files/lufs-0.9.7-enable-gnome-2.patch72
-rw-r--r--sys-fs/lufs/files/lufs-0.9.7-fPIC.patch12
-rw-r--r--sys-fs/lufs/files/lufs-0.9.7-gcc43.patch33
-rw-r--r--sys-fs/lufs/files/lufs-automount-port.diff28
-rw-r--r--sys-fs/lufs/files/lufs-no-kernel.patch111
-rw-r--r--sys-fs/lufs/lufs-0.9.7-r3.ebuild71
-rw-r--r--sys-fs/lufs/metadata.xml8
-rw-r--r--sys-fs/lvm2/Manifest4
-rw-r--r--sys-fs/lvm2/files/clvmd.confd-2.02.399
-rwxr-xr-xsys-fs/lvm2/files/clvmd.rc-2.02.39146
-rw-r--r--sys-fs/lvm2/files/device-mapper.conf-1.02.22-r31
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.105-r2147
-rw-r--r--sys-fs/lvm2/files/device-mapper.rc-2.02.95-r2111
-rw-r--r--sys-fs/lvm2/files/dmeventd.initd-2.02.67-r126
-rw-r--r--sys-fs/lvm2/files/dmtab12
-rw-r--r--sys-fs/lvm2/files/lvm-monitoring.initd-2.02.105-r239
-rw-r--r--sys-fs/lvm2/files/lvm-monitoring.initd-2.02.67-r246
-rw-r--r--sys-fs/lvm2/files/lvm.confd-2.02.28-r25
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.105-r297
-rw-r--r--sys-fs/lvm2/files/lvm.rc-2.02.95-r296
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch93
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.106-pthread-pkgconfig.patch32
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.107-static-pkgconfig-libs.patch104
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.108-example.conf.in.patch50
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.108-static-pkgconfig-libs.patch104
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.56-lvm2create_initrd.patch72
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.63-always-make-static-libdm.patch42
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.67-createinitrd.patch18
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.70-asneeded.patch15
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.92-dynamic-static-ldflags.patch63
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.99-example.conf.in.patch47
-rw-r--r--sys-fs/lvm2/files/lvm2-2.02.99-locale-muck.patch11
-rwxr-xr-xsys-fs/lvm2/files/lvmetad.initd-2.02.105-r213
-rw-r--r--sys-fs/lvm2/lvm2-2.02.103.ebuild235
-rw-r--r--sys-fs/lvm2/lvm2-2.02.109-r1.ebuild270
-rw-r--r--sys-fs/lvm2/lvm2-2.02.109.ebuild269
-rw-r--r--sys-fs/lvm2/lvm2-2.02.110.ebuild272
-rw-r--r--sys-fs/lvm2/lvm2-2.02.116.ebuild272
-rw-r--r--sys-fs/lvm2/metadata.xml24
-rw-r--r--sys-fs/mac-fdisk/Manifest3
-rw-r--r--sys-fs/mac-fdisk/files/big_pt.patch80
-rw-r--r--sys-fs/mac-fdisk/files/largerthan2gb.patch14
-rw-r--r--sys-fs/mac-fdisk/files/mac-fdisk-0.1-headers.patch112
-rw-r--r--sys-fs/mac-fdisk/files/mac-fdisk-0.1-r6-ppc64.patch481
-rw-r--r--sys-fs/mac-fdisk/files/mac-fdisk-0.1_p16-ppc64.patch455
-rw-r--r--sys-fs/mac-fdisk/files/mac-fdisk-amd64.patch190
-rw-r--r--sys-fs/mac-fdisk/mac-fdisk-0.1-r7.ebuild55
-rw-r--r--sys-fs/mac-fdisk/mac-fdisk-0.1_p16.ebuild53
-rw-r--r--sys-fs/mac-fdisk/metadata.xml5
-rw-r--r--sys-fs/mdadm/Manifest6
-rw-r--r--sys-fs/mdadm/files/etc-default-mdadm7
-rw-r--r--sys-fs/mdadm/files/mdadm-3.2.1-mdassemble.patch16
-rw-r--r--sys-fs/mdadm/files/mdadm-3.2.x-udevdir.patch26
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-DDF-validate-metadata_update-size-before-using-it.patch44
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-Grow-Do-not-try-to-restart-if-reshape-is-running.patch45
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-Grow-fix-removal-of-line-in-wrong-case.patch39
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-IMSM-use-strcpy-rather-than-pointless-strncpy.patch32
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-IMSM-validate-metadata_update-size-before-using-it.patch128
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-Makefile-install-mdadm-grow-continue-.service.patch28
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-mdmon-allow-prepare_update-to-report-failure.patch119
-rw-r--r--sys-fs/mdadm/files/mdadm-3.3.1-mdmon-ensure-Unix-domain-socket-is-created-with-safe.patch34
-rw-r--r--sys-fs/mdadm/files/mdadm.confd7
-rwxr-xr-xsys-fs/mdadm/files/mdadm.rc26
-rw-r--r--sys-fs/mdadm/files/mdadm.service13
-rw-r--r--sys-fs/mdadm/files/mdadm.tmpfiles.conf1
-rw-r--r--sys-fs/mdadm/files/mdadm.weekly5
-rw-r--r--sys-fs/mdadm/files/mdraid.confd11
-rw-r--r--sys-fs/mdadm/files/mdraid.rc40
-rw-r--r--sys-fs/mdadm/mdadm-3.2.6-r1.ebuild75
-rw-r--r--sys-fs/mdadm/mdadm-3.3.1-r2.ebuild96
-rw-r--r--sys-fs/mdadm/mdadm-3.3.2-r1.ebuild82
-rw-r--r--sys-fs/mdadm/mdadm-3.3.3.ebuild82
-rw-r--r--sys-fs/mdadm/mdadm-3.3.4.ebuild82
-rw-r--r--sys-fs/mdadm/metadata.xml5
-rw-r--r--sys-fs/metadata.xml32
-rw-r--r--sys-fs/mhddfs/Manifest1
-rw-r--r--sys-fs/mhddfs/files/mhddfs-respect-compiler-vars.patch66
-rw-r--r--sys-fs/mhddfs/metadata.xml8
-rw-r--r--sys-fs/mhddfs/mhddfs-0.1.39.ebuild47
-rw-r--r--sys-fs/mp3fs/Manifest2
-rw-r--r--sys-fs/mp3fs/metadata.xml11
-rw-r--r--sys-fs/mp3fs/mp3fs-0.32.ebuild24
-rw-r--r--sys-fs/mp3fs/mp3fs-0.91.ebuild21
-rw-r--r--sys-fs/mtd-utils/Manifest5
-rw-r--r--sys-fs/mtd-utils/files/mtd-utils-1.4.8-install.patch32
-rw-r--r--sys-fs/mtd-utils/metadata.xml9
-rw-r--r--sys-fs/mtd-utils/mtd-utils-1.4.5.ebuild60
-rw-r--r--sys-fs/mtd-utils/mtd-utils-1.4.6.ebuild60
-rw-r--r--sys-fs/mtd-utils/mtd-utils-1.4.8.ebuild67
-rw-r--r--sys-fs/mtd-utils/mtd-utils-1.5.0.ebuild62
-rw-r--r--sys-fs/mtd-utils/mtd-utils-1.5.1.ebuild62
-rw-r--r--sys-fs/mtd-utils/mtd-utils-99999999.ebuild62
-rw-r--r--sys-fs/mtools/Manifest5
-rw-r--r--sys-fs/mtools/files/mtools-3.9.11-flags.patch37
-rw-r--r--sys-fs/mtools/metadata.xml5
-rw-r--r--sys-fs/mtools/mtools-4.0.13.ebuild38
-rw-r--r--sys-fs/mtools/mtools-4.0.15.ebuild44
-rw-r--r--sys-fs/mtools/mtools-4.0.16.ebuild44
-rw-r--r--sys-fs/mtools/mtools-4.0.17.ebuild45
-rw-r--r--sys-fs/mtools/mtools-4.0.18.ebuild50
-rw-r--r--sys-fs/mtpfs/Manifest2
-rw-r--r--sys-fs/mtpfs/files/mtpfs-1.1-fix-mutex-crash.patch70
-rw-r--r--sys-fs/mtpfs/files/mtpfs-1.1-unitialized-variable.patch12
-rw-r--r--sys-fs/mtpfs/metadata.xml21
-rw-r--r--sys-fs/mtpfs/mtpfs-1.0.ebuild46
-rw-r--r--sys-fs/mtpfs/mtpfs-1.1-r1.ebuild54
-rw-r--r--sys-fs/mtpfs/mtpfs-1.1-r2.ebuild55
-rw-r--r--sys-fs/mtpfs/mtpfs-1.1.ebuild50
-rw-r--r--sys-fs/multipath-tools/Manifest1
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.5.0-makefile.patch200
-rw-r--r--sys-fs/multipath-tools/files/multipath-tools-0.5.0-systemd-pkgconfig.patch24
-rwxr-xr-xsys-fs/multipath-tools/files/multipath.rc27
-rw-r--r--sys-fs/multipath-tools/files/rc-multipathd21
-rw-r--r--sys-fs/multipath-tools/metadata.xml5
-rw-r--r--sys-fs/multipath-tools/multipath-tools-0.5.0-r1.ebuild66
-rw-r--r--sys-fs/ncdu/Manifest1
-rw-r--r--sys-fs/ncdu/files/ncdu-1.11-missing-header.patch22
-rw-r--r--sys-fs/ncdu/files/ncdu-1.9-pkgconfig.patch39
-rw-r--r--sys-fs/ncdu/metadata.xml15
-rw-r--r--sys-fs/ncdu/ncdu-1.11.ebuild23
-rw-r--r--sys-fs/nilfs-utils/Manifest3
-rw-r--r--sys-fs/nilfs-utils/files/nilfs-utils-2.0.14-gentoo.patch10
-rw-r--r--sys-fs/nilfs-utils/metadata.xml22
-rw-r--r--sys-fs/nilfs-utils/nilfs-utils-2.1.5-r1.ebuild37
-rw-r--r--sys-fs/nilfs-utils/nilfs-utils-2.1.6.ebuild37
-rw-r--r--sys-fs/nilfs-utils/nilfs-utils-2.2.2.ebuild37
-rw-r--r--sys-fs/ntfs3g/Manifest3
-rw-r--r--sys-fs/ntfs3g/files/99-ntfs3g.rules1
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2014.2.15-dont-put-things-in-root.patch39
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2014.2.15-fix-fstrim-applied-to-partitons.patch217
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2014.2.15-implement-fstrim.patch648
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2014.2.15-no-split-usr.patch25
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2014.2.15-update-fuse-lite-to-support-ioctls.patch610
-rw-r--r--sys-fs/ntfs3g/files/ntfs3g-2015.3.14-dont-put-things-in-root.patch30
-rw-r--r--sys-fs/ntfs3g/metadata.xml29
-rw-r--r--sys-fs/ntfs3g/ntfs3g-2013.1.13.ebuild93
-rw-r--r--sys-fs/ntfs3g/ntfs3g-2014.2.15-r1.ebuild87
-rw-r--r--sys-fs/ntfs3g/ntfs3g-2014.2.15.ebuild93
-rw-r--r--sys-fs/ntfs3g/ntfs3g-2015.3.14.ebuild85
-rw-r--r--sys-fs/obexfs/Manifest2
-rw-r--r--sys-fs/obexfs/metadata.xml12
-rw-r--r--sys-fs/obexfs/obexfs-0.11.ebuild23
-rw-r--r--sys-fs/obexfs/obexfs-0.12.ebuild26
-rw-r--r--sys-fs/ocfs2-tools/Manifest1
-rw-r--r--sys-fs/ocfs2-tools/files/ocfs2-tools-1.6.4-asneeded.patch78
-rw-r--r--sys-fs/ocfs2-tools/files/ocfs2-tools-recent-kernels.patch19
-rw-r--r--sys-fs/ocfs2-tools/files/ocfs2.confd38
-rw-r--r--sys-fs/ocfs2-tools/files/ocfs2.initd125
-rw-r--r--sys-fs/ocfs2-tools/metadata.xml8
-rw-r--r--sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r1.ebuild79
-rw-r--r--sys-fs/owfs/Manifest1
-rw-r--r--sys-fs/owfs/files/owfs-vendordir.patch30
-rw-r--r--sys-fs/owfs/files/owfs.confd2
-rwxr-xr-xsys-fs/owfs/files/owfs.initd32
-rw-r--r--sys-fs/owfs/files/owftpd.confd2
-rwxr-xr-xsys-fs/owfs/files/owftpd.initd32
-rw-r--r--sys-fs/owfs/files/owhttpd.confd2
-rwxr-xr-xsys-fs/owfs/files/owhttpd.initd32
-rw-r--r--sys-fs/owfs/files/owserver.confd2
-rwxr-xr-xsys-fs/owfs/files/owserver.initd32
-rw-r--r--sys-fs/owfs/metadata.xml24
-rw-r--r--sys-fs/owfs/owfs-2.7_p21-r4.ebuild168
-rw-r--r--sys-fs/progsreiserfs/Manifest1
-rw-r--r--sys-fs/progsreiserfs/files/progsreiserfs-0.3.1_rc8-autotools.patch13
-rw-r--r--sys-fs/progsreiserfs/metadata.xml9
-rw-r--r--sys-fs/progsreiserfs/progsreiserfs-0.3.1_rc8.ebuild60
-rw-r--r--sys-fs/pysize/Manifest1
-rw-r--r--sys-fs/pysize/files/0.2-setuptools-automagic.patch12
-rw-r--r--sys-fs/pysize/files/psyco-0.2-automagic.patch20
-rw-r--r--sys-fs/pysize/metadata.xml7
-rw-r--r--sys-fs/pysize/pysize-0.2-r1.ebuild71
-rw-r--r--sys-fs/pytagsfs/Manifest2
-rw-r--r--sys-fs/pytagsfs/metadata.xml11
-rw-r--r--sys-fs/pytagsfs/pytagsfs-0.9.2.ebuild41
-rw-r--r--sys-fs/pytagsfs/pytagsfs-0.9.2_rc2.ebuild41
-rw-r--r--sys-fs/quota/Manifest3
-rw-r--r--sys-fs/quota/files/quota-4.01-cflags.patch58
-rw-r--r--sys-fs/quota/files/quota-4.01-mnt.patch13
-rw-r--r--sys-fs/quota/files/quota-no-quotactl-manpage.patch19
-rw-r--r--sys-fs/quota/files/quota.confd20
-rw-r--r--sys-fs/quota/files/quota.rc738
-rw-r--r--sys-fs/quota/files/rpc.rquotad.initd26
-rw-r--r--sys-fs/quota/metadata.xml12
-rw-r--r--sys-fs/quota/quota-3.17-r1.ebuild80
-rw-r--r--sys-fs/quota/quota-4.01.ebuild80
-rw-r--r--sys-fs/quota/quota-4.02.ebuild78
-rw-r--r--sys-fs/quotatool/Manifest8
-rw-r--r--sys-fs/quotatool/files/quotatool-1.4.11-ldflags.patch27
-rw-r--r--sys-fs/quotatool/files/quotatool-1.4.13-ldflags.patch23
-rw-r--r--sys-fs/quotatool/metadata.xml5
-rw-r--r--sys-fs/quotatool/quotatool-1.4.11.ebuild33
-rw-r--r--sys-fs/quotatool/quotatool-1.4.12.ebuild32
-rw-r--r--sys-fs/quotatool/quotatool-1.4.13.ebuild27
-rw-r--r--sys-fs/quotatool/quotatool-1.4.6.ebuild20
-rw-r--r--sys-fs/quotatool/quotatool-1.5.0.ebuild27
-rw-r--r--sys-fs/quotatool/quotatool-1.6.0.ebuild27
-rw-r--r--sys-fs/quotatool/quotatool-1.6.1.ebuild27
-rw-r--r--sys-fs/quotatool/quotatool-1.6.2.ebuild27
-rw-r--r--sys-fs/rar2fs/Manifest1
-rw-r--r--sys-fs/rar2fs/metadata.xml16
-rw-r--r--sys-fs/rar2fs/rar2fs-1.20.0.ebuild28
-rw-r--r--sys-fs/rarfs/Manifest1
-rw-r--r--sys-fs/rarfs/metadata.xml11
-rw-r--r--sys-fs/rarfs/rarfs-0.1.1.ebuild38
-rw-r--r--sys-fs/redirfs/Manifest2
-rw-r--r--sys-fs/redirfs/metadata.xml22
-rw-r--r--sys-fs/redirfs/redirfs-0.10.20120313.ebuild35
-rw-r--r--sys-fs/redirfs/redirfs-0.8.ebuild31
-rw-r--r--sys-fs/redirfs/redirfs-9999.ebuild41
-rw-r--r--sys-fs/reiser4progs/Manifest3
-rw-r--r--sys-fs/reiser4progs/files/reiser4progs-1.0.7-gcc-4.4.patch15
-rw-r--r--sys-fs/reiser4progs/files/reiser4progs-1.0.7-readline-6.3.patch16
-rw-r--r--sys-fs/reiser4progs/metadata.xml11
-rw-r--r--sys-fs/reiser4progs/reiser4progs-1.0.7.ebuild55
-rw-r--r--sys-fs/reiser4progs/reiser4progs-1.0.8.ebuild49
-rw-r--r--sys-fs/reiser4progs/reiser4progs-1.0.9.ebuild49
-rw-r--r--sys-fs/reiserfs-defrag/Manifest2
-rw-r--r--sys-fs/reiserfs-defrag/metadata.xml16
-rw-r--r--sys-fs/reiserfs-defrag/reiserfs-defrag-0.2.1.ebuild29
-rw-r--r--sys-fs/reiserfs-defrag/reiserfs-defrag-0.2.2.ebuild25
-rw-r--r--sys-fs/reiserfsprogs/Manifest3
-rw-r--r--sys-fs/reiserfsprogs/files/reiserfsprogs-3.6.19-fsck-n.patch12
-rw-r--r--sys-fs/reiserfsprogs/files/reiserfsprogs-3.6.19-unaligned.patch35
-rw-r--r--sys-fs/reiserfsprogs/files/reiserfsprogs-3.6.20-fsck-n.patch12
-rw-r--r--sys-fs/reiserfsprogs/files/reiserfsprogs-3.6.21-fix_large_fs.patch356
-rw-r--r--sys-fs/reiserfsprogs/files/reiserfsprogs-3.6.21-fsck-n.patch14
-rw-r--r--sys-fs/reiserfsprogs/metadata.xml5
-rw-r--r--sys-fs/reiserfsprogs/reiserfsprogs-3.6.21-r1.ebuild32
-rw-r--r--sys-fs/reiserfsprogs/reiserfsprogs-3.6.23.ebuild22
-rw-r--r--sys-fs/reiserfsprogs/reiserfsprogs-3.6.24.ebuild22
-rw-r--r--sys-fs/s3backer/Manifest1
-rw-r--r--sys-fs/s3backer/metadata.xml10
-rw-r--r--sys-fs/s3backer/s3backer-1.3.7.ebuild34
-rw-r--r--sys-fs/s3fs/Manifest2
-rw-r--r--sys-fs/s3fs/metadata.xml12
-rw-r--r--sys-fs/s3fs/s3fs-1.74.ebuild26
-rw-r--r--sys-fs/s3fs/s3fs-1.78.ebuild35
-rw-r--r--sys-fs/s3ql/Manifest4
-rw-r--r--sys-fs/s3ql/metadata.xml15
-rw-r--r--sys-fs/s3ql/s3ql-1.19.ebuild61
-rw-r--r--sys-fs/s3ql/s3ql-2.11.1.ebuild55
-rw-r--r--sys-fs/s3ql/s3ql-2.11.ebuild55
-rw-r--r--sys-fs/s3ql/s3ql-2.12.ebuild55
-rw-r--r--sys-fs/safecopy/Manifest1
-rw-r--r--sys-fs/safecopy/metadata.xml12
-rw-r--r--sys-fs/safecopy/safecopy-1.7.ebuild48
-rw-r--r--sys-fs/scan-ffs/Manifest1
-rw-r--r--sys-fs/scan-ffs/metadata.xml19
-rw-r--r--sys-fs/scan-ffs/scan-ffs-1.2.ebuild26
-rw-r--r--sys-fs/shake/Manifest1
-rw-r--r--sys-fs/shake/files/shake-0.999-fix_stat_include.patch22
-rw-r--r--sys-fs/shake/files/shake-0.999-uclibc.patch49
-rw-r--r--sys-fs/shake/metadata.xml9
-rw-r--r--sys-fs/shake/shake-0.999.ebuild26
-rw-r--r--sys-fs/siefs/Manifest1
-rw-r--r--sys-fs/siefs/files/siefs-0.5-external-vmoconv.patch12
-rw-r--r--sys-fs/siefs/files/siefs-0.5-qa-fixes.patch55
-rw-r--r--sys-fs/siefs/metadata.xml5
-rw-r--r--sys-fs/siefs/siefs-0.5-r1.ebuild32
-rw-r--r--sys-fs/siefs/siefs-0.5-r2.ebuild33
-rw-r--r--sys-fs/simple-mtpfs/Manifest2
-rw-r--r--sys-fs/simple-mtpfs/metadata.xml20
-rw-r--r--sys-fs/simple-mtpfs/simple-mtpfs-0.1.ebuild26
-rw-r--r--sys-fs/simple-mtpfs/simple-mtpfs-0.2.ebuild31
-rw-r--r--sys-fs/simple-mtpfs/simple-mtpfs-9999.ebuild31
-rw-r--r--sys-fs/snapraid/Manifest5
-rw-r--r--sys-fs/snapraid/metadata.xml11
-rw-r--r--sys-fs/snapraid/snapraid-6.2.ebuild21
-rw-r--r--sys-fs/snapraid/snapraid-6.3.ebuild21
-rw-r--r--sys-fs/snapraid/snapraid-7.0.ebuild23
-rw-r--r--sys-fs/snapraid/snapraid-7.1.ebuild18
-rw-r--r--sys-fs/snapraid/snapraid-8.1.ebuild18
-rw-r--r--sys-fs/squashfs-tools/Manifest3
-rw-r--r--sys-fs/squashfs-tools/metadata.xml12
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild40
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-3.4.ebuild40
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.3.ebuild50
-rw-r--r--sys-fs/squashfuse/Manifest1
-rw-r--r--sys-fs/squashfuse/metadata.xml14
-rw-r--r--sys-fs/squashfuse/squashfuse-0.1_p20130530.ebuild45
-rw-r--r--sys-fs/sshfs-fuse/Manifest2
-rw-r--r--sys-fs/sshfs-fuse/metadata.xml8
-rw-r--r--sys-fs/sshfs-fuse/sshfs-fuse-2.4.ebuild28
-rw-r--r--sys-fs/sshfs-fuse/sshfs-fuse-2.5.ebuild28
-rw-r--r--sys-fs/static-dev/metadata.xml5
-rw-r--r--sys-fs/static-dev/static-dev-0.1.ebuild35
-rw-r--r--sys-fs/sysfsutils/Manifest1
-rw-r--r--sys-fs/sysfsutils/metadata.xml12
-rw-r--r--sys-fs/sysfsutils/sysfsutils-2.1.0.ebuild39
-rw-r--r--sys-fs/traydevice/Manifest3
-rw-r--r--sys-fs/traydevice/metadata.xml5
-rw-r--r--sys-fs/traydevice/traydevice-1.5.2.ebuild45
-rw-r--r--sys-fs/traydevice/traydevice-1.5.ebuild46
-rw-r--r--sys-fs/traydevice/traydevice-1.6.2-r1.ebuild38
-rw-r--r--sys-fs/traydevice/traydevice-1.6.2.ebuild38
-rw-r--r--sys-fs/treesize/Manifest1
-rw-r--r--sys-fs/treesize/files/0.54.1-amd64.patch10
-rw-r--r--sys-fs/treesize/metadata.xml13
-rw-r--r--sys-fs/treesize/treesize-0.54.1.ebuild31
-rw-r--r--sys-fs/udev-init-scripts/Manifest3
-rw-r--r--sys-fs/udev-init-scripts/metadata.xml7
-rw-r--r--sys-fs/udev-init-scripts/udev-init-scripts-27.ebuild65
-rw-r--r--sys-fs/udev-init-scripts/udev-init-scripts-29.ebuild51
-rw-r--r--sys-fs/udev-init-scripts/udev-init-scripts-30.ebuild51
-rw-r--r--sys-fs/udev-init-scripts/udev-init-scripts-9999.ebuild51
-rw-r--r--sys-fs/udev/Manifest15
-rw-r--r--sys-fs/udev/metadata.xml16
-rw-r--r--sys-fs/udev/udev-208-r1.ebuild522
-rw-r--r--sys-fs/udev/udev-216.ebuild490
-rw-r--r--sys-fs/udev/udev-217.ebuild497
-rw-r--r--sys-fs/udev/udev-218.ebuild504
-rw-r--r--sys-fs/udev/udev-219.ebuild504
-rw-r--r--sys-fs/udev/udev-220-r1.ebuild507
-rw-r--r--sys-fs/udev/udev-220-r2.ebuild507
-rw-r--r--sys-fs/udev/udev-220-r3.ebuild507
-rw-r--r--sys-fs/udev/udev-222.ebuild435
-rw-r--r--sys-fs/udev/udev-224.ebuild433
-rw-r--r--sys-fs/udev/udev-9999.ebuild433
-rw-r--r--sys-fs/udftools/Manifest2
-rw-r--r--sys-fs/udftools/files/cdrwtool-linux2.6-fix-v2.patch22
-rw-r--r--sys-fs/udftools/files/pktcdvd.init62
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b-bigendian.patch28
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b-gcc4.patch15
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b-limits_h.patch23
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b-openflags.patch15
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-extsize.patch44
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-man-missing-options.patch57
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-mkudffs-bigendian.patch115
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-staticanal.patch164
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-warningfixes.patch94
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-warningfixes2.patch160
-rw-r--r--sys-fs/udftools/files/udftools-1.0.0b3-wrudf_help.patch52
-rw-r--r--sys-fs/udftools/metadata.xml8
-rw-r--r--sys-fs/udftools/udftools-1.0.0b-r10.ebuild49
-rw-r--r--sys-fs/udftools/udftools-1.0.0b-r9.ebuild43
-rw-r--r--sys-fs/udiskie/Manifest3
-rw-r--r--sys-fs/udiskie/metadata.xml9
-rw-r--r--sys-fs/udiskie/udiskie-0.6.2.ebuild57
-rw-r--r--sys-fs/udiskie/udiskie-0.6.4.ebuild57
-rw-r--r--sys-fs/udiskie/udiskie-1.1.1.ebuild55
-rw-r--r--sys-fs/udisks-glue/Manifest1
-rw-r--r--sys-fs/udisks-glue/metadata.xml10
-rw-r--r--sys-fs/udisks-glue/udisks-glue-1.3.5.ebuild34
-rw-r--r--sys-fs/udisks/Manifest3
-rw-r--r--sys-fs/udisks/files/udisks-1.0.2-ntfs-3g.patch12
-rw-r--r--sys-fs/udisks/files/udisks-1.0.4-revert-floppy.patch18
-rw-r--r--sys-fs/udisks/files/udisks-1.0.5-stat-includes.patch25
-rw-r--r--sys-fs/udisks/metadata.xml15
-rw-r--r--sys-fs/udisks/udisks-1.0.5-r1.ebuild105
-rw-r--r--sys-fs/udisks/udisks-2.1.4.ebuild102
-rw-r--r--sys-fs/udisks/udisks-2.1.6.ebuild105
-rw-r--r--sys-fs/ufsutils/Manifest2
-rw-r--r--sys-fs/ufsutils/metadata.xml5
-rw-r--r--sys-fs/ufsutils/ufsutils-8.2_p3.ebuild47
-rw-r--r--sys-fs/unionfs-fuse/Manifest4
-rw-r--r--sys-fs/unionfs-fuse/files/unionfs-fuse-0.23-makefile.patch15
-rw-r--r--sys-fs/unionfs-fuse/files/unionfs-fuse-0.26-declare-chroot.patch12
-rw-r--r--sys-fs/unionfs-fuse/files/unionfs-fuse-0.26-link-pthread.patch11
-rw-r--r--sys-fs/unionfs-fuse/metadata.xml11
-rw-r--r--sys-fs/unionfs-fuse/unionfs-fuse-0.24.ebuild23
-rw-r--r--sys-fs/unionfs-fuse/unionfs-fuse-0.25.ebuild23
-rw-r--r--sys-fs/unionfs-fuse/unionfs-fuse-0.26.ebuild30
-rw-r--r--sys-fs/unionfs-fuse/unionfs-fuse-1.0.ebuild22
-rw-r--r--sys-fs/unionfs-fuse/unionfs-fuse-9999.ebuild24
-rw-r--r--sys-fs/vhba/Manifest2
-rw-r--r--sys-fs/vhba/metadata.xml11
-rw-r--r--sys-fs/vhba/vhba-20130607.ebuild85
-rw-r--r--sys-fs/vhba/vhba-20140928.ebuild85
-rw-r--r--sys-fs/vzquota/Manifest1
-rw-r--r--sys-fs/vzquota/metadata.xml8
-rw-r--r--sys-fs/vzquota/vzquota-3.1.ebuild31
-rw-r--r--sys-fs/wpflash/Manifest1
-rw-r--r--sys-fs/wpflash/files/wpflash-gentoo.patch223
-rw-r--r--sys-fs/wpflash/metadata.xml5
-rw-r--r--sys-fs/wpflash/wpflash-0.ebuild31
-rw-r--r--sys-fs/xfsdump/Manifest4
-rw-r--r--sys-fs/xfsdump/files/xfsdump-3.0.4-no-symlink.patch22
-rw-r--r--sys-fs/xfsdump/files/xfsdump-3.0.5-prompt-overflow.patch14
-rw-r--r--sys-fs/xfsdump/files/xfsdump-3.0.6-path-overflow.patch31
-rw-r--r--sys-fs/xfsdump/metadata.xml5
-rw-r--r--sys-fs/xfsdump/xfsdump-3.0.6.ebuild50
-rw-r--r--sys-fs/xfsdump/xfsdump-3.1.2.ebuild44
-rw-r--r--sys-fs/xfsdump/xfsdump-3.1.3.ebuild44
-rw-r--r--sys-fs/xfsdump/xfsdump-3.1.4.ebuild44
-rw-r--r--sys-fs/xfsprogs/Manifest5
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.1.10-sharedlibs.patch120
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.1.11-sharedlibs.patch106
-rw-r--r--sys-fs/xfsprogs/files/xfsprogs-3.2.2-sharedlibs.patch108
-rw-r--r--sys-fs/xfsprogs/metadata.xml5
-rw-r--r--sys-fs/xfsprogs/xfsprogs-3.1.10.ebuild96
-rw-r--r--sys-fs/xfsprogs/xfsprogs-3.1.11-r1.ebuild96
-rw-r--r--sys-fs/xfsprogs/xfsprogs-3.2.2.ebuild98
-rw-r--r--sys-fs/xfsprogs/xfsprogs-3.2.3.ebuild98
-rw-r--r--sys-fs/xfsprogs/xfsprogs-3.2.4.ebuild98
-rw-r--r--sys-fs/yaffs-utils/files/yaffs-utils-9999-build.patch36
-rw-r--r--sys-fs/yaffs-utils/metadata.xml5
-rw-r--r--sys-fs/yaffs-utils/yaffs-utils-9999.ebuild30
-rw-r--r--sys-fs/yaffs2-utils/files/yaffs2-utils-9999-build.patch46
-rw-r--r--sys-fs/yaffs2-utils/metadata.xml5
-rw-r--r--sys-fs/yaffs2-utils/yaffs2-utils-9999.ebuild30
-rw-r--r--sys-fs/yaffs2utils/Manifest1
-rw-r--r--sys-fs/yaffs2utils/files/yaffs2utils-0.2.9-build.patch47
-rw-r--r--sys-fs/yaffs2utils/files/yaffs2utils-0.2.9-unyaffs2-pointer.patch13
-rw-r--r--sys-fs/yaffs2utils/metadata.xml5
-rw-r--r--sys-fs/yaffs2utils/yaffs2utils-0.2.9.ebuild32
-rw-r--r--sys-fs/zerofree/Manifest2
-rw-r--r--sys-fs/zerofree/metadata.xml12
-rw-r--r--sys-fs/zerofree/zerofree-1.0.1.ebuild38
-rw-r--r--sys-fs/zerofree/zerofree-1.0.3.ebuild38
-rw-r--r--sys-fs/zfs-kmod/Manifest11
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc13-fix-invisible-snapshots.patch39
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc13-fix-recursive-reader.patch40
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc13-gcc-4.7-compat.patch51
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-cast-const-for-32bit-compatibility.patch36
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-flush-properly.patch42
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-improved-autotools-checks.patch105
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-improved-hardened-support.patch473
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-linux-3.9-compat.patch32
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-vfs-name-length-compatibility.patch36
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc14-zfs_arc_memory_throttle_disable.patch41
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc9-remove-pfmalloc-1-of-3.patch44
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc9-remove-pfmalloc-2-of-3.patch56
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.0_rc9-remove-pfmalloc-3-of-3.patch70
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-arc-read-panic.patch42
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-getdents.patch32
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-txg_quiesce-deadlock.patch73
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-xattr-behavior-1.patch50
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-xattr-behavior-2.patch37
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-zfs_sb_teardown-NULL-pointer-deref.patch58
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-zfsctl_expire_snapshot-deadlock.patch73
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-fix-zvol-initialization-r1.patch167
-rw-r--r--sys-fs/zfs-kmod/files/zfs-kmod-0.6.1-linux-3.10-compat.patch108
-rw-r--r--sys-fs/zfs-kmod/metadata.xml14
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.0_rc13-r4.ebuild124
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.0_rc14-r5.ebuild137
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.1-r2.ebuild152
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.2-r3.ebuild129
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.2-r4.ebuild129
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.2-r5.ebuild129
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.3-r1.ebuild145
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.3.ebuild138
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.4.2.ebuild142
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-0.6.4.ebuild142
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild137
-rw-r--r--sys-fs/zfs/Manifest13
-rw-r--r--sys-fs/zfs/files/bash-completion232
-rw-r--r--sys-fs/zfs/files/bash-completion-r1391
-rwxr-xr-xsys-fs/zfs/files/zed26
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc14-fix-libzpool-function-relocations.patch34
-rw-r--r--sys-fs/zfs/files/zfs-0.6.1-avoid-zdb-abort.patch30
-rw-r--r--sys-fs/zfs/files/zfs-0.6.1-fix-gcc-4.8-warning.patch42
-rw-r--r--sys-fs/zfs/files/zfs-0.6.1-fix-zvol-initialization-r1.patch167
-rw-r--r--sys-fs/zfs/files/zfs-0.6.1-gentoo-openrc-dependencies.patch57
-rw-r--r--sys-fs/zfs/files/zfs-init.sh.in29
-rw-r--r--sys-fs/zfs/files/zfs.service.in16
-rw-r--r--sys-fs/zfs/metadata.xml16
-rw-r--r--sys-fs/zfs/zfs-0.6.0_rc13-r2.ebuild123
-rw-r--r--sys-fs/zfs/zfs-0.6.0_rc14-r1.ebuild129
-rw-r--r--sys-fs/zfs/zfs-0.6.1-r4.ebuild154
-rw-r--r--sys-fs/zfs/zfs-0.6.2-r1.ebuild152
-rw-r--r--sys-fs/zfs/zfs-0.6.2-r2.ebuild152
-rw-r--r--sys-fs/zfs/zfs-0.6.2-r3.ebuild152
-rw-r--r--sys-fs/zfs/zfs-0.6.2-r4.ebuild153
-rw-r--r--sys-fs/zfs/zfs-0.6.2-r5.ebuild153
-rw-r--r--sys-fs/zfs/zfs-0.6.2.ebuild142
-rw-r--r--sys-fs/zfs/zfs-0.6.3-r2.ebuild150
-rw-r--r--sys-fs/zfs/zfs-0.6.3.ebuild142
-rw-r--r--sys-fs/zfs/zfs-0.6.4.2.ebuild142
-rw-r--r--sys-fs/zfs/zfs-0.6.4.ebuild143
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild151
901 files changed, 48640 insertions, 0 deletions
diff --git a/sys-fs/archivemount/Manifest b/sys-fs/archivemount/Manifest
new file mode 100644
index 000000000000..89b3cd0985bf
--- /dev/null
+++ b/sys-fs/archivemount/Manifest
@@ -0,0 +1,3 @@
+DIST archivemount-0.8.3.tar.gz 127412 SHA256 e78899a8b7c9cb43fa4526d08c54a9e171475c00bf095770b8779a33e37661ff SHA512 f0d50cdce44a0ee57f0d3a32cb37af4159a7400e47a8c61360c9c0c1be6fdbe98d2aa1cc530b3a71fe70e4f550ea5ed431204d738931dca757135677e1984733 WHIRLPOOL c7466b672f6599de83602d81b423bd3b1b687c02efb6f042f64214f7ac54e3eae11418fbb51347a2ff34bb73dc9406b5bef3b2dd655e13030133dd98e2f28ac9
+DIST archivemount-0.8.4.tar.gz 127751 SHA256 e8dae319a03993d8fb342e85603371c0b0a40752bc22368aceac46c113c3b0ea SHA512 bea9461991cfef129a156f682cb83d58c56b5efe64de21a4fff5858c9e3d3aede5b9b265ee1ae7eb7115290e326c4090c364a3b8de8f3399263ffe54142fd619 WHIRLPOOL 3becd3e22dbca527e72712fb168b9470e0cfdebbc6ee1465b97078394c310dfc614e467a226832067945cf0e176f610bf27405485e9dd7712f90748fd31df718
+DIST archivemount-0.8.5.tar.gz 128998 SHA256 3c919fc46077a0f458cb52454d72c34f1cefda4e2a4e6c987a5156458f144f79 SHA512 ad0feec23b5fa41481520081d6615a8001168daff88bd7314c4127072b946434ade4e4e7505ea325a594d1cfc2d9438ddf72de2a2a0fe39ec5d1abf050c84b3a WHIRLPOOL c2df59d645d5db8786eca3520cd24ca6d5c0f2b317dbd6ad21432e65a76b91a2c234920d45674f18fe3b3b29566f3f6023d5f2ee7005a55459b9c06ebd3911e6
diff --git a/sys-fs/archivemount/archivemount-0.8.3.ebuild b/sys-fs/archivemount/archivemount-0.8.3.ebuild
new file mode 100644
index 000000000000..680ad07c8ae6
--- /dev/null
+++ b/sys-fs/archivemount/archivemount-0.8.3.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Mount archives using libarchive and FUSE"
+HOMEPAGE="http://www.cybernoia.de/software/archivemount/"
+SRC_URI="http://www.cybernoia.de/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="app-arch/libarchive:=
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
diff --git a/sys-fs/archivemount/archivemount-0.8.4.ebuild b/sys-fs/archivemount/archivemount-0.8.4.ebuild
new file mode 100644
index 000000000000..bd0001bdfa3d
--- /dev/null
+++ b/sys-fs/archivemount/archivemount-0.8.4.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Mount archives using libarchive and FUSE"
+HOMEPAGE="http://www.cybernoia.de/software/archivemount/"
+SRC_URI="http://www.cybernoia.de/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="app-arch/libarchive:=
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
diff --git a/sys-fs/archivemount/archivemount-0.8.5.ebuild b/sys-fs/archivemount/archivemount-0.8.5.ebuild
new file mode 100644
index 000000000000..bd0001bdfa3d
--- /dev/null
+++ b/sys-fs/archivemount/archivemount-0.8.5.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Mount archives using libarchive and FUSE"
+HOMEPAGE="http://www.cybernoia.de/software/archivemount/"
+SRC_URI="http://www.cybernoia.de/software/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="app-arch/libarchive:=
+ sys-fs/fuse"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
diff --git a/sys-fs/archivemount/metadata.xml b/sys-fs/archivemount/metadata.xml
new file mode 100644
index 000000000000..157326a7e891
--- /dev/null
+++ b/sys-fs/archivemount/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/arm-fdisk/Manifest b/sys-fs/arm-fdisk/Manifest
new file mode 100644
index 000000000000..673f366c9ce4
--- /dev/null
+++ b/sys-fs/arm-fdisk/Manifest
@@ -0,0 +1,3 @@
+DIST acorn-fdisk_3.0.6-6.2.diff.gz 5580 SHA256 d84e6a8c05114b044cace9d7705d319cbe38c3878eaf0918b1965453d88254ad SHA512 076587945548f10fef92a93910aee670927a2de9b1b32fd1b4ab72b1cfc26440177745f09b62f9b903987e3802060f4e278e1647ee12b7e2f29a0fd7b36ff188 WHIRLPOOL 6424710566c0c76e6aebcc32f5a9f4251402fc198aa22cad236caa10bf111b3a2a4377b940e6f98035a7193ca7e4b6045ba558557ad2b5b02422c09cb68ffc60
+DIST acorn-fdisk_3.0.6-6.diff.gz 5457 SHA256 ded7560b48ca758bca36fad7d015ad5766cf7f6f84fd89be13ac443138884fec
+DIST arm-fdisk-3.0.6.tar.gz 62266 SHA256 d6254982717be92aaffa1b6a2690d4e8b258285f7596beb196a9d24ceacf3a05 SHA512 954c1112c8108da676a0c4223de3a7b0320a37286b0ed099f3000bf4777ebb483b0b62eb0a5dd480f775c503020e7d9ed6ef737ef7bbc5bce858ae68aa471a3f WHIRLPOOL 3f26a40aa9823bdd87c163cc09d13e99679379238b233f32fe04b8235c4f42ce5d105d05a7a68561900c41b4990d177e69e0e694c5a8598a8e1d19e3745e78d9
diff --git a/sys-fs/arm-fdisk/arm-fdisk-3.0.6-r1.ebuild b/sys-fs/arm-fdisk/arm-fdisk-3.0.6-r1.ebuild
new file mode 100644
index 000000000000..d76ae0587f31
--- /dev/null
+++ b/sys-fs/arm-fdisk/arm-fdisk-3.0.6-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DEB_VER=6.2
+DESCRIPTION="edit disk partitions on Acorn machines"
+HOMEPAGE="http://www.arm.linux.org.uk/"
+SRC_URI="ftp://ftp.arm.linux.org.uk/pub/armlinux/source/other/${P}.tar.gz
+ mirror://debian/pool/main/a/acorn-fdisk/acorn-fdisk_${PV}-${DEB_VER}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc s390 sh sparc x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/acorn-fdisk_${PV}-${DEB_VER}.diff
+
+ find "${S}" -name Makefile -print0 | xargs -0 \
+ sed -i \
+ -e "s:-O2 -Wall\( -g\)\?::" \
+ -e "/^CFLAGS/s:=:+=:" \
+ -e "/^LDFLAGS/s:=:+=:" \
+ -e '/^STRIP/s:strip:true:'
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" || die
+}
+
+src_install() {
+ into /
+ newsbin fdisk ${PN} || die "sbin failed"
+ dosym ${PN} /sbin/acorn-fdisk
+ dodoc ChangeLog README debian/changelog
+}
diff --git a/sys-fs/arm-fdisk/arm-fdisk-3.0.6.ebuild b/sys-fs/arm-fdisk/arm-fdisk-3.0.6.ebuild
new file mode 100644
index 000000000000..4b245ff19584
--- /dev/null
+++ b/sys-fs/arm-fdisk/arm-fdisk-3.0.6.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DEB_VER=6
+DESCRIPTION="edit disk partitions on Acorn machines"
+HOMEPAGE="http://www.arm.linux.org.uk/"
+SRC_URI="ftp://ftp.arm.linux.org.uk/pub/armlinux/source/other/${P}.tar.gz
+ mirror://debian/pool/main/a/acorn-fdisk/acorn-fdisk_${PV}-${DEB_VER}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc s390 sh sparc x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/acorn-fdisk_${PV}-${DEB_VER}.diff
+
+ find "${S}" -name Makefile -print0 | xargs -0 \
+ sed -i \
+ -e "s:-O2 -Wall\( -g\)\?::" \
+ -e "/^CFLAGS/s:=:+=:" \
+ -e '/^STRIP/s:strip:true:'
+}
+
+src_install() {
+ into /
+ newsbin fdisk ${PN} || die "sbin failed"
+ dosym ${PN} /sbin/acorn-fdisk
+ dodoc ChangeLog README debian/changelog
+}
diff --git a/sys-fs/arm-fdisk/metadata.xml b/sys-fs/arm-fdisk/metadata.xml
new file mode 100644
index 000000000000..5454528f2093
--- /dev/null
+++ b/sys-fs/arm-fdisk/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>arm</herd>
+</pkgmetadata>
diff --git a/sys-fs/atari-fdisk/Manifest b/sys-fs/atari-fdisk/Manifest
new file mode 100644
index 000000000000..b699f5a08743
--- /dev/null
+++ b/sys-fs/atari-fdisk/Manifest
@@ -0,0 +1,2 @@
+DIST atari-fdisk_0.7.1-5.1.tar.gz 67705 SHA256 91eeb9db76b3f99ce48128281a00494a0a2ca43d5ef6bd3690adcf22bb5fcb95 SHA512 80e5e4ed1a1dd3d7fbfed68e33e43864d593f084921c699beca100ddbd5e8adb2da36badd6fc467417d3e80855b484f87576c78700ccfa763c5c7644370275f9 WHIRLPOOL 3b4d66163598d7896beb011d5c86ae481664fbbdd7f243bb2943531d7164924a867e242cf89fd4d664e5feb942c4c272623f3fb0be58685ae533d100be9aa02d
+DIST atari-fdisk_0.7.1-5.4.tar.gz 47576 SHA256 81ddb3a0d0088fb32011cede6deacb98a2b97da24fc8b2efe87dc45da601b96f
diff --git a/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.1.ebuild b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.1.ebuild
new file mode 100644
index 000000000000..52a41622c226
--- /dev/null
+++ b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator toolchain-funcs
+
+MY_PV=$(get_version_component_range 1-3)
+DEB_PV=$(get_version_component_range 4-5)
+DESCRIPTION="create and edit the partition table of a disk partitioned in Atari format"
+HOMEPAGE="http://packages.qa.debian.org/a/atari-fdisk.html"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}-${DEB_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha ~amd64 arm ~hppa ia64 m68k ~mips ~ppc s390 sh ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COMPILE_ARCH=m68k \
+ || die
+}
+
+src_install() {
+ dodoc NEWS README TODO debian/changelog
+ doman debian/atari-fdisk.8
+
+ into /
+ if [[ $(tc-arch) == "m68k" ]] ; then
+ dosbin fdisk || die "sbin fdisk failed"
+ dosym fdisk /sbin/atari-fdisk
+ dosym atari-fdisk.8 /usr/share/man/man8/fdisk.8
+ else
+ dosbin atari-fdisk || die "sbin atari-fdisk failed"
+ fi
+}
diff --git a/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild
new file mode 100644
index 000000000000..84b470043b97
--- /dev/null
+++ b/sys-fs/atari-fdisk/atari-fdisk-0.7.1.5.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit versionator toolchain-funcs
+
+MY_PV=$(get_version_component_range 1-3)
+DEB_PV=$(get_version_component_range 4-5)
+DESCRIPTION="create and edit the partition table of a disk partitioned in Atari format"
+HOMEPAGE="http://packages.qa.debian.org/a/atari-fdisk.html"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${MY_PV}-${DEB_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 m68k ~mips ~ppc ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_compile() {
+ emake \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ COMPILE_ARCH=m68k \
+ || die
+}
+
+src_install() {
+ dodoc NEWS README TODO debian/changelog
+ doman debian/atari-fdisk.8
+
+ into /
+ if [[ $(tc-arch) == "m68k" ]] ; then
+ dosbin fdisk || die "sbin fdisk failed"
+ dosym fdisk /sbin/atari-fdisk
+ dosym atari-fdisk.8 /usr/share/man/man8/fdisk.8
+ else
+ dosbin atari-fdisk || die "sbin atari-fdisk failed"
+ fi
+}
diff --git a/sys-fs/atari-fdisk/metadata.xml b/sys-fs/atari-fdisk/metadata.xml
new file mode 100644
index 000000000000..0ba9416963a3
--- /dev/null
+++ b/sys-fs/atari-fdisk/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>m68k@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-fs/aufs-headers/Manifest b/sys-fs/aufs-headers/Manifest
new file mode 100644
index 000000000000..7342d48c4ffa
--- /dev/null
+++ b/sys-fs/aufs-headers/Manifest
@@ -0,0 +1,3 @@
+DIST aufs-headers-3.19_p20150323.tar.xz 3136 SHA256 84f70923b23268abe3cf8ccb547f30a40d9d4a8f422ce6f070fb3eb78233ec55 SHA512 a137003b8b09ac3b929914dba27a13a9c2d803733ab7e073388b2a34f329f0b1ffcbe9646787738565ef28d3be77ca4a9bc520d759db4ca799cb2aa3643ee06f WHIRLPOOL 74f36e80805fd17861cd66c9b17f76371b8a726d3422c1ef6dbb8e7cd5ebb350b795bc9026898a472f4091e3745e1683dc18e2bd88fd8492eaaef49dde53968b
+DIST aufs-headers-3.19_p20150420.tar.xz 3140 SHA256 b9b05adbc65d489e41d8290e25ed701350b15eb6033be48a80010661050553de SHA512 257acbdd2439d7250e1903dbd7098d5a71749110caec6f6eecbc2e93b07859b5a751138a8000204ab735e3082ad15fdf249b132a7bac0ad6fbb0994213ab601d WHIRLPOOL 67545b7b7481f48313b4b45bfa027edf86ed5e11c11f01cbfdbdcd38378f5f00709f29ca270fd3341c5745825366105462778f4d309f0f3f9b82265a009be58e
+DIST aufs-headers-4.0_p20150420.tar.xz 3140 SHA256 977e9ca19213faaeae58b2e28b458ee7369c361846f89ec86a043571bab35366 SHA512 fe1d42c66721cf78125070f29fc40dc3f88d84f8a59a35333a427f1d6e0353207ad595a8bd3e12591fcb73a54b76db122d2f2519c7db4dee0557f38dfdc0fe03 WHIRLPOOL 2a92b6dd45a6b52f69e634fffcfbf105fb01f3ad56ee68015c01ed499b0f4fe38e1793b19e05d38f509b2ac1d8f8ce1c1b7183ff746c448697c8270be4be1ee7
diff --git a/sys-fs/aufs-headers/aufs-headers-3.19_p20150323.ebuild b/sys-fs/aufs-headers/aufs-headers-3.19_p20150323.ebuild
new file mode 100644
index 000000000000..c2b1a29aac22
--- /dev/null
+++ b/sys-fs/aufs-headers/aufs-headers-3.19_p20150323.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator
+
+DESCRIPTION="User space headers for aufs3"
+HOMEPAGE="http://aufs.sourceforge.net/"
+# Clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-linux.git
+# Check aufs release Branch
+# Create .config
+# make headers_install INSTALL_HDR_PATH=${T}
+# find ${T} -type f \( ! -name "*aufs*" \) -delete
+# find ${T} -type d -empty -delete
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}"
+
+src_install() {
+ doheader -r include/*
+}
diff --git a/sys-fs/aufs-headers/aufs-headers-3.19_p20150420.ebuild b/sys-fs/aufs-headers/aufs-headers-3.19_p20150420.ebuild
new file mode 100644
index 000000000000..c2b1a29aac22
--- /dev/null
+++ b/sys-fs/aufs-headers/aufs-headers-3.19_p20150420.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator
+
+DESCRIPTION="User space headers for aufs3"
+HOMEPAGE="http://aufs.sourceforge.net/"
+# Clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-linux.git
+# Check aufs release Branch
+# Create .config
+# make headers_install INSTALL_HDR_PATH=${T}
+# find ${T} -type f \( ! -name "*aufs*" \) -delete
+# find ${T} -type d -empty -delete
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}"
+
+src_install() {
+ doheader -r include/*
+}
diff --git a/sys-fs/aufs-headers/aufs-headers-4.0_p20150420.ebuild b/sys-fs/aufs-headers/aufs-headers-4.0_p20150420.ebuild
new file mode 100644
index 000000000000..c2b1a29aac22
--- /dev/null
+++ b/sys-fs/aufs-headers/aufs-headers-4.0_p20150420.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit versionator
+
+DESCRIPTION="User space headers for aufs3"
+HOMEPAGE="http://aufs.sourceforge.net/"
+# Clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-linux.git
+# Check aufs release Branch
+# Create .config
+# make headers_install INSTALL_HDR_PATH=${T}
+# find ${T} -type f \( ! -name "*aufs*" \) -delete
+# find ${T} -type d -empty -delete
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+S="${WORKDIR}"
+
+src_install() {
+ doheader -r include/*
+}
diff --git a/sys-fs/aufs-headers/metadata.xml b/sys-fs/aufs-headers/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/sys-fs/aufs-headers/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/aufs-util/Manifest b/sys-fs/aufs-util/Manifest
new file mode 100644
index 000000000000..65e77e807f21
--- /dev/null
+++ b/sys-fs/aufs-util/Manifest
@@ -0,0 +1,3 @@
+DIST aufs-util-3.19_p20150323.tar.xz 97980 SHA256 6a7c342f7cda2abd7ee0eb20c40419c7e34a88cf73d77f4a9a697370a996fe7d SHA512 49f138538ea8997ddb6bedf368815f16a5d42a49b5f72c1548cd9c3718bb00831224e80e9b4dd8c984a6fb40b11223e317757020076d432117541f7d361b892b WHIRLPOOL 59d65f468bbb36ac11f200e45d2449549512a1b2168c4776764a540d22d919969067b551704d55403111a0b68364831152177dda8ace101fe77e158e86d82d25
+DIST aufs-util-3.19_p20150420.tar.xz 97980 SHA256 2ab7f16ee4a67b8ac85903da2e2f6569c8659ee217f060923ba93865a3ff212f SHA512 fe329e9efdbd7b585664b81c2bcd2d63ce5344d013eb2d76c6247e042c1cbe44a4a3ab6e8317734c06c24c1eeffe438d8f91a8e57d95b34e238b21a8b9389e8a WHIRLPOOL 0d3c6aa78e9ecbbb2cabbcddfbf7a9edd1d931b5993047e98f4eaf20e7c60c0077819a2c0b7d0f2e3fd85f6f9eedf86c17c508f3437194e2379295d94e1dc62d
+DIST aufs-util-4.0_p20150420.tar.xz 97924 SHA256 f6d19dad3729da05af9e283e48a4a573b7e00e5e822aa1741e0c225e69171fde SHA512 9a988dcd3640e4797c731ab921161bccbd125fc23475e39681b3a398a238715cb85ac8fe8dfc64053af7478c8c33fe28b7e8cc3a2f97eb31e3c4049305043085 WHIRLPOOL 50baac4fe8bfcc750038e586f9dc3fd2d819ba485951e624c0b07c95c81000fbe7c0b70cf55b61667be7210dff328290cbf95a198680e59549c31c3979d2c471
diff --git a/sys-fs/aufs-util/aufs-util-3.19_p20150323.ebuild b/sys-fs/aufs-util/aufs-util-3.19_p20150323.ebuild
new file mode 100644
index 000000000000..10ce3942ab3c
--- /dev/null
+++ b/sys-fs/aufs-util/aufs-util-3.19_p20150323.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic linux-info multilib toolchain-funcs
+
+DESCRIPTION="Utilities are always necessary for aufs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+# git archive -v --prefix=${P}/ --remote=git://git.code.sf.net/p/aufs/aufs-util aufs3.14 -o ${P}.tar
+# xz -ve9 *.tar
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ !sys-fs/aufs2
+ !<sys-fs/aufs3-3_p20130318"
+DEPEND="${RDEPEND}
+ ~sys-fs/aufs-headers-${PV}"
+
+src_prepare() {
+ sed \
+ -e "/LDFLAGS += -static -s/d" \
+ -e "/CFLAGS/s:-O::g" \
+ -i Makefile || die
+
+ sed \
+ -e '/LDFLAGS/s: -s::g' \
+ -e "s:m 644 -s:m 644:g" \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ -i libau/Makefile || die
+
+ sed \
+ -e '/LDFLAGS/s: -s::g' \
+ -e '/LDLIBS/s:-lrt::g' \
+ -e '/LDLIBS/s:$: -lrt:g' \
+ -i fhsm/Makefile || die
+
+ tc-export CC AR
+ export HOSTCC=$(tc-getCC)
+}
diff --git a/sys-fs/aufs-util/aufs-util-3.19_p20150420.ebuild b/sys-fs/aufs-util/aufs-util-3.19_p20150420.ebuild
new file mode 100644
index 000000000000..10ce3942ab3c
--- /dev/null
+++ b/sys-fs/aufs-util/aufs-util-3.19_p20150420.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic linux-info multilib toolchain-funcs
+
+DESCRIPTION="Utilities are always necessary for aufs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+# git archive -v --prefix=${P}/ --remote=git://git.code.sf.net/p/aufs/aufs-util aufs3.14 -o ${P}.tar
+# xz -ve9 *.tar
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ !sys-fs/aufs2
+ !<sys-fs/aufs3-3_p20130318"
+DEPEND="${RDEPEND}
+ ~sys-fs/aufs-headers-${PV}"
+
+src_prepare() {
+ sed \
+ -e "/LDFLAGS += -static -s/d" \
+ -e "/CFLAGS/s:-O::g" \
+ -i Makefile || die
+
+ sed \
+ -e '/LDFLAGS/s: -s::g' \
+ -e "s:m 644 -s:m 644:g" \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ -i libau/Makefile || die
+
+ sed \
+ -e '/LDFLAGS/s: -s::g' \
+ -e '/LDLIBS/s:-lrt::g' \
+ -e '/LDLIBS/s:$: -lrt:g' \
+ -i fhsm/Makefile || die
+
+ tc-export CC AR
+ export HOSTCC=$(tc-getCC)
+}
diff --git a/sys-fs/aufs-util/aufs-util-4.0_p20150420.ebuild b/sys-fs/aufs-util/aufs-util-4.0_p20150420.ebuild
new file mode 100644
index 000000000000..f7fee92dd671
--- /dev/null
+++ b/sys-fs/aufs-util/aufs-util-4.0_p20150420.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info multilib toolchain-funcs
+
+DESCRIPTION="Utilities are always necessary for aufs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+# git archive -v --prefix=${P}/ --remote=git://git.code.sf.net/p/aufs/aufs-util aufs4.0 -o ${P}.tar
+# xz -ve9 *.tar
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ !sys-fs/aufs2
+ !<sys-fs/aufs3-3_p20130318"
+DEPEND="${RDEPEND}
+ ~sys-fs/aufs-headers-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-version.patch
+ sed \
+ -e "/LDFLAGS += -static -s/d" \
+ -e "/CFLAGS/s:-O::g" \
+ -i Makefile || die
+
+ sed \
+ -e '/LDFLAGS/s: -s::g' \
+ -e "s:m 644 -s:m 644:g" \
+ -e "s:/usr/lib:/usr/$(get_libdir):g" \
+ -i libau/Makefile || die
+
+ sed \
+ -e '/LDFLAGS/s: -s::g' \
+ -e '/LDLIBS/s:-lrt::g' \
+ -e '/LDLIBS/s:$: -lrt:g' \
+ -i fhsm/Makefile || die
+
+ tc-export CC AR
+ export HOSTCC=$(tc-getCC)
+}
diff --git a/sys-fs/aufs-util/files/aufs-util-4.0_p20150420-version.patch b/sys-fs/aufs-util/files/aufs-util-4.0_p20150420-version.patch
new file mode 100644
index 000000000000..b861bb2bb0b7
--- /dev/null
+++ b/sys-fs/aufs-util/files/aufs-util-4.0_p20150420-version.patch
@@ -0,0 +1,16 @@
+ ver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ver.c b/ver.c
+index 200b119..38abdd5 100644
+--- a/ver.c
++++ b/ver.c
+@@ -25,7 +25,7 @@
+ int main(int argc, char *argv[])
+ {
+ regex_t preg;
+- const char *pat = "^4\\.[0-9][0-9]";
++ const char *pat = "^4\\.[0-9][0-9]?";
+
+ if (regcomp(&preg, pat, REG_EXTENDED | REG_NOSUB))
+ AuFin("regcomp");
diff --git a/sys-fs/aufs-util/metadata.xml b/sys-fs/aufs-util/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/sys-fs/aufs-util/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/aufs3/Manifest b/sys-fs/aufs3/Manifest
new file mode 100644
index 000000000000..6604433d0ce7
--- /dev/null
+++ b/sys-fs/aufs3/Manifest
@@ -0,0 +1,8 @@
+DIST aufs3-standalone-3_p20150406.tar.xz 2863952 SHA256 e2de4fcdb086ab33bc182b084bf534891cc31a7d3ffc805d40dc087c37ab464b SHA512 c843999798f99fef5c16232935606ca438774104dc04c58982bb2b3f9ae371d9f2173b5454d366481de22fd3e658ee9e67f6981504c5c8157af20a8f15f269d1 WHIRLPOOL 0d2efaa6918c6f90339cae02a9ef3908921e8d1903364aaff9af034262f439886a02a639f9eaae27a28093fc6bf451bbc9fe7072a766a36e51f75c779378095d
+DIST aufs3-standalone-3_p20150420.tar.xz 2864092 SHA256 0f592b3c84b149d0842c518b83656be61a627f5bb9c953b824fd1631e24a2224 SHA512 ad383f37c5201a6a6e53e91f18d63648b3768b8327f07c36a207eb90b63b13779709a0f18696896c833866a30e1010c70ad8aa1259ae08dca5465a68f91d48e5 WHIRLPOOL 029f0cb665e0aa5f8d8bc2a93177e73d8ee7d80d68326f4f38018cec5678ff70378e70473f48bde1ba4f8096331eae4e40949b7c732f22789d09c690cd5cfce7
+DIST aufs3-standalone-3_p20150504.tar.xz 2886004 SHA256 f88435f8fa5d0316a5d87cc8c99012a5504e4f52deee518ae6d4b48152a38071 SHA512 acb863eb197a089e7720237f4b1f1a28be150eee751cb6930e16d96053c1dee84333479ac5f2e5eee2107fe73f9563fe4864c01d07a9de452cff1b7fd283844c WHIRLPOOL d6dcea3e86d0eb5636fe6026c9d8e887e8c15283f364aaf41fe1b7eb4ebfe51caae8dcad26162353e90a28e27587a777fa6d7d6e710c1d1006f2b597bd39c06e
+DIST aufs3-standalone-3_p20150511.tar.xz 2940252 SHA256 c3f67eff4fa23a1734e94733d7d7f9e7be1564525e70c8207995a02f96c75ab3 SHA512 c66c6450596f5f5dd6223b7945cbd5a6bf8117c2c0c98547a7debae6e78965cce1cc5e681d60efa798f93f94f67c0129c5372d9fbcbd313abfc5a6bbf89d28df WHIRLPOOL e56fbac3edff29bcc2653683ceaa6e94f18f0764d435e454e981b9f728b03a7cb7562f5a1005455a764cfaf001c7db87d3b74e9a433165d51d53097f45f9cf75
+DIST aufs3-standalone-3_p20150518.tar.xz 2967016 SHA256 f938bdcc461dacf2b59c807b31fca70f166007a3973c50076b60c6d2e53b163c SHA512 7aede4db3135949a7f3098a29ff9234e21eb78534c0aec3b8fdcd63782110f48c76734752857bd157b29cbd16fdb7e844cc50992e4750cfb05ccfba2d9247b64 WHIRLPOOL bdf559b43d2cede70c334621574f62f123a481cefbec091f3e9e3bd12a499ea985e885a941e24634c2d8e9e9a83acb2c149da29038db00562824647ca6e8db78
+DIST aufs3-standalone-3_p20150525.tar.xz 2988108 SHA256 117be76206e67425c4144174afaa347c4f9e9414200899b5c43a8ec0b91c7d03 SHA512 ea6031ff9231ce68b95450e428989ad81b1c6ce4a9a21f718f73dbafd3aa1e12191d7abd57829e0f80cc0cf0aa412e35b2cad4e14430078b88b2e17312d7b708 WHIRLPOOL 81aeff069ebc6122856c74fcdd38784bd7a231c99726a73ddaad04f145978053fd3ff8b788ac0995fa261cfbf62d461c43f8dca887525df887fdb0011a417f40
+DIST aufs3-standalone-3_p20150608.tar.xz 3015460 SHA256 cdf92d07f45becfeb70ea3314e554ea9c8766a2815c3aa6c8d634b5307c76d5d SHA512 4d29d2d4908cd7a4471bc3efe5c23e57d41765937c700eee8593a5c07d7e84e12e6093ef4338b6bd4e9e6f0e44674557a659fd5fa5257a79b381385d208c2209 WHIRLPOOL ccf68e64eb5bc1893c2e5d50c6fc3eaf4e71fd06949ae16e4343734dca39f7f016ab0a08796d444efe55947a8645193979c0dccce702d8c38e46207bfde4f1ad
+DIST aufs3-standalone-3_p20150622.tar.xz 3063280 SHA256 2fa44f9df9d58df7a5251ebd2cec206fa90ca8e110c1f657df18e62adb170517 SHA512 fe7a62249130d68f72b14f21b57e5d6db402f56637afc876068d916e78884d08476c804ac58ef06eeb9e13e0a2e1cb75ac782f83054f1c06cb85c74a3c48ba01 WHIRLPOOL 7f85a5324d51e148c97109357c13fcab76121d25ee006211d2212f9c6d352330be110569848c8ca96421bc4582025c73030329d7e501837e4d18cafd6002f153
diff --git a/sys-fs/aufs3/aufs3-3_p20150406.ebuild b/sys-fs/aufs3/aufs3-3_p20150406.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150406.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150420.ebuild b/sys-fs/aufs3/aufs3-3_p20150420.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150420.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150504.ebuild b/sys-fs/aufs3/aufs3-3_p20150504.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150504.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150511.ebuild b/sys-fs/aufs3/aufs3-3_p20150511.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150511.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150518.ebuild b/sys-fs/aufs3/aufs3-3_p20150518.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150518.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150525.ebuild b/sys-fs/aufs3/aufs3-3_p20150525.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150525.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150608.ebuild b/sys-fs/aufs3/aufs3-3_p20150608.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150608.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/aufs3-3_p20150622.ebuild b/sys-fs/aufs3/aufs3-3_p20150622.ebuild
new file mode 100644
index 000000000000..a447062874a8
--- /dev/null
+++ b/sys-fs/aufs3/aufs3-3_p20150622.ebuild
@@ -0,0 +1,172 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=19
+# highest supported version
+KERN_MAX_VER=20
+# lowest supported version
+KERN_MIN_VER=14
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs4"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 3 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".21+
+ elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
+ PATCH_BRANCH="${KV_MINOR}".1+
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs3"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs3 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs3-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs3/files/README.gentoo b/sys-fs/aufs3/files/README.gentoo
new file mode 100644
index 000000000000..64dfe94b4bda
--- /dev/null
+++ b/sys-fs/aufs3/files/README.gentoo
@@ -0,0 +1,20 @@
+There several other patches in aufs3. They are all
+optional. When you meet some problems, they will help you. You can find them
+in the documentation directory.
+
+ - aufs3-loopback.patch
+ Supports a nested loopback mount in a branch-fs. This patch is
+ unnecessary until aufs produces a message such like "you may want to try
+ another patch for loopback file".
+
+ - vfs-ino.patch
+ Modifies a system global kernel internal function get_next_ino() in
+ order to stop assigning 0 for an inode-number. Not directly related to
+ aufs, but recommended generally.
+
+ - tmpfs-idr.patch
+ Keeps the tmpfs inode number as the lowest value. Effective to reduce
+ the size of aufs XINO files for tmpfs branch. Also it prevents the
+ duplication of inode number, which is important for backup
+ tools, aubrsync or other utilities. When you find aufs XINO files for
+ tmpfs branch growing too much, try this patch.
diff --git a/sys-fs/aufs3/files/pax-3.11.patch b/sys-fs/aufs3/files/pax-3.11.patch
new file mode 100644
index 000000000000..cf216a5708ca
--- /dev/null
+++ b/sys-fs/aufs3/files/pax-3.11.patch
@@ -0,0 +1,89 @@
+--- a/fs/aufs/dynop.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/dynop.c 2012-10-09 15:41:58.562989820 -0400
+@@ -149,9 +149,11 @@
+ #define DySet(func, dst, src, h_op, h_sb) do { \
+ DyDbgInc(cnt); \
+ if (h_op->func) { \
+- if (src.func) \
+- dst.func = src.func; \
+- else \
++ if (src.func) { \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
++ } else \
+ AuDbg("%s %s\n", au_sbtype(h_sb), #func); \
+ } \
+ } while (0)
+@@ -159,7 +161,9 @@
+ #define DySetForce(func, dst, src) do { \
+ AuDebugOn(!src.func); \
+ DyDbgInc(cnt); \
+- dst.func = src.func; \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
+ } while (0)
+
+ #define DySetAop(func) \
+@@ -266,15 +270,17 @@
+ */
+ static void dy_adx(struct au_dyaop *dyaop, int do_dx)
+ {
++ pax_open_kernel();
+ if (!do_dx) {
+- dyaop->da_op.direct_IO = NULL;
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.direct_IO = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ } else {
+- dyaop->da_op.direct_IO = aufs_aop.direct_IO;
+- dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
++ *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO;
++ *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
+ if (!dyaop->da_get_xip_mem)
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ }
++ pax_close_kernel();
+ }
+
+ static struct au_dyaop *dy_aget(struct au_branch *br,
+--- a/fs/aufs/f_op_sp.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/f_op_sp.c 2012-10-09 15:41:58.562989820 -0400
+@@ -104,7 +104,7 @@
+ static int aufs_open_sp(struct inode *inode, struct file *file);
+ static struct au_sp_fop {
+ int done;
+- struct file_operations fop; /* not 'const' */
++ file_operations_no_const fop; /* not 'const' */
+ spinlock_t spin;
+ } au_sp_fop[AuSp_Last] = {
+ [AuSp_FIFO] = {
+@@ -157,8 +157,10 @@
+ h_file = au_hf_top(file);
+ spin_lock(&p->spin);
+ if (!p->done) {
+- p->fop = *h_file->f_op;
++ pax_open_kernel();
++ memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop));
+ p->fop.owner = THIS_MODULE;
++ pax_close_kernel();
+ if (p->fop.aio_read)
+ p->fop.aio_read = aufs_aio_read_sp;
+ if (p->fop.aio_write)
+--- a/fs/aufs/sysfs.c 2013-10-20 17:08:37.000000000 -0400
++++ b/fs/aufs/sysfs.c 2013-10-19 17:08:29.000000000 -0400
+@@ -233,8 +233,10 @@
+ for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) {
+ attr = &br_sysfs->attr;
+ sysfs_attr_init(attr);
+- attr->name = br_sysfs->name;
+- attr->mode = S_IRUGO;
++ pax_open_kernel();
++ *(void **)&attr->name = br_sysfs->name;
++ *(void **)&attr->mode = S_IRUGO;
++ pax_close_kernel();
+ br_sysfs++;
+ }
+ }
diff --git a/sys-fs/aufs3/files/pax-3.patch b/sys-fs/aufs3/files/pax-3.patch
new file mode 100644
index 000000000000..584fa6ace5b5
--- /dev/null
+++ b/sys-fs/aufs3/files/pax-3.patch
@@ -0,0 +1,90 @@
+--- a/fs/aufs/dynop.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/dynop.c 2012-10-09 15:41:58.562989820 -0400
+@@ -149,9 +149,11 @@
+ #define DySet(func, dst, src, h_op, h_sb) do { \
+ DyDbgInc(cnt); \
+ if (h_op->func) { \
+- if (src.func) \
+- dst.func = src.func; \
+- else \
++ if (src.func) { \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
++ } else \
+ AuDbg("%s %s\n", au_sbtype(h_sb), #func); \
+ } \
+ } while (0)
+@@ -159,7 +161,9 @@
+ #define DySetForce(func, dst, src) do { \
+ AuDebugOn(!src.func); \
+ DyDbgInc(cnt); \
+- dst.func = src.func; \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
+ } while (0)
+
+ #define DySetAop(func) \
+@@ -266,15 +270,17 @@
+ */
+ static void dy_adx(struct au_dyaop *dyaop, int do_dx)
+ {
++ pax_open_kernel();
+ if (!do_dx) {
+- dyaop->da_op.direct_IO = NULL;
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.direct_IO = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ } else {
+- dyaop->da_op.direct_IO = aufs_aop.direct_IO;
+- dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
++ *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO;
++ *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
+ if (!dyaop->da_get_xip_mem)
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ }
++ pax_close_kernel();
+ }
+
+ static struct au_dyaop *dy_aget(struct au_branch *br,
+--- a/fs/aufs/f_op_sp.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/f_op_sp.c 2012-10-09 15:41:58.562989820 -0400
+@@ -104,7 +104,7 @@
+ static int aufs_open_sp(struct inode *inode, struct file *file);
+ static struct au_sp_fop {
+ int done;
+- struct file_operations fop; /* not 'const' */
++ file_operations_no_const fop; /* not 'const' */
+ spinlock_t spin;
+ } au_sp_fop[AuSp_Last] = {
+ [AuSp_FIFO] = {
+@@ -157,8 +157,10 @@
+ h_file = au_hf_top(file);
+ spin_lock(&p->spin);
+ if (!p->done) {
+- p->fop = *h_file->f_op;
++ pax_open_kernel();
++ memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop));
+ p->fop.owner = THIS_MODULE;
++ pax_close_kernel();
+ if (p->fop.aio_read)
+ p->fop.aio_read = aufs_aio_read_sp;
+ if (p->fop.aio_write)
+diff -Naur linux-3.8.3-pentoo/fs/aufs/sysfs.c linux-3.8.3-pentoo-aufsfix/fs/aufs/sysfs.c
+--- linux-3.8.3-pentoo/fs/aufs/sysfs.c 2013-04-29 00:07:50.478827567 -0400
++++ linux-3.8.3-pentoo-aufsfix/fs/aufs/sysfs.c 2013-04-28 23:46:23.724793109 -0400
+@@ -208,8 +208,10 @@
+ struct attribute *attr = &br->br_attr;
+
+ sysfs_attr_init(attr);
+- attr->name = br->br_name;
+- attr->mode = S_IRUGO;
++ pax_open_kernel();
++ *(void **)&attr->name = br->br_name;
++ *(void **)&attr->mode = S_IRUGO;
++ pax_close_kernel();
+ }
+
+ void sysaufs_brs_del(struct super_block *sb, aufs_bindex_t bindex)
diff --git a/sys-fs/aufs3/metadata.xml b/sys-fs/aufs3/metadata.xml
new file mode 100644
index 000000000000..078f0414d465
--- /dev/null
+++ b/sys-fs/aufs3/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="debug">Enable additional debugging support</flag>
+ <flag name="hfs">Enable hfs support</flag>
+ <flag name="fuse">Enable fuse support</flag>
+ <flag name="inotify">Enable inotify support</flag>
+ <flag name="kernel-patch">Patch the current kernel for aufs3 support</flag>
+ <flag name="nfs">Enable support for nfs export</flag>
+ <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag>
+ <flag name="ramfs">Enable initramfs/rootfs support</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/aufs4/Manifest b/sys-fs/aufs4/Manifest
new file mode 100644
index 000000000000..b8cb5aa210d3
--- /dev/null
+++ b/sys-fs/aufs4/Manifest
@@ -0,0 +1,8 @@
+DIST aufs4-standalone-0_pre20150420.tar.xz 424400 SHA256 7d96ee8bb16a4b72d60bfbab2955f5e68aec5a01d61a0a4870bb90f69099ad0f SHA512 71e460c582591861a1042fe628b186f081581f61fef61ccdc1ddb98ae7ee289ae58922c9df1549109f4351c8de3858fb3b2eb040f7e1da488f05f5b954468311 WHIRLPOOL f6b324404a62b465cd8a2d677000c4b4c7f951fa502f7ed6e5634d4a39dc90bb87e245a7f7036379a02d8e7f8a9fc64801c33e86ceb747b63912b8509d68a925
+DIST aufs4-standalone-0_pre20150504.tar.xz 466636 SHA256 b14bba141ead117ff9193a8a896a2bcefc418e11e642eb8547d4785833d70261 SHA512 c1299eb6ca179e60e60be2f7792001e2277f9507fd416994abd41c43e066be46ea508eaface45740153e4c34ccfcdcb3aa6a6118c840786fb1abf5aa56d6cc63 WHIRLPOOL 37bf469947c8ef5e0724e37fa40ec9535ff4065f81e64d45d924c16bb1d059d526ae853d0a73cd67de2aeacd3c41444a3a51545e9a12d08c0b8b27b526fa4dff
+DIST aufs4-standalone-0_pre20150511.tar.xz 501548 SHA256 a26e5e684c1878d0bd8e18c512979a6d0cccd9b1c8219746fe3d93ab1448f1be SHA512 da123ea8da38c840de76201284bf6846d794421e38e6193206ac753380eab3ecea33724c23c7b25d62f933c0c3d1e67082d17c1e702eefdb24c722808b88a69d WHIRLPOOL c7d2c81119933a55f0aa357fbc840f4a60597144386150c45260f2c7b99a0722d362595558df4b0db146c0fe65fb6886b002186e15a5e8cea00b3a04075a5500
+DIST aufs4-standalone-0_pre20150518.tar.xz 515624 SHA256 e2c2aeb02dce4f2b15da8459e92e90896c0fc795d6df829e2cab4eb2a82174a1 SHA512 4188d4d7928e1ee8ce88a7a079ee75c0ab9695c3e23db66952ff9d276ad3cfa5dbed1585dabe05856c5f3417d436fa3a1f93645ee68ebaa65a21610de8e34aca WHIRLPOOL 013672a12293ffe9067013d0295f6d797fafafa9f1ca49eb37a831fb77addac52dee804b9c809eadf4d18205a81e419be0b0b273d875a0f04e657498ccf95af8
+DIST aufs4-standalone-0_pre20150525.tar.xz 523720 SHA256 39abd01774e92eb717af89c57797601073c9237554d7e29ec509c7f61629a1e5 SHA512 3856eb2ca8bef3f0f54a8ea87ddb97c367cb96b10efff68b6edda7be1ec95a87742e1328e3d15f2c7a578659c9017187263c4e5371b602448d7ab5defdce43c2 WHIRLPOOL b5a91d900910bab24ccd01cc7b9626fd23cc92fdaf054f669e0fe2cefb5784065703b422a69379eda85d36c63cb8e9dc3a8018cdd277a85bab6886e68c62d60a
+DIST aufs4-standalone-0_pre20150608.tar.xz 532144 SHA256 8aaa1f348de3b6cfa86f21539d0ec44e5d0d18c27f0645719e3140462522a4e7 SHA512 1abd663b5f7997b93a865bf478c2900a3f69aff1d25149be683f8fd0f7362eaeccb7cdd9ce91ff08d1c4f2660414e03b7c9170fb7818c0839176b94c720d2896 WHIRLPOOL 36fa2691e8f5f27be41463c67df10d0e467892151e50df6f8396293c2572ad3d9229f00302bc47d816b48a08bdb64c92926381ba9d00c150dfb9f445dba8aeeb
+DIST aufs4-standalone-0_pre20150622.tar.xz 543932 SHA256 28de7f6968c62a48b78f4b6c9234dd4b7b134632e1d4e7d50e87da9e05c06343 SHA512 82f130ed3b43e2bfe42079c96dca70e868d7ce1df5511f68e7b85d343105d452c334fe7a15c1cd4e01450ca39dd527123c060b98b396d13c4250541ec464c2fc WHIRLPOOL e46a01857f2cbd52e6a3717bc5d076197443146fa9eab3b542aeb2698da652a45e8d40e1f9f50d9d4c3fc34d9a6da225712ac32f27f15eded4e8e3f23e113de8
+DIST aufs4-standalone-0_pre20150629.tar.xz 547808 SHA256 7c1d9a815c73e8cb1c9f909eee8f6945486c8e8feeea9cae4b3865b6032f17e5 SHA512 b7c734fb83515790b58a81b904acb286ef52124e0799dad1c7900dc8af3e0dc6f2875ba86805f1f39b8d04ce6660bf0c0307e4bbc1b58f2ca6171ead5e668a94 WHIRLPOOL b39f2cdeffd20b636c4a3aa5ec8e87cd6b1c8bdfdab071d1cabf53e10629beebffc919abf5fc90915ec0c14f4b4c45a510bbd303765564348a0e2d1688ddf79b
diff --git a/sys-fs/aufs4/aufs4-0_pre20150420.ebuild b/sys-fs/aufs4/aufs4-0_pre20150420.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150420.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150504.ebuild b/sys-fs/aufs4/aufs4-0_pre20150504.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150504.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150511.ebuild b/sys-fs/aufs4/aufs4-0_pre20150511.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150511.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150518.ebuild b/sys-fs/aufs4/aufs4-0_pre20150518.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150518.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150525.ebuild b/sys-fs/aufs4/aufs4-0_pre20150525.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150525.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150608.ebuild b/sys-fs/aufs4/aufs4-0_pre20150608.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150608.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150622.ebuild b/sys-fs/aufs4/aufs4-0_pre20150622.ebuild
new file mode 100644
index 000000000000..3289f18bff81
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150622.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=0
+# highest supported version
+KERN_MAX_VER=1
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/aufs4-0_pre20150629.ebuild b/sys-fs/aufs4/aufs4-0_pre20150629.ebuild
new file mode 100644
index 000000000000..382aafeef0a1
--- /dev/null
+++ b/sys-fs/aufs4/aufs4-0_pre20150629.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs
+
+AUFS_VERSION="${PV%%_p*}"
+# highest branch version
+PATCH_MAX_VER=1
+# highest supported version
+KERN_MAX_VER=2
+# lowest supported version
+KERN_MIN_VER=0
+
+DESCRIPTION="An entirely re-designed and re-implemented Unionfs"
+HOMEPAGE="http://aufs.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-standalone-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs"
+
+DEPEND="
+ dev-util/patchutils
+ dev-vcs/git"
+RDEPEND="
+ sys-fs/aufs-util
+ !sys-fs/aufs
+ !sys-fs/aufs2
+ !sys-fs/aufs3"
+
+S="${WORKDIR}"/${PN}-standalone
+
+MODULE_NAMES="aufs(misc:${S})"
+
+pkg_setup() {
+ CONFIG_CHECK+=" !AUFS_FS"
+ use inotify && CONFIG_CHECK+=" ~FSNOTIFY"
+ use nfs && CONFIG_CHECK+=" EXPORTFS"
+ use fuse && CONFIG_CHECK+=" ~FUSE_FS"
+ use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS"
+ use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources"
+
+ # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system
+ [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return
+
+ get_version
+ kernel_is lt 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade."
+ kernel_is gt 4 ${KERN_MAX_VER} 99 && die "kernel too new"
+
+ linux-mod_pkg_setup
+
+ if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
+ PATCH_BRANCH="x-rcN"
+ else
+ PATCH_BRANCH="${KV_MINOR}"
+ fi
+
+ case ${KV_EXTRA} in
+ "")
+ elog "It seems you are using vanilla-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources with USE=vanilla"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ "-gentoo")
+ elog "It seems you are using gentoo-sources with aufs4"
+ elog "Please use sys-kernel/aufs-sources"
+ elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade"
+ ;;
+ esac
+
+ pushd "${T}" &> /dev/null
+ unpack ${A}
+ cd ${PN}-standalone || die
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+ einfo "Using ${module_branch} as patch source"
+ git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
+ combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch
+ combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch
+ if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-combined.patch > /dev/null ); then
+ if use kernel-patch; then
+ cd ${KV_DIR}
+ ewarn "Patching your kernel..."
+ patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null
+ epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+ ewarn "You need to compile your kernel with the applied patch"
+ ewarn "to be able to load and use the aufs kernel module"
+ else
+ eerror "You need to apply a patch to your kernel to compile and run the ${PN} module"
+ eerror "Either enable the kernel-patch useflag to do it with this ebuild"
+ eerror "or apply "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch by hand"
+ die "missing kernel patch, please apply it first"
+ fi
+ fi
+ popd &> /dev/null
+ export PKG_SETUP_HAS_BEEN_RAN=1
+}
+
+set_config() {
+ for option in $*; do
+ grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option"
+ sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die
+ done
+}
+
+src_prepare() {
+ local module_branch=origin/${PN}.${PATCH_BRANCH}
+
+ einfo "Using for module creation branch ${module_branch}"
+ git checkout -q -b local-gentoo ${module_branch} || die
+
+ # All config options to off
+ sed "s:= y:=:g" -i config.mk || die
+
+ set_config RDU BRANCH_MAX_127 SBILIST
+
+ use debug && set_config DEBUG
+ use fuse && set_config BR_FUSE POLL
+ use hfs && set_config BR_HFSPLUS
+ use inotify && set_config HNOTIFY HFSNOTIFY
+ use nfs && set_config EXPORT
+ use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
+ use ramfs && set_config BR_RAMFS
+
+ if use pax_kernel; then
+ epatch "${FILESDIR}"/pax-4.patch
+ fi
+
+ sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
+}
+
+src_compile() {
+ local ARCH=x86
+
+ emake \
+ CC=$(tc-getCC) \
+ LD=$(tc-getLD) \
+ LDFLAGS="$(raw-ldflags)" \
+ ARCH=$(tc-arch-kernel) \
+ CONFIG_AUFS_FS=m \
+ KDIR="${KV_OUT_DIR}"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ insinto /usr/share/doc/${PF}
+
+ use doc && doins -r Documentation
+
+ use kernel-patch || doins "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch
+
+ dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ linux-mod_pkg_postinst
+}
diff --git a/sys-fs/aufs4/files/README.gentoo b/sys-fs/aufs4/files/README.gentoo
new file mode 100644
index 000000000000..64dfe94b4bda
--- /dev/null
+++ b/sys-fs/aufs4/files/README.gentoo
@@ -0,0 +1,20 @@
+There several other patches in aufs3. They are all
+optional. When you meet some problems, they will help you. You can find them
+in the documentation directory.
+
+ - aufs3-loopback.patch
+ Supports a nested loopback mount in a branch-fs. This patch is
+ unnecessary until aufs produces a message such like "you may want to try
+ another patch for loopback file".
+
+ - vfs-ino.patch
+ Modifies a system global kernel internal function get_next_ino() in
+ order to stop assigning 0 for an inode-number. Not directly related to
+ aufs, but recommended generally.
+
+ - tmpfs-idr.patch
+ Keeps the tmpfs inode number as the lowest value. Effective to reduce
+ the size of aufs XINO files for tmpfs branch. Also it prevents the
+ duplication of inode number, which is important for backup
+ tools, aubrsync or other utilities. When you find aufs XINO files for
+ tmpfs branch growing too much, try this patch.
diff --git a/sys-fs/aufs4/files/pax-4.patch b/sys-fs/aufs4/files/pax-4.patch
new file mode 100644
index 000000000000..cf216a5708ca
--- /dev/null
+++ b/sys-fs/aufs4/files/pax-4.patch
@@ -0,0 +1,89 @@
+--- a/fs/aufs/dynop.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/dynop.c 2012-10-09 15:41:58.562989820 -0400
+@@ -149,9 +149,11 @@
+ #define DySet(func, dst, src, h_op, h_sb) do { \
+ DyDbgInc(cnt); \
+ if (h_op->func) { \
+- if (src.func) \
+- dst.func = src.func; \
+- else \
++ if (src.func) { \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
++ } else \
+ AuDbg("%s %s\n", au_sbtype(h_sb), #func); \
+ } \
+ } while (0)
+@@ -159,7 +161,9 @@
+ #define DySetForce(func, dst, src) do { \
+ AuDebugOn(!src.func); \
+ DyDbgInc(cnt); \
+- dst.func = src.func; \
++ pax_open_kernel(); \
++ *(void **)&dst.func = src.func; \
++ pax_close_kernel(); \
+ } while (0)
+
+ #define DySetAop(func) \
+@@ -266,15 +270,17 @@
+ */
+ static void dy_adx(struct au_dyaop *dyaop, int do_dx)
+ {
++ pax_open_kernel();
+ if (!do_dx) {
+- dyaop->da_op.direct_IO = NULL;
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.direct_IO = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ } else {
+- dyaop->da_op.direct_IO = aufs_aop.direct_IO;
+- dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
++ *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO;
++ *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem;
+ if (!dyaop->da_get_xip_mem)
+- dyaop->da_op.get_xip_mem = NULL;
++ *(void **)&dyaop->da_op.get_xip_mem = NULL;
+ }
++ pax_close_kernel();
+ }
+
+ static struct au_dyaop *dy_aget(struct au_branch *br,
+--- a/fs/aufs/f_op_sp.c 2012-10-09 15:41:32.652989534 -0400
++++ b/fs/aufs/f_op_sp.c 2012-10-09 15:41:58.562989820 -0400
+@@ -104,7 +104,7 @@
+ static int aufs_open_sp(struct inode *inode, struct file *file);
+ static struct au_sp_fop {
+ int done;
+- struct file_operations fop; /* not 'const' */
++ file_operations_no_const fop; /* not 'const' */
+ spinlock_t spin;
+ } au_sp_fop[AuSp_Last] = {
+ [AuSp_FIFO] = {
+@@ -157,8 +157,10 @@
+ h_file = au_hf_top(file);
+ spin_lock(&p->spin);
+ if (!p->done) {
+- p->fop = *h_file->f_op;
++ pax_open_kernel();
++ memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop));
+ p->fop.owner = THIS_MODULE;
++ pax_close_kernel();
+ if (p->fop.aio_read)
+ p->fop.aio_read = aufs_aio_read_sp;
+ if (p->fop.aio_write)
+--- a/fs/aufs/sysfs.c 2013-10-20 17:08:37.000000000 -0400
++++ b/fs/aufs/sysfs.c 2013-10-19 17:08:29.000000000 -0400
+@@ -233,8 +233,10 @@
+ for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) {
+ attr = &br_sysfs->attr;
+ sysfs_attr_init(attr);
+- attr->name = br_sysfs->name;
+- attr->mode = S_IRUGO;
++ pax_open_kernel();
++ *(void **)&attr->name = br_sysfs->name;
++ *(void **)&attr->mode = S_IRUGO;
++ pax_close_kernel();
+ br_sysfs++;
+ }
+ }
diff --git a/sys-fs/aufs4/metadata.xml b/sys-fs/aufs4/metadata.xml
new file mode 100644
index 000000000000..078f0414d465
--- /dev/null
+++ b/sys-fs/aufs4/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="debug">Enable additional debugging support</flag>
+ <flag name="hfs">Enable hfs support</flag>
+ <flag name="fuse">Enable fuse support</flag>
+ <flag name="inotify">Enable inotify support</flag>
+ <flag name="kernel-patch">Patch the current kernel for aufs3 support</flag>
+ <flag name="nfs">Enable support for nfs export</flag>
+ <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag>
+ <flag name="ramfs">Enable initramfs/rootfs support</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/autorun/Manifest b/sys-fs/autorun/Manifest
new file mode 100644
index 000000000000..51fcf7d67bfd
--- /dev/null
+++ b/sys-fs/autorun/Manifest
@@ -0,0 +1 @@
+DIST autorun-3.17.tar.gz 481168 SHA256 5f1bc8c9a5ba9796f6803bd8dc7a43a2f95aa8f351b7aa63e56a198717852e91
diff --git a/sys-fs/autorun/autorun-3.17.ebuild b/sys-fs/autorun/autorun-3.17.ebuild
new file mode 100644
index 000000000000..cfb4d30b9fbc
--- /dev/null
+++ b/sys-fs/autorun/autorun-3.17.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="auto cdrom mounter for the lazy user"
+HOMEPAGE="http://autorun.sourceforge.net/"
+SRC_URI="mirror://sourceforge/autorun/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="sys-devel/gettext
+ dev-util/intltool
+ app-text/xmlto
+ app-text/docbook-xml-dtd:4.1.2"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-headers.patch
+}
+
+src_configure() {
+ export KDEDIR=/usr
+ econf \
+ --disable-dependency-tracking
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/sys-fs/autorun/files/autorun-3.17-headers.patch b/sys-fs/autorun/files/autorun-3.17-headers.patch
new file mode 100644
index 000000000000..642f1596b704
--- /dev/null
+++ b/sys-fs/autorun/files/autorun-3.17-headers.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/251684
+
+--- autorun.cc
++++ autorun.cc
+@@ -90,6 +90,8 @@ char *strchr (), *strrchr ();
+
+ #include <errno.h>
+
++#include <stdlib.h>
++
+ #ifndef MNTTYPE_ISO9660
+ #define MNTTYPE_ISO9660 "iso9660"
+ #endif
diff --git a/sys-fs/autorun/metadata.xml b/sys-fs/autorun/metadata.xml
new file mode 100644
index 000000000000..d9b34f010cd8
--- /dev/null
+++ b/sys-fs/autorun/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">autorun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/avfs/Manifest b/sys-fs/avfs/Manifest
new file mode 100644
index 000000000000..75e2318f0bf5
--- /dev/null
+++ b/sys-fs/avfs/Manifest
@@ -0,0 +1,3 @@
+DIST avfs-1.0.1.tar.bz2 678562 SHA256 6c6558c35864660e6d26e67f42caeb2bc8f9ef2ad0c502fd659fb7d94724aaf1 SHA512 3eefb07ed303343c4e5ec873fb519f171e8b19f00efda5e78f4af573fccabbefa59f77a677a34a569343db743bb41368beaf6e399d69f228ad0a77878e41adf0 WHIRLPOOL 68153492899a67b36bb8f982bb319469ee8cdf64e8c1ae642fd2f746736bc5ee93c22b0fa005ffc42d5bed543332875b5d6ed096bfd0a8bf2c2da3cc47cfacbf
+DIST avfs-1.0.2.tar.bz2 723051 SHA256 52693953e8290281d441a898040c5ac2989f11bc1fcb83ca5063c37a125a1c9a SHA512 a248c025388d169e2c6a57f04487c0aefb2c574647aade49c3a27d62621c0ead25b321b87518cdd718cb238387a766ec9e7fef434f30dcc4dd2bf9fbcc3de020 WHIRLPOOL 71f3949f39b130522d98fdf6ae431c8d410fc83d4e91028223c6bf0a247373ac129257c1b85efacbe430320d6e870b373a3e65cbfad31eb123f691f02da5c26d
+DIST avfs-1.0.3.tar.bz2 722861 SHA256 c6dee77b2b71567528f897727e51695587189765fc35f694e4734db0a7d4fec8 SHA512 b20a8bcba0d1d0181a14d5f1204f0532817037e3b5d32931f00f988793cb6cdabec82298686d82aa34885209d22841754e990c9c35b6384e0b441f99fd3d1efd WHIRLPOOL 406b708b5b9516ec97e024f518eb7370031edf8410d8637763bacd05f6d15ceb06217c43a8f28381c0d2f9fbfcd991a27b57cb45521ed71696e70e41352b7de2
diff --git a/sys-fs/avfs/avfs-1.0.1.ebuild b/sys-fs/avfs/avfs-1.0.1.ebuild
new file mode 100644
index 000000000000..5de47122fb6f
--- /dev/null
+++ b/sys-fs/avfs/avfs-1.0.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="AVFS is a virtual filesystem that allows browsing of compressed files"
+HOMEPAGE="http://sourceforge.net/projects/avf"
+SRC_URI="mirror://sourceforge/avf/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ppc ppc64 x86"
+IUSE="static-libs +lzma"
+
+RDEPEND=">=sys-fs/fuse-2.4
+ sys-libs/zlib
+ app-arch/bzip2
+ lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-fuse \
+ --enable-library \
+ --enable-shared \
+ --with-system-zlib \
+ --with-system-bzlib \
+ $(use_enable static-libs static) \
+ $(use_with lzma xz)
+}
+
+src_install() {
+ default
+
+ # remove cruft
+ rm "${D}"/usr/bin/{davpass,ftppass} || die
+
+ # install docs
+ dodoc doc/{api-overview,background,FORMAT,INSTALL.*,README.avfs-fuse}
+ dosym /usr/lib/avfs/extfs/README /usr/share/doc/${PF}/README.extfs
+
+ docinto scripts
+ dodoc scripts/{avfscoda*,*pass}
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo "This version of AVFS includes FUSE support. It is user-based."
+ einfo "To execute:"
+ einfo "1) as user, mkdir ~/.avfs"
+ einfo "2) make sure fuse is either compiled into the kernel OR"
+ einfo " modprobe fuse or add to startup."
+ einfo "3) run mountavfs"
+ einfo "To unload daemon, type umountavfs"
+ einfo
+ einfo "READ the documentation! Enjoy :)"
+}
diff --git a/sys-fs/avfs/avfs-1.0.2.ebuild b/sys-fs/avfs/avfs-1.0.2.ebuild
new file mode 100644
index 000000000000..5af46d3c0a42
--- /dev/null
+++ b/sys-fs/avfs/avfs-1.0.2.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="AVFS is a virtual filesystem that allows browsing of compressed files"
+HOMEPAGE="http://sourceforge.net/projects/avf"
+SRC_URI="mirror://sourceforge/avf/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="static-libs +lzma"
+
+RDEPEND=">=sys-fs/fuse-2.4
+ sys-libs/zlib
+ app-arch/bzip2
+ lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-fuse \
+ --enable-library \
+ --enable-shared \
+ --with-system-zlib \
+ --with-system-bzlib \
+ $(use_enable static-libs static) \
+ $(use_with lzma xz)
+}
+
+src_install() {
+ default
+
+ # remove cruft
+ rm "${D}"/usr/bin/{davpass,ftppass} || die
+
+ # install docs
+ dodoc doc/{api-overview,background,FORMAT,INSTALL.*,README.avfs-fuse}
+ dosym /usr/lib/avfs/extfs/README /usr/share/doc/${PF}/README.extfs
+
+ docinto scripts
+ dodoc scripts/{avfscoda*,*pass}
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo "This version of AVFS includes FUSE support. It is user-based."
+ einfo "To execute:"
+ einfo "1) as user, mkdir ~/.avfs"
+ einfo "2) make sure fuse is either compiled into the kernel OR"
+ einfo " modprobe fuse or add to startup."
+ einfo "3) run mountavfs"
+ einfo "To unload daemon, type umountavfs"
+ einfo
+ einfo "READ the documentation! Enjoy :)"
+}
diff --git a/sys-fs/avfs/avfs-1.0.3.ebuild b/sys-fs/avfs/avfs-1.0.3.ebuild
new file mode 100644
index 000000000000..da4c5c82e47a
--- /dev/null
+++ b/sys-fs/avfs/avfs-1.0.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="AVFS is a virtual filesystem that allows browsing of compressed files"
+HOMEPAGE="http://sourceforge.net/projects/avf"
+SRC_URI="mirror://sourceforge/avf/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="static-libs +lzma"
+
+RDEPEND=">=sys-fs/fuse-2.4
+ sys-libs/zlib
+ app-arch/bzip2
+ lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ econf \
+ --enable-fuse \
+ --enable-library \
+ --enable-shared \
+ --with-system-zlib \
+ --with-system-bzlib \
+ $(use_enable static-libs static) \
+ $(use_with lzma xz)
+}
+
+src_install() {
+ default
+
+ # remove cruft
+ rm "${D}"/usr/bin/{davpass,ftppass} || die
+
+ # install docs
+ dodoc doc/{api-overview,background,FORMAT,INSTALL.*,README.avfs-fuse}
+ dosym /usr/lib/avfs/extfs/README /usr/share/doc/${PF}/README.extfs
+
+ docinto scripts
+ dodoc scripts/{avfscoda*,*pass}
+
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ einfo "This version of AVFS includes FUSE support. It is user-based."
+ einfo "To execute:"
+ einfo "1) as user, mkdir ~/.avfs"
+ einfo "2) make sure fuse is either compiled into the kernel OR"
+ einfo " modprobe fuse or add to startup."
+ einfo "3) run mountavfs"
+ einfo "To unload daemon, type umountavfs"
+ einfo
+ einfo "READ the documentation! Enjoy :)"
+}
diff --git a/sys-fs/avfs/metadata.xml b/sys-fs/avfs/metadata.xml
new file mode 100644
index 000000000000..26d3015a0b2e
--- /dev/null
+++ b/sys-fs/avfs/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kernel-misc</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>pete4abw@comcast.net</email>
+ <name>Peter Hyman</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">avf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/bashmount/Manifest b/sys-fs/bashmount/Manifest
new file mode 100644
index 000000000000..9d8539f1046c
--- /dev/null
+++ b/sys-fs/bashmount/Manifest
@@ -0,0 +1 @@
+DIST bashmount-3.2.0.tar.gz 18152 SHA256 814ee05cd433cff369da46c199803f5e7990395f0d99480ac6294e07ac2c6850 SHA512 9fd287f67ecb61c9b72d1fc6a5b85b39d48671299585ad456ff3e14cf2304ad540de1462bbf3eafd333ac038cf8a7f2286f5077b896ea88dff570306f7c7d642 WHIRLPOOL d8e5c986156cf2ebdc5a70048d1aa467065412e866879d66fc0adbce10b5580b040bb28dde11f4fe5dc1bc469c8e4b797828df80d40fdc54dddc0294744bfe3b
diff --git a/sys-fs/bashmount/bashmount-3.2.0.ebuild b/sys-fs/bashmount/bashmount-3.2.0.ebuild
new file mode 100644
index 000000000000..3e47fb505f7d
--- /dev/null
+++ b/sys-fs/bashmount/bashmount-3.2.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A bash script that uses udisks to handle removable devices without dependencies on any GUI"
+HOMEPAGE="http://sourceforge.net/projects/bashmount/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# sys-apps/util-linux -> lsblk
+RDEPEND="app-shells/bash
+ sys-apps/dbus
+ sys-apps/util-linux
+ sys-fs/udisks:2
+ virtual/eject"
+DEPEND=""
+
+src_install() {
+ dobin ${PN}
+ insinto /etc
+ doins ${PN}.conf
+ doman ${PN}.1
+ dodoc NEWS
+}
diff --git a/sys-fs/bashmount/metadata.xml b/sys-fs/bashmount/metadata.xml
new file mode 100644
index 000000000000..2e162edbf6a1
--- /dev/null
+++ b/sys-fs/bashmount/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">bashmount</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/bcache-tools/Manifest b/sys-fs/bcache-tools/Manifest
new file mode 100644
index 000000000000..216ceb486d1d
--- /dev/null
+++ b/sys-fs/bcache-tools/Manifest
@@ -0,0 +1,3 @@
+DIST bcache-tools-0_pre20130627.tar.xz 17812 SHA256 aca02134fa3e18b27020e6500a21ff017fecadd3d64acbadc419efccc4abeacc SHA512 b3167ba61560f17ff5d1ac9e8514c9b7b5f02cc97500a5d68885bb4a04f92c50621095c922fdca1f6ff4d79955b3cd77dc42c5cda08525ad32468f8e80a5d85b WHIRLPOOL f9d335555419def9d9d8995a8b1ea7f3df78a23a13a5c818bc4d8d2cecbdd22a7f220e49c72446ea2ffa0eb3d49518dab9b2ff4ab0083df9b3d02537795c9c8d
+DIST bcache-tools-1.0.4.tgz 21683 SHA256 102ffc3a8389180f4b491188c3520f8a4b1a84e5a7ca26d2bd6de1821f4d913d SHA512 d3f325519c67ee43c2f4c690fe666dbba97c9ba06ee091f15ad082fb193895aac322b82843447205ae0eb909a520d93e0ce2dd6207707021e087dedf16d7b273 WHIRLPOOL 2c46e01dee2d8d431d83c6d6797a3fca392970819a795124d452366c12e665fe8e7467375fc537af9ac6b06c8dc650d1009e15d64d109c28d7d27e1c7061c8a1
+DIST bcache-tools-1.0.5.tgz 21934 SHA256 1449294ef545b3dc6f715f7b063bc2c8656984ad73bcd81a0dc048cbba416ea9 SHA512 aaf27e4cc3037d482cb14c8bb083c1ce5cda5641a19cec67ca1ad22cde71ce035e49701145c6d920b4d62058897c4b7d29d341b3b8bd436c9c51e2f8bdb5c568 WHIRLPOOL 7c2dd6919ba7cc7eebab0c90b517cd73ab4b7e02aedf4c998d95681e3feeedf5368fa5edf58a6a3e079fd7ad3ae5040fe6f02c743132f054c7f56fbad9c44f4b
diff --git a/sys-fs/bcache-tools/bcache-tools-0_pre20130627-r1.ebuild b/sys-fs/bcache-tools/bcache-tools-0_pre20130627-r1.ebuild
new file mode 100644
index 000000000000..4d0ddb2ca143
--- /dev/null
+++ b/sys-fs/bcache-tools/bcache-tools-0_pre20130627-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs udev
+
+DESCRIPTION="Tools for bcachefs"
+HOMEPAGE="http://bcache.evilpiepirate.org/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+src_prepare() {
+ tc-export CC
+ sed \
+ -e '/^CFLAGS/d' \
+ -i Makefile || die
+}
+
+src_install() {
+ into /
+ dosbin make-bcache probe-bcache bcache-super-show
+ doman *.8
+
+ insinto /etc/initramfs-tools/hooks/bcache
+ doins initramfs/hook
+
+ udev_dorules 61-bcache.rules
+
+ exeinto $(get_udevdir)
+ doexe bcache-register
+
+ dodoc README
+}
+
+pkg_postinst() {
+ udev_reload
+}
diff --git a/sys-fs/bcache-tools/bcache-tools-1.0.4.ebuild b/sys-fs/bcache-tools/bcache-tools-1.0.4.ebuild
new file mode 100644
index 000000000000..8d4dd2b25e60
--- /dev/null
+++ b/sys-fs/bcache-tools/bcache-tools-1.0.4.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs udev
+
+DESCRIPTION="Tools for bcachefs"
+HOMEPAGE="http://bcache.evilpiepirate.org/"
+SRC_URI="https://github.com/g2p/bcache-tools/archive/v1.0.4.tar.gz -> ${P}.tgz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sys-apps/util-linux-2.24"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ tc-export CC
+ sed \
+ -e '/^CFLAGS/s:-O2::' \
+ -e '/^CFLAGS/s:-g::' \
+ -i Makefile || die
+}
+
+src_install() {
+ into /
+ dosbin make-bcache bcache-super-show
+
+ exeinto $(get_udevdir)
+ doexe bcache-register probe-bcache
+
+ udev_dorules 69-bcache.rules
+
+ insinto /etc/initramfs-tools/hooks/bcache
+ doins initramfs/hook
+
+ # that is what dracut does
+ insinto /usr/lib/dracut/modules.d/90bcache
+ doins dracut/module-setup.sh
+
+ doman *.8
+
+ dodoc README
+}
+
+pkg_postinst() {
+ udev_reload
+}
diff --git a/sys-fs/bcache-tools/bcache-tools-1.0.5.ebuild b/sys-fs/bcache-tools/bcache-tools-1.0.5.ebuild
new file mode 100644
index 000000000000..72946faeecfd
--- /dev/null
+++ b/sys-fs/bcache-tools/bcache-tools-1.0.5.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs udev
+
+DESCRIPTION="Tools for bcachefs"
+HOMEPAGE="http://bcache.evilpiepirate.org/"
+SRC_URI="https://github.com/g2p/bcache-tools/archive/v${PV}.tar.gz -> ${P}.tgz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=sys-apps/util-linux-2.24"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ tc-export CC
+ sed \
+ -e '/^CFLAGS/s:-O2::' \
+ -e '/^CFLAGS/s:-g::' \
+ -i Makefile || die
+}
+
+src_install() {
+ into /
+ dosbin make-bcache bcache-super-show
+
+ exeinto $(get_udevdir)
+ doexe bcache-register probe-bcache
+
+ udev_dorules 69-bcache.rules
+
+ insinto /etc/initramfs-tools/hooks/bcache
+ doins initramfs/hook
+
+ # that is what dracut does
+ insinto /usr/lib/dracut/modules.d/90bcache
+ doins dracut/module-setup.sh
+
+ doman *.8
+
+ dodoc README
+}
+
+pkg_postinst() {
+ udev_reload
+}
diff --git a/sys-fs/bcache-tools/bcache-tools-9999.ebuild b/sys-fs/bcache-tools/bcache-tools-9999.ebuild
new file mode 100644
index 000000000000..ba397f60af14
--- /dev/null
+++ b/sys-fs/bcache-tools/bcache-tools-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+EGIT_NONSHALLOW=true
+
+inherit git-r3 toolchain-funcs udev
+
+DESCRIPTION="Tools for bcachefs"
+HOMEPAGE="http://bcache.evilpiepirate.org/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/g2p/bcache-tools.git"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND=">=sys-apps/util-linux-2.24"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ tc-export CC
+ sed \
+ -e '/^CFLAGS/s:-O2::' \
+ -e '/^CFLAGS/s:-g::' \
+ -i Makefile || die
+}
+
+src_install() {
+ into /
+ dosbin make-bcache bcache-super-show
+
+ exeinto $(get_udevdir)
+ doexe bcache-register probe-bcache
+
+ udev_dorules 69-bcache.rules
+
+ insinto /etc/initramfs-tools/hooks/bcache
+ doins initramfs/hook
+
+ insinto /etc/initcpio/install/bcache
+ doins initcpio/install
+
+ # that is what dracut does
+ insinto /usr/lib/dracut/modules.d/90bcache
+ doins dracut/module-setup.sh
+
+ doman *.8
+
+ dodoc README
+}
+
+pkg_postinst() {
+ udev_reload
+}
diff --git a/sys-fs/bcache-tools/metadata.xml b/sys-fs/bcache-tools/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/sys-fs/bcache-tools/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/bedup/Manifest b/sys-fs/bedup/Manifest
new file mode 100644
index 000000000000..039529ae1354
--- /dev/null
+++ b/sys-fs/bedup/Manifest
@@ -0,0 +1 @@
+DIST bedup-0.9.0_p20140413.tar.gz 48620 SHA256 f9c380074e3f13e42447c04a0fd5c1abca444487cf6ccb6400f09dcca14f90a6 SHA512 9a730dff2b2af239a6386d860881989de50f7a4fb6ae5b402c6dfe828308bbf4ccc2b6f616fdfc2b445fe23fbfcc302163b320813b50fa27940e578b5145345c WHIRLPOOL af4827f4514acc8380f312a72bb3208614f1f529e7373bca3bb610315e0474c9d7c7cbda1338d7019316e708f17ba73e71539092065041df588fd449f7639b54
diff --git a/sys-fs/bedup/bedup-0.9.0_p20140413-r1.ebuild b/sys-fs/bedup/bedup-0.9.0_p20140413-r1.ebuild
new file mode 100644
index 000000000000..8b6e089a104f
--- /dev/null
+++ b/sys-fs/bedup/bedup-0.9.0_p20140413-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="Btrfs file de-duplication tool"
+HOMEPAGE="https://github.com/g2p/bedup"
+SRC_URI="https://github.com/g2p/${PN}/archive/5189e166145b8954ac41883f81ef3c3b50dc96ab.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# we need btrfs-progs with includes installed.
+DEPEND=">=dev-python/cffi-0.5:=[${PYTHON_USEDEP}]
+ >=sys-fs/btrfs-progs-0.20_rc1_p358"
+RDEPEND="${DEPEND}
+ <dev-python/alembic-0.7[${PYTHON_USEDEP}]
+ dev-python/contextlib2[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.8.2[sqlite,${PYTHON_USEDEP}]"
diff --git a/sys-fs/bedup/bedup-9999.ebuild b/sys-fs/bedup/bedup-9999.ebuild
new file mode 100644
index 000000000000..9f4323451a29
--- /dev/null
+++ b/sys-fs/bedup/bedup-9999.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+#if LIVE
+EGIT_REPO_URI="git://github.com/g2p/bedup.git
+ https://github.com/g2p/bedup.git"
+inherit git-r3
+#endif
+
+inherit distutils-r1
+
+DESCRIPTION="Btrfs file de-duplication tool"
+HOMEPAGE="https://github.com/g2p/bedup"
+SRC_URI="https://github.com/g2p/${PN}/archive/v${PV}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# we need btrfs-progs with includes installed.
+DEPEND=">=dev-python/cffi-0.5:=[${PYTHON_USEDEP}]
+ >=sys-fs/btrfs-progs-0.20_rc1_p358"
+RDEPEND="${DEPEND}
+ <dev-python/alembic-0.7[${PYTHON_USEDEP}]
+ dev-python/contextlib2[${PYTHON_USEDEP}]
+ dev-python/pyxdg[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-0.8.2[sqlite,${PYTHON_USEDEP}]"
+
+#if LIVE
+SRC_URI=
+KEYWORDS=
+#endif
diff --git a/sys-fs/bedup/metadata.xml b/sys-fs/bedup/metadata.xml
new file mode 100644
index 000000000000..4882123dbb58
--- /dev/null
+++ b/sys-fs/bedup/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">g2p/bedup</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/bindfs/Manifest b/sys-fs/bindfs/Manifest
new file mode 100644
index 000000000000..c67a6e08967c
--- /dev/null
+++ b/sys-fs/bindfs/Manifest
@@ -0,0 +1,4 @@
+DIST bindfs-1.12.2.tar.gz 349691 SHA256 e0e540ce8adfbb2955e7ac2f86589f913443a8c5425a729acf2a5b7563c39312 SHA512 3cbf0a0b5bd40cc96834cf0df53725ce4e832d2b7a318f149ff6e875726b849bb14cc7730910b4b8a2ac5c9501da64b04cb7bf7b15df87de7dfd08a3f232ec5c WHIRLPOOL 0c81d2ee15ca211bd9b336de257572c4444bfc70649a9dc17f7822c4f2ab282e3434cac66c8469db89ca8f93488fb5ed518dd82d844271cbaec649e98811df42
+DIST bindfs-1.12.3.tar.gz 345458 SHA256 ad3ee6aa6e609f8e0d37dbfaafbd6bdd015b0b2367efd2ecb550e70167d27e0d SHA512 47f4fac85023dc140bca7a39f70637076752a0bd4a0a895caa02c25122d0bd80cbbc366f15e77f2b57dfc465181b5e597e116b83fff3864b8b9b58db95e913ed WHIRLPOOL 8fdad5209f655f9fb684cfa857ca1c0bd7fb49aebad68a7432450821c5e7fb9d1a9d7a5300191f15922b1402a155bf00472d91ee882cec6d35f3d7b42c97bc5c
+DIST bindfs-1.12.5.tar.gz 346292 SHA256 a93b4e306cff3675e760ecd0ec7c4e125b67688aa850ad8a3506b5b73c9ed9dc SHA512 20ccf057cd8ffdefd811c28a6645130a9ccd68b5c4c782fb83d973456b9d60966008bff49b2b644eba948e0625d9af9897a6fb3601b51c9eb5768cf6694065f5 WHIRLPOOL fe237649c715a3588d6095bafb7c3290cd5cfe6c87095ba1e68bee21895a326f89881465d2199572f87f08a61931907fba066804174312099da433b83daf2936
+DIST bindfs-1.12.6.tar.gz 351981 SHA256 a954f8fe4d6193a1ab5db423c10fb33dd0da23eabce41e4379ecee4c6cb02069 SHA512 14fd335a082bc577bb67360a892953d6d059b97b24e6fa74ddc1457ed78f3a546799f3cdea48a37da89dfc06be2ee1f5abafc203f6843269f28a79c7d18093b0 WHIRLPOOL 19582aac090d7b1498f36b305ade6a1433c4156ae9562c197726805030263a5a3b8ab94eb203183e016e61ff75c8d5b492c4356095f624c86ca86eefa137ef3b
diff --git a/sys-fs/bindfs/bindfs-1.12.2.ebuild b/sys-fs/bindfs/bindfs-1.12.2.ebuild
new file mode 100644
index 000000000000..8fcb4dc378ba
--- /dev/null
+++ b/sys-fs/bindfs/bindfs-1.12.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="FUSE filesystem for mounting a directory to another location and altering permissions"
+HOMEPAGE="http://bindfs.org/"
+SRC_URI="http://bindfs.org/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="sys-fs/fuse"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.10.7-cflags.patch
+ epatch "${FILESDIR}"/${PN}-1.12.2-ac-config-headers.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug)
+}
diff --git a/sys-fs/bindfs/bindfs-1.12.3.ebuild b/sys-fs/bindfs/bindfs-1.12.3.ebuild
new file mode 100644
index 000000000000..838dc45d68d6
--- /dev/null
+++ b/sys-fs/bindfs/bindfs-1.12.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="FUSE filesystem for mounting a directory to another location and altering permissions"
+HOMEPAGE="http://bindfs.org/"
+SRC_URI="http://bindfs.org/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND=">=sys-fs/fuse-2.6"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.10.7-cflags.patch
+ epatch "${FILESDIR}"/${PN}-1.12.2-ac-config-headers.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug)
+}
diff --git a/sys-fs/bindfs/bindfs-1.12.5.ebuild b/sys-fs/bindfs/bindfs-1.12.5.ebuild
new file mode 100644
index 000000000000..4e326142a33f
--- /dev/null
+++ b/sys-fs/bindfs/bindfs-1.12.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="FUSE filesystem for mounting a directory to another location and altering permissions"
+HOMEPAGE="http://bindfs.org/"
+SRC_URI="http://bindfs.org/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND=">=sys-fs/fuse-2.6"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.10.7-cflags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug)
+}
diff --git a/sys-fs/bindfs/bindfs-1.12.6.ebuild b/sys-fs/bindfs/bindfs-1.12.6.ebuild
new file mode 100644
index 000000000000..4e326142a33f
--- /dev/null
+++ b/sys-fs/bindfs/bindfs-1.12.6.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils autotools
+
+DESCRIPTION="FUSE filesystem for mounting a directory to another location and altering permissions"
+HOMEPAGE="http://bindfs.org/"
+SRC_URI="http://bindfs.org/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND=">=sys-fs/fuse-2.6"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.10.7-cflags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable debug)
+}
diff --git a/sys-fs/bindfs/files/bindfs-1.10.7-cflags.patch b/sys-fs/bindfs/files/bindfs-1.10.7-cflags.patch
new file mode 100644
index 000000000000..65d1933531c6
--- /dev/null
+++ b/sys-fs/bindfs/files/bindfs-1.10.7-cflags.patch
@@ -0,0 +1,16 @@
+--- bindfs-1.10.7/configure.ac
++++ bindfs-1.10.7/configure.ac
+@@ -15,13 +15,6 @@
+ AC_ARG_WITH([core-foundation],
+ AS_HELP_STRING([--with-core-foundation], [link against Core Foundation (OS X only) @<:@default=no@:>@]))
+
+-
+-if test x"$enable_debug" == "xyes" ; then
+- my_CFLAGS="-g -O0"
+-else
+- my_CFLAGS="-O2"
+-fi
+-
+ if test x"$enable_debug_output" == "xyes" ; then
+ AC_DEFINE([BINDFS_DEBUG], [1], [Define to 1 to enable debugging messages])
+ fi
diff --git a/sys-fs/bindfs/files/bindfs-1.12.2-ac-config-headers.patch b/sys-fs/bindfs/files/bindfs-1.12.2-ac-config-headers.patch
new file mode 100644
index 000000000000..7881102d7b0e
--- /dev/null
+++ b/sys-fs/bindfs/files/bindfs-1.12.2-ac-config-headers.patch
@@ -0,0 +1,25 @@
+From 6f52e8b2b7c77086a9d9c490f67268e8c88fa082 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 1 Oct 2013 23:43:25 +0200
+Subject: [PATCH] Migrate to AC_CONFIG_HEADERS
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 95164ed..2c9e46b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,7 +1,7 @@
+ AC_INIT([bindfs],[1.12.2],[martin.partel@gmail.com])
+
+ AM_INIT_AUTOMAKE([foreign])
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS([config.h])
+
+ AC_PROG_CC
+ AC_LANG(C)
+--
+1.8.2.1
+
diff --git a/sys-fs/bindfs/metadata.xml b/sys-fs/bindfs/metadata.xml
new file mode 100644
index 000000000000..94bb24b79b85
--- /dev/null
+++ b/sys-fs/bindfs/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">bindfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/btrfs-progs/Manifest b/sys-fs/btrfs-progs/Manifest
new file mode 100644
index 000000000000..c4f414568d2c
--- /dev/null
+++ b/sys-fs/btrfs-progs/Manifest
@@ -0,0 +1,9 @@
+DIST btrfs-progs-v3.14.2.tar.xz 275372 SHA256 70e1d0ca887bfa5062dc74cc5d4556c19adb08453fbfa57edae6802d9c917793 SHA512 02f0cf7581b41143707769e53debecfdd3f5a1dd717530c33d4a657b09feafd73bb43408516a58fb6d2754365803018673321c7c1898b81bb36194f05a0d8955 WHIRLPOOL 4561adf84b6570e165be04c8c7b014646f4be11b7f9840a5929103271cb7e121006b515645968f9a4b7cbaf8b0a407c2e74b82b91bd6688b7f58b06fedf70e95
+DIST btrfs-progs-v3.16.2.tar.xz 291604 SHA256 d4d62abe0c2b8e86888f96e4bd21ca7e25c2d53120a3b9e8c6f987344147732b SHA512 7dc0f2f8f0bbddbbf1d4d99854425341c4b3997334c65d7e936bcec1ee5ca880101b8b45498721502857b478edae6237a934c7d4acb735de43c6d8ff35efe53b WHIRLPOOL 19e1fadeefcd40bfecf1b957c37da3387351e1f6cae04add59fd689524338c165e3547b799520e74bacc351ef236eec2481c1043159b58358b77cd74cf3db281
+DIST btrfs-progs-v3.17.3.tar.xz 588424 SHA256 e7bd9ff8d95b515973d3a1255c17fd481bcd75e4420f00c6c9c99489d1ddac2c SHA512 faa9b0d5281f72777d4b64b96774dcb1d6f579fd84e3bac3c256e779bf6fd67ee17aaf8f904dd29a8a8592f504e3e8af0caf1ab261689457a30467d3c1fb6a71 WHIRLPOOL 6ce02a7b078a277b882a2249ea4b628ce7b5dd16572d618b8cb999f88115c84ac30c9c9928525754edd458f86a458c9cf5c1753cb293c49e0d000795fae31604
+DIST btrfs-progs-v3.18.2.tar.xz 1029228 SHA256 dd8ddb4d201e5ffd32a15ed0e1f33fbc2c8fb16383f1519a9fae136698c2dfec SHA512 7fd125eeedabd54178f5198ac09c364b6772125124adcdb2620515a51c331307205ae06ff81375a49ebc62650d537c6f9eed2b63bf1f7e97b9ff047cda8a2cc4 WHIRLPOOL e5df056188abc2f57941b92be2774208fd1409f580c9604242f81aeda78f4be6d95f4cacfcf39917db363a033fb3b11f1eb864c15cccf24491fc1b660fce3803
+DIST btrfs-progs-v3.19.1.tar.xz 1101168 SHA256 248862a7e7e06188bb495bbaa05d3e0e34628b61a10ef03234b3b00698ce88db SHA512 c8b1c348afe3e32f54a72fcf361700bd63c12272e34ab34774936a2eca338dbea568d452f494d6ddd3c7be75b37a6d400fec33500548ed9b6df008212613d7f5 WHIRLPOOL 75bb08fe5ab49711f264d6cd35ddac39ea722ef2bcd57c53ad0d483cdf329b1b1b89c0b70280dea161568fd78c44eae30c76fb574ee649200237a13b3df1d8d4
+DIST btrfs-progs-v4.0.1.tar.xz 1104340 SHA256 2c2e10e79edd16a92effe8619c527fd130bc272fbca67896e1705bb2ec0293cb SHA512 52e5165f2fdd0f27f9c2f099b774523c36ab442948a13ede03736297a139903af4c0c444c77abc14b05f3cf633b006eb9dbc29f2b127858698ee1b6ad517a53f WHIRLPOOL ad8d2280c9205537a1045a835bffb39d73684fea87841215cd0916fdc91285aa299dc5885446b3c3aa50fcc2ab562a4b58a33cc9537ede3f57df4bc566aacb47
+DIST btrfs-progs-v4.0.tar.xz 1102500 SHA256 179cf1acc1b0061548b8f1d9cf973a8338bf96f192cecad99ecdace9ae065a1f SHA512 895d6c27bd82c4b320c705c32613b28e601f316c0881080d8c376d0045162eaab6c91431dee73b391fc608e6d7c16f3a744ef6b9c85adb4beaa4376fbbe36d9a WHIRLPOOL cf71cc4ab6c85e8673143bb779c7b252caf1bfabc14fb2d7dd3477bd842b491ac3d7f121c3dcbecec023c5873c4b4400a5f2087e55bbee14217982f9712d5c2f
+DIST btrfs-progs-v4.1.2.tar.xz 1123080 SHA256 62db60c6a0868afb6302112cea54c756873bc30b826696b167ec03ecd61b2f12 SHA512 dd159bcc3adb65efd4f612d75f5a6b30df8ad9fa06ef952dd03dac965256de37eab26f4cc2fb3840178403ccbb7368cae11638e27eadb9b1835b636c4b126e2e WHIRLPOOL 819e6d61ecbb0f2d099abcda70ae9ab53b3311a28131fdedbbad7cc033c4984309a460f704d2f2ce7cf36cf0e034e82618c1b45002fdfbb5eced648883e12a29
+DIST btrfs-progs-v4.1.tar.xz 1119564 SHA256 abc6ff9dbbf948e7358edd34db32103cba8b86c5cb9e3ed7eb3b5630e2feb7e8 SHA512 0c596bab3276d1dc6de010ce94a1d7758c80fe21d540b2d4b3487e0a5cf0a63b27fdba3e1af42aa349447a0be459f2087f9b4ae03fdc0dfcc4f316e570893346 WHIRLPOOL 97ae77f578f162ec114e137899f195ec0e28097902e2f2ae5e1f37db359cd6c1bae2f0fb6641b0365df80defb844d58603623db27dc63c1576437efcaf19d3e6
diff --git a/sys-fs/btrfs-progs/btrfs-progs-3.14.2.ebuild b/sys-fs/btrfs-progs/btrfs-progs-3.14.2.ebuild
new file mode 100644
index 000000000000..3b97509798db
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-3.14.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha amd64 arm ~ia64 ~mips ppc ppc64 ~sparc x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/mason/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ inherit git-2
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE=""
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ sys-fs/e2fsprogs:0=
+"
+DEPEND="${RDEPEND}
+ sys-apps/acl
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.14.2-install-man.patch"
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ BUILD_VERBOSE=1
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ bindir=/sbin \
+ libdir=/usr/$(get_libdir) \
+ mandir=/usr/share/man
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-3.16.2.ebuild b/sys-fs/btrfs-progs/btrfs-progs-3.16.2.ebuild
new file mode 100644
index 000000000000..f0ff067c0de1
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-3.16.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE=""
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ sys-fs/e2fsprogs:0=
+"
+DEPEND="${RDEPEND}
+ sys-apps/acl
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ BUILD_VERBOSE=1
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ bindir=/sbin \
+ libdir=/usr/$(get_libdir) \
+ mandir=/usr/share/man
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-3.17.3.ebuild b/sys-fs/btrfs-progs/btrfs-progs-3.17.3.ebuild
new file mode 100644
index 000000000000..ea08de43e2de
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-3.17.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE=""
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ sys-fs/e2fsprogs:0=
+"
+DEPEND="${RDEPEND}
+ sys-apps/acl
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ BUILD_VERBOSE=1
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ bindir=/sbin \
+ libdir=/usr/$(get_libdir) \
+ mandir=/usr/share/man
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-3.18.2.ebuild b/sys-fs/btrfs-progs/btrfs-progs-3.18.2.ebuild
new file mode 100644
index 000000000000..8ef9a0298c0d
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-3.18.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ inherit git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE=""
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ sys-fs/e2fsprogs:0=
+"
+DEPEND="${RDEPEND}
+ sys-apps/acl
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ emake \
+ AR="$(tc-getAR)" \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ BUILD_VERBOSE=1
+}
+
+src_install() {
+ emake install \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ bindir=/sbin \
+ libdir=/usr/$(get_libdir) \
+ mandir=/usr/share/man
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-3.19.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-3.19.1.ebuild
new file mode 100644
index 000000000000..1d85858c9f6b
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-3.19.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:0=
+ sys-libs/e2fsprogs-libs:0=
+ )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+src_prepare() {
+ epatch_user
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable elibc_glibc backtrace)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ newbashcomp btrfs-completion btrfs
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.0.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.0.1.ebuild
new file mode 100644
index 000000000000..0bf8aaa7fe87
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-4.0.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha amd64 arm ~arm64 ~ia64 ~mips ppc ~ppc64 ~sparc x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:0=
+ sys-libs/e2fsprogs-libs:0=
+ )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+src_prepare() {
+ epatch_user
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable elibc_glibc backtrace)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ newbashcomp btrfs-completion btrfs
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.0.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.0.ebuild
new file mode 100644
index 000000000000..1d85858c9f6b
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-4.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:0=
+ sys-libs/e2fsprogs-libs:0=
+ )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+src_prepare() {
+ epatch_user
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable elibc_glibc backtrace)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ newbashcomp btrfs-completion btrfs
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.1.2.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.1.2.ebuild
new file mode 100644
index 000000000000..4f0cc37e6ccd
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-4.1.2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+ EGIT_BRANCH="devel"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:0=
+ sys-libs/e2fsprogs-libs:0=
+ )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+src_prepare() {
+ epatch_user
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable elibc_glibc backtrace)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ newbashcomp btrfs-completion btrfs
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.1.ebuild
new file mode 100644
index 000000000000..4f0cc37e6ccd
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-4.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+ EGIT_BRANCH="devel"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:0=
+ sys-libs/e2fsprogs-libs:0=
+ )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+src_prepare() {
+ epatch_user
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable elibc_glibc backtrace)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ newbashcomp btrfs-completion btrfs
+}
diff --git a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
new file mode 100644
index 000000000000..4f0cc37e6ccd
--- /dev/null
+++ b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1 eutils multilib toolchain-funcs
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV=v${PV}
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}"/${PN}-${MY_PV}
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
+ https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git"
+ EGIT_BRANCH="devel"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:0=
+ sys-libs/e2fsprogs-libs:0=
+ )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ app-text/asciidoc
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+src_prepare() {
+ epatch_user
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable elibc_glibc backtrace)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ default
+ newbashcomp btrfs-completion btrfs
+}
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch
new file mode 100644
index 000000000000..e326f34af7e3
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-convert-remove-used-space-update.patch
@@ -0,0 +1,30 @@
+--- /var/tmp/portage/sys-fs/btrfs-progs-0.19/work/btrfs-progs-0.19/convert.c 2009-06-11 10:56:15.000000000 -0600
++++ btrfs-progs-unstable/convert.c 2009-09-21 08:51:43.773575874 -0600
+@@ -370,7 +370,6 @@
+ struct btrfs_extent_item *ei;
+ u32 blocksize = root->sectorsize;
+ u64 nbytes;
+- u64 bytes_used;
+
+ if (disk_bytenr == 0) {
+ ret = btrfs_insert_file_extent(trans, root, objectid,
+@@ -432,9 +431,6 @@
+ nbytes = btrfs_stack_inode_nbytes(inode) + num_bytes;
+ btrfs_set_stack_inode_nbytes(inode, nbytes);
+
+- bytes_used = btrfs_root_used(&root->root_item);
+- btrfs_set_root_used(&root->root_item, bytes_used + num_bytes);
+-
+ btrfs_release_path(root, &path);
+
+ ins_key.objectid = disk_bytenr;
+@@ -454,9 +450,6 @@
+
+ btrfs_mark_buffer_dirty(leaf);
+
+- bytes_used = btrfs_super_bytes_used(&info->super_copy);
+- btrfs_set_super_bytes_used(&info->super_copy, bytes_used +
+- num_bytes);
+ ret = btrfs_update_block_group(trans, root, disk_bytenr,
+ num_bytes, 1, 0);
+ if (ret)
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch
new file mode 100644
index 000000000000..38a0a18dbc61
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-fix-underlinking.patch
@@ -0,0 +1,11 @@
+--- btrfs-progs-0.19/Makefile~ 2011-06-05 10:21:04.000000000 -0600
++++ btrfs-progs-0.19/Makefile 2011-06-05 10:21:46.000000000 -0600
+@@ -75,7 +75,7 @@ quick-test: $(objects) quick-test.o
+ gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS)
+
+ convert: $(objects) convert.o
+- gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS)
++ gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs -lcom_err $(LDFLAGS) $(LIBS)
+
+ ioctl-test: $(objects) ioctl-test.o
+ gcc $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch
new file mode 100644
index 000000000000..183fe2af3ea3
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-0.19-glibc212.patch
@@ -0,0 +1,17 @@
+btrfsck.o: In function `maybe_free_inode_rec':
+btrfsck.c:(.text+0xce6): undefined reference to `S_ISDIR'
+btrfsck.c:(.text+0xd13): undefined reference to `S_ISREG'
+btrfsck.c:(.text+0xdc7): undefined reference to `S_ISREG'
+btrfsck.c:(.text+0xe2e): undefined reference to `S_ISLNK'
+btrfsck.c:(.text+0xe5b): undefined reference to `S_ISLNK'
+
+--- btrfsck.c
++++ btrfsck.c
+@@ -21,6 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
++#include <sys/stat.h>
+ #include "kerncompat.h"
+ #include "ctree.h"
+ #include "disk-io.h"
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch
new file mode 100644
index 000000000000..e2feb0bdbefa
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-defrag-sockets.patch
@@ -0,0 +1,78 @@
+From: Pascal VITOUX <vitoux.pascal@gmail.com>
+To: linux-btrfs@vger.kernel.org
+Cc: Pascal VITOUX <vitoux.pascal@gmail.com>
+Subject: [PATCH] btrfs-progs: skip non-regular files while defragmenting
+Date: Thu, 9 Jan 2014 23:47:14 +0100
+Message-Id: <1389307634-8226-1-git-send-email-vitoux.pascal@gmail.com>
+X-Mailer: git-send-email 1.8.5.2
+Sender: linux-btrfs-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-btrfs.vger.kernel.org>
+X-Mailing-List: linux-btrfs@vger.kernel.org
+
+Skip non-regular files to avoid ioctl errors while defragmenting.
+
+They are silently ignored in recursive mode but reported as errors when
+used as command-line arguments.
+
+Signed-off-by: Pascal VITOUX <vitoux.pascal@gmail.com>
+Gentoo-bug: https://bugs.gentoo.org/503514
+Reported-by: Antoine Lemoine
+---
+ cmds-filesystem.c | 26 ++++++++++++++++----------
+ 1 file changed, 16 insertions(+), 10 deletions(-)
+
+diff --git a/cmds-filesystem.c b/cmds-filesystem.c
+index 1c1926b..54fba10 100644
+--- a/cmds-filesystem.c
++++ b/cmds-filesystem.c
+@@ -646,7 +646,7 @@ static int defrag_callback(const char *fpath, const struct stat *sb,
+ int e = 0;
+ int fd = 0;
+
+- if (typeflag == FTW_F) {
++ if ((typeflag == FTW_F) && S_ISREG(sb->st_mode)) {
+ if (defrag_global_verbose)
+ printf("%s\n", fpath);
+ fd = open(fpath, O_RDWR);
+@@ -748,6 +748,7 @@ static int cmd_defrag(int argc, char **argv)
+ defrag_global_range.flags |= BTRFS_DEFRAG_RANGE_START_IO;
+
+ for (i = optind; i < argc; i++) {
++ struct stat st;
+ dirstream = NULL;
+ fd = open_file_or_dir(argv[i], &dirstream);
+ if (fd < 0) {
+@@ -757,16 +758,21 @@ static int cmd_defrag(int argc, char **argv)
+ close_file_or_dir(fd, dirstream);
+ continue;
+ }
++ if (fstat(fd, &st)) {
++ fprintf(stderr, "ERROR: failed to stat %s - %s\n",
++ argv[i], strerror(errno));
++ defrag_global_errors++;
++ close_file_or_dir(fd, dirstream);
++ continue;
++ }
++ if (!(S_ISDIR(st.st_mode) || S_ISREG(st.st_mode))) {
++ fprintf(stderr, "ERROR: %s is not a directory or a regular "
++ "file.\n", argv[i]);
++ defrag_global_errors++;
++ close_file_or_dir(fd, dirstream);
++ continue;
++ }
+ if (recursive) {
+- struct stat st;
+-
+- if (fstat(fd, &st)) {
+- fprintf(stderr, "ERROR: failed to stat %s - %s\n",
+- argv[i], strerror(errno));
+- defrag_global_errors++;
+- close_file_or_dir(fd, dirstream);
+- continue;
+- }
+ if (S_ISDIR(st.st_mode)) {
+ ret = nftw(argv[i], defrag_callback, 10,
+ FTW_MOUNT | FTW_PHYS);
+--
+1.8.5.2
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch
new file mode 100644
index 000000000000..8a2cc7883a14
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.12-fix-send-subvol-492776.patch
@@ -0,0 +1,111 @@
+Gentoo-bug: http://bugs.gentoo.org/492776
+
+From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
+
+Steps to reproduce:
+ # mkfs.btrfs -f /dev/sda
+ # mount /dev/sda /mnt
+ # btrfs subvolume create /mnt/foo
+ # umount /mnt
+ # mount -o subvol=foo /dev/sda /mnt
+ # btrfs sub snapshot -r /mnt /mnt/snap
+ # btrfs send /mnt/snap > /dev/null
+
+We will fail to send '/mnt/snap',this is because btrfs send try to
+open '/mnt/snap' by btrfs internal subvolume path 'foo/snap' rather
+than relative path based on mounted point, this will return us 'no
+such file or directory',this is not right, fix it.
+
+Reported-by: Thomas Scheiblauer <tom@sharkbay.at>
+Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
+---
+v1->v2:
+ code cleanups(thanks to Stefan)
+---
+ cmds-send.c | 34 ++++++----------------------------
+ 1 file changed, 6 insertions(+), 28 deletions(-)
+
+diff --git a/cmds-send.c b/cmds-send.c
+index 53e9a53..6fdfd7f 100644
+--- a/cmds-send.c
++++ b/cmds-send.c
+@@ -282,31 +282,21 @@ out:
+ return ERR_PTR(ret);
+ }
+
+-static int do_send(struct btrfs_send *send, u64 root_id, u64 parent_root_id,
+- int is_first_subvol, int is_last_subvol)
++static int do_send(struct btrfs_send *send, u64 parent_root_id,
++ int is_first_subvol, int is_last_subvol, char *subvol)
+ {
+ int ret;
+ pthread_t t_read;
+ pthread_attr_t t_attr;
+ struct btrfs_ioctl_send_args io_send;
+- struct subvol_info *si;
+ void *t_err = NULL;
+ int subvol_fd = -1;
+ int pipefd[2] = {-1, -1};
+
+- si = subvol_uuid_search(&send->sus, root_id, NULL, 0, NULL,
+- subvol_search_by_root_id);
+- if (!si) {
+- ret = -ENOENT;
+- fprintf(stderr, "ERROR: could not find subvol info for %llu",
+- root_id);
+- goto out;
+- }
+-
+- subvol_fd = openat(send->mnt_fd, si->path, O_RDONLY | O_NOATIME);
++ subvol_fd = openat(send->mnt_fd, subvol, O_RDONLY | O_NOATIME);
+ if (subvol_fd < 0) {
+ ret = -errno;
+- fprintf(stderr, "ERROR: open %s failed. %s\n", si->path,
++ fprintf(stderr, "ERROR: open %s failed. %s\n", subvol,
+ strerror(-ret));
+ goto out;
+ }
+@@ -385,10 +375,6 @@ out:
+ close(pipefd[0]);
+ if (pipefd[1] != -1)
+ close(pipefd[1]);
+- if (si) {
+- free(si->path);
+- free(si);
+- }
+ return ret;
+ }
+
+@@ -664,14 +650,6 @@ int cmd_send(int argc, char **argv)
+ goto out;
+ }
+
+- ret = get_root_id(&send, get_subvol_name(send.root_path, subvol),
+- &root_id);
+- if (ret < 0) {
+- fprintf(stderr, "ERROR: could not resolve root_id "
+- "for %s\n", subvol);
+- goto out;
+- }
+-
+ if (!full_send && !parent_root_id) {
+ ret = find_good_parent(&send, root_id, &parent_root_id);
+ if (ret < 0) {
+@@ -700,8 +678,8 @@ int cmd_send(int argc, char **argv)
+ is_first_subvol = 1;
+ is_last_subvol = 1;
+ }
+- ret = do_send(&send, root_id, parent_root_id,
+- is_first_subvol, is_last_subvol);
++ ret = do_send(&send, parent_root_id, is_first_subvol,
++ is_last_subvol, subvol);
+ if (ret < 0)
+ goto out;
+
+--
+1.8.4
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch
new file mode 100644
index 000000000000..a9cced815b21
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.1-arg_strtou64.patch
@@ -0,0 +1,146 @@
+From: David Sterba <dsterba@suse.cz>
+To: linux-btrfs@vger.kernel.org
+Subject: [PATCH v2] btrfs-progs: move arg_strtou64 to a separate file for library
+Date: Tue, 22 Apr 2014 17:49:01 +0200
+
+Linking with libbtrfs fails because arg_strtou64 is not defined and we
+cannot just add utils.o to library objects because it's not
+library-clean.
+
+Reported-by: Arvin Schnell <aschnell@suse.com>
+Reported-by: Anton Farygin <rider@altlinux.org>
+Signed-off-by: David Sterba <dsterba@suse.cz>
+---
+
+v2: (thanks to Hugo)
+- added missing line from comment
+- fixed typo
+- reformated comment paragraphs
+
+ Makefile | 5 +++--
+ utils-lib.c | 42 ++++++++++++++++++++++++++++++++++++++++++
+ utils.c | 33 ---------------------------------
+ 3 files changed, 45 insertions(+), 35 deletions(-)
+ create mode 100644 utils-lib.c
+
+diff --git a/Makefile b/Makefile
+index 51d53fadf5af..76565e8b2307 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,14 +9,15 @@ CFLAGS = -g -O1 -fno-strict-aliasing
+ objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
+ root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \
+ extent-cache.o extent_io.o volumes.o utils.o repair.o \
+- qgroup.o raid6.o free-space-cache.o list_sort.o props.o
++ qgroup.o raid6.o free-space-cache.o list_sort.o props.o \
++ utils-lib.o
+ cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
+ cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
+ cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
+ cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \
+ cmds-property.o
+ libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o \
+- uuid-tree.o
++ uuid-tree.o utils-lib.o
+ libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
+ crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \
+ extent_io.h ioctl.h ctree.h btrfsck.h
+diff --git a/utils-lib.c b/utils-lib.c
+new file mode 100644
+index 000000000000..9d53c6e5c710
+--- /dev/null
++++ b/utils-lib.c
+@@ -0,0 +1,42 @@
++#define _GNU_SOURCE
++
++#include "kerncompat.h"
++#include <unistd.h>
++#include <stdlib.h>
++#include <limits.h>
++
++#if BTRFS_FLAT_INCLUDES
++#else
++#endif /* BTRFS_FLAT_INCLUDES */
++
++/*
++ * This function should be only used when parsing command arg, it won't return
++ * error to its caller and rather exit directly just like usage().
++ */
++u64 arg_strtou64(const char *str)
++{
++ u64 value;
++ char *ptr_parse_end = NULL;
++
++ value = strtoull(str, &ptr_parse_end, 0);
++ if (ptr_parse_end && *ptr_parse_end != '\0') {
++ fprintf(stderr, "ERROR: %s is not a valid numeric value.\n",
++ str);
++ exit(1);
++ }
++
++ /*
++ * if we pass a negative number to strtoull, it will return an
++ * unexpected number to us, so let's do the check ourselves.
++ */
++ if (str[0] == '-') {
++ fprintf(stderr, "ERROR: %s: negative value is invalid.\n",
++ str);
++ exit(1);
++ }
++ if (value == ULLONG_MAX) {
++ fprintf(stderr, "ERROR: %s is too large.\n", str);
++ exit(1);
++ }
++ return value;
++}
+diff --git a/utils.c b/utils.c
+index 29953d9dd2a9..e130849c7bb5 100644
+--- a/utils.c
++++ b/utils.c
+@@ -1538,39 +1538,6 @@ scan_again:
+ return 0;
+ }
+
+-/*
+- * This function should be only used when parsing
+- * command arg, it won't return error to it's
+- * caller and rather exit directly just like usage().
+- */
+-u64 arg_strtou64(const char *str)
+-{
+- u64 value;
+- char *ptr_parse_end = NULL;
+-
+- value = strtoull(str, &ptr_parse_end, 0);
+- if (ptr_parse_end && *ptr_parse_end != '\0') {
+- fprintf(stderr, "ERROR: %s is not a valid numeric value.\n",
+- str);
+- exit(1);
+- }
+- /*
+- * if we pass a negative number to strtoull,
+- * it will return an unexpected number to us,
+- * so let's do the check ourselves.
+- */
+- if (str[0] == '-') {
+- fprintf(stderr, "ERROR: %s: negative value is invalid.\n",
+- str);
+- exit(1);
+- }
+- if (value == ULLONG_MAX) {
+- fprintf(stderr, "ERROR: %s is too large.\n", str);
+- exit(1);
+- }
+- return value;
+-}
+-
+ u64 parse_size(char *s)
+ {
+ int i;
+--
+1.9.0
+
+--
+To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch
new file mode 100644
index 000000000000..69e36aaadeba
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-3.14.2-install-man.patch
@@ -0,0 +1,13 @@
+diff --git a/Documentation/Makefile b/Documentation/Makefile
+index 034559e..f461bf2 100644
+--- a/Documentation/Makefile
++++ b/Documentation/Makefile
+@@ -75,7 +75,7 @@ install: install-man
+ install-man: man
+ $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir)
+ $(INSTALL) -m 644 $(GZ_MAN8) $(DESTDIR)$(man8dir)
+- $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir)
++ $(LNS) btrfs-check.8.gz $(DESTDIR)$(man8dir)/btrfsck.8.gz
+
+ clean:
+ $(RM) *.xml *.xml+ *.8 *.8.gz
diff --git a/sys-fs/btrfs-progs/metadata.xml b/sys-fs/btrfs-progs/metadata.xml
new file mode 100644
index 000000000000..99f2c6f7db29
--- /dev/null
+++ b/sys-fs/btrfs-progs/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <maintainer>
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <use>
+ <flag name='convert'>Build ext2 conversion utility (btrfs-convert)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-fs/cachefilesd/Manifest b/sys-fs/cachefilesd/Manifest
new file mode 100644
index 000000000000..f6edcf0f5961
--- /dev/null
+++ b/sys-fs/cachefilesd/Manifest
@@ -0,0 +1 @@
+DIST cachefilesd-0.10.5.tar 112640 SHA256 125ea4f6aef4bf8e936a7cc747b59e074537a8aed74cd1bab3f05d7fbc47287f SHA512 996e47de40cff4d2c0d265689ef3a33aee6ef0d0432a03d7428133c091e77b0e099bd1346b5638bf2d9df6bb47bce519491b420d5916a3211c4e04e158ad92e8 WHIRLPOOL fad173739c307629ffef091a0cad890ee9bb3b133471de1fe9bb43cc06ee46a051fdb97262f9380a8133fb49cd87b9cbd3ee71205867046bd361f890c2645f1e
diff --git a/sys-fs/cachefilesd/cachefilesd-0.10.5-r4.ebuild b/sys-fs/cachefilesd/cachefilesd-0.10.5-r4.ebuild
new file mode 100644
index 000000000000..066f4146a5b4
--- /dev/null
+++ b/sys-fs/cachefilesd/cachefilesd-0.10.5-r4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="Provides a caching directory on an already mounted filesystem"
+HOMEPAGE="http://people.redhat.com/~dhowells/fscache/"
+SRC_URI="http://people.redhat.com/~dhowells/fscache/${P}.tar.bz2 -> ${P}.tar"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE="doc selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-cachefilesd )"
+DEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/0.10.4-makefile.patch
+ tc-export CC
+ if ! use selinux; then
+ sed -e '/^secctx/s:^:#:g' -i cachefilesd.conf || die
+ fi
+
+ append-flags -fpie
+}
+
+src_install() {
+ default
+
+ if use selinux; then
+ insinto /usr/share/doc/${P}
+ doins -r selinux
+ fi
+
+ dodoc howto.txt
+
+ newconfd "${FILESDIR}"/cachefilesd.conf ${PN}
+ newinitd "${FILESDIR}"/cachefilesd-3.init ${PN}
+
+ systemd_dounit ${PN}.service
+ systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d ${PN}.conf
+}
+
+pkg_postinst() {
+ [[ -d /var/cache/fscache ]] && return
+ elog "Before CacheFiles can be used, a directory for local storage"
+ elog "must be created. The default configuration of /etc/cachefilesd.conf"
+ elog "uses /var/cache/fscache. The filesystem mounted there must support"
+ elog "extended attributes (mount -o user_xattr)."
+ echo ""
+ elog "Once that is taken care of, start the daemon, add -o ...,fsc"
+ elog "to the mount options of your network mounts, and let it fly!"
+}
diff --git a/sys-fs/cachefilesd/files/0.10.1-makefile.patch b/sys-fs/cachefilesd/files/0.10.1-makefile.patch
new file mode 100644
index 000000000000..af029c9293a3
--- /dev/null
+++ b/sys-fs/cachefilesd/files/0.10.1-makefile.patch
@@ -0,0 +1,21 @@
+diff --git a/Makefile b/Makefile
+index 15a8445..d650f47 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-CFLAGS := -g -O2 -Wall
+ INSTALL := install
+ DESTDIR :=
+ BUILDFOR :=
+@@ -21,7 +20,10 @@ endif
+ #
+ all: cachefilesd
+
+-cachefilesd: cachefilesd.c Makefile
++cachefilesd.o: cachefilesd.c
++ $(CC) $(CFLAGS) -c $<
++
++cachefilesd: cachefilesd.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ #
diff --git a/sys-fs/cachefilesd/files/0.10.4-makefile.patch b/sys-fs/cachefilesd/files/0.10.4-makefile.patch
new file mode 100644
index 000000000000..5cbb24001c95
--- /dev/null
+++ b/sys-fs/cachefilesd/files/0.10.4-makefile.patch
@@ -0,0 +1,24 @@
+ Makefile | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index d5d352e..9a98bf5 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,3 @@
+-CFLAGS := -g -O2 -Wall
+ INSTALL := install
+ DESTDIR :=
+ ETCDIR := /etc
+@@ -38,7 +37,10 @@ endif
+ ###############################################################################
+ all: cachefilesd
+
+-cachefilesd: cachefilesd.c Makefile
++cachefilesd.o: cachefilesd.c
++ $(CC) $(CFLAGS) -c $<
++
++cachefilesd: cachefilesd.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ ###############################################################################
diff --git a/sys-fs/cachefilesd/files/cachefilesd-2.init b/sys-fs/cachefilesd/files/cachefilesd-2.init
new file mode 100644
index 000000000000..afc7fc5a0ab6
--- /dev/null
+++ b/sys-fs/cachefilesd/files/cachefilesd-2.init
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ use logger
+ before nfsmount
+}
+
+checkxattr() {
+ local testpath testfile ret
+ # SELinux requires xattrs, so we can assume things work already
+ [ -f /sys/fs/selinux/status ] && return 0;
+ testpath=$(awk '/^[[:space:]]*dir/ {print $2}' /etc/cachefilesd.conf)
+ testfile="${testpath}/.tmp-xattr-test.cachefilesd"
+ touch "${testfile}"
+ # creates a file in the testpath and tries to set an attribute on it to check
+ # if the support is available
+ attr -s test -V xattr "${testfile}" 2>&1 > /dev/null
+ ret=$?
+ rm -f "${testfile}"
+ [ ${ret} -ne 0 ] && eerror "xattr support missing on the ${testpath} filesystem"
+ return ${ret}
+}
+
+start() {
+ ebegin "Starting cachefilesd"
+ checkxattr || return $?
+ # check if the cachefiles modules is loaded (or builtin)
+ if [ ! -c /dev/cachefiles ] ; then
+ local ret
+ einfo "/dev/cachefiles doesn't exist, trying to modprobe cachefiles"
+ modprobe cachefiles
+ ret=$?
+ if [ $ret -ne 0 ] ; then
+ eerror "cachefiles modules cannot be loaded so cachefilesd "
+ eerror "cannot be started, aborting. Did you build fscache in your "
+ eerror "kernel? Note that you need a 2.6.30 or better kernel"
+ return $ret
+ fi
+ fi
+ start-stop-daemon --start --pidfile /var/run/cachefilesd.pid --exec /sbin/cachefilesd -- ${OPTIONS}
+ eend $? "Failed to start cachefilesd. Check the system log to see the error"
+
+}
+
+stop() {
+ ebegin "Stopping cachefilesd"
+ start-stop-daemon --stop --exec /sbin/cachefilesd --pidfile /var/run/cachefilesd.pid
+ eend $? "Failed to stop cachefilesd"
+}
+
diff --git a/sys-fs/cachefilesd/files/cachefilesd-3.init b/sys-fs/cachefilesd/files/cachefilesd-3.init
new file mode 100644
index 000000000000..b21c56e6e9ab
--- /dev/null
+++ b/sys-fs/cachefilesd/files/cachefilesd-3.init
@@ -0,0 +1,56 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ use logger
+ before nfsmount
+}
+
+checkxattr() {
+ local testpath testfile ret
+ # SELinux requires xattrs, so we can assume things work already
+ [ -f /sys/fs/selinux/status ] && return 0;
+ testpath=$(awk '/^[[:space:]]*dir/ {print $2}' /etc/cachefilesd.conf)
+ checkpath -d "${testpath}"
+ testfile="${testpath}/.tmp-xattr-test.cachefilesd"
+ touch "${testfile}"
+ # creates a file in the testpath and tries to set an attribute on it to check
+ # if the support is available
+ attr -s test -V xattr "${testfile}" 2>&1 > /dev/null
+ ret=$?
+ rm -f "${testfile}"
+ [ ${ret} -ne 0 ] && eerror "xattr support missing on the ${testpath} filesystem"
+ return ${ret}
+}
+
+start() {
+ ebegin "Starting cachefilesd"
+ checkxattr || return $?
+ # check if the cachefiles modules is loaded (or builtin)
+ if [ ! -c /dev/cachefiles ] ; then
+ local ret
+ einfo "/dev/cachefiles doesn't exist, trying to modprobe cachefiles"
+ modprobe cachefiles
+ ret=$?
+ if [ $ret -ne 0 ] ; then
+ eerror "cachefiles modules cannot be loaded so cachefilesd "
+ eerror "cannot be started, aborting. Did you build fscache in your "
+ eerror "kernel? Note that you need a 2.6.30 or better kernel"
+ return $ret
+ fi
+ fi
+
+ start-stop-daemon --start --pidfile /run/cachefilesd.pid --exec /sbin/cachefilesd -- ${OPTIONS}
+ eend $? "Failed to start cachefilesd. Check the system log to see the error"
+
+}
+
+stop() {
+ ebegin "Stopping cachefilesd"
+ start-stop-daemon --stop --exec /sbin/cachefilesd --pidfile /run/cachefilesd.pid
+ eend $? "Failed to stop cachefilesd"
+}
+
diff --git a/sys-fs/cachefilesd/files/cachefilesd-tmpfiles.d b/sys-fs/cachefilesd/files/cachefilesd-tmpfiles.d
new file mode 100644
index 000000000000..11da15afd7f0
--- /dev/null
+++ b/sys-fs/cachefilesd/files/cachefilesd-tmpfiles.d
@@ -0,0 +1 @@
+d /var/cache/fscache 0755 - - -
diff --git a/sys-fs/cachefilesd/files/cachefilesd.conf b/sys-fs/cachefilesd/files/cachefilesd.conf
new file mode 100644
index 000000000000..f91d40381545
--- /dev/null
+++ b/sys-fs/cachefilesd/files/cachefilesd.conf
@@ -0,0 +1,8 @@
+# Config file for /etc/init.d/cachefilesd
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# -d - This can be specified multiple times.
+# -f <configfile> - Read the specified configuration file instead of /etc/cachefiles.conf
+OPTIONS=""
diff --git a/sys-fs/cachefilesd/files/cachefilesd.init b/sys-fs/cachefilesd/files/cachefilesd.init
new file mode 100644
index 000000000000..93090ef2afbc
--- /dev/null
+++ b/sys-fs/cachefilesd/files/cachefilesd.init
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+ use logger
+ before nfsmount
+}
+
+checkxattr() {
+ local testpath testfile ret
+ testpath=$(awk '/^[[:space:]]*dir/ {print $2}' /etc/cachefilesd.conf)
+ testfile="${testpath}/.tmp-xattr-test.cachefilesd"
+ touch "${testfile}"
+ # creates a file in the testpath and tries to set an attribute on it to check
+ # if the support is available
+ attr -s test -V xattr "${testfile}" 2>&1 > /dev/null
+ ret=$?
+ rm -f "${testfile}"
+ [ ${ret} -ne 0 ] && eerror "xattr support missing on the ${testpath} filesystem"
+ return ${ret}
+}
+
+start() {
+ ebegin "Starting cachefilesd"
+ checkxattr || return $?
+ # check if the cachefiles modules is loaded (or builtin)
+ if [ ! -c /dev/cachefiles ] ; then
+ local ret
+ einfo "/dev/cachefiles doesn't exist, trying to modprobe cachefiles"
+ modprobe cachefiles
+ ret=$?
+ if [ $ret -ne 0 ] ; then
+ eerror "cachefiles modules cannot be loaded so cachefilesd "
+ eerror "cannot be started, aborting. Did you build fscache in your "
+ eerror "kernel? Note that you need a 2.6.30 or better kernel"
+ return $ret
+ fi
+ fi
+ start-stop-daemon --start --pidfile /var/run/cachefilesd.pid --exec /sbin/cachefilesd -- ${OPTIONS}
+ eend $? "Failed to start cachefilesd. Check the system log to see the error"
+
+}
+
+stop() {
+ ebegin "Stopping cachefilesd"
+ start-stop-daemon --stop --exec /sbin/cachefilesd --pidfile /var/run/cachefilesd.pid
+ eend $? "Failed to stop cachefilesd"
+}
+
diff --git a/sys-fs/cachefilesd/metadata.xml b/sys-fs/cachefilesd/metadata.xml
new file mode 100644
index 000000000000..4a00a64b40ae
--- /dev/null
+++ b/sys-fs/cachefilesd/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/clamfs/Manifest b/sys-fs/clamfs/Manifest
new file mode 100644
index 000000000000..7e8758f70657
--- /dev/null
+++ b/sys-fs/clamfs/Manifest
@@ -0,0 +1 @@
+DIST clamfs-1.0.1.tar.gz 142386 SHA256 d4f8b0ce767fab3deeb356e8c7cd45a34b5e3de43177735b4f315fc16aa11d03
diff --git a/sys-fs/clamfs/clamfs-1.0.1-r1.ebuild b/sys-fs/clamfs/clamfs-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..39286e311291
--- /dev/null
+++ b/sys-fs/clamfs/clamfs-1.0.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit eutils linux-info
+
+DESCRIPTION="A FUSE-based user-space file system with on-access anti-virus file scanning"
+HOMEPAGE="http://clamfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/boost-1.33
+ sys-fs/fuse
+ dev-cpp/commoncpp2
+ dev-libs/rlog
+ dev-libs/poco"
+RDEPEND="${DEPEND}
+ app-antivirus/clamav"
+
+CONFIG_CHECK="~FUSE_FS"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-gentoo.patch" \
+ "${FILESDIR}/${P}-gcc45.patch"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+
+ insinto /etc/clamfs
+ doins doc/clamfs.xml || die
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die
+
+ dodoc AUTHORS ChangeLog NEWS README TODO || die
+}
diff --git a/sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch b/sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch
new file mode 100644
index 000000000000..1f5f63a252f2
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs-1.0.1-gcc45.patch
@@ -0,0 +1,15 @@
+Fix building with gcc 4.5
+
+http://bugs.gentoo.org/show_bug.cgi?id=320107
+
+--- src/scancache.cxx
++++ src/scancache.cxx
+@@ -37,7 +37,7 @@
+ }
+
+ ScanCache::ScanCache(long int elements, long int expire):
+- ExpireLRUCache<ino_t, CachedResult>::ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
++ ExpireLRUCache<ino_t, CachedResult>(elements, expire) {
+ }
+
+ ScanCache::~ScanCache() {
diff --git a/sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch b/sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch
new file mode 100644
index 000000000000..f5c02daca6d6
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs-1.0.1-gentoo.patch
@@ -0,0 +1,12 @@
+diff -Naur clamfs-1.0.1.orig/doc/clamfs.xml clamfs-1.0.1/doc/clamfs.xml
+--- clamfs-1.0.1.orig/doc/clamfs.xml 2009-02-07 23:09:26.000000000 +0900
++++ clamfs-1.0.1/doc/clamfs.xml 2010-01-08 18:19:13.000000000 +0900
+@@ -16,7 +16,7 @@
+ check - (yes or no) check if clamd is available on startup (useful if
+ mounting clamfs file systems from /etc/fstab early on startup,
+ while clamav daemon is not yet started) -->
+- <clamd socket="/var/run/clamav/clamd.ctl" check="yes" />
++ <clamd socket="/var/run/clamav/clamd.sock" check="yes" />
+
+ <!-- File system settings
+ root - real directory to attach as our root
diff --git a/sys-fs/clamfs/files/clamfs.confd b/sys-fs/clamfs/files/clamfs.confd
new file mode 100644
index 000000000000..941549a4ca60
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs.confd
@@ -0,0 +1 @@
+CLAMFS_CONFFILE="/etc/clamfs/clamfs.xml"
diff --git a/sys-fs/clamfs/files/clamfs.initd b/sys-fs/clamfs/files/clamfs.initd
new file mode 100644
index 000000000000..d7f911ee2b62
--- /dev/null
+++ b/sys-fs/clamfs/files/clamfs.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use logger
+ need clamd
+}
+
+start() {
+ ebegin "Starting clamfs"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/clamfs -- ${CLAMFS_CONFFILE}
+ eend $? "Failed to start clamfs"
+}
+
+stop() {
+ ebegin "Stopping clamfs"
+ start-stop-daemon --stop --quiet --name clamfs
+ eend $? "Failed to stop clamfs"
+}
diff --git a/sys-fs/clamfs/metadata.xml b/sys-fs/clamfs/metadata.xml
new file mode 100644
index 000000000000..5b7eab143333
--- /dev/null
+++ b/sys-fs/clamfs/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ ClamFS is a FUSE-based user-space file system for Linux with on-access
+ anti-virus file scanning through clamd daemon (a file scanning service
+ developed by ClamAV Project).
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">clamfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/cloudfuse/Manifest b/sys-fs/cloudfuse/Manifest
new file mode 100644
index 000000000000..269a41b2ca1b
--- /dev/null
+++ b/sys-fs/cloudfuse/Manifest
@@ -0,0 +1 @@
+DIST 1.0.tar.gz 63361 SHA256 4684fcc7c596c3fd696e9b4f436fb5da4883ddbd4b36ce6dee4ef1b8f965a4a9 SHA512 c2631898f14a90a251e6fb94e62457d1f8594a53bde873326955c401785067aef750393d7a73e97c22146654d0a9e5fa909a3d26b280909a9ecf09c1bc7f0fb7 WHIRLPOOL e71934f11865696778a95227bd31aa34e1cdf2fcabb24437ed1c493e18f09a073125a9f100f3484e4f2b1f28a6e84920020acd8d12acac6c479e400b16ae629c
diff --git a/sys-fs/cloudfuse/cloudfuse-1.0.ebuild b/sys-fs/cloudfuse/cloudfuse-1.0.ebuild
new file mode 100644
index 000000000000..89648ba92161
--- /dev/null
+++ b/sys-fs/cloudfuse/cloudfuse-1.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A FUSE filesystem for Rackspace's Cloud Files"
+HOMEPAGE="http://redbo.github.io/cloudfuse/"
+SRC_URI="https://github.com/redbo/${PN}/archive/${PV}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+ dev-libs/libxml2
+ dev-libs/openssl:0
+ net-misc/curl
+ sys-fs/fuse
+"
+
+RDEPEND="${DEPEND}"
diff --git a/sys-fs/cloudfuse/metadata.xml b/sys-fs/cloudfuse/metadata.xml
new file mode 100644
index 000000000000..a60ef5cec63b
--- /dev/null
+++ b/sys-fs/cloudfuse/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer status="active">
+ <email>erikmack@gmail.com</email>
+ <name>Erik Mackdanz</name>
+ </maintainer>
+ <maintainer status="active">
+ <email>alunduil@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Cloudfuse is a FUSE application which provides access
+ to Rackspace's Cloud Files. The README claims that
+ Openstack Swift is also supported, though I haven't
+ tested this yet.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">redbo/cloudfuse</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/copyfs/Manifest b/sys-fs/copyfs/Manifest
new file mode 100644
index 000000000000..f23e29727886
--- /dev/null
+++ b/sys-fs/copyfs/Manifest
@@ -0,0 +1 @@
+DIST copyfs-1.0.1.tar.bz2 38429 SHA256 63022f60e2c6b488bef509add0e7cdb41d597ded22a70c1c6ae74ab4a6b7e0f7 SHA512 abe1a125913f35d8390385562d56a5a1aa238ec03bfa044d61ac8f514a4986bfa70502d30af9dbc90e58910dab7f0ab5e230de0b4fa2eb45fe3a2f6514be0a07 WHIRLPOOL e230bb1f4cf24bbc6cdf9bfcad4324d7861e6b36b3dd5a9611e62e52520635e2605831d697a548f82fb589422ac79e4997efbc9b2ef689746860d04932d3f5f2
diff --git a/sys-fs/copyfs/copyfs-1.0.1.ebuild b/sys-fs/copyfs/copyfs-1.0.1.ebuild
new file mode 100644
index 000000000000..c3410402b46a
--- /dev/null
+++ b/sys-fs/copyfs/copyfs-1.0.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="fuse-based filesystem for maintaining configuration files"
+HOMEPAGE="http://invaders.mars-attacks.org/~boklm/copyfs/"
+SRC_URI="${HOMEPAGE}/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+DEPEND=">=sys-fs/fuse-2.0
+ sys-apps/attr"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # this patch fixes sandbox violations
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+
+ # this patch adds support for cleaning up the versions directory
+ # the patch is experimental at best, but it's better than your
+ # versions directory filling up with unused files
+ #
+ # patch by stuart@gentoo.org
+ epatch "${FILESDIR}"/${PN}-1.0-unlink.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --bindir="${D}/usr/bin" --mandir="${D}/usr/share/man"
+}
+
+src_compile() {
+ emake CC=$(tc-getCC) || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+}
diff --git a/sys-fs/copyfs/files/copyfs-1.0-unlink.patch b/sys-fs/copyfs/files/copyfs-1.0-unlink.patch
new file mode 100644
index 000000000000..f4ee28fae148
--- /dev/null
+++ b/sys-fs/copyfs/files/copyfs-1.0-unlink.patch
@@ -0,0 +1,158 @@
+diff -u --recursive copyfs-1.0-orig/cache.c copyfs-1.0/cache.c
+--- copyfs-1.0-orig/cache.c 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0/cache.c 2004-12-18 20:30:17.945445677 +0000
+@@ -94,6 +94,61 @@
+ }
+
+ /*
++ * Remove metadata from the cache
++ */
++void cache_remove_metadata(metadata_t *metadata)
++{
++ version_t * version;
++
++ int atHead = 1;
++ int atTail = 1;
++
++ if (NULL == metadata)
++ return ;
++
++ /* Disconnect it from the list */
++ if (metadata->md_previous)
++ {
++ metadata->md_previous->md_next = metadata->md_next;
++ atHead = 0;
++ }
++
++ if (metadata->md_next)
++ {
++ metadata->md_next->md_previous = metadata->md_previous;
++ atTail = 0;
++ }
++
++ if (atHead)
++ {
++ metadata->md_bucket->b_contents = metadata->md_next;
++ if (metadata->md_next != NULL)
++ metadata->md_next->md_previous = NULL;
++ }
++
++ metadata->md_bucket->b_count--;
++ if (metadata->md_bucket->b_count == 0)
++ metadata->md_bucket->b_contents = NULL;
++
++ version = metadata->md_versions;
++
++ while (NULL != version)
++ {
++ metadata->md_versions = version->v_next;
++ free(version);
++ version = metadata->md_versions;
++ }
++
++ if (metadata->md_vfile != NULL)
++ free (metadata->md_vfile);
++
++ if (metadata->md_vpath != NULL)
++ free (metadata->md_vpath);
++
++ free(metadata);
++}
++
++/*
+ * Clean the older items out of the cache to free space. The goal is to
+ * half the number of items, so that we don't get called constantly.
+ */
+@@ -122,6 +177,7 @@
+ bucket = &cache_hash_table[CACHE_HASH(metadata->md_vfile)];
+ metadata->md_previous = NULL;
+ metadata->md_next = bucket->b_contents;
++ metadata->md_bucket = bucket;
+ if (bucket->b_contents)
+ bucket->b_contents->md_previous = metadata;
+ bucket->b_contents = metadata;
+diff -u --recursive copyfs-1.0-orig/cache.h copyfs-1.0/cache.h
+--- copyfs-1.0-orig/cache.h 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0/cache.h 2004-12-18 20:04:32.072307652 +0000
+@@ -11,6 +11,7 @@
+ void cache_initialize(void);
+ void cache_finalize(void);
+ metadata_t *cache_get_metadata(const char *vpath);
++void cache_remove_metadata(metadata_t *metadata);
+ void cache_add_metadata(metadata_t *metadata);
+ int cache_find_maximal_match(char **array, metadata_t **result);
+
+diff -u --recursive copyfs-1.0-orig/interface.c copyfs-1.0/interface.c
+--- copyfs-1.0-orig/interface.c 2004-12-18 20:04:21.560474299 +0000
++++ copyfs-1.0/interface.c 2004-12-18 20:17:22.367357210 +0000
+@@ -137,6 +137,7 @@
+ file = helper_build_composite("-S", "/", entry->d_name +
+ strlen(METADATA_PREFIX));
+ metadata = rcs_translate_to_metadata(file, rcs_version_path);
++
+ free(file);
+ if (metadata && !metadata->md_deleted)
+ {
+@@ -176,18 +177,42 @@
+ metadata = rcs_translate_to_metadata(path, rcs_version_path);
+ if (!metadata || metadata->md_deleted)
+ return -ENOENT;
+- version = rcs_find_version(metadata, LATEST, LATEST);
+- if (lstat(version->v_rfile, &st_rfile) == -1)
+- return -errno;
+- if (S_ISDIR(st_rfile.st_mode))
+- return -EISDIR;
++
++ /* remove all of the versions that we know about */
++
++ version = metadata->md_versions;
++
++ while (NULL != version)
++ {
++ /* if we can't stat the file, we assume it's already toast */
++
++ if (lstat(version->v_rfile, &st_rfile) == 0)
++ {
++ if (S_ISDIR(st_rfile.st_mode))
++ {
++ return -EISDIR;
++ }
++
++ if (unlink(version->v_rfile) == -1)
++ return -errno;
++ }
++
++ /* move on to the next version */
++ metadata->md_versions = version->v_next;
++ free(version);
++
++ version = metadata->md_versions;
++ }
++
++ /* if we get to here, we've released all the versions */
+ metadata->md_deleted = 1;
+ metafile = create_meta_name(metadata->md_vfile, "metadata");
+- if (write_metadata_file(metafile, metadata) == -1) {
+- free(metafile);
++ if (unlink(metafile) == -1)
+ return -errno;
+- }
+ free(metafile);
++
++ cache_remove_metadata(metadata);
++
+ return 0;
+ }
+
+diff -u --recursive copyfs-1.0-orig/structs.h copyfs-1.0/structs.h
+--- copyfs-1.0-orig/structs.h 2004-12-10 13:34:08.000000000 +0000
++++ copyfs-1.0/structs.h 2004-12-18 20:04:32.073307446 +0000
+@@ -38,6 +38,8 @@
+
+ metadata_t *md_next; /* Next file in bucket */
+ metadata_t *md_previous; /* Previous " */
++
++ bucket_t *md_bucket; /* Our container */
+ };
+
+ struct bucket_t
diff --git a/sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch b/sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch
new file mode 100644
index 000000000000..f0ddfab94af4
--- /dev/null
+++ b/sys-fs/copyfs/files/copyfs-1.0.1-gentoo.patch
@@ -0,0 +1,46 @@
+--- a/ea.c
++++ b/ea.c
+@@ -1,10 +1,11 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <fuse.h>
++#include <sys/errno.h>
+
+ #include "helper.h"
+ #include "structs.h"
+--- a/interface.c
++++ b/interface.c
+@@ -23,7 +23,7 @@
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <stdlib.h>
+-#include <attr/xattr.h>
++#include <sys/xattr.h>
+ #include <sys/time.h>
+ #include <time.h>
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -27,7 +27,7 @@
+ OBJ = $(SRC:.c=.o)
+
+ CC = gcc
+-CFLAGS = -Wall -ansi -W -std=c99 -g -ggdb -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
++CFLAGS += -Wall -ansi -W -std=c99 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+ LIBS = -lfuse
+
+ all: $(TARGET)
+@@ -54,7 +54,7 @@
+ rm -rf /tmp/copyfs-dist
+
+ $(TARGET): $(OBJ)
+- gcc -o $(TARGET) $(OBJ) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJ) $(LIBS)
+
+ # Dependencies (use gcc -MM -D_FILE_OFFSET_BITS=64 *.c to regenerate)
+
diff --git a/sys-fs/copyfs/metadata.xml b/sys-fs/copyfs/metadata.xml
new file mode 100644
index 000000000000..333a655e1976
--- /dev/null
+++ b/sys-fs/copyfs/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <description>This package lacks a primary herd or maintainer.</description>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-fs/cramfs/Manifest b/sys-fs/cramfs/Manifest
new file mode 100644
index 000000000000..1db57063406f
--- /dev/null
+++ b/sys-fs/cramfs/Manifest
@@ -0,0 +1 @@
+DIST cramfs-1.1.tar.gz 24179 SHA256 133caca2c4e7c64106555154ee0ff693f5cf5beb9421ce2eb86baee997d22368
diff --git a/sys-fs/cramfs/cramfs-1.1.ebuild b/sys-fs/cramfs/cramfs-1.1.ebuild
new file mode 100644
index 000000000000..557bcb1f2149
--- /dev/null
+++ b/sys-fs/cramfs/cramfs-1.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Linux filesystem designed to be simple, small, and to compress things well"
+HOMEPAGE="http://sourceforge.net/projects/cramfs/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND="sys-libs/zlib"
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ into /
+ dosbin mkcramfs cramfsck || die
+ dodoc README NOTES
+}
diff --git a/sys-fs/cramfs/metadata.xml b/sys-fs/cramfs/metadata.xml
new file mode 100644
index 000000000000..5e2437596318
--- /dev/null
+++ b/sys-fs/cramfs/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <upstream>
+ <remote-id type="sourceforge">cramfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/cryptsetup/Manifest b/sys-fs/cryptsetup/Manifest
new file mode 100644
index 000000000000..9ce574e0e98b
--- /dev/null
+++ b/sys-fs/cryptsetup/Manifest
@@ -0,0 +1,4 @@
+DIST cryptsetup-1.6.2.tar.bz2 1189584 SHA256 15723f0198303d4bcb99d480b7a773918e2d319f0348457988c063bdd03e109a SHA512 59fb835ef8bcd6d0c704a021055032639840ef4bb7be6ade8ff91d347ae74d8e6cba4583d8ced7a4a8c6f09ebc16c4eff3549c13c4327d92fd9234db58e18c10 WHIRLPOOL 3ab24572ea42dfdd0d5176dfa4621520cd0bccda53c3a01676d400a7a841ab9643c979c4942daa774658602bd8cdf659376cbc94c553e2097c5eb3c51a7edb31
+DIST cryptsetup-1.6.5.tar.xz 1136892 SHA256 267973f20be43f9d685f7193aa23954b60768c74a1d330243114d4b8bc17ca9a SHA512 c77ac590d28954e7bd430d1069b820a288c4668857a7ced7f81546ea39676f2b536abbcda06f20440e31c205b7ada68bcfa5aab220b102a2b62198a788d9b65e WHIRLPOOL 74a597abbdcc1225bb811597e53737eab2348a328f3ba30e7eb519a0621b06e6c898e320db8e24a16decfd4706b6a2e68b06894dde91124e4c089e952dbff9c1
+DIST cryptsetup-1.6.6.tar.xz 1145940 SHA256 2d2ce28e4e1137dd599d87884b62ef6dbf14fd7848b2a2bf7d61cf125fbd8e6f SHA512 6ee6b4e8fe4f721bb97d1cf47c5e2d1c96001dd3ac48154d414f64d23620ac3ec3eeea2ad584a1a3111e07a086c8a4fdbfabdf4859cda58ba2bd6765b1f009a8 WHIRLPOOL 07bb6b7f5153cfcd3a585f111733a05926d1f6f0ec190e0b0dc1777591bd0fec3c8782dc79f43bafd3829da28efbdd2d8f97daef8186392787c22c7f5e454376
+DIST cryptsetup-1.6.7.tar.xz 1188876 SHA256 c23c24c8d662032da8650c1c84985221be8bbedf4737c1540bba7e4517dfe820 SHA512 d6cecd2f3f5d468d4337d4e8407c8c3315e8972c0fc72cd1f93fb67f02a632b56ad293f08f6682f24c9ad0b5ad5967be751e5679413109692ade5823aafd1d19 WHIRLPOOL 95611938ddbf3520f1a2a2891e3103f6bf1699a210f7902bd65d1e61357ed44c9b6f344f567d1d5f1b88adb40154831e34014f3e22ec141f9101b707295007a0
diff --git a/sys-fs/cryptsetup/cryptsetup-1.6.2.ebuild b/sys-fs/cryptsetup/cryptsetup-1.6.2.ebuild
new file mode 100644
index 000000000000..6eb17d36e122
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-1.6.2.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools python-single-r1 linux-info libtool eutils
+
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="http://code.google.com/p/cryptsetup/"
+SRC_URI="http://cryptsetup.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+CRYPTO_BACKENDS="+gcrypt kernel nettle openssl"
+# we don't support nss since it doesn't allow cryptsetup to be built statically
+# and it's missing ripemd160 support so it can't provide full backward compatibility
+IUSE="${CRYPTO_BACKENDS} nls python reencrypt static static-libs udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ static? ( !gcrypt )" #496612
+
+LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
+ dev-libs/popt[static-libs(+)]
+ sys-apps/util-linux[static-libs(+)]
+ gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+ nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
+ openssl? ( dev-libs/openssl[static-libs(+)] )
+ sys-fs/lvm2[static-libs(+)]
+ udev? ( virtual/libudev[static-libs(+)] )"
+# We have to always depend on ${LIB_DEPEND} rather than put behind
+# !static? () because we provide a shared library which links against
+# these other packages. #414665
+RDEPEND="static-libs? ( ${LIB_DEPEND} )
+ ${LIB_DEPEND//\[static-libs\(+\)\]}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )"
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
+ epatch "${FILESDIR}"/${PN}-1.6.1-openssl-static.patch
+ eautoreconf
+}
+
+src_configure() {
+ if use kernel ; then
+ ewarn "Note that kernel backend is very slow for this type of operation"
+ ewarn "and is provided mainly for embedded systems wanting to avoid"
+ ewarn "userspace crypto libraries."
+ fi
+
+ econf \
+ --sbindir=/sbin \
+ --enable-shared \
+ $(use_enable static static-cryptsetup) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable python) \
+ $(use_enable reencrypt cryptsetup-reencrypt) \
+ $(use_enable udev) \
+ $(use_enable !urandom dev-random) \
+ --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/}; do use ${x} && echo ${x} ; done)
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+ local p
+ for p in /dev/mapper /dev/loop* ; do
+ addwrite ${p}
+ done
+ default
+}
+
+src_install() {
+ default
+ if use static ; then
+ mv "${ED}"/sbin/cryptsetup{.static,} || die
+ mv "${ED}"/sbin/veritysetup{.static,} || die
+ use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
+ fi
+ prune_libtool_files --modules
+
+ newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/1.5.1-dmcrypt.rc dmcrypt
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Please see the example for configuring a LUKS mountpoint"
+ elog "in /etc/conf.d/dmcrypt"
+ elog
+ elog "If you are using baselayout-2 then please do:"
+ elog "rc-update add dmcrypt boot"
+ elog "This version introduces a command line arguement 'key_timeout'."
+ elog "If you want the search for the removable key device to timeout"
+ elog "after 10 seconds add the following to your bootloader config:"
+ elog "key_timeout=10"
+ elog "A timeout of 0 will mean it will wait indefinitely."
+ elog
+ elog "Users using cryptsetup-1.0.x (dm-crypt plain) volumes must use"
+ elog "a compatibility mode when using cryptsetup-1.1.x. This can be"
+ elog "done by specifying the cipher (-c), key size (-s) and hash (-h)."
+ elog "For more info, see http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup"
+ fi
+}
diff --git a/sys-fs/cryptsetup/cryptsetup-1.6.5.ebuild b/sys-fs/cryptsetup/cryptsetup-1.6.5.ebuild
new file mode 100644
index 000000000000..f6e6cf711f70
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-1.6.5.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools python-single-r1 linux-info libtool eutils versionator
+
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="http://code.google.com/p/cryptsetup/"
+SRC_URI="http://cryptsetup.googlecode.com/files/${P}.tar.xz"
+SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+CRYPTO_BACKENDS="+gcrypt kernel nettle openssl"
+# we don't support nss since it doesn't allow cryptsetup to be built statically
+# and it's missing ripemd160 support so it can't provide full backward compatibility
+IUSE="${CRYPTO_BACKENDS} nls pwquality python reencrypt static static-libs udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ static? ( !gcrypt )" #496612
+
+LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
+ dev-libs/popt[static-libs(+)]
+ sys-apps/util-linux[static-libs(+)]
+ gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+ nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
+ openssl? ( dev-libs/openssl[static-libs(+)] )
+ pwquality? ( dev-libs/libpwquality[static-libs(+)] )
+ sys-fs/lvm2[static-libs(+)]
+ udev? ( virtual/libudev[static-libs(+)] )"
+# We have to always depend on ${LIB_DEPEND} rather than put behind
+# !static? () because we provide a shared library which links against
+# these other packages. #414665
+RDEPEND="static-libs? ( ${LIB_DEPEND} )
+ ${LIB_DEPEND//\[static-libs\(+\)\]}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )"
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
+ epatch_user && eautoreconf
+}
+
+src_configure() {
+ if use kernel ; then
+ ewarn "Note that kernel backend is very slow for this type of operation"
+ ewarn "and is provided mainly for embedded systems wanting to avoid"
+ ewarn "userspace crypto libraries."
+ fi
+
+ econf \
+ --sbindir=/sbin \
+ --enable-shared \
+ $(use_enable static static-cryptsetup) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable pwquality) \
+ $(use_enable python) \
+ $(use_enable reencrypt cryptsetup-reencrypt) \
+ $(use_enable udev) \
+ $(use_enable !urandom dev-random) \
+ --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/}; do use ${x} && echo ${x} ; done)
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+ local p
+ for p in /dev/mapper /dev/loop* ; do
+ addwrite ${p}
+ done
+ default
+}
+
+src_install() {
+ default
+ if use static ; then
+ mv "${ED}"/sbin/cryptsetup{.static,} || die
+ mv "${ED}"/sbin/veritysetup{.static,} || die
+ use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
+ fi
+ prune_libtool_files --modules
+
+ newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/1.5.1-dmcrypt.rc dmcrypt
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Please see the example for configuring a LUKS mountpoint"
+ elog "in /etc/conf.d/dmcrypt"
+ elog
+ elog "If you are using baselayout-2 then please do:"
+ elog "rc-update add dmcrypt boot"
+ elog "This version introduces a command line arguement 'key_timeout'."
+ elog "If you want the search for the removable key device to timeout"
+ elog "after 10 seconds add the following to your bootloader config:"
+ elog "key_timeout=10"
+ elog "A timeout of 0 will mean it will wait indefinitely."
+ elog
+ elog "Users using cryptsetup-1.0.x (dm-crypt plain) volumes must use"
+ elog "a compatibility mode when using cryptsetup-1.1.x. This can be"
+ elog "done by specifying the cipher (-c), key size (-s) and hash (-h)."
+ elog "For more info, see http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup"
+ fi
+}
diff --git a/sys-fs/cryptsetup/cryptsetup-1.6.6.ebuild b/sys-fs/cryptsetup/cryptsetup-1.6.6.ebuild
new file mode 100644
index 000000000000..8a18b03c4797
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-1.6.6.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools python-single-r1 linux-info libtool eutils versionator
+
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="http://code.google.com/p/cryptsetup/"
+SRC_URI="http://cryptsetup.googlecode.com/files/${P}.tar.xz"
+SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+CRYPTO_BACKENDS="+gcrypt kernel nettle openssl"
+# we don't support nss since it doesn't allow cryptsetup to be built statically
+# and it's missing ripemd160 support so it can't provide full backward compatibility
+IUSE="${CRYPTO_BACKENDS} nls pwquality python reencrypt static static-libs udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ static? ( !gcrypt )" #496612
+
+LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
+ dev-libs/popt[static-libs(+)]
+ sys-apps/util-linux[static-libs(+)]
+ gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+ nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
+ openssl? ( dev-libs/openssl[static-libs(+)] )
+ pwquality? ( dev-libs/libpwquality[static-libs(+)] )
+ sys-fs/lvm2[static-libs(+)]
+ udev? ( virtual/libudev[static-libs(+)] )"
+# We have to always depend on ${LIB_DEPEND} rather than put behind
+# !static? () because we provide a shared library which links against
+# these other packages. #414665
+RDEPEND="static-libs? ( ${LIB_DEPEND} )
+ ${LIB_DEPEND//\[static-libs\(+\)\]}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )"
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
+ epatch_user && eautoreconf
+}
+
+src_configure() {
+ if use kernel ; then
+ ewarn "Note that kernel backend is very slow for this type of operation"
+ ewarn "and is provided mainly for embedded systems wanting to avoid"
+ ewarn "userspace crypto libraries."
+ fi
+
+ econf \
+ --sbindir=/sbin \
+ --enable-shared \
+ $(use_enable static static-cryptsetup) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable pwquality) \
+ $(use_enable python) \
+ $(use_enable reencrypt cryptsetup-reencrypt) \
+ $(use_enable udev) \
+ $(use_enable !urandom dev-random) \
+ --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/}; do use ${x} && echo ${x} ; done)
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+ local p
+ for p in /dev/mapper /dev/loop* ; do
+ addwrite ${p}
+ done
+ default
+}
+
+src_install() {
+ default
+ if use static ; then
+ mv "${ED}"/sbin/cryptsetup{.static,} || die
+ mv "${ED}"/sbin/veritysetup{.static,} || die
+ use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
+ fi
+ prune_libtool_files --modules
+
+ newconfd "${FILESDIR}"/1.0.6-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/1.5.1-dmcrypt.rc dmcrypt
+}
+
+pkg_postinst() {
+ if use gcrypt ; then
+ elog "If you were using the whirlpool hash with libgcrypt, you might be impacted"
+ elog "by broken code in <libgcrypt-1.6.0 versions. See this page for more details:"
+ elog "https://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#8._Issues_with_Specific_Versions_of_cryptsetup"
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog "Please see the example for configuring a LUKS mountpoint"
+ elog "in /etc/conf.d/dmcrypt"
+ elog
+ elog "If you are using baselayout-2 then please do:"
+ elog "rc-update add dmcrypt boot"
+ elog "This version introduces a command line arguement 'key_timeout'."
+ elog "If you want the search for the removable key device to timeout"
+ elog "after 10 seconds add the following to your bootloader config:"
+ elog "key_timeout=10"
+ elog "A timeout of 0 will mean it will wait indefinitely."
+ elog
+ elog "Users using cryptsetup-1.0.x (dm-crypt plain) volumes must use"
+ elog "a compatibility mode when using cryptsetup-1.1.x. This can be"
+ elog "done by specifying the cipher (-c), key size (-s) and hash (-h)."
+ elog "For more info, see http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#6._Issues_with_Specific_Versions_of_cryptsetup"
+ fi
+}
diff --git a/sys-fs/cryptsetup/cryptsetup-1.6.7.ebuild b/sys-fs/cryptsetup/cryptsetup-1.6.7.ebuild
new file mode 100644
index 000000000000..83cb5fdc2a88
--- /dev/null
+++ b/sys-fs/cryptsetup/cryptsetup-1.6.7.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools python-single-r1 linux-info libtool eutils versionator
+
+DESCRIPTION="Tool to setup encrypted devices with dm-crypt"
+HOMEPAGE="https://gitlab.com/cryptsetup/cryptsetup/blob/master/README.md"
+SRC_URI="mirror://kernel/linux/utils/${PN}/v$(get_version_component_range 1-2)/${P}.tar.xz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+CRYPTO_BACKENDS="+gcrypt kernel nettle openssl"
+# we don't support nss since it doesn't allow cryptsetup to be built statically
+# and it's missing ripemd160 support so it can't provide full backward compatibility
+IUSE="${CRYPTO_BACKENDS} nls pwquality python reencrypt static static-libs udev urandom"
+REQUIRED_USE="^^ ( ${CRYPTO_BACKENDS//+/} )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ static? ( !gcrypt )" #496612
+
+LIB_DEPEND="dev-libs/libgpg-error[static-libs(+)]
+ dev-libs/popt[static-libs(+)]
+ sys-apps/util-linux[static-libs(+)]
+ gcrypt? ( dev-libs/libgcrypt:0=[static-libs(+)] )
+ nettle? ( >=dev-libs/nettle-2.4[static-libs(+)] )
+ openssl? ( dev-libs/openssl[static-libs(+)] )
+ pwquality? ( dev-libs/libpwquality[static-libs(+)] )
+ sys-fs/lvm2[static-libs(+)]
+ udev? ( virtual/libudev[static-libs(+)] )"
+# We have to always depend on ${LIB_DEPEND} rather than put behind
+# !static? () because we provide a shared library which links against
+# these other packages. #414665
+RDEPEND="static-libs? ( ${LIB_DEPEND} )
+ ${LIB_DEPEND//\[static-libs\(+\)\]}
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( ${LIB_DEPEND} )"
+
+pkg_setup() {
+ local CONFIG_CHECK="~DM_CRYPT ~CRYPTO ~CRYPTO_CBC"
+ local WARNING_DM_CRYPT="CONFIG_DM_CRYPT:\tis not set (required for cryptsetup)\n"
+ local WARNING_CRYPTO_CBC="CONFIG_CRYPTO_CBC:\tis not set (required for kernel 2.6.19)\n"
+ local WARNING_CRYPTO="CONFIG_CRYPTO:\tis not set (required for cryptsetup)\n"
+ check_extra_config
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed -i '/^LOOPDEV=/s:$: || exit 0:' tests/{compat,mode}-test || die
+ epatch_user && eautoreconf
+}
+
+src_configure() {
+ if use kernel ; then
+ ewarn "Note that kernel backend is very slow for this type of operation"
+ ewarn "and is provided mainly for embedded systems wanting to avoid"
+ ewarn "userspace crypto libraries."
+ fi
+
+ econf \
+ --sbindir=/sbin \
+ --enable-shared \
+ $(use_enable static static-cryptsetup) \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable pwquality) \
+ $(use_enable python) \
+ $(use_enable reencrypt cryptsetup-reencrypt) \
+ $(use_enable udev) \
+ $(use_enable !urandom dev-random) \
+ --with-crypto_backend=$(for x in ${CRYPTO_BACKENDS//+/} ; do usev ${x} ; done)
+}
+
+src_test() {
+ if [[ ! -e /dev/mapper/control ]] ; then
+ ewarn "No /dev/mapper/control found -- skipping tests"
+ return 0
+ fi
+ local p
+ for p in /dev/mapper /dev/loop* ; do
+ addwrite ${p}
+ done
+ default
+}
+
+src_install() {
+ default
+ if use static ; then
+ mv "${ED}"/sbin/cryptsetup{.static,} || die
+ mv "${ED}"/sbin/veritysetup{.static,} || die
+ use reencrypt && { mv "${ED}"/sbin/cryptsetup-reencrypt{.static,} || die ; }
+ fi
+ prune_libtool_files --modules
+
+ newconfd "${FILESDIR}"/1.6.7-dmcrypt.confd dmcrypt
+ newinitd "${FILESDIR}"/1.6.7-dmcrypt.rc dmcrypt
+}
diff --git a/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd b/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd
new file mode 100644
index 000000000000..0f6b554ae8a7
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd
@@ -0,0 +1,105 @@
+# /etc/conf.d/dmcrypt
+
+# For people who run dmcrypt on top of some other layer (like raid),
+# use rc_need to specify that requirement. See the runscript(8) man
+# page for more information.
+
+#--------------------
+# Instructions
+#--------------------
+
+# Note regarding the syntax of this file. This file is *almost* bash,
+# but each line is evaluated separately. Separate swaps/targets can be
+# specified. The init-script which reads this file assumes that a
+# swap= or target= line starts a new section, similar to lilo or grub
+# configuration.
+
+# Note when using gpg keys and /usr on a separate partition, you will
+# have to copy /usr/bin/gpg to /bin/gpg so that it will work properly
+# and ensure that gpg has been compiled statically.
+# See http://bugs.gentoo.org/90482 for more information.
+
+# Note that the init-script which reads this file detects whether your
+# partition is LUKS or not. No mkfs is run unless you specify a makefs
+# option.
+
+# Global options:
+#----------------
+
+# Max number of checks to perform (1 per second)
+#dmcrypt_max_timeout=120
+
+# Arguments:
+#-----------
+# target=<name> == Mapping name for partition.
+# swap=<name> == Mapping name for swap partition.
+# source='<dev>' == Real device for partition.
+# Note: You can (and should) specify a tag like UUID
+# for blkid (see -t option). This is safer than using
+# the full path to the device.
+# key='</path/to/keyfile>[:<mode>]' == Fullpath from / or from inside removable media.
+# remdev='<dev>' == Device that will be assigned to removable media.
+# gpg_options='<opts>' == Default are --quiet --decrypt
+# options='<opts>' == cryptsetup, for LUKS you can only use --readonly
+# loop_file='<file>' == Loopback file.
+# Note: If you omit $source, then a free loopback will
+# be looked up automatically.
+# pre_mount='cmds' == commands to execute before mounting partition.
+# post_mount='cmds' == commands to execute after mounting partition.
+#-----------
+# Supported Modes
+# gpg == decrypt and pipe key into cryptsetup.
+# Note: new-line character must not be part of key.
+# Command to erase \n char: 'cat key | tr -d '\n' > cleanKey'
+
+#--------------------
+# dm-crypt examples
+#--------------------
+
+## swap
+# Swap partitions. These should come first so that no keys make their
+# way into unencrypted swap.
+# If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom
+# If no makefs is given then mkswap will be assumed
+#swap=crypt-swap
+#source='/dev/hda2'
+
+## /home with passphrase
+#target=crypt-home
+#source='/dev/hda5'
+
+## /home with regular keyfile
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey'
+
+## /home with gpg protected key
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey:gpg'
+
+## /home with regular keyfile on removable media(such as usb-stick)
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey'
+#remdev='/dev/sda1'
+
+##/home with gpg protected key on removable media(such as usb-stick)
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey:gpg'
+#remdev='/dev/sda1'
+
+##/tmp with regular keyfile
+#target=crypt-tmp
+#source='/dev/hda6'
+#key='/full/path/to/tmpkey'
+#pre_mount='/sbin/mkreiserfs -f -f ${dev}'
+#post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'
+
+## Loopback file example
+#target='crypt-loop-home'
+#source='/dev/loop0'
+#loop_file='/mnt/crypt/home'
+
+# The file must be terminated by a newline. Or leave this comment last.
diff --git a/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc b/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc
new file mode 100755
index 000000000000..b6db91036040
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc
@@ -0,0 +1,335 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before checkfs fsck
+
+ if grep -qs ^swap= "${conf_file}" ; then
+ before swap
+ fi
+}
+
+# We support multiple dmcrypt instances based on $SVCNAME
+conf_file="/etc/conf.d/${SVCNAME}"
+
+# Get splash helpers if available.
+if [ -e /sbin/splash-functions.sh ] ; then
+ . /sbin/splash-functions.sh
+fi
+
+# Setup mappings for an individual target/swap
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute() {
+ local dev ret mode foo
+
+ if [ -z "${target}" -a -z "${swap}" ] ; then
+ return
+ fi
+
+ # Handle automatic look up of the source path.
+ if [ -z "${source}" -a -n "${loop_file}" ] ; then
+ source=$(losetup --show -f "${loop_file}")
+ fi
+ case ${source} in
+ *=*)
+ source=$(blkid -l -t "${source}" -o device)
+ ;;
+ esac
+ if [ -z "${source}" ] || [ ! -e "${source}" ] ; then
+ ewarn "source \"${source}\" for ${target} missing, skipping..."
+ return
+ fi
+
+ if [ -n "${target}" ] ; then
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "${swap}" ] ; then
+ if cryptsetup isLuks ${source} 2>/dev/null ; then
+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."
+ return
+ fi
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ fi
+
+ if [ -n "${loop_file}" ] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Setting up loop device ${source}"
+ losetup ${source} ${loop_file}
+ fi
+
+ # cryptsetup:
+ # open <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
+ local arg1="create" arg2="${target}" arg3="${source}"
+ if cryptsetup isLuks ${source} 2>/dev/null ; then
+ arg1="open"
+ arg2="${source}"
+ arg3="${target}"
+ fi
+
+ # Older versions reported:
+ # ${target} is active:
+ # Newer versions report:
+ # ${target} is active[ and is in use.]
+ if cryptsetup status ${target} | egrep -q ' is active' ; then
+ einfo "dm-crypt mapping ${target} is already configured"
+ return
+ fi
+ splash svc_input_begin ${SVCNAME} >/dev/null 2>&1
+
+ # Handle keys
+ if [ -n "${key}" ] ; then
+ read_abort() {
+ # some colors
+ local ans savetty resettty
+ [ -z "${NORMAL}" ] && eval $(eval_ecolors)
+ einfon " $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) "
+ shift
+ # This is ugly as s**t. But POSIX doesn't provide `read -t`, so
+ # we end up having to implement our own crap with stty/etc...
+ savetty=$(stty -g)
+ resettty='stty ${savetty}; trap - EXIT HUP INT TERM'
+ trap 'eval "${resettty}"' EXIT HUP INT TERM
+ stty -icanon
+ [ "${1}" = -t ] && stty min 0 time "$(( $2 * 10 ))"
+ ans=$(dd count=1 bs=1 2>/dev/null) || ans=''
+ eval "${resettty}"
+ if [ -z "${ans}" ] ; then
+ printf '\r'
+ else
+ echo
+ fi
+ case ${ans} in
+ [yY]) return 0;;
+ *) return 1;;
+ esac
+ }
+
+ # Notes: sed not used to avoid case where /usr partition is encrypted.
+ mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg
+ key=${key%:*}
+ case "${mode}" in
+ gpg|reg)
+ # handle key on removable device
+ if [ -n "${remdev}" ] ; then
+ # temp directory to mount removable device
+ local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"
+ if [ ! -d "${mntrem}" ] ; then
+ if ! mkdir -p "${mntrem}" ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: Unable to create temporary mount point '${mntrem}'"
+ return
+ fi
+ fi
+ i=0
+ einfo "Please insert removable device for ${target}"
+ while [ ${i} -lt ${dmcrypt_max_timeout:-120} ] ; do
+ foo=""
+ if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then
+ # keyfile exists?
+ if [ ! -e "${mntrem}${key}" ] ; then
+ umount -n "${mntrem}"
+ rmdir "${mntrem}"
+ einfo "Cannot find ${key} on removable media."
+ read_abort "Abort" ${read_timeout:--t 1} && return
+ else
+ key="${mntrem}${key}"
+ break
+ fi
+ else
+ [ -e "${remdev}" ] \
+ && foo="mount failed" \
+ || foo="mount source not found"
+ fi
+ : $((i += 1))
+ read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return
+ done
+ else # keyfile ! on removable device
+ if [ ! -e "${key}" ] ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: keyfile ${key} does not exist."
+ return
+ fi
+ fi
+ ;;
+ *)
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: mode ${mode} is invalid."
+ return
+ ;;
+ esac
+ else
+ mode=none
+ fi
+ ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}"
+ if [ "${mode}" = "gpg" ] ; then
+ : ${gpg_options:='-q -d'}
+ # gpg available ?
+ if command -v gpg >/dev/null ; then
+ for i in 0 1 2 ; do
+ # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
+ # save stdin stdout stderr "values"
+ gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup --key-file - ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ [ ${ret} -eq 0 ] && break
+ done
+ eend ${ret} "failure running cryptsetup"
+ else
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: cannot find gpg application."
+ einfo "You have to install app-crypt/gnupg first."
+ einfo "If you have /usr on its own partition, try copying gpg to /bin ."
+ fi
+ else
+ if [ "${mode}" = "reg" ] ; then
+ cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ else
+ cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ fi
+ fi
+ if [ -d "${mntrem}" ] ; then
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ fi
+ splash svc_input_end ${SVCNAME} >/dev/null 2>&1
+
+ if [ ${ret} -ne 0 ] ; then
+ cryptfs_status=1
+ else
+ if [ -n "${pre_mount}" ] ; then
+ dev="/dev/mapper/${target}"
+ eval ebegin \"" pre_mount: ${pre_mount}"\"
+ eval "${pre_mount}" > /dev/null
+ ewend $? || cryptfs_status=1
+ fi
+ fi
+}
+
+# Lookup optional bootparams
+get_bootparam_val() {
+ # We're given something like:
+ # foo=bar=cow
+ # Return the "bar=cow" part.
+ case $1 in
+ *\=*)
+ local key=$(echo "$1" | cut -f1 -d=)
+ echo "$1" | cut -c $(( ${#key} + 2 ))
+ ;;
+ esac
+}
+
+start() {
+ local header=true cryptfs_status=0
+ local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev
+
+ local x
+ for x in $(cat /proc/cmdline) ; do
+ case "${x}" in
+ key_timeout\=*)
+ local KEY_TIMEOUT=$(get_bootparam_val "${x}")
+ if [ ${KEY_TIMEOUT} -gt 0 ] ; then
+ read_timeout="-t ${KEY_TIMEOUT}"
+ fi
+ ;;
+ esac
+ done
+
+ while read targetline <&3 ; do
+ case ${targetline} in
+ # skip comments and blank lines
+ ""|"#"*) continue ;;
+ # skip service-specific openrc configs #377927
+ rc_*) continue ;;
+ esac
+
+ ${header} && ebegin "Setting up dm-crypt mappings"
+ header=false
+
+ # check for the start of a new target/swap
+ case ${targetline} in
+ target=*|swap=*)
+ # If we have a target queued up, then execute it
+ dm_crypt_execute
+
+ # Prepare for the next target/swap by resetting variables
+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
+ ;;
+
+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
+ if [ -z "${target}${swap}" ] ; then
+ ewarn "Ignoring setting outside target/swap section: ${targetline}"
+ continue
+ fi
+ ;;
+
+ dmcrypt_max_timeout=*)
+ # ignore global options
+ continue
+ ;;
+
+ *)
+ ewarn "Skipping invalid line in ${conf_file}: ${targetline}"
+ ;;
+ esac
+
+ # Queue this setting for the next call to dm_crypt_execute
+ eval "${targetline}"
+ done 3< ${conf_file}
+
+ # If we have a target queued up, then execute it
+ dm_crypt_execute
+
+ ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
+}
+
+stop() {
+ local line header
+
+ # Break down all mappings
+ header=true
+ egrep "^(target|swap)=" ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Removing dm-crypt mappings"
+ header=false
+
+ target= swap=
+ eval ${line}
+
+ [ -n "${swap}" ] && target=${swap}
+ if [ -z "${target}" ] ; then
+ ewarn "invalid line in ${conf_file}: ${line}"
+ continue
+ fi
+
+ ebegin " ${target}"
+ cryptsetup remove ${target}
+ eend $?
+ done
+
+ # Break down loop devices
+ header=true
+ grep '^source=./dev/loop' ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Detaching dm-crypt loop devices"
+ header=false
+
+ source=
+ eval ${line}
+
+ ebegin " ${source}"
+ losetup -d "${source}"
+ eend $?
+ done
+
+ return 0
+}
diff --git a/sys-fs/cryptsetup/files/1.6.7-dmcrypt.confd b/sys-fs/cryptsetup/files/1.6.7-dmcrypt.confd
new file mode 100644
index 000000000000..642ff087078b
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.6.7-dmcrypt.confd
@@ -0,0 +1,111 @@
+# /etc/conf.d/dmcrypt
+
+# For people who run dmcrypt on top of some other layer (like raid),
+# use rc_need to specify that requirement. See the runscript(8) man
+# page for more information.
+
+#--------------------
+# Instructions
+#--------------------
+
+# Note regarding the syntax of this file. This file is *almost* bash,
+# but each line is evaluated separately. Separate swaps/targets can be
+# specified. The init-script which reads this file assumes that a
+# swap= or target= line starts a new section, similar to lilo or grub
+# configuration.
+
+# Note when using gpg keys and /usr on a separate partition, you will
+# have to copy /usr/bin/gpg to /bin/gpg so that it will work properly
+# and ensure that gpg has been compiled statically.
+# See http://bugs.gentoo.org/90482 for more information.
+
+# Note that the init-script which reads this file detects whether your
+# partition is LUKS or not. No mkfs is run unless you specify a makefs
+# option.
+
+# Global options:
+#----------------
+
+# How long to wait for each timeout (in seconds).
+dmcrypt_key_timeout=1
+
+# Max number of checks to perform (see dmcrypt_key_timeout).
+#dmcrypt_max_timeout=300
+
+# Number of password retries.
+dmcrypt_retries=5
+
+# Arguments:
+#-----------
+# target=<name> == Mapping name for partition.
+# swap=<name> == Mapping name for swap partition.
+# source='<dev>' == Real device for partition.
+# Note: You can (and should) specify a tag like UUID
+# for blkid (see -t option). This is safer than using
+# the full path to the device.
+# key='</path/to/keyfile>[:<mode>]' == Fullpath from / or from inside removable media.
+# remdev='<dev>' == Device that will be assigned to removable media.
+# gpg_options='<opts>' == Default are --quiet --decrypt
+# options='<opts>' == cryptsetup, for LUKS you can only use --readonly
+# loop_file='<file>' == Loopback file.
+# Note: If you omit $source, then a free loopback will
+# be looked up automatically.
+# pre_mount='cmds' == commands to execute before mounting partition.
+# post_mount='cmds' == commands to execute after mounting partition.
+#-----------
+# Supported Modes
+# gpg == decrypt and pipe key into cryptsetup.
+# Note: new-line character must not be part of key.
+# Command to erase \n char: 'cat key | tr -d '\n' > cleanKey'
+
+#--------------------
+# dm-crypt examples
+#--------------------
+
+## swap
+# Swap partitions. These should come first so that no keys make their
+# way into unencrypted swap.
+# If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom
+# If no makefs is given then mkswap will be assumed
+#swap=crypt-swap
+#source='/dev/hda2'
+
+## /home with passphrase
+#target=crypt-home
+#source='/dev/hda5'
+
+## /home with regular keyfile
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey'
+
+## /home with gpg protected key
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey:gpg'
+
+## /home with regular keyfile on removable media(such as usb-stick)
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey'
+#remdev='/dev/sda1'
+
+## /home with gpg protected key on removable media(such as usb-stick)
+#target=crypt-home
+#source='/dev/hda5'
+#key='/full/path/to/homekey:gpg'
+#remdev='/dev/sda1'
+
+## /tmp with regular keyfile
+#target=crypt-tmp
+#source='/dev/hda6'
+#key='/full/path/to/tmpkey'
+#pre_mount='/sbin/mkreiserfs -f -f ${dev}'
+#post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'
+
+## Loopback file example
+#target='crypt-loop-home'
+#source='/dev/loop0'
+#loop_file='/mnt/crypt/home'
+
+# The file must be terminated by a newline. Or leave this comment last.
diff --git a/sys-fs/cryptsetup/files/1.6.7-dmcrypt.rc b/sys-fs/cryptsetup/files/1.6.7-dmcrypt.rc
new file mode 100755
index 000000000000..e52ad68b94c2
--- /dev/null
+++ b/sys-fs/cryptsetup/files/1.6.7-dmcrypt.rc
@@ -0,0 +1,340 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ before checkfs fsck
+
+ if grep -qs ^swap= "${conf_file}" ; then
+ before swap
+ fi
+}
+
+# We support multiple dmcrypt instances based on $SVCNAME
+conf_file="/etc/conf.d/${SVCNAME}"
+
+# Get splash helpers if available.
+if [ -e /sbin/splash-functions.sh ] ; then
+ . /sbin/splash-functions.sh
+fi
+
+# Setup mappings for an individual target/swap
+# Note: This relies on variables localized in the main body below.
+dm_crypt_execute() {
+ local dev ret mode foo
+
+ if [ -z "${target}" -a -z "${swap}" ] ; then
+ return
+ fi
+
+ # Set up default values.
+ : ${dmcrypt_key_timeout:=1}
+ : ${dmcrypt_max_timeout:=300}
+ : ${dmcrypt_retries:=5}
+
+ # Handle automatic look up of the source path.
+ if [ -z "${source}" -a -n "${loop_file}" ] ; then
+ source=$(losetup --show -f "${loop_file}")
+ fi
+ case ${source} in
+ *=*)
+ source=$(blkid -l -t "${source}" -o device)
+ ;;
+ esac
+ if [ -z "${source}" ] || [ ! -e "${source}" ] ; then
+ ewarn "source \"${source}\" for ${target} missing, skipping..."
+ return
+ fi
+
+ if [ -n "${target}" ] ; then
+ # let user set options, otherwise leave empty
+ : ${options:=' '}
+ elif [ -n "${swap}" ] ; then
+ if cryptsetup isLuks ${source} 2>/dev/null ; then
+ ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."
+ return
+ fi
+ target=${swap}
+ # swap contents do not need to be preserved between boots, luks not required.
+ # suspend2 users should have initramfs's init handling their swap partition either way.
+ : ${options:='-c aes -h sha1 -d /dev/urandom'}
+ : ${pre_mount:='mkswap ${dev}'}
+ fi
+
+ if [ -n "${loop_file}" ] ; then
+ dev="/dev/mapper/${target}"
+ ebegin " Setting up loop device ${source}"
+ losetup ${source} ${loop_file}
+ fi
+
+ # cryptsetup:
+ # open <device> <name> # <device> is $source
+ # create <name> <device> # <name> is $target
+ local arg1="create" arg2="${target}" arg3="${source}"
+ if cryptsetup isLuks ${source} 2>/dev/null ; then
+ arg1="open"
+ arg2="${source}"
+ arg3="${target}"
+ fi
+
+ # Older versions reported:
+ # ${target} is active:
+ # Newer versions report:
+ # ${target} is active[ and is in use.]
+ if cryptsetup status ${target} | egrep -q ' is active' ; then
+ einfo "dm-crypt mapping ${target} is already configured"
+ return
+ fi
+ splash svc_input_begin ${SVCNAME} >/dev/null 2>&1
+
+ # Handle keys
+ if [ -n "${key}" ] ; then
+ read_abort() {
+ # some colors
+ local ans savetty resettty
+ [ -z "${NORMAL}" ] && eval $(eval_ecolors)
+ einfon " $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) "
+ shift
+ # This is ugly as s**t. But POSIX doesn't provide `read -t`, so
+ # we end up having to implement our own crap with stty/etc...
+ savetty=$(stty -g)
+ resettty='stty ${savetty}; trap - EXIT HUP INT TERM'
+ trap 'eval "${resettty}"' EXIT HUP INT TERM
+ stty -icanon
+ stty min 0 time "$(( $2 * 10 ))"
+ ans=$(dd count=1 bs=1 2>/dev/null) || ans=''
+ eval "${resettty}"
+ if [ -z "${ans}" ] ; then
+ printf '\r'
+ else
+ echo
+ fi
+ case ${ans} in
+ [yY]) return 0;;
+ *) return 1;;
+ esac
+ }
+
+ # Notes: sed not used to avoid case where /usr partition is encrypted.
+ mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg
+ key=${key%:*}
+ case "${mode}" in
+ gpg|reg)
+ # handle key on removable device
+ if [ -n "${remdev}" ] ; then
+ # temp directory to mount removable device
+ local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"
+ if [ ! -d "${mntrem}" ] ; then
+ if ! mkdir -p "${mntrem}" ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: Unable to create temporary mount point '${mntrem}'"
+ return
+ fi
+ fi
+ i=0
+ einfo "Please insert removable device for ${target}"
+ while [ ${i} -lt ${dmcrypt_max_timeout} ] ; do
+ foo=""
+ if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then
+ # keyfile exists?
+ if [ ! -e "${mntrem}${key}" ] ; then
+ umount -n "${mntrem}"
+ rmdir "${mntrem}"
+ einfo "Cannot find ${key} on removable media."
+ read_abort "Abort" ${dmcrypt_key_timeout} && return
+ else
+ key="${mntrem}${key}"
+ break
+ fi
+ else
+ [ -e "${remdev}" ] \
+ && foo="mount failed" \
+ || foo="mount source not found"
+ fi
+ : $((i += 1))
+ read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return
+ done
+ else # keyfile ! on removable device
+ if [ ! -e "${key}" ] ; then
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: keyfile ${key} does not exist."
+ return
+ fi
+ fi
+ ;;
+ *)
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: mode ${mode} is invalid."
+ return
+ ;;
+ esac
+ else
+ mode=none
+ fi
+ ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}"
+ if [ "${mode}" = "gpg" ] ; then
+ : ${gpg_options:='-q -d'}
+ # gpg available ?
+ if command -v gpg >/dev/null ; then
+ i=0
+ while [ ${i} -lt ${dmcrypt_retries} ] ; do
+ # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.
+ # save stdin stdout stderr "values"
+ timeout ${dmcrypt_max_timeout} gpg ${gpg_options} ${key} 2>/dev/null | \
+ cryptsetup --key-file - ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ # The timeout command exits 124 when it times out.
+ [ ${ret} -eq 0 -o ${ret} -eq 124 ] && break
+ : $(( i += 1 ))
+ done
+ eend ${ret} "failure running cryptsetup"
+ else
+ ewarn "${source} will not be decrypted ..."
+ einfo "Reason: cannot find gpg application."
+ einfo "You have to install app-crypt/gnupg first."
+ einfo "If you have /usr on its own partition, try copying gpg to /bin ."
+ fi
+ else
+ if [ "${mode}" = "reg" ] ; then
+ cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ else
+ cryptsetup ${options} ${arg1} ${arg2} ${arg3}
+ ret=$?
+ eend ${ret} "failure running cryptsetup"
+ fi
+ fi
+ if [ -d "${mntrem}" ] ; then
+ umount -n ${mntrem} 2>/dev/null >/dev/null
+ rmdir ${mntrem} 2>/dev/null >/dev/null
+ fi
+ splash svc_input_end ${SVCNAME} >/dev/null 2>&1
+
+ if [ ${ret} -ne 0 ] ; then
+ cryptfs_status=1
+ else
+ if [ -n "${pre_mount}" ] ; then
+ dev="/dev/mapper/${target}"
+ eval ebegin \"" pre_mount: ${pre_mount}"\"
+ eval "${pre_mount}" > /dev/null
+ ewend $? || cryptfs_status=1
+ fi
+ fi
+}
+
+# Lookup optional bootparams
+get_bootparam_val() {
+ # We're given something like:
+ # foo=bar=cow
+ # Return the "bar=cow" part.
+ case $1 in
+ *=*)
+ echo "${1#*=}"
+ ;;
+ esac
+}
+
+start() {
+ local header=true cryptfs_status=0
+ local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev
+
+ local x
+ for x in $(cat /proc/cmdline) ; do
+ case "${x}" in
+ key_timeout=*)
+ dmcrypt_key_timeout=$(get_bootparam_val "${x}")
+ ;;
+ esac
+ done
+
+ while read targetline <&3 ; do
+ case ${targetline} in
+ # skip comments and blank lines
+ ""|"#"*) continue ;;
+ # skip service-specific openrc configs #377927
+ rc_*) continue ;;
+ esac
+
+ ${header} && ebegin "Setting up dm-crypt mappings"
+ header=false
+
+ # check for the start of a new target/swap
+ case ${targetline} in
+ target=*|swap=*)
+ # If we have a target queued up, then execute it
+ dm_crypt_execute
+
+ # Prepare for the next target/swap by resetting variables
+ unset gpg_options key loop_file target options pre_mount post_mount source swap remdev
+ ;;
+
+ gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*)
+ if [ -z "${target}${swap}" ] ; then
+ ewarn "Ignoring setting outside target/swap section: ${targetline}"
+ continue
+ fi
+ ;;
+
+ dmcrypt_*=*)
+ # ignore global options
+ continue
+ ;;
+
+ *)
+ ewarn "Skipping invalid line in ${conf_file}: ${targetline}"
+ ;;
+ esac
+
+ # Queue this setting for the next call to dm_crypt_execute
+ eval "${targetline}"
+ done 3< ${conf_file}
+
+ # If we have a target queued up, then execute it
+ dm_crypt_execute
+
+ ewend ${cryptfs_status} "Failed to setup dm-crypt devices"
+}
+
+stop() {
+ local line header
+
+ # Break down all mappings
+ header=true
+ egrep "^(target|swap)=" ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Removing dm-crypt mappings"
+ header=false
+
+ target= swap=
+ eval ${line}
+
+ [ -n "${swap}" ] && target=${swap}
+ if [ -z "${target}" ] ; then
+ ewarn "invalid line in ${conf_file}: ${line}"
+ continue
+ fi
+
+ ebegin " ${target}"
+ cryptsetup remove ${target}
+ eend $?
+ done
+
+ # Break down loop devices
+ header=true
+ grep '^source=./dev/loop' ${conf_file} | \
+ while read line ; do
+ ${header} && einfo "Detaching dm-crypt loop devices"
+ header=false
+
+ source=
+ eval ${line}
+
+ ebegin " ${source}"
+ losetup -d "${source}"
+ eend $?
+ done
+
+ return 0
+}
diff --git a/sys-fs/cryptsetup/files/cryptsetup-1.6.1-openssl-static.patch b/sys-fs/cryptsetup/files/cryptsetup-1.6.1-openssl-static.patch
new file mode 100644
index 000000000000..e479a305c310
--- /dev/null
+++ b/sys-fs/cryptsetup/files/cryptsetup-1.6.1-openssl-static.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac 2013-03-24 05:02:02.000000000 -0400
++++ b/configure.ac 2013-08-06 15:57:57.844461481 -0400
+@@ -149,8 +149,8 @@
+ if test x$enable_static_cryptsetup = xyes; then
+ saved_PKG_CONFIG=$PKG_CONFIG
+ PKG_CONFIG="$PKG_CONFIG --static"
+- PKG_CHECK_MODULES([OPENSSL], [openssl])
+- CRYPTO_STATIC_LIBS=$OPENSSL_LIBS
++ PKG_CHECK_MODULES([OPENSSL_STATIC], [openssl])
++ CRYPTO_STATIC_LIBS=$OPENSSL_STATIC_LIBS
+ PKG_CONFIG=$saved_PKG_CONFIG
+ fi
+ NO_FIPS([])
diff --git a/sys-fs/cryptsetup/metadata.xml b/sys-fs/cryptsetup/metadata.xml
new file mode 100644
index 000000000000..17bad91dcee8
--- /dev/null
+++ b/sys-fs/cryptsetup/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <use>
+ <flag name="gcrypt">Use <pkg>dev-libs/libgcrypt</pkg> crypto backend</flag>
+ <flag name="kernel">Use kernel crypto backend (mainly for embedded systems)</flag>
+ <flag name="nettle">Use <pkg>dev-libs/nettle</pkg> crypto backend</flag>
+ <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> crypto backend</flag>
+ <flag name="pwquality">Use <pkg>dev-libs/libpwquality</pkg> for password quality checking</flag>
+ <flag name="urandom">Use /dev/urandom instead of /dev/random</flag>
+ <flag name="reencrypt">Build cryptsetup-reencrypt</flag>
+ </use>
+ <upstream>
+ <remote-id type="google-code">cryptsetup</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/davl/Manifest b/sys-fs/davl/Manifest
new file mode 100644
index 000000000000..600c6a67cdee
--- /dev/null
+++ b/sys-fs/davl/Manifest
@@ -0,0 +1 @@
+DIST davl-1.2.4.tar.bz2 47539 SHA256 d0a1b0a2528ff029374c5019b04140ca3a99baacb9576cbaa5ee4e87e6c34fb5 SHA512 71c33c0bfaca7c7557541517ec9e7b084e4d50e7504e02d412442566c6046c8a68fe4020e05a3e2da5c9309bd75ba06abba8f16fad96b476b5c961814d24d602 WHIRLPOOL 9378bbf5e47bce2afb8f7038914b535839da03b65e713072303b5efb23e035b792b82dae6233d0a9eb8730094294009d10f331c2099994019224ddbf6c71dbe4
diff --git a/sys-fs/davl/davl-1.2.4-r1.ebuild b/sys-fs/davl/davl-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..a7707c75d755
--- /dev/null
+++ b/sys-fs/davl/davl-1.2.4-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Visualizes the fragmentation status of ext2/3 filesystems"
+HOMEPAGE="http://davl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2.6:2"
+DEPEND="${RDEPEND}
+ >=sys-fs/e2fsprogs-1.41.7-r1
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.2.1-asneeded.patch \
+ "${FILESDIR}"/${P}-fragment.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin src/{cdavl/cdavl,gdavl/gdavl}
+ dodoc README
+ doman doc/*.8
+}
diff --git a/sys-fs/davl/files/davl-1.2.1-asneeded.patch b/sys-fs/davl/files/davl-1.2.1-asneeded.patch
new file mode 100644
index 000000000000..e7c1c925bbac
--- /dev/null
+++ b/sys-fs/davl/files/davl-1.2.1-asneeded.patch
@@ -0,0 +1,41 @@
+--- src/cdavl/Makefile
++++ src/cdavl/Makefile
+@@ -4,10 +4,6 @@
+ include $(PATH_LIST)
+
+
+-CC = gcc
+-DEBUG =
+-#DEBUG = -DDEBUG
+-CFLAGS = -Wall -g -O -D_FILE_OFFSET_BITS=64 $(DEBUG)
+ HEADERS = cdavl.h ../common/util.h ../drv/liveinfo_app.h
+ OBJS = ../common/util.o
+ CDAVL = cdavl
+--- src/gdavl/Makefile
++++ src/gdavl/Makefile
+@@ -4,22 +4,14 @@
+ include $(PATH_LIST)
+
+
+-CC = gcc
+-CFLAGS1 = -Wall -g -O `gtk-config --cflags --libs`
+-CFLAGS2 = -Wall -g -O `pkg-config --cflags --libs gtk+-2.0`
+-CFLAGS = -D$(GTK_VER)
+-ifeq ($(GTK_VER), GTK2)
+- CFLAGS += $(CFLAGS2)
+-else
+- CFLAGS += $(CFLAGS1)
+-endif
++CFLAGS += -D$(GTK_VER) `pkg-config --cflags gtk+-2.0`
++LDLIBS = `pkg-config --libs gtk+-2.0`
+ DEBUG =
+ #DEBUG = -D DEBUG
+ GDAVL = gdavl
+
+
+-$(GDAVL): gdavl.c if.c gdavl.h
+- $(CC) $(CFLAGS) $(DEBUG) -o $(GDAVL) gdavl.c if.c
++$(GDAVL): gdavl.o if.o
+
+ clean:
+ rm -rf $(GDAVL) *.o test/*.png test/log test/test.log
diff --git a/sys-fs/davl/files/davl-1.2.4-fragment.patch b/sys-fs/davl/files/davl-1.2.4-fragment.patch
new file mode 100644
index 000000000000..2b5e9338700c
--- /dev/null
+++ b/sys-fs/davl/files/davl-1.2.4-fragment.patch
@@ -0,0 +1,20 @@
+cdavl.c:101:53: error: ‘struct ext2_super_block’ has no member named ‘s_log_frag_size’
+cdavl.c:105:53: error: ‘struct ext2_super_block’ has no member named ‘s_frags_per_group’
+
+http://bugs.gentoo.org/425820
+
+--- src/cdavl/cdavl.c
++++ src/cdavl/cdavl.c
+@@ -98,9 +98,11 @@
+ PRINT4("s_free_inodes_count: ", le32_to_cpu(sb->s_free_inodes_count));
+ PRINT4("s_first_data_block: ", le32_to_cpu(sb->s_first_data_block));
+ PRINT4("s_log_block_size: ", le32_to_cpu(sb->s_log_block_size));
++ #if 0
+ PRINT4("s_log_frag_size: ", le32_to_cpu(sb->s_log_frag_size));
+- PRINT4("s_blocks_per_group: ", le32_to_cpu(sb->s_blocks_per_group));
+ PRINT4("s_frags_per_group: ", le32_to_cpu(sb->s_frags_per_group));
++ #endif
++ PRINT4("s_blocks_per_group: ", le32_to_cpu(sb->s_blocks_per_group));
+ PRINT4("s_inodes_per_group: ", le32_to_cpu(sb->s_inodes_per_group));
+ PRINT4("s_mtime: ", le32_to_cpu(sb->s_mtime));
+ PRINT4("s_wtime: ", le32_to_cpu(sb->s_wtime));
diff --git a/sys-fs/davl/metadata.xml b/sys-fs/davl/metadata.xml
new file mode 100644
index 000000000000..37613359a0b7
--- /dev/null
+++ b/sys-fs/davl/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>armin76@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">davl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/dd-rescue/Manifest b/sys-fs/dd-rescue/Manifest
new file mode 100644
index 000000000000..6c917590c385
--- /dev/null
+++ b/sys-fs/dd-rescue/Manifest
@@ -0,0 +1,6 @@
+DIST dd_rescue-1.28.tar.gz 22093 SHA256 4adcc368a1d4ad62577eaf8609809be1678335d54ef565a5a0fa6e1210489f03 SHA512 64a6eb2d6efbe79ca078b8de727ce551acd3a43bc6258b633a4de9ee51933944badc370855c27f05f306d8d3e95332c4b8884f7c11af321a9ac6797f9b02a3a3 WHIRLPOOL 138149efa98d0ade917d10eb6e64bae5cca0e60685eb4e804773e97cd31389f645544a969fd52747aa957260f01fa89db642929a8c36106b915d13eb87715fd4
+DIST dd_rescue-1.33.tar.gz 36923 SHA256 630b4524c0df2109851b9cf2112ce1c5f53c53d3ca11145bb98892ae4a9f8102 SHA512 6e9bab7baa8a723cb459d28575724972df963e7632d588ac06ab2a2a1ea775beb8c88dd3c3db7faf5d3653c8df58f2f29ea01c936a1862017ece1b686ef26936 WHIRLPOOL e81ee54612baedffa58fdc583bf3d8fcbacdfb9188e4540641336d614562dde76323d51854d71a07fee1ac0a350f71a3f09a41188bd5618aeffee5b4abed50c7
+DIST dd_rescue-1.40.tar.gz 47107 SHA256 54545ebbe2be00597d8c9ba3d51abcfdd7ba89f17d51974629e612c2619730ff SHA512 a518f632c24161310bb03265c60d20bc08472b15888c167f8a28ceaaeb67fe5c942f6a320b7a4cce4c9e0fff9e73b549d64ba13bd26f015286698ad5f8c5fed4 WHIRLPOOL 55c091e63d7226d328616835c8aa0a0551a89eb7a708d4a30130fb78fc7ec2e14b93c2d91280de6565bc58e5ec9722f6f7843656fae5d4efebdbb71cce900b26
+DIST dd_rescue-1.44.tar.gz 114799 SHA256 744fa857fff7beed6d00644ea5786ce0d2e83df315b04f7578008e0a9b2853a3 SHA512 16e9072aeda04fe898d36e13d1dfc871642c7d1d1ac79b787f3ffd24ced2e13c605b4b36f66334ee4e258d01eee286ef74862e498a5a9ea5f9bd65a66a6ec213 WHIRLPOOL 5f4bfbb4b952552d0418054015fe5940d1a83050a282fad3a42b708caa26501d41ded98024acf9919acb63604e066008ee695ff616a7c9be5abf38613815e5d6
+DIST dd_rescue-1.45.tar.gz 121426 SHA256 2626fa2842916f6861b4e1ce72284c81e1b6e7323a842911aad4082bdaa4f663 SHA512 88022f38ad0e1ea171f1db014ba5e3f421fe9c35782f01220e27beb03618998860694df6b5d2e96ea4927640952c57153f2a1633dee9c13a2227e17ddd46b160 WHIRLPOOL cbe7d227e70c1314ab15c90f4b5ba3f451f421769ebbb13589f8e66f8d09ca0986d50c0cfecdcce53fbd5a70c3aa027a5b20ea4f8c56ee05b5fc9c7be895fa18
+DIST dd_rescue-1.46.tar.gz 126790 SHA256 9e09b5583f778fe43b6c473998fe0455486d5ffeacbb72b022d6cf5ba8241aba SHA512 efd1bf5d80d4bafa6e6971caa84205dc5df4456a29a9fa3bb56aa984d68675ae3418e8ba3a355906f491f0f2e750c38fd695e37dbd193e554cd41afec3841e28 WHIRLPOOL ac965019d38539962018bcc5a6d32cbf303b4d00d5ed91d643655a820f17bfa1ca81b5123f95220663823e6622d55099a2da08aaacf60cefc37097aa3354c729
diff --git a/sys-fs/dd-rescue/dd-rescue-1.28.ebuild b/sys-fs/dd-rescue/dd-rescue-1.28.ebuild
new file mode 100644
index 000000000000..892319271fae
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.28.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs flag-o-matic
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~mips ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static kernel_linux elibc_glibc"
+
+S=${WORKDIR}/${MY_PN}
+
+src_compile() {
+ use static && append-ldflags -static
+
+ # Passing LDFLAGS together with CFLAGS is not often a good idea, but
+ # in this case it makes it possible to avoid patching; after all it
+ # only builds the progrma whole, not with object files.
+ #
+ # The falloc target creates a dd_rescue binary that uses the
+ # fallocate() function, present in Kernel 2.6.23 and later and GLIBC
+ # 2.10 and later. If somebody can think of a better way to
+ # optionally use it, suggestions are welcome.
+ emake RPM_OPT_FLAGS="${CFLAGS} ${LDFLAGS}" CC="$(tc-getCC)" \
+ $(use kernel_linux && use elibc_glibc && echo "falloc")
+}
+
+src_install() {
+ # easier to install by hand than trying to make sense of the
+ # Makefile.
+ into /
+ dobin dd_rescue
+
+ dodoc README.dd_rescue
+}
diff --git a/sys-fs/dd-rescue/dd-rescue-1.33.ebuild b/sys-fs/dd-rescue/dd-rescue-1.33.ebuild
new file mode 100644
index 000000000000..e5c0bde05c7e
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.33.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static kernel_linux elibc_glibc"
+
+S=${WORKDIR}/${MY_PN}
+
+src_compile() {
+ use static && append-ldflags -static
+
+ # Passing LDFLAGS together with CFLAGS is not often a good idea, but
+ # in this case it makes it possible to avoid patching; after all it
+ # only builds the progrma whole, not with object files.
+ #
+ # The falloc target creates a dd_rescue binary that uses the
+ # fallocate() function, present in Kernel 2.6.23 and later and GLIBC
+ # 2.10 and later. If somebody can think of a better way to
+ # optionally use it, suggestions are welcome.
+ emake RPM_OPT_FLAGS="${CFLAGS} ${LDFLAGS}" CC="$(tc-getCC)" \
+ $(use kernel_linux && use elibc_glibc && echo "falloc")
+}
+
+src_install() {
+ # easier to install by hand than trying to make sense of the
+ # Makefile.
+ into /
+ dobin dd_rescue
+ dodoc README.dd_rescue
+ doman dd_rescue.1
+}
diff --git a/sys-fs/dd-rescue/dd-rescue-1.40.ebuild b/sys-fs/dd-rescue/dd-rescue-1.40.ebuild
new file mode 100644
index 000000000000..d29d995dca5b
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.40.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic autotools
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ sed -i \
+ -e 's:-ldl:$(LDFLAGS) -ldl:' \
+ Makefile
+ eautoreconf
+}
+
+src_compile() {
+ use static && append-ldflags -static
+
+ # The Makefile is a mess. Override a few vars rather than patch it.
+ emake \
+ RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \
+ CFLAGS_OPT='$(CFLAGS)' \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ # easier to install by hand than trying to make sense of the Makefile.
+ dobin dd_rescue
+ dodoc README.dd_rescue
+ doman dd_rescue.1
+}
diff --git a/sys-fs/dd-rescue/dd-rescue-1.44.ebuild b/sys-fs/dd-rescue/dd-rescue-1.44.ebuild
new file mode 100644
index 000000000000..9cb127e12d22
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.44.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic autotools
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="static"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ sed -i \
+ -e 's:-ldl:$(LDFLAGS) -ldl:' \
+ Makefile
+ eautoreconf
+}
+
+src_compile() {
+ use static && append-ldflags -static
+
+ # The Makefile is a mess. Override a few vars rather than patch it.
+ emake \
+ RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \
+ CFLAGS_OPT='$(CFLAGS)' \
+ CC="$(tc-getCC)"
+}
+
+src_install() {
+ # easier to install by hand than trying to make sense of the Makefile.
+ dobin dd_rescue
+ dodoc README.dd_rescue
+ doman dd_rescue.1
+}
diff --git a/sys-fs/dd-rescue/dd-rescue-1.45.ebuild b/sys-fs/dd-rescue/dd-rescue-1.45.ebuild
new file mode 100644
index 000000000000..60a67ebe1505
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.45.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic multilib autotools
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cpu_flags_x86_avx2 lzo cpu_flags_x86_sse4_2 static xattr"
+
+RDEPEND="lzo? ( dev-libs/lzo )
+ xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ sed -i \
+ -e 's:-ldl:$(LDFLAGS) -ldl:' \
+ -e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \
+ Makefile
+ eautoreconf
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ ac_cv_header_attr_xattr_h=$(usex xattr) \
+ ac_cv_lib_lzo2_lzo1x_1_compress=$(usex lzo) \
+ econf
+}
+
+_emake() {
+ local arch
+ case ${ARCH} in
+ x86) arch=i386;;
+ amd64) arch=x86_64;;
+ arm) arch=arm;;
+ arm64) arch=aarch64;;
+ esac
+
+ local os=$(usex kernel_linux Linux IDK)
+
+ # The Makefile is a mess. Override a few vars rather than patch it.
+ emake \
+ MACH="${arch}" \
+ OS="${os}" \
+ HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \
+ HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 0) \
+ RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \
+ CFLAGS_OPT='$(CFLAGS)' \
+ LDFLAGS="${LDFLAGS} -Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/${PN}" \
+ CC="$(tc-getCC)" \
+ "$@"
+}
+
+src_compile() {
+ _emake
+}
+
+src_test() {
+ _emake check
+}
+
+src_install() {
+ # easier to install by hand than trying to make sense of the Makefile.
+ dobin dd_rescue
+ dodir /usr/$(get_libdir)/${PN}
+ cp -pPR libddr_*.so "${ED}"/usr/$(get_libdir)/${PN}/ || die
+ dodoc README.dd_rescue
+ doman dd_rescue.1
+ use lzo && doman ddr_lzo.1
+}
diff --git a/sys-fs/dd-rescue/dd-rescue-1.46.ebuild b/sys-fs/dd-rescue/dd-rescue-1.46.ebuild
new file mode 100644
index 000000000000..7884a21ae73d
--- /dev/null
+++ b/sys-fs/dd-rescue/dd-rescue-1.46.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic multilib autotools
+
+MY_PN=${PN/-/_}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Similar to dd but can copy from source with errors"
+HOMEPAGE="http://www.garloff.de/kurt/linux/ddrescue/"
+SRC_URI="http://www.garloff.de/kurt/linux/ddrescue/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cpu_flags_x86_avx2 lzo cpu_flags_x86_sse4_2 static xattr"
+
+RDEPEND="lzo? ( dev-libs/lzo )
+ xattr? ( sys-apps/attr )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_PN}
+
+src_prepare() {
+ sed -i \
+ -e 's:-ldl:$(LDFLAGS) -ldl:' \
+ -e 's:-shared:$(CFLAGS) $(LDFLAGS) -shared:' \
+ Makefile
+ eautoreconf
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ # OpenSSL is only used by a random helper tool we don't install.
+ ac_cv_header_attr_xattr_h=$(usex xattr) \
+ ac_cv_header_openssl_evp_h=no \
+ ac_cv_lib_lzo2_lzo1x_1_compress=$(usex lzo) \
+ econf
+}
+
+_emake() {
+ local arch
+ case ${ARCH} in
+ x86) arch=i386;;
+ amd64) arch=x86_64;;
+ arm) arch=arm;;
+ arm64) arch=aarch64;;
+ esac
+
+ local os=$(usex kernel_linux Linux IDK)
+
+ # The Makefile is a mess. Override a few vars rather than patch it.
+ emake \
+ MACH="${arch}" \
+ OS="${os}" \
+ HAVE_SSE42=$(usex cpu_flags_x86_sse4_2 1 0) \
+ HAVE_AVX2=$(usex cpu_flags_x86_avx2 1 0) \
+ RPM_OPT_FLAGS="${CFLAGS} ${CPPFLAGS}" \
+ CFLAGS_OPT='$(CFLAGS)' \
+ LDFLAGS="${LDFLAGS} -Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/${PN}" \
+ CC="$(tc-getCC)" \
+ "$@"
+}
+
+src_compile() {
+ _emake
+}
+
+src_test() {
+ _emake check
+}
+
+src_install() {
+ # easier to install by hand than trying to make sense of the Makefile.
+ dobin dd_rescue
+ dodir /usr/$(get_libdir)/${PN}
+ cp -pPR libddr_*.so "${ED}"/usr/$(get_libdir)/${PN}/ || die
+ dodoc README.dd_rescue
+ doman dd_rescue.1
+ use lzo && doman ddr_lzo.1
+}
diff --git a/sys-fs/dd-rescue/metadata.xml b/sys-fs/dd-rescue/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-fs/dd-rescue/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-fs/ddrescue/Manifest b/sys-fs/ddrescue/Manifest
new file mode 100644
index 000000000000..7deb7cc43712
--- /dev/null
+++ b/sys-fs/ddrescue/Manifest
@@ -0,0 +1,3 @@
+DIST ddrescue-1.16.tar.gz 104691 SHA256 76b3f2e5fb0306d24f2632c3e168cccb73dc0a348e3a7089cd9230748ff23de6 SHA512 c775ac34701b63ab7efd0a56cecf5c8b198874239e48383142db0ccb83c193c7101335374dc89efaa815b466258181f458a3589ea4abb230804b553fb42b345d WHIRLPOOL 63361744b8640241c59da06d1404b227d88008881a4360e52b654f4137cbef88b0b4e69118bd17a27dd887cf7a820b9cfcc5604ee226e0d57afd1b6d0ebf96c4
+DIST ddrescue-1.18.1.tar.lz 72233 SHA256 58614b4fd32706bd8cd3664349ca9fd0c0488b27a211d829d29e27e4978ba1a9 SHA512 66493da18f0c0cab5ad692ede2debad2376aeec53b23f96c5063d21da362f724370e785bfe38f5495bc57971d5ed428c6da8155b4eafd7d07a94e5a4d0955c96 WHIRLPOOL ec669a3905f6bac77e998e1cfdb609158141d0e53f9a2998662888253c4523f56e8d203af316d79e57b634ef198ef2acc48cb9d161468bdb86c53d301d9f9e84
+DIST ddrescue-1.19.tar.lz 68354 SHA256 ed8d0c9d9aac80a9110e9cb0d0a91a7390d3bf9f816b67a62ca4eb140f4747b8 SHA512 e95aab2f07b6759b8846ad2866cb763096d81655fb6fb8a718b5b4842eee4d834162817cbde830d2f7bb5dbbd1509a0d794389462c00679b18b63608ec180984 WHIRLPOOL 20cef1400876355dae7255b8075a026e115ed0f3cc35736b44838850716357aa33b8fc23bce97207b20c13ffe2af2e65be6c434c63814910bf04798788f47f06
diff --git a/sys-fs/ddrescue/ddrescue-1.16.ebuild b/sys-fs/ddrescue/ddrescue-1.16.ebuild
new file mode 100644
index 000000000000..ae6a1f54b24f
--- /dev/null
+++ b/sys-fs/ddrescue/ddrescue-1.16.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Copy data from one file or block device to another with read-error recovery"
+HOMEPAGE="http://www.gnu.org/software/ddrescue/ddrescue.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86 ~amd64-linux"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_configure() {
+ # not a normal configure script
+ econf \
+ --prefix="${EPREFIX}"/usr \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_test() {
+ ./testsuite/check.sh "${S}"/testsuite || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-man
+ dodoc ChangeLog README NEWS AUTHORS
+}
diff --git a/sys-fs/ddrescue/ddrescue-1.18.1.ebuild b/sys-fs/ddrescue/ddrescue-1.18.1.ebuild
new file mode 100644
index 000000000000..9564ee28e54c
--- /dev/null
+++ b/sys-fs/ddrescue/ddrescue-1.18.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic unpacker
+
+DESCRIPTION="Copy data from one file or block device to another with read-error recovery"
+HOMEPAGE="http://www.gnu.org/software/ddrescue/ddrescue.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.lz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86 ~amd64-linux"
+IUSE="static"
+
+DEPEND="$(unpacker_src_uri_depends)"
+RDEPEND=""
+
+src_configure() {
+ use static && append-ldflags -static
+
+ # not a normal configure script
+ econf \
+ --prefix="${EPREFIX}"/usr \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_test() {
+ ./testsuite/check.sh "${S}"/testsuite || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-man
+ dodoc ChangeLog README NEWS AUTHORS
+}
diff --git a/sys-fs/ddrescue/ddrescue-1.19.ebuild b/sys-fs/ddrescue/ddrescue-1.19.ebuild
new file mode 100644
index 000000000000..1b57e60e6303
--- /dev/null
+++ b/sys-fs/ddrescue/ddrescue-1.19.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic unpacker
+
+DESCRIPTION="Copy data from one file or block device to another with read-error recovery"
+HOMEPAGE="http://www.gnu.org/software/ddrescue/ddrescue.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.lz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~amd64-linux"
+IUSE="static"
+
+DEPEND="$(unpacker_src_uri_depends)"
+RDEPEND=""
+
+src_configure() {
+ use static && append-ldflags -static
+
+ # not a normal configure script
+ econf \
+ --prefix="${EPREFIX}"/usr \
+ --enable-linux \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_test() {
+ ./testsuite/check.sh "${S}"/testsuite || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-man
+ dodoc ChangeLog README NEWS AUTHORS
+}
diff --git a/sys-fs/ddrescue/metadata.xml b/sys-fs/ddrescue/metadata.xml
new file mode 100644
index 000000000000..91c8a805afc2
--- /dev/null
+++ b/sys-fs/ddrescue/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/devfsd/Manifest b/sys-fs/devfsd/Manifest
new file mode 100644
index 000000000000..6e107462e8dc
--- /dev/null
+++ b/sys-fs/devfsd/Manifest
@@ -0,0 +1 @@
+DIST devfsd-v1.3.25.tar.gz 42645 SHA256 d0b030fdc45b989fe8030dbb0c025fb7229228d88e5e4f056d9499f4056f6d08 SHA512 3bf18edb0fc823b96b938b22fc0f978823acfd37708d24d9fec8a25dfdaced165be6162fd5a20bdf30bfc615699faea8239fc77b99c30f035fd7c6b40e7c8c2c WHIRLPOOL a54cbc26c9591601e60a7468f89fd5d3c2dd633984d5787641ea63cba5ce2a566b08dd3dc0e3bc636b584ab6eb35bf7eec31c05a87e7f1c4cb8425fc848dfccd
diff --git a/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild b/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild
new file mode 100644
index 000000000000..66f6e6aee48a
--- /dev/null
+++ b/sys-fs/devfsd/devfsd-1.3.25-r9.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Daemon for the Linux Device Filesystem"
+HOMEPAGE="http://www.atnf.csiro.au/~rgooch/linux/"
+SRC_URI="ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/daemons/devfsd/devfsd-v${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="<sys-kernel/linux-headers-2.6.18"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-kernel-2.5.patch
+ epatch "${FILESDIR}"/${P}-pic.patch
+ epatch "${FILESDIR}"/${P}-no-nis.patch
+
+ use elibc_uclibc || append-cppflags -DHAVE_NIS
+ sed -i \
+ -e "s:-O2:${CFLAGS}:g" \
+ -e 's:/usr/man:/usr/share/man:' \
+ -e 's:/usr/src/linux:.:' \
+ -e '32,34d;11,16d' -e '6c\' \
+ -e 'DEFINES := -DLIBNSL="\\"/lib/libnsl.so.1\\""' \
+ -e 's:install -s:install:' \
+ GNUmakefile
+ use elibc_uclibc && sed -e 's|libnsl.so.1|libnsl.so.0|' -i GNUmakefile
+ tc-export CC
+}
+
+src_install() {
+ dodir /sbin /usr/share/man /etc
+ emake PREFIX="${D}" install
+ dodoc devfsd.conf INSTALL
+
+ keepdir /etc/devfs.d
+ insinto /etc
+ doins "${FILESDIR}"/devfsd.conf
+
+ insinto /lib/rcscripts/addons
+ doins "${FILESDIR}"/devfs-{start,stop}.sh
+}
+
+pkg_postinst() {
+ echo
+ einfo "You may wish to read the Gentoo Linux Device Filesystem Guide,"
+ einfo "which can be found online at:"
+ einfo " https://wwwold.gentoo.org/doc/en/devfs-guide.xml"
+ echo
+}
diff --git a/sys-fs/devfsd/files/devfs-start.sh b/sys-fs/devfsd/files/devfs-start.sh
new file mode 100755
index 000000000000..b8d832494e95
--- /dev/null
+++ b/sys-fs/devfsd/files/devfs-start.sh
@@ -0,0 +1,28 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+main() {
+ local mymounts=$(awk '($2 == "devfs") { print "yes"; exit 0 }' /proc/filesystems)
+
+ # Is devfs support compiled in?
+ if [[ ${mymounts} == "yes" ]] ; then
+ if [[ ${devfs_automounted} == "no" ]] ; then
+ ebegin "Mounting devfs at /dev"
+ try mount -n -t devfs devfs /dev
+ eend $?
+ else
+ ebegin "Kernel automatically mounted devfs at /dev"
+ eend 0
+ fi
+ ebegin "Starting devfsd"
+ /sbin/devfsd /dev >/dev/null
+ eend $? "Could not start /sbin/devfsd"
+ else
+ devfs="no"
+ fi
+}
+
+main
+
+
+# vim:ts=4
diff --git a/sys-fs/devfsd/files/devfs-stop.sh b/sys-fs/devfsd/files/devfs-stop.sh
new file mode 100755
index 000000000000..0b4856bc82c7
--- /dev/null
+++ b/sys-fs/devfsd/files/devfs-stop.sh
@@ -0,0 +1,16 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+main() {
+ # We need to properly terminate devfsd to save the permissions
+ if [[ -n $(ps --no-heading -C 'devfsd') ]]; then
+ ebegin "Stopping devfsd"
+ killall -15 devfsd &>/dev/null
+ eend $?
+ fi
+}
+
+main
+
+
+# vim:ts=4
diff --git a/sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch b/sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch
new file mode 100644
index 000000000000..bafa600c31ce
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd-1.3.25-kernel-2.5.patch
@@ -0,0 +1,131 @@
+diff -urpN devfsd/GNUmakefile devfsd.kernel25/GNUmakefile
+--- devfsd/GNUmakefile 2003-09-21 02:09:45.082973960 +0200
++++ devfsd.kernel25/GNUmakefile 2003-09-21 02:10:23.317161480 +0200
+@@ -12,13 +12,16 @@ endif
+ all: devfsd rpm.spec
+
+
+-OBJECTS = devfsd.o expression.o compat_name.o
++OBJECTS = devfsd.o expression.o compat_name.o check_kernel.o
+
+ CFLAGS = -O2 -I. -I$(KERNEL_DIR)/include -Wall $(CEXTRAS) $(DEFINES)
+
+ devfsd: $(OBJECTS)
+ $(CC) -O2 -o devfsd $(OBJECTS) $(LDFLAGS) -export-dynamic -ldl
+
++check_kernel.o: check_kernel.c
++ $(CC) -fomit-frame-pointer -O2 -c $<
++
+ install: devfsd
+ if [ ! -e $(SBINDIR) ]; then mkdir -p $(SBINDIR); fi
+ rm -f $(SBINDIR)/devfsd
+diff -urpN devfsd/check_kernel.c devfsd.kernel25/check_kernel.c
+--- devfsd/check_kernel.c 1970-01-01 02:00:00.000000000 +0200
++++ devfsd.kernel25/check_kernel.c 2003-09-21 01:59:56.645430064 +0200
+@@ -0,0 +1,44 @@
++#include <sys/types.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <errno.h>
++#include <asm/unistd.h>
++
++extern char *modules_devfs;
++
++/* copied over from module-init-tools backward_compat.c */
++#ifndef __ia64 /* breaks ia64. */
++static _syscall2(long, create_module, const char *, name, size_t, size);
++#else
++#define create_module(name, size) \
++ syscall(__NR_create_module, (name), (size))
++#endif
++
++/* returns true if we have a 2.5.48+ kernel */
++int check_kernel_version (int verbose)
++{
++ int k25 = 1;
++
++ errno = 0;
++ if (create_module(NULL, 0) >= 0 /* Uh oh, what have I just done? */
++ || errno != ENOSYS)
++ k25 = 0;
++
++ if (verbose)
++ fprintf (stderr, "devfsd: kernel %s detected\n",
++ k25 ? "2.5.48+" : "2.4");
++
++ return k25;
++}
++
++void update_config_file (int verbose)
++{
++ int k25 = check_kernel_version (verbose);
++
++ if (k25)
++ modules_devfs = "/etc/modules.devfs";
++
++ if (verbose)
++ fprintf (stderr, "devfsd: using %s for MODLOAD\n", modules_devfs);
++}
++
+diff -urpN devfsd/devfsd.c devfsd.kernel25/devfsd.c
+--- devfsd/devfsd.c 2003-09-21 02:06:10.763555464 +0200
++++ devfsd.kernel25/devfsd.c 2003-09-21 02:12:17.482805664 +0200
+@@ -396,10 +396,16 @@ EXTERN_FUNCTION (flag st_expr_expand,
+ EXTERN_FUNCTION (const char *get_old_name,
+ (const char *devname, unsigned int namelen,
+ char *buffer, unsigned int major, unsigned int minor) );
+-
++EXTERN_FUNCTION (int check_kernel_version,
++ (int) );
++EXTERN_FUNCTION (void update_config_file,
++ (int) );
+
+ /* Public data */
+ flag syslog_is_open = FALSE;
++/* set to new style, runtime test will override it later */
++char *modules_devfs = "/etc/modules.devfs";
++
+
+
+ /* Public functions */
+@@ -507,7 +513,6 @@ static struct event_type
+ {0xffffffff, NULL, NULL}
+ };
+
+-
+ /* Public functions follow */
+
+ int main (int argc, char **argv)
+@@ -651,6 +656,7 @@ int main (int argc, char **argv)
+ /* Set umask so that mknod(2), open(2) and mkdir(2) have complete control
+ over permissions */
+ umask (0);
++ update_config_file (trace_level);
+ read_config (CONFIG_FILE, FALSE, &event_mask);
+ /* Do the scan before forking, so that boot scripts see the finished
+ product */
+@@ -1217,7 +1223,7 @@ static void action_modload (const struct
+ [RETURNS] Nothing.
+ */
+ {
+- char *argv[6];
++ char *argv[7];
+ char device[STRING_LENGTH];
+ char *env[4] = {"HOME=/", "TERM=linux", /* Safe mode environment */
+ "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL};
+@@ -1240,9 +1246,13 @@ static void action_modload (const struct
+ argv[0] = "/sbin/modprobe";
+ argv[1] = "-k";
+ argv[2] = "-C";
+- argv[3] = "/etc/modules.devfs";
++ argv[3] = modules_devfs;
+ argv[4] = device;
+- argv[5] = NULL;
++ if (check_kernel_version (trace_level))
++ argv[5] = "-q";
++ else
++ argv[5] = NULL;
++ argv[6] = NULL;
+ snprintf (device, sizeof (device), "/dev/%s", info->devname);
+ if (trace_level > 1)
+ fprintf (stderr, "%s modprobe with name: \"%s\"\n",
diff --git a/sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch b/sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch
new file mode 100644
index 000000000000..c676b7e980c9
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd-1.3.25-no-nis.patch
@@ -0,0 +1,69 @@
+--- devfsd/devfsd.c.mps 2003-12-04 15:54:03.000000000 +0100
++++ devfsd/devfsd.c 2003-12-04 16:05:32.000000000 +0100
+@@ -283,8 +283,10 @@
+ #include <regex.h>
+ #include <errno.h>
+ #include <dlfcn.h>
++#ifdef HAVE_NIS
+ #include <rpcsvc/ypclnt.h>
+ #include <rpcsvc/yp_prot.h>
++#endif
+ #include <karma.h>
+ #include "devfsd.h"
+ #include "version.h"
+@@ -414,9 +416,11 @@
+ unsigned long *event_mask);
+ static void process_config_line (CONST char *line, unsigned long *event_mask);
+ static void *dlsym_nofail (const char *file, void *handle, char *symbol);
++#ifdef HAVE_NIS
+ static int process_yp_line (int instatus, char *inkey, int inkeylen,
+ char *inval, int invallen, char *indata);
+ static void load_libnsl (void);
++#endif
+ static flag do_servicing (int fd, unsigned long event_mask);
+ static void service_name (const struct devfsd_notify_struct *info);
+ static void action_permissions (const struct devfsd_notify_struct *info,
+@@ -486,9 +490,11 @@
+ {"fd/2", "stderr"},
+ {NULL, NULL},
+ };
++#ifdef HAVE_NIS
+ static int (*my_yp_all) (char *domain, char *map,
+ struct ypall_callback *callback); /* = NULL */
+ static int (*my_yp_get_default_domain) (char **domainptr); /* = NULL */
++#endif
+ static struct event_type
+ {
+ unsigned int type; /* The DEVFSD_NOTIFY_* value */
+@@ -714,6 +720,7 @@
+ [RETURNS] Nothing.
+ */
+ {
++#ifdef HAVE_NIS
+ if (location[0] == '+')
+ {
+ /* It's a YP map */
+@@ -736,6 +743,7 @@
+ SYSLOG (LOG_ERR, "error reading map: \"%s\"\n", location + 1);
+ exit (1);
+ }
++#endif
+ read_config_file (location, optional, event_mask);
+ } /* End Function read_config */
+
+@@ -1006,6 +1014,7 @@
+ return (result);
+ } /* End Function dlsym_nofail */
+
++#ifdef HAVE_NIS
+ static void load_libnsl (void)
+ {
+ #ifdef LIBNSL /* It comes from a shared object */
+@@ -1034,6 +1043,7 @@
+ if (invallen > 0) process_config_line (inval, (unsigned long *) indata);
+ return (0);
+ } /* End Function process_yp_line */
++#endif
+
+ static flag do_servicing (int fd, unsigned long event_mask)
+ /* [SUMMARY] Service devfs changes until a signal is received.
diff --git a/sys-fs/devfsd/files/devfsd-1.3.25-pic.patch b/sys-fs/devfsd/files/devfsd-1.3.25-pic.patch
new file mode 100644
index 000000000000..67e325333c07
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd-1.3.25-pic.patch
@@ -0,0 +1,16 @@
+--- check_kernel.c.orig 2004-02-06 16:41:32.000000000 -0500
++++ check_kernel.c 2004-02-06 16:41:55.000000000 -0500
+@@ -6,13 +6,8 @@
+
+ extern char *modules_devfs;
+
+-/* copied over from module-init-tools backward_compat.c */
+-#ifndef __ia64 /* breaks ia64. */
+-static _syscall2(long, create_module, const char *, name, size_t, size);
+-#else
+ #define create_module(name, size) \
+ syscall(__NR_create_module, (name), (size))
+-#endif
+
+ /* returns true if we have a 2.5.48+ kernel */
+ int check_kernel_version (int verbose)
diff --git a/sys-fs/devfsd/files/devfsd.conf b/sys-fs/devfsd/files/devfsd.conf
new file mode 100644
index 000000000000..109ac87877c9
--- /dev/null
+++ b/sys-fs/devfsd/files/devfsd.conf
@@ -0,0 +1,139 @@
+# Sample /etc/devfsd.conf configuration file.
+# Richard Gooch <rgooch@atnf.csiro.au> 17-FEB-2002
+#
+# The Gentoo Linux Team - http://www.gentoo.org/
+# - Many fixes, etc
+#
+# $Id$
+
+# Enable full compatibility mode for old device names. You may comment these
+# out if you don't use the old device names. Make sure you know what you're
+# doing!
+REGISTER .* MKOLDCOMPAT
+UNREGISTER .* RMOLDCOMPAT
+
+# You may comment out the above and uncomment the following if you've
+# configured your system to use the original "new" devfs names or the really
+# new names
+#REGISTER ^vc/.* MKOLDCOMPAT
+#UNREGISTER ^vc/.* RMOLDCOMPAT
+#REGISTER ^pty/.* MKOLDCOMPAT
+#UNREGISTER ^pty/.* RMOLDCOMPAT
+#REGISTER ^misc MKOLDCOMPAT
+#UNREGISTER ^misc RMOLDCOMPAT
+
+# You may comment these out if you don't use the original "new" names
+REGISTER .* MKNEWCOMPAT
+UNREGISTER .* RMNEWCOMPAT
+
+# Enable module autoloading. You may comment this out if you don't use
+# autoloading
+LOOKUP .* MODLOAD
+
+# Uncomment the following if you want to set the group to "tty" for the
+# pseudo-tty devices. This is necessary so that mesg(1) can later be used to
+# enable/disable talk requests and wall(1) messages.
+REGISTER ^pty/s.* PERMISSIONS -1.tty 0600
+REGISTER ^pts/.* PERMISSIONS -1.tty 0600
+
+# Uncomment this if you want permissions to be saved and restored
+# NB: Do NOT change the following!
+# Do not do this for pseudo-terminal devices
+REGISTER ^pt[sy]/.* IGNORE
+CHANGE ^pt[sy]/.* IGNORE
+CREATE ^pt[sy]/.* IGNORE
+DELETE ^pt[sy] IGNORE
+REGISTER ^log IGNORE
+CHANGE ^log IGNORE
+CREATE ^log IGNORE
+DELETE ^log IGNORE
+REGISTER .* COPY /lib/dev-state/$devname $devpath
+CHANGE .* COPY $devpath /lib/dev-state/$devname
+CREATE .* COPY $devpath /lib/dev-state/$devname
+DELETE .* CFUNCTION GLOBAL unlink /lib/dev-state/$devname
+RESTORE /lib/dev-state
+
+# You can force default like this :
+# PERMISSIONS owner_and_group access_mode
+
+# ALSA/OSS stuff
+# Comment/change these if you want to change the permissions on
+# the audio devices
+LOOKUP snd MODLOAD ACTION snd
+LOOKUP dsp MODLOAD
+LOOKUP mixer MODLOAD
+LOOKUP midi MODLOAD
+REGISTER sound/.* PERMISSIONS root.audio 660
+REGISTER snd/.* PERMISSIONS root.audio 660
+
+# Uncomment this to let PAM manage devfs
+#REGISTER .* CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath
+
+# Autoload the sg module if generic scsi driver compiled as module.
+#LOOKUP ^sg$ MODLOAD ACTION sg
+
+# Give the cdrom group access to /dev/sg0
+REGISTER ^scsi/host.*/bus.*/target.*/lun.*/generic PERMISSIONS root.cdrom 660
+
+# Give the cdrom group access to the cdrom devices
+REGISTER ^scsi/host.*/bus.*/target.*/lun.*/cd PERMISSIONS root.cdrom 660
+REGISTER ^ide/host.*/bus.*/target.*/lun.*/cd PERMISSIONS root.cdrom 660
+
+# Give the floppy group access to the floppy devices
+REGISTER ^floppy/.* PERMISSIONS root.floppy 660
+
+# Give the usb group access to the usb devices
+REGISTER ^usb/.* PERMISSIONS root.usb 660
+REGISTER ^tts/USB.* PERMISSIONS root.usb 660
+REGISTER ^usb/tts/(.*)$ CFUNCTION GLOBAL mksymlink $devname ttyUSB\1
+UNREGISTER ^usb/tts/(.*)$ CFUNCTION GLOBAL unlink ttyUSB\1
+
+# Video devices
+REGISTER ^v4l/.* PERMISSIONS root.video 660
+REGISTER ^dri/.* PERMISSIONS root.video 660
+REGISTER ^nvidia.* PERMISSIONS root.video 660
+
+# General note for the following auto creation of symlinks:
+#
+# If you change the device that the symlink points to,
+# you should also remove the symlink before restarting
+# devfsd
+
+# Create /dev/cdrom for the first cdrom drive
+LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
+REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
+UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
+
+# Create /dev/dvd for the second cdrom drive
+# (change 'cdroms/cdrom1' to suite your setup)
+# NOTE: We add the fully qualified path here, else some apps
+# have problems to resolve the true device (drip comes to mind)
+#LOOKUP ^dvd$ CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd
+#REGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL mksymlink ${devpath} dvd
+#UNREGISTER ^cdroms/cdrom1$ CFUNCTION GLOBAL unlink dvd
+
+# Create /dev/cdrw for the first cdrom on the scsi bus
+# (change 'sr0' to suite your setup)
+#LOOKUP ^cdrw$ CFUNCTION GLOBAL mksymlink sr0 cdrw
+#REGISTER ^sr0$ CFUNCTION GLOBAL mksymlink $devname cdrw
+#UNREGISTER ^sr0$ CFUNCTION GLOBAL unlink cdrw
+
+# Create /dev/mouse
+LOOKUP ^mouse$ CFUNCTION GLOBAL mksymlink misc/psaux mouse
+REGISTER ^misc/psaux$ CFUNCTION GLOBAL mksymlink $devname mouse
+UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
+
+# Manage USB mouse
+REGISTER ^input/mouse0$ CFUNCTION GLOBAL mksymlink $devname usbmouse
+UNREGISTER ^input/mouse0$ CFUNCTION GLOBAL unlink usbmouse
+REGISTER ^input/mice$ CFUNCTION GLOBAL mksymlink $devname usbmouse
+UNREGISTER ^input/mice$ CFUNCTION GLOBAL unlink usbmouse
+
+# Create compatibility link for broken misc/net/tun driver
+REGISTER ^misc/net/tun$ CFUNCTION GLOBAL unlink net/tun
+REGISTER ^misc/net/tun$ CFUNCTION GLOBAL symlink /dev/$devname net/tun
+
+# Support additional config installed by packages ...
+INCLUDE /etc/devfs.d
+
+# devfsd.conf ends here
diff --git a/sys-fs/devfsd/metadata.xml b/sys-fs/devfsd/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-fs/devfsd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-fs/dfc/Manifest b/sys-fs/dfc/Manifest
new file mode 100644
index 000000000000..94ac17084cac
--- /dev/null
+++ b/sys-fs/dfc/Manifest
@@ -0,0 +1 @@
+DIST dfc-3.0.5.tar.gz 43310 SHA256 3c947a1d6bc53347b1643921dcbf4c6f8fe7eb6167fc1f4e9436366f036d857a SHA512 f828ede8aee0a496518d1ee9583ba71495cdd01ee0d22833e3b46aeb5f5f870ce7de629923d129a7bf795b458feec10f9a16882134dae34dd2ace7ea9eebb134 WHIRLPOOL 060a9aa44a5b4294bc71fabd38b7d55a15fcf65ad3b9bef2d64b98f9e57670f6cb1370ba6b58fa65bfc01d067d9cf911f4e20cbdca5dbeea97b87f721f737423
diff --git a/sys-fs/dfc/dfc-3.0.5-r1.ebuild b/sys-fs/dfc/dfc-3.0.5-r1.ebuild
new file mode 100644
index 000000000000..d3a3569ed47e
--- /dev/null
+++ b/sys-fs/dfc/dfc-3.0.5-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="A simple CLI tool that display file system usage, with colors"
+HOMEPAGE="http://projects.gw-computing.net/projects/dfc"
+SRC_URI="http://projects.gw-computing.net/attachments/download/467/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="nls"
+
+DEPEND="nls? (
+ virtual/libintl
+ sys-devel/gettext
+)"
+RDEPEND="nls? ( virtual/libintl )"
+
+src_configure() {
+ mycmakeargs=(
+ # avoid installing xdg config in /usr
+ -DXDG_CONFIG_DIR="${EPREFIX}"/etc/xdg
+ # use the standard Gentoo doc path
+ -DDFC_DOC_PATH="${EPREFIX}"/usr/share/doc/${PF}
+ # disable automagic dependency
+ $(cmake-utils_use nls NLS_ENABLED)
+ -DLFS_ENABLED=ON
+ -DGRIM=OFF
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/sys-fs/dfc/metadata.xml b/sys-fs/dfc/metadata.xml
new file mode 100644
index 000000000000..e7b8be659b2e
--- /dev/null
+++ b/sys-fs/dfc/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-fs/diskdev_cmds/Manifest b/sys-fs/diskdev_cmds/Manifest
new file mode 100644
index 000000000000..7619d2dce49d
--- /dev/null
+++ b/sys-fs/diskdev_cmds/Manifest
@@ -0,0 +1,3 @@
+DIST diskdev_cmds-332.14.patch.bz2 40477 SHA256 695889250a1faad15d841f86d62af49b492e4db792d683d21c99340e3a35e68a
+DIST diskdev_cmds-332.14.tar.gz 714035 SHA256 a46bec392661a02d9683355baf4442d494e2bcde0ffb094aacc1e57ddc03b3d4 SHA512 e1df91fb5330dc01a79de99dd8b1f389a337a19c2136994d59b7cbca9c2e1cb5f7d47101366dd01db4e23a5d3d7afab41758045bf7402d739fa22182dc922044 WHIRLPOOL bb39c2949c7b05ca82301894954ccd726b5c962d6af61bf04c7e262de3304e788f38c392e8dd526d1038f9389c42033993ca8feb708fd94b7e94fd958db9728e
+DIST diskdev_cmds-332.14_p1.patch.bz2 21989 SHA256 8e6889b318b1015e9be13dc12b3694c8e7077428a1142fbeb503609771f49bda SHA512 aaef096aa6a3f2e09bcc8c1831172c3d68994589ade505153ade00e6f4d0c49263b63212f8616ece597b1ee218a87474bb1c3812d15f34c5bc5c51fd7b72a062 WHIRLPOOL efca536f9c5dcb8308945731094227f7b12b23b0f930a4d88add7780b4f9206631653d9ef008572936426a6fb5641393bd3ff39a393f66e88f6558584f7439e1
diff --git a/sys-fs/diskdev_cmds/diskdev_cmds-332.14.ebuild b/sys-fs/diskdev_cmds/diskdev_cmds-332.14.ebuild
new file mode 100644
index 000000000000..7e52817910dd
--- /dev/null
+++ b/sys-fs/diskdev_cmds/diskdev_cmds-332.14.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="HFS and HFS+ utils ported from OSX, supplies mkfs and fsck"
+HOMEPAGE="http://opendarwin.org"
+SRC_URI="http://darwinsource.opendarwin.org/tarballs/apsl/diskdev_cmds-${PV}.tar.gz
+ mirror://gentoo/diskdev_cmds-${PV}.patch.bz2"
+LICENSE="APSL-2"
+SLOT="0"
+KEYWORDS="-amd64 ~ppc ~x86"
+IUSE=""
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/diskdev_cmds-${PV}.patch
+}
+
+src_compile() {
+ emake -f Makefile.lnx || die "emake failed"
+}
+
+src_install() {
+ exeinto /sbin
+ doexe fsck_hfs.tproj/fsck_hfs
+ doexe newfs_hfs.tproj/newfs_hfs
+ dosym /sbin/newfs_hfs /sbin/mkfs.hfs
+ dosym /sbin/newfs_hfs /sbin/mkfs.hfsplus
+ dosym /sbin/fsck_hfs /sbin/fsck.hfs
+ dosym /sbin/fsck_hfs /sbin/fsck.hfsplus
+ doman newfs_hfs.tproj/newfs_hfs.8
+ newman newfs_hfs.tproj/newfs_hfs.8 mkfs.hfs.8
+ newman newfs_hfs.tproj/newfs_hfs.8 mkfs.hfsplus.8
+ doman fsck_hfs.tproj/fsck_hfs.8
+ newman fsck_hfs.tproj/fsck_hfs.8 fsck.hfs.8
+ newman fsck_hfs.tproj/fsck_hfs.8 fsck.hfsplus.8
+}
diff --git a/sys-fs/diskdev_cmds/diskdev_cmds-332.14_p1.ebuild b/sys-fs/diskdev_cmds/diskdev_cmds-332.14_p1.ebuild
new file mode 100644
index 000000000000..8b1a4dd12615
--- /dev/null
+++ b/sys-fs/diskdev_cmds/diskdev_cmds-332.14_p1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_PV=${PV%_p*}
+
+DESCRIPTION="HFS and HFS+ utils ported from OSX, supplies mkfs and fsck"
+HOMEPAGE="http://opendarwin.org"
+SRC_URI="http://darwinsource.opendarwin.org/tarballs/apsl/diskdev_cmds-${MY_PV}.tar.gz
+ mirror://gentoo/diskdev_cmds-${PV}.patch.bz2"
+LICENSE="APSL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE=""
+DEPEND="dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/diskdev_cmds-${PV}.patch
+ epatch "${FILESDIR}"/diskdev_cmds-respect-cflags.patch
+}
+
+src_compile() {
+ emake -f Makefile.lnx || die "emake failed"
+}
+
+src_install() {
+ into /
+ dosbin fsck_hfs.tproj/fsck_hfs || die "dosbin fsck failed"
+ dosbin newfs_hfs.tproj/newfs_hfs || die "dosbin newfs failed"
+ dosym /sbin/newfs_hfs /sbin/mkfs.hfs || die "dosym mkfs.hfs failed"
+ dosym /sbin/newfs_hfs /sbin/mkfs.hfsplus || die "dosym mkfs.hfsplus failed"
+ dosym /sbin/fsck_hfs /sbin/fsck.hfs || die "dosym fsck.hfs failed"
+ dosym /sbin/fsck_hfs /sbin/fsck.hfsplus || die "dosym fsck.hfsplus failed"
+ doman newfs_hfs.tproj/newfs_hfs.8 || die "doman newfs_hfs.8 failed"
+ newman newfs_hfs.tproj/newfs_hfs.8 mkfs.hfs.8 || die "doman mkfs.hfs.8 failed"
+ newman newfs_hfs.tproj/newfs_hfs.8 mkfs.hfsplus.8 || die "doman mkfs.hfsplus.8 failed"
+ doman fsck_hfs.tproj/fsck_hfs.8 || die "doman fsck_hfs.8 failed"
+ newman fsck_hfs.tproj/fsck_hfs.8 fsck.hfs.8 || die "doman fsck.hfs.8 failed"
+ newman fsck_hfs.tproj/fsck_hfs.8 fsck.hfsplus.8 || die "doman fsck.hfsplus.8 failed"
+}
diff --git a/sys-fs/diskdev_cmds/files/diskdev_cmds-respect-cflags.patch b/sys-fs/diskdev_cmds/files/diskdev_cmds-respect-cflags.patch
new file mode 100644
index 000000000000..3f939f61163a
--- /dev/null
+++ b/sys-fs/diskdev_cmds/files/diskdev_cmds-respect-cflags.patch
@@ -0,0 +1,9 @@
+--- Makefile.lnx.bak 2009-07-22 11:58:10.000000000 -0400
++++ Makefile.lnx 2009-07-22 11:57:37.000000000 -0400
+@@ -1,5 +1,5 @@
+ CC := gcc
+-CFLAGS := -g3 -Wall -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
++CFLAGS += -Wall -I$(PWD)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1
+ SUBDIRS := newfs_hfs.tproj fsck_hfs.tproj
+
+ all clean:
diff --git a/sys-fs/diskdev_cmds/metadata.xml b/sys-fs/diskdev_cmds/metadata.xml
new file mode 100644
index 000000000000..e2ceeff332bf
--- /dev/null
+++ b/sys-fs/diskdev_cmds/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ppc</herd>
+<maintainer>
+<email>josejx@gentoo.org</email>
+<name>Joseph Jezak</name>
+</maintainer>
+<longdescription lang="en">
+HFS+ Filesytstem tools (mkfs.hfsplus and fsck.hfsplus), ported from Apple's
+versions.
+</longdescription>
+</pkgmetadata>
+
diff --git a/sys-fs/dmg2img/Manifest b/sys-fs/dmg2img/Manifest
new file mode 100644
index 000000000000..23e8b3a4eae8
--- /dev/null
+++ b/sys-fs/dmg2img/Manifest
@@ -0,0 +1,5 @@
+DIST dmg2img-1.6.1.tar.gz 38025 SHA256 55e65c1e47bf78f09fb061b2db4f41c515c0cbaa932e3ff3b40bd2d981946ad2
+DIST dmg2img-1.6.2.tar.gz 24541 SHA256 8f1508a70cbe2275023ec293667790a813fada07fb4a39223e07bd44b3967dc5
+DIST dmg2img-1.6.4.tar.gz 24335 SHA256 cbbb8366196eea4609b35807a72b39b9edae7e518748a42c6dc6b69ee19d99ed SHA512 4c40e4b58c010e40661f4061e1c111ce362d341309c0d16669f481f31051f026ac7af5fb1c196ea2da263f79900e03bee3ca88c15cb5ec58617721b01212469c WHIRLPOOL 30c247c90eb624c78e72b2bbd287cb07ce511f0586c96d571fe6451b1ad3b70ceab2cb92cf1e4d7a011bd0177abf8f1b0ffb647f0831dbd3677def0f6e151219
+DIST dmg2img-1.6.5.tar.gz 23442 SHA256 400a16cbe5cb2bf8a9eec4a43ef3546e0329f248bbd2a79f6d9a1ebc0b503308 SHA512 31528a23986848a8ab319768a8254db6b0035324cbac8328ef865b98ab2cddfd606da19a27202c4ef53cdc5dda75aca489859f82115a5dde6fe9b1f20cd6bd46 WHIRLPOOL bbf35c53b42f821603610a33faa1868b2c4d66e76347d39ba2069662c7ea65d3b5aacfa6f2d09e5e602b5fb47e68d3914cd8cab8d6009aba2b6f8fff40f5077d
+DIST dmg2img-1.6.tar.gz 38003 SHA256 c9a8253772eeccc18f3e92f72c7969a034cf2a7856f6a709b601e5a8e5188c48
diff --git a/sys-fs/dmg2img/dmg2img-1.6.1.ebuild b/sys-fs/dmg2img/dmg2img-1.6.1.ebuild
new file mode 100644
index 000000000000..94cbdb407db5
--- /dev/null
+++ b/sys-fs/dmg2img/dmg2img-1.6.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="Converts Apple DMG files to standard HFS+ images"
+HOMEPAGE="http://vu1tur.eu.org/tools"
+#SRC_URI="http://vu1tur.eu.org/tools/download.pl?${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ sed -i -e 's:-s:$(LDFLAGS):g' Makefile || die "sed failed"
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dosbin dmg2img vfdecrypt || die "dosbin failed"
+ dodoc README
+}
diff --git a/sys-fs/dmg2img/dmg2img-1.6.2.ebuild b/sys-fs/dmg2img/dmg2img-1.6.2.ebuild
new file mode 100644
index 000000000000..f247b5a181e5
--- /dev/null
+++ b/sys-fs/dmg2img/dmg2img-1.6.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="Converts Apple DMG files to standard HFS+ images"
+HOMEPAGE="http://vu1tur.eu.org/tools"
+SRC_URI="http://vu1tur.eu.org/tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ sed -i -e 's:-s:$(LDFLAGS):g' Makefile || die "sed failed"
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dosbin dmg2img vfdecrypt || die "dosbin failed"
+ dodoc README
+ doman vfdecrypt.1
+}
diff --git a/sys-fs/dmg2img/dmg2img-1.6.4.ebuild b/sys-fs/dmg2img/dmg2img-1.6.4.ebuild
new file mode 100644
index 000000000000..5f9c703d031b
--- /dev/null
+++ b/sys-fs/dmg2img/dmg2img-1.6.4.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="Converts Apple DMG files to standard HFS+ images"
+HOMEPAGE="http://vu1tur.eu.org/tools"
+SRC_URI="http://vu1tur.eu.org/tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ sed -i -e 's:-s:$(LDFLAGS):g' Makefile || die "sed failed"
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin dmg2img vfdecrypt
+ dodoc README
+ doman vfdecrypt.1
+}
diff --git a/sys-fs/dmg2img/dmg2img-1.6.5.ebuild b/sys-fs/dmg2img/dmg2img-1.6.5.ebuild
new file mode 100644
index 000000000000..711fe160f4df
--- /dev/null
+++ b/sys-fs/dmg2img/dmg2img-1.6.5.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="Converts Apple DMG files to standard HFS+ images"
+HOMEPAGE="http://vu1tur.eu.org/tools"
+SRC_URI="http://vu1tur.eu.org/tools/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ sed -i -e 's:-s:$(LDFLAGS):g' Makefile || die "sed failed"
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin dmg2img vfdecrypt
+ dodoc README
+ doman vfdecrypt.1
+}
diff --git a/sys-fs/dmg2img/dmg2img-1.6.ebuild b/sys-fs/dmg2img/dmg2img-1.6.ebuild
new file mode 100644
index 000000000000..b89b644e2af5
--- /dev/null
+++ b/sys-fs/dmg2img/dmg2img-1.6.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="Converts Apple DMG files to standard HFS+ images"
+HOMEPAGE="http://vu1tur.eu.org/tools"
+#SRC_URI="http://vu1tur.eu.org/tools/download.pl?${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ sed -i -e 's:-s:$(LDFLAGS):g' Makefile || die "sed failed"
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dosbin dmg2img vfdecrypt || die "dosbin failed"
+ dodoc README
+}
diff --git a/sys-fs/dmg2img/metadata.xml b/sys-fs/dmg2img/metadata.xml
new file mode 100644
index 000000000000..05318e4ef169
--- /dev/null
+++ b/sys-fs/dmg2img/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<maintainer>
+<email>josejx@gentoo.org</email>
+<name>Joseph Jezak</name>
+</maintainer>
+<longdescription lang="en">
+ dmg2img is an application that can convert .dmg files, popular on Mac OSX
+ systems, to HFS+ disk images, suitable for mounting on Linux systems.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-fs/dmraid/Manifest b/sys-fs/dmraid/Manifest
new file mode 100644
index 000000000000..a89aedad182c
--- /dev/null
+++ b/sys-fs/dmraid/Manifest
@@ -0,0 +1,3 @@
+DIST dmraid-1.0.0.rc14.tar.bz2 164234 SHA256 a777354d6d69a9b58d84966cc7b37bc3f5c89539f885ad25fd874ed1c388fbec SHA512 0804e1bf91f4707b8845affeb987e68c5a85d97119af27ddba2927c87735a59b86b1fec4f03ac0fbdcde89d779d77e21cab4e6936dd1a82b53a0d8b16eb59768 WHIRLPOOL c5612139d3f24be710fb8e6d51eb6ebe0847dcf804c0c0ba1a5f3142a2680de2b33bfae74bbf3cff704b0da5d9d273c432906f1b7fd46e1057b8ef53cc89ca1e
+DIST dmraid-1.0.0.rc15.tar.bz2 190475 SHA256 30847258b7f946ed908e79af4058bbf2c9a3791728b8231f7c490ca601566c05
+DIST dmraid-1.0.0.rc16-3.tar.bz2 232743 SHA256 93421bd169d71ff5e7d2db95b62b030bfa205a12010b6468dcdef80337d6fbd8 SHA512 7c45e5117adc52fc2094b1b2bad4f4c518a46317a2196611966d72085ba3587c4ac8d1080f9d934888c01788f2b2d3d621c6f0d3e2a023c0fb1f9f3fa7fc127e WHIRLPOOL 87915ea0013766da8a9722b437bfe146b4b2c7560a7814ac6caab92054ddc3b4b59ceb4d413609d5eaab92b5cee67886ade7924455f1dba19f1b8dabc25d3498
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild
new file mode 100644
index 000000000000..be58d8d95f43
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc14.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-info flag-o-matic eutils
+
+MY_PV=${PV/_/.}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/old/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static selinux"
+
+DEPEND=">=sys-fs/lvm2-2.02.45
+ selinux? ( sys-libs/libselinux
+ sys-libs/libsepol )"
+S=${WORKDIR}/${PN}/${MY_PV}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+ if use static && use selinux ; then
+ eerror "ERROR - cannot compile static with libselinux / libsepol"
+ die "USE flag conflicts."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/dmraid-destdir-fix.patch
+}
+
+src_compile() {
+ econf \
+ $(use_enable static static_link) \
+ $(use_enable selinux libselinux) \
+ $(use_enable selinux libsepol) \
+ || die "econf failed"
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/*
+}
+
+pkg_postinst() {
+ einfo "For booting Gentoo from Device-Mapper RAID you can use Genkernel."
+ einfo " "
+ einfo "Genkernel will generate the kernel and the initrd with a statically "
+ einfo "linked dmraid binary (its own version which may not be the same as this version):"
+ einfo "emerge -av sys-kernel/genkernel"
+ einfo "genkernel --dmraid --udev all"
+ einfo " "
+ einfo "If you would rather use this version of DMRAID with Genkernel, copy the distfile"
+ einfo "from your distdir to '/usr/share/genkernel/pkg/' and update the following"
+ einfo "in /etc/genkernel.conf:"
+ einfo "DMRAID_VER=\"${MY_PV/_/.}\""
+ einfo "DMRAID_SRCTAR=\"\${GK_SHARE}/pkg/${A}\""
+ einfo " "
+ ewarn "DMRAID should be safe to use, but no warranties can be given"
+ einfo " "
+}
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild
new file mode 100644
index 000000000000..4f72bc28b0c9
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc15.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-info flag-o-matic eutils
+
+MY_PV=${PV/_/.}
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${MY_PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="static selinux"
+
+DEPEND=">=sys-fs/lvm2-2.02.45
+ selinux? ( sys-libs/libselinux
+ sys-libs/libsepol )"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}/${MY_PV}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+ if use static && use selinux ; then
+ eerror "ERROR - cannot compile static with libselinux / libsepol"
+ die "USE flag conflicts."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-destdir-fix.patch"
+}
+
+src_compile() {
+ econf \
+ $(use_enable static static_link) \
+ $(use_enable selinux libselinux) \
+ $(use_enable selinux libsepol)
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/* || die "dodoc failed"
+}
+
+pkg_postinst() {
+ einfo "For booting Gentoo from Device-Mapper RAID you can use Genkernel."
+ einfo " "
+ einfo "Genkernel will generate the kernel and the initrd with a statically "
+ einfo "linked dmraid binary (its own version which may not be the same as this version):"
+ einfo " emerge -av sys-kernel/genkernel"
+ einfo " genkernel --dmraid --udev all"
+ einfo " "
+ einfo "If you would rather use this version of DMRAID with Genkernel, copy the distfile"
+ einfo "from your distdir to '/usr/share/genkernel/pkg/' and update the following"
+ einfo "in /etc/genkernel.conf:"
+ einfo " DMRAID_VER=\"${MY_PV/_/.}\""
+ einfo " DMRAID_SRCTAR=\"\${GK_SHARE}/pkg/${A}\""
+ einfo " "
+ ewarn "DMRAID should be safe to use, but no warranties can be given"
+ einfo " "
+}
diff --git a/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild b/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild
new file mode 100644
index 000000000000..48de3497b796
--- /dev/null
+++ b/sys-fs/dmraid/dmraid-1.0.0_rc16-r3.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools linux-info flag-o-matic eutils
+
+MY_PV=${PV/_/.}-3
+
+DESCRIPTION="Device-mapper RAID tool and library"
+HOMEPAGE="http://people.redhat.com/~heinzm/sw/dmraid/"
+SRC_URI="http://people.redhat.com/~heinzm/sw/dmraid/src/${PN}-${MY_PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ia64 ppc ppc64 sparc x86"
+IUSE="dietlibc intel_led klibc led mini static"
+REQUIRED_USE="klibc? ( !dietlibc )"
+
+RDEPEND=">=sys-fs/lvm2-2.02.45
+ klibc? ( dev-libs/klibc )
+ dietlibc? ( dev-libs/dietlibc )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( sys-fs/lvm2[static-libs] )"
+
+S=${WORKDIR}/${PN}/${MY_PV}/${PN}
+
+pkg_setup() {
+ if kernel_is lt 2 6 ; then
+ ewarn "You are using a kernel < 2.6"
+ ewarn "DMraid uses recently introduced Device-Mapper features."
+ ewarn "These might be unavailable in the kernel you are running now."
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-undo-p-rename.patch \
+ "${FILESDIR}"/${P}-return-all-sets.patch \
+ "${FILESDIR}"/${P}-static-build-fixes.patch
+ # pkg_check_modules is not in aclocal.m4 by default, and eautoreconf doesnt add it
+ einfo "Appending pkg.m4 from system to aclocal.m4"
+ cat "${ROOT}"/usr/share/aclocal/pkg.m4 >>"${S}"/aclocal.m4 || die "Could not append pkg.m4"
+ epatch_user
+ eautoreconf
+
+ einfo "Creating prepatched source archive for use with Genkernel"
+ # archive the patched source for use with genkernel
+ cd "${WORKDIR}" || die
+ mkdir -p "tmp/${PN}" || die
+ cp -a "${PN}/${MY_PV}/${PN}" "tmp/${PN}" || die
+ mv "tmp/${PN}/${PN}" "tmp/${PN}/${MY_PV}" || die
+ cd tmp || die
+ tar -jcf ${PN}-${MY_PV}-prepatched.tar.bz2 ${PN} || die
+ mv ${PN}-${MY_PV}-prepatched.tar.bz2 .. || die
+}
+
+src_configure() {
+ econf --with-usrlibdir='${prefix}'/$(get_libdir) \
+ $(use_enable static static_link) \
+ $(use_enable mini) \
+ $(use_enable led) \
+ $(use_enable intel_led) \
+ $(use_enable klibc) \
+ $(use_enable dietlibc)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc CHANGELOG README TODO KNOWN_BUGS doc/*
+ insinto /usr/share/${PN}
+ doins "${WORKDIR}"/${PN}-${MY_PV}-prepatched.tar.bz2
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "For booting Gentoo from Device-Mapper RAID you can use a Genkernel initramfs."
+ elog
+ elog "Genkernel will generate the kernel and the initramfs with a statically "
+ elog "linked dmraid binary (its own version which may not be the same as this version):"
+ elog "\t emerge -av sys-kernel/genkernel"
+ elog "\t genkernel --dmraid all"
+ fi
+ if [[ ${REPLACING_VERSIONS} != ${PVR} ]]; then
+ elog
+ elog "A pre-patched distfile of this version of DMRAID has been installed at"
+ elog "/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2 , to support using it within a"
+ elog "Genkernel initramfs."
+ elog
+ fi
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "If you would rather use this version of DMRAID with Genkernel, update the following"
+ elog "in /etc/genkernel.conf:"
+ elog "\t DMRAID_VER=\"${MY_PV}\""
+ elog "\t DMRAID_SRCTAR=\"/usr/share/${PN}/${PN}-${MY_PV}-prepatched.tar.bz2\""
+ elog
+ fi
+}
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch
new file mode 100644
index 000000000000..1ce8834ebadd
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-devsk-isw.patch
@@ -0,0 +1,24 @@
+--- ./lib/device/scsi.c.org 2009-06-25 15:22:26.605895909 -0700
++++ ./lib/device/scsi.c 2009-06-25 15:56:39.784749181 -0700
+@@ -110,7 +110,9 @@
+ }
+
+ ret = ret &&
+- (di->serial = dbg_strdup((char *) &response[p->start + 1]));
++ (di->serial = dbg_strdup(remove_white_space
++ (lc, (char *)&response[p->start + 1],
++ MAX_RESPONSE_LEN)));
+ }
+
+ dbg_free(response);
+--- ./lib/metadata/metadata.c.org 2009-06-25 17:32:19.856309659 -0700
++++ ./lib/metadata/metadata.c 2009-06-25 17:32:35.502920755 -0700
+@@ -839,7 +839,7 @@
+ */
+ if (T_GROUP(rs)) {
+ _discover_partitions(lc, &rs->sets);
+- return;
++ continue;
+ }
+
+ /*
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch
new file mode 100644
index 000000000000..6636b0563086
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc15-undo-p-rename.patch
@@ -0,0 +1,13 @@
+Author: Giuseppe Iuculano <giuseppe@iuculano.it>
+Description: Removed "p" from device name. A proper upgrade script is needed before using it.
+--- a/1.0.0.rc15/lib/format/partition/dos.c
++++ b/1.0.0.rc15/lib/format/partition/dos.c
+@@ -31,7 +31,7 @@ _name(struct lib_context *lc, struct rai
+ {
+ const char *base = get_basename(lc, rd->di->path);
+
+- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc),
++ return type ? snprintf(str, len, "%s%u", base,
+ partition) : snprintf(str, len, "%s", base);
+ }
+
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch
new file mode 100644
index 000000000000..cf3018863ffd
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-as-needed2.patch
@@ -0,0 +1,11 @@
+--- 1.0.0.rc16/make.tmpl.in 2010-08-16 10:22:32.000000000 -0400
++++ 1.0.0.rc16/make.tmpl.in 2010-08-16 10:42:49.000000000 -0400
+@@ -136,7 +136,7 @@
+
+ %.so: $(OBJECTS)
+ $(CC) -shared -Wl,-soname,$(notdir $@).$(DMRAID_LIB_VERSION) \
+- -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event
++ $(LDFLAGS) -Wl,--version-script,.export.sym $(OBJECTS) -o $@ -ldevmapper-event -ldl
+
+ $(LIB_STATIC): $(OBJECTS)
+ $(RM) $@
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch
new file mode 100644
index 000000000000..1e6c71322498
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-return-all-sets.patch
@@ -0,0 +1,11 @@
+--- a/1.0.0.rc16/lib/metadata/metadata.c 2009-11-27 21:57:50.182129589 -0800
++++ b/1.0.0.rc16/lib/metadata/metadata.c 2009-11-27 21:57:58.950964293 -0800
+@@ -839,7 +839,7 @@
+ */
+ if (T_GROUP(rs)) {
+ _discover_partitions(lc, &rs->sets);
+- return;
++ continue;
+ }
+
+ /*
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch
new file mode 100644
index 000000000000..298811701e4e
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-static-build-fixes.patch
@@ -0,0 +1,110 @@
+--- tools/Makefile.in.old 2010-05-31 07:18:31.000000000 -0400
++++ tools/Makefile.in 2010-12-13 13:15:22.000000000 -0500
+@@ -60,17 +60,23 @@
+ ifeq ("@KLIBC@", "no")
+ ifeq ("@STATIC_LINK@", "no")
+ LDFLAGS += -rdynamic
++ MYLIBOBJ=$(top_builddir)/lib/libdmraid.so
+ else
+ LDFLAGS += -static
++ MYLIBOBJ=$(top_builddir)/lib/libdmraid.a
++ DMRAIDLIBS += \
++ $(DEVMAPPEREVENT_LIBS) \
++ $(DEVMAPPER_LIBS) \
++ $(DL_LIBS)
+ endif
+ endif
+
+ .PHONY: install_dmraid_tools
+
+-dmraid: $(OBJECTS) $(top_builddir)/lib/libdmraid.a
++dmraid: $(OBJECTS) $(MYLIBOBJ)
+ $(CC) -o $@ $(OBJECTS) $(LDFLAGS) -L$(top_builddir)/lib $(DMRAIDLIBS) $(LIBS)
+
+-dmevent_tool: $(OBJECTS2) $(top_builddir)/lib/libdmraid.a
++dmevent_tool: $(OBJECTS2) $(MYLIBOBJ)
+ $(CC) -o $@ $(OBJECTS2) $(INCLUDES) $(LDFLAGS) -L$(top_builddir)/lib \
+ $(DMEVENTTOOLLIBS) $(DMRAIDLIBS) $(LIBS)
+
+--- lib/Makefile.in.old 2010-10-27 07:31:46.000000000 -0400
++++ lib/Makefile.in 2010-12-13 13:04:16.000000000 -0500
+@@ -60,11 +60,11 @@
+ USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \
+ $(AWK) -f $(top_srcdir)/tools/relpath.awk)
+
+-TARGETS = $(LIB_STATIC)
++TARGETS = $(LIB_STATIC) $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+
+ ifeq ("@KLIBC@", "no")
+ ifeq ("@STATIC_LINK@", "no")
+- TARGETS += $(LIB_SHARED) $(LIB_EVENTS_SHARED)
++ TARGETS = $(LIB_SHARED) $(LIB_EVENTS_SHARED)
+ endif
+ endif
+
+--- configure.in 2010-05-31 07:18:30.000000000 -0400
++++ configure.in.new 2010-12-07 13:30:40.000000000 -0500
+@@ -155,6 +155,15 @@
+ Default is dynamic linking]),
+ [STATIC_LINK=$enableval], [STATIC_LINK=no])
+
++if test "x$STATIC_LINK" != "xno"; then
++ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
++ fi
++ PKG_CONFIG="${PKG_CONFIG} --static"
++ ac_cv_env_PKG_CONFIG_set=set
++fi
++PKG_PROG_PKG_CONFIG([0.2])
++
+ dnl Enables shared libdmraid
+ AC_ARG_ENABLE(shared_lib,
+ AC_HELP_STRING([--enable-shared_lib], [Use this to generate shared
+@@ -248,23 +257,31 @@
+ AC_HELP_STRING([--with-devmapper-prefix=PFX],
+ [Where is devmapper library installed]),
+ [DEVMAPPER_LIBS="-L$withval/lib"
+- DEVMAPPER_CFLAGS="-I$withval/include"],
++ DEVMAPPER_CFLAGS="-I$withval/include"
++ dmprefix=$withval],
+ [DEVMAPPER_LIBS=
+- DEVMAPPER_CFLAGS=])
+-save_LDFLAGS=$LDFLAGS
+-save_CPPFLAGS=$CPPFLAGS
+-LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
+-CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
+-AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
+- [DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
+- [AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
+-AC_CHECK_LIB(devmapper, dm_task_set_name,
+- [DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
+- [AC_MSG_ERROR([device-mapper library is missing])])
+-AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
+- [AC_MSG_ERROR([Missing headers device-mapper headers])])
+-CPPFLAGS=$save_CPPFLAGS
+-LDFLAGS=$save_LDFLAGS
++ DEVMAPPER_CFLAGS=
++ dmprefix=no])
++if test "x$dmprefix" = xno ; then
++ PKG_CHECK_MODULES([DEVMAPPER],[devmapper],
++ [PKG_CHECK_MODULES([DEVMAPPEREVENT],[devmapper-event])
++ ])
++else
++ save_LDFLAGS=$LDFLAGS
++ save_CPPFLAGS=$CPPFLAGS
++ LDFLAGS="$LDFLAGS $DEVMAPPER_LIBS"
++ CPPFLAGS="$CPPFLAGS $DEVMAPPER_CFLAGS"
++ AC_CHECK_LIB(devmapper-event, dm_event_handler_create,
++ [DEVMAPPEREVENT_LIBS="$DEVMAPPER_LIBS -ldevmapper-event"],
++ [AC_MSG_ERROR([device-mapper-event library is either missing or is too old and badly linked])])
++ AC_CHECK_LIB(devmapper, dm_task_set_name,
++ [DEVMAPPER_LIBS="$DEVMAPPER_LIBS -ldevmapper"],
++ [AC_MSG_ERROR([device-mapper library is missing])])
++ AC_CHECK_HEADERS(libdevmapper.h libdevmapper-event.h,,
++ [AC_MSG_ERROR([Missing headers device-mapper headers])])
++ CPPFLAGS=$save_CPPFLAGS
++ LDFLAGS=$save_LDFLAGS
++fi
+
+ VERSION=$srcdir/tools/VERSION
+ DMRAID_LIB_MAJOR=$(cut -d. -f1 $VERSION) \ No newline at end of file
diff --git a/sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch
new file mode 100644
index 000000000000..6636b0563086
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-1.0.0_rc16-undo-p-rename.patch
@@ -0,0 +1,13 @@
+Author: Giuseppe Iuculano <giuseppe@iuculano.it>
+Description: Removed "p" from device name. A proper upgrade script is needed before using it.
+--- a/1.0.0.rc15/lib/format/partition/dos.c
++++ b/1.0.0.rc15/lib/format/partition/dos.c
+@@ -31,7 +31,7 @@ _name(struct lib_context *lc, struct rai
+ {
+ const char *base = get_basename(lc, rd->di->path);
+
+- return type ? snprintf(str, len, "%s%s%u", base, OPT_STR_PARTCHAR(lc),
++ return type ? snprintf(str, len, "%s%u", base,
+ partition) : snprintf(str, len, "%s", base);
+ }
+
diff --git a/sys-fs/dmraid/files/dmraid-destdir-fix.patch b/sys-fs/dmraid/files/dmraid-destdir-fix.patch
new file mode 100644
index 000000000000..07c6b442f9a6
--- /dev/null
+++ b/sys-fs/dmraid/files/dmraid-destdir-fix.patch
@@ -0,0 +1,34 @@
+--- make.tmpl.in.old 2006-09-03 14:38:36.000000000 -0400
++++ make.tmpl.in 2006-09-03 14:37:43.000000000 -0400
+@@ -21,21 +21,21 @@
+ SOFLAG += @SOFLAG@
+
+ # Setup directory variables
+-prefix = $(DESTDIR)@prefix@
+-exec_prefix = $(DESTDIR)@exec_prefix@
+-bindir = @bindir@
++prefix = @prefix@
++exec_prefix = @exec_prefix@
++bindir = $(DESTDIR)@bindir@
+ ifeq ("@KLIBC@", "no")
+- libdir = @libdir@
+- sbindir = @sbindir@
+- includedir = @includedir@
+- infodir = @infodir@
+- mandir = @mandir@
++ libdir = $(DESTDIR)@libdir@
++ sbindir = $(DESTDIR)@sbindir@
++ includedir = $(DESTDIR)@includedir@
++ infodir = $(DESTDIR)@infodir@
++ mandir = $(DESTDIR)@mandir@
+ else
+ libdir = $(DESTDIR)@KLIBC_LIB_DIR@
+ sbindir = $(DESTDIR)@KLIBC_SBIN_DIR@
+ includedir = $(DESTDIR)@KLIBC_INCLUDE_DIR@
+- infodir = @infodir@
+- mandir = @mandir@
++ infodir = $(DESTDIR)@infodir@
++ mandir = $(DESTDIR)@mandir@
+ endif
+
+
diff --git a/sys-fs/dmraid/metadata.xml b/sys-fs/dmraid/metadata.xml
new file mode 100644
index 000000000000..e357fd86cf1d
--- /dev/null
+++ b/sys-fs/dmraid/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name='dietlibc'>Compile against <pkg>dev-libs/dietlibc</pkg></flag>
+ <flag name='intel_led'>Enable Intel LED support</flag>
+ <flag name='klibc'>Compile against <pkg>dev-libs/klibc</pkg></flag>
+ <flag name='led'>Enable LED support</flag>
+ <flag name='mini'>Create a minimal binary suitable for early boot environments</flag>
+ </use>
+ <maintainer>
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+ </maintainer>
+ <longdescription>This software discovers, activates, deactivates and displays properties of software RAID sets eg: ATARAID and contained DOS partitions.</longdescription>
+</pkgmetadata>
diff --git a/sys-fs/dosfstools/Manifest b/sys-fs/dosfstools/Manifest
new file mode 100644
index 000000000000..63350b070646
--- /dev/null
+++ b/sys-fs/dosfstools/Manifest
@@ -0,0 +1,3 @@
+DIST dosfstools-3.0.26.tar.xz 79196 SHA256 468442fe8cd93961047d5cd67f7b67793126575103a67cd131330512b4893e75 SHA512 52b04950268ed4750d5c4d61b613f0f0e9083e91301499b8bf82efd125c75ecaeb444fdd682fa11ec1ce525d32a70937f621430b9995ea920f14d7b35a07b4ca WHIRLPOOL 6a581e8d0fef575c76330a69c063f46bccc7cbc673247228f7b4565e381cd93d7b847ff9afe4ed4c4318a86d456a65829dea2da3016e786c34e3d0f32b0ea399
+DIST dosfstools-3.0.27.tar.xz 79944 SHA256 85768eac8bd28d3bab62efb6f6d793c65b3fb81b9b38a5fe0b73e12f5ed158a8 SHA512 cf81a396f9e26e825f096c07576f161b77295255aa77a0dcc5c862eab2b0bb83bb3e7b1426b3fdb66afc3a45ea49340efb0be65dfa996dabc57eeb28c9420f83 WHIRLPOOL 1aa92d063b1697fa92343799e2af8313b3e480f5922d1c56d72d321cb6388b0d2b247a2200ec07dee0112a1101acb6a9c82143b21ee2bb750726e250dbcb99f6
+DIST dosfstools-3.0.28.tar.xz 82980 SHA256 ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2 SHA512 7325a9e05f51715b358cab0a8fa8f8096422b470f1a43eecfab2adbb954e1daf6a24003121be5b3a22de5fcb3e3adffbf1551e2158852b6663fd57a109f057ad WHIRLPOOL b584aa1dee4db96c04f19b6ac46b6322c533fcadbafb09546412e4d6a7568e23abe6985389dc446dacbe2d14f36dd7a8b52fc83b93ab1f5864b4b61f14f6ffd0
diff --git a/sys-fs/dosfstools/dosfstools-3.0.26.ebuild b/sys-fs/dosfstools/dosfstools-3.0.26.ebuild
new file mode 100644
index 000000000000..e57fc847c746
--- /dev/null
+++ b/sys-fs/dosfstools/dosfstools-3.0.26.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="DOS filesystem tools - provides mkdosfs, mkfs.msdos, mkfs.vfat"
+HOMEPAGE="http://www.daniel-baumann.ch/software/dosfstools/"
+SRC_URI="http://www.daniel-baumann.ch/files/software/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+RESTRICT="test" # there is no test target #239071
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0.20-name-ext.patch
+ sed -i \
+ -e "/^PREFIX/s:=.*:= ${EPREFIX}/usr:" \
+ -e '/^OPTFLAGS/d' \
+ -e '/^DEBUGFLAGS/d' \
+ -e "/\$(DOCDIR)/s:${PN}:${PF}:" \
+ Makefile || die
+ append-lfs-flags
+ tc-export CC
+}
diff --git a/sys-fs/dosfstools/dosfstools-3.0.27.ebuild b/sys-fs/dosfstools/dosfstools-3.0.27.ebuild
new file mode 100644
index 000000000000..926cbb9e6ca7
--- /dev/null
+++ b/sys-fs/dosfstools/dosfstools-3.0.27.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="DOS filesystem tools - provides mkdosfs, mkfs.msdos, mkfs.vfat"
+HOMEPAGE="http://www.daniel-baumann.ch/software/dosfstools/"
+SRC_URI="https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+RESTRICT="test" # there is no test target #239071
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0.20-name-ext.patch
+ sed -i \
+ -e "/^PREFIX/s:=.*:= ${EPREFIX}/usr:" \
+ -e '/^OPTFLAGS/d' \
+ -e '/^DEBUGFLAGS/d' \
+ -e "/\$(DOCDIR)/s:${PN}:${PF}:" \
+ Makefile || die
+ append-lfs-flags
+ tc-export CC
+}
diff --git a/sys-fs/dosfstools/dosfstools-3.0.28.ebuild b/sys-fs/dosfstools/dosfstools-3.0.28.ebuild
new file mode 100644
index 000000000000..d166419eaa7b
--- /dev/null
+++ b/sys-fs/dosfstools/dosfstools-3.0.28.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="DOS filesystem tools - provides mkdosfs, mkfs.msdos, mkfs.vfat"
+HOMEPAGE="http://www.daniel-baumann.ch/software/dosfstools/"
+SRC_URI="https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE=""
+
+RESTRICT="test" # there is no test target #239071
+
+src_prepare() {
+ sed -i \
+ -e "/^PREFIX/s:=.*:= ${EPREFIX}/usr:" \
+ -e '/^OPTFLAGS/d' \
+ -e '/^DEBUGFLAGS/d' \
+ -e "/\$(DOCDIR)/s:${PN}:${PF}:" \
+ Makefile || die
+ append-lfs-flags
+ tc-export CC
+}
diff --git a/sys-fs/dosfstools/files/dosfstools-3.0.20-name-ext.patch b/sys-fs/dosfstools/files/dosfstools-3.0.20-name-ext.patch
new file mode 100644
index 000000000000..71149bd4d803
--- /dev/null
+++ b/sys-fs/dosfstools/files/dosfstools-3.0.20-name-ext.patch
@@ -0,0 +1,29 @@
+avoid fortify warnings about going beyond array bounds as the strcmp
+assumes name[8] and ext[3] are together
+
+--- dosfstools-3.0.20/src/check.c
++++ dosfstools-3.0.20/src/check.c
+@@ -264,7 +264,7 @@
+ {
+ int i, spc, suspicious = 0;
+ const char *bad_chars = atari_format ? "*?\\/:" : "*?<>|\"\\/:";
+- const unsigned char *name = file->dir_ent.name;
++ const unsigned char *name = file->dir_ent.name_ext;
+ const unsigned char *ext = file->dir_ent.ext;
+
+ /* Do not complain about (and auto-correct) the extended attribute files
+--- dosfstools-3.0.20/src/fsck.fat.h
++++ dosfstools-3.0.20/src/fsck.fat.h
+@@ -126,7 +126,12 @@
+ };
+
+ typedef struct {
++ union {
++ struct {
+ __u8 name[8], ext[3]; /* name and extension */
++ };
++ __u8 name_ext[11];
++ };
+ __u8 attr; /* attribute bits */
+ __u8 lcase; /* Case for base and extension */
+ __u8 ctime_ms; /* Creation time, milliseconds */
diff --git a/sys-fs/dosfstools/metadata.xml b/sys-fs/dosfstools/metadata.xml
new file mode 100644
index 000000000000..afead5b884b9
--- /dev/null
+++ b/sys-fs/dosfstools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <upstream>
+ <remote-id type="github">dosfstools/dosfstools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/duperemove/Manifest b/sys-fs/duperemove/Manifest
new file mode 100644
index 000000000000..c1911b8eeb8b
--- /dev/null
+++ b/sys-fs/duperemove/Manifest
@@ -0,0 +1,5 @@
+DIST duperemove-0.09.1.tar.gz 54978 SHA256 58d5635fa48bf88108dd833453638ad394427750f58b5ee0f3f1a8f1ec9c141b SHA512 49de99b64c8b0a71a47474480f33b07f2e6602c355621a9d0c6c92a3b7c2f2f5e6c03abc4e2459a1b96fa9543767c0abe48c5c63daf53962a3033a3b1984a037 WHIRLPOOL bed45acfd63f49f44832589964a305614649b6f41013295d1710d784f8dfeb34ff5721ae641790b97b70541222987135377913843b516850f62689ad66a18661
+DIST duperemove-0.09.2.tar.gz 55715 SHA256 2f7155bb916f4827a940c7ceb16c785b529320e621d3c7cbbd78639a06e65094 SHA512 acc1c16ed3faf08e54d4adfcc9f852d2c967981bc461ab45b0673f46f2e86109020d56e641da9764d46f2cc53cbcad5d2aa014357a819ae170375d784b2c08c5 WHIRLPOOL b5cd27237fadbe9aecf76abf63788bcbbabcc17625f1d3daeeee2b315b1a3b9b67fa9309703857e0c564d53fd1573983aa9a55c5b406a56855af7911375bc60b
+DIST duperemove-0.09.3.tar.gz 55722 SHA256 349b047cfb388f2d616695b4ecbfa091243f84024bd75fbbbd7b88fb498794a0 SHA512 fe2a19088ec9ac3dda35da8b9580ddcc1c3b49e60824f2c1bbf8c013756c060b4c9663d1977bb6622c4de19754fd4a1011cc09ef3c785c2b4b218e0c9fb15b87 WHIRLPOOL 022eba5fb6ad1a4c74a4843762e7ccc7f6ba8187adbd6eb1bbe0168482cdd57664d7f6d9b4715d36866a8d026786abcf1e77ec87530f46fbea59b1357d4c90a4
+DIST duperemove-0.09.4.tar.gz 55725 SHA256 9d4c7fe0fd7ae3acb8c144e5fa8648749366c1e67a97ecbb28f07df0bb72fb29 SHA512 dff728a34bdf8df71aa13b7f9c8ffae8ce643337f4dafacb3ceeb778d326b1885f63ae03215c6d714c4fcd7b2f26b03e47d7ad3a42eca3f2d5de5b596b653bf1 WHIRLPOOL 806e5469ac7fbd6b9a1e3803f153a6a2e5eecc14fa05b9f08b3d5b1f16609fb5bc2c576c45133ac6c6a76e5d63fce4a98d44ab4e8b180b5cbccf06355d3967bc
+DIST duperemove-0.09.5.tar.gz 56175 SHA256 8c8c781ab53435dfcc114d2a500525c72428fdbafc14ead10de115d77b447b69 SHA512 111127d9ab7d5567de8393197cf5bc977db1f64b7405fd848e1ca5aaa5ca7a3057fa06b61b161d0dfc45e0c5ebcc2406218d9a834db519c7ca348cdc7a0fe2f2 WHIRLPOOL aff0d6cbab8f6f76cc528316dd17656e3b190809e3955bf83f59745b5dfd085e17b832dc09b4aa3ca6312bbfb199bea0f3ecb4f59d1bcc11c1743d97da93213c
diff --git a/sys-fs/duperemove/duperemove-0.09.1.ebuild b/sys-fs/duperemove/duperemove-0.09.1.ebuild
new file mode 100644
index 000000000000..9d7fc7a7f5f2
--- /dev/null
+++ b/sys-fs/duperemove/duperemove-0.09.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+DESCRIPTION="Btrfs deduplication utility."
+
+HOMEPAGE="https://github.com/markfasheh/duperemove"
+
+SRC_URI="https://github.com/markfasheh/duperemove/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+
+SLOT="0"
+
+KEYWORDS="~amd64"
+
+DEPEND="dev-libs/glib:2="
+
+RDEPEND="${DEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/sys-fs/duperemove/duperemove-0.09.2.ebuild b/sys-fs/duperemove/duperemove-0.09.2.ebuild
new file mode 100644
index 000000000000..8936e1abfcb8
--- /dev/null
+++ b/sys-fs/duperemove/duperemove-0.09.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Btrfs deduplication utility"
+HOMEPAGE="https://github.com/markfasheh/duperemove"
+SRC_URI="https://github.com/markfasheh/duperemove/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-libs/glib:2=
+ dev-libs/libgcrypt:0="
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # https://github.com/markfasheh/duperemove/issues/53#issuecomment-89796552
+ sed -i -e '/glib2_mutex_unlock/s:mutex_lock:mutex_unlock:' duperemove.c || die
+}
+
+src_compile() {
+ # CC & CFLAGS are set via = so need to override them
+ # LIBRARY_FLAGS are set via += so need to pass them via env
+ export LIBRARY_FLAGS="${LDFLAGS}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Wall"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/sys-fs/duperemove/duperemove-0.09.3.ebuild b/sys-fs/duperemove/duperemove-0.09.3.ebuild
new file mode 100644
index 000000000000..fb5407dddd23
--- /dev/null
+++ b/sys-fs/duperemove/duperemove-0.09.3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Btrfs deduplication utility"
+HOMEPAGE="https://github.com/markfasheh/duperemove"
+SRC_URI="https://github.com/markfasheh/duperemove/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-libs/glib:2=
+ dev-libs/libgcrypt:0="
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ # CC & CFLAGS are set via = so need to override them
+ # LIBRARY_FLAGS are set via += so need to pass them via env
+ export LIBRARY_FLAGS="${LDFLAGS}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Wall"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/sys-fs/duperemove/duperemove-0.09.4.ebuild b/sys-fs/duperemove/duperemove-0.09.4.ebuild
new file mode 100644
index 000000000000..fb5407dddd23
--- /dev/null
+++ b/sys-fs/duperemove/duperemove-0.09.4.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Btrfs deduplication utility"
+HOMEPAGE="https://github.com/markfasheh/duperemove"
+SRC_URI="https://github.com/markfasheh/duperemove/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-libs/glib:2=
+ dev-libs/libgcrypt:0="
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ # CC & CFLAGS are set via = so need to override them
+ # LIBRARY_FLAGS are set via += so need to pass them via env
+ export LIBRARY_FLAGS="${LDFLAGS}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Wall"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/sys-fs/duperemove/duperemove-0.09.5.ebuild b/sys-fs/duperemove/duperemove-0.09.5.ebuild
new file mode 100644
index 000000000000..fb5407dddd23
--- /dev/null
+++ b/sys-fs/duperemove/duperemove-0.09.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Btrfs deduplication utility"
+HOMEPAGE="https://github.com/markfasheh/duperemove"
+SRC_URI="https://github.com/markfasheh/duperemove/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-libs/glib:2=
+ dev-libs/libgcrypt:0="
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ # CC & CFLAGS are set via = so need to override them
+ # LIBRARY_FLAGS are set via += so need to pass them via env
+ export LIBRARY_FLAGS="${LDFLAGS}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Wall"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="/usr" install
+}
diff --git a/sys-fs/duperemove/metadata.xml b/sys-fs/duperemove/metadata.xml
new file mode 100644
index 000000000000..e74936a1dbfc
--- /dev/null
+++ b/sys-fs/duperemove/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>rich0@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <longdescription>Btrfs deduplication utility.</longdescription>
+ <upstream>
+ <remote-id type="github">markfasheh/duperemove</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-fs/e2fsprogs/Manifest b/sys-fs/e2fsprogs/Manifest
new file mode 100644
index 000000000000..ed319e26019b
--- /dev/null
+++ b/sys-fs/e2fsprogs/Manifest
@@ -0,0 +1,4 @@
+DIST e2fsprogs-1.41.7.tar.gz 4425159 SHA256 2e2eeb5201e952dd02b77f609a0e630acdbce5d2b823ec11668e34f6bfde2f2c SHA512 c17c5f23feb7747941e7f019f197cca1cd4a84c067ad27d1a578ae213c7d7274aa79f3a64c7d69515f3f94db80df01ca71d4af83e9ea84c578a7257205395f7c WHIRLPOOL f760d7e658a1c78835ca470d077c7076a21f727f7d0a2411f5428363d12b7cd1676e2f221be9d9d1f5843c25320f7ef2f896ea47c9d4dc91190e0bc7df89ef36
+DIST e2fsprogs-1.42.12.tar.gz 6381695 SHA256 e17846d91a0edd89fa59b064bde8f8e5cec5851e35f587bcccb4014dbd63186c SHA512 a4b03470ed8f3e6c353250d80807070b8d5529ce219f7ec3076af89bd7cd674fbd443aab4d07dccff74606c9f620e349da32b451e3896a0635f6c700419f7cbf WHIRLPOOL 15f85fe969b174a99f06d875afafc83cc3e85cde0d8f1d833cb045c30259b3bfa9293ee84eeb793d9c60ece2cba4ca6bacbb8c861f11f3b56bd863ca1a2296f2
+DIST e2fsprogs-1.42.13.tar.gz 6511931 SHA256 59993ff3a44f82e504561e0ebf95e8c8fa9f9f5746eb6a7182239605d2a4e2d4 SHA512 d341790f55c3bff34425369063757280b9ba6ac08f405e14f94f299345ae76c0dc6e90871b746cc98c73467448d888fe5bc029688b5eed5fd22c3c37bf285cd0 WHIRLPOOL 2b26e355ad8e378cc7402be5fd5f5abe0af2aa6a1214b357dca682b922aa07c97af427b369ef21ddb3ee731768234a5f5faf488b92a68b0175d07845dbe7783f
+DIST e2fsprogs-1.42.9-mint-r1.patch.xz 9012 SHA256 3904654080b7f7776e97b703d17e1b59ae1d6f5e0cf32193b86e986bc0a9b396 SHA512 591a7c80d65082eebcdc455028be6ade05c9aae96c94f654106be0facef330a8875dae82891e6e3ad2b48dece2b4e1c1940dbc47cd3eba3e6eea3b5ddba9a8fc WHIRLPOOL ae6fc015fa77bfbde7a4ba2205c014b655e736c4ed5cb63a913245c6c40fa0637b65fa3eec6399dd1793c494892b76e0bbc12ffa6ac9c39d4da27333d8bbf6c7
diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild
new file mode 100644
index 000000000000..6fdc1ddfc9c5
--- /dev/null
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
+HOMEPAGE="http://e2fsprogs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/e2fsprogs/${P}.tar.gz"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="nls elibc_FreeBSD"
+
+RDEPEND="~sys-libs/${PN}-libs-${PV}
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+ sys-apps/texinfo"
+
+pkg_setup() {
+ if [[ ! -e ${ROOT}/etc/mtab ]] ; then
+ # add some crap to deal with missing /etc/mtab #217719
+ ewarn "No /etc/mtab file, creating one temporarily"
+ echo "${PN} crap for src_test" > "${ROOT}"/etc/mtab
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.38-tests-locale.patch #99766
+ epatch "${FILESDIR}"/${PN}-1.41.5-makefile.patch
+ epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
+ epatch "${FILESDIR}"/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch #276352
+ # blargh ... trick e2fsprogs into using e2fsprogs-libs
+ rm -rf doc
+ sed -i -r \
+ -e 's:@LIBINTL@:@LTLIBINTL@:' \
+ -e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
+ -e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
+ MCONFIG.in || die "muck libs" #122368
+ sed -i -r \
+ -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
+ Makefile.in || die "remove subdirs"
+ # stupid configure script clobbers CC for us
+ sed -i \
+ -e '/if test -z "$CC" ; then CC=cc; fi/d' \
+ configure || die "touching configure"
+
+ # we want to build the blkid/findfs binaries, but not the libs
+ sed -i \
+ -e '/BLKID_CMT=/s:BLKID_CMT:LIBBLKID_CMT:g' \
+ configure || die "touching configure for blkid"
+ sed -i \
+ -e '/BLKID_LIB_SUBDIR/s:@BLKID_CMT@:@LIBBLKID_CMT@:g' \
+ Makefile.in || die "remove blkid subdir better"
+ append-cppflags -DCONFIG_BUILD_FINDFS #275923
+
+ # Avoid rebuild
+ touch lib/ss/ss_err.h
+}
+
+src_compile() {
+ # Keep the package from doing silly things #261411
+ export VARTEXFONTS=${T}/fonts
+
+ # We want to use the "bsd" libraries while building on Darwin, but while
+ # building on other Gentoo/*BSD we prefer elf-naming scheme.
+ local libtype
+ case ${CHOST} in
+ *-darwin*) libtype=bsd;;
+ *) libtype=elf;;
+ esac
+
+ ac_cv_path_LDCONFIG=: \
+ econf \
+ --with-root-prefix=/ \
+ --enable-${libtype}-shlibs \
+ --with-ldopts="${LDFLAGS}" \
+ $(tc-has-tls || echo --disable-tls) \
+ --without-included-gettext \
+ $(use_enable nls) \
+ $(use_enable userland_GNU fsck) \
+ --disable-libblkid \
+ --disable-libuuid \
+ || die
+ if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
+ eerror "INTL sanity check failed, aborting build."
+ eerror "Please post your ${S}/config.log file as an"
+ eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
+ die "Preventing included intl cruft from building"
+ fi
+ emake COMPILE_ET=compile_et MK_CMDS=mk_cmds || die
+
+ # Build the FreeBSD helper
+ if use elibc_FreeBSD ; then
+ cp "${FILESDIR}"/fsck_ext2fs.c .
+ emake fsck_ext2fs || die
+ fi
+}
+
+pkg_preinst() {
+ if [[ -r ${ROOT}/etc/mtab ]] ; then
+ if [[ $(<"${ROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
+ rm -f "${ROOT}"/etc/mtab
+ fi
+ fi
+}
+
+src_install() {
+ # need to set root_libdir= manually as any --libdir options in the
+ # econf above (i.e. multilib) will screw up the default #276465
+ emake \
+ STRIP=: \
+ root_libdir="/$(get_libdir)" \
+ DESTDIR="${D}" \
+ install install-libs || die
+ dodoc README RELEASE-NOTES
+
+ if use elibc_FreeBSD ; then
+ # Install helpers for us
+ into /
+ dosbin "${S}"/fsck_ext2fs || die
+ doman "${FILESDIR}"/fsck_ext2fs.8
+
+ # these manpages are already provided by FreeBSD libc
+ # and filefrag is linux only
+ rm -f \
+ "${D}"/usr/sbin/filefrag \
+ "${D}"/usr/share/man/man8/filefrag.8 \
+ "${D}"/usr/bin/uuidgen \
+ "${D}"/usr/share/man/man3/{uuid,uuid_compare}.3 \
+ "${D}"/usr/share/man/man1/uuidgen.1 || die
+ fi
+}
diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild
new file mode 100644
index 000000000000..3eb862835d44
--- /dev/null
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+case ${PV} in
+*_pre*) UP_PV="${PV%_pre*}-WIP-${PV#*_pre}" ;;
+*) UP_PV=${PV} ;;
+esac
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
+HOMEPAGE="http://e2fsprogs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/e2fsprogs/${PN}-${UP_PV}.tar.gz
+ elibc_mintlib? ( mirror://gentoo/${PN}-1.42.9-mint-r1.patch.xz )"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~m68k-mint"
+IUSE="nls static-libs elibc_FreeBSD"
+
+RDEPEND="~sys-libs/${PN}-libs-${PV}
+ >=sys-apps/util-linux-2.16
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+ sys-apps/texinfo"
+
+S=${WORKDIR}/${P%_pre*}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
+ epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
+ if [[ ${CHOST} == *-mint* ]] ; then
+ epatch "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch
+ fi
+ epatch "${FILESDIR}"/${PN}-1.42.10-fix-build-cflags.patch #516854
+
+ # blargh ... trick e2fsprogs into using e2fsprogs-libs
+ rm -rf doc
+ sed -i -r \
+ -e 's:@LIBINTL@:@LTLIBINTL@:' \
+ -e '/^(STATIC_)?LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@(STATIC_)?LIB_EXT@:-l\1:' \
+ -e '/^DEP(STATIC_)?LIB(COM_ERR|SS)/s:=.*:=:' \
+ MCONFIG.in || die "muck libs" #122368
+ sed -i -r \
+ -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
+ Makefile.in || die "remove subdirs"
+ ln -s $(which mk_cmds) lib/ss/ || die
+
+ # Avoid rebuild
+ echo '#include_next <ss/ss_err.h>' > lib/ss/ss_err.h
+}
+
+src_configure() {
+ # Keep the package from doing silly things #261411
+ export VARTEXFONTS=${T}/fonts
+
+ # needs open64() prototypes and friends
+ append-cppflags -D_GNU_SOURCE
+
+ ac_cv_path_LDCONFIG=: \
+ econf \
+ --with-root-prefix="${EPREFIX}/" \
+ --enable-symlink-install \
+ $(tc-is-static-only || echo --enable-elf-shlibs) \
+ $(tc-has-tls || echo --disable-tls) \
+ --without-included-gettext \
+ $(use_enable nls) \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-quota \
+ --disable-fsck \
+ --disable-uuidd
+ if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
+ eerror "INTL sanity check failed, aborting build."
+ eerror "Please post your ${S}/config.log file as an"
+ eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
+ die "Preventing included intl cruft from building"
+ fi
+}
+
+src_compile() {
+ emake V=1 COMPILE_ET=compile_et MK_CMDS=mk_cmds
+
+ # Build the FreeBSD helper
+ if use elibc_FreeBSD ; then
+ cp "${FILESDIR}"/fsck_ext2fs.c .
+ emake V=1 fsck_ext2fs
+ fi
+}
+
+src_install() {
+ # need to set root_libdir= manually as any --libdir options in the
+ # econf above (i.e. multilib) will screw up the default #276465
+ emake \
+ STRIP=: \
+ root_libdir="${EPREFIX}/usr/$(get_libdir)" \
+ DESTDIR="${D}" \