Я использую инструмент CPack для генерации пакета .deb, код выглядит примерно так:
install(DIRECTORY
${SDE}/pkgsrc/p4-build
${SDE}/pkgsrc/p4-examples
USE_SOURCE_PERMISSIONS
DESTINATION pkgsrc)
Но когда я устанавливаю сгенерированный пакет, он всегда выдает ошибку: такого файла или каталога нет.
root@8383b42774d5:/sde# dpkg -i bf-sde-9.0.0-amd64.deb
(Reading database ... 6600 files and directories currently installed.)
Preparing to unpack bf-sde-9.0.0-amd64.deb ...
Unpacking bf-sde (9.0.0) ...
dpkg: error processing archive bf-sde-9.0.0-amd64.deb (--install):
unable to create '/root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/common/headers.p4.dpkg-new' (while processing './root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/common/headers.p4'): No such file or directory
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
bf-sde-9.0.0-amd64.deb
root@8383b42774d5:/sde# dpkg --contents bf-sde-9.0.0-amd64.deb | grep tna_action_profile
-rw-r--r-- root/root 1431 2020-03-24 09:14 ./root/bf-sde/install/share/p4/targets/tofino/tna_action_profile.conf
drwxr-xr-x root/root 0 2020-03-24 09:51 ./root/bf-sde/install/share/tofinopd/tna_action_profile/
-rw-r--r-- root/root 107083 2020-03-24 09:14 ./root/bf-sde/install/share/tofinopd/tna_action_profile/bf-rt.json
drwxr-xr-x root/root 0 2020-03-24 09:51 ./root/bf-sde/install/share/tofinopd/tna_action_profile/pipe/
-rw-r--r-- root/root 517723 2020-03-24 09:14 ./root/bf-sde/install/share/tofinopd/tna_action_profile/pipe/context.json
-rw-r--r-- root/root 1340832 2020-03-24 09:14 ./root/bf-sde/install/share/tofinopd/tna_action_profile/pipe/tofino.bin
-rw-r--r-- root/root 1431 2020-03-24 09:14 ./root/bf-sde/install/share/tofinopd/tna_action_profile/tna_action_profile.conf
drwxrwxr-x root/root 0 2020-03-24 09:52 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/
-rw-rw-r-- root/root 500 2019-09-07 23:14 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/README.md
-rw-rw-r-- root/root 0 2019-09-07 23:23 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/__init__.py
lrwxrwxrwx root/root 0 2020-03-24 09:52 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/common -> ../common
-rw-rw-r-- root/root 3675 2019-09-07 23:23 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/common/headers.p4
-rw-rw-r-- root/root 2945 2019-09-07 23:23 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/common/util.p4
-rw-rw-r-- root/root 15002 2019-09-07 23:23 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/test.py
-rw-rw-r-- root/root 5916 2019-09-07 23:23 ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/tna_action_profile.p4
Кстати, этот каталог ./root/bf-sde/pkgsrc/p4-examples/p4_16_programs/tna_action_profile/common
является символом c Ссылка.