Jan Engelhardt wrote:
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".
Could do that but then that would require verifying that each and every package you touch doesn't actually break after removing the stuff in /bin while we're not usrmerged yet. So I wouldn't stop anyone from doing that but to me it feels like it's quicker to not spend thought on it and keep the compat block. Adding the %if is just finger exercise, no brain needed. And once we actually did the merge, the insight whether the stuff in /bin was useless for some packages is irrelevant anyways :-) FWIW the list files I compiled from ARCHIVES.gz is -- aaa_base /sbin/refresh_initrd /sbin/service /sbin/smart_agetty -- apparmor-parser /sbin/apparmor_parser /sbin/rcapparmor -- audit /sbin/audispd /sbin/auditctl /sbin/auditd /sbin/augenrules /sbin/aureport /sbin/ausearch /sbin/autrace -- aws-efs-utils /sbin/mount.efs -- bash /bin/bash -- biosdevname /sbin/biosdevname -- blktrace /bin/blkparse /bin/blktrace /bin/btrace -- blog /sbin/blogctl /sbin/blogd /sbin/blogger /sbin/isserial /sbin/showconsole -- btrfsprogs /sbin/btrfs /sbin/btrfs-convert /sbin/btrfs-image /sbin/btrfsck /sbin/btrfstune /sbin/fsck.btrfs /sbin/mkfs.btrfs -- busybox-coreutils /bin/arch /bin/basename /bin/cat /bin/chgrp /bin/chmod /bin/chown /bin/cp /bin/date /bin/dd /bin/df /bin/echo /bin/false /bin/ln /bin/ls /bin/md5sum /bin/mkdir /bin/mknod /bin/mktemp /bin/mv /bin/pwd /bin/readlink /bin/rm /bin/rmdir /bin/sleep /bin/sort /bin/stat /bin/stty /bin/sync /bin/touch /bin/true /bin/uname -- busybox-cpio /bin/cpio -- busybox-ed /bin/ed -- busybox-findutils /bin/find -- busybox-gawk /bin/awk -- busybox-grep /bin/egrep /bin/fgrep /bin/grep -- busybox-gzip /bin/gunzip /bin/gzip /bin/zcat -- busybox-hostname /bin/dnsdomainname /bin/hostname -- busybox-iproute2 /bin/ip /sbin/ip -- busybox-iputils /bin/arping /bin/ping /bin/ping6 -- busybox-kbd /bin/chvt /bin/deallocvt /bin/openvt /bin/setfont /bin/setkeycodes /bin/setlogcons /bin/showkey /sbin/loadkmap -- busybox-kmod /bin/lsmod /sbin/depmod /sbin/insmod /sbin/lsmod /sbin/modinfo /sbin/modprobe /sbin/rmmod -- busybox-misc /bin/chattr /bin/fatattr /bin/iostat /bin/lsattr /bin/lzop /bin/makemime /bin/mpstat /bin/reformime /sbin/mdev /sbin/mkdosfs /sbin/mke2fs /sbin/mkfs.ext2 /sbin/mkfs.vfat /sbin/setconsole /sbin/uevent /sbin/zcip -- busybox-net-tools /bin/ifconfig /bin/netstat /bin/route /sbin/arp /sbin/ether-wake /sbin/iptunnel /sbin/nameif /sbin/slattach -- busybox-policycoreutils /sbin/restorecon /sbin/setfiles -- busybox-procps /bin/pgrep /bin/pkill /bin/ps /sbin/sysctl -- busybox-psmisc /bin/fuser -- busybox-sed /bin/sed -- busybox-sh /bin/sh -- busybox-sysvinit-tools /bin/fsync /bin/pidof /bin/usleep /sbin/killall5 /sbin/pidof -- busybox-tar /bin/tar -- busybox-tunctl /sbin/tunctl -- busybox-util-linux /bin/dmesg /bin/kill /bin/logger /bin/login /bin/more /bin/mount /bin/su /bin/umount /sbin/blkid /sbin/findfs /sbin/fsck /sbin/losetup /sbin/mkswap /sbin/nologin -- busybox-vi /bin/vi -- busybox-vlan /sbin/vconfig -- ceph-common /sbin/mount.ceph -- cifs-utils /sbin/mount.cifs -- crda /sbin/crda /sbin/regdbdump -- cryptsetup /sbin/cryptsetup -- dash /bin/dash -- davfs2 /sbin/mount.davfs /sbin/umount.davfs -- dbus-1 /bin/dbus-cleanup-sockets /bin/dbus-daemon /bin/dbus-monitor /bin/dbus-send /bin/dbus-test-tool /bin/dbus-update-activation-environment /bin/dbus-uuidgen -- dd_rescue /bin/dd_rescue -- dd_rhelp /bin/dd_rhelp -- device-mapper /sbin/dmsetup -- dhcp-client /sbin/dhclient /sbin/dhclient-script /sbin/dhclient6 -- diod /sbin/mount.diod -- dmraid /sbin/dmevent_tool /sbin/dmraid -- dosfstools /sbin/dosfsck /sbin/dosfslabel /sbin/fsck.fat /sbin/fsck.msdos /sbin/fsck.vfat /sbin/mkfs.fat /sbin/mkfs.msdos -- dracut /sbin/installkernel /sbin/mkinitrd -- drbd-utils /sbin/drbdadm /sbin/drbdmeta /sbin/drbdmon /sbin/drbdsetup -- e2fsprogs /sbin/badblocks /sbin/debugfs /sbin/dumpe2fs /sbin/e2fsck /sbin/e2image /sbin/e2label /sbin/e2mmpstatus /sbin/e2undo /sbin/fsck.ext2 /sbin/fsck.ext3 /sbin/fsck.ext4 /sbin/logsave /sbin/mkfs.ext3 /sbin/mkfs.ext4 /sbin/resize2fs /sbin/tune2fs -- ecryptfs-utils /sbin/mount.ecryptfs /sbin/mount.ecryptfs_private /sbin/umount.ecryptfs /sbin/umount.ecryptfs_private -- elilo /sbin/elilo /sbin/eliloalt -- exfat-utils /sbin/dumpexfat /sbin/exfatfsck /sbin/exfatlabel /sbin/fsck.exfat /sbin/mkexfatfs /sbin/mkfs.exfat -- f2fs-tools-compat /sbin/defrag.f2fs /sbin/dump.f2fs /sbin/f2fstat /sbin/fibmap.f2fs /sbin/fsck.f2fs /sbin/mkfs.f2fs /sbin/parse.f2fs /sbin/resize.f2fs /sbin/sload.f2fs -- fedfs-utils-client /sbin/mount.fedfs -- fillup /bin/fillup -- fuse /sbin/mount.fuse -- fuse-exfat /sbin/mount.exfat /sbin/mount.exfat-fuse -- fuse3 /sbin/mount.fuse3 -- fxload /sbin/fxload -- gawk /bin/gawk -- glibc /sbin/ldconfig -- glusterfs /sbin/mount.glusterfs -- grubby /sbin/grubby /sbin/new-kernel-pkg -- hdparm /sbin/hdparm /sbin/wiper.sh -- hostname /bin/domainname /bin/nisdomainname /bin/ypdomainname -- info /sbin/install-info -- info4 /sbin/install-info4 -- initviocons /bin/initviocons -- insserv-compat /sbin/chkconfig /sbin/insserv -- iputils /bin/clockdiff /bin/tracepath /bin/tracepath6 /sbin/rdisc -- ipvsadm /sbin/ipvsadm /sbin/ipvsadm-restore /sbin/ipvsadm-save -- isapnp /sbin/isapnp /sbin/pnpdump -- iscsiuio /sbin/brcm_iscsiuio /sbin/iscsiuio -- jfsutils /sbin/fsck.jfs /sbin/jfs_debugfs /sbin/jfs_fsck /sbin/jfs_fscklog /sbin/jfs_logdump /sbin/jfs_mkfs /sbin/jfs_tune /sbin/mkfs.jfs -- kbd /bin/clrunimap /bin/dumpkeys /bin/fgconsole /bin/getkeycodes /bin/getunimap /bin/kbd_mode /bin/kbdinfo /bin/kbdrate /bin/loadkeys /bin/loadunimap /bin/mapscrn /bin/outpsfheader /bin/psfaddtable /bin/psfgettable /bin/psfstriptable /bin/psfxtable /bin/resizecons /bin/screendump /bin/setleds /bin/setmetamode /bin/setpalette /bin/setvesablank /bin/setvtrgb /bin/showconsolefont /bin/spawn_console /bin/spawn_login /bin/unicode_start /bin/unicode_stop /sbin/fbtest -- kexec-tools /sbin/kexec -- keyutils /bin/keyctl /sbin/key.dns_resolver /sbin/request-key -- klogd /sbin/klogd -- kpartx /sbin/kpartx -- ksh /bin/ksh93 -- libewf-tools /sbin/mount.ewf /sbin/umount.ewf -- live-net-installer /bin/extend -- lvm2 /sbin/lvchange /sbin/lvconvert /sbin/lvcreate /sbin/lvdisplay /sbin/lvextend /sbin/lvm /sbin/lvmconfig /sbin/lvmdiskscan /sbin/lvmdump /sbin/lvmpolld /sbin/lvmsadc /sbin/lvmsar /sbin/lvreduce /sbin/lvremove /sbin/lvrename /sbin/lvresize /sbin/lvs /sbin/lvscan /sbin/pvchange /sbin/pvck /sbin/pvcreate /sbin/pvdisplay /sbin/pvmove /sbin/pvremove /sbin/pvresize /sbin/pvs /sbin/pvscan /sbin/vgcfgbackup /sbin/vgcfgrestore /sbin/vgchange /sbin/vgck /sbin/vgconvert /sbin/vgcreate /sbin/vgdisplay /sbin/vgexport /sbin/vgextend /sbin/vgimport /sbin/vgimportclone /sbin/vgmerge /sbin/vgmknodes /sbin/vgreduce /sbin/vgremove /sbin/vgrename /sbin/vgs /sbin/vgscan /sbin/vgsplit -- mailx /bin/mail -- makedev /sbin/MAKEDEV -- mawk /bin/mawk -- mcstrans /sbin/mcstransd -- mdadm /sbin/mdadm /sbin/mdmon -- mingetty /sbin/mingetty -- mksh /bin/ksh /bin/lksh /bin/mksh /bin/pdksh -- multipath-tools /sbin/mpathpersist /sbin/multipath /sbin/multipathd -- munin /sbin/rcmunin-cgi-graph /sbin/rcmunin-cgi-html -- munin-node /sbin/rcmunin-node -- net-tools /sbin/plipconfig -- net-tools-deprecated /sbin/ipmaddr -- netconsole-tools /sbin/netconsole-server -- nfs-client /sbin/mount.nfs /sbin/mount.nfs4 /sbin/umount.nfs /sbin/umount.nfs4 -- nfs-kernel-server /sbin/nfsdcltrack -- nilfs-utils /sbin/mkfs.nilfs2 /sbin/mount.nilfs2 /sbin/nilfs_cleanerd /sbin/umount.nilfs2 -- ntfs-3g /sbin/mount.lowntfs-3g /sbin/mount.ntfs /sbin/mount.ntfs-3g -- ntfsprogs /sbin/mkfs.ntfs -- ocfs2-tools /sbin/fsck.ocfs2 /sbin/mkfs.ocfs2 /sbin/mount.ocfs2 /sbin/mounted.ocfs2 /sbin/o2cluster /sbin/ocfs2_hb_ctl /sbin/tunefs.ocfs2 -- ocfs2-tools-o2cb /sbin/o2cb /sbin/o2cb.init /sbin/o2cb_ctl /sbin/ocfs2.init -- ooRexx /sbin/rcooRexx -- open-iscsi /sbin/iscsi-gen-initiatorname /sbin/iscsi-iname /sbin/iscsi_discovery /sbin/iscsi_fw_login /sbin/iscsi_offload /sbin/iscsiadm /sbin/iscsid /sbin/iscsistart -- open-vm-tools /sbin/mount.vmhgfs -- pam /sbin/faillock /sbin/mkhomedir_helper /sbin/pam_namespace_helper /sbin/pam_timestamp_check /sbin/unix2_chkpwd /sbin/unix_chkpwd /sbin/unix_update -- pam-deprecated /sbin/pam_tally2 -- pam_mount /sbin/mount.crypt /sbin/mount.crypt_LUKS /sbin/mount.crypto_LUKS /sbin/umount.crypt /sbin/umount.crypt_LUKS /sbin/umount.crypto_LUKS -- pciutils /sbin/lspci /sbin/setpci -- pcmciautils /sbin/lspcmcia /sbin/pccardctl -- perl-Bootloader /sbin/pbl /sbin/update-bootloader -- plymouth /bin/plymouth -- policycoreutils /sbin/restorecon_xattr -- polkit-default-privs /sbin/chkstat-polkit /sbin/set_polkit_default_privs -- powerd /sbin/detectups /sbin/powerd -- rarpd /sbin/rarpd -- rash /bin/rash -- reiserfs /sbin/debugfs.reiserfs /sbin/debugreiserfs /sbin/fsck.reiserfs /sbin/mkfs.reiserfs /sbin/mkreiserfs /sbin/reiserfsck /sbin/reiserfstune /sbin/resize_reiserfs /sbin/tunefs.reiserfs -- rpcbind /bin/rpcinfo /sbin/pmap_set2 /sbin/rpcbind /sbin/rpcinfo -- rpm /bin/rpm -- rsyslog /sbin/rsyslogd -- rungetty /sbin/rungetty -- scsh /bin/scsh -- scsirastools /sbin/getmd /sbin/mdevt /sbin/sgdefects /sbin/sgdiag /sbin/sgdiskmon /sbin/sgdskfl /sbin/sgevt /sbin/sgmode /sbin/sgraidmon /sbin/sgsafte -- sdparm /sbin/sas_disk_blink /sbin/scsi_ch_swp /sbin/sdparm -- supportutils /sbin/analyzevmcore /sbin/chkbin /sbin/getappcore /sbin/supportconfig -- sysconfig /sbin/ifuser /sbin/rcnetwork -- sysconfig-netconfig /sbin/netconfig -- syslog-ng /sbin/syslog-ng -- syslog-service /sbin/rcsyslog -- syslogd /sbin/syslogd -- systemd-sysvinit /sbin/halt /sbin/init /sbin/poweroff /sbin/reboot /sbin/runlevel /sbin/shutdown /sbin/telinit -- sysvinit-tools /sbin/checkproc /sbin/fstab-decode /sbin/killproc /sbin/mkill /sbin/pidofproc /sbin/rvmtab /sbin/start_daemon /sbin/startproc /sbin/vhangup -- tcsh /bin/csh /bin/tcsh -- tomoyo-tools /sbin/tomoyo-init -- udhcp /sbin/udhcpc -- util-linux /bin/findmnt /bin/lsblk /sbin/agetty /sbin/blockdev /sbin/cfdisk /sbin/chcpu /sbin/ctrlaltdel /sbin/fdisk /sbin/fsck.cramfs /sbin/fsck.minix /sbin/fsfreeze /sbin/fstrim /sbin/hwclock /sbin/mkfs /sbin/mkfs.bfs /sbin/mkfs.cramfs /sbin/mkfs.minix /sbin/pivot_root /sbin/raw /sbin/sfdisk /sbin/swaplabel /sbin/swapoff /sbin/swapon /sbin/switch_root /sbin/wipefs -- vim /bin/ex /bin/vim -- virtualbox /sbin/vboxconfig -- virtualbox-guest-tools /sbin/mount.vboxsf /sbin/vboxguestconfig -- virtualbox-qt /sbin/vbox-fix-usb-rules.sh -- wicked-service /sbin/ifdown /sbin/ifprobe /sbin/ifstatus /sbin/ifup -- xen-tools-domU /bin/domu-xenstore /bin/xenstore-chmod /bin/xenstore-exists /bin/xenstore-list /bin/xenstore-ls /bin/xenstore-read /bin/xenstore-rm /bin/xenstore-watch /bin/xenstore-write -- xfsdump /sbin/xfsdump /sbin/xfsrestore -- xfsprogs /sbin/fsck.xfs /sbin/mkfs.xfs /sbin/xfs_repair -- yast2 /sbin/yast /sbin/yast2 -- zsh /bin/zsh cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer HRB 36809 (AG Nürnberg)