tighten hooks

This commit is contained in:
Tobias Powalowski 2023-11-10 17:30:01 +01:00
parent e694de833e
commit 2e7aa1d9ec
9 changed files with 55 additions and 51 deletions

View file

@ -55,6 +55,7 @@ _run ()
_symlink /etc/systemd/system/proc-sys-fs-binfmt_misc.automount /dev/null _symlink /etc/systemd/system/proc-sys-fs-binfmt_misc.automount /dev/null
# add terminus font # add terminus font
_map _file /usr/share/terminfo/l/linux /usr/share/kbd/consolefonts/ter-v{16,32}n.psf.gz _map _file /usr/share/terminfo/l/linux /usr/share/kbd/consolefonts/ter-v{16,32}n.psf.gz
_file /usr/share/licenses/terminus-font/LICENSE
} }
# vim: set ft=sh ts=4 sw=4 et: # vim: set ft=sh ts=4 sw=4 et:

View file

@ -4,24 +4,22 @@
_run () _run ()
{ {
_map _binary mkswap badblocks debugfs dumpe2fs e2fsck e2image e2undo findfs \ _map _binary mkswap badblocks debugfs dumpe2fs e2{freefrag,fsck,image,label,mmpstatus,\
fsck logsave mkfs.ext2 resize2fs chattr lsattr e2freefrag filefrag \ scrub,scrub_all,undo} \
jfs_debugfs jfs_fsck jfs_fscklog jfs_logdump jfs_mkfs jfs_tune \ findfs fsck logsave resize2fs chattr lsattr filefrag \
mkfs.xfs xfs_copy xfs_db xfs_estimate xfs_fsr xfs_io xfs_logprint \ jfs_{debugfs,fsck,fscklog,logdump,mkfs,tune} \
xfs_mdrestore xfs_repair xfs_rtcp mkdosfs dosfsck fatlabel mount.smb3 \ xfs_{admin,bmap,copy,db,estimate,freeze,fsr,growfs,info,io,logprint,\
mount.cifs fsck.ext2 fsck.ext3 fsck.ext4 e2label tune2fs mkfs.ext3 \ metadump,mdrestore,mkfile,ncheck,quota,repair,rtcp,spaceman} \
mkfs.ext4 mke2fs fsck.jfs mkfs.jfs wipefs btrfs btrfsck btrfs-find-root \ mkdosfs dosfsck fatlabel mount.smb3 mount.cifs tune2fs mke2fs wipefs \
btrfs-image btrfs-map-logical btrfs-select-super btrfstune mkfs.nilfs2 \ btrfs btrfsck btrfs-{find-root,image,map-logical,select-super} btrfstune \
mount.nilfs2 nilfs_cleanerd cifs.idmap cifs.upcall cifscreds getcifsacl \ mount.nilfs2 nilfs_cleanerd cifs.{idmap,upcall} cifscreds getcifsacl \
setcifsacl umount.nilfs2 chcp dumpseg lscp lssu mkcp rmcp fsck.cramfs \ setcifsacl umount.nilfs2 chcp dumpseg lscp lssu mkcp rmcp \
fsck.minix fsfreeze fstrim mkfs.bfs mkfs.cramfs mkfs.minix mkfs.f2fs \ fsfreeze fstrim tune.exfat exfatlabel dump.exfat fatresize nvme dosfslabel \
fsck.exfat mkfs.exfat tune.exfat exfatlabel dump.exfat fatresize nvme \ e4{crypt,defrag} defrag.f2fs dump.f2fs f2fs{_io,crypt} fibmap.f2fs \
fsck.msdos fsck.vfat mkfs.vfat mkfs.msdos fsck.btrfs dosfslabel \ parse.f2fs resize.f2fs sload.f2fs blkmapd nfsconf nfsdcld \
e2mmpstatus e2scrub e2scrub_all e4crypt e4defrag defrag.f2fs dump.f2fs \ nfsidmap nfsv4.exportd nilfs-{clean,resize,tune} gpart compile_et mk_cmds \
f2fs_io f2fscrypt fibmap.f2fs fsck.f2fs parse.f2fs resize.f2fs sload.f2fs \ mkfs.{bfs,cramfs,exfat,ext2,ext3,ext4,f2fs,jfs,minix,msdos,nilfs2,vfat,xfs} \
blkmapd nfsconf nfsdcld nfsidmap nfsv4.exportd nilfs-clean nilfs-resize \ fsck.{btrfs,cramfs,exfat,ext2,ext3,ext4,f2fs,jfs,minix,msdos,vfat,xfs}
nilfs-tune xfs_growfs xfs_quota xfs_spaceman compile_et mk_cmds fsck.xfs \
xfs_admin xfs_bmap xfs_freeze xfs_info xfs_metadump xfs_mkfile xfs_ncheck gpart
_file /etc/nilfs_cleanerd.conf _file /etc/nilfs_cleanerd.conf
_map _full_dir /etc/{cifs-utils,request-key.d,nvme} _map _full_dir /etc/{cifs-utils,request-key.d,nvme}
# fix libinih for plasma wallpaper # fix libinih for plasma wallpaper

View file

@ -6,21 +6,22 @@ _run ()
{ {
! grep -qw 'archboot' /etc/hostname && return ! grep -qw 'archboot' /etc/hostname && return
_install_files _install_files
rm /usr/bin/{mkswap,badblocks,debugfs,dumpe2fs,e2fsck,e2image,e2undo,findfs,fsck,\ rm /usr/bin/{mkswap,badblocks,debugfs,dumpe2fs,e2{freefrag,fsck,image,label,mmpstatus,\
logsave,mkfs.ext2,resize2fs,chattr,lsattr,e2freefrag,filefrag,jfs_debugfs,jfs_fsck,\ scrub,scrub_all,undo},\
jfs_fscklog,jfs_logdump,jfs_mkfs,jfs_tune,mkfs.xfs,xfs_copy,xfs_db,xfs_estimate,\ findfs,fsck,logsave,resize2fs,chattr,lsattr,filefrag,\
xfs_fsr,xfs_io,xfs_logprint,xfs_mdrestore,xfs_repair,xfs_rtcp,mkdosfs,dosfsck,dosfslabel,\ jfs_{debugfs,fsck,fscklog,logdump,mkfs,tune},\
fatlabel,mount.smb3,mount.cifs,fsck.ext2,fsck.ext3,fsck.ext4,e2label,tune2fs,mkfs.ext3,\ xfs_{admin,bmap,copy,db,estimate,freeze,fsr,growfs,info,io,logprint,\
mkfs.ext4,mke2fs,fsck.jfs,mkfs.jfs,wipefs,btrfs-find-root,btrfs-image,btrfs-map-logical,\ metadump,mdrestore,mkfile,ncheck,quota,repair,rtcp,spaceman},\
btrfs-select-super,btrfstune,mkfs.nilfs2,mount.nilfs2,nilfs_cleanerd,cifs.upcall,cifscreds,\ mkdosfs,dosfsck,fatlabel,mount.smb3,mount.cifs,tune2fs,,mke2fs,wipefs,\
getcifsacl,setcifsacl,smb2-quota,smbinfo,umount.nilfs2,chcp,dumpseg,lscp,lssu,mkcp,rmcp,\ btrfs,btrfsck,btrfs-{find-root,image,map-logical,select-super},btrfstune,\
fsck.cramfs,fsck.minix,fsfreeze,fstrim,mkfs.bfs,mkfs.cramfs,mkfs.minix,mkfs.f2fs,fsck.exfat,\ mount.nilfs2,nilfs_cleanerd,cifs.{idmap,upcall},cifscreds,getcifsacl,\
mkfs.exfat,tune.exfat,exfatlabel,dump.exfat,fatresize,nvme,fsck.msdos,fsck.vfat,mkfs.vfat,\ setcifsacl,umount.nilfs2,chcp,dumpseg,lscp,lssu,mkcp,rmcp,\
mkfs.msdos,fsck.btrfs,e2mmpstatus,e2scrub,e2scrub_all,e4crypt,e4defrag,defrag.f2fs,dump.f2fs,\ fsfreeze,fstrim,tune.exfat,exfatlabel,dump.exfat,fatresize,nvme,dosfslabel,\
f2fs_io,f2fscrypt,fibmap.f2fs,resize.f2fs,sload.f2fs,fsck.f2fs,parse.f2fs,blkmapd,nfsconf,\ e4{crypt,defrag},defrag.f2fs,dump.f2fs,f2fs{_io,crypt},fibmap.f2fs,\
nfsdcld,nfsdclddb,nfsdclnts,nfsidmap,nfsv4.exportd,nilfs-clean,nilfs-resize,nilfs-tune,\ parse.f2fs,resize.f2fs,sload.f2fs,blkmapd,nfsconf,nfsdcld,\
xfs_growfs,xfs_quota,xfs_spaceman,compile_et,mk_cmds,fsck.xfs,xfs_admin,xfs_bmap,xfs_freeze,\ nfsidmap,nfsv4.exportd,nilfs-{clean,resize,tune},gpart,compile_et,mk_cmds,\
xfs_info,xfs_metadump,xfs_mkfile,xfs_ncheck} mkfs.{bfs,cramfs,exfat,ext2,ext3,ext4,f2fs,jfs,minix,msdos,nilfs2,vfat,xfs},\
fsck.{btrfs,cramfs,exfat,ext2,ext3,ext4,f2fs,jfs,minix,msdos,vfat,xfs}}
} }
# vim: set ft=sh ts=4 sw=4 et: # vim: set ft=sh ts=4 sw=4 et:

View file

@ -6,7 +6,6 @@ _run ()
{ {
_binary lshw _binary lshw
_map _file /usr/share/lshw/{manuf,oui,pnpid}.txt _map _file /usr/share/lshw/{manuf,oui,pnpid}.txt
_file /usr/share/lshw/pnpid.txt
} }
# vim: set ft=sh ts=4 sw=4 et: # vim: set ft=sh ts=4 sw=4 et:

View file

@ -7,15 +7,15 @@ _run ()
local symlink local symlink
### from thin-provisioning-tools ### from thin-provisioning-tools
_binary pdata_tools _binary pdata_tools
for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do for symlink in cache_{check,dump,metadata_size,repair,restore} \
thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
_symlink "/usr/bin/${symlink}" pdata_tools _symlink "/usr/bin/${symlink}" pdata_tools
done done
_map _binary lvmdump lvmconfig vgimportclone fsadm vgcfgbackup vgcfgrestore vgchange \ _map _binary fsadm lvm{dump,config,devices,polld,diskscan,sadc,sar,_import_vdo} \
vgck vgconvert vgcreate vgdisplay vgexport vgextend vgimport vgmerge vgmknodes \ vg{importclone,importdevices,cfgbackup,cfgrestore,change,ck,convert,\
vgreduce vgremove vgrename vgs vgscan vgsplit pvchange pvck pvcreate pvdisplay \ create,display,export,extend,import,merge,mknodes,reduce,remove,rename,s,scan,split} \
pvmove pvremove pvresize pvs pvscan lvchange lvconvert lvcreate lvdisplay \ pv{change,ck,create,display,move,remove,resize,s,scan} \
lvextend lvmdiskscan lvmsadc lvmsar lvreduce lvremove lvrename lvresize lvs \ lv{change,convert,create,display,extend,reduce,remove,rename,resize,s,scan}
lvscan lvm_import_vdo lvmdevices lvmpolld vgimportdevices
_map _dir /etc/lvm/{backup,archive} _map _dir /etc/lvm/{backup,archive}
_map _file /etc/lvm/lvm.conf /usr/lib/{liblvm*,systemd/system/{lvm2*,blk-availability.service,sysinit.target.wants/lvm2*}} _map _file /etc/lvm/lvm.conf /usr/lib/{liblvm*,systemd/system/{lvm2*,blk-availability.service,sysinit.target.wants/lvm2*}}
} }

