Learn to Create an RPM Package

The steps to build an RPM package: Download the source code Create the spec file (use the rpmdev-newspec command) Build the package (use the rpmbuild command) GPG sign the package (use the rpmsign command) Test the package (use rpm -qip command) In this post, I’m going to learn to create an RPM package of fpaste-4.0.1.1.tar.gz on Red Hat Enterprise Linux 7 (variant). First we need to ensure the necessary packages are installed:...

March 5, 2021 · 6 min · 1114 words · kenno

Locking Package Version with DNF Versionlock

While newer version of a package on Linux system is generally a good thing, and we should upgrade it, there is times when we should hold on to the older version. For instance, Fedora 32 just released a newer version of the kernel package 5.8.4 recently, and with this version, the zfs module, version 0.8.4, can’t be built. Therefore, if your Fedora system uses ZFS, like some of my machines, you’ll end up not seeing any ZFS dataset or pools....

August 30, 2020 · 3 min · 490 words · kenno

How to Generate a GPG Key

GPG, the GNU Privacy Guard, can be used to digitally sign email, encrypt files. GPG is also used to sign RPM package. In this post, I’ll write a short instruction on how to generate a new GPG key on RHEL or CentOS 7. The command we need to generate the GPG key is gpg. This program is provided by gnupg2, and it should have aready been installed in most system....

August 19, 2019 · 4 min · 658 words · kenno

ចងក្រង RPM ពី Source RPMs

ជាធម្មតា ពេលខ្ញុំបញ្ចូល កញ្ចប់ថ្មីៗក្នុងអូផិនស៊ូស៊ី បើសិនជាមិនអាចរក binary rpm បានទេ ខ្ញុំតែងតែចងក្រង (compile) កញ្ចប់ទាំងនោះពីកូដប្រភពដើម។ កូដប្រភពដើម អាចត្រូវបានខ្ចប់ជា tar.gz ឬ .src.rpm។ ក្នុងករណីទីមួយ យើងគ្រាន់តែពន្លា កូដប្រភពដើម រួចបញ្ជា ./configure, make និង make install ជាធម្មតា។ ពេលនេះ ខ្ញុំសូមលើកយក វិធីចងក្រងកម្មវិធី ជាមួយនឹង កូដប្រភពដើម ខ្ចប់ជា .src.rpm។ $ rpmbuild -clean -rebuild packagename.src.rpm ក្រោយពីបាន វាយពាក្យបញ្ជាខាងលើហើយ កញ្ចប់ binary RPM នឹងត្រូវបានបង្កើតក្នុង subdirectory នៃ ថត /usr/src/packages/RPMS/។ សូមពិនិត្យមើល ក្នុងថតដែលមានឈ្មោះ ចាប់ផ្តើមដោយអក្សរ i\*** ឧទាហរណ៍ i386 ជាករណីរបស់ម៉ាស៊ីនខ្ញុំ។

December 19, 2006 · 1 min · 54 words · kenno