使用rpmbuild制作jdk的包_使用nfpm制作rpm包

使用nfpm制作rpm包

fdd5fc74647c8f44a283b9705a6b8342.png

如果你经历过打rpm包的年代,你肯定对fpm不陌生,今天给大家介绍一个使用golang写的打debrpm包的工具,那就是nfpm,为什么要推荐,是因为可以通过goreleaser把程序直接输出rpmdeb包。

NFPM

什么是nfpm

NFPM is Not FPM - a simple deb and rpm packager written in Go

如何安装(centos上)

$ curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh

如何使用(以官方demo演示)

> nfpm init> tree .├── bar├── foo├── foobar.conf├── hello.rpm├── nfpm.yaml└── scripts    ├── postinstall.sh    ├── postremove.sh    ├── preinstall.sh    └── preremove.sh3 directories, 7 files

查看生产的rpm包的信息

> rpm -qpi hello.rpmName        : fooEpoch       : 0Version     : v1.0Release     : 1Architecture: x86_64Install Date: (not installed)Group       : Development/ToolsSize        : 0License     : MITSignature   : (none)Source RPM  : foo-v-1.src.rpmBuild Date  : Sun 05 Jul 2020 09:44:09 PM CSTBuild Host  : reviewboard.danke.lifeRelocations : (not relocatable)Packager    : John Doe <john@example.com>Vendor      : FooBarCorpURL         : http://example.comSummary     : FooBar is the great foo and bar software.Description :FooBar is the great foo and bar software.  And this can be in multiple lines!

相关站点

nfpm官网[1]

nfpm的GitHub[2]

fpm的GitHub[3]

后记

fpm是基于ruby语言编写的,与fpm不一样的点是,nfpm是基于golang语言的,当前nfpm仅支持debrpm两个格式的包制作,相对fpm还是弱了些,不过相对来说更简单(第一次接触的话,还是需要废点时间学习下)一些。

欢迎关注我的公众号“追马Linux”,原创技术文章第一时间推送。

5320958f0a716be2bc293aca3e7cb92f.png
引用链接

[1] nfpm官网: https://nfpm.goreleaser.com/[2] nfpm的GitHub: https://github.com/goreleaser/nfpm[3] fpm的GitHub: https://github.com/jordansissel/fpm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值