View file

@ -4,9 +4,9 @@
_run () _run ()
{ {
_map _binary findssl.sh scp sftp ssh-add ssh-agent ssh-copy-id ssh-keygen ssh-keyscan sshd \ _map _binary findssl.sh scp sftp ssh-{add,agent,copy-id,keygen,keyscan} sshd \
exportfs nfsstat rpc.idmapd rpc.mountd rpc.nfsd rpc.statd rpcdebug showmount \ exportfs nfsstat rpc.{gssd,idmapd,mountd,nfsd,statd} rpcdebug showmount \
sm-notify start-statd rpc.gssd nfsdcltrack gssproxy screen tmux rsync ttyd sm-notify start-statd nfsdcltrack gssproxy screen tmux rsync ttyd
_map _file /etc/{screenrc,ssh/{ssh_config,/moduli},rsyncd.conf,exports,netconfig} \ _map _file /etc/{screenrc,ssh/{ssh_config,/moduli},rsyncd.conf,exports,netconfig} \
/usr/lib/ssh/{sftp-server,ssh-keysign,ssh-pkcs11-helper} /usr/lib/ssh/{sftp-server,ssh-keysign,ssh-pkcs11-helper}
_file_rename /etc/ssh/sshd_config /etc/ssh/sshd_config _file_rename /etc/ssh/sshd_config /etc/ssh/sshd_config
@ -25,9 +25,12 @@ _run ()
_symlink /etc/systemd/system/multi-user.target.wants/sshd.service /usr/lib/systemd/system/sshd.service _symlink /etc/systemd/system/multi-user.target.wants/sshd.service /usr/lib/systemd/system/sshd.service
# start ttyd on startup # start ttyd on startup
_file /usr/lib/libwebsockets-evlib_uv.so _file /usr/lib/libwebsockets-evlib_uv.so
_file_rename /usr/share/archboot/remote/usr/bin/remote-login.sh /usr/bin/remote-login.sh _file_rename /usr/share/archboot/remote/usr/bin/remote-login.sh \
_file_rename /usr/share/archboot/remote/etc/systemd/system/ttyd.service /etc/systemd/system/ttyd.service /usr/bin/remote-login.sh
_symlink /etc/systemd/system/multi-user.target.wants/ttyd.service /etc/systemd/system/ttyd.service _file_rename /usr/share/archboot/remote/etc/systemd/system/ttyd.service \
/etc/systemd/system/ttyd.service
_symlink /etc/systemd/system/multi-user.target.wants/ttyd.service \
/etc/systemd/system/ttyd.service
# fix licenses # fix licenses
_map _file /usr/share/licenses/{nfsidmap/LICENSE,tmux/LICENSE,ttyd/LICENSE} _map _file /usr/share/licenses/{nfsidmap/LICENSE,tmux/LICENSE,ttyd/LICENSE}
} }

