** Changed in: linux (Ubuntu Focal) Status: New => In Progress ** Changed in: linux (Ubuntu Jammy) Status: New => In Progress
** Changed in: linux (Ubuntu Lunar) Status: New => In Progress ** Changed in: linux (Ubuntu Mantic) Status: New => In Progress ** Changed in: linux (Ubuntu Noble) Status: New => In Progress -- 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: In Progress Status in linux source package in Focal: In Progress Status in linux source package in Jammy: In Progress Status in linux source package in Lunar: In Progress Status in linux source package in Mantic: In Progress Status in linux source package in Noble: In Progress Bug description: SRU Justification: [Impact] 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 [Fix] Generate chmod commands first. And when generating chmod -x command, first check if the file has been deleted. If yes, no need for a chmod command. [Test Plan] It was tested for cycle sru 2023.10.30 for mantic,lunar,jammy and focal and it reconstruct script looked correct. [Other Info] 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