Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jul 2021 08:06:18 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f23c04a72db5 - main - sysutils/linuxfdisk: use better PROC_PARTITIONS path on FreeBSD
Message-ID:  <202107090806.16986IV7034273@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f23c04a72db50cb8ce679caf4a7997cde166afdf

commit f23c04a72db50cb8ce679caf4a7997cde166afdf
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-07-09 08:03:48 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-07-09 08:03:42 +0000

    sysutils/linuxfdisk: use better PROC_PARTITIONS path on FreeBSD
    
    Originating from GNU/Linux, this code had naturally defined the
    PROC_PARTITIONS macro as "/proc/partitions", while we typically
    mount this file system under "/compat/linux/proc/partitions" on
    FreeBSD.  Fix two (out of four) definitions which appear in the
    generated executables, so e.g. `sfdisk-linux -s' would now work
    correctly so long as linprocfs(5) is mounted.  While at it, set
    the LICENSE (GPLv2+) and bump PORTREVISION so users could enjoy
    less buggy package.
    
    PR:     257072
---
 sysutils/linuxfdisk/Makefile            |  3 +++
 sysutils/linuxfdisk/files/patch-FreeBSD | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/sysutils/linuxfdisk/Makefile b/sysutils/linuxfdisk/Makefile
index 4eba46b85efe..0f15ed8c1747 100644
--- a/sysutils/linuxfdisk/Makefile
+++ b/sysutils/linuxfdisk/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	linuxfdisk
 PORTVERSION=	2.11z
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	KERNEL_ORG/linux/utils/util-linux/v2.11/ \
 		http://ftp.be.debian.org/pub/linux/utils/util-linux/v2.11/ \
@@ -11,6 +12,8 @@ DISTNAME=	util-linux-${PORTVERSION}
 MAINTAINER=	netch@netch.kiev.ua
 COMMENT=	Fdisk, a partition tables manipulator, from util-linux
 
+LICENSE=	GPLv2+
+
 WRKSRC=		${WRKDIR}/util-linux-${PORTVERSION}/fdisk
 USES=		tar:bzip2
 ONLY_FOR_ARCHS=	i386 amd64 armv7 powerpc powerpc64 powerpc64le
diff --git a/sysutils/linuxfdisk/files/patch-FreeBSD b/sysutils/linuxfdisk/files/patch-FreeBSD
index 2d0152aa64ee..d9aa6f9e7911 100644
--- a/sysutils/linuxfdisk/files/patch-FreeBSD
+++ b/sysutils/linuxfdisk/files/patch-FreeBSD
@@ -403,6 +403,15 @@ diff -rNu fdisk.c fdisk.c
  				fatal(ioctl_error);
  			close(fd);
  			if (opts == 1)
+diff -rNu fdisk.h fdisk.h
+--- fdisk.h	2001-09-13 23:05:35 UTC
++++ fdisk.h
+@@ -101,4 +101,4 @@
+ /* prototypes for fdisksgilabel.c */
+ extern int valid_part_table_flag(unsigned char *b);
+ 
+-#define PROC_PARTITIONS "/proc/partitions"
++#define PROC_PARTITIONS "/compat/linux/proc/partitions"
 diff -rNu fdiskaixlabel.c fdiskaixlabel.c
 --- fdiskaixlabel.c	Tue Apr 18 15:21:28 2000
 +++ fdiskaixlabel.c	Fri Jun 20 19:25:55 2003
@@ -1104,6 +1113,15 @@ diff -rNu sfdisk.c sfdisk.c
  	    
      return 1;
  }
+@@ -2353,7 +2336,7 @@
+ 	return is_ide;
+ }
+ 
+-#define PROC_PARTITIONS	"/proc/partitions"
++#define PROC_PARTITIONS	"/compat/linux/proc/partitions"
+ static FILE *procf = NULL;
+ 
+ static void
 @@ -2413,9 +2396,11 @@
      char *activatearg = 0;
      char *unhidearg = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107090806.16986IV7034273>