Public bug reported: Debian source format 1.0 cannot remove files, create symlinks and change permission in the .diff.gz tarball. Therefore any changes in these 3 categories cannot be represented without any tricks. To solve this, the `reconstruct` script is used every time we build the source package. The script is generated by `gen-auto-reconstruct` script during `cranky close`. It checks if there has been any changes in the 3 categories mentioned above between the upstream version (i.e v6.5) and the current one. The problem with the script is that in case a file A was removed since the upstream version was released, the `reconstruct` script will contains these commands in this exact order: rm -f A chmod -x A The second command will fail because file A does not exist anymore. This is solved by generating the `chmod +/-x` commands before `rm`. Which results in: chmod -x A rm -f A But because the reconstruct script is used during `clean` rule which is triggered pretty much during every cranky step which is run in the source repo, the first command will always file because file A is not present anymore in the tree. To solved this, any `chmod` change is added only if the file has not been deleted. Therefore if file A has been deleted, the `reconstruct` script will contain only this: rm -f A
Note: an example of this is #lp2038611 where `script/is_rust_module.sh` was removed, but we keep seeing "chmod: cannot access 'scripts/is_rust_module.sh': No such file or directory" because `rm -f` and `chmod -x` command were generated. ** Affects: linux (Ubuntu) Importance: Medium Assignee: Roxana Nicolescu (roxanan) Status: New ** Affects: linux (Ubuntu Focal) Importance: Medium Assignee: Roxana Nicolescu (roxanan) Status: New ** Affects: linux (Ubuntu Jammy) Importance: Medium Assignee: Roxana Nicolescu (roxanan) Status: New ** Affects: linux (Ubuntu Lunar) Importance: Medium Assignee: Roxana Nicolescu (roxanan) Status: New ** Affects: linux (Ubuntu Mantic) Importance: Medium Assignee: Roxana Nicolescu (roxanan) Status: New ** Affects: linux (Ubuntu Noble) Importance: Medium Assignee: Roxana Nicolescu (roxanan) Status: New ** Also affects: linux (Ubuntu Focal) Importance: Undecided Status: New ** Also affects: linux (Ubuntu Mantic) Importance: Undecided Status: New ** Also affects: linux (Ubuntu Noble) Importance: Undecided Status: New ** Also affects: linux (Ubuntu Jammy) Importance: Undecided Status: New ** Also affects: linux (Ubuntu Lunar) Importance: Undecided Status: New ** Description changed: - Debian source format 1.0 cannot remove files, create symlinks and change permission in the .diff.gz tarball. Therefore any changes in these 3 categories cannot be represented without any tricks. To solve this, the `reconstruct` script is used every time we build the source package. The script is generated by `gen-auto-reconstruct` script during `cranky close`. It checks if there has been any changes in the 3 categories mentioned above between the upstream version (i.e v6.5) and the current one. The problem with the script is that in case a file A was removed since the upstream version was released, the `reconstruct` script will contains these commands in this exact order: - rm -f A - chmod -x A + rm -f A + chmod -x A The second command will fail because file A does not exist anymore. This is solved by generating the `chmod +/-x` commands before `rm`. Which results in: - chmod -x A - rm -f A + chmod -x A + rm -f A But because the reconstruct script is used during `clean` rule which is triggered pretty much during every cranky step which is run in the source repo, the first command will always file because file A is not present anymore in the tree. To solved this, any `chmod` change is added only if the file has not been deleted. Therefore if file A has been deleted, the `reconstruct` script will contain only this: - rm -f A + rm -f A - Note: an example of this is #lp + Note: an example of this is #lp2038611 where `script/is_rust_module.sh` was removed, but we keep seeing + "chmod: cannot access 'scripts/is_rust_module.sh': No such file or directory" + because `rm -f` and `chmod -x` command were generated. ** Changed in: linux (Ubuntu Focal) Assignee: (unassigned) => Roxana Nicolescu (roxanan) ** Changed in: linux (Ubuntu Jammy) Assignee: (unassigned) => Roxana Nicolescu (roxanan) ** Changed in: linux (Ubuntu Lunar) Assignee: (unassigned) => Roxana Nicolescu (roxanan) ** Changed in: linux (Ubuntu Mantic) Assignee: (unassigned) => Roxana Nicolescu (roxanan) ** Changed in: linux (Ubuntu Noble) Assignee: (unassigned) => Roxana Nicolescu (roxanan) ** Changed in: linux (Ubuntu Focal) Importance: Undecided => Medium ** Changed in: linux (Ubuntu Jammy) Importance: Undecided => Medium ** Changed in: linux (Ubuntu Lunar) Importance: Undecided => Medium ** Changed in: linux (Ubuntu Mantic) Importance: Undecided => Medium ** Changed in: linux (Ubuntu Noble) Importance: Undecided => Medium -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/2045562 Title: [Debian] autoreconstruct - Do not generate chmod -x for deleted files Status in linux package in Ubuntu: New Status in linux source package in Focal: New Status in linux source package in Jammy: New Status in linux source package in Lunar: New Status in linux source package in Mantic: New Status in linux source package in Noble: New Bug description: Debian source format 1.0 cannot remove files, create symlinks and change permission in the .diff.gz tarball. Therefore any changes in these 3 categories cannot be represented without any tricks. To solve this, the `reconstruct` script is used every time we build the source package. The script is generated by `gen-auto-reconstruct` script during `cranky close`. It checks if there has been any changes in the 3 categories mentioned above between the upstream version (i.e v6.5) and the current one. The problem with the script is that in case a file A was removed since the upstream version was released, the `reconstruct` script will contains these commands in this exact order: rm -f A chmod -x A The second command will fail because file A does not exist anymore. This is solved by generating the `chmod +/-x` commands before `rm`. Which results in: chmod -x A rm -f A But because the reconstruct script is used during `clean` rule which is triggered pretty much during every cranky step which is run in the source repo, the first command will always file because file A is not present anymore in the tree. To solved this, any `chmod` change is added only if the file has not been deleted. Therefore if file A has been deleted, the `reconstruct` script will contain only this: rm -f A Note: an example of this is #lp2038611 where `script/is_rust_module.sh` was removed, but we keep seeing "chmod: cannot access 'scripts/is_rust_module.sh': No such file or directory" because `rm -f` and `chmod -x` command were generated. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2045562/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp