Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: usrmerge /usr/sbin packages that had prior merges #44098

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

a-crate
Copy link
Member

@a-crate a-crate commented Feb 28, 2025

Same as #43122, but these packages had prior usr merges (either /bin or /sbin)

@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch from 55332d2 to 8a60aa1 Compare February 28, 2025 01:12
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch 4 times, most recently from 839e78e to 4d63d89 Compare March 4, 2025 00:09
@a-crate
Copy link
Member Author

a-crate commented Mar 4, 2025

Missing busybox

@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch 3 times, most recently from 4009e25 to d4a3a5d Compare March 4, 2025 20:58
@a-crate a-crate added the approved-to-run A repo member has approved this external contribution label Mar 4, 2025
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch from d4a3a5d to 477c856 Compare March 4, 2025 21:15
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Mar 4, 2025
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch 2 times, most recently from 0828995 to 0eaf22b Compare March 4, 2025 23:30
@a-crate
Copy link
Member Author

a-crate commented Mar 4, 2025

Pulling changes that need coreutils as a build or test dependency into here.

@a-crate a-crate mentioned this pull request Mar 4, 2025
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch from 0eaf22b to ff37d2b Compare March 4, 2025 23:37
Copy link
Contributor

octo-sts bot commented Mar 5, 2025

⚠️ EXPERIMENTAL

Please use 👍 or 👎 on this comment to indicate if you agree or disagree with the recommendation.

To provide more detailed feedback please comment on the recommendation prefixed with /ai-verify:

e.g. /ai-verify partially helpful but I also added bash to the build environment

Gen AI suggestions to solve the build error:

Based on the error output, here's my analysis and solution:

• Detected Error: "chgrp: cannot access '/home/build/melange-out/postfix/usr/bin/postdrop': No such file or directory"

• Error Category: Build Configuration

• Failure Point: Post-installation file permission setting

• Root Cause Analysis: The build is failing because it's trying to set group permissions on postdrop in /usr/bin, but the files are actually being installed in /usr/sbin during the build process.

• Suggested Fix:
Update the file path in the pipeline section where the permissions are being set:

pipeline:
  - runs: |
      # Change this line:
      # for i in postdrop postqueue; do
      #   chgrp postdrop "${{targets.contextdir}}"/usr/bin/$i
      #   chmod g+s "${{targets.contextdir}}"/usr/bin/$i
      # done

      # To this:
      for i in postdrop postqueue; do
        chgrp postdrop "${{targets.contextdir}}"/usr/sbin/$i
        chmod g+s "${{targets.contextdir}}"/usr/sbin/$i
      done

• Explanation:
Postfix installs its binaries to /usr/sbin by default, not /usr/bin. The error occurs because the build script is looking for the files in the wrong directory. The fix updates the path to match where the files are actually being installed.

• Additional Notes:

  1. The warning about master.cf is expected during the build process and can be ignored
  2. The installation correctly places the binaries in /usr/sbin as shown in the build output
  3. This matches Postfix's standard installation practice for system binaries

• References:

@octo-sts octo-sts bot added the ai/skip-comment Stop AI from commenting on PR label Mar 5, 2025
Copy link
Contributor

octo-sts bot commented Mar 5, 2025

⚠️ EXPERIMENTAL

Please use 👍 or 👎 on this comment to indicate if you agree or disagree with the recommendation.

To provide more detailed feedback please comment on the recommendation prefixed with /ai-verify:

e.g. /ai-verify partially helpful but I also added bash to the build environment

Gen AI suggestions to solve the build error:

Based on the error output, I can provide a specific analysis and solution:

• Detected Error: "chgrp: cannot access '/home/build/melange-out/postfix/usr/bin/postdrop': No such file or directory"

• Error Category: Build Configuration

• Failure Point: Post-installation file permission setting

• Root Cause Analysis: The build is failing because it's trying to set group permissions on postdrop in /usr/bin, but the files are actually being installed in /usr/sbin instead. This is due to Postfix's default installation paths.

• Suggested Fix:
Modify the permission setting command in the pipeline to use the correct path:

pipeline:
  - runs: |
      # Earlier build steps...
      
      # Update this section
      for i in postdrop postqueue; do
         chgrp postdrop "${{targets.contextdir}}"/usr/sbin/$i
         chmod g+s "${{targets.contextdir}}"/usr/sbin/$i
      done

• Explanation:

  • Postfix by default installs its binaries in /usr/sbin rather than /usr/bin
  • The current script is looking in the wrong directory
  • The fix updates the path to match Postfix's actual installation location
  • This matches Postfix's standard installation layout as documented in their INSTALL guide

• Additional Notes:

  • The warning about master.cf not existing is expected during initial installation
  • You may want to add a check to ensure the target directory exists before attempting to set permissions
  • Consider adding error handling around the chgrp commands

• References:

@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch 3 times, most recently from 75a0181 to 46e258f Compare March 5, 2025 01:05
@zmarano zmarano force-pushed the merged-sbin-with-prior-merges branch from 46e258f to 66bbd2b Compare March 5, 2025 01:42
a-crate added 3 commits March 4, 2025 17:48
Signed-off-by: Amelia Crate <[email protected]>
Signed-off-by: Amelia Crate <[email protected]>
Signed-off-by: Amelia Crate <[email protected]>
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch from 66bbd2b to ab64fef Compare March 5, 2025 02:20
Signed-off-by: Amelia Crate <[email protected]>
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch from ab64fef to e055afb Compare March 5, 2025 02:34
@a-crate a-crate force-pushed the merged-sbin-with-prior-merges branch from e055afb to a098b6b Compare March 5, 2025 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/skip-comment Stop AI from commenting on PR approved-to-run A repo member has approved this external contribution bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants