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

Per-module strip option is ignored #358

Open
gasinvein opened this issue Jul 16, 2020 · 4 comments
Open

Per-module strip option is ignored #358

gasinvein opened this issue Jul 16, 2020 · 4 comments

Comments

@gasinvein
Copy link
Member

Linux distribution and version

Fedora 32

Flatpak-builder version

1.0.10

Flatpak version

1.8.1

Description of the problem

If global build-options set strip to true, then per-module build-options with strip set to false have no effect - module files are stripped anyway.

Steps to reproduce

Minimal manifest to demonstrate the problem:

id: org.khronos.glslang
sdk: org.freedesktop.Sdk
runtime: org.freedesktop.Platform
runtime-version: "19.08"
build-options:
  strip: true
modules:
  - name: glslang
    build-options:
      strip: false
    buildsystem: cmake-ninja
    post-install:
      - chmod 555 ${FLATPAK_DEST}/bin/*
    sources:
      - type: archive
        url: "https://github.com/KhronosGroup/glslang/archive/8.13.3559.tar.gz"
        sha256: c58fdcf7e00943ba10f9ae565b2725ec9d5be7dab7c8e82cac72fcaa83c652ca

Here we make the installed binary non-writable, what makes flatpak-builder error out on trying to strip it:

stripping: files/bin/glslangValidator
strip: unable to copy file '/home/gasinvein/.cache/flatpak-builder/state/rofiles/rofiles-u8Wvcs/files/bin/glslangValidator'; reason: Permission denied
Error: module glslang: Child process exited with code 1
@tinywrkb
Copy link

tinywrkb commented May 4, 2022

Also, if you have a later module setting strip to true, then it will strip everything that's already in ${FLATPAK_DEST}, doesn't matter which module installed it.

...
modules:
  - name: moduleA
  - ....
  - name: moduleX
    build-options:
      strip: true

@TingPing TingPing added the bug label May 4, 2022
@TingPing TingPing removed the bug label Apr 28, 2023
@charlesthobe
Copy link

charlesthobe commented Jun 4, 2023

Now it just strips everything, even with both global stripping build option and permodule ones set to false.

build-options:
  strip: false
modules:
  - name: module1
    buildsystem: simple
    build-options:
      strip: false

I have tried all combinations to no avail.
system info:
Flatpak 1.14.4
flatpak-builder 1.2.3
Host OS: Debian bookworm
I'm not sure whether I should open a new bug or if this one should naturally encompass my issue.

@charlesthobe
Copy link

charlesthobe commented Jun 4, 2023

I think that it's worth noting that the build system for said module is set to "simple", so I guess the issue I'm facing is with the build system.
bug reports of the same issue:
flatpak/flatpak#469
flatpak/flatpak#1791
The problem they were facing is they were extracting a tar with read-only permission set to some files so stripping fails, adding chmod -R +w "${FLATPAK_DEST}"/$module_installation_location fixes it, but I wish there was an option to disable stripping while using the "simple" build system.

@kornrunner
Copy link

It seems that setting

build-options:
  strip: false
  no-debuginfo: true

At the top level skips stripping (for all modules) and later overrides per module seem to work. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants