FreeNAS 9のJail環境で利用できるtarはBSD tarでした
BSD tarはオプションが少なく圧縮をサポートしていないのでGNU tarに入れ替えました
1 2 3 4 5 6 7 8 9 10 |
; html-script: false ] root@vhost:/root # tar tar: Must specify one of -c, -r, -t, -u, -x root@vhost:/root # find / -name tar /rescue/tar /usr/bin/tar root@vhost:/root # ls -l /usr/bin/tar lrwxr-xr-x 1 root wheel 6 Dec 4 2012 /usr/bin/tar -> bsdtar |
- Optionの確認
- makeの実行
- make installの実行
- make cleanの実行
- gtarの情報
- bsdtarと置換え
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
; html-script: false ] root@vhost:/root # cd /usr/ports/archivers/gtar/ root@vhost:/usr/ports/archivers/gtar # make showconfig-recursive ===> The following configuration options are available for gtar-1.27 and dependencies ===> The following configuration options are available for gtar-1.27: NLS=on: Native Language Support STATIC=off: Build static executables and/or libraries ===> Use 'make config' to modify these settings ===> The following configuration options are available for libiconv-1.14_1: ENCODINGS=on: Include extra character sets PATCHES=off: Apply patches to fix CP932, add EUCJP-MS ===> Use 'make config' to modify these settings ===> The following configuration options are available for gettext-0.18.3.1: DOCS=on: Build and/or install documentation ===> Use 'make config' to modify these settings |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
; html-script: false ] root@vhost:/usr/ports/archivers/gtar # make ===> Found saved configuration for gtar-1.27 ===> gtar-1.27 depends on file: /usr/local/sbin/pkg - found => tar-1.27.tar.xz doesn't seem to exist in /usr/ports/distfiles/. => Attempting to fetch http://ftp.gnu.org/gnu/tar/tar-1.27.tar.xz tar-1.27.tar.xz 100% of 1823 kB 258 kBps ===> Fetching all distfiles required by gtar-1.27 for building ===> Extracting for gtar-1.27 => SHA256 Checksum OK for tar-1.27.tar.xz. (snip) Making all in scripts Making all in po Making all in tests |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
; html-script: false ] root@vhost:/usr/ports/archivers/gtar # make install ===> Staging for gtar-1.27 ===> gtar-1.27 depends on shared library: libiconv.so.3 - found ===> gtar-1.27 depends on shared library: libintl.so - found ===> Generating temporary packing list (snip) Making install in tests ====> Compressing man pages (compress-man) ===> Installing for gtar-1.27 ===> Checking if archivers/gtar already installed ===> Registering installation for gtar-1.27 Installing gtar-1.27... done |
1 2 3 |
; html-script: false ] root@vhost:/usr/ports/archivers/gtar # make clean ===> Cleaning for gtar-1.27 |
gtarは/usr/local/binにインストールされます
1 2 3 |
; html-script: false ] root@vhost:/usr/ports/archivers/gtar # ls -l /usr/local/bin/gtar -r-xr-xr-x 1 root wheel 411008 Nov 18 15:47 /usr/local/bin/gtar |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
; html-script: false ] root@vhost:/usr/ports/archivers/gtar # pkg info -f gtar gtar-1.27 Name : gtar Version : 1.27 Origin : archivers/gtar Prefix : /usr/local Categories : sysutils archivers Maintainer : naddy@FreeBSD.org WWW : http://www.gnu.org/software/tar/ Comment : GNU version of the traditional tape archiver Options : STATIC : off NLS : on Shared Libs required: libintl.so.9 libiconv.so.3 Flat size : 2.53MiB Description : The Free Software Foundation's "tar" tape archiver. GNU tar saves many files together into a single tape or disk archive, and can restore individual files from the archive. It includes multivolume support, the ability to archive sparse files, automatic archive compression/decompression, remote archives and special features that allow tar to be used for incremental and full backups. This distribution also includes rmt, the remote tape server. Note that this port will install these utilities with a 'g' prefix, e.g. gtar, but the texinfo documentation will refer to them without the 'g' prefix. WWW: http://www.gnu.org/software/tar/ |
tarをgtarに置き換えます
1 2 3 4 5 6 7 |
; html-script: false ] root@vhost:/usr/ports/archivers/gtar # cd /usr/bin/ root@vhost:/usr/bin # ls -l tar lrwxr-xr-x 1 root wheel 6 Dec 4 2012 tar -> bsdtar root@vhost:/usr/bin # ln -sf /usr/local/bin/gtar tar root@vhost:/usr/bin # ls -l tar lrwxr-xr-x 1 root wheel 19 Nov 18 15:54 tar -> /usr/local/bin/gtar |
これでgtarがtarとしていつも使えるようになりました