如何在启动板上上传/构建自定义内核?

如何在启动板上上传/构建自定义内核?

我曾经make deb-pkg生成过以下文件:

linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1.debian.tar.gz
linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1.dsc
linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1_armhf.changes
linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+.orig.tar.gz
linux-headers-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1_armhf.deb
linux-image-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1_armhf.deb
linux-libc-dev_4.14.20-rt17-v7+-1_armhf.deb

现在我想使用 bash 脚本以某种方式将它们上传到我的启动板存储库。但似乎没有关于如何上传已构建的包的文档。

下列的这些说明从启动板来看,这是我想到的:

# Get the source package files
wget https://gitlab.com/T-vK/rpi-rt-kernel-build-project/-/jobs/54062792/artifacts/raw/linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1_armhf.changes
wget https://gitlab.com/T-vK/rpi-rt-kernel-build-project/-/jobs/54062792/artifacts/raw/linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1.debian.tar.gz
wget https://gitlab.com/T-vK/rpi-rt-kernel-build-project/-/jobs/54062792/artifacts/raw/linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1.dsc
#-wget https://gitlab.com/T-vK/rpi-rt-kernel-build-project/-/jobs/54062792/artifacts/raw/linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+.orig.tar.gz

# Register ssh key from secret variable so that dput won't ask for a password when uploading
apt-get -qq install --yes dput openssh-client
eval $(ssh-agent -s)
echo "$LAUNCHPAD_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh

# Prepare sftp config for launchpad
echo '[rpi-rt-kernel]' > ~/.dput.cf
echo 'fqdn = ppa.launchpad.net' >> ~/.dput.cf
echo 'method = sftp' >> ~/.dput.cf
echo 'incoming = ~t-vk/ubuntu/rpi-rt-kernel/' >> ~/.dput.cf
echo 'incoming = ~t-vk/ubuntu/rpi-rt-kernel/debian' >> ~/.dput.cf # TODO: find out what the hell they mean by "<an ubuntu suite>" in the docs
echo 'login = t-vk' >> ~/.dput.cf
echo 'allow_unsigned_uploads = 0' >> ~/.dput.cf

# Upload to launchpad
export CHANGES_FILE=$(set -- *.changes; echo "$1")             # first file ending with .changes
export DEBIAN_TAR_GZ_FILE=$(set -- *.debian.tar.gz; echo "$1") # first file ending with .debian.tar.gz
export DSC_FILE=$(set -- *.dsc; echo "$1")                     # first file ending with .dsc
#- export ORIG_TAR_GZ_FILE=$(set -- *.orig.tar.gz; echo "$1")  # first file ending with .orig.tar.gz
dput rpi-rt-kernel $CHANGES_FILE
dput rpi-rt-kernel $DEBIAN_TAR_GZ_FILE
dput rpi-rt-kernel $DSC_FILE
#dput rpi-rt-kernel $ORIG_TAR_GZ_FILE

但它失败了dput rpi-rt-kernel $SOURCE_FILE

gpg: /builds/T-vK/rpi-rt-kernel-build-project/linux-4.14.20-rt17-v7+_4.14.20-rt17-v7+-1_armhf.changes: error 58: Invocation of gpgme_op_verify
$USER not set, will use login information.
Checking signature on .changes
Invocation of gpgme_op_verify: GPGME: No data
ERROR: Job failed: exit code 1

我的 gpg 和 ssh 密钥已添加到我的启动板帐户。

答案1

当我使用 ftp 和 set 时它对我有用allow_unsigned_uploads = 1

简单方法:Ubuntu 9.10 及更新版本中的 FTP

首先,您需要告知dput包裹要寄往何处以及通过何种方式寄送。为此,请编辑~/.dput.cf为如下所示:

[my-ppa]
fqdn = ppa.launchpad.net
method = ftp
incoming = ~<your_launchpad_id>/ubuntu/<ppa_name>/
login = anonymous
allow_unsigned_uploads = 1

然后运行如下命令:

dput my-ppa my-ppa.changes
Uploading to my-ppa (via ftp to ppa.launchpad.net):
  Uploading my-ppa.deb: done.  
  Uploading my-ppa.buildinfo: done.  
  Uploading my-ppa.changes: done.
Successfully uploaded packages.

相关内容