From owner-freebsd-questions@freebsd.org Sat Jul 25 21:16:07 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FF3D370C03 for ; Sat, 25 Jul 2020 21:16:07 +0000 (UTC) (envelope-from lonnie@outstep.com) Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDf4k01p5z4gGK for ; Sat, 25 Jul 2020 21:16:05 +0000 (UTC) (envelope-from lonnie@outstep.com) Received: by mail-io1-xd41.google.com with SMTP id k23so13236754iom.10 for ; Sat, 25 Jul 2020 14:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outstep-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XeOwP9Hinqz1LTVJcCVa+a2ReyB5FNGhUID961hsL7Y=; b=e4+21wo3hdzsrvWM8ejO67gInA5Fx8RMpffQNCc8Q3XfSZnWrrI/FjELT4s7sudGea D8llpYSE5ZQl8jGKIM32+N+8V2L96vbKasiGOarrvNi3qwxHVZMDhMJgMQWfl1lyZC8X MNqRIucjJVzdRqO2AYZczcXcB6WlOurgoLhsQSHVKeIKsH8yjmq8f/CmdQ4m9qF7lHyC gpkjlkCz0kbF2kTVUsxD9VfyIPyq32x5IZKRkIcK41dWzBs1BZ3pE2VzKBbel5+/K6C/ lAIZ4etvzyW7kAD9iFpNqWmsahfjhXxZvzPZvMbrE307JUUNvMSwVdAgFoGclmlMGF1f upVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XeOwP9Hinqz1LTVJcCVa+a2ReyB5FNGhUID961hsL7Y=; b=jTDXjuHyNM3+m/hoBjpv67evCNjcFRsrJT4tYA2pmc8d9ZAegkFK4WWzShaeop0geG xaukAZafXGhaSXvA9anYuFHLlitJm71C4ZSc7BUyuGERW/J/2JrUEacZy71mtr8029z+ ICxvaMOcuWBogL7RC5vlTSDTc8aeSXtBXEhgSAomvsR+qcGh4X2dZ0jtGNAn5g+ptHF6 CdMsDJKEPY4OY4Bpw6uF98OXQwfE5Q6ZR+YD4loANChNdElkb/GelR1ibo7U4jDyug5u yhuHti0r78s8ZKV1FOYR3a2USfSiIigerIMPKvumIoqwWVHS8k6zqcgv5SDcVX+yL/N8 C3Ug== X-Gm-Message-State: AOAM532+JMMYlS6kWhXleZ4Ia5WQvrlKzyfVrxx3n3AEw/exV4btM87n QFuUfDOv9NUFjoCrZn1ITrg2+z8Et2cqJ0jNk0wJjVk/2yXHiA== X-Google-Smtp-Source: ABdhPJwG3ySURNsGCTHejovTT5Q1HKeZmhhciI4/kLpi/1cisyYyptMzSGUHT99kVj5u1BNyW3AlfIaKAWu+2Q7zc6g= X-Received: by 2002:a6b:3e54:: with SMTP id l81mr6800090ioa.114.1595711764814; Sat, 25 Jul 2020 14:16:04 -0700 (PDT) MIME-Version: 1.0 References: <20200725203801.9a4965b8.freebsd@edvax.de> In-Reply-To: From: Lonnie Cumberland Date: Sat, 25 Jul 2020 17:15:53 -0400 Message-ID: Subject: Re: tbz file from pkg To: Polytropon Cc: freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 4BDf4k01p5z4gGK X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=outstep-com.20150623.gappssmtp.com header.s=20150623 header.b=e4+21wo3; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=outstep.com (policy=none); spf=softfail (mx1.freebsd.org: 2607:f8b0:4864:20::d41 is neither permitted nor denied by domain of lonnie@outstep.com) smtp.mailfrom=lonnie@outstep.com X-Spamd-Result: default: False [-2.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.984]; R_DKIM_ALLOW(-0.20)[outstep-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.02)[-1.022]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[outstep-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d41:from]; NEURAL_HAM_SHORT(-0.68)[-0.678]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[outstep.com : No valid SPF, DKIM not aligned (relaxed), none] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jul 2020 21:16:07 -0000 Hi All, I find that I do not need a fully blown shell script, so I cobbled together a single set of shell commands that will convert "*.txz" file to "*.tbz" files and it seems to work. # find *txz -iname '*txz' | while read txz; do echo "Found: $txz"; name=$(echo "$txz" | sed -e 's/\.[^.]*$//'); mkdir -p tmp/$name; tar -xjf $txz -C tmp/$name; cd tmp/$name; tar cvfj ../../$name.tbz .; cd ../..; rm -Rf tmp/$name; rm -Rf tmp; done maybe it will be of help to others as well. Cheers and have a great weekend, Lonnie On Sat, Jul 25, 2020 at 4:23 PM Lonnie Cumberland wrote: > Thanks All, > > Since the pkg command returns txz (tar+xz) compressed files during a > fetch, I am going to try to come up with a shell script that will loop > through all of the txz files in a folder and convert each one to a tbz > (tar+bzip2) compressed file. > > I think that might be helpful to others as well. > Cheers > > On Sat, Jul 25, 2020 at 2:38 PM Polytropon wrote: > >> On Sat, 25 Jul 2020 13:25:19 -0400, Lonnie Cumberland wrote: >> > In working with the "pkg fetch .." command, I notice that the coles come >> > back with the ".txz" extension. >> > >> > In my reading on FreeBSD, it seems that the common extension is a ".tbz" >> >> Those extensions mean different things. >> >> >> >> > So then, I am wondering how to either have "pkg fetch" return ".tbz" >> files >> > or perhaps there is a way to convert the ".txz" files. >> > >> > Any insight on this? >> >> The extensions usually identify what 't' that is is a tar >> archive, and "xz" indicates the kind of compression. There >> are many: >> >> ----- filename extensions ----- ------- compression -------- >> short long alternate meaning tar option >> ------------------------------------------------------------ >> .tar tar >> .tgz .tar.gz tar + GNU zip -z >> .tbz .tar.bz .tar.bz2 tar + bzip -j >> .txz .tar.xz tar + xz -J >> >> BSD tar supports them all, it can conveniently combine the >> uncompression and extraction operations. >> >> Also see "man 1 xz" and "man 1 bzip2" for details, as well >> as "man 1 tar", of course. :-) >> >> In order to convert a .txz to a .tbz archive, you can use >> the tools mentioned above to uncompress and recompress the >> content. Note that there are various options that can affect >> the compression level. >> >> >> -- >> Polytropon >> Magdeburg, Germany >> Happy FreeBSD user since 4.0 >> Andra moi ennepe, Mousa, ... >> >