View file

@ -8,7 +8,7 @@ _run ()
_map _file /etc/ssl/openssl.cnf /usr/share/licenses/sbctl/LICENSE _map _file /etc/ssl/openssl.cnf /usr/share/licenses/sbctl/LICENSE
# add mkkeys.sh, # add mkkeys.sh,
# curl -s -L -O https://www.rodsbooks.com/efi-bootloaders/mkkeys.sh # curl -s -L -O https://www.rodsbooks.com/efi-bootloaders/mkkeys.sh
# modiiied to use uuidgen instead of python # modified to use uuidgen instead of python
_file_rename /usr/bin/archboot-mkkeys.sh /usr/bin/mkkeys.sh _file_rename /usr/bin/archboot-mkkeys.sh /usr/bin/mkkeys.sh
if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then if [[ "${_RUNNING_ARCH}" == "x86_64" ]]; then
_map _file /usr/share/archboot/bootloader/{shimx64.efi,mmx64.efi,mmia32.efi,shimia32.efi} _map _file /usr/share/archboot/bootloader/{shimx64.efi,mmx64.efi,mmia32.efi,shimia32.efi}

View file

@ -6,13 +6,15 @@ _run ()
{ {
_full_dir /usr/share/kbd _full_dir /usr/share/kbd
#add kbd binaries #add kbd binaries
_map _binary dumpkeys kbd_mode chvt deallocvt fgconsole getkeycodes kbdinfo kbdrate loadunimap mapscrn openvt psfaddtable psfgettable psfstriptable psfxtable setkeycodes setleds setmetamode setvtrgb showconsolefont showkey unicode_start unicode_stop vlock _map _binary dumpkeys kbd_mode chvt deallocvt fgconsole getkeycodes kbdinfo \
kbdrate loadunimap mapscrn openvt psfaddtable psfgettable psfstriptable \
psfxtable setkeycodes setleds setmetamode setvtrgb showconsolefont \
showkey unicode_start unicode_stop vlock
# only add resizecons on x86_64 # only add resizecons on x86_64
[[ "${_RUNNING_ARCH}" == "x86_64" ]] && _binary resizecons [[ "${_RUNNING_ARCH}" == "x86_64" ]] && _binary resizecons
# add fbset # add fbset
_binary fbset _binary fbset
_file /etc/fb.modes _file /etc/fb.modes
_file /usr/share/licenses/terminus-font/LICENSE
} }
# vim: set ft=sh ts=4 sw=4 et: # vim: set ft=sh ts=4 sw=4 et:

View file

@ -6,7 +6,7 @@ _run ()
{ {
# start iwd service # start iwd service
_symlink /etc/systemd/system/multi-user.target.wants/iwd.service /usr/lib/systemd/system/iwd.service _symlink /etc/systemd/system/multi-user.target.wants/iwd.service /usr/lib/systemd/system/iwd.service
_map _binary iw set-wireless-regdom rfkill hwsim iwctl iwmon set-wireless-regdom _map _binary iw set-wireless-regdom rfkill hwsim iwctl iwmon
# add iwd and ead daemon # add iwd and ead daemon
_map _binary /usr/lib/iwd/{iwd,ead} _map _binary /usr/lib/iwd/{iwd,ead}
# add hwsim helper script # add hwsim helper script