Skip to content

Commit

Permalink
Merge pull request #7347 from freedomofpress/pub-dbgsym
Browse files Browse the repository at this point in the history
Publish dbgsym packages
  • Loading branch information
rocodes authored Nov 26, 2024
2 parents aa12285 + 67d627f commit b7bda4f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion builder/build-debs-securedrop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ dpkg-buildpackage -us -uc
# Copy the built artifacts back and print checksums
source /etc/os-release
mkdir -p "/src/build/${VERSION_CODENAME}"
mv -v ../*.{buildinfo,changes,deb,tar.gz} "/src/build/${VERSION_CODENAME}"
mv -v ../*.{buildinfo,changes,deb,ddeb,tar.gz} "/src/build/${VERSION_CODENAME}"
cd "/src/build/${VERSION_CODENAME}"
# Rename "ddeb" packages to just "deb"
for file in *.ddeb; do
mv "$file" "${file%.ddeb}.deb";
done
sha256sum ./*
15 changes: 9 additions & 6 deletions builder/tests/test_securedrop_deb_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ def securedrop_app_code_contents() -> str:
"""
Returns the content listing of the securedrop-app-code Debian package.
"""
try:
path = [pkg for pkg in DEB_PATHS if pkg.name.startswith("securedrop-app-code")][0]
except IndexError:
raise RuntimeError("Unable to find securedrop-app-code package in build/ folder")
return subprocess.check_output(["dpkg-deb", "--contents", path]).decode()
for pkg in DEB_PATHS:
if pkg.name.startswith("securedrop-app-code") and "dbgsym" not in pkg.name:
return subprocess.check_output(["dpkg-deb", "--contents", pkg]).decode()

raise RuntimeError("Unable to find securedrop-app-code package in build/ folder")


@pytest.mark.parametrize("deb", DEB_PATHS)
Expand Down Expand Up @@ -55,7 +55,10 @@ def test_deb_package_contains_expected_conffiles(deb: Path):
The same applies to `securedrop-config` too.
"""
if not deb.name.startswith(("securedrop-app-code", "securedrop-config")):
if (
not deb.name.startswith(("securedrop-app-code", "securedrop-config"))
or "dbgsym" in deb.name
):
return

with tempfile.TemporaryDirectory() as tmpdir:
Expand Down

0 comments on commit b7bda4f

Please sign in to comment.