[Debian] autoreconstruct - Do not generate chmod -x for deleted files
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
linux (Ubuntu) | Status tracked in Noble | |||||
Focal |
Fix Released
|
Medium
|
Roxana Nicolescu | |||
Jammy |
Fix Released
|
Medium
|
Roxana Nicolescu | |||
Lunar |
Fix Committed
|
Medium
|
Roxana Nicolescu | |||
Mantic |
Fix Released
|
Medium
|
Roxana Nicolescu | |||
Noble |
Fix Released
|
Medium
|
Roxana Nicolescu |
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-
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/
"chmod: cannot access 'scripts/
because `rm -f` and `chmod -x` command were generated.
description: | updated |
Changed in linux (Ubuntu Focal): | |
assignee: | nobody → Roxana Nicolescu (roxanan) |
Changed in linux (Ubuntu Jammy): | |
assignee: | nobody → Roxana Nicolescu (roxanan) |
Changed in linux (Ubuntu Lunar): | |
assignee: | nobody → Roxana Nicolescu (roxanan) |
Changed in linux (Ubuntu Mantic): | |
assignee: | nobody → Roxana Nicolescu (roxanan) |
Changed in linux (Ubuntu Noble): | |
assignee: | nobody → 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 |
description: | updated |
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 |
Changed in linux (Ubuntu Focal): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Jammy): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Lunar): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Mantic): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Noble): | |
status: | In Progress → Fix Committed |
This bug is awaiting verification that the linux/5.4.0-171.189 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification- needed- focal-linux' to 'verification- done-focal- linux'. If the problem still exists, change the tag 'verification- needed- focal-linux' to 'verification- failed- focal-linux' .
If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.
See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Thank you!