Summary: The basic directory layout for a Linux system Name: filesystem Version: 3.18 Release: %autorelease License: LicenseRef-Fedora-Public-Domain URL: https://pagure.io/filesystem Source1: https://pagure.io/filesystem/raw/master/f/lang-exceptions Source2: iso_639.sed Source3: iso_3166.sed BuildRequires: iso-codes Requires(pre): setup Provides: filesystem-afs = %{version}-%{release} Obsoletes: filesystem-afs <= 3.14-2 # A virtual provides that packages can use to make sure that the # symlinks from /usr/sbin/foo to /usr/bin/foo will be automatically # created (if /usr/sbin is not a symlink itself). Provides: filesystem(unmerged-sbin-symlinks) = 1 # This is needed for rpm-4.20 %global debug_package %{nil} %description The filesystem package is one of the basic packages that is installed on a Linux system. Filesystem contains the basic directory layout for a Linux operating system, including the correct permissions for the directories. %package content Summary: Directory ownership content of the filesystem package License: Public Domain %description content This subpackage of filesystem package contains just the file with the directories owned by the filesystem package. This can be used during the build process instead of calling rpm -ql filesystem. %prep rm -f $RPM_BUILD_DIR/filelist %build %install rm -rf %{buildroot} mkdir %{buildroot} install -p -c -m755 %SOURCE2 %{buildroot}/iso_639.sed install -p -c -m755 %SOURCE3 %{buildroot}/iso_3166.sed cd %{buildroot} Paths=( afs boot dev \ etc/{X11/{applnk,fontpath.d,xinit/{xinitrc,xinput}.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},skel,sysconfig,keys/ima,pki,bash_completion.d,rwtab.d,statetab.d} \ home media mnt opt root run srv tmp \ usr/{bin,games,include,%{_lib}/{bpf,games,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{debug/{.dwz,usr},games,locale,modules,sysimage,systemd/{system,user},sysusers.d,tmpfiles.d},libexec,local/{bin,etc,games,lib,%{_lib}/bpf,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},share/{aclocal,appdata,applications,augeas/lenses,backgrounds,bash-completion{,/completions,/helpers},desktop-directories,dict,doc,empty,fish/vendor_completions.d,games,gnome,help,icons,idl,info,licenses,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},metainfo,mime-info,misc,modulefiles,omf,pixmaps,sounds,themes,xsessions,X11/fonts,wayland-sessions,zsh/site-functions},src,src/kernels,src/debug} \ var/{adm,empty,ftp,lib/{games,misc,rpm-state},local,log,nis,preserve,spool/{mail,lpd},tmp,db,cache/bpf,opt,games,yp} ) for i in "${Paths[@]}"; do mkdir -p "$i" done ln -snf ../var/tmp usr/tmp ln -snf spool/mail var/mail ln -snf usr/bin bin ln -snf usr/sbin sbin ln -snf bin usr/sbin ln -snf usr/lib lib ln -snf usr/%{_lib} %{_lib} ln -snf ../run var/run ln -snf ../run/lock var/lock ln -snf usr/bin usr/lib/debug/bin ln -snf usr/lib usr/lib/debug/lib ln -snf usr/%{_lib} usr/lib/debug/%{_lib} ln -snf ../.dwz usr/lib/debug/usr/.dwz ln -snf usr/sbin usr/lib/debug/sbin ln -snf bin usr/local/sbin sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \ >%{buildroot}/iso_639.tab sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \ >%{buildroot}/iso_3166.tab grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do [[ "$d" =~ "^Reserved" ]] && continue [[ "$d" =~ "^No linguistic" ]] && continue locale=$c if [ "$locale" = "XX" ]; then locale=$b fi echo "%lang(${locale}) /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${locale}" >>$RPM_BUILD_DIR/filelist done cat %{SOURCE1} | grep -v "^#" | grep -v "^$" | while read loc ; do locale=$loc locality= special= [[ "$locale" =~ "@" ]] && locale=${locale%%%%@*} [[ "$locale" =~ "_" ]] && locality=${locale##*_} [[ "$locality" =~ "." ]] && locality=${locality%%%%.*} [[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc # If the locality is not official, skip it if [ -n "$locality" ]; then grep -q "^$locality" %{buildroot}/iso_3166.tab || continue fi # If the locale is not official and not special, skip it if [ -z "$special" ]; then egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \ %{buildroot}/iso_639.tab || continue fi echo "%lang(${locale}) /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${loc}" >> $RPM_BUILD_DIR/filelist done rm -f %{buildroot}/iso_639.tab rm -f %{buildroot}/iso_639.sed rm -f %{buildroot}/iso_3166.tab rm -f %{buildroot}/iso_3166.sed cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES done cat $RPM_BUILD_DIR/filelist | grep "/share/man" | while read a b c d; do mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p} done for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do echo "/usr/share/man/$i" >>$RPM_BUILD_DIR/filelist done mkdir -p %{buildroot}/usr/share/filesystem #find all dirs in the buildroot owned by filesystem and store them find %{buildroot} -mindepth 0 | sed -e 's|%{buildroot}|/|' -e 's|//|/|' \ | LC_ALL=C sort | grep -v filesystem >%{buildroot}%{_datadir}/filesystem/paths %pretrans -p --# If we are running in pretrans in a fresh root, there is no /usr and --# symlinks. We cannot be sure, to be the very first rpm in the --# transaction list. Let's create the needed base directories and symlinks --# here, to place the files from other packages in the right locations. --# When our rpm is unpacked by cpio, it will set all permissions and modes --# later. posix.mkdir("/usr") posix.mkdir("/usr/bin") posix.symlink("bin", "/usr/sbin") posix.mkdir("/usr/lib") posix.mkdir("/usr/lib/debug") posix.mkdir("/usr/lib/debug/usr/") posix.mkdir("/usr/lib/debug/usr/bin") posix.symlink("bin", "/usr/lib/debug/usr/sbin") posix.mkdir("/usr/lib/debug/usr/lib") posix.mkdir("/usr/lib/debug/usr/%{_lib}") posix.symlink("bin", "/usr/local/sbin") posix.mkdir("/usr/%{_lib}") posix.symlink("usr/bin", "/bin") posix.symlink("usr/sbin", "/sbin") posix.symlink("usr/lib", "/lib") posix.symlink("usr/bin", "/usr/lib/debug/bin") posix.symlink("usr/lib", "/usr/lib/debug/lib") posix.symlink("usr/%{_lib}", "/usr/lib/debug/%{_lib}") posix.symlink("../.dwz", "/usr/lib/debug/usr/.dwz") posix.symlink("usr/sbin", "/usr/lib/debug/sbin") posix.symlink("usr/%{_lib}", "/%{_lib}") posix.mkdir("/run") posix.mkdir("/proc") posix.mkdir("/sys") posix.chmod("/proc", 0555) posix.chmod("/sys", 0555) st = posix.stat("/media") if st and st.type == "link" then os.remove("/media") end posix.mkdir("/var") posix.symlink("../run", "/var/run") posix.symlink("../run/lock", "/var/lock") %global sbin_filenames %{lua: print('{\\n') for k,v in pairs({ "abrt-auto-reporting", "abrtd", "abrt-dbus", "abrt-harvest-pstoreoops", "abrt-harvest-vmcore", "abrt-server", "accessdb", "accton", "acme-tiny", "acme-tiny-sign", "acpid", "adcli", "addgnupghome", "addpart", "adduser", "adelsystem_cbi", "afpd", "agetty", "airbase-ng", "aireplay-ng", "airmon-ng", "airodump-ng", "airodump-ng-oui-update", "airserv-ng", "airtun-ng", "airventriloquist-ng", "ajoursat", "akmods", "akmodsbuild", "akmods-ostree-post", "akmods-shutdown", "al175", "alias_manager.pl", "alsactl", "alsa-info.sh", "alternatives", "amd", "amd2ldif", "amd2sun", "am-eject", "amq", "anaconda", "aoecfg", "aoe-discover", "aoe-flush", "aoe-interfaces", "aoe-mkdevs", "aoe-mkshelf", "aoeping", "aoe-revalidate", "aoe-sancheck", "aoe-stat", "aoe-version", "apachectl", "apc_modbus", "apcsmart", "apcsmart-old", "apcupsd-ups", "applygnupgdefaults", "arbitron", "arc_gahp", "archived.pl", "arp", "arping", "arpspoof", "arptables", "arptables-nft", "arptables-nft-restore", "arptables-nft-save", "arptables-restore", "arptables-save", "artech2ncid", "asem", "astraceroute", "astribank_allow", "astribank_hexload", "astribank_is_starting", "astribank_tool", "atmaddr", "atmarp", "atmarpd", "atmloop", "atmsigd", "atmtcp", "attrd_updater", "auditctl", "auditd", "augenrules", "aureport", "ausearch", "automount2amd", "avahi-daemon", "avcstat", "ax25_call", "ax25d", "axctl", "axdigi", "axparms", "axspawn", "axwrapper", "AzureGAHPServer", "babeld", "backintime-qt-root", "backupninja", "bacula-dir", "bacula-fd", "bacula-sd", "bacula-tray-monitor", "badblocks", "bat", "batctl", "bbconsjson", "bcache", "bcachefs", "bcache-status", "bcache-super-show", "bcmxcp", "bcmxcp_usb", "bconsole", "bcopy", "bcrelay", "bdb_recover", "bdii-update", "bdirjson", "beacon", "beesu", "belkin", "belkinunv", "besside-ng", "bestfcom", "bestfortress", "bestuferrups", "bestups", "bextract", "bfb-install", "bfdjson", "bgpctl", "bgpd", "biosdecode", "biosdevname", "bird", "birdc", "birdcl", "bitcoind", "bitlbee", "blah_check_config", "blahpd_daemon", "blazer_ser", "blazer_usb", "blkdeactivate", "blkdiscard", "blkid", "blkmapd", "blkpr", "blkzone", "blockdev", "bls", "bmc-config", "bmc-device", "bmc-info", "bmc-watchdog", "bonnie++", "bonobo-activation-sysconf", "booth", "boothd", "booth-keygen", "bounced.pl", "bpf-bashreadline", "bpf-bindsnoop", "bpf-biolatency", "bpf-biopattern", "bpf-biosnoop", "bpf-biostacks", "bpf-biotop", "bpf-bitesize", "bpf-btrfsdist", "bpf-btrfsslower", "bpfc", "bpf-cachestat", "bpf-capable", "bpf-cpudist", "bpf-cpufreq", "bpf-drsnoop", "bpf-execsnoop", "bpf-exitsnoop", "bpf-ext4dist", "bpf-ext4slower", "bpf-f2fsdist", "bpf-f2fsslower", "bpf-filelife", "bpf-filetop", "bpf-fsdist", "bpf-fsslower", "bpf-funclatency", "bpf-futexctn", "bpf-gethostlatency", "bpf-hardirqs", "bpf-javagc", "bpf-killsnoop", "bpf-klockstat", "bpf-ksnoop", "bpf-llcstat", "bpf-mdflush", "bpf-memleak", "bpfmon", "bpf-mountsnoop", "bpf-nfsdist", "bpf-nfsslower", "bpf-numamove", "bpf-offcputime", "bpf-oomkill", "bpf-opensnoop", "bpf-readahead", "bpf-runqlat", "bpf-runqlen", "bpf-runqslower", "bpf-sigsnoop", "bpf-slabratetop", "bpf-softirqs", "bpf-solisten", "bpf-statsnoop", "bpf-syscount", "bpf-tcpconnect", "bpf-tcpconnlat", "bpf-tcplife", "bpf-tcppktlat", "bpf-tcprtt", "bpf-tcpstates", "bpf-tcpsynbl", "bpf-tcptop", "bpf-tcptracer", "bpftool", "bpf-vfsstat", "bpf-wakeuptime", "bpf-xfsdist", "bpf-xfsslower", "bpqparms", "br2684ctl", "brctl", "bregex", "bridge", "bscan", "bsdjson", "bsmtp", "btape", "btraceback", "btrfs", "btrfsck", "btrfs-convert", "btrfs-find-root", "btrfs-image", "btrfs-map-logical", "btrfs-select-super", "btrfstune", "bulk.pl", "bus", "busybox", "busybox.musl.petitboot", "busybox.musl.static", "busybox.petitboot", "busybox.shared", "bwild", "bwping", "bwping6", "cache_check", "cache_dump", "cachefilesd", "cache_metadata_size", "cache_repair", "cache_restore", "cache_writeback", "calibrate", "callback", "campaignd", "capsh", "captree", "cdp-client", "cephadm", "ceph-create-keys", "ceph-volume", "ceph-volume-systemd", "cert-check", "certmonger", "cfdisk", "cgconfigparser", "cgdisk", "charon-cmd", "charon-systemd", "chat", "chcpu", "check-create-certificate", "check_hd", "check_lft_balance.pl", "checkrad", "chgpasswd", "chkconfig", "chk_cyrus", "chkrootkit", "choptest", "chpasswd", "chronyd", "chroot", "chroot.fakechroot", "cibadmin", "cibsecret", "c-icap", "cideasy2ncid", "cifs.idmap", "cifs.upcall", "cimauth", "cimconfig", "cimprovagt", "cimreparchive", "cimserver", "cimtrust", "cjdroute", "clamav-milter", "clamav-unofficial-sigs.sh", "clamd", "clamd.exim", "clamonacc", "clamsmtpd", "clatd", "clc-update-customized-images", "clean-crl", "clock", "clone", "clone-outlet", "cma_roce_mode", "cma_roce_tos", "cmospwd", "cnid_dbd", "cnid_metad", "cntlm", "collectd", "collectdmon", "common_irq_affinity.sh", "compat_gid_gen", "condor_advertise", "condor_aklog", "condor_c-gahp", "condor_c-gahp_worker_thread", "condor_collector", "condor_credd", "condor_credmon_krb", "condor_credmon_oauth", "condor_fetchlog", "condor_ft-gahp", "condor_gridmanager", "condor_had", "condor_kbdd", "condor_master", "condor_negotiator", "condor_off", "condor_on", "condor_preen", "condor_procd", "condor_reconfig", "condor_replication", "condor_restart", "condor_schedd", "condor_set_shutdown", "condor_shadow", "condor_sos", "condor_startd", "condor_starter", "condor_store_cred", "condor_testwritelog", "condor_updates_stats", "condor_vm-gahp", "configsnap", "conf.py", "conmand", "conmuxd", "conmux-registry", "conntrack", "conntrackd", "conserver", "consolation", "consoletype", "conversd", "convert4r4", "convertcfg", "convert_hd", "convertquota", "copr-backend-service", "copr-selinux-enable", "copr-selinux-relabel", "coraid-update", "corosync", "corosync-cfgtool", "corosync-cmapctl", "corosync-cpgtool", "corosync-keygen", "corosync-notifyd", "corosync-qdevice", "corosync-qdevice-net-certutil", "corosync-qdevice-tool", "corosync-quorumtool", "cqtest", "cracklib-check", "cracklib-format", "cracklib-packer", "cracklib-unpacker", "cracklib-update", "create-cracklib-dict", "create_dirs_from_rpmdb", "credentials-fetcherd", "credentials_fetcher_utf16_private.exe", "credentials_fetcher_utf16_private.runtimeconfig.json", "criu", "criu-ns", "crmadmin", "crm_attribute", "crm_diff", "crm_error", "crm_failcount", "crm_master", "crm_mon", "crm_node", "crm_report", "crm_resource", "crm_rule", "crm_shadow", "crm_simulate", "crm_standby", "crm_ticket", "crm_verify", "crond", "cronolog", "cryptsetup", "cryptsetup-ssh", "ctdbd", "ctl_backups", "ctl_conversationsdb", "ctl_cyrusdb", "ctl_deliver", "ctl-hlfsd", "ctl_mboxlist", "ctl_zoneinfo", "ctrlaltdel", "ctstat", "cupsaccept", "cups-browsed", "cupsctl", "cupsd", "cupsdisable", "cupsenable", "cupsfilter", "cups-genppd.5.3", "cups-genppdupdate", "cupsreject", "curvetun", "cvt_cyrusdb", "cvt_xlist_specialuse", "cyr_backup", "cyr_buildinfo", "cyr_cd.sh", "cyr_dbtool", "cyr_deny", "cyr_df", "cyrdump", "cyr_expire", "cyr_fetchnews", "cyr_info", "cyr_ls", "cyr_pwd", "cyr_quota", "cyr_restore", "cyr_synclog", "cyr_userseen", "cyr_virusscan", "dahdi_cfg", "dahdi_genconf", "dahdi_hardware", "dahdi_maint", "dahdi_monitor", "dahdi_registration", "dahdi_scan", "dahdi_span_assignments", "dahdi_span_types", "dahdi_speed", "dahdi_test", "dahdi_tool", "dahdi_waitfor_span_assignments", "dav_reconstruct", "dbcheck", "dbeg1-ftpd.pl", "dcb", "dcbtool", "ddns-confgen", "Deadwood", "debootstrap", "debugfs", "debugfs.ocfs2", "defrag.f2fs", "defragfs.ocfs2", "deliver", "delpart", "depmod", "devlink", "dhclient", "dhclient-script", "dhcpcd", "dialtest", "diskdevstat", "dmascc_cfg", "dm_dso_reg_tool", "dmeventd", "dmevent_tool", "dmfilemapd", "dmidecode", "dmraid", "dmsetup", "dmstats", "dnsmasq", "dnsspoof", "docfdisk", "doc_loadbios", "dosfsck", "dosfslabel", "dpkg-fsys-usrunmess", "dsniff", "dummy-ups", "dump-acct", "dumpe2fs", "dump.exfat", "dump.f2fs", "dump_fts", "dump_lfts.sh", "dump_mfts.sh", "dump-utmp", "e2freefrag", "e2fsck", "e2image", "e2label", "e2mmpstatus", "e2scrub", "e2scrub_all", "e2undo", "e4crypt", "e4defrag", "eapol_test", "easside-ng", "ebhtcheck", "ebhtcontrol", "ebhttpd", "ebncheck", "ebncontrol", "ebndaily", "ebnetd", "ebnupgrade", "ebtables", "ebtables-legacy", "ebtables-legacy-restore", "ebtables-legacy-save", "ebtables-nft", "ebtables-nft-restore", "ebtables-nft-save", "ebtables-restore", "ebtables-save", "ebtables-translate", "ec2_gahp", "edac-ctl", "edge", "edg-mkgridmap", "edit-faxcover", "editmap", "editmap.sendmail", "edquota", "eeprog", "efibootdump", "efibootmgr", "enitune", "era_check", "era_dump", "era_invalidate", "era_restore", "escapesrc", "esi", "etapro", "eth2rm", "ethallanalysis", "ethbw", "ethcabletest", "ethcapture", "ethcaptureall", "ethcheckload", "ethcmdall", "ethdownloadall", "etherape", "ether-wake", "ethexpandfile", "ethextractbadlinks", "ethextracterror", "ethextractifids", "ethextractlink", "ethextractmissinglinks", "ethextractperf", "ethextractperf2", "ethextractsellinks", "ethextractstat", "ethextractstat2", "ethfabricanalysis", "ethfabricinfo", "ethfastfabric", "ethfindgood", "ethhostadmin", "ethlinkanalysis", "ethmergeperf2", "ethpingall", "ethreport", "ethscpall", "ethsetupsnmp", "ethsetupssh", "ethshmcleanup", "ethshowallports", "ethsorthosts", "ethtool", "ethuploadall", "ethverifyhosts", "ethxlattopology", "ethxmlextract", "ethxmlfilter", "ethxmlgenerate", "ethxmlindent", "eventlogadm", "everups", "exfat2img", "exfatlabel", "exicyclog", "exigrep", "exim", "exim_checkaccess", "exim_dbmbuild", "exim_dumpdb", "exim_fixdb", "exim_lock", "eximon", "eximon.bin", "eximstats", "exim_tidydb", "exinext", "exipick", "exiqgrep", "exiqsumm", "exiwhat", "exportfs", "extlinux", "f2fscrypt", "f2fs_io", "f2fslabel", "faillock", "fancontrol", "fatlabel", "fatrace", "faxabort", "faxaddmodem", "faxadduser", "faxanswer", "faxconfig", "faxcron", "faxdeluser", "faxfetch", "faxgetty", "faxinfo", "faxlock", "faxmodem", "faxmsg", "faxq", "faxqclean", "faxquit", "faxsend", "faxsetup", "faxsetup.linux", "faxstate", "faxwatch", "fbb", "fbbgetconf", "fcgistarter", "fdformat", "fdisk", "fectest", "fence_watchdog", "fetch-crl", "fibmap.f2fs", "filefrag", "filesnarf", "findfs", "firewalld", "fix-amd-map", "fixfiles", "fix-info-dir", "fixmount", "fixparts", "fixrmtab", "flashcp", "flash_erase", "flash_eraseall", "flash_lock", "flash_otp_dump", "flash_otp_erase", "flash_otp_info", "flash_otp_lock", "flash_otp_write", "flashrom", "flash_unlock", "flask-get-bool", "flask-getenforce", "flask-label-pci", "flask-loadpolicy", "flask-set-bool", "flask-setenforce", "flexd", "flowtop", "fping", "fsadm", "fsck", "fsck.bcachefs", "fsck.btrfs", "fsck.cramfs", "fsck.exfat", "fsck.ext2", "fsck.ext3", "fsck.ext4", "fsck.f2fs", "fsck.fat", "fsck.hfs", "fsck.hfsplus", "fsck.jfs", "fsck.minix", "fsck.msdos", "fsck.ntfs", "fsck.ocfs2", "fsck.vfat", "fsck.xfs", "fsfreeze", "fsidd", "fsinfo", "fstrim", "ftl_check", "ftl_format", "ftpd.pl", "ftpscrub", "ftpshut", "fuser", "fwcheck_psad", "fxotune", "g13-syshelp", "gamatronic", "gce_gahp", "gcron.py", "gdbsx", "gdisk", "gdm", "genccode", "gencmn", "generate-fmtutilcnf", "generic_modbus", "genericups", "genhomedircon", "genhostid", "genl", "gennorm2", "gensprep", "getcap", "getc_putc", "getc_putc_helper", "getenforce", "getpcaps", "getpidprevcon", "getpolicyload", "getsebool", "getsysinfo", "gf_attach", "gidd_alloc", "gluster", "glusterd", "glusterfs", "glusterfsd", "gluster-setgfid2path", "gpm", "groupadd", "groupdel", "groupmems", "groupmod", "grpck", "grpconv", "grpunconv", "gssproxy", "halt", "handle-sshpw", "haproxy", "haveged", "hcidump", "hddtemp", "hd-idle", "hdparm", "hediag", "hercules-run", "hfaxd", "hfs-bless", "hitch", "hlfsd", "hostapd", "hostapd_cli", "hping", "hping2", "hping3", "htcacheclean", "httpd", "httpry", "huawei-ups2000", "hunt", "huntd", "hwclock", "hwinfo", "hwloc-dump-hwdata", "hwstamp_ctl", "hylafax", "hypervfcopyd", "hypervkvpd", "hypervvssd", "i2cdetect", "i2cdump", "i2cget", "i2cset", "i2ctransfer", "ib2ib_setup", "ibaddr", "ibcacheedit", "ibccconfig", "ibccquery", "ibclearcounters", "ibclearerrors", "ibfindnodesusing.pl", "ibhosts", "ibidsverify.pl", "iblinkinfo", "ibnetdiscover", "ibnodes", "ibping", "ibportstate", "ibqueryerrors", "ibroute", "ibrouters", "ibstat", "ibstatus", "ibswitches", "ibsysstat", "ibtracert", "iconvconfig", "icupkg", "ifconfig", "ifenslave", "ifpps", "ifstat", "ilmid", "in.imapproxyd", "init", "inmem-ftpd.pl", "in.proftpd", "insmod", "install-info", "installkernel", "iotop", "ip", "ip6tables", "ip6tables-legacy", "ip6tables-legacy-restore", "ip6tables-legacy-save", "ip6tables-nft", "ip6tables-nft-restore", "ip6tables-nft-save", "ip6tables-restore", "ip6tables-restore-translate", "ip6tables-save", "ip6tables-translate", "ipmaddr", "ipmi-chassis", "ipmi-chassis-config", "ipmi-config", "ipmi-console", "ipmiconsole", "ipmi-dcmi", "ipmi-detect", "ipmidetect", "ipmi-fru", "ipmi-locate", "ipmimonitoring", "ipmi-oem", "ipmi-pef-config", "ipmi-pet", "ipmi-ping", "ipmiping", "ipmi-power", "ipmipower", "ipmi-raw", "ipmi-sel", "ipmi-sensors", "ipmi-sensors-config", "iprop-log", "ipsec", "ipset", "ipset-translate", "iptables", "iptables-legacy", "iptables-legacy-restore", "iptables-legacy-save", "iptables-nft", "iptables-nft-restore", "iptables-nft-save", "iptables-restore", "iptables-restore-translate", "iptables-save", "iptables-translate", "iptaccount", "iptstate", "iptunnel", "ipurge", "isadump", "isaset", "isbmex", "iscsiadm", "iscsid", "iscsi-iname", "iscsistart", "iscsiuio", "iso8601", "ivtscd", "iw", "jffs2dump", "jffs2reader", "jfs_debugfs", "jfs_fsck", "jfs_fscklog", "jfs_logdump", "jfs_mkfs", "jfs_tune", "kacpimon", "kadmind", "kadmin.local", "kafs-check-config", "kcatalogprint", "kdb5_ldap_util", "kdb5_util", "kea-admin", "keactrl", "kea-ctrl-agent", "kea-dhcp4", "kea-dhcp6", "kea-dhcp-ddns", "kea-lfc", "keama", "kea-shell", "keepalived", "kernel-is-rt", "kexec", "key.dns_resolver", "keymgr", "kissattach", "kissnetd", "kissparms", "kjournalprint", "kmodgenca", "knockd", "knotc", "knotd", "kojid", "koji-gc", "kojira", "koji-shadow", "koji-sidetag-cleanup", "koji-sweep-db", "kojivmd", "kpartx", "kprop", "kpropd", "kproplog", "krb5kdc", "kresc", "kres-cache-gc", "kresd", "ksmtuned", "kstash", "kxdpgun", "LCDd", "LCDd-hwdetect", "lchage", "ldaptest", "ldattach", "ldconfig", "lecs", "les", "lgroupadd", "lgroupdel", "lgroupmod", "libguestfs-make-fixed-appliance", "libvirtd", "lid", "liebert", "liebert-esp2", "lircd", "lircd-setup", "lircd-uinput", "lirc-lsplugins", "lircmd", "lldpad", "lldptool", "lnewusers", "lnstat", "load_policy", "lockdev", "lockname", "logrotate", "logsave", "losetup", "lostaltmail", "lpadmin", "lpasswd", "lpc", "lpc.cups", "lpinfo", "lpmove", "lsdahdi", "lshw", "lsmdev", "lsmod", "lsmtd", "lspci", "luseradd", "luserdel", "lusermod", "lvchange", "lvconvert", "lvcreate", "lvdisplay", "lvextend", "lvm", "lvmconfig", "lvmdevices", "lvmdiskscan", "lvmdump", "lvm_import_vdo", "lvmpolld", "lvmsadc", "lvmsar", "lvreduce", "lvremove", "lvrename", "lvresize", "lvs", "lvscan", "m6pack", "macof", "mailsnarf", "mailstats", "make-bcache", "makedumpfile", "makemap", "makemap.opensmtpd", "makemap.sendmail", "maradns", "masterguard", "matchpathcon", "mausezahn", "mbexamine", "mbpath", "mbtool", "mcelog", "mcs2h", "mdadm", "mdevctl", "mdmon", "metasys", "mge-shut", "mgetty", "mge-utalk", "mheardd", "microdowell", "microsol-apc", "mii-diag", "mii-tool", "mk-amd-map", "mkdict", "mkdosfs", "mkdumprd", "mke2fs", "mkfs", "mkfs.bcachefs", "mkfs.btrfs", "mkfs.cramfs", "mkfs.exfat", "mkfs.ext2", "mkfs.ext3", "mkfs.ext4", "mkfs.f2fs", "mkfs.fat", "mkfs.hfsplus", "mkfs.jffs2", "mkfs.jfs", "mkfs.minix", "mkfs.msdos", "mkfs.nilfs2", "mkfs.ntfs", "mkfs.ocfs2", "mkfs.ubifs", "mkfs.udf", "mkfs.vfat", "mkfs.xfs", "mkhomedir_helper", "mk_isdnhwdb", "mkiss", "mklost+found", "mkntfs", "mksquashfs", "mkswap", "mkudffs", "mlnx_affinity", "mlnx_bf_configure", "mlnx_bf_configure_ct", "mlnxofedctl", "mlnx-sf", "mlnx_tune", "ModemManager", "modinfo", "modprobe", "momctl", "mount.bcachefs", "mount.cifs", "mount.crypt", "mount.crypt_LUKS", "mount.crypto_LUKS", "mount.ddi", "mounted.ocfs2", "mount.fuse", "mount.fuse3", "mount.fuse.sshfs", "mount.glusterfs", "mount.lowntfs-3g", "mount.nfs", "mount.nfs4", "mount.nilfs2", "mount.ntfs", "mount.ntfs-3g", "mount.ntfs-fuse", "mount.ocfs2", "mount.smb3", "mount.sshfs", "mountstats", "mount.vboxsf", "mount.zfs", "mpcd", "msgsnarf", "msr-cpuid", "mtd_debug", "mtdinfo", "mtdpart", "mtr", "mtr-packet", "munged", "mungekey", "nagios", "named-checkzone", "named-compilezone", "nameif", "nanddump", "nandflipbits", "nandtest", "nandwrite", "nbdkit", "net2kiss", "netatalk", "netdevstat", "netrom_call", "netromd", "netsniff-ng", "NetworkManager", "newusers", "nfct", "nfsconf", "nfsdcld", "nfsdclddb", "nfsdclnts", "nfsdcltrack", "nfsidmap", "nfsiostat", "nfsref", "nfsstat", "nft", "nftldump", "nftl_format", "nilfs-clean", "nilfs_cleanerd", "nilfs-resize", "nilfs-tune", "ninjahelper", "nmbd", "nodesave", "nodeusers", "nologin", "nrattach", "nrparms", "nrsdrv", "nsm", "ns-slapd", "ns-slapd-gdb.py", "nstat", "ntfsclone", "ntfscp", "ntfslabel", "ntfsresize", "ntfsundelete", "ntpd", "ntpdate", "ntpq", "nutdrv_atcl_usb", "nutdrv_qx", "nutdrv_siemens-sitop", "nut-ipmipsu", "o2cb", "o2cb_ctl", "o2cb.init", "o2cluster", "o2hbmonitor", "o2image", "obex-check-device", "ocfs2_hb_ctl", "ocfs2.init", "ocft", "ocf-tester", "ocserv", "ocserv-genkey", "ocserv-worker", "ocsinventory-agent", "ocspd", "oddjobd", "odhcp6c", "ods-control", "ods-enforcer", "ods-enforcerd", "ods-enforcer-db-setup", "ods-migrate", "ods-signer", "ods-signerd", "ofonod", "oidentd", "ondelay", "oneac", "openarc", "openconnect", "opendkim", "opendkim-default-keygen", "opendkim-genkey", "opendkim-genzone", "opendkim-reportstats", "opendkim-testkey", "opendkim-testmsg", "opendmarc", "opendmarc-check", "opendmarc-expire", "opendmarc-import", "opendmarc-importstats", "opendmarc-params", "opendmarc-reports", "openhpid", "openldap_to_ds", "opensips", "opensm", "openvpn", "openwsmand", "optiups", "osipsconfig", "osmtest", "ovs-bugtool", "ovsdb-server", "ovs-vswitchd", "ovs-vswitchd.dpdk", "ovs-vswitchd.nodpdk", "ownership", "oxenstored", "p0f", "p0f-client", "p0f-sendsyn", "p0f-sendsyn6", "p11sak", "pacemakerd", "pacemaker-remoted", "pacemaker_remoted", "pacrunner", "pagesend", "pam_console_apply", "pam_namespace_helper", "pam_timestamp_check", "parse.f2fs", "partclone.apfs", "partclone.btrfs", "partclone.chkimg", "partclone.dd", "partclone.exfat", "partclone.ext2", "partclone.ext3", "partclone.ext4", "partclone.ext4dev", "partclone.extfs", "partclone.f2fs", "partclone.fat", "partclone.fat12", "partclone.fat16", "partclone.fat32", "partclone.hfs+", "partclone.hfsp", "partclone.hfsplus", "partclone.imager", "partclone.imgfuse", "partclone.info", "partclone.minix", "partclone.nilfs2", "partclone.ntfs", "partclone.ntfsfixboot", "partclone.ntfsreloc", "partclone.restore", "partclone.vfat", "partclone.xfs", "parted", "partprobe", "partx", "pbs_demux", "pbs_mom", "pbs_sched", "pbs_server", "pbuilder", "pcm", "pcm-accel", "pcm-bw-histogram", "pcm-core", "pcm-daemon", "pcm-iio", "pcm-latency", "pcm-lspci", "pcm-memory", "pcm-mmio", "pcm-msr", "pcm-numa", "pcm-pcicfg", "pcm-pcie", "pcm-power", "pcm-raw", "pcm-sensor", "pcm-sensor-server", "pcm-tpmi", "pcm-tsx", "pcs", "pcscd", "pcsd", "pdata_tools", "pdns_recursor", "pdns_server", "pef-config", "perfdhcp", "perfquery", "pethtool", "pflogsumm", "phc2sys", "phc_ctl", "phoenixcontact_modbus", "php-fpm", "pidof", "pifconfig", "pijuice", "pimd", "pimpstat", "ping", "ping6", "pingd", "pivot_root", "pkcsconf", "pkcshsm_mk_change", "pkcsicsf", "pkcsslotd", "pkcsstats", "pkcstok_migrate", "pkidestroy", "pki-healthcheck", "pki-server", "pki-server-upgrade", "pkispawn", "pki-upgrade", "pknlusr", "pktcdvd-check", "pktsetup", "playiso-unmount.sh", "plipconfig", "plocate-build", "plotnetcfg", "pluginviewer", "plymouthd", "plymouth-set-default-theme", "pmc", "pmt-ehd", "pmvarrun", "postalias", "postcat", "postconf", "postdrop", "postfix", "postfwd", "postfwd3", "postgresql-new-systemd-unit", "postgrey", "postgreyreport", "postkick", "postlock", "postlog", "postmap", "postmulti", "postqueue", "postsrsd", "postsuper", "posttls-finger", "powercom", "poweroff", "powerpanel", "powertop", "power-usage-report", "pppd", "pppdump", "pppoe", "pppoe-discovery", "pppoe-relay", "pppoe-server", "pppoe-sniff", "pppstats", "ppp-watch", "pptp", "pptpctrl", "pptpd", "pptp-portslave", "pptpsetup", "pqos", "pqos-msr", "pqos-os", "praliases", "prelockd", "prelude-correlator", "prelude-correlator-3", "prelude-correlator-3.12", "prelude-lml", "prelude-manager", "prewikka-cli", "prewikka-cli-3", "prewikka-cli-3.12", "prewikka-crontab", "prewikka-crontab-3", "prewikka-crontab-3.12", "prewikka-httpd", "prewikka-httpd-3", "prewikka-httpd-3.12", "privoxy", "probemodem", "procd_ctl", "proftpd", "proxy-ftpd.pl", "proxyfuzz", "psad", "ptdump", "ptexpire", "ptp4l", "pure-authd", "pure-certd", "pure-ftpd", "pure-ftpwho", "pure-mrtginfo", "pure-quotacheck", "pure-uploadscript", "pvchange", "pvck", "pvcreate", "pvdisplay", "pvfs2-client", "pvfs2-client-core", "pvfs2-server", "pvmove", "pvremove", "pvresize", "pvs", "pvscan", "pwck", "pwconv", "pwhistory_helper", "pwmconfig", "pwunconv", "qat_init.sh", "qatmgr", "qb-blackbox", "qdrouterd", "qnoded", "qschedd", "qserverd", "qshape", "quotacheck", "quota_nld", "quotaoff", "quotaon", "quotastats", "quotatool", "raddebug", "radiusd", "radmin", "raid-check", "rdma", "rdmsr", "rdtset", "readprofile", "realm", "realtime-entsk", "reboot", "reconstruct", "recv_image", "recvstats", "register-common-lisp-implementation", "register-common-lisp-source", "relocate_by_id", "remote_gahp", "repquota", "repupgrade", "request-key", "resize2fs", "resize.f2fs", "resizepart", "resolvconf", "restorecon", "restorecon_xattr", "rfddump", "rfdformat", "rfkill", "rhino", "richcomm_usb", "riello_ser", "riello_usb", "rip98d", "rmcp-ping", "rmcpping", "rmmod", "rndc-confgen", "ro-ftpd.pl", "rose_call", "rotatelogs", "route", "rpcbind", "rpcctl", "rpcdebug", "rpc.gssd", "rpc.idmapd", "rpcinfo", "rpc.mountd", "rpc.nfsd", "rpc.statd", "rpc.yppasswdd", "rpc.ypxfrd", "rsattach", "rsdwnlnk", "rshim", "rsmemsiz", "rsparms", "rsuplnk", "rsusers.sh", "rtacct", "rtcwake", "rtkitctl", "rtmon", "rtstat", "runlevel", "runuser", "runvdr", "rvgahp_client", "rvgahp_proxy", "rvgahp_server", "rxecho", "sa", "safenet", "sanlock", "saquery", "saslauthd", "sasldblistusers2", "saslpasswd2", "satdoc", "satupdat", "scitokens_credential_producer", "scomes", "sefcontext_compile", "selabel_digest", "selabel_get_digests_all_partial_matches", "selabel_lookup", "selabel_lookup_best_match", "selabel_partial_match", "selinux_check_access", "selinuxconlist", "selinuxdefcon", "selinuxenabled", "selinuxexeccon", "semanage", "semodule", "sendmail", "sendmail.exim", "sendmail.opensmtpd", "sendmail.postfix", "sendmail.sendmail", "sendmail.ssmtp", "sensors-detect", "serve_image", "service", "sestatus", "setcap", "setenforce", "setfiles", "set_irq_affinity_bynode.sh", "set_irq_affinity_cpulist.sh", "set_irq_affinity.sh", "setpci", "setquota", "setregdomain", "setsebool", "setup", "sfdisk", "sgdisk", "sgpio", "sheep", "sheepfs", "shepherd", "show_counters", "show_gids", "show_irq_affinity_hints.sh", "show_irq_affinity.sh", "showmount", "shutdown", "sievec", "sieved", "sip2ncid", "skdump", "skel", "sktest", "slattach", "sload.f2fs", "smbd", "sminfo", "sm-notify", "smpdump", "smpquery", "smrsh", "sms_ser", "smtpctl", "smtpd", "smtp-sink", "smtp-source", "snap_scheduler.py", "snmp-ups", "socomec_jbus", "solis", "sparsify", "spattach", "spice-vdagentd", "spice-webdavd", "sqfscat", "sqfstar", "squatter", "ss", "sserver", "sshd", "sshmitm", "sshow", "ssmtp", "sss_cache", "sssd", "start-statd", "start-stop-daemon", "stonith_admin", "strongswan", "subscription-manager", "suexec", "sulogin", "sumtool", "sun2amd", "supernode", "swanctl", "swaplabel", "swapoff", "swapon", "switch_root", "sympa", "sympa_automatic.pl", "sympa_msg.pl", "sympa_newaliases.pl", "sympa.pl", "sync_client", "sync_reset", "sysctl", "sysctl_perf_tuning", "system-switch-java", "tagtest", "task_manager.pl", "tc", "tcp_call", "tcpdump", "tcpkill", "tcpnice", "tcpslice", "tcsd", "telinit", "testsaslauthd", "textfmt", "tgtadm", "tgt-admin", "tgtd", "tgtimg", "tgt-setup-lun", "thermald", "thin_check", "thin_delta", "thin_dump", "thin_ls", "thin_metadata_pack", "thin_metadata_size", "thin_metadata_unpack", "thin_repair", "thin_restore", "thin_rmap", "thin_trim", "tiffcheck", "timemaster", "tipc", "tkiptun-ng", "tls_prune", "tracepath", "tracepath6", "trafgen", "tripplite", "tripplitesu", "tripplite_usb", "ts2phc", "tsig-keygen", "tsitest", "ttylinkd", "tukit", "tune2fs", "tune.exfat", "tunefs.ocfs2", "turbo.sh", "twinstar", "typetest", "tz2alt", "ublk", "udevadm", "udflabel", "udhcpc", "umount.crypt", "umount.crypt_LUKS", "umount.crypto_LUKS", "umount.nfs", "umount.nfs4", "umount.nilfs2", "umount.udisks2", "unbound-anchor", "unexpunge", "unix_chkpwd", "unix_update", "unregister-common-lisp-implementation", "unregister-common-lisp-source", "unsquashfs", "update-alternatives", "updatedb", "update-pciids", "upgrade_get_document", "upscode2", "upsd", "upsdrvctl", "upsdrvsvcctl", "upsmon", "upssched", "urlsnarf", "uronode", "usbhid-ups", "usb_modeswitch", "usb_modeswitch_dispatcher", "usbmuxd", "useradd", "userdel", "userhelper", "usermod", "v4l2-dbg", "v4l-conf", "validatetrans", "varnetload", "varnishd", "varnishreload", "vbetest", "VBoxService", "vconfig", "vdpa", "vdptool", "vdr", "vendstat", "veritysetup", "vgcfgbackup", "vgcfgrestore", "vgchange", "vgck", "vgconvert", "vgcreate", "vgdisplay", "vgetty", "vgexport", "vgextend", "vgimport", "vgimportclone", "vgimportdevices", "vgmerge", "vgmknodes", "vgreduce", "vgremove", "vgrename", "vgs", "vgscan", "vgsplit", "vhostmd", "via_regs_dump", "victronups", "vigr", "vipw", "virtinterfaced", "virtlockd", "virtlogd", "virtlxcd", "virtnetworkd", "virtnodedevd", "virtnwfilterd", "virtproxyd", "virtqemud", "virt-sanlock-cleanup", "virtsecretd", "virtstoraged", "virtvboxd", "virt-what", "virtxend", "visudo", "vmad", "vmcore-dmesg", "vm-dump-metrics", "vncsession", "vnstatd", "voms", "vpddecode", "vpnc", "vpnc-disconnect", "vpnc-helper", "vsftpd", "waagent", "wait4amd", "wait4amd2die", "warnquota", "watchdog", "wd_identify", "wd_keepalive", "wdmd", "webmitm", "webspy", "wesnothd", "wesside-ng", "wicked", "wickedd", "wickedd-nanny", "winbindd", "wipefs", "wire-test", "wmbusmetersd", "wondershaper", "wpa_cli", "wpa_passphrase", "wpa_supplicant", "wrmsr", "x2gocleansessions", "x2godbadmin", "x2golistsessions_root", "x2goshowblocks", "x2gowswrapper", "xdp-bench", "xdpdump", "xdp-filter", "xdp-loader", "xdp-monitor", "xdp-trafficgen", "xe-daemon", "xe-linux-distribution", "xen-access", "xenbaked", "xenconsoled", "xencov", "xen-diag", "xen-hptool", "xen-hvmcrash", "xen-hvmctx", "xenhypfs", "xen-kdd", "xen-livepatch", "xenlockprof", "xen-lowmemd", "xen-mceinj", "xen-memshare", "xen-mfndump", "xenmon", "xenperf", "xenpm", "xenpmd", "xenstored", "xentop", "xentrace", "xentrace_setmask", "xentrace_setsize", "xen-ucode", "xen-vmtrace", "xenwatchdogd", "xfbb", "xfbbC", "xfbbd", "xfbbX", "xfbbX_cl", "xfce4-kiosk-query", "xfce4-pm-helper", "xferfaxstats", "xfhdlcchpar", "xfhdlcst", "xfpm-power-backlight-helper", "xfs_admin", "xfs_bmap", "xfs_copy", "xfs_db", "xfsdump", "xfs_estimate", "xfs_freeze", "xfs_fsr", "xfs_growfs", "xfs_info", "xfsinvutil", "xfs_io", "xfs_logprint", "xfsmdiag", "xfs_mdrestore", "xfs_metadump", "xfs_mkfile", "xfsmmixer", "xfs_ncheck", "xfs_quota", "xfs_repair", "xfsrestore", "xfs_rtcp", "xfs_scrub", "xfs_scrub_all", "xfs_spaceman", "xl", "xl2tpd", "xl2tpd-control", "xpp_blink", "xpp_sync", "xqmstats", "xrdp", "xrdp-chansrv", "xrdp-sesman", "xtables-legacy-multi", "xtables-monitor", "xtables-nft-multi", "xtalk_send", "xtide-get_harmonics-data.sh", "xttpd", "yadifad", "yakeyrolld", "yamcfg", "ykval-checksum-clients", "ykval-checksum-deactivated", "ykval-export", "ykval-export-clients", "ykval-gen-clients", "ykval-import", "ykval-import-clients", "ykval-nagios-queuelength", "ykval-queue", "ykval-synchronize", "ypbind", "yp_dump_binding", "yppoll", "yppush", "ypserv", "ypset", "yptest", "zcav", "zdb", "zeppelin", "zerofree", "zfs", "zfs-fuse", "zfs-fuse-helper", "zic", "zoneserver", "zpool", "zramctl", "zstreamdump", "ztest", "zvbid", "zypp-refresh", }) do print(' ["'..v..'"] = true,\\n') end print('}') } %filetriggerin -p -- /usr/bin --# This implements filesystem(unmerged-sbin-symlinks) feature. st = posix.stat("/usr/sbin") if not st or st.type == "link" then return end filenames = %sbin_filenames a = rpm.next_file() while a do name = a:match("^.+/(.+)$") if filenames[name] then b = "/usr/sbin/"..name sta = posix.stat(a) stb = posix.stat(b) print(a, sta, b, stb) if sta and not stb then print('Symlinking /usr/sbin/'..name..'->/usr/bin/'..name) posix.symlink("../bin/"..name, "/usr/sbin/"..name) end end a = rpm.next_file() end %filetriggerpostun -p -- /usr/bin --# This implements filesystem(unmerged-sbin-symlinks) feature. st = posix.stat("/usr/sbin") if not st or st.type == "link" then return end filenames = %sbin_filenames a = rpm.next_file() while a do name = a:match("^.+/(.+)$") if filenames[name] then b = "/usr/sbin/"..name sta = posix.stat(a) stb = posix.stat(b) print(a, sta, b, stb) if sta and not stb then print('Symlinking '..b..'->/usr/bin/'..name) posix.symlink("../bin/"..name, b) elseif not sta and stb and stb.type == "link" then target = posix.readlink(b) if target == "../bin/"..name then print('Removing', b) os.remove(b) else print('Not touching '..b..' -> '..target) end end end a = rpm.next_file() end %filetriggerpostun -p -- /sbin /usr/sbin --# This implements filesystem(unmerged-sbin-symlinks) feature. st = posix.stat("/usr/sbin") if not st or st.type == "link" then return end filenames = %sbin_filenames b = rpm.next_file() while b do name = b:match("^.+/(.+)$") print('filetriggerpostun', b) if filenames[name] then a = "/usr/bin/"..name sta = posix.stat(a) stb = posix.stat(b) if sta and not stb then print('Symlinking /usr/sbin/'..name..'->'..a) posix.symlink("../bin/"..name, "/usr/sbin/"..name) end end b = rpm.next_file() end %global merge_scriptlet %{expand: --# Symlink /usr/sbin→/usr/bin and /usr/local/sbin→/usr/local/bin if possible for _,path in pairs({"/usr/sbin", "/usr/local/sbin"}) do st = posix.stat(path) if st and st.type ~= "link" then good = true items = rpm.glob(path.."/*") for _,v in pairs(items) do --# rpm.glob() returns the original pattern if match fails :((( if v ~= path.."/*" then st = posix.stat(v) if not st then print("Could not stat "..v) else if st.type ~= "link" then print("/usr/sbin cannot be merged, found "..v) good = false break end target = posix.readlink(v) name = v:match("^.+/(.+)$") if target ~= "../bin/"..name then print("/usr/sbin cannot be merged, "..v.." points to "..target) good = false break end end end end if good then print("All files under "..path.." are symlinks; linking to ./bin...") for _,v in pairs(items) do os.remove(v) end os.remove(path) posix.symlink("bin", path) print("...done") end end end } %posttrans -p --# we need to restorecon on some dirs created in %pretrans or by other packages if posix.access ("/usr/sbin/restorecon", "x") then rpm.execute("/usr/sbin/restorecon", "/var", "/var/run", "/var/lock", "/sys", "/boot", "/dev", "/media", "/afs") rpm.execute("/usr/sbin/restorecon", "-r", "/usr/lib/debug") end %merge_scriptlet %transfiletriggerpostun -p -- /sbin /usr/sbin %merge_scriptlet %files content %dir %{_datadir}/filesystem %{_datadir}/filesystem/paths %files -f filelist %defattr(0755,root,root,0755) %dir %attr(555,root,root) / /bin /sbin %attr(555,root,root) /boot %attr(555,root,root) /afs /dev %dir /etc /etc/X11 /etc/xdg /etc/opt /etc/pm /etc/skel /etc/sysconfig /etc/keys /etc/pki /etc/bash_completion.d/ %dir /etc/rwtab.d %dir /etc/statetab.d /home /lib %ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64 /%{_lib} %endif /media %dir /mnt %dir /opt %ghost %attr(555,root,root) /proc %attr(550,root,root) /root /run /srv %ghost %attr(555,root,root) /sys %attr(1777,root,root) /tmp %dir /usr %attr(555,root,root) /usr/bin %ghost /usr/sbin /usr/games /usr/include %dir %attr(555,root,root) /usr/lib %dir /usr/lib/sysimage %dir /usr/lib/systemd /usr/lib/systemd/system /usr/lib/systemd/user %dir /usr/lib/sysusers.d %dir /usr/lib/tmpfiles.d %dir /usr/lib/locale %dir /usr/lib/modules %dir /usr/lib/debug %dir /usr/lib/debug/.dwz %ghost /usr/lib/debug/bin %ghost /usr/lib/debug/lib %ghost /usr/lib/debug/%{_lib} %ghost %dir /usr/lib/debug/usr %ghost /usr/lib/debug/usr/bin %ghost /usr/lib/debug/usr/sbin %ghost /usr/lib/debug/usr/lib %ghost /usr/lib/debug/usr/%{_lib} %ghost /usr/lib/debug/usr/.dwz %ghost /usr/lib/debug/sbin %attr(555,root,root) /usr/lib/games %ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64 %attr(555,root,root) /usr/%{_lib} %else %attr(555,root,root) /usr/lib/bpf %attr(555,root,root) /usr/lib/X11 %attr(555,root,root) /usr/lib/pm-utils %endif /usr/libexec %dir /usr/local %ghost /usr/local/sbin /usr/local/etc /usr/local/games /usr/local/include /usr/local/lib* /usr/local/share /usr/local/src %dir /usr/share /usr/share/aclocal /usr/share/appdata /usr/share/applications /usr/share/augeas /usr/share/backgrounds %dir /usr/share/bash-completion /usr/share/bash-completion/completions /usr/share/bash-completion/helpers /usr/share/desktop-directories /usr/share/dict /usr/share/doc %attr(555,root,root) %dir /usr/share/empty /usr/share/fish /usr/share/games /usr/share/gnome /usr/share/help /usr/share/icons /usr/share/idl /usr/share/info %dir /usr/share/licenses %dir /usr/share/locale %dir /usr/share/man /usr/share/metainfo /usr/share/mime-info /usr/share/misc %dir /usr/share/modulefiles /usr/share/omf /usr/share/pixmaps /usr/share/sounds /usr/share/themes /usr/share/xsessions %dir /usr/share/X11 /usr/share/X11/fonts /usr/share/wayland-sessions /usr/share/zsh /usr/src /usr/tmp %dir /var /var/adm %dir /var/cache /var/cache/bpf /var/db /var/empty /var/ftp /var/games /var/lib /var/local %ghost /var/lock /var/log /var/mail /var/nis /var/opt /var/preserve %ghost /var/run %dir /var/spool %attr(755,root,root) /var/spool/lpd %attr(775,root,mail) /var/spool/mail %attr(1777,root,root) /var/tmp /var/yp %changelog %autochangelog