簡體   English   中英

如何使用GitHub存儲庫創建RPM軟件包

[英]How to create RPM package with GitHub repository

我想創建一個依賴於github存儲庫的RPM包。

如果我獨立運行此命令:

yum localinstall https://github.com/matthewmueller/giftbox/blob/master/rpm/monit.rpm

一切正常。 但是,如果我嘗試使其成為RPM軟件包的依賴項(使用FPM),則會出現以下錯誤:

--> Processing Dependency: https://github.com/matthewmueller/giftbox/raw/release-2017-08-21-08-33/rpm/monit.rpm for package: giftbox-2017_08_21_08_33-1.x86_64
--> Finished Dependency Resolution
Error: Package: giftbox-2017_08_21_08_33-1.x86_64 (/giftbox)
           Requires: https://github.com/matthewmueller/giftbox/raw/release-2017-08-21-08-33/rpm/monit.rpm
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

這是我正在運行的用於生成RPM軟件包的命令:

@fpm \
        --input-type=dir \
        --output-type=rpm \
        --name $(NAME) \
        --version $(VERSION) \
        --architecture x86_64 \
        --package "$(DIR)/rpm/$(NAME)-$(VERSION).rpm" \
        --rpm-os linux \
        --template-scripts \
        --after-install "$(DIR)/postinstall.sh" \
        --after-upgrade "$(DIR)/postupgrade.sh" \
        --before-remove "$(DIR)/preremove.sh" \
        --depends "procps" \
        --depends "util-linux" \
        --depends "initscripts" \
        --depends "$(GHBASE)/monit.rpm" \
        --force \
            "$(DIR)/init.sh"="/etc/init.d/giftbox"

任何幫助將不勝感激。 謝謝!

這是不可能的。 Requires: some_package只能包含軟件包名稱。

yum install http://some.url/some.package.rpm只是yum的功能,它將下載文件然后安裝。 您不能在require中使用URL。

您可以做什么:*創建名為my-repo.rpm的rpm,它將包含repo文件( /etc/yum.repos.d ),該文件將啟用monit.rpm所在的存儲庫*然后您可以將Requires: monit monit放入禮物盒。 * yum install my-repo.rpm ,在第二步中,您應該可以執行'yum install giftbox'。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM