I have a package with the a few file triggers:
```console
$ rpm -q --filetriggers filesystem|grep -w using -A1
filetriggerin scriptlet (using <lua>) -- /usr/bin
print('FILETRIGGERIN start')
--
filetriggerpostun scriptlet (using <lua>) -- /usr/bin
print('FILETRIGGERPOSTUN /usr/bin start')
--
filetriggerpostun scriptlet (using <lua>) -- /sbin, /usr/sbin
print('FILETRIGGERPOSTUN /usr/sbin start')
--
transfiletriggerpostun scriptlet (using <lua>) -- /sbin, /usr/sbin
print('TRANSFILETRIGGERPOSTUN start')
```
The two last triggers are for the same paths, so if one fires, the other must 
too, right?

```console
$ ls -l $(find /usr/sbin/ -type f)
-rwxr-xr-x. 1 root root   45080 Jan 24 01:00 /usr/sbin/kpartx
-rwxr-xr-x. 1 root root 2792336 Feb 27 01:00 /usr/sbin/pdata_tools

$ sudo rpm --reinstall -v 
device-mapper-persistent-data-1.0.12-1.fc41.x86_64.rpm 
kpartx-0.9.7-7.fc41.x86_64.rpm
Verifying packages...
Preparing packages...
kpartx-0.9.7-7.fc41.x86_64
FILETRIGGERIN start
filetriggerin   /usr/bin/kpartx
/usr/bin/kpartx table: 0x5645ad5fa110   /usr/sbin/kpartx        table: 
0x5645ad5fa180
FILETRIGGERIN end
device-mapper-persistent-data-1.0.12-1.fc41.x86_64
FILETRIGGERIN start
filetriggerin   /usr/bin/cache_check
/usr/bin/cache_check    table: 0x5645ad5e8410   /usr/sbin/cache_check   table: 
0x5645ad5e8500
filetriggerin   /usr/bin/cache_dump
/usr/bin/cache_dump     table: 0x5645ad5ae380   /usr/sbin/cache_dump    table: 
0x5645ad885bf0
filetriggerin   /usr/bin/cache_metadata_size
/usr/bin/cache_metadata_size    table: 0x5645b1132300   
/usr/sbin/cache_metadata_size   table: 0x5645ad5f7710
filetriggerin   /usr/bin/cache_repair
/usr/bin/cache_repair   table: 0x5645ad5f9e70   /usr/sbin/cache_repair  table: 
0x5645ad5f9eb0
filetriggerin   /usr/bin/cache_restore
/usr/bin/cache_restore  table: 0x5645b11321b0   /usr/sbin/cache_restore table: 
0x5645b11321f0
filetriggerin   /usr/bin/cache_writeback
/usr/bin/cache_writeback        table: 0x5645ad668690   
/usr/sbin/cache_writeback       table: 0x5645ad6686d0
filetriggerin   /usr/bin/era_check
/usr/bin/era_check      table: 0x5645ad653d30   /usr/sbin/era_check     table: 
0x5645ad653d70
filetriggerin   /usr/bin/era_dump
/usr/bin/era_dump       table: 0x5645ad6541d0   /usr/sbin/era_dump      table: 
0x5645ad654210
filetriggerin   /usr/bin/era_invalidate
/usr/bin/era_invalidate table: 0x5645ad5f5670   /usr/sbin/era_invalidate        
table: 0x5645ad5f56b0
filetriggerin   /usr/bin/era_restore
/usr/bin/era_restore    table: 0x5645ad5f5b10   /usr/sbin/era_restore   table: 
0x5645ad5f5b50
filetriggerin   /usr/bin/pdata_tools
/usr/bin/pdata_tools    table: 0x5645b10ab510   /usr/sbin/pdata_tools   table: 
0x5645b10ab550
filetriggerin   /usr/bin/thin_check
/usr/bin/thin_check     table: 0x5645b10ab9b0   /usr/sbin/thin_check    table: 
0x5645b10ab9f0
filetriggerin   /usr/bin/thin_delta
/usr/bin/thin_delta     table: 0x5645b10abe50   /usr/sbin/thin_delta    table: 
0x5645b10abe90
filetriggerin   /usr/bin/thin_dump
/usr/bin/thin_dump      table: 0x5645ad658530   /usr/sbin/thin_dump     table: 
0x5645ad658570
filetriggerin   /usr/bin/thin_ls
/usr/bin/thin_ls        table: 0x5645ad6589d0   /usr/sbin/thin_ls       table: 
0x5645ad658a10
filetriggerin   /usr/bin/thin_metadata_pack
/usr/bin/thin_metadata_pack     table: 0x5645ad658e70   
/usr/sbin/thin_metadata_pack    table: 0x5645ad658eb0
filetriggerin   /usr/bin/thin_metadata_size
/usr/bin/thin_metadata_size     table: 0x5645ad8b67c0   
/usr/sbin/thin_metadata_size    table: 0x5645ad8b6800
filetriggerin   /usr/bin/thin_metadata_unpack
/usr/bin/thin_metadata_unpack   table: 0x5645ad8b6c60   
/usr/sbin/thin_metadata_unpack  table: 0x5645ad8b6ca0
filetriggerin   /usr/bin/thin_repair
/usr/bin/thin_repair    table: 0x5645ad8b7100   /usr/sbin/thin_repair   table: 
0x5645ad8b7140
filetriggerin   /usr/bin/thin_restore
/usr/bin/thin_restore   table: 0x5645ad8b75a0   /usr/sbin/thin_restore  table: 
0x5645ad8b75e0
filetriggerin   /usr/bin/thin_rmap
/usr/bin/thin_rmap      table: 0x5645ad8b7a40   /usr/sbin/thin_rmap     table: 
0x5645ad8b7a80
filetriggerin   /usr/bin/thin_trim
/usr/bin/thin_trim      table: 0x5645ad8b7ee0   /usr/sbin/thin_trim     table: 
0x5645ad8b7f20
FILETRIGGERIN end
kpartx-0.9.7-7.fc41.x86_64
FILETRIGGERPOSTUN /usr/sbin start
filetriggerpostun       /usr/sbin/kpartx
/usr/bin/kpartx table: 0x5645ad654430   /usr/sbin/kpartx        nil
Symlinking /usr/sbin/kpartx->/usr/bin/kpartx
FILETRIGGERPOSTUN /usr/sbin stop
device-mapper-persistent-data-1.0.12-1.fc41.x86_64
FILETRIGGERPOSTUN /usr/sbin start
filetriggerpostun       /usr/sbin/cache_check
/usr/bin/cache_check    table: 0x5645ad83c6b0   /usr/sbin/cache_check   nil
Symlinking /usr/sbin/cache_check->/usr/bin/cache_check
filetriggerpostun       /usr/sbin/cache_dump
/usr/bin/cache_dump     table: 0x5645ad556110   /usr/sbin/cache_dump    nil
Symlinking /usr/sbin/cache_dump->/usr/bin/cache_dump
filetriggerpostun       /usr/sbin/cache_metadata_size
/usr/bin/cache_metadata_size    table: 0x5645ad5ae380   
/usr/sbin/cache_metadata_size   nil
Symlinking /usr/sbin/cache_metadata_size->/usr/bin/cache_metadata_size
filetriggerpostun       /usr/sbin/cache_repair
/usr/bin/cache_repair   table: 0x5645ad8b7c50   /usr/sbin/cache_repair  nil
Symlinking /usr/sbin/cache_repair->/usr/bin/cache_repair
filetriggerpostun       /usr/sbin/cache_restore
/usr/bin/cache_restore  table: 0x5645ad652120   /usr/sbin/cache_restore nil
Symlinking /usr/sbin/cache_restore->/usr/bin/cache_restore
filetriggerpostun       /usr/sbin/cache_writeback
/usr/bin/cache_writeback        table: 0x5645ad885bf0   
/usr/sbin/cache_writeback       nil
Symlinking /usr/sbin/cache_writeback->/usr/bin/cache_writeback
filetriggerpostun       /usr/sbin/era_check
/usr/bin/era_check      table: 0x5645ad5fa230   /usr/sbin/era_check     nil
Symlinking /usr/sbin/era_check->/usr/bin/era_check
filetriggerpostun       /usr/sbin/era_dump
/usr/bin/era_dump       table: 0x5645ad5fa0a0   /usr/sbin/era_dump      nil
Symlinking /usr/sbin/era_dump->/usr/bin/era_dump
filetriggerpostun       /usr/sbin/era_invalidate
/usr/bin/era_invalidate table: 0x5645ad60f8a0   /usr/sbin/era_invalidate        
nil
Symlinking /usr/sbin/era_invalidate->/usr/bin/era_invalidate
filetriggerpostun       /usr/sbin/era_restore
/usr/bin/era_restore    table: 0x5645b1132300   /usr/sbin/era_restore   nil
Symlinking /usr/sbin/era_restore->/usr/bin/era_restore
filetriggerpostun       /usr/sbin/pdata_tools
/usr/bin/pdata_tools    table: 0x5645ad8b7ea0   /usr/sbin/pdata_tools   nil
Symlinking /usr/sbin/pdata_tools->/usr/bin/pdata_tools
filetriggerpostun       /usr/sbin/thin_check
/usr/bin/thin_check     table: 0x5645ad5fb1f0   /usr/sbin/thin_check    nil
Symlinking /usr/sbin/thin_check->/usr/bin/thin_check
filetriggerpostun       /usr/sbin/thin_delta
/usr/bin/thin_delta     table: 0x5645ad8b72c0   /usr/sbin/thin_delta    nil
Symlinking /usr/sbin/thin_delta->/usr/bin/thin_delta
filetriggerpostun       /usr/sbin/thin_dump
/usr/bin/thin_dump      table: 0x5645ad8b7460   /usr/sbin/thin_dump     nil
Symlinking /usr/sbin/thin_dump->/usr/bin/thin_dump
filetriggerpostun       /usr/sbin/thin_ls
/usr/bin/thin_ls        table: 0x5645ad8b84a0   /usr/sbin/thin_ls       nil
Symlinking /usr/sbin/thin_ls->/usr/bin/thin_ls
filetriggerpostun       /usr/sbin/thin_metadata_pack
/usr/bin/thin_metadata_pack     table: 0x5645ad8b8730   
/usr/sbin/thin_metadata_pack    nil
Symlinking /usr/sbin/thin_metadata_pack->/usr/bin/thin_metadata_pack
filetriggerpostun       /usr/sbin/thin_metadata_size
/usr/bin/thin_metadata_size     table: 0x5645ad8ca500   
/usr/sbin/thin_metadata_size    nil
Symlinking /usr/sbin/thin_metadata_size->/usr/bin/thin_metadata_size
filetriggerpostun       /usr/sbin/thin_metadata_unpack
/usr/bin/thin_metadata_unpack   table: 0x5645ad8c1230   
/usr/sbin/thin_metadata_unpack  nil
Symlinking /usr/sbin/thin_metadata_unpack->/usr/bin/thin_metadata_unpack
filetriggerpostun       /usr/sbin/thin_repair
/usr/bin/thin_repair    table: 0x5645ad668520   /usr/sbin/thin_repair   nil
Symlinking /usr/sbin/thin_repair->/usr/bin/thin_repair
filetriggerpostun       /usr/sbin/thin_restore
/usr/bin/thin_restore   table: 0x5645ad8ca580   /usr/sbin/thin_restore  nil
Symlinking /usr/sbin/thin_restore->/usr/bin/thin_restore
filetriggerpostun       /usr/sbin/thin_rmap
/usr/bin/thin_rmap      table: 0x5645ad653d90   /usr/sbin/thin_rmap     nil
Symlinking /usr/sbin/thin_rmap->/usr/bin/thin_rmap
filetriggerpostun       /usr/sbin/thin_trim
/usr/bin/thin_trim      table: 0x5645ad6540c0   /usr/sbin/thin_trim     nil
Symlinking /usr/sbin/thin_trim->/usr/bin/thin_trim
FILETRIGGERPOSTUN /usr/sbin stop

$ ls -l /usr/sbin/kpartx  /usr/sbin/pdata_tools
lrwxrwxrwx. 1 root root 13 Apr 18 12:35 /usr/sbin/kpartx -> ../bin/kpartx
lrwxrwxrwx. 1 root root 18 Apr 18 12:35 /usr/sbin/pdata_tools -> 
../bin/pdata_tools
```

As you can see, the TRANSFILETRIGGERPOSTUN is not called, even tough 
`/usr/sbin/{kpartx,pdata_tools}` have been uninstalled and replaced by symlinks 
generated by FILETRIGGERPOSTUN.

I don't have a very simple reproducer for this, but I snapshotted the VM before 
running the commands above, so I can reproduce them fairly easily.

Packages:
https://download.copr.fedorainfracloud.org/results/zbyszek/merged-sbin/fedora-rawhide-x86_64/07286085-rpm/rpm-4.19.1.1-2.fc41.x86_64.rpm
https://download.copr.fedorainfracloud.org/results/zbyszek/merged-sbin/fedora-rawhide-x86_64/07320547-filesystem/filesystem-3.18-10.fc41.x86_64.rpm
https://download.copr.fedorainfracloud.org/results/zbyszek/merged-sbin/fedora-rawhide-x86_64/07324173-device-mapper-persistent-data/device-mapper-persistent-data-1.0.12-1.fc41.x86_64.rpm
https://download.copr.fedorainfracloud.org/results/zbyszek/merged-sbin/fedora-rawhide-x86_64/07322269-device-mapper-multipath/kpartx-0.9.7-7.fc41.x86_64.rpm

The issue also occurs with dnf. I repeated the process with rpm to make sure 
that dnf is not suppressing scriptlet output or otherwise interfering. rpm is 
patched to have %_sbindir==/usr/bin, but I hope this doesn't affect scriptlets 
;)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3048
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to