0

I'm trying to build .deb package from the bitbucket pipeline but end up with this error msg.

dpkg-deb: error: control directory has bad permissions 777 (must be >=0755 and <=0775)

tried to change the folder's permission with 755 but it didn't help either. I also tried to build with different Debian docker images but nothing helped.

this is the bitbucket pipeline yaml I use.

image: debian:buster-slim

pipelines:
  default:
    - step:
        name: Build dpkg and push to S3 bucket
        image: debian:buster-slim
        deployment: Test
        caches:
          - pip
        script:
          - apt-get update && apt-get install -y
          - cd ..
          - mkdir process-mgmt-svc
          - cp -rp build/. process-mgmt-svc
          - chmod 755 process-mgmt-svc
          - dpkg-deb --build process-mgmt-svc
        services:
          - docker
3
  • 1
    The error message tells you what's wrong; how did it change when you changed to correct permissions?
    – tripleee
    Commented Jun 6 at 8:57
  • It still has the same error. not sure what it means by the control directory. I only assumed it to be the process-mgmt-svc directory.
    – Priyamal
    Commented Jun 6 at 9:31
  • 1
    I would guess it is referring to the debian directory which contains control (and rules, and some other mandatory files as well as anything else related to the actual packaging).
    – tripleee
    Commented Jun 6 at 9:46

1 Answer 1

0

i was able to build dpkg using following command

dpkg-deb --build --nocheck process-mgmt-svc

--nocheck
       Inhibits dpkg-deb --build's usual checks on the proposed
       contents of an archive. You can build any archive you want,
       no matter how broken, this way.

Not the answer you're looking for? Browse other questions tagged or ask your own question.