Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] util-linux: split libraries into separated template files
@ 2020-05-09  1:44 sgn
  2020-05-09  4:27 ` [PR PATCH] [Updated] " sgn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sgn @ 2020-05-09  1:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages util-linux-eudev
https://github.com/void-linux/void-packages/pull/21773

util-linux: split libraries into separated template files
This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs

---
@Gottox : maintainer
@q66 : please check on PowerPC

A patch file from https://github.com/void-linux/void-packages/pull/21773.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-util-linux-eudev-21773.patch --]
[-- Type: text/x-diff, Size: 12368 bytes --]

From ef9ad381b74d7ffa1bba92471bb1797cfb6b7a87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 1 May 2020 13:50:39 +0700
Subject: [PATCH] util-linux: split libraries into separated template files

This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs
---
 srcpkgs/libblkid                              |   2 +-
 srcpkgs/libblkid-devel                        |   2 +-
 srcpkgs/libfdisk                              |   2 +-
 srcpkgs/libfdisk-devel                        |   2 +-
 srcpkgs/libmount                              |   2 +-
 srcpkgs/libmount-devel                        |   2 +-
 srcpkgs/libsmartcols                          |   2 +-
 srcpkgs/libsmartcols-devel                    |   2 +-
 srcpkgs/libuuid                               |   2 +-
 srcpkgs/libuuid-devel                         |   2 +-
 .../util-linux-libs/patches/fix-musl.patch    |   1 +
 srcpkgs/util-linux-libs/template              | 134 ++++++++++++++++++
 srcpkgs/util-linux-libs/update                |   2 +
 srcpkgs/util-linux/template                   |  93 ++----------
 14 files changed, 155 insertions(+), 95 deletions(-)
 create mode 120000 srcpkgs/util-linux-libs/patches/fix-musl.patch
 create mode 100644 srcpkgs/util-linux-libs/template
 create mode 100644 srcpkgs/util-linux-libs/update

diff --git a/srcpkgs/libblkid b/srcpkgs/libblkid
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libblkid
+++ b/srcpkgs/libblkid
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libblkid-devel b/srcpkgs/libblkid-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libblkid-devel
+++ b/srcpkgs/libblkid-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libfdisk b/srcpkgs/libfdisk
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libfdisk
+++ b/srcpkgs/libfdisk
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libfdisk-devel b/srcpkgs/libfdisk-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libfdisk-devel
+++ b/srcpkgs/libfdisk-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libmount b/srcpkgs/libmount
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libmount
+++ b/srcpkgs/libmount
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libmount-devel b/srcpkgs/libmount-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libmount-devel
+++ b/srcpkgs/libmount-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libsmartcols b/srcpkgs/libsmartcols
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libsmartcols
+++ b/srcpkgs/libsmartcols
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libsmartcols-devel b/srcpkgs/libsmartcols-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libsmartcols-devel
+++ b/srcpkgs/libsmartcols-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libuuid b/srcpkgs/libuuid
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libuuid
+++ b/srcpkgs/libuuid
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libuuid-devel b/srcpkgs/libuuid-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libuuid-devel
+++ b/srcpkgs/libuuid-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/util-linux-libs/patches/fix-musl.patch b/srcpkgs/util-linux-libs/patches/fix-musl.patch
new file mode 120000
index 00000000000..18c585a61cd
--- /dev/null
+++ b/srcpkgs/util-linux-libs/patches/fix-musl.patch
@@ -0,0 +1 @@
+../../util-linux/patches/fix-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/util-linux-libs/template b/srcpkgs/util-linux-libs/template
new file mode 100644
index 00000000000..aa6ea5f5dec
--- /dev/null
+++ b/srcpkgs/util-linux-libs/template
@@ -0,0 +1,134 @@
+# Template file for 'util-linux-libs'
+# Keep this package sync with util-linux
+pkgname=util-linux-libs
+version=2.35.1
+revision=2
+wrksrc="util-linux-$version"
+build_style=meta
+hostmakedepends="automake bison gettext-devel libtool pkg-config xz"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+depends="libfdisk libblkid libmount libsmartcols libuuid"
+checkdepends="ncurses" # Some tests require terminfo-entries
+short_desc="Miscellaneous linux utilities - meta libraries"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="GPL-2.0-or-later"
+homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
+distfiles="${KERNEL_SITE}/utils/util-linux/v2.35/util-linux-${version}.tar.xz"
+checksum=d9de3edd287366cd908e77677514b9387b22bc7b88f45b83e1922c3597f1d7f9
+
+pre_configure() {
+	NOCONFIGURE=1 ./autogen.sh
+}
+
+do_configure() {
+	./configure ${configure_args} \
+		--exec-prefix=/usr --libdir=/usr/lib \
+		--bindir=/usr/bin --sbindir=/usr/bin \
+		--enable-libuuid --disable-makeinstall-chown \
+		--enable-libblkid --enable-fsck --disable-rpath \
+		--enable-fs-paths-extra=/usr/sbin:/usr/bin \
+		--enable-vipw --enable-newgrp --enable-chfn-chsh \
+		--with-systemdsystemunitdir=no \
+		--without-udev --without-python \
+		--enable-write
+}
+
+do_build() {
+	make ${makejobs}
+}
+
+do_check() {
+	make -k check
+}
+
+do_install() {
+	make usrsbin_execdir=/usr/bin DESTDIR=${DESTDIR} install
+	# Those files will be provided by util-linux
+	rm -rf "$DESTDIR/usr/bin"
+	rm -rf "$DESTDIR/usr/share/man/man1"
+	rm -rf "$DESTDIR/usr/share/man/man8"
+	rm -rf "$DESTDIR/usr/share/bash-completion"
+}
+
+libfdisk_package() {
+	short_desc="Library for fdisk(8)"
+	pkg_install() {
+		vmove "usr/lib/libfdisk.so.*"
+	}
+}
+libfdisk-devel_package() {
+	depends="libblkid-devel-${version}_${revision} libfdisk-${version}_${revision}"
+	short_desc="Library for fdisk(8) - development files"
+	pkg_install() {
+		vmove usr/lib/libfdisk.a
+		vmove usr/lib/libfdisk.so
+		vmove "usr/lib/pkgconfig/*fdisk*"
+		vmove usr/include/libfdisk
+	}
+}
+libmount_package() {
+	short_desc="Library for mount(8)"
+	pkg_install() {
+		vmove "usr/lib/libmount.so.*"
+	}
+}
+libmount-devel_package() {
+	depends="libblkid-devel-${version}_${revision} libmount-${version}_${revision}"
+	short_desc="Library for mount(8) - development files"
+	pkg_install() {
+		vmove usr/lib/libmount.a
+		vmove usr/lib/libmount.so
+		vmove "usr/lib/pkgconfig/*mount*"
+		vmove usr/include/libmount
+	}
+}
+libblkid_package() {
+	short_desc="Library to handle device identification"
+	pkg_install() {
+		vmove "usr/lib/libblkid.so.*"
+	}
+}
+libblkid-devel_package() {
+	depends="zlib-devel libuuid-devel-${version}_${revision} libblkid-${version}_${revision}"
+	short_desc="Library to handle device identification - development files"
+	pkg_install() {
+		vmove usr/include/blkid
+		vmove usr/lib/libblkid.a
+		vmove usr/lib/libblkid.so
+		vmove usr/lib/pkgconfig/blkid.pc
+		vmove usr/share/man/man3/libblkid.3
+	}
+}
+libuuid_package() {
+	short_desc="UUID library"
+	pkg_install() {
+		vmove "usr/lib/libuuid.so.*"
+	}
+}
+libuuid-devel_package() {
+	depends="libuuid-${version}_${revision}"
+	short_desc="UUID library development files"
+	pkg_install() {
+		vmove usr/lib/libuuid.a
+		vmove usr/lib/libuuid.so
+		vmove usr/lib/pkgconfig
+		vmove usr/include/uuid
+		vmove usr/share/man/man3/uuid*
+	}
+}
+libsmartcols-devel_package() {
+	depends="libsmartcols>=${version}_${revision}"
+	short_desc="Table or Tree library from util-linux - development files"
+	pkg_install() {
+		vmove usr/lib/libsmartcols.a
+		vmove usr/lib/libsmartcols.so
+		vmove usr/include/libsmartcols
+		vmove usr/lib/pkgconfig/smartcols*
+	}
+}
+libsmartcols_package() {
+	short_desc="Table or Tree library from util-linux"
+	pkg_install() {
+		vmove usr/lib/libsmartcols.so.*
+	}
+}
diff --git a/srcpkgs/util-linux-libs/update b/srcpkgs/util-linux-libs/update
new file mode 100644
index 00000000000..66f75411a4b
--- /dev/null
+++ b/srcpkgs/util-linux-libs/update
@@ -0,0 +1,2 @@
+site='https://github.com/karelzak/util-linux/releases'
+pattern='/archive/v\K[\d\.]+(?=\.tar\.gz")'
diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 38fcaca670f..29e73a357f9 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,9 +1,11 @@
 # Template file for 'util-linux'
+# Keep this package sync with util-linux-libs
 pkgname=util-linux
 version=2.35.1
-revision=1
+revision=2
 hostmakedepends="automake bison gettext-devel libtool pkg-config xz"
-makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel
+ eudev-libudev-devel"
 checkdepends="ncurses" # Some tests require terminfo-entries
 short_desc="Miscellaneous linux utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -40,7 +42,7 @@ do_configure() {
 		--enable-fs-paths-extra=/usr/sbin:/usr/bin \
 		--enable-vipw --enable-newgrp --enable-chfn-chsh \
 		--with-systemdsystemunitdir=no \
-		--without-udev --without-python \
+		--with-udev --without-python \
 		--enable-write
 }
 
@@ -68,87 +70,8 @@ do_install() {
 	vinstall $FILESDIR/common.pam 644 etc/pam.d chsh
 
 	vsv uuidd
-}
 
-libfdisk_package() {
-	short_desc="Library for fdisk(8)"
-	pkg_install() {
-		vmove "usr/lib/libfdisk.so.*"
-	}
-}
-libfdisk-devel_package() {
-	depends="libblkid-devel-${version}_${revision} libfdisk-${version}_${revision}"
-	short_desc="Library for fdisk(8) - development files"
-	pkg_install() {
-		vmove usr/lib/libfdisk.a
-		vmove usr/lib/libfdisk.so
-		vmove "usr/lib/pkgconfig/*fdisk*"
-		vmove usr/include/libfdisk
-	}
-}
-libmount_package() {
-	short_desc="Library for mount(8)"
-	pkg_install() {
-		vmove "usr/lib/libmount.so.*"
-	}
-}
-libmount-devel_package() {
-	depends="libblkid-devel-${version}_${revision} libmount-${version}_${revision}"
-	short_desc="Library for mount(8) - development files"
-	pkg_install() {
-		vmove usr/lib/libmount.a
-		vmove usr/lib/libmount.so
-		vmove "usr/lib/pkgconfig/*mount*"
-		vmove usr/include/libmount
-	}
-}
-libblkid_package() {
-	short_desc="Library to handle device identification"
-	pkg_install() {
-		vmove "usr/lib/libblkid.so.*"
-	}
-}
-libblkid-devel_package() {
-	depends="zlib-devel libuuid-devel-${version}_${revision} libblkid-${version}_${revision}"
-	short_desc="Library to handle device identification - development files"
-	pkg_install() {
-		vmove usr/include/blkid
-		vmove usr/lib/libblkid.a
-		vmove usr/lib/libblkid.so
-		vmove usr/lib/pkgconfig/blkid.pc
-		vmove usr/share/man/man3/libblkid.3
-	}
-}
-libuuid_package() {
-	short_desc="UUID library"
-	pkg_install() {
-		vmove "usr/lib/libuuid.so.*"
-	}
-}
-libuuid-devel_package() {
-	depends="libuuid-${version}_${revision}"
-	short_desc="UUID library development files"
-	pkg_install() {
-		vmove usr/lib/libuuid.a
-		vmove usr/lib/libuuid.so
-		vmove usr/lib/pkgconfig
-		vmove usr/include/uuid
-		vmove usr/share/man/man3/uuid*
-	}
-}
-libsmartcols-devel_package() {
-	depends="libsmartcols>=${version}_${revision}"
-	short_desc="Table or Tree library from util-linux - development files"
-	pkg_install() {
-		vmove usr/lib/libsmartcols.a
-		vmove usr/lib/libsmartcols.so
-		vmove usr/include/libsmartcols
-		vmove usr/lib/pkgconfig/smartcols*
-	}
-}
-libsmartcols_package() {
-	short_desc="Table or Tree library from util-linux"
-	pkg_install() {
-		vmove usr/lib/libsmartcols.so.*
-	}
+	rm -rf "$DESTDIR/usr/include"
+	rm -rf "$DESTDIR/usr/lib"
+	rm -rf "$DESTDIR/usr/share/man/man3"
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] util-linux: split libraries into separated template files
  2020-05-09  1:44 [PR PATCH] util-linux: split libraries into separated template files sgn
@ 2020-05-09  4:27 ` sgn
  2020-05-09  6:05 ` sgn
  2020-05-11  0:32 ` [PR PATCH] [Merged]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2020-05-09  4:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages util-linux-eudev
