From a9b9d9825bd30becd8b984dec22389fa669b2520 Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Fri, 6 Apr 2018 15:28:30 -0500 Subject: [PATCH] The following changes were made: * Added REPO * usher now uses /bin/sh * Removed TARGET from usher * moved modules to /lib/modules/zfs --- Makefile | 10 +++++++--- Makefile.libzfs | 1 + Makefile.zfs-dev | 1 + SNAP/usher | 17 ++++++++++------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index cbb1a22..c58d546 100644 --- a/Makefile +++ b/Makefile @@ -9,13 +9,14 @@ # GNU General Public License for more details. export SRCPKG = zfs -export DEPENDS = glibc,libzfs,util-linux,zlib +export DEPENDS = glibc,libzfs,util-linux,spl,zlib export ARCH = x86_64 export URL = http://zfsonlinux.org/ +REPO = main BRIEF = Module and utilities for the ZFS file system DESC = ZFS is an advanced file system and volume manager which was originally \ developed for Solaris and is now maintained by the Illumos community. -SNAPVER = 5 +SNAPVER = 7 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') @@ -78,7 +79,10 @@ $(ROOT): $(SRCDIR)/module/zfs/zfs.ko @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)/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 $(LIBROOT) && \ diff --git a/Makefile.libzfs b/Makefile.libzfs index 5c5f072..2499cb5 100644 --- a/Makefile.libzfs +++ b/Makefile.libzfs @@ -11,5 +11,6 @@ DEPENDS = glibc,util-linux,zlib BRIEF = Runtime library for ZFS DESC = Runtime library for ZFS +REPO = main include /usr/share/snap/Makefile.snaplinux diff --git a/Makefile.zfs-dev b/Makefile.zfs-dev index 802058d..293de70 100644 --- a/Makefile.zfs-dev +++ b/Makefile.zfs-dev @@ -11,5 +11,6 @@ DEPENDS = libzfs BRIEF = Development files for ZFS DESC = Development files for ZFS +REPO = dev include /usr/share/snap/Makefile.snaplinux diff --git a/SNAP/usher b/SNAP/usher index 9f46dd6..b8f0c35 100755 --- a/SNAP/usher +++ b/SNAP/usher @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e @@ -7,15 +7,18 @@ case $1 in exit 0 ;; postinst) - if [ ! -f ${TARGET}/etc/default/zfs ]; then - cp ${TARGET}/usr/share/zfs/zfs.default /etc/default/zfs + if [ ! -f /etc/default/zfs ]; then + cp /usr/share/zfs/zfs.default /etc/default/zfs fi - if [[ ${TARGET} ]]; then - chroot ${TARGET} depmod - else - depmod + 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