]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib: remove pager.c from libcommon
authorKarel Zak <kzak@redhat.com>
Tue, 20 Jun 2023 11:15:45 +0000 (13:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Jun 2023 11:15:45 +0000 (13:15 +0200)
The libcommon is a binary archive to keep compilation and maintenance
simple. The library is not linked as shared or so. The unused symbols
are removed from binaries (for example, by "make install-strip").

But it isn't evident for license analyzers (and some humans) that the
library uses GPL and non-GPL stuff simultaneously. Let's avoid doubts
and keep pager.c (with GPL license) out of the archive

Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/Makemodule.am
disk-utils/meson.build
lib/Makemodule.am
lib/meson.build
sys-utils/Makemodule.am
sys-utils/meson.build

index 2124612ab71a4007089111d4627f04afc6f8fb52..d08e95d4f34b8ff59e9eac93b49f1a2fd40dbf74 100644 (file)
@@ -157,7 +157,9 @@ fdisk_SOURCES = \
        disk-utils/fdisk.h \
        disk-utils/fdisk-menu.c \
        disk-utils/fdisk-list.c \
-       disk-utils/fdisk-list.h
+       disk-utils/fdisk-list.h \
+       include/pager.h \
+       lib/pager.c
 
 fdisk_LDADD = $(LDADD) libcommon.la libfdisk.la \
              libsmartcols.la libtcolors.la $(READLINE_LIBS)
index 2bf3558346ab38509092c9f9b0cfd2bb0f745b8e..39b6cba96b56d9c5de369cd7bc4d6366ee26c2bb 100644 (file)
@@ -69,7 +69,8 @@ fdisk_sources = files(
   'fdisk.h',
   'fdisk-menu.c',
   'fdisk-list.c',
-  'fdisk-list.h')
+  'fdisk-list.h') + \
+  pager_c
 
 sfdisk_sources = files(
   'sfdisk.c',
index 62801ca004faa6e6ee7c79dfedd01bd28441f1e0..d95721ee2236e33002f182bc48568280e68835d1 100644 (file)
@@ -30,7 +30,6 @@ libcommon_la_SOURCES = \
        lib/mbsalign.c \
        lib/mbsedit.c\
        lib/md5.c \
-       lib/pager.c \
        lib/pwdutils.c \
        lib/randutils.c \
        lib/sha1.c \
index 57833aa7480e5a08689af13178ec63ebb15b771f..58d5da43f803bc0b57056c603925b01113e9e73a 100644 (file)
@@ -17,7 +17,6 @@ lib_common_sources = '''
        mbsalign.c
        mbsedit.c
        md5.c
-       pager.c
        procfs.c
        pwdutils.c
        randutils.c
@@ -37,6 +36,7 @@ md5_c = files('md5.c')
 sha1_c = files('sha1.c')
 strutils_c = files('strutils.c')
 strv_c = files('strv.c')
+pager_c = files('pager.c')
 
 lib_common_sources += [idcache_c,
                        randutils_c,
index 2584281fb7cd05a3b08fd83efd68650a73948161..00f7b51ca311267550f3908a0f077b4c147fb44e 100644 (file)
@@ -157,7 +157,7 @@ if BUILD_DMESG
 bin_PROGRAMS += dmesg
 MANPAGES += sys-utils/dmesg.1
 dist_noinst_DATA += sys-utils/dmesg.1.adoc
-dmesg_SOURCES = sys-utils/dmesg.c lib/monotonic.c
+dmesg_SOURCES = sys-utils/dmesg.c lib/monotonic.c include/pager.h lib/pager.c
 dmesg_LDADD = $(LDADD) libcommon.la libtcolors.la $(REALTIME_LIBS)
 dmesg_CFLAGS = $(AM_CFLAGS)
 check_PROGRAMS += test_dmesg
index 98cc3ae0acdbbf60ac362d5b2fabc85e38960740..ee00d1d39e3d78061fabf143b3499ae97044402e 100644 (file)
@@ -55,7 +55,7 @@ fstrim_sources = files(
 dmesg_sources = files(
   'dmesg.c',
 ) + \
-  monotonic_c
+  monotonic_c + pager_c
 
 ctrlaltdel_sources = files(
   'ctrlaltdel.c',