2018/12/26

Debian : Create Package From PPA..

竟然有一篇專門講Create Package From PPA

大概就是 ...
  • 一樣把 ppa 加到 repository 中
  • 修改 sources.d 中ppa 的 list,把他改成只能 install source
  • apt-get update, 然後安裝 package source
  • 自己用 debian build tool 把 download 下來的 source build 成 package

實際上,光是 add-apt-repository 時,就會出現 Error:
key D1FAA6ECF64D33B0:
3 signatures not checked due to missing keys
gpg: /tmp/tmpps7zy6_5/trustdb.gpg: trustdb created
gpg: key D1FAA6ECF64D33B0: public key "Launchpad PPA for GCC ARM Embedded Maintainers" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1
gpg: no valid OpenPGP data found.
Exception in thread Thread-1:
.....
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser'

說是 debian 不認識 ubuntu server,所以
~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys  C2518248EEA14886
Executing: /tmp/apt-key-gpghome.tbG3r8NPkE/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886
key C2518248EEA14886:
14 signatures not checked due to missing keys
gpg: key C2518248EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1
再..
實際參考 這一篇,但是 package 要改成自己的。
加入自己要 add 的 KEY (D1FAA6ECF64....)
然後還要參考 這一篇修改 ppa list,把 disco 改成ubuntu 的 release name
再做 apt-get update..才會 OK

然後..
~$ apt source --build gcc-arm-embedded
Reading package lists... Done
Need to get 176 MB of source archives.
Get:1 http://ppa.launchpad.net/team-gcc-arm-embedded/ppa/ubuntu xenial/main gcc-arm-none-eabi 8-2018q4-1~xenial1 (tar) [176 MB]
然後會抱怨有 Unmet build depencies..
把抱怨的 apt-get install 補上..
繼續..
出現..
make[1]: Leaving directory '/home/charles-chang/gcc-arm-none-eabi-8-2018q4/build-native/gcc-first/libiberty'
debian/rules:24: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Build command 'cd gcc-arm-none-eabi-8-2018q4 && dpkg-buildpackage -b -uc' failed.
..

重新做一次,記下 log, 搜尋結果..
checking whether gcc supports -fno-rtti... yes
configure: error: C++ compiler missing or inoperational
if [ x"-fpic" != x ]; then \
          gcc -c -DHAVE_CONFIG_H -g -O2  -I. -I/home/charles-chang/gcc-arm-none-eabi-8-2018q4/src/gcc/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  -D_GNU_SOURCE -fpic /home/charles-chang/gcc-arm-none-eabi-8-2018q4/src/gcc/libiberty/rust-demangle.c -o pic/rust-demangle.o; \
        else true; fi
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"zlib\" -DVERSION=\"1.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_MEMCPY=1 -DHAVE_STRERROR=1 -DHAVE_UNISTD_H=1 -I. -I/home/charles-chang/gcc-arm-none-eabi-8-2018q4/src/gcc/zlib      -g -O2 -c -o libz_a-inflate.o `test -f 'inflate.c' || echo '/home/charles-chang/gcc-arm-none-eabi-8-2018q4/src/gcc/zlib/'`inflate.c
make: *** [configure-libcpp] Error 1
make: *** Waiting for unfinished jobs....

沒有留言:

張貼留言