commit: 950f339272f3fb139266c49f53f6ec5663d7c61a
parent bfe7a67acfb397d789918ac2065d01470224cf3b
Author: fosslinux <fosslinux@aussies.space>
Date: Tue, 22 Jun 2021 20:11:23 +1000
Add util-linux 2.19.1.
Diffstat:
11 files changed, 426 insertions(+), 0 deletions(-)
diff --git a/LICENSES/BSD-4-Clause.txt b/LICENSES/BSD-4-Clause.txt
@@ -0,0 +1,14 @@
+Copyright (c) <year> <owner>. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. All advertising materials mentioning features or use of this software must display the following acknowledgement:
+This product includes software developed by the the organization.
+
+4. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/SHA256SUMS.sources b/SHA256SUMS.sources
@@ -99,3 +99,4 @@ e40b8f018c1da64edd1cc9a6fce5fa63b2e707e404e20cad91fbae337c98a5b7 make-4.2.1.tar
3ec396d97debb6c1a112c1c6ff58b03a55866b75cd4fe06b74295ac9c5fc5ff2 perl-5f2dc80.tar.bz2
84d2079a20ba32f5e2d5bc79a5dcb1de94d0176c67d75d5a20d533ea6c90d691 linux-headers-5.10.41.tar.gz
af618de7848142f204b57811f703de3ae7aa3f5bc5d52226db35800fa8fc4dff kexec-tools-2.0.22.tar.gz
+f694bee56099b8d72c3843d97e27f2306aa9946741e34a27391f6f6f19c7bcd0 util-linux-2.19.1.tar.gz
diff --git a/sysa.py b/sysa.py
@@ -377,6 +377,9 @@ class SysA:
# musl 1.2.2
self.get_file("https://musl.libc.org/releases/musl-1.2.2.tar.gz")
+ # util-linux 2.19.1
+ self.get_file("https://mirrors.kernel.org/pub/linux/utils/util-linux/v2.19/util-linux-2.19.1.tar.gz")
+
# kexec-tools 2.0.22
self.get_file("https://github.com/horms/kexec-tools/archive/refs/tags/v2.0.22.tar.gz",
output="kexec-tools-2.0.22.tar.gz")
diff --git a/sysa/run.sh b/sysa/run.sh
@@ -149,6 +149,8 @@ build musl-1.2.2
build gcc-4.0.4 pass2.sh checksums/pass2
+build util-linux-2.19.1
+
build kexec-tools-2.0.22
build bash-5.1
diff --git a/sysa/util-linux-2.19.1/patches/broken-programs.patch b/sysa/util-linux-2.19.1/patches/broken-programs.patch
@@ -0,0 +1,81 @@
+SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-2.0-or-later
+
+We disable the following programs for the following reasons:
+
+* script: dosen't build with musl.
+* flock: GCC dosen't like some directive.
+* fstrim: ??? dosen't build (missing/bad linux header?)
+* fsfreeze: ditto.
+* hexdump: musl incompatibility.
+* column: musl incompatibility.
+
+diff --color -ru misc-utils/Makefile.am misc-utils/Makefile.am
+--- misc-utils/Makefile.am 2021-06-13 09:34:49.669370352 +1000
++++ misc-utils/Makefile.am 2021-06-13 09:42:06.644523490 +1000
+@@ -6,8 +6,8 @@
+ sbin_PROGRAMS =
+ usrsbin_exec_PROGRAMS =
+
+-usrbin_exec_PROGRAMS = cal ddate logger look mcookie \
+- namei script whereis scriptreplay
++usrbin_exec_PROGRAMS = cal ddate look mcookie \
++ namei whereis scriptreplay
+ EXTRA_DIST += README.cal README.ddate README.namei README.namei2
+
+ mcookie_SOURCES = mcookie.c $(top_srcdir)/lib/md5.c
+@@ -50,18 +50,6 @@
+ wipefs_LDADD = $(ul_libblkid_la)
+ wipefs_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir)
+
+-if BUILD_LSBLK
+-bin_PROGRAMS += lsblk
+-dist_man_MANS += lsblk.8
+-lsblk_SOURCES = lsblk.c \
+- $(top_srcdir)/lib/canonicalize.c \
+- $(top_srcdir)/lib/ismounted.c \
+- $(top_srcdir)/lib/tt.c \
+- $(top_srcdir)/lib/strutils.c
+-lsblk_LDADD = $(ul_libblkid_la)
+-lsblk_CFLAGS = $(AM_CFLAGS) -I$(ul_libblkid_incdir)
+-endif
+-
+ if HAVE_STATIC_BLKID
+ sbin_PROGRAMS += blkid.static
+ blkid_static_SOURCES = $(blkid_SOURCES)
+diff --color -ru sys-utils/Makefile.am sys-utils/Makefile.am
+--- sys-utils/Makefile.am 2021-06-13 09:34:49.686370532 +1000
++++ sys-utils/Makefile.am 2021-06-13 09:42:06.644523490 +1000
+@@ -2,7 +2,7 @@
+
+ bin_PROGRAMS =
+ sbin_PROGRAMS =
+-usrbin_exec_PROGRAMS = flock ipcrm ipcs ipcmk renice setsid
++usrbin_exec_PROGRAMS = ipcrm ipcs ipcmk renice setsid
+ usrsbin_exec_PROGRAMS = readprofile
+
+ dist_man_MANS = flock.1 ipcrm.1 ipcs.1 ipcmk.1 renice.1 setsid.1 \
+@@ -10,8 +10,8 @@
+
+ if LINUX
+ bin_PROGRAMS += dmesg
+-sbin_PROGRAMS += ctrlaltdel fsfreeze fstrim
+-usrbin_exec_PROGRAMS += cytune setarch
++sbin_PROGRAMS += ctrlaltdel fsfreeze
++usrbin_exec_PROGRAMS += cytune
+ usrsbin_exec_PROGRAMS += ldattach tunelp rtcwake
+
+ dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
+diff --color -ru text-utils/Makefile.am text-utils/Makefile.am
+--- text-utils/Makefile.am 2021-06-13 09:34:49.696370638 +1000
++++ text-utils/Makefile.am 2021-06-13 09:46:19.230591066 +1000
+@@ -2,7 +2,7 @@
+
+ EXTRA_DIST = README.clear README.col
+
+-usrbin_exec_PROGRAMS = col colcrt colrm column hexdump rev line tailf
++usrbin_exec_PROGRAMS = col colcrt colrm rev line tailf
+
+ hexdump_SOURCES = hexdump.c conv.c display.c hexsyntax.c parse.c \
+ hexdump.h
diff --git a/sysa/util-linux-2.19.1/patches/disable-tests.patch b/sysa/util-linux-2.19.1/patches/disable-tests.patch
@@ -0,0 +1,19 @@
+SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-2.0-or-later
+
+The tests/ subfolder is broken and useless unless we run `make test' which we
+don't.
+
+--- Makefile.am 2021-06-13 09:50:21.775597435 +1000
++++ Makefile.am 2021-06-13 09:50:10.900501284 +1000
+@@ -29,8 +29,7 @@
+ po \
+ schedutils \
+ sys-utils \
+- text-utils \
+- tests
++ text-utils
+
+
+ RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
diff --git a/sysa/util-linux-2.19.1/patches/headers-bsd.patch b/sysa/util-linux-2.19.1/patches/headers-bsd.patch
@@ -0,0 +1,26 @@
+SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: BSD-4-Clause
+
+headers.patch but for files licensed BSD.
+
+--- fdisk/fdiskbsdlabel.c 2021-06-12 16:09:49.519140837 +1000
++++ fdisk/fdiskbsdlabel.c 2021-06-12 16:10:00.875220602 +1000
+@@ -53,6 +53,7 @@
+ #include "nls.h"
+
+ #include <sys/param.h>
++#include <sys/types.h>
+
+ #include "common.h"
+ #include "fdisk.h"
+--- login-utils/ttymsg.c 2021-06-12 16:11:45.911958381 +1000
++++ login-utils/ttymsg.c 2021-06-12 19:09:30.108310127 +1000
+@@ -51,6 +51,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <sys/param.h>
+ #include "nls.h"
+
+ #include "pathnames.h"
diff --git a/sysa/util-linux-2.19.1/patches/headers-gpl2.patch b/sysa/util-linux-2.19.1/patches/headers-gpl2.patch
@@ -0,0 +1,26 @@
+SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-2.0-or-later
+
+headers.patch but for files licensed GPL 2.0 or later.
+
+--- misc-utils/findmnt.c 2021-06-12 19:13:40.306009682 +1000
++++ misc-utils/findmnt.c 2021-06-12 19:13:58.223132046 +1000
+@@ -30,6 +30,7 @@
+ #include <sys/ioctl.h>
+ #endif
+ #include <assert.h>
++#include <sys/sysmacros.h>
+
+ #define USE_UNSTABLE_LIBMOUNT_API
+ #include <libmount.h>
+--- fsck/fsck.c 2021-06-22 18:30:27.843680552 +1000
++++ fsck/fsck.c 2021-06-22 18:30:41.327764247 +1000
+@@ -32,6 +32,7 @@
+ #include <sys/signal.h>
+ #include <sys/stat.h>
+ #include <sys/file.h>
++#include <sys/sysmacros.h>
+ #include <fcntl.h>
+ #include <limits.h>
+ #include <stdio.h>
diff --git a/sysa/util-linux-2.19.1/patches/headers.patch b/sysa/util-linux-2.19.1/patches/headers.patch
@@ -0,0 +1,121 @@
+SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: LGPL-2.0-or-later
+
+Musl utilizes the (correct) sys/sysmacros.h for major/minor macros. However,
+older glibc used to not do this. Hence this older util-linux assumes that
+behaviour which is wrong. So we need to patch in this include.
+
+Some function was moved to sys/param.h at a later date so we include that for
+ttymsg.
+
+(This is the main patch file. See -bsd.patch for files with such licensing).
+
+diff --color -ru shlibs/blkid/src/devname.c shlibs/blkid/src/devname.c
+--- shlibs/blkid/src/devname.c 2021-06-12 14:24:30.982387640 +1000
++++ shlibs/blkid/src/devname.c 2021-06-12 14:25:42.934921608 +1000
+@@ -33,6 +33,7 @@
+ #include <errno.h>
+ #endif
+ #include <time.h>
++#include <sys/sysmacros.h>
+
+ #include "blkidP.h"
+
+diff --color -ru shlibs/blkid/src/devno.c shlibs/blkid/src/devno.c
+--- shlibs/blkid/src/devno.c 2021-06-12 14:24:30.987387677 +1000
++++ shlibs/blkid/src/devno.c 2021-06-12 14:25:27.750808925 +1000
+@@ -31,6 +31,7 @@
+ #endif
+ #include <fcntl.h>
+ #include <inttypes.h>
++#include <sys/sysmacros.h>
+
+ #include "blkidP.h"
+ #include "pathnames.h"
+diff --color -ru shlibs/blkid/src/partitions/partitions.c shlibs/blkid/src/partitions/partitions.c
+--- shlibs/blkid/src/partitions/partitions.c 2021-06-12 14:24:30.983387647 +1000
++++ shlibs/blkid/src/partitions/partitions.c 2021-06-12 14:25:24.326783515 +1000
+@@ -19,6 +19,7 @@
+ #include <stdint.h>
+ #include <inttypes.h>
+ #include <stdarg.h>
++#include <sys/sysmacros.h>
+
+ #include "partitions.h"
+
+diff --color -ru shlibs/blkid/src/topology/evms.c shlibs/blkid/src/topology/evms.c
+--- shlibs/blkid/src/topology/evms.c 2021-06-12 14:24:30.984387655 +1000
++++ shlibs/blkid/src/topology/evms.c 2021-06-12 14:25:30.390828517 +1000
+@@ -19,6 +19,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "topology.h"
+
+diff --color -ru shlibs/blkid/src/topology/lvm.c shlibs/blkid/src/topology/lvm.c
+--- shlibs/blkid/src/topology/lvm.c 2021-06-12 14:24:30.984387655 +1000
++++ shlibs/blkid/src/topology/lvm.c 2021-06-12 14:25:37.510881355 +1000
+@@ -18,6 +18,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "topology.h"
+
+diff --color -ru shlibs/blkid/src/topology/md.c shlibs/blkid/src/topology/md.c
+--- shlibs/blkid/src/topology/md.c 2021-06-12 14:24:30.984387655 +1000
++++ shlibs/blkid/src/topology/md.c 2021-06-12 14:25:34.679860346 +1000
+@@ -19,6 +19,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "topology.h"
+
+--- shlibs/blkid/src/topology/dm.c 2021-06-12 14:29:01.195392922 +1000
++++ shlibs/blkid/src/topology/dm.c 2021-06-12 14:29:05.897427816 +1000
+@@ -18,6 +18,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "topology.h"
+
+diff --color -ru shlibs/blkid/src/evaluate.c shlibs/blkid/src/evaluate.c
+--- shlibs/blkid/src/evaluate.c 2021-06-12 16:11:45.893958255 +1000
++++ shlibs/blkid/src/evaluate.c 2021-06-12 16:12:20.652202397 +1000
+@@ -21,6 +21,7 @@
+ #endif
+ #include <stdint.h>
+ #include <stdarg.h>
++#include <sys/sysmacros.h>
+
+ #include "pathnames.h"
+ #include "canonicalize.h"
+diff --color -ru shlibs/mount/src/fs.c shlibs/mount/src/fs.c
+--- shlibs/mount/src/fs.c 2021-06-12 16:11:45.897958283 +1000
++++ shlibs/mount/src/fs.c 2021-06-12 16:12:14.812161377 +1000
+@@ -18,6 +18,7 @@
+ #include <errno.h>
+ #include <blkid.h>
+ #include <stddef.h>
++#include <sys/sysmacros.h>
+
+ #include "nls.h"
+ #include "mountP.h"
+--- shlibs/mount/src/tab_parse.c 2021-06-12 19:04:38.773393353 +1000
++++ shlibs/mount/src/tab_parse.c 2021-06-12 19:04:51.115474555 +1000
+@@ -14,6 +14,7 @@
+ #include <dirent.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "nls.h"
+ #include "at.h"
diff --git a/sysa/util-linux-2.19.1/patches/pkg-config.patch b/sysa/util-linux-2.19.1/patches/pkg-config.patch
@@ -0,0 +1,109 @@
+SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+
+SPDX-License-Identifier: GPL-2.0-or-later
+
+We don't have pkg-config, hence:
+a) disable gtk-doc (uses pkg-config exclusively)
+b) disable pkg-config type checks
+
+--- configure.ac 2021-06-12 11:23:41.719074631 +1000
++++ configure.ac 2021-06-12 11:26:17.748153926 +1000
+@@ -84,9 +84,6 @@
+ dnl libtool-2
+ LT_INIT
+
+-PKG_PROG_PKG_CONFIG
+-
+-GTK_DOC_CHECK([1.10])
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+
+ linux_os=no
+@@ -360,17 +360,8 @@
+ have_uuid=yes
+
+ if test "x$enable_libuuid" = xno; then
+- # Check for external (e2fsprogs) libuuid
+- PKG_CHECK_MODULES(UUID, uuid, [have_uuid=yes], [have_uuid=no])
+- if test "x$have_uuid" = xno; then
+- # system without pkg-config or so, try classic check
+- AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
+- fi
+- if test "x$have_uuid" = xyes; then
+- UTIL_SET_FLAGS($UUID_CFLAGS, $UUID_CFLAGS, $UUID_LIBS)
+- AC_CHECK_HEADERS([uuid.h uuid/uuid.h], [break], [])
+- UTIL_RESTORE_FLAGS
+- fi
++ # system without pkg-config or so, try classic check
++ AC_CHECK_LIB(uuid, uuid_is_null, [have_uuid=yes], [have_uuid=no])
+ else
+ # internal library
+ AC_DEFINE(HAVE_UUID_H, 1, [Define to 1 if you have the <uuid.h> header file.])
+@@ -408,21 +408,8 @@
+
+ if test "x$enable_libblkid" = xno; then
+ if test "x$build_mount" = xyes || test "x$enable_fsck" = xyes; then
+- # Check for external (e2fsprogs) libblkid
+- PKG_CHECK_MODULES(BLKID, blkid, [have_blkid=yes], [have_blkid=no])
+- if test "x$have_blkid" = xno; then
+- # system without pkg-config or so, try classic check
+- AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
+- fi
+- if test "x$have_blkid" = xyes; then
+- UTIL_SET_FLAGS($BLKID_CFLAGS, $BLKID_CFLAGS, $BLKID_LIBS)
+- AC_CHECK_HEADERS([blkid.h blkid/blkid.h], [break], [])
+- UTIL_RESTORE_FLAGS
+- fi
+- if test -n "$enable_static_programs"; then
+- # TODO check only when mount of fsck are requested
+- UTIL_PKG_STATIC([BLKID_LIBS_STATIC], [blkid])
+- fi
++ # system without pkg-config or so, try classic check
++ AC_CHECK_LIB(blkid, blkid_get_cache, [have_blkid=yes], [have_blkid=no])
+ fi
+ else
+ # internal library
+@@ -1251,8 +1251,6 @@
+ schedutils/Makefile
+ shlibs/blkid/blkid.pc
+ shlibs/blkid/Makefile
+-shlibs/blkid/docs/Makefile
+-shlibs/blkid/docs/version.xml
+ shlibs/blkid/src/Makefile
+ shlibs/blkid/src/blkid.h
+ shlibs/blkid/src/superblocks/Makefile
+@@ -1263,8 +1261,6 @@
+ shlibs/mount/Makefile
+ shlibs/mount/src/Makefile
+ shlibs/mount/src/libmount.h
+-shlibs/mount/docs/Makefile
+-shlibs/mount/docs/version.xml
+ shlibs/mount/samples/Makefile
+ shlibs/uuid/uuid.pc
+ shlibs/uuid/Makefile
+--- shlibs/mount/Makefile.am.bak 2021-06-12 11:32:07.578612839 +1000
++++ shlibs/mount/Makefile.am 2021-06-12 11:32:20.247701887 +1000
+@@ -2,11 +2,6 @@
+
+ SUBDIRS = src samples
+
+-if ENABLE_GTK_DOC
+-SUBDIRS += docs
+-endif
+-
+-# pkg-config stuff
+ pkgconfigdir = $(usrlib_execdir)/pkgconfig
+ pkgconfig_DATA = mount.pc
+
+--- shlibs/blkid/Makefile.am.bak 2021-06-12 11:32:03.546584499 +1000
++++ shlibs/blkid/Makefile.am 2021-06-12 11:32:10.790635416 +1000
+@@ -2,10 +2,6 @@
+
+ SUBDIRS = src samples
+
+-if ENABLE_GTK_DOC
+-SUBDIRS += docs
+-endif
+-
+ # pkg-config stuff
+ pkgconfigdir = $(usrlib_execdir)/pkgconfig
+ pkgconfig_DATA = blkid.pc
diff --git a/sysa/util-linux-2.19.1/util-linux-2.19.1.sh b/sysa/util-linux-2.19.1/util-linux-2.19.1.sh
@@ -0,0 +1,24 @@
+# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+src_prepare() {
+ default
+
+ # We don't have gettext (autopoint) yet.
+ AUTOPOINT=true autoreconf -fi
+}
+
+src_configure() {
+ ./configure --prefix=${PREFIX} \
+ --target=i386-unknown-linux-gnu \
+ --host=i386-unknown-linux-gnu \
+ --build=i386-unknown-linux-gnu \
+ --disable-libuuid \
+ --without-ncurses \
+ --enable-static \
+ --enable-static-programs=losetup,mount,umount,fdsik,sfdisk,blkid \
+ --enable-shared=no \
+ --disable-wall \
+ ac_cv_type_loff_t=yes
+}