Ticket #1038 (closed task: fixed)

Opened 3 years ago

Last modified 7 months ago

Util-linux 2.29.2

Reported by: chris@… Owned by: clfs-commits@…
Priority: major Milestone: CLFS Standard 3.1.0
Component: BOOK Version: CLFS Standard GIT
Keywords: Cc: berzerkula@…, jonathan@…, chris@…

Change History

comment:1 Changed 2 years ago by blackadder

Now up to version 2.26.2

comment:2 Changed 2 years ago by kb0iic

  • Description modified (diff)
  • Summary changed from Util-linux 2.26.1 to Util-linux 2.26.2

comment:3 Changed 2 years ago by kb0iic

tempsystem) add --without-systemdsystemunitdir ?

pass2) remove ADJTIME_PATH ?

pass1 and pass2) disable chfn-chsh login nologin su setpriv (shadow better?)

pass2) make check

pass2) bash tests/run.sh --srcdir=$PWD --builddir=$PWD

Don't need note about CONFIG_SCSI_DEBUG

All 160 tests passed (though I have a lot of stuff from BLFS)

Last edited 2 years ago by kb0iic (previous) (diff)

comment:4 Changed 2 years ago by blackadder

From my notes i have --disable-su --disable-bash-completion (su from shadow) keep enable sulogin as it's needed by systemd

didn't use --without-systemdsystemunitdir in my case didn't need it as was building from a system without systemd

login etc doesn't get built unless it finds pam installed on the system

comment:5 Changed 2 years ago by kb0iic

Okay from previous discussion we have the following:

Keep current commands as is with the following configure changes:

--disable-chfn-chsh (use shadow chfn and chsh)
--disable-login (use shadow login, even when LinuxPAM is around)
--disable-nologin (use shadow nologin, change shadow install to include nologin)
--disable-su (use shadow su)
--disable-setpriv (run a program with different Linux privilege settings. LFS disables)
--disable-runuser (run a command with substitute user and group ID. LFS disables)

The following can be added but aren't necessary:

--disable-pylibmount (Requires python. Not in our base build. LFS disables it, too)
--without-python (do not build python bindings)

If Python isn't found, configure will output:

checking for a Python interpreter with version >= 2... none
configure: WARNING: python interpreter not found, do not build python bindings
configure: WARNING: libpython not found; not building pylibmount

comment:6 Changed 2 years ago by kb0iic

For x86_64-64 book all 160 tests passed.

comment:7 Changed 2 years ago by kb0iic

Util-linux 2.27 release is imminent.

comment:8 follow-up: ↓ 11 Changed 2 years ago by kb0iic

  • Version set to CLFS Standard GIT
  • Milestone set to CLFS Standard 3.1.0

Will need a patch for cross compiling util-linux in Chapter 6 as some users have stated. This is for when the target build is not the same arch as the host, or where the host arch can run the target host binaries. i.e. x86 -> x86_64 or x86_64 -> x86

comment:10 Changed 2 years ago by kb0iic

  • Description modified (diff)
  • Summary changed from Util-linux 2.26.2 to Util-linux 2.27

comment:11 in reply to: ↑ 8 ; follow-up: ↓ 14 Changed 2 years ago by kb0iic

Replying to kb0iic:

Will need a patch for cross compiling util-linux in Chapter 6 as some users have stated. This is for when the target build is not the same arch as the host, or where the host arch can run the target host binaries. i.e. x86 -> x86_64 or x86_64 -> x86

I didn't need a patch to cross compile from i386 to x86_64. Has anyone else had issues cross-compiling version 2.27?

comment:12 Changed 2 years ago by kb0iic

So for the final util-linux pass2 build we have:

./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--enable-write \
--docdir=/usr/share/doc/util-linux-2.27 \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser

comment:13 Changed 2 years ago by kb0iic

All 170 tests passed.

comment:14 in reply to: ↑ 11 Changed 2 years ago by blackadder

Replying to kb0iic:

Replying to kb0iic:

Will need a patch for cross compiling util-linux in Chapter 6 as some users have stated. This is for when the target build is not the same arch as the host, or where the host arch can run the target host binaries. i.e. x86 -> x86_64 or x86_64 -> x86

I didn't need a patch to cross compile from i386 to x86_64. Has anyone else had issues cross-compiling version 2.27?

Nope neither did I, but will check asap.

comment:15 Changed 2 years ago by kb0iic

Didn't need a patch for multilib x86_64 from i386 debian install.

comment:16 Changed 2 years ago by kb0iic

Need to fix final system multilib pass1 instructions. They are inconsistent.

Also configure commands for multlilib pass1

CC="gcc ${BUILD32}" ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime --libdir=/lib --enable-write --disable-chfn-chsh --disable-login --disable-nologin --disable-su --disable-setpriv --disable-runuser --docdir=/usr/share/doc/util-linux-2.27
CC="gcc $BUILD64" ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime --libdir=/lib64 --enable-write --disable-chfn-chsh --disable-login --disable-nologin --disable-su --disable-setpriv --disable-runuser --docdir=/usr/share/doc/util-linux-2.27