https://github.com/void-linux/void-packages/pull/21773

util-linux: split libraries into separated template files
This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs

---
@Gottox : maintainer
@q66 : please check on PowerPC

A patch file from https://github.com/void-linux/void-packages/pull/21773.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-util-linux-eudev-21773.patch --]
[-- Type: text/x-diff, Size: 12939 bytes --]

From 79c37fa5233e5eaa63342a50a16174d4aa1892c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 1 May 2020 13:50:39 +0700
Subject: [PATCH] util-linux: split libraries into separated template files

This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs
---
 srcpkgs/libblkid                              |   2 +-
 srcpkgs/libblkid-devel                        |   2 +-
 srcpkgs/libfdisk                              |   2 +-
 srcpkgs/libfdisk-devel                        |   2 +-
 srcpkgs/libmount                              |   2 +-
 srcpkgs/libmount-devel                        |   2 +-
 srcpkgs/libsmartcols                          |   2 +-
 srcpkgs/libsmartcols-devel                    |   2 +-
 srcpkgs/libuuid                               |   2 +-
 srcpkgs/libuuid-devel                         |   2 +-
 .../util-linux-libs/patches/fix-musl.patch    |   1 +
 srcpkgs/util-linux-libs/template              | 151 ++++++++++++++++++
 srcpkgs/util-linux-libs/update                |   2 +
 srcpkgs/util-linux/template                   |  94 ++---------
 14 files changed, 173 insertions(+), 95 deletions(-)
 create mode 120000 srcpkgs/util-linux-libs/patches/fix-musl.patch
 create mode 100644 srcpkgs/util-linux-libs/template
 create mode 100644 srcpkgs/util-linux-libs/update

