3 Commits

Author SHA1 Message Date
Jay Larson
a9b9d9825b The following changes were made:
* Added REPO
  * usher now uses /bin/sh
  * Removed TARGET from usher
  * moved modules to /lib/modules/zfs
2018-04-06 15:28:30 -05:00
Jay Larson
0c6f5455b8 Added depmod to usher 2017-05-31 13:42:38 +00:00
Jay Larson
2794321d9d The following changes were made:
* Compiled --with-spl=/usr/src/spl-$(VERSION) (location for spl-dev)
  * usher now manages etc/default/zfs
  * recompiled against correct kernel
2017-05-26 14:48:00 -05:00
5 changed files with 176 additions and 5 deletions

View File

@@ -9,13 +9,14 @@
# GNU General Public License for more details. # GNU General Public License for more details.
export SRCPKG = zfs export SRCPKG = zfs
export DEPENDS = glibc,libzfs,util-linux,zlib export DEPENDS = glibc,libzfs,util-linux,spl,zlib
export ARCH = x86_64 export ARCH = x86_64
export URL = http://zfsonlinux.org/ export URL = http://zfsonlinux.org/
REPO = main
BRIEF = Module and utilities for the ZFS file system BRIEF = Module and utilities for the ZFS file system
DESC = ZFS is an advanced file system and volume manager which was originally \ DESC = ZFS is an advanced file system and volume manager which was originally \
developed for Solaris and is now maintained by the Illumos community. developed for Solaris and is now maintained by the Illumos community.
SNAPVER = 3 SNAPVER = 7
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -23,7 +24,7 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
UPVER := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//') UPVER := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')
export VERSION := $(UPVER)-$(SNAPVER) export VERSION := $(UPVER)-$(SNAPVER)
SPLPATH := $(shell readlink -f ../spl/spl-$(UPVER)) SPLPATH := /usr/src/spl-$(UPVER)
LIB := $(PWD)/libzfs LIB := $(PWD)/libzfs
LIBROOT := $(LIB)/ROOT LIBROOT := $(LIB)/ROOT
@@ -75,14 +76,21 @@ $(ROOT): $(SRCDIR)/module/zfs/zfs.ko
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
mv $(ROOT)/etc/default/zfs $(ROOT)/usr/share/zfs/zfs.default && \
rmdir $(ROOT)/etc/default && \
install -v -d -m 755 $(ROOT)/etc/zfs && \
install -v -d -m 755 $(ROOT)/lib/modules/$(PACKAGE) && \
mv -v $(ROOT)/lib/modules/*/* $(ROOT)/lib/modules/$(PACKAGE) && \
rm -vrf $(ROOT)/usr/share/initramfs-tools
@install -v -d $(LIB)/SNAP && \ @install -v -d $(LIB)/SNAP && \
install -v -d $(LIBROOT) && \ install -v -d $(LIBROOT) && \
install -v -d -m 755 $(LIBROOT)/lib && \ install -v -d -m 755 $(LIBROOT)/lib && \
install -v -d $(DEV)/SNAP && \ install -v -d $(DEV)/SNAP && \
install -v -d $(DEVROOT) && \ install -v -d $(DEVROOT) && \
mv -v $(ROOT)/lib/libzfs{_core,.so}* $(LIBROOT)/lib && \ mv -v $(ROOT)/lib/lib{nvpair,uutil,zfs,zfs_core,zpool}.{la,so}* \
$(LIBROOT)/lib && \
for file in `find $(ROOT)|egrep 'man3\/|\.a$$|\.c$$|\.h$$'`; do \ for file in `find $(ROOT)|egrep 'man3\/|\.a$$|\.c$$|\.h$$'`; do \
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \ path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
mkdir -p $$path; \ mkdir -p $$path; \

View File

@@ -11,5 +11,6 @@
DEPENDS = glibc,util-linux,zlib DEPENDS = glibc,util-linux,zlib
BRIEF = Runtime library for ZFS BRIEF = Runtime library for ZFS
DESC = Runtime library for ZFS DESC = Runtime library for ZFS
REPO = main
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux

View File

@@ -11,5 +11,6 @@
DEPENDS = libzfs DEPENDS = libzfs
BRIEF = Development files for ZFS BRIEF = Development files for ZFS
DESC = Development files for ZFS DESC = Development files for ZFS
REPO = dev
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux

29
SNAP/usher Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if [ ! -f /etc/default/zfs ]; then
cp /usr/share/zfs/zfs.default /etc/default/zfs
fi
if [ ! -f /usr/share/mkinitramfs/mods/zfs ]; then
cp /usr/share/zfs/zfs.mods /usr/share/mkinitramfs/mods/zfs
fi
if [ ! -f /usr/share/mkinitramfs/bins/zfs ]; then
cp /usr/share/zfs/zfs.bins /usr/share/mkinitramfs/bins/zfs
fi
depmod
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac

132
SNAP/zfs.default Executable file
View File

@@ -0,0 +1,132 @@
# ZoL userland configuration.
# To enable a boolean setting, set it to yes, on, true, or 1.
# Anything else will be interpreted as unset.
# Run `zfs mount -a` during system start?
ZFS_MOUNT='yes'
# Run `zfs unmount -a` during system stop?
ZFS_UNMOUNT='yes'
# Run `zfs share -a` during system start?
# nb: The shareiscsi, sharenfs, and sharesmb dataset properties.
ZFS_SHARE='yes'
# Run `zfs unshare -a` during system stop?
ZFS_UNSHARE='yes'
# By default, a verbatim import of all pools is performed at boot based on the
# contents of the default zpool cache file. The contents of the cache are
# managed automatically by the 'zpool import' and 'zpool export' commands.
#
# By setting this to 'yes', the system will instead search all devices for
# pools and attempt to import them all at boot, even those that have been
# exported. Under this mode, the search path can be controlled by the
# ZPOOL_IMPORT_PATH variable and a list of pools that should not be imported
# can be listed in the ZFS_POOL_EXCEPTIONS variable.
#
# Note that importing all visible pools may include pools that you don't
# expect, such as those on removable devices and SANs, and those pools may
# proceed to mount themselves in places you do not want them to. The results
# can be unpredictable and possibly dangerous. Only enable this option if you
# understand this risk and have complete physical control over your system and
# SAN to prevent the insertion of malicious pools.
ZPOOL_IMPORT_ALL_VISIBLE='no'
# Specify specific path(s) to look for device nodes and/or links for the
# pool import(s). See zpool(8) for more information about this variable.
# It supersedes the old USE_DISK_BY_ID which indicated that it would only
# try '/dev/disk/by-id'.
# The old variable will still work in the code, but is deprecated.
#ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id"
# List of pools that should NOT be imported at boot
# when ZPOOL_IMPORT_ALL_VISIBLE is 'yes'.
# This is a space separated list.
#ZFS_POOL_EXCEPTIONS="test2"
# List of pools that SHOULD be imported at boot by the initramfs
# instead of trying to import all available pools. If this is set
# then ZFS_POOL_EXCEPTIONS is ignored.
# Only applicable for Debian GNU/Linux {dkms,initramfs}.
# This is a semi-colon separated list.
#ZFS_POOL_IMPORT="pool1;pool2"
# Should the datasets be mounted verbosely?
# A mount counter will be used when mounting if set to 'yes'.
VERBOSE_MOUNT='no'
# Should we allow overlay mounts?
# This is standard in Linux, but not ZFS which comes from Solaris where this
# is not allowed).
DO_OVERLAY_MOUNTS='no'
# Any additional option to the 'zfs import' commandline?
# Include '-o' for each option wanted.
# You don't need to put '-f' in here, unless you want it ALL the time.
# Using the option 'zfsforce=1' on the grub/kernel command line will
# do the same, but on a case-to-case basis.
ZPOOL_IMPORT_OPTS=""
# Full path to the ZFS cache file?
# See "cachefile" in zpool(8).
# The default is "/usr/etc/zfs/zpool.cache".
#ZPOOL_CACHE="/usr/etc/zfs/zpool.cache"
#
# Setting ZPOOL_CACHE to an empty string ('') AND setting ZPOOL_IMPORT_OPTS to
# "-c /usr/etc/zfs/zpool.cache" will _enforce_ the use of a cache file.
# This is needed in some cases (extreme amounts of VDEVs, multipath etc).
# Generally, the use of a cache file is usually not recommended on Linux
# because it sometimes is more trouble than it's worth (laptops with external
# devices or when/if device nodes changes names).
#ZPOOL_IMPORT_OPTS="-c /usr/etc/zfs/zpool.cache"
#ZPOOL_CACHE=""
# Any additional option to the 'zfs mount' command line?
# Include '-o' for each option wanted.
MOUNT_EXTRA_OPTIONS=""
# Build kernel modules with the --enable-debug switch?
# Only applicable for Debian GNU/Linux {dkms,initramfs}.
ZFS_DKMS_ENABLE_DEBUG='no'
# Build kernel modules with the --enable-debug-dmu-tx switch?
# Only applicable for Debian GNU/Linux {dkms,initramfs}.
ZFS_DKMS_ENABLE_DEBUG_DMU_TX='no'
# Keep debugging symbols in kernel modules?
# Only applicable for Debian GNU/Linux {dkms,initramfs}.
ZFS_DKMS_DISABLE_STRIP='no'
# Wait for this many seconds in the initrd pre_mountroot?
# This delays startup and should be '0' on most systems.
# Only applicable for Debian GNU/Linux {dkms,initramfs}.
ZFS_INITRD_PRE_MOUNTROOT_SLEEP='0'
# Wait for this many seconds in the initrd mountroot?
# This delays startup and should be '0' on most systems. This might help on
# systems which have their ZFS root on a USB disk that takes just a little
# longer to be available
# Only applicable for Debian GNU/Linux {dkms,initramfs}.
ZFS_INITRD_POST_MODPROBE_SLEEP='0'
# List of additional datasets to mount after the root dataset is mounted?
#
# The init script will use the mountpoint specified in the 'mountpoint'
# property value in the dataset to determine where it should be mounted.
#
# This is a space separated list, and will be mounted in the order specified,
# so if one filesystem depends on a previous mountpoint, make sure to put
# them in the right order.
#
# It is not necessary to add filesystems below the root fs here. It is
# taken care of by the initrd script automatically. These are only for
# additional filesystems needed. Such as /opt, /usr/local which is not
# located under the root fs.
# Example: If root FS is 'rpool/ROOT/rootfs', this would make sense.
#ZFS_INITRD_ADDITIONAL_DATASETS="rpool/ROOT/usr rpool/ROOT/var"
# Optional arguments for the ZFS Event Daemon (ZED).
# See zed(8) for more information on available options.
#ZED_ARGS="-M"