On Tuesday 2020-11-17 14:18, Ludwig Nussel wrote:
Quite some packages carry around sections like this:
#UsrMerge mkdir $RPM_BUILD_ROOT/sbin ln -s %_sbindir/foo $RPM_BUILD_ROOT/sbin/foo #EndUsrMerge
So I'd like to replace those comments with a conditional, ie
%if !0%{?usrmerged} mkdir %buildroot/sbin ln -s %_sbindir/foo %buildroot/sbin/foo %endif
The world managed to move many things to /usr/sbin even without needing /sbin symlinks, which is great. There are but a few programs left where the same needs to be done, and/or whose symlinks could just be nuked, probably. What I have left: /sbin# echo * agetty apparmor_parser arp badblocks blkid blockdev blogctl blogd blogger cfdisk chcpu checkproc chkconfig ctrlaltdel debugfs depmod dumpe2fs e2fsck e2image e2label e2mmpstatus e2undo ether-wake faillock fbtest fdisk findfs fsck fsck.cramfs fsck.ext2 fsck.ext3 fsck.ext4 fsck.minix fsck.xfs fsfreeze fstab-decode fstrim halt hwclock init insmod insserv install-info ip ipmaddr iptunnel isserial killall5 killproc ldconfig logsave losetup lsmod mke2fs mkfs mkfs.bfs mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.minix mkfs.xfs mkhomedir_helper mkill mkswap modinfo modprobe mount.fuse mount.fuse3 nameif netconfig nologin pam_namespace_helper pam_tally2 pam_timestamp_check pidofproc pivot_root plipconfig poweroff raw rcapparmor rdisc reboot refresh_initrd resize2fs rmmod runlevel rvmtab service setconsole sfdisk showconsole shutdown slattach smart_agetty start_daemon startproc swaplabel swapoff swapon switch_root sysctl telinit tune2fs unix2_chkpwd unix_chkpwd unix_update vhangup wipefs xfs_repair With that, I find it prospective to just keep emptying /sbin and in doing so, drop the #UsrMerge blocks from specfiles, without going to %usrmerged, but straight to "done".