diff --git a/srcpkgs/libblkid b/srcpkgs/libblkid
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libblkid
+++ b/srcpkgs/libblkid
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libblkid-devel b/srcpkgs/libblkid-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libblkid-devel
+++ b/srcpkgs/libblkid-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libfdisk b/srcpkgs/libfdisk
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libfdisk
+++ b/srcpkgs/libfdisk
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libfdisk-devel b/srcpkgs/libfdisk-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libfdisk-devel
+++ b/srcpkgs/libfdisk-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libmount b/srcpkgs/libmount
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libmount
+++ b/srcpkgs/libmount
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libmount-devel b/srcpkgs/libmount-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libmount-devel
+++ b/srcpkgs/libmount-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libsmartcols b/srcpkgs/libsmartcols
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libsmartcols
+++ b/srcpkgs/libsmartcols
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libsmartcols-devel b/srcpkgs/libsmartcols-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libsmartcols-devel
+++ b/srcpkgs/libsmartcols-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libuuid b/srcpkgs/libuuid
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libuuid
+++ b/srcpkgs/libuuid
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libuuid-devel b/srcpkgs/libuuid-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libuuid-devel
+++ b/srcpkgs/libuuid-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/util-linux-libs/patches/fix-musl.patch b/srcpkgs/util-linux-libs/patches/fix-musl.patch
new file mode 120000
index 00000000000..18c585a61cd
--- /dev/null
+++ b/srcpkgs/util-linux-libs/patches/fix-musl.patch
@@ -0,0 +1 @@
+../../util-linux/patches/fix-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/util-linux-libs/template b/srcpkgs/util-linux-libs/template
new file mode 100644
index 00000000000..d42e4c18101
--- /dev/null
+++ b/srcpkgs/util-linux-libs/template
@@ -0,0 +1,151 @@
+# Template file for 'util-linux-libs'
+# Keep this package sync with util-linux
+pkgname=util-linux-libs
+version=2.35.1
+revision=2
+wrksrc="util-linux-$version"
+build_style=meta
+hostmakedepends="automake bison gettext-devel libtool pkg-config xz"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+depends="libfdisk libblkid libmount libsmartcols libuuid"
+checkdepends="ncurses" # Some tests require terminfo-entries
+short_desc="Miscellaneous linux utilities - meta libraries"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="GPL-2.0-or-later"
+homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
+distfiles="${KERNEL_SITE}/utils/util-linux/v2.35/util-linux-${version}.tar.xz"
+checksum=d9de3edd287366cd908e77677514b9387b22bc7b88f45b83e1922c3597f1d7f9
+
+pre_configure() {
+	local _cfgdir="$XBPS_COMMONDIR/environment/configure"
+	NOCONFIGURE=1 ./autogen.sh
+	for f in ./**/*config*.sub; do
+		if [ -f "$f" ]; then
+			cp -f "$_cfgdir/automake/config.sub" "$f"
+		fi
+	done
+	for f in ./**/*config*.guess; do
+		if [ -f "$f" ]; then
+			cp -f "$_cfgdir/automake/config.guess" "$f"
+		fi
+	done
+	# We want to keep basepkg as meta but we also needs below helper
+	build_style=
+	. "$_cfgdir/gnu-configure-args.sh"
+}
+
+do_configure() {
+	./configure ${configure_args} \
+		--exec-prefix=/usr --libdir=/usr/lib \
+		--bindir=/usr/bin --sbindir=/usr/bin \
+		--enable-libuuid --disable-makeinstall-chown \
+		--enable-libblkid --enable-fsck --disable-rpath \
+		--enable-fs-paths-extra=/usr/sbin:/usr/bin \
+		--enable-vipw --enable-newgrp --enable-chfn-chsh \
+		--with-systemdsystemunitdir=no \
+		--without-udev --without-python \
+		--enable-write
+}
+
+do_build() {
+	make ${makejobs}
+}
+
+do_check() {
+	make -k check
+}
+
+do_install() {
+	make usrsbin_execdir=/usr/bin DESTDIR=${DESTDIR} install
+	# Those files will be provided by util-linux
+	rm -rf "$DESTDIR/usr/bin"
+	rm -rf "$DESTDIR/usr/share/man/man1"
+	rm -rf "$DESTDIR/usr/share/man/man5"
+	rm -rf "$DESTDIR/usr/share/man/man8"
+	rm -rf "$DESTDIR/usr/share/bash-completion"
+	rm -rf "$DESTDIR/usr/share/locale"
+	rm -rf "$DESTDIR/usr/share/doc/"
+}
+
+libfdisk_package() {
+	short_desc="Library for fdisk(8)"
+	pkg_install() {
+		vmove "usr/lib/libfdisk.so.*"
+	}
+}
+libfdisk-devel_package() {
+	depends="libblkid-devel-${version}_${revision} libfdisk-${version}_${revision}"
+	short_desc="Library for fdisk(8) - development files"
+	pkg_install() {
+		vmove usr/lib/libfdisk.a
+		vmove usr/lib/libfdisk.so
+		vmove "usr/lib/pkgconfig/*fdisk*"
+		vmove usr/include/libfdisk
+	}
+}
+libmount_package() {
+	short_desc="Library for mount(8)"
+	pkg_install() {
+		vmove "usr/lib/libmount.so.*"
+	}
+}
+libmount-devel_package() {
+	depends="libblkid-devel-${version}_${revision} libmount-${version}_${revision}"
+	short_desc="Library for mount(8) - development files"
+	pkg_install() {
+		vmove usr/lib/libmount.a
+		vmove usr/lib/libmount.so
+		vmove "usr/lib/pkgconfig/*mount*"
+		vmove usr/include/libmount
+	}
+}
+libblkid_package() {
+	short_desc="Library to handle device identification"
+	pkg_install() {
+		vmove "usr/lib/libblkid.so.*"
+	}
+}
+libblkid-devel_package() {
+	depends="zlib-devel libuuid-devel-${version}_${revision} libblkid-${version}_${revision}"
+	short_desc="Library to handle device identification - development files"
+	pkg_install() {
+		vmove usr/include/blkid
+		vmove usr/lib/libblkid.a
+		vmove usr/lib/libblkid.so
+		vmove usr/lib/pkgconfig/blkid.pc
+		vmove usr/share/man/man3/libblkid.3
+	}
+}
+libuuid_package() {
+	short_desc="UUID library"
+	pkg_install() {
+		vmove "usr/lib/libuuid.so.*"
+	}
+}
+libuuid-devel_package() {
+	depends="libuuid-${version}_${revision}"
+	short_desc="UUID library development files"
+	pkg_install() {
+		vmove usr/lib/libuuid.a
+		vmove usr/lib/libuuid.so
+		vmove usr/lib/pkgconfig
+		vmove usr/include/uuid
+		vmove usr/share/man/man3/uuid*
+	}
+}
+libsmartcols-devel_package() {
+	depends="libsmartcols>=${version}_${revision}"
+	short_desc="Table or Tree library from util-linux - development files"
+	pkg_install() {
+		vmove usr/lib/libsmartcols.a
+		vmove usr/lib/libsmartcols.so
+		vmove usr/include/libsmartcols
+		vmove usr/lib/pkgconfig/smartcols*
+	}
+}
+libsmartcols_package() {
+	short_desc="Table or Tree library from util-linux"
+	pkg_install() {
+		vmove usr/lib/libsmartcols.so.*
+	}
+}
diff --git a/srcpkgs/util-linux-libs/update b/srcpkgs/util-linux-libs/update
new file mode 100644
index 00000000000..66f75411a4b
--- /dev/null
+++ b/srcpkgs/util-linux-libs/update
@@ -0,0 +1,2 @@
+site='https://github.com/karelzak/util-linux/releases'
+pattern='/archive/v\K[\d\.]+(?=\.tar\.gz")'
diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 38fcaca670f..b20105937e7 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,9 +1,12 @@
 # Template file for 'util-linux'
