PPA .deb 생성 누락 파일 패키징

PPA .deb 생성 누락 파일 패키징

그래서 문서에서 문서로 이리저리 헤매다가 나는 이 튜토리얼을 따라해 왔습니다:http://packaging.ubuntu.com/html/packaging-new-software.html

그래서 거기에 있는 단계를 시도했지만 문제가 발생하기 시작했습니다. 인터넷 검색은 대체로 도움이 되지 않았습니다. 저는 라이브러리와 일부 실행 파일을 빌드하는 매우 표준적인 autotools C++ 프로젝트를 가지고 있습니다. 나는 libfoo-dev 스타일 패키지를 만들어서 PPA에 붙이고 싶었습니다.

내가 하고 있는 일을 보여주기 위해 튜토리얼에서 제안된 단계를 수행하는 스크립트를 삽입했습니다(제가 올바르게 이해하고 있는 한..). 내가 가진 것은 다음과 같습니다.https://github.com/kevinkreiser/ppa-libprime-server

거기에는 build.sh내가 수행한 모든 단계가 포함된 bash 스크립트가 있습니다. 처음에는 dh_*@sneetsher가 자동 재설정을 수행하기 위해 규칙 파일을 변경하라는 단서를 주기 전까지는 내 프로젝트에서 무엇이든 빌드하는 데 어려움을 겪었습니다 . 이 시점에서 내 유일한 문제는 W: libprime-server0: empty-binary-package및 입니다 W: prime-server-bin: empty-binary-package.

그리고 말했듯이 문제는 이제 내 패키지 몇 개에 아무것도 포함되어 있지 않다는 것입니다.

user@pc$ lesspipe libprime-server0_0.3.2-0ubuntu1_amd64.deb 
libprime-server0_0.3.2-0ubuntu1_amd64.deb:
 neues Debian-Paket, Version 2.0.
 Größe 2004 Byte: control-Archiv= 528 Byte.
     425 Byte,    12 Zeilen      control              
     160 Byte,     2 Zeilen      md5sums              
 Package: libprime-server0
 Source: libprime-server
 Version: 0.3.2-0ubuntu1
 Architecture: amd64
 Maintainer: Kevin Kreiser <[email protected]>
 Installed-Size: 26
 Section: contrib/libs
 Priority: optional
 Homepage: https://github.com/kevinkreiser/prime_server
 Description: Service oriented distributed computing API
  A set of APIs designed around the zeromq butterfly pattern
  specifically focused on servicing http requests

*** Contents:
drwxr-xr-x root/root         0 2016-04-21 11:48 ./
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/share/
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/share/doc/
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/share/doc/libprime-server0/
-rw-r--r-- root/root       167 2016-04-18 11:04 ./usr/share/doc/libprime-server0/changelog.Debian.gz
-rw-r--r-- root/root      1558 2016-04-15 09:46 ./usr/share/doc/libprime-server0/copyright

user@pc:~/sandbox/ppa-libprime-server/build$ lesspipe prime-server-bin_0.3.2-0ubuntu1_amd64.deb 
prime-server-bin_0.3.2-0ubuntu1_amd64.deb:
 neues Debian-Paket, Version 2.0.
 Größe 1994 Byte: control-Archiv= 517 Byte.
     437 Byte,    12 Zeilen      control              
     160 Byte,     2 Zeilen      md5sums              
 Package: prime-server-bin
 Source: libprime-server
 Version: 0.3.2-0ubuntu1
 Architecture: amd64
 Maintainer: Kevin Kreiser <[email protected]>
 Installed-Size: 26
 Depends: libprime-server0 (= 0.3.2-0ubuntu1)
 Section: contrib/misc
 Priority: optional
 Homepage: https://github.com/kevinkreiser/prime_server
 Description: Service oriented distributed computing executables
  A set of executables for use in running a distributed http service

*** Contents:
drwxr-xr-x root/root         0 2016-04-21 11:48 ./
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/share/
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/share/doc/
drwxr-xr-x root/root         0 2016-04-21 11:48 ./usr/share/doc/prime-server-bin/
-rw-r--r-- root/root       167 2016-04-18 11:04 ./usr/share/doc/prime-server-bin/changelog.Debian.gz
-rw-r--r-- root/root      1558 2016-04-15 09:46 ./usr/share/doc/prime-server-bin/copyright

libprime-server1.install파일 이름을 and 로 다시 바꾸면 첫 번째 패키지가 작동합니다 libprime-server1.dirs. 패키지에 내가 뭘 잘못하고 있는지 알 수 없습니다 -bin. bzr내가 만들고 있는 패키지 유형에 대해 묻고 다른 l것을 library선택해야 합니까?

편집하다:

모든 것이 작동합니다.https://launchpad.net/~kevinkreiser/+archive/ubuntu/prime-server

@sneetsher의 도움으로 이 모든 것을 ppa에 적용하고 trusty에서 제대로 작동할 수 있었습니다! 그 과정에서 모든 도움과 인내심을 주신 @sneetsher에게 감사의 말씀을 전하고 싶습니다. 이 스크립트가 비슷한 작업을 수행하려는 다른 사람들에게 도움이 되기를 바랍니다.https://github.com/kevinkreiser/ppa-libprime-server/blob/master/build.sh

답변1

