You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GPG signing_service script corrupts my InRelease and Release.gpg. files #1245
I encounter a "File exists" error. To bypass this, I added the --yes parameter to the GPG commands to force the signing. While this resolves the error, it causes unexpected changes in the InRelease file:
The "Codename" and "Suite" values are altered to "trixie".
The InRelease file becomes unusable because the package paths are modified or missing compared to a correctly generated InRelease file.
I am stumped. The signing service is meant to just take whatever Pulp hands to it and sign it. It cannot alter anything (like Suite or Codename). This suggests that the wrong release file is being passed in. Or else the wrong release file is being collected after the signing. The signing and writing of the signed InRelease should all happen in a temporary folder, so I don't understand how there can already be a file there to get the "File exists" error. Maybe generating temporary directories is somehow broken.
Could you extend your script to write the contents of "${PULP_TEMP_WORKING_DIR}" and perhaps "${INLINE_SIGNATURE_PATH}" to a file somewhere so we can check if they contain something sane?
I did, the ${PULP_TEMP_WORKING_DIR} is /var/lib/pulp, I have tried using literal temporary directories, without success.
"${INLINE_SIGNATURE_PATH}" returns the right path however, the data is altered with this at the top :
Suite: trixie
Codename: trixie
Even tho it should be :
Suite: stable
Codename: default
Based on my Release that I create with a POST to this endpoint : /pulp/api/v3/content/deb/releases/
with this data
data = {"codename": codename,
"suite": suite,
"distribution": distribution}
If I don't sign, I have the right Suite and Codename, no problems at all.
If I do sign, I get an altered InRelease
I would get these errors after an apt update :
default InRelease' changed its 'Suite' value from 'stable' to 'trixie'
default InRelease' changed its 'Codename' value from 'default' to 'trixie'
I also tried to do a fresh install of pulp/pulp on the new version and I still get the same errors.
We are explicitly creating a random sub-folder within whatever the base-path is. This does explain your issue. If for some reason your instance is always signing directly in /var/lib/pulp then there will already be files there from previous publish tasks, and if those files are incorrectly used from another publish then that explains why you have InRelease files with the wrong "Codename" and "Suite" values: They are simply the wrong InRelease files for that publish.
The question is how can this be happening? Looking at the code I have no ideas. @hstct Do you have any ideas?
In order to comment on what Suite/Codename you should or shouldn't be seeing, I would need to know what repo you are syncing (remote options). You have already posted your publication options above, so I already have those.
Activity
quba42 commentedon Feb 27, 2025
What does "Try to use the signing service to sign a deb package" mean?
What commands are you actually using to create your Pulp publication that results in the error?
Mav-Joel commentedon Feb 27, 2025
I'm using the PULP API via requests in Python, So I do POST to this endpoint : "/pulp/api/v3/publications/deb/apt/"
with these parameters :
data = {
"structured": "true",
"repository": repository_href,
"signing_service": signing_service_href
}
quba42 commentedon Feb 27, 2025
I am stumped. The signing service is meant to just take whatever Pulp hands to it and sign it. It cannot alter anything (like Suite or Codename). This suggests that the wrong release file is being passed in. Or else the wrong release file is being collected after the signing. The signing and writing of the signed InRelease should all happen in a temporary folder, so I don't understand how there can already be a file there to get the "File exists" error. Maybe generating temporary directories is somehow broken.
Could you extend your script to write the contents of
"${PULP_TEMP_WORKING_DIR}"and perhaps"${INLINE_SIGNATURE_PATH}"to a file somewhere so we can check if they contain something sane?Mav-Joel commentedon Feb 27, 2025
I did, the ${PULP_TEMP_WORKING_DIR} is /var/lib/pulp, I have tried using literal temporary directories, without success.
"${INLINE_SIGNATURE_PATH}" returns the right path however, the data is altered with this at the top :
Suite: trixie
Codename: trixie
Even tho it should be :
Suite: stable
Codename: default
Based on my Release that I create with a POST to this endpoint : /pulp/api/v3/content/deb/releases/
with this data
data = {"codename": codename,
"suite": suite,
"distribution": distribution}
If I don't sign, I have the right Suite and Codename, no problems at all.
If I do sign, I get an altered InRelease
I would get these errors after an apt update :
default InRelease' changed its 'Suite' value from 'stable' to 'trixie'
default InRelease' changed its 'Codename' value from 'default' to 'trixie'
I also tried to do a fresh install of pulp/pulp on the new version and I still get the same errors.
quba42 commentedon Mar 3, 2025
PULP_TEMP_WORKING_DIRshould not be/var/lib/pulp. Looking at the code for pulp_deb 3.5.1, I don't see how it could be/var/lib/pulp/: https://github.com/pulp/pulp_deb/blob/3.5.1/pulp_deb/app/tasks/publishing.py#L600We are explicitly creating a random sub-folder within whatever the base-path is. This does explain your issue. If for some reason your instance is always signing directly in
/var/lib/pulpthen there will already be files there from previous publish tasks, and if those files are incorrectly used from another publish then that explains why you have InRelease files with the wrong "Codename" and "Suite" values: They are simply the wrong InRelease files for that publish.The question is how can this be happening? Looking at the code I have no ideas. @hstct Do you have any ideas?
Mav-Joel commentedon Mar 3, 2025
I have tried this :
It does get rid of the "File exists" error, however the InRelease problem is still the same:
Suite: trixie
Codename : trixie
Maybe it is a problem around the Release and not the signature ? However like I said, I'm not doing anything fancy :
quba42 commentedon Mar 3, 2025
In order to comment on what Suite/Codename you should or shouldn't be seeing, I would need to know what repo you are syncing (remote options). You have already posted your publication options above, so I already have those.
Mav-Joel commentedon Mar 3, 2025
Doing the same workflow using curl works !
So it must be a problem with my code, from what I can tell, the problem comes from :
Meaning that my release must have a problem somewhere, it's not interpreted correclty, then it does
Explaning my problem of "suite:trixie codename:trixie"
I will look into my code, thanks for the help !