Skip to content

Commit

Permalink
util-linux: added patch to fix linking of pam_lastlog2
Browse files Browse the repository at this point in the history
  • Loading branch information
pitill0 committed May 1, 2024
1 parent ac3f3c7 commit b80d114
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 67 deletions.
178 changes: 162 additions & 16 deletions util-linux/.footprint
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ drwxr-xr-x root/root bin/
-rwxr-xr-x root/root bin/pipesz
-rwsr-xr-x root/root bin/umount
-rwxr-xr-x root/root bin/wdctl
drwxr-xr-x root/root etc/
-rw-r--r-- root/root etc/adjtime (EMPTY)
drwxr-xr-x root/root lib/
lrwxrwxrwx root/root lib/libblkid.so.1 -> libblkid.so.1.1.0
-rwxr-xr-x root/root lib/libblkid.so.1.1.0
Expand All @@ -24,6 +26,7 @@ lrwxrwxrwx root/root lib/libsmartcols.so.1 -> libsmartcols.so.1.1.0
lrwxrwxrwx root/root lib/libuuid.so.1 -> libuuid.so.1.3.0
-rwxr-xr-x root/root lib/libuuid.so.1.3.0
drwxr-xr-x root/root lib/security/
-rwxr-xr-x root/root lib/security/pam_lastlog2.la
-rwxr-xr-x root/root lib/security/pam_lastlog2.so
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/agetty
Expand Down Expand Up @@ -52,7 +55,6 @@ drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/swapoff
-rwxr-xr-x root/root sbin/swapon
-rwxr-xr-x root/root sbin/switch_root
-rwxr-xr-x root/root sbin/tunelp
-rwxr-xr-x root/root sbin/wipefs
-rwxr-xr-x root/root sbin/zramctl
drwxr-xr-x root/root usr/
Expand Down Expand Up @@ -84,7 +86,6 @@ drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/last
lrwxrwxrwx root/root usr/bin/lastb -> last
-rwxr-xr-x root/root usr/bin/lastlog2
-rwxr-xr-x root/root usr/bin/line
lrwxrwxrwx root/root usr/bin/linux32 -> setarch
lrwxrwxrwx root/root usr/bin/linux64 -> setarch
-rwxr-xr-x root/root usr/bin/logger
Expand All @@ -101,7 +102,6 @@ lrwxrwxrwx root/root usr/bin/linux64 -> setarch
-rwxr-xr-x root/root usr/bin/mesg
-rwxr-xr-x root/root usr/bin/namei
-rwxr-xr-x root/root usr/bin/nsenter
-rwxr-xr-x root/root usr/bin/pg
-rwxr-xr-x root/root usr/bin/prlimit
-rwxr-xr-x root/root usr/bin/rename
-rwxr-xr-x root/root usr/bin/renice
Expand Down Expand Up @@ -140,29 +140,30 @@ drwxr-xr-x root/root usr/include/uuid/
-rw-r--r-- root/root usr/include/uuid/uuid.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libblkid.a
lrwxrwxrwx root/root usr/lib/libblkid.so -> ../../lib/libblkid.so.1
lrwxrwxrwx root/root usr/lib/libfdisk.so -> ../../lib/libfdisk.so.1
-rwxr-xr-x root/root usr/lib/libblkid.la
lrwxrwxrwx root/root usr/lib/libblkid.so -> ../../lib/libblkid.so.1.1.0
-rw-r--r-- root/root usr/lib/libfdisk.a
-rwxr-xr-x root/root usr/lib/libfdisk.la
lrwxrwxrwx root/root usr/lib/libfdisk.so -> ../../lib/libfdisk.so.1.1.0
-rw-r--r-- root/root usr/lib/liblastlog2.a
lrwxrwxrwx root/root usr/lib/liblastlog2.so -> ../../lib/liblastlog2.so.2
lrwxrwxrwx root/root usr/lib/libmount.so -> ../../lib/libmount.so.1
-rwxr-xr-x root/root usr/lib/liblastlog2.la
lrwxrwxrwx root/root usr/lib/liblastlog2.so -> ../../lib/liblastlog2.so.2.0.0
-rw-r--r-- root/root usr/lib/libmount.a
-rwxr-xr-x root/root usr/lib/libmount.la
lrwxrwxrwx root/root usr/lib/libmount.so -> ../../lib/libmount.so.1.1.0
-rw-r--r-- root/root usr/lib/libsmartcols.a
lrwxrwxrwx root/root usr/lib/libsmartcols.so -> ../../lib/libsmartcols.so.1
-rwxr-xr-x root/root usr/lib/libsmartcols.la
lrwxrwxrwx root/root usr/lib/libsmartcols.so -> ../../lib/libsmartcols.so.1.1.0
-rw-r--r-- root/root usr/lib/libuuid.a
lrwxrwxrwx root/root usr/lib/libuuid.so -> ../../lib/libuuid.so.1
-rwxr-xr-x root/root usr/lib/libuuid.la
lrwxrwxrwx root/root usr/lib/libuuid.so -> ../../lib/libuuid.so.1.3.0
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/blkid.pc
-rw-r--r-- root/root usr/lib/pkgconfig/fdisk.pc
-rw-r--r-- root/root usr/lib/pkgconfig/lastlog2.pc
-rw-r--r-- root/root usr/lib/pkgconfig/mount.pc
-rw-r--r-- root/root usr/lib/pkgconfig/smartcols.pc
-rw-r--r-- root/root usr/lib/pkgconfig/uuid.pc
drwxr-xr-x root/root usr/lib/python3.10/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/libmount/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/libmount/__init__.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/libmount/__pycache__/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/libmount/__pycache__/__init__.cpython-310.pyc
-rwxr-xr-x root/root usr/lib/python3.10/site-packages/libmount/pylibmount.cpython-310-aarch64-linux-gnu.so
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/addpart
-rwxr-xr-x root/root usr/sbin/delpart
Expand All @@ -174,3 +175,148 @@ drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/rtcwake
-rwxr-xr-x root/root usr/sbin/uuidd
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/man/
drwxr-xr-x root/root usr/share/man/man1/
-rw-r--r-- root/root usr/share/man/man1/cal.1.gz
-rw-r--r-- root/root usr/share/man/man1/choom.1.gz
-rw-r--r-- root/root usr/share/man/man1/chrt.1.gz
-rw-r--r-- root/root usr/share/man/man1/col.1.gz
-rw-r--r-- root/root usr/share/man/man1/colcrt.1.gz
-rw-r--r-- root/root usr/share/man/man1/colrm.1.gz
-rw-r--r-- root/root usr/share/man/man1/column.1.gz
-rw-r--r-- root/root usr/share/man/man1/dmesg.1.gz
-rw-r--r-- root/root usr/share/man/man1/eject.1.gz
-rw-r--r-- root/root usr/share/man/man1/enosys.1.gz
-rw-r--r-- root/root usr/share/man/man1/exch.1.gz
-rw-r--r-- root/root usr/share/man/man1/fadvise.1.gz
-rw-r--r-- root/root usr/share/man/man1/fallocate.1.gz
-rw-r--r-- root/root usr/share/man/man1/fincore.1.gz
-rw-r--r-- root/root usr/share/man/man1/flock.1.gz
-rw-r--r-- root/root usr/share/man/man1/getopt.1.gz
-rw-r--r-- root/root usr/share/man/man1/hardlink.1.gz
-rw-r--r-- root/root usr/share/man/man1/hexdump.1.gz
-rw-r--r-- root/root usr/share/man/man1/ionice.1.gz
-rw-r--r-- root/root usr/share/man/man1/ipcmk.1.gz
-rw-r--r-- root/root usr/share/man/man1/ipcrm.1.gz
-rw-r--r-- root/root usr/share/man/man1/ipcs.1.gz
-rw-r--r-- root/root usr/share/man/man1/irqtop.1.gz
-rw-r--r-- root/root usr/share/man/man1/kill.1.gz
-rw-r--r-- root/root usr/share/man/man1/last.1.gz
-rw-r--r-- root/root usr/share/man/man1/lastb.1.gz
-rw-r--r-- root/root usr/share/man/man1/logger.1.gz
-rw-r--r-- root/root usr/share/man/man1/look.1.gz
-rw-r--r-- root/root usr/share/man/man1/lsclocks.1.gz
-rw-r--r-- root/root usr/share/man/man1/lscpu.1.gz
-rw-r--r-- root/root usr/share/man/man1/lsfd.1.gz
-rw-r--r-- root/root usr/share/man/man1/lsipc.1.gz
-rw-r--r-- root/root usr/share/man/man1/lsirq.1.gz
-rw-r--r-- root/root usr/share/man/man1/lslogins.1.gz
-rw-r--r-- root/root usr/share/man/man1/lsmem.1.gz
-rw-r--r-- root/root usr/share/man/man1/mcookie.1.gz
-rw-r--r-- root/root usr/share/man/man1/mesg.1.gz
-rw-r--r-- root/root usr/share/man/man1/more.1.gz
-rw-r--r-- root/root usr/share/man/man1/mountpoint.1.gz
-rw-r--r-- root/root usr/share/man/man1/namei.1.gz
-rw-r--r-- root/root usr/share/man/man1/nsenter.1.gz
-rw-r--r-- root/root usr/share/man/man1/pipesz.1.gz
-rw-r--r-- root/root usr/share/man/man1/prlimit.1.gz
-rw-r--r-- root/root usr/share/man/man1/rename.1.gz
-rw-r--r-- root/root usr/share/man/man1/renice.1.gz
-rw-r--r-- root/root usr/share/man/man1/rev.1.gz
-rw-r--r-- root/root usr/share/man/man1/script.1.gz
-rw-r--r-- root/root usr/share/man/man1/scriptlive.1.gz
-rw-r--r-- root/root usr/share/man/man1/scriptreplay.1.gz
-rw-r--r-- root/root usr/share/man/man1/setpgid.1.gz
-rw-r--r-- root/root usr/share/man/man1/setsid.1.gz
-rw-r--r-- root/root usr/share/man/man1/setterm.1.gz
-rw-r--r-- root/root usr/share/man/man1/taskset.1.gz
-rw-r--r-- root/root usr/share/man/man1/uclampset.1.gz
-rw-r--r-- root/root usr/share/man/man1/ul.1.gz
-rw-r--r-- root/root usr/share/man/man1/unshare.1.gz
-rw-r--r-- root/root usr/share/man/man1/utmpdump.1.gz
-rw-r--r-- root/root usr/share/man/man1/uuidgen.1.gz
-rw-r--r-- root/root usr/share/man/man1/uuidparse.1.gz
-rw-r--r-- root/root usr/share/man/man1/waitpid.1.gz
-rw-r--r-- root/root usr/share/man/man1/wall.1.gz
-rw-r--r-- root/root usr/share/man/man1/whereis.1.gz
-rw-r--r-- root/root usr/share/man/man1/write.1.gz
drwxr-xr-x root/root usr/share/man/man3/
-rw-r--r-- root/root usr/share/man/man3/lastlog2.3.gz
-rw-r--r-- root/root usr/share/man/man3/libblkid.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_import_lastlog.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_read_all.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_read_entry.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_remove_entry.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_rename_user.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_update_login_time.3.gz
-rw-r--r-- root/root usr/share/man/man3/ll2_write_entry.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_clear.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_compare.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_copy.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_generate.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_generate_random.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_generate_time.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_generate_time_safe.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_is_null.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_parse.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_time.3.gz
-rw-r--r-- root/root usr/share/man/man3/uuid_unparse.3.gz
drwxr-xr-x root/root usr/share/man/man5/
-rw-r--r-- root/root usr/share/man/man5/adjtime_config.5.gz
-rw-r--r-- root/root usr/share/man/man5/fstab.5.gz
-rw-r--r-- root/root usr/share/man/man5/scols-filter.5.gz
-rw-r--r-- root/root usr/share/man/man5/terminal-colors.d.5.gz
drwxr-xr-x root/root usr/share/man/man8/
-rw-r--r-- root/root usr/share/man/man8/addpart.8.gz
-rw-r--r-- root/root usr/share/man/man8/agetty.8.gz
-rw-r--r-- root/root usr/share/man/man8/blkdiscard.8.gz
-rw-r--r-- root/root usr/share/man/man8/blkid.8.gz
-rw-r--r-- root/root usr/share/man/man8/blkpr.8.gz
-rw-r--r-- root/root usr/share/man/man8/blkzone.8.gz
-rw-r--r-- root/root usr/share/man/man8/blockdev.8.gz
-rw-r--r-- root/root usr/share/man/man8/cfdisk.8.gz
-rw-r--r-- root/root usr/share/man/man8/chcpu.8.gz
-rw-r--r-- root/root usr/share/man/man8/chmem.8.gz
-rw-r--r-- root/root usr/share/man/man8/ctrlaltdel.8.gz
-rw-r--r-- root/root usr/share/man/man8/delpart.8.gz
-rw-r--r-- root/root usr/share/man/man8/fdisk.8.gz
-rw-r--r-- root/root usr/share/man/man8/findfs.8.gz
-rw-r--r-- root/root usr/share/man/man8/findmnt.8.gz
-rw-r--r-- root/root usr/share/man/man8/fsck.8.gz
-rw-r--r-- root/root usr/share/man/man8/fsck.cramfs.8.gz
-rw-r--r-- root/root usr/share/man/man8/fsfreeze.8.gz
-rw-r--r-- root/root usr/share/man/man8/fstrim.8.gz
-rw-r--r-- root/root usr/share/man/man8/hwclock.8.gz
-rw-r--r-- root/root usr/share/man/man8/isosize.8.gz
-rw-r--r-- root/root usr/share/man/man8/lastlog2.8.gz
-rw-r--r-- root/root usr/share/man/man8/ldattach.8.gz
-rw-r--r-- root/root usr/share/man/man8/losetup.8.gz
-rw-r--r-- root/root usr/share/man/man8/lsblk.8.gz
-rw-r--r-- root/root usr/share/man/man8/lslocks.8.gz
-rw-r--r-- root/root usr/share/man/man8/lsns.8.gz
-rw-r--r-- root/root usr/share/man/man8/mkfs.8.gz
-rw-r--r-- root/root usr/share/man/man8/mkfs.cramfs.8.gz
-rw-r--r-- root/root usr/share/man/man8/mkswap.8.gz
-rw-r--r-- root/root usr/share/man/man8/mount.8.gz
-rw-r--r-- root/root usr/share/man/man8/pam_lastlog2.8.gz
-rw-r--r-- root/root usr/share/man/man8/partx.8.gz
-rw-r--r-- root/root usr/share/man/man8/pivot_root.8.gz
-rw-r--r-- root/root usr/share/man/man8/readprofile.8.gz
-rw-r--r-- root/root usr/share/man/man8/resizepart.8.gz
-rw-r--r-- root/root usr/share/man/man8/rfkill.8.gz
-rw-r--r-- root/root usr/share/man/man8/rtcwake.8.gz
-rw-r--r-- root/root usr/share/man/man8/setarch.8.gz
-rw-r--r-- root/root usr/share/man/man8/sfdisk.8.gz
-rw-r--r-- root/root usr/share/man/man8/swaplabel.8.gz
-rw-r--r-- root/root usr/share/man/man8/swapoff.8.gz
-rw-r--r-- root/root usr/share/man/man8/swapon.8.gz
-rw-r--r-- root/root usr/share/man/man8/switch_root.8.gz
-rw-r--r-- root/root usr/share/man/man8/umount.8.gz
-rw-r--r-- root/root usr/share/man/man8/uuidd.8.gz
-rw-r--r-- root/root usr/share/man/man8/wdctl.8.gz
-rw-r--r-- root/root usr/share/man/man8/wipefs.8.gz
-rw-r--r-- root/root usr/share/man/man8/zramctl.8.gz
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/lib/
drwxr-xr-x root/root var/lib/libuuid/
11 changes: 6 additions & 5 deletions util-linux/.signature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/opt-arm64.pub
RWRitF9a2DJqMdVdc0FS3cRltEHdLDAN6V/47SgUO5F/QlEkPeWm7mb4ClxskLZ5Id66WkB6M1ApvqspX47q2aUvOvO7gWjGKQ8=
SHA256 (Pkgfile) = 5e69f4131e22d96a98379f4448bca3f51cf9dbe4882eb72e4994d175e4ff8315
SHA256 (.footprint) = 0f9688cff28cae548e2009504646d03de994832aa20c3b7948a99f40da109b46
SHA256 (util-linux-2.40.tar.gz) = f7ff8573289313e38ee3378cbc2938f34444a8cb546e1236e46151834be69784
untrusted comment: verify with /etc/ports/core-arm64.pub
RWSKslkvIwb+2VWF6r/rv7ObjMfNsd9iGAhwi+R2XDCZ5yAp3RxSf624rhcct67sME/UnJ1MfP/aFPEuZZtTov/MKYLx/R2gDAA=
SHA256 (Pkgfile) = 03de77ef3ef2adf6903c038fabaf837ba92b9e9097e410f96dd1a101d214e40f
SHA256 (.footprint) = 6f0fdf0b4e5479a340b61cc0c137d705745997d9075076901b9ba3c5f1239f33
SHA256 (util-linux-2.40.tar.xz) = d57a626081f9ead02fa44c63a6af162ec19c58f53e993f206ab7c3a6641c2cd7
SHA256 (pam_lastlog2.patch) = 638dd140a0643730d43ed693bbe58e53881eb8e1117d1d8e0bfae765c758be4b
70 changes: 24 additions & 46 deletions util-linux/Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,32 @@

