anchor.diff:      cp -av `pwd`/output/lib64/* $ROOTFS/usr/local/lib
   
   
  +#ovo ne pije vode ?!
  +#RUN cd $LINUX_KERNEL_SOURCE && \
  +#   make INSTALL_HDR_PATH=/usr ARCH=x86_64 headers_install
  +
   # Make sure the kernel headers are installed for aufs-util, and then build it
  -# RUN cd $LINUX_KERNEL_SOURCE && \
  -#    make INSTALL_HDR_PATH=/tmp/kheaders headers_install && \
  -#    cd / && \
  -#    git clone $AUFS_UTIL_GIT aufs-util && \
  -#    cd /aufs-util && \
  -#    git checkout $AUFS_UTIL_BRANCH && \
  -#    CPPFLAGS="$GCC_M -I/tmp/kheaders/include" CLFAGS=$CPPFLAGS LDFLAGS=$CPPFLAGS make && \
  -#    DESTDIR=$ROOTFS make install && \
  -#    rm -rf /tmp/kheaders
  +RUN cd $LINUX_KERNEL_SOURCE && \
  +    make INSTALL_HDR_PATH=/tmp/kheaders headers_install && \
  +    cd / && \
  +    git clone $AUFS_UTIL_GIT aufs-util && \
  +    cd /aufs-util && \
  +    git checkout $AUFS_UTIL_BRANCH && \
  +    CPPFLAGS="$GCC_M -I/tmp/kheaders/include" CLFAGS=$CPPFLAGS LDFLAGS=$CPPFLAGS make && \
  +    DESTDIR=$ROOTFS make install && \
  +    rm -rf /tmp/kheaders
   
   # Prepare the ISO directory with the kernel
   RUN cp -v $LINUX_KERNEL_SOURCE/arch/x86_64/boot/bzImage /tmp/iso/boot/vmlinuz64
  
positive.code: 
  RUN mkdir /zfs
  
  ENV ZFS_VER 0.6.4.1 
  RUN cd /zfs && curl -LO http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/spl-$ZFS_VER.tar.gz
  RUN cd /zfs && tar xvf spl-$ZFS_VER.tar.gz && cd spl-$ZFS_VER && ./configure --with-linux=$LINUX_KERNEL_SOURCE && make && make install 
  
  # hernad: zfs build demands librt from debian
  RUN cp /lib/x86_64-linux-gnu/librt-2.13.so $ROOTFS/lib/
  RUN rm $ROOTFS/lib/librt.so.1
  RUN cd $ROOTFS/lib && ln -s librt-2.13.so librt.so.1
  
  ENV ZFS_GIT_BRANCH zfs-0.6.4-release
  RUN cd /zfs && git clone https://github.com/zfsonlinux/zfs.git zfs-git && cd /zfs/zfs-git && git checkout $ZFS_GIT_BRANCH 
  #RUN cd /zfs && curl -LO http://archive.zfsonlinux.org/downloads/zfsonlinux/zfs/zfs-$ZFS_VER.tar.gz                              
  # RUN cd /zfs && tar xvf zfs-$ZFS_VER.tar.gz && cd zfs-$ZFS_VER && ./configure --with-linux=$LINUX_KERNEL_SOURCE && make && DESTDIR=$ROOTFS make install 
  RUN cd /zfs/zfs-git && sh autogen.sh && ./configure --with-linux=$LINUX_KERNEL_SOURCE && make && DESTDIR=$ROOTFS make install 
                                                                                                                                  
  # Install the kernel modules in $ROOTFS                                                                                         
  RUN cd $LINUX_KERNEL_SOURCE && \                                                                                                       
  
negative.code: # v4 kernel                                                          
  ENV AUFS_VER     aufs4                                               
  ENV AUFS_GIT https://github.com/sfjro/aufs4-standalone               
  
  #ENV AUFS_BRANCH  aufs4.0                                            
  #ENV AUFS_UTIL_BRANCH aufs4.0
  
  ENV AUFS_BRANCH  aufs4.1
  ENV AUFS_UTIL_BRANCH aufs4.0
  
  # Download AUFS and apply patches and files, then remove it
  RUN git clone -b $AUFS_BRANCH $AUFS_GIT && \
      cd $AUFS_VER-standalone && \
      cd $LINUX_KERNEL_SOURCE && \
      cp -r /$AUFS_VER-standalone/Documentation $LINUX_KERNEL_SOURCE && \
      cp -r /$AUFS_VER-standalone/fs $LINUX_KERNEL_SOURCE && \
      cp -r /$AUFS_VER-standalone/include/uapi/linux/aufs_type.h $LINUX_KERNEL_SOURCE/include/uapi/linux/ &&\
      for patch in $AUFS_VER-kbuild $AUFS_VER-base $AUFS_VER-mmap $AUFS_VER-standalone $AUFS_VER-loopback; do \
          patch -p1 < /$AUFS_VER-standalone/$patch.patch; \
      done
  
  
  COPY kernel_config $LINUX_KERNEL_SOURCE/.config
  