+# Keep this package sync with util-linux-libs
 pkgname=util-linux
 version=2.35.1
-revision=1
+revision=2
 hostmakedepends="automake bison gettext-devel libtool pkg-config xz"
-makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel
+ eudev-libudev-devel"
+depends="util-linux-libs-${version}_${revision}"
 checkdepends="ncurses" # Some tests require terminfo-entries
 short_desc="Miscellaneous linux utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -40,7 +43,7 @@ do_configure() {
 		--enable-fs-paths-extra=/usr/sbin:/usr/bin \
 		--enable-vipw --enable-newgrp --enable-chfn-chsh \
 		--with-systemdsystemunitdir=no \
-		--without-udev --without-python \
+		--with-udev --without-python \
 		--enable-write
 }
 
@@ -68,87 +71,8 @@ do_install() {
 	vinstall $FILESDIR/common.pam 644 etc/pam.d chsh
 
 	vsv uuidd
-}
 
-libfdisk_package() {
-	short_desc="Library for fdisk(8)"
-	pkg_install() {
-		vmove "usr/lib/libfdisk.so.*"
-	}
-}
-libfdisk-devel_package() {
-	depends="libblkid-devel-${version}_${revision} libfdisk-${version}_${revision}"
-	short_desc="Library for fdisk(8) - development files"
-	pkg_install() {
-		vmove usr/lib/libfdisk.a
-		vmove usr/lib/libfdisk.so
-		vmove "usr/lib/pkgconfig/*fdisk*"
-		vmove usr/include/libfdisk
-	}
-}
-libmount_package() {
-	short_desc="Library for mount(8)"
-	pkg_install() {
-		vmove "usr/lib/libmount.so.*"
-	}
-}
-libmount-devel_package() {
-	depends="libblkid-devel-${version}_${revision} libmount-${version}_${revision}"
-	short_desc="Library for mount(8) - development files"
-	pkg_install() {
-		vmove usr/lib/libmount.a
-		vmove usr/lib/libmount.so
-		vmove "usr/lib/pkgconfig/*mount*"
-		vmove usr/include/libmount
-	}
-}
-libblkid_package() {
-	short_desc="Library to handle device identification"
-	pkg_install() {
-		vmove "usr/lib/libblkid.so.*"
-	}
-}
-libblkid-devel_package() {
-	depends="zlib-devel libuuid-devel-${version}_${revision} libblkid-${version}_${revision}"
-	short_desc="Library to handle device identification - development files"
-	pkg_install() {
-		vmove usr/include/blkid
-		vmove usr/lib/libblkid.a
-		vmove usr/lib/libblkid.so
-		vmove usr/lib/pkgconfig/blkid.pc
-		vmove usr/share/man/man3/libblkid.3
-	}
-}
-libuuid_package() {
-	short_desc="UUID library"
-	pkg_install() {
-		vmove "usr/lib/libuuid.so.*"
-	}
-}
-libuuid-devel_package() {
-	depends="libuuid-${version}_${revision}"
-	short_desc="UUID library development files"
-	pkg_install() {
-		vmove usr/lib/libuuid.a
-		vmove usr/lib/libuuid.so
-		vmove usr/lib/pkgconfig
-		vmove usr/include/uuid
-		vmove usr/share/man/man3/uuid*
-	}
-}
-libsmartcols-devel_package() {
-	depends="libsmartcols>=${version}_${revision}"
-	short_desc="Table or Tree library from util-linux - development files"
-	pkg_install() {
-		vmove usr/lib/libsmartcols.a
-		vmove usr/lib/libsmartcols.so
-		vmove usr/include/libsmartcols
-		vmove usr/lib/pkgconfig/smartcols*
-	}
-}
-libsmartcols_package() {
-	short_desc="Table or Tree library from util-linux"
-	pkg_install() {
-		vmove usr/lib/libsmartcols.so.*
-	}
+	rm -rf "$DESTDIR/usr/include"
+	rm -rf "$DESTDIR/usr/lib"
+	rm -rf "$DESTDIR/usr/share/man/man3"
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] util-linux: split libraries into separated template files
  2020-05-09  1:44 [PR PATCH] util-linux: split libraries into separated template files sgn
  2020-05-09  4:27 ` [PR PATCH] [Updated] " sgn
@ 2020-05-09  6:05 ` sgn
  2020-05-11  0:32 ` [PR PATCH] [Merged]: " sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2020-05-09  6:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages util-linux-eudev
https://github.com/void-linux/void-packages/pull/21773

util-linux: split libraries into separated template files
This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs

---
@Gottox : maintainer
@q66 : please check on PowerPC

A patch file from https://github.com/void-linux/void-packages/pull/21773.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-util-linux-eudev-21773.patch --]
[-- Type: text/x-diff, Size: 12944 bytes --]

From 1c54f3ecfaf0a6e4025a263346f89f6d4e6bc409 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx+sgn@gmail.com>
Date: Fri, 1 May 2020 13:50:39 +0700
Subject: [PATCH] util-linux: split libraries into separated template files

This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs
---
 srcpkgs/libblkid                              |   2 +-
 srcpkgs/libblkid-devel                        |   2 +-
 srcpkgs/libfdisk                              |   2 +-
 srcpkgs/libfdisk-devel                        |   2 +-
 srcpkgs/libmount                              |   2 +-
 srcpkgs/libmount-devel                        |   2 +-
 srcpkgs/libsmartcols                          |   2 +-
 srcpkgs/libsmartcols-devel                    |   2 +-
 srcpkgs/libuuid                               |   2 +-
 srcpkgs/libuuid-devel                         |   2 +-
 .../util-linux-libs/patches/fix-musl.patch    |   1 +
 srcpkgs/util-linux-libs/template              | 151 ++++++++++++++++++
 srcpkgs/util-linux-libs/update                |   2 +
 srcpkgs/util-linux/template                   |  94 ++---------
 14 files changed, 173 insertions(+), 95 deletions(-)
 create mode 120000 srcpkgs/util-linux-libs/patches/fix-musl.patch
 create mode 100644 srcpkgs/util-linux-libs/template
 create mode 100644 srcpkgs/util-linux-libs/update

diff --git a/srcpkgs/libblkid b/srcpkgs/libblkid
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libblkid
+++ b/srcpkgs/libblkid
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libblkid-devel b/srcpkgs/libblkid-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libblkid-devel
+++ b/srcpkgs/libblkid-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libfdisk b/srcpkgs/libfdisk
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libfdisk
+++ b/srcpkgs/libfdisk
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libfdisk-devel b/srcpkgs/libfdisk-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libfdisk-devel
+++ b/srcpkgs/libfdisk-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libmount b/srcpkgs/libmount
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libmount
+++ b/srcpkgs/libmount
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libmount-devel b/srcpkgs/libmount-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libmount-devel
+++ b/srcpkgs/libmount-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libsmartcols b/srcpkgs/libsmartcols
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libsmartcols
+++ b/srcpkgs/libsmartcols
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libsmartcols-devel b/srcpkgs/libsmartcols-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libsmartcols-devel
+++ b/srcpkgs/libsmartcols-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libuuid b/srcpkgs/libuuid
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libuuid
+++ b/srcpkgs/libuuid
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/libuuid-devel b/srcpkgs/libuuid-devel
index a7ce47a999f..d3d5b40f1ef 120000
--- a/srcpkgs/libuuid-devel
+++ b/srcpkgs/libuuid-devel
@@ -1 +1 @@
-util-linux
\ No newline at end of file
+util-linux-libs
\ No newline at end of file
diff --git a/srcpkgs/util-linux-libs/patches/fix-musl.patch b/srcpkgs/util-linux-libs/patches/fix-musl.patch
new file mode 120000
index 00000000000..18c585a61cd
--- /dev/null
+++ b/srcpkgs/util-linux-libs/patches/fix-musl.patch
@@ -0,0 +1 @@
+../../util-linux/patches/fix-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/util-linux-libs/template b/srcpkgs/util-linux-libs/template
new file mode 100644
index 00000000000..ff50dae36e5
--- /dev/null
+++ b/srcpkgs/util-linux-libs/template
@@ -0,0 +1,151 @@
+# Template file for 'util-linux-libs'
+# Keep this package sync with util-linux
+pkgname=util-linux-libs
+version=2.35.1
+revision=2
+wrksrc="util-linux-$version"
+build_style=meta
+hostmakedepends="automake bison gettext-devel libtool pkg-config xz"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+depends="libfdisk libblkid libmount libsmartcols libuuid"
+checkdepends="ncurses" # Some tests require terminfo-entries
+short_desc="Miscellaneous linux utilities - meta libraries"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+license="GPL-2.0-or-later"
+homepage="https://www.kernel.org/pub/linux/utils/util-linux/"
+distfiles="${KERNEL_SITE}/utils/util-linux/v2.35/util-linux-${version}.tar.xz"
+checksum=d9de3edd287366cd908e77677514b9387b22bc7b88f45b83e1922c3597f1d7f9
+
+pre_configure() {
+	local _cfgdir="$XBPS_COMMONDIR/environment/configure"
+	NOCONFIGURE=1 ./autogen.sh
+	for f in ./**/*config*.sub; do
+		if [ -f "$f" ]; then
+			cp -f "$_cfgdir/automake/config.sub" "$f"
+		fi
+	done
+	for f in ./**/*config*.guess; do
+		if [ -f "$f" ]; then
+			cp -f "$_cfgdir/automake/config.guess" "$f"
+		fi
+	done
+	# We want to keep basepkg as meta but we also needs below helper
+	unset build_style
+	. "$_cfgdir/gnu-configure-args.sh"
+}
+
+do_configure() {
+	./configure ${configure_args} \
+		--exec-prefix=/usr --libdir=/usr/lib \
+		--bindir=/usr/bin --sbindir=/usr/bin \
+		--enable-libuuid --disable-makeinstall-chown \
+		--enable-libblkid --enable-fsck --disable-rpath \
+		--enable-fs-paths-extra=/usr/sbin:/usr/bin \
+		--enable-vipw --enable-newgrp --enable-chfn-chsh \
+		--with-systemdsystemunitdir=no \
+		--without-udev --without-python \
+		--enable-write
+}
+
+do_build() {
+	make ${makejobs}
+}
+
+do_check() {
+	make -k check
+}
+
+do_install() {
+	make usrsbin_execdir=/usr/bin DESTDIR=${DESTDIR} install
+	# Those files will be provided by util-linux
+	rm -rf "$DESTDIR/usr/bin"
+	rm -rf "$DESTDIR/usr/share/man/man1"
+	rm -rf "$DESTDIR/usr/share/man/man5"
+	rm -rf "$DESTDIR/usr/share/man/man8"
+	rm -rf "$DESTDIR/usr/share/bash-completion"
+	rm -rf "$DESTDIR/usr/share/locale"
+	rm -rf "$DESTDIR/usr/share/doc/"
+}
+
+libfdisk_package() {
+	short_desc="Library for fdisk(8)"
+	pkg_install() {
+		vmove "usr/lib/libfdisk.so.*"
+	}
+}
+libfdisk-devel_package() {
+	depends="libblkid-devel-${version}_${revision} libfdisk-${version}_${revision}"
+	short_desc="Library for fdisk(8) - development files"
+	pkg_install() {
+		vmove usr/lib/libfdisk.a
+		vmove usr/lib/libfdisk.so
+		vmove "usr/lib/pkgconfig/*fdisk*"
+		vmove usr/include/libfdisk
+	}
+}
+libmount_package() {
+	short_desc="Library for mount(8)"
+	pkg_install() {
+		vmove "usr/lib/libmount.so.*"
+	}
+}
+libmount-devel_package() {
+	depends="libblkid-devel-${version}_${revision} libmount-${version}_${revision}"
+	short_desc="Library for mount(8) - development files"
+	pkg_install() {
+		vmove usr/lib/libmount.a
+		vmove usr/lib/libmount.so
+		vmove "usr/lib/pkgconfig/*mount*"
+		vmove usr/include/libmount
+	}
+}
+libblkid_package() {
+	short_desc="Library to handle device identification"
+	pkg_install() {
+		vmove "usr/lib/libblkid.so.*"
+	}
+}
+libblkid-devel_package() {
+	depends="zlib-devel libuuid-devel-${version}_${revision} libblkid-${version}_${revision}"
+	short_desc="Library to handle device identification - development files"
+	pkg_install() {
+		vmove usr/include/blkid
+		vmove usr/lib/libblkid.a
+		vmove usr/lib/libblkid.so
+		vmove usr/lib/pkgconfig/blkid.pc
+		vmove usr/share/man/man3/libblkid.3
+	}
+}
+libuuid_package() {
+	short_desc="UUID library"
+	pkg_install() {
+		vmove "usr/lib/libuuid.so.*"
+	}
+}
+libuuid-devel_package() {
+	depends="libuuid-${version}_${revision}"
+	short_desc="UUID library development files"
+	pkg_install() {
+		vmove usr/lib/libuuid.a
+		vmove usr/lib/libuuid.so
+		vmove usr/lib/pkgconfig
+		vmove usr/include/uuid
+		vmove usr/share/man/man3/uuid*
+	}
+}
+libsmartcols-devel_package() {
+	depends="libsmartcols>=${version}_${revision}"
+	short_desc="Table or Tree library from util-linux - development files"
+	pkg_install() {
+		vmove usr/lib/libsmartcols.a
+		vmove usr/lib/libsmartcols.so
+		vmove usr/include/libsmartcols
+		vmove usr/lib/pkgconfig/smartcols*
+	}
+}
+libsmartcols_package() {
+	short_desc="Table or Tree library from util-linux"
+	pkg_install() {
+		vmove usr/lib/libsmartcols.so.*
+	}
+}
diff --git a/srcpkgs/util-linux-libs/update b/srcpkgs/util-linux-libs/update
new file mode 100644
index 00000000000..66f75411a4b
--- /dev/null
+++ b/srcpkgs/util-linux-libs/update
@@ -0,0 +1,2 @@
+site='https://github.com/karelzak/util-linux/releases'
+pattern='/archive/v\K[\d\.]+(?=\.tar\.gz")'
diff --git a/srcpkgs/util-linux/template b/srcpkgs/util-linux/template
index 38fcaca670f..b20105937e7 100644
--- a/srcpkgs/util-linux/template
+++ b/srcpkgs/util-linux/template
@@ -1,9 +1,12 @@
 # Template file for 'util-linux'
+# Keep this package sync with util-linux-libs
 pkgname=util-linux
 version=2.35.1
-revision=1
+revision=2
 hostmakedepends="automake bison gettext-devel libtool pkg-config xz"
-makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel"
+makedepends="libcap-ng-devel pam-devel readline-devel zlib-devel
+ eudev-libudev-devel"
+depends="util-linux-libs-${version}_${revision}"
 checkdepends="ncurses" # Some tests require terminfo-entries
 short_desc="Miscellaneous linux utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -40,7 +43,7 @@ do_configure() {
 		--enable-fs-paths-extra=/usr/sbin:/usr/bin \
 		--enable-vipw --enable-newgrp --enable-chfn-chsh \
 		--with-systemdsystemunitdir=no \
-		--without-udev --without-python \
+		--with-udev --without-python \
 		--enable-write
 }
 
@@ -68,87 +71,8 @@ do_install() {
 	vinstall $FILESDIR/common.pam 644 etc/pam.d chsh
 
 	vsv uuidd
-}
 
-libfdisk_package() {
-	short_desc="Library for fdisk(8)"
-	pkg_install() {
-		vmove "usr/lib/libfdisk.so.*"
-	}
-}
-libfdisk-devel_package() {
-	depends="libblkid-devel-${version}_${revision} libfdisk-${version}_${revision}"
-	short_desc="Library for fdisk(8) - development files"
-	pkg_install() {
-		vmove usr/lib/libfdisk.a
-		vmove usr/lib/libfdisk.so
-		vmove "usr/lib/pkgconfig/*fdisk*"
-		vmove usr/include/libfdisk
-	}
-}
-libmount_package() {
-	short_desc="Library for mount(8)"
-	pkg_install() {
-		vmove "usr/lib/libmount.so.*"
-	}
-}
-libmount-devel_package() {
-	depends="libblkid-devel-${version}_${revision} libmount-${version}_${revision}"
-	short_desc="Library for mount(8) - development files"
-	pkg_install() {
-		vmove usr/lib/libmount.a
-		vmove usr/lib/libmount.so
-		vmove "usr/lib/pkgconfig/*mount*"
-		vmove usr/include/libmount
-	}
-}
-libblkid_package() {
-	short_desc="Library to handle device identification"
-	pkg_install() {
-		vmove "usr/lib/libblkid.so.*"
-	}
-}
-libblkid-devel_package() {
-	depends="zlib-devel libuuid-devel-${version}_${revision} libblkid-${version}_${revision}"
-	short_desc="Library to handle device identification - development files"
-	pkg_install() {
-		vmove usr/include/blkid
-		vmove usr/lib/libblkid.a
-		vmove usr/lib/libblkid.so
-		vmove usr/lib/pkgconfig/blkid.pc
-		vmove usr/share/man/man3/libblkid.3
-	}
-}
-libuuid_package() {
-	short_desc="UUID library"
-	pkg_install() {
-		vmove "usr/lib/libuuid.so.*"
-	}
-}
-libuuid-devel_package() {
-	depends="libuuid-${version}_${revision}"
-	short_desc="UUID library development files"
-	pkg_install() {
-		vmove usr/lib/libuuid.a
-		vmove usr/lib/libuuid.so
-		vmove usr/lib/pkgconfig
-		vmove usr/include/uuid
-		vmove usr/share/man/man3/uuid*
-	}
-}
-libsmartcols-devel_package() {
-	depends="libsmartcols>=${version}_${revision}"
-	short_desc="Table or Tree library from util-linux - development files"
-	pkg_install() {
-		vmove usr/lib/libsmartcols.a
-		vmove usr/lib/libsmartcols.so
-		vmove usr/include/libsmartcols
-		vmove usr/lib/pkgconfig/smartcols*
-	}
-}
-libsmartcols_package() {
-	short_desc="Table or Tree library from util-linux"
-	pkg_install() {
-		vmove usr/lib/libsmartcols.so.*
-	}
+	rm -rf "$DESTDIR/usr/include"
+	rm -rf "$DESTDIR/usr/lib"
+	rm -rf "$DESTDIR/usr/share/man/man3"
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: util-linux: split libraries into separated template files
  2020-05-09  1:44 [PR PATCH] util-linux: split libraries into separated template files sgn
  2020-05-09  4:27 ` [PR PATCH] [Updated] " sgn
  2020-05-09  6:05 ` sgn
@ 2020-05-11  0:32 ` sgn
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2020-05-11  0:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

There's a merged pull request on the void-packages repository

util-linux: split libraries into separated template files
https://github.com/void-linux/void-packages/pull/21773

Description:
This is a rework of 66062de198 (util-linux: compile with eudev,
2019-10-30)

In order to support this command for unpriviledge users:

	lsblk -f

util-linux needs to be compile `--with-udev`.

However, eudev itself depends on `libblkid-devel` for building.

Break this dependency cycle by:
- compile `util-linux` `--without-udev` first, only keep its library,
this will be the `util-linux-libs` meta package
- compile eudev against that `util-linux` (`--without-udev`)
- compile util-linux binary against eudev, discard its libs

---
@Gottox : maintainer
@q66 : please check on PowerPC

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-11  0:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  1:44 [PR PATCH] util-linux: split libraries into separated template files sgn
2020-05-09  4:27 ` [PR PATCH] [Updated] " sgn
2020-05-09  6:05 ` sgn
2020-05-11  0:32 ` [PR PATCH] [Merged]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).