From patchwork Sun Jan 9 12:09:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: smooky X-Patchwork-Id: 4958 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4JWwk258kQz3wcH for ; Sun, 9 Jan 2022 12:09:30 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4JWwk04p1Fz2lg; Sun, 9 Jan 2022 12:09:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4JWwk00G5Kz2yqZ; Sun, 9 Jan 2022 12:09:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4JWwjz060lz2xNg for ; Sun, 9 Jan 2022 12:09:26 +0000 (UTC) Received: from malta2912.startdedicated.de (v16.de [85.93.91.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4JWwjx54SJzWy for ; Sun, 9 Jan 2022 12:09:25 +0000 (UTC) Received: from router.home.v16.de (ip1f10b1e3.dynamic.kabel-deutschland.de [31.16.177.227]) (Authenticated sender: smooky.v16) by malta2912.startdedicated.de (Postfix) with ESMTPA id 3D842EC2CC4; Sun, 9 Jan 2022 13:09:24 +0100 (CET) From: smooky@v16.de To: development@lists.ipfire.org Subject: [PATCH] New Addon: gptfdisk 1.0.8 Date: Sun, 9 Jan 2022 13:09:20 +0100 Message-Id: <20220109120920.27042-1-smooky@v16.de> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; spf=none (mail01.ipfire.org: domain of smooky@v16.de has no SPF policy when checking 85.93.91.151) smtp.mailfrom=smooky@v16.de; dmarc=none ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1641730165; a=rsa-sha256; cv=none; b=ITsqOWTzGD21hN28ic80WqUEx6iOlBXJMsiw+/GRhu+R2Fp/iMQnK3W2tK0CH5SFHbK/Pz 86lwnT/J5wpal7g0zTkYiIQyUq6p2rYZj/uYfVld+UvrHJzzhd4PLKVQ1KiKKpztQxYWiL n/bdWJ9NKPcIN0RBEfMklf5Lm0T6pGkFJLqwxJbrAzQjge5srz9mTMSVaA9qd4M1XhJkYm JRUfnTJ5hVv1xhOyTLyHHr4QR/2uo9ZTrvlqYTS4dkdzqHeBakm5u+Ityqk87BuUKRhhci Dwoj3TOrohYh4WuL1CKRA5kj2mQz7xyLASmDZ5enNA3jSvJ2DJWB4p12+xP0hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1641730165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/JI1WBk5mu38zQM87PQriUdojyXYn4A0gay2HgIWQVQ=; b=ilz2UU4K6bUO9W2vMahn1Q7Z+wheLjlQ7ORPk2XEVikanNXvNfFagSOPEeqGbUtyNuhorG NyJIhwAA3wZl8g2ZuZqGUa6l0gsHXBpYvPJRn1bER7h30K67WCAmraqMi9UEFuz/LshGeE yYAdQy7+DM10xocZ3LjC2KNfN7C6dJh9A1EziezZGHc4zcqpgX3t2s3HlST74NlNcBmAcG o9WKo9aV/ffR47IreO27RNryvmzwU5o5IM7yzPHxCQ0k9qIpAV07QK82BANE9RDyxBRxW0 Ki7Al7dmydnmIRs3s3pm0k9zzJ7hsJ/K8ZNYLx37k8BXN1U3/gCCbcYM4nsW+A== X-Spamd-Result: default: False [0.10 / 11.00]; BAYES_HAM(-2.28)[96.63%]; AUTH_NA(1.00)[]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; IP_REPUTATION_HAM(-0.01)[asn: 8972(0.00), country: DE(-0.01), ip: 85.93.91.151(0.00)]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8972, ipnet:85.93.91.0/24, country:DE]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_NO_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; DMARC_NA(0.00)[v16.de]; RECEIVED_SPAMHAUS_PBL(0.00)[31.16.177.227:received] Authentication-Results: mail01.ipfire.org; dkim=none; spf=none (mail01.ipfire.org: domain of smooky@v16.de has no SPF policy when checking 85.93.91.151) smtp.mailfrom=smooky@v16.de; dmarc=none X-Rspamd-Queue-Id: 4JWwjx54SJzWy X-Rspamd-Server: mail01.haj.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" >>> https://www.rodsbooks.com/gdisk/ <<< source = https://sourceforge.net/projects/gptfdisk/files/gptfdisk/1.0.8/gptfdisk-1.0.8.tar.gz/download Hi @ all I have a new add-on here which I use e.g. to bring partitions from mbr to gpt without data loss. It is also well suited for rescuing broken partitions. GPT fdisk (consisting of the gdisk, cgdisk, sgdisk, and fixparts programs) is a set of text-mode partitioning tools for Linux, FreeBSD, Mac OS X, and Windows. The gdisk, cgdisk, and sgdisk programs work on Globally Unique Identifier (GUID) Partition Table (GPT) disks, rather than on the older (and once more common) Master Boot Record (MBR) partition tables. The fixparts program repairs certain types of damage to MBR disks and enables changing partition types from primary to logical and vice-versa. Signed-off-by: Marcel Follert (Smooky) Reviewed-by: Adolf Belka --- config/rootfiles/packages/gptfdisk | 4 ++ lfs/gptfdisk | 85 ++++++++++++++++++++++++++++++ make.sh | 1 + 3 files changed, 90 insertions(+) create mode 100644 config/rootfiles/packages/gptfdisk create mode 100644 lfs/gptfdisk diff --git a/config/rootfiles/packages/gptfdisk b/config/rootfiles/packages/gptfdisk new file mode 100644 index 000000000..a1a854021 --- /dev/null +++ b/config/rootfiles/packages/gptfdisk @@ -0,0 +1,4 @@ +usr/sbin/cgdisk +usr/sbin/fixparts +usr/sbin/gdisk +usr/sbin/sgdisk diff --git a/lfs/gptfdisk b/lfs/gptfdisk new file mode 100644 index 000000000..3f87e0c7e --- /dev/null +++ b/lfs/gptfdisk @@ -0,0 +1,85 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2022 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.0.8 + +THISAPP = gptfdisk-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +PROG = gptfdisk +PAK_VER = 1 + +DEPS = + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 74684c4eb0e6d5a1839e4bb0bba36fa2 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist: + @$(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar xvfz $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && sed -i '29s###g' gptcurses.cc + cd $(DIR_APP) && make + cd $(DIR_APP) && cp cgdisk fixparts gdisk sgdisk /usr/sbin + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index e6f948ba0..4915ec2cb 100755 --- a/make.sh +++ b/make.sh @@ -1615,6 +1615,7 @@ buildipfire() { lfsmake2 libcdada lfsmake2 pmacct lfsmake2 squid-asnbl + lfsmake2 gptfdisk } buildinstaller() {