comment:17 Changed 2 years ago by kb0iic

Okay pass1 is mulitlib of course, and I notice final util-linux isn't multilib for pass2.

For clarification, 32 bit libs are already installed from util linux pass1, thus the 64 bit binaries are of importance here, and of course, the libraries will be installed by default. We do not need a 32bit build for Util linux pass2 in multilib as far as I know.

64-bit util-linux commands for multilib:

mkdir -pv /var/lib/hwclock
CC="gcc ${BUILD64}" ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
    --libdir=/lib64 --enable-write --disable-chfn-chsh --disable-login \
    --disable-nologin --disable-su --disable-setpriv --disable-runuser\
    --docdir=/usr/share/doc/util-linux-2.27

comment:18 Changed 2 years ago by kb0iic

For mulitlib build:

---------------------------------------------------------------------
  All 170 tests PASSED
---------------------------------------------------------------------

comment:19 Changed 2 years ago by kb0iic

  • Description modified (diff)
  • Summary changed from Util-linux 2.27 to Util-linux 2.27.1

comment:20 Changed 2 years ago by chris@…

There is no need to add switches to disable chfn_chsh, login, su, or runuser - they are all disabled by default if PAM is not found. Also setpriv is not built if libcap-ng is not found.

This should be sufficient (not counting changes for multilib):

./configure ADJTIME_PATH=/var/lib/hwclock/adjtime --enable-write --disable-nologin --docdir=/usr/share/doc/util-linux-&util-linux-version;

comment:21 Changed 17 months ago by kb0iic

Verified if not using PAM they are disabled by default.

Version 2.28 is released, using that without issue. Next question is, if PAM is installed by users, should we have a note or have the options included by default? We won't be sure if someone would have PAM at this point.

Last edited 17 months ago by kb0iic (previous) (diff)

comment:22 Changed 7 months ago by kb0iic

  • Description modified (diff)
  • Summary changed from Util-linux 2.27.1 to Util-linux 2.29.2

comment:23 Changed 7 months ago by kb0iic

For version 2.29.2:

Ch 6

Does it check for ncurses wide libraries? We don't install wide ncurses libraries in temp system. If so:

sed -i 's/-lncursesw/-lncurses/' Makefile
sed -i 's/#define HAVE_LIBNCURSESW 1/#define HAVE_LIBNCURSES 1/' config.h

comment:24 Changed 7 months ago by kb0iic

For the temp system, I added the following after configure:

sed -i 's/-lncursesw -ltinfo/-lncurses/' Makefile
sed -i 's/LIBNCURSESW/LIBNCURSES/' config.h

comment:25 Changed 7 months ago by kb0iic

CH 10 Multilib (32bit and pure64bit need not apply)

32 bit

CC="gcc ${BUILD32}" PKG_CONFIG_PATH=$PKG_CONFIG_PATH32 \
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
    --libdir=/lib \
    --enable-write \
    --disable-chfn-chsh \
    --disable-login \
    --disable-nologin \
    --disable-su \
    --disable-setpriv \
    --disable-runuser \
    --docdir=/usr/share/doc/util-linux-2.29.2

N32

CC="gcc ${BUILD32}" PKG_CONFIG_PATH=$PKG_CONFIG_PATHN32 \
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
    --libdir=/lib32 \
    --enable-write \
    --disable-chfn-chsh \
    --disable-login \
    --disable-nologin \
    --disable-su \
    --disable-setpriv \
    --disable-runuser \
    --docdir=/usr/share/doc/util-linux-2.29.2
Last edited 7 months ago by kb0iic (previous) (diff)

comment:26 Changed 7 months ago by kb0iic

Pass1 (applies to all except for 64bit needing --libdir=/lib64)

./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
    --libdir=/lib64 \
    --enable-write \
    --disable-chfn-chsh \
    --disable-login \
    --disable-nologin \
    --disable-su \
    --disable-setpriv \
    --disable-runuser \
    --docdir=/usr/share/doc/util-linux-2.29.2

32 bit/N32 for multilib (adjust libdir as required)

CC="gcc ${BUILD32}" PKG_CONFIG_PATH=$PKG_CONFIG_PATH32 \
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
    --libdir=/lib \
    --enable-write \
    --disable-chfn-chsh \
    --disable-login \
    --disable-nologin \
    --disable-su \
    --disable-setpriv \
    --disable-runuser \
    --docdir=/usr/share/doc/util-linux-2.29.2

Final-system (multilib/non multilib) adjust commands as required

CC="gcc ${BUILD64}" ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
    --libdir=/lib64 \
    --enable-libmount-force-mountinfo \
    --enable-write \
    --disable-chfn-chsh \
    --disable-login \
    --disable-nologin \
    --disable-su \
    --disable-setpriv \
    --disable-runuser \
    --docdir=/usr/share/doc/util-linux-2.29.2
Last edited 7 months ago by kb0iic (previous) (diff)

comment:27 Changed 7 months ago by kb0iic

comment:28 Changed 7 months ago by kb0iic

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.