음, Ubuntu 14.04와 Ubuntu 16.04에서 (마지막 커밋을 사용하여) 테스트할 수 있습니다.

  • 패키징을 처음 사용하는 경우 자세한 debhelper출력을 활성화하는 것이 좋습니다. 파일 export DH_VERBOSE=1에서 주석 처리를 해제하십시오 rules.

  • 패키지는 / autoreconf뿐만 아니라 의존하는 것 같습니다 . 따라서 메인 라인을 다음과 같이 변경하십시오.automakeautotoolsrules

    %:
        #dh $@ --with autotolls-dev
        dh $@ --parallel --list-missing --with autoreconf
    

    dh-autoreconf파일 에 종속성을 빌드하도록 추가합니다 control.

    따라서 이제 더 이상 수동으로 실행하여 자동 빌드 파일을 미리 생성해야 합니다 ./autogen.sh. 모든 작업은 파일을 통해 수행되어야 한다는 점을 명심하세요 rules. 그렇지 않으면 깨끗한 소스 트리가 있는 PPA 서버에 구축될 때 실패할 것입니다.

  • 테스트 중 하나가 실패하면 건너뛰고 돌아다닙니다. . dh_auto_test​그래서 이것을 파일에 추가합니다 rules.

    override_dh_auto_test:
        echo skip auto-test
    

    나중에 수정되도록 남겨두세요.

  • libprime-server패키지의 경우 이름이 잘못되었기 때문입니다.

    libprime-server파일 control및 기타 libprime-server1항목 1(예 libprime-server1.install: )

  • 예, lintian(QA 도구)는 패키지의 주요 버전이 될 것으로 예상하기 때문에 해당 경고를 발생시킵니다. 예, 이름을 로 바꿔도 괜찮습니다 libprime-server0. 주의할 점은 이전 빌드에서 빌드 트리를 정리해야 한다는 것입니다. 따라서 debian/libprime-server1폴더를 삭제하고 다시 빌드해 보세요.

    원하는 만큼 패키지를 추가할 수 있습니다. 아래 업데이트된 파일을 참조하세요.

  • 예, 종속성에는 바이너리 패키지가 포함되어야 합니다 libprime-server0. 소스 패키지 libprime-server는 어떤 것에도 종속되지 않습니다.

  • 저는 빌드하는 데 귀하의 스크립트를 사용하지 않고 다른 수동 작업 흐름(원본 zip 아카이브 다운로드, 압축 풀기, debian 폴더 추가, 를 사용하여 빌드 debuild)을 사용하고 있었습니다. 빈 바이너리 패키지와 동일한 문제를 재현할 수 없습니다.

    으로 재현할 수 있었습니다 build.sh. 문제는 전체 내용을 변경했다는 것입니다 debian/.

    rm -rf libprime-server/debian
    cp -rp ../debian libprime-server
    

    하지만 파일 하나만 커밋했습니다.

    bzr add debian/source/format
    

    이 문제를 해결하려면 전체 폴더를 커밋하세요.

    bzr add debian
    

    bzr builddebDebian현재 작업 트리가 아닌 커밋/태그(레이블 포함) 파일만 사용하는 것 같습니다 .

내가 변경한 파일은 다음과 같습니다.

  1. debian/rules

    #!/usr/bin/make -f
    # -*- makefile -*-
    
    # Uncomment this to turn on verbose mode.
    export DH_VERBOSE=1
    
    %:
        #dh $@  --with autotools-dev
        dh $@ --parallel --list-missing --with autoreconf
    
    override_dh_auto_test:
        echo skip auto-test
    
  2. debian/control

    Source: libprime-server
    Priority: optional
    Maintainer: Kevin Kreiser <[email protected]>
    Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, libcurl4-openssl-dev, libzmq3-dev
    Standards-Version: 3.9.5
    Section: libs
    Homepage: https://github.com/kevinkreiser/prime_server
    Vcs-Git: git://github.com/kevinkreiser/prime_server.git
    
    Package: libprime-server-dev
    Section: contrib/libdevel
    Architecture: any
    Depends: libprime-server0 (= ${binary:Version}), ${misc:Depends}
    Description: Service oriented distributed computing API
     A set of APIs designed around the zeromq butterfly pattern
     specifically focused on servicing http requests
    
    Package: libprime-server0
    Section: contrib/libs
    Architecture: any
    Depends: ${shlibs:Depends}, ${misc:Depends}
    Description: Service oriented distributed computing API
     A set of APIs designed around the zeromq butterfly pattern
     specifically focused on servicing http requests
    
    Package: prime-server-bin
    Section: contrib/misc
    Architecture: any
    Depends: libprime-server0 (= ${binary:Version}), ${misc:Depends}
    Description: Service oriented distributed computing API
     A set of APIs designed around the zeromq butterfly pattern
     specifically focused on servicing http requests
    
  3. libprime-server1.install로 이름이 변경되었습니다.libprime-server0.install

  4. libprime-server1.dir로 이름이 변경되었습니다.libprime-server0.dir

  5. 만들다prime-server-bin.dirs

    usr/bin
    
  6. 만들다prime-server-bin.install

    usr/bin/*
    
  7. build.sh

    #!/bin/bash
    
    set -e
    
    rm -rf build
    mkdir build
    pushd build
    
    #get prime_server software
    #sudo apt-get install autoconf automake libtool make gcc-4.9 g++-4.9 lcov
    sudo apt-get install libcurl4-openssl-dev libzmq3-dev
    git clone --branch 0.3.2 --recursive  https://github.com/kevinkreiser/prime_server.git
    tar pczf prime_server.tar.gz prime_server
    rm -rf prime_server
    
    #start building the package
    sudo apt-get install dh-make dh-autoreconf bzr-builddeb
    bzr dh-make libprime-server 0.3.2 prime_server.tar.gz
    rm -rf libprime-server/debian
    cp -rp ../debian libprime-server
    pushd libprime-server
    bzr add debian
    bzr commit -m "Initial commit of Debian packaging."
    bzr builddeb -- -us -uc
    #TODO: sign the package
    popd
    
    #TODO: push the package to the ppa
    
    #TODO: make an ITP for inclusion in mainline
    
    popd
    

관련 정보