name=util-linux
version=2.40
release=1
source=(https://github.com/util-linux/util-linux/archive/refs/tags/v$version/$name-$version.tar.gz)
release=2
source=(https://www.kernel.org/pub/linux/utils/$name/v${version:0:4}/$name-$version.tar.xz
pam_lastlog2.patch)

build() {
meson setup $name-$version build \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/sbin \
--libdir=/lib \
--buildtype=plain \
--wrap-mode=nodownload \
-D b_lto=true \
-D b_pie=true \
-D nls=disabled \
-D pamlibdir=/lib/security \
-D cryptsetup=disabled \
-D build-chfn-chsh=disabled \
-D build-login=disabled \
-D build-su=disabled \
-D build-sulogin=disabled \
-D build-nologin=disabled \
-D build-runuser=disabled \
-D build-vipw=disabled \
-D build-raw=disabled \
-D build-newgrp=disabled \
-D build-bfs=disabled \
-D build-minix=disabled


meson compile -C build -j ${JOBS:-1}
DESTDIR=$PKG meson install -C build

rm -r $PKG/usr/share/{doc,locale}
cd $name-$version

install -d $PKG/{bin,usr/sbin,usr/lib}

mv $PKG/usr/bin/{dmesg,findmnt,kill,lsblk,lsfd,more} $PKG/bin
mv $PKG/usr/bin/{mount,mountpoint,pipesz,umount,wdctl} $PKG/bin
mv $PKG/sbin/{addpart,delpart,ldattach,partx,readprofile} $PKG/usr/sbin
mv $PKG/sbin/{resizepart,rfkill,rtcwake,uuidd} $PKG/usr/sbin

mv $PKG/lib/pkgconfig $PKG/usr/lib

mv $PKG/lib/*.a $PKG/usr/lib
cd $PKG/lib
local LIB
for LIB in lib*.so; do
ln -s ../../lib/$(readlink $LIB) $PKG/usr/lib/$LIB && rm $LIB
done
patch -p1 -i $SRC/pam_lastlog2.patch

./configure \
--prefix=/usr \
--enable-{write,kill} \
--disable-nls \
--disable-asciidoc \
--disable-{login,su,sulogin,nologin,runuser,raw} \
--disable-chfn-chsh \
--without-python

make
make DESTDIR=$PKG install

install -d $PKG/{etc,var/lib/libuuid}
touch $PKG/etc/adjtime

prt-get isinst bash-completion || rm -r $PKG/usr/share/bash-completion
rm -r $PKG/usr/share/doc
rm $PKG/sbin/{mkfs.bfs,mkfs.minix,fsck.minix}
rm $PKG/usr/share/man/man8/{fsck.minix,mkfs.bfs,mkfs.minix}.8
}

0 comments on commit b80d114

Please sign in to comment.