RPM Packages

Total Page:16

File Type:pdf, Size:1020Kb

RPM Packages RPM Packaging Guide Adam Miller, Maxim Svistunov, Marie Doleželová, et al. Table of Contents Introduction. 1 PDF Version . 1 Document Conventions. 1 Contributing to this guide . 2 Prerequisites . 3 Why Package Software with RPM?. 4 Your First RPM Package . 5 Preparing Software for Packaging . 7 What is Source Code? . 7 How Programs Are Made . 8 Natively Compiled Code . 8 Interpreted Code . 8 Building Software from Source . 9 Natively Compiled Code . 9 Interpreted Code . 10 Patching Software . 12 Installing Arbitrary Artifacts. 14 Using the install command . 14 Using the make install command . 15 Preparing Source Code for Packaging. 16 Putting Source Code into Tarball . 16 bello . 17 pello . 17 cello. 18 Packaging Software . 20 RPM Packages . 20 What is an RPM? . 20 RPM Packaging Tools . 20 RPM Packaging Workspace . 21 What is a SPEC File? . 21 BuildRoots . 23 RPM Macros . 24 Working with SPEC files. 25 Building RPMS . 44 Source RPMs . 45 Binary RPMS . 45 Checking RPMs For Sanity . 47 Checking the bello SPEC File. 47 Checking the bello Binary RPM . 48 Checking the pello SPEC File. 48 Checking the pello Binary RPM . 49 Checking the cello SPEC File . 50 Checking the cello Binary RPM . 51 Advanced Topics. 52 Signing Packages . 52 Adding a Signature to a Package . 52 Replacing a Package Signature. 53 Build-time Signing. 54 Mock . 55 Version Control Systems. 59 tito . ..
Recommended publications
  • Creating Rpms Guide
    CREATING RPMS (Student version) v1.0 Featuring 36 pages of lecture and a 48 page lab exercise This docu m e n t serves two purpose s: 1. Representative sample to allow evaluation of our courseware manuals 2. Make available high quality RPM documentation to Linux administrators A bout this m aterial : The blue background you see simulates the custom paper that all Guru Labs course w are is printed on. This student version does not contain the instructor notes and teaching tips present in the instructor version. For more information on all the features of our unique layout, see: http://ww w . g urulabs.co m /courseware/course w are_layout.php For more freely available Guru Labs content (and the latest version of this file), see: http://www.gurulabs.co m/goodies/ This sample validated on: Red Hat Enterprise Linux 4 & Fedora Core v3 SUSE Linux Enterprise Server 9 & SUSE Linux Professional 9.2 About Guru Labs: Guru Labs is a Linux training company started in 199 9 by Linux experts to produce the best Linux training and course w are available. For a complete list, visit our website at: http://www.gurulabs.co m/ This work is copyrighted Guru Labs, L.C. 2005 and is licensed under the Creative Common s Attribution- NonCom mer cial- NoDerivs License. To view a copy of this license, visit http://creativecom m o n s.org/licenses/by- nc- nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 943 0 5, USA. Guru Labs 801 N 500 W Ste 202 Bountiful, UT 84010 Ph: 801-298-5227 WWW.GURULABS.COM Objectives: • Understand
    [Show full text]
  • Mysql and Linux/Unix Abstract
    MySQL and Linux/Unix Abstract This is the MySQL Linux extract from the MySQL 5.6 Reference Manual. For legal information, see the Legal Notices. For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users. Document generated on: 2021-09-23 (revision: 70881) Table of Contents Preface and Legal Notices ............................................................................................................ v 1 Installing MySQL on Unix/Linux Using Generic Binaries ............................................................... 1 2 Installing MySQL on Linux ......................................................................................................... 5 2.1 Installing MySQL on Linux Using the MySQL Yum Repository ........................................... 6 2.2 Replacing a Third-Party Distribution of MySQL Using the MySQL Yum Repository .............. 9 2.3 Installing MySQL on Linux Using the MySQL APT Repository ......................................... 11 2.4 Installing MySQL on Linux Using the MySQL SLES Repository ....................................... 11 2.5 Installing MySQL on Linux Using RPM Packages from Oracle ......................................... 12 2.6 Installing MySQL on Linux Using Debian Packages from Oracle ...................................... 15 2.7 Installing MySQL on Linux from the Native Software Repositories .................................... 16 2.8 Deploying MySQL on Linux with Docker .......................................................................
    [Show full text]
  • Red Hat Developer Toolset 9 User Guide
    Red Hat Developer Toolset 9 User Guide Installing and Using Red Hat Developer Toolset Last Updated: 2020-08-07 Red Hat Developer Toolset 9 User Guide Installing and Using Red Hat Developer Toolset Zuzana Zoubková Red Hat Customer Content Services Olga Tikhomirova Red Hat Customer Content Services [email protected] Supriya Takkhi Red Hat Customer Content Services Jaromír Hradílek Red Hat Customer Content Services Matt Newsome Red Hat Software Engineering Robert Krátký Red Hat Customer Content Services Vladimír Slávik Red Hat Customer Content Services Legal Notice Copyright © 2020 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/ . In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp.
    [Show full text]
  • Chapter 7 Package Management
    Chapter 7 Package Management CERTIFICATION OBJECTIVES 7.01 The Red Hat Package Manager ✓ Two-Minute Drill 7.02 More RPM Commands Q&A Self Test 7.03 Dependencies and the yum Command 7.04 More Package Management Tools fter installation is complete, systems are secured, filesystems are configured, and other initial setup tasks are completed, you still have work to do. Almost certainly before your system is in the state you desire, you will be required to install or remove packages. To make sure the right updates are installed, you need to know how to get a system working with ARed Hat Subscription Management (RHSM) or the repository associated with a rebuild distribution. To accomplish these tasks, you need to understand how to use the rpm and yum commands in detail. Although these are “just” two commands, they are rich in detail. Entire books have been dedicated to the rpm command, such as the Red Hat RPM Guide by Eric 344 Chapter 7 Package Management Foster-Johnson. For many, that degree of in-depth knowledge of the rpm command is no longer necessary, given the capabilities of the yum command and the additional package management tools provided in RHEL 7. CERTIFICATION OBJECTIVE 7.01 The Red Hat Package Manager One of the major duties of a system administrator is software management. New applications are installed. Services are updated. Kernels are patched. Without the right tools, it can be difficult to figure out what software is on a system, what is the latest update, and what applications depend on other software.
    [Show full text]
  • CIT 470: Advanced Network and System Administration Slide #1 CIT 470: Advanced Network and System Administration Slide #2
    Topics 1. The Problem of Software Installation 2. Package Management Systems CIT 470: Advanced Network and 3. Using RPM System Administration 4. Finding RPMs Package Management 5. Building RPMs CIT 470: Advanced Network and System Administration Slide #1 CIT 470: Advanced Network and System Administration Slide #2 Software Installation What’s the problem? 1. Customization What prerequisites does your software have? Select options like language. What prereqs do your prereq packages have? Select file set. How do you handle conflicts? What if two programs install/modify same file? 2. Install new files in appropriate locations. Does your install work on every type of computer? 3. Modify existing configuration files. How do you handle upgrades? 4. Make software available to user. What if user has customized configuration? Shell configuration (PATH, etc.) What if ownerships/permissions have changed? GUI configuration (menu, icons, etc.) What if user needs old and new versions? How do you uninstall software? CIT 470: Advanced Network and System Administration Slide #3 CIT 470: Advanced Network and System Administration Slide #4 Package Manager Features UNIX Package Management Systems • Build management. deb: Debian system uses dpkg and APT. • Dependency tracking. pkgadd: Solaris packaging system. • Querying. portage: Gentoo uses with emerge. • Reversibility. ports: BSD ports system. • Verification. RPM: Redhat packaging system. • Version control. tgz: Tarballs used by Slackware. CIT 470: Advanced Network and System Administration Slide #5 CIT 470: Advanced Network and System Administration Slide #6 1 RPM RPM Package Names RPM Package Manager <name>-<version>-<release>.<arch>.rpm – Originally stood for Red Hat Package Manager – Came with Red Hat Linux 2.0 in 1995.
    [Show full text]
  • Ubuntu Server Guide Basic Installation Preparing to Install
    Ubuntu Server Guide Welcome to the Ubuntu Server Guide! This site includes information on using Ubuntu Server for the latest LTS release, Ubuntu 20.04 LTS (Focal Fossa). For an offline version as well as versions for previous releases see below. Improving the Documentation If you find any errors or have suggestions for improvements to pages, please use the link at thebottomof each topic titled: “Help improve this document in the forum.” This link will take you to the Server Discourse forum for the specific page you are viewing. There you can share your comments or let us know aboutbugs with any page. PDFs and Previous Releases Below are links to the previous Ubuntu Server release server guides as well as an offline copy of the current version of this site: Ubuntu 20.04 LTS (Focal Fossa): PDF Ubuntu 18.04 LTS (Bionic Beaver): Web and PDF Ubuntu 16.04 LTS (Xenial Xerus): Web and PDF Support There are a couple of different ways that the Ubuntu Server edition is supported: commercial support and community support. The main commercial support (and development funding) is available from Canonical, Ltd. They supply reasonably- priced support contracts on a per desktop or per-server basis. For more information see the Ubuntu Advantage page. Community support is also provided by dedicated individuals and companies that wish to make Ubuntu the best distribution possible. Support is provided through multiple mailing lists, IRC channels, forums, blogs, wikis, etc. The large amount of information available can be overwhelming, but a good search engine query can usually provide an answer to your questions.
    [Show full text]
  • Kernel Module Packages Manual for SUSE Linux Enterprise 12 SP2 Or Later and SUSE Linux Enterprise 15
    SUSE Best Practices Kernel Module Packages Manual for SUSE Linux Enterprise 12 SP2 or later and SUSE Linux Enterprise 15 SUSE Linux Enterprise 12 SP2+, 15 Document Owner: Ann Davis, Senior Software Engineer, SUSE Kernel Module Packages Manual for SUSE Linux Enterprise 12 SP2 or later and SUSE Linux 1 Enterprise 15 SUSE-based distributions use the RPM Package Manager for software management. As such, any external kernel modules (these are kernel modules not included in SUSE kernel packages) should be packaged in RPM packages. These RPMs should be built in accordance with specic guidelines to ensure that the resulting Kernel Module Packages (KMPs) can be installed and updated appropriately, in synchronization with kernel updates. This document species the requirements for RPM packages that contain kernel modules, and describes the processes surrounding those packages including building, signing, installing and upgrading. A complete example is given and explained. This version of the Kernel Module Packages Manual applies to SUSE Linux Enterprise Server 12 (Service Pack 2 and later), and SUSE Linux Enterprise Server 15, and all products based on these versions. Publication Date: July 31, 2019 Contents 1 Scope 4 2 Background 4 3 Kernel Packages 6 4 Kernel Modules 7 5 Kernel Module Packages 8 6 RPM Provides and Requires 12 7 Building Kernel Module Packages 12 8 Signing 14 9 Deploying Kernel Module Packages 18 10 System Installation and Kernel Module Packages 18 Kernel Module Packages Manual for SUSE Linux Enterprise 12 SP2 or later and SUSE
    [Show full text]
  • Forcepoint DLP Supported File Formats and Size Limits
    Forcepoint DLP Supported File Formats and Size Limits Supported File Formats and Size Limits | Forcepoint DLP | v8.8.1 This article provides a list of the file formats that can be analyzed by Forcepoint DLP, file formats from which content and meta data can be extracted, and the file size limits for network, endpoint, and discovery functions. See: ● Supported File Formats ● File Size Limits © 2021 Forcepoint LLC Supported File Formats Supported File Formats and Size Limits | Forcepoint DLP | v8.8.1 The following tables lists the file formats supported by Forcepoint DLP. File formats are in alphabetical order by format group. ● Archive For mats, page 3 ● Backup Formats, page 7 ● Business Intelligence (BI) and Analysis Formats, page 8 ● Computer-Aided Design Formats, page 9 ● Cryptography Formats, page 12 ● Database Formats, page 14 ● Desktop publishing formats, page 16 ● eBook/Audio book formats, page 17 ● Executable formats, page 18 ● Font formats, page 20 ● Graphics formats - general, page 21 ● Graphics formats - vector graphics, page 26 ● Library formats, page 29 ● Log formats, page 30 ● Mail formats, page 31 ● Multimedia formats, page 32 ● Object formats, page 37 ● Presentation formats, page 38 ● Project management formats, page 40 ● Spreadsheet formats, page 41 ● Text and markup formats, page 43 ● Word processing formats, page 45 ● Miscellaneous formats, page 53 Supported file formats are added and updated frequently. Key to support tables Symbol Description Y The format is supported N The format is not supported P Partial metadata
    [Show full text]
  • Install Gnome Software Center Arch
    Install gnome software center arch Upstream URL: License(s): GPL2. Maintainers: Jan Steffens. Package Size: MB. Installed Size: Installed Size​: ​ MB. gnome-software will be available as a preview in It can install, remove applications on systems with PackageKit. It can install updates on Gnome software will not start / Applications & Desktop. A quick video on Gnome Software Center in Arch Linux. Gnome unstable repository. There is a component called Polkit that is used by many applications to request root permissions to do things (it can do so because it's a. GNOME Software on #archlinux with native PackageKit backend, and this is a gui for installing software, ala ubuntu software manager, but distro This is some kind of Ubuntu Software Centre, with comments and all that. Need help installing Gnome Software Center for Arch Linux? Here are some instructions: Click DOWNLOAD HERE in the menu. Download the file. Make the file. I had to install it with along with packagekit. This is what's missing to make Antergos *the* beginner-friendly Arch-based distro, or general So, it is not a bad idea for the “Gnome Software Center” to include by default. GNOME software software center graphic that we will find the default in future releases of Fedora in addition to being installed in Arch Linux Please help me to install GNOME Software on. GNOME Software Will Work On Arch Linux With PackageKit the Alpm/Pacman back-end for using this GNOME application to install and. From: Sriram Ramkrishna ; To: desktop-devel-list devel-list gnome org>; Subject: gnome- software/packagekit.
    [Show full text]
  • Opensuse Leap 15.3 Start-Up Start-Up Opensuse Leap 15.3
    openSUSE Leap 15.3 Start-Up Start-Up openSUSE Leap 15.3 Publication Date: June 22, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About this guide xi 1 Available documentation xi 2 Improving the documentation xii 3 Documentation conventions xiii 4 Source code xiv 5 Acknowledgments xiv I INSTALLATION 1 1 Installation Quick Start 2 1.1 Welcome to openSUSE Leap 2 Minimum system requirements 2 • Installing openSUSE Leap 2 2 Boot parameters 17 2.1 Using the default boot parameters 17 2.2 PC (AMD64/Intel 64/Arm AArch64) 17 The boot screen on machines equipped with traditional
    [Show full text]
  • Linux Package Management
    Welcome A Basic Overview and Introduction to Linux Package Management By Stan Reichardt [email protected] October 2009 Disclaimer ● ...like a locomotive ● Many (similar but different) ● Fast moving ● Complex parts ● Another one coming any minute ● I have ridden locomotives ● I am NOT a locomotive engineer 2 Begin The Train Wreck 3 Definitions ● A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage. ● Metadata is data (or information) about other data (or information). 4 File Archivers Front Ends Base Package Tool CLI GUI tar .tar, tar tar file roller .tar.gz, .tgz, .tar.Z, .taz, .tar.bz2,.tbz2, .tbz, .tb2, .tar.lzma,.tlz, .tar.xz, .txz, .tz zip .zip zip zip file roller gzip gzip gunzip gunzip ● Archive file http://en.wikipedia.org/wiki/Archive_file ● Comparison of file archivers http://en.wikipedia.org/wiki/Comparison_of_file_archivers 5 tar ● These files end with .tar suffix. ● Compressed tar files end with “.t” variations: .tar.gz, .tgz, .tar.Z, .taz, .tar.bz2, .tbz2, .tbz, .tb2, .tar.lzma, .tlz, .tar.xz, .txz, .tz ● Originally intended for transferring files to and from tape, it is still used on disk-based storage to combine files before they are compressed. ● tar (file format) http://en.wikipedia.org/wiki/.tar 6 tarball ● A tar file or compressed tar file is commonly referred to as a tarball. ● The "tarball" format combines tar archives with a file-based compression scheme (usually gzip). ● Commonly used for source and binary distribution on Unix-like platforms, widely available elsewhere.
    [Show full text]
  • Package Management Security
    Package Management Security Justin Cappos, Justin Samuel, Scott Baker, John H. Hartman University of Arizona Computer Science Department {justin, jsamuel, bakers, jhh}@cs.arizona.edu Abstract Package management is the task of determining which packages should be installed on a host and then downloading and installing those packages. This paper examines the popular package managers APT and YUM and presents nine feasible attacks on them. There are attacks that install malicious packages, deny users package updates, or cause the host to crash. This work identifies three rules of package management security: don’t trust the repository, the trusted entity with the most information should be the one who signs, and don’t install untrusted packages. The violation of these rules leads to the described vulnerabilities. Unfortunately, many of the flaws are architectural in nature, so repair requires more than patches to APT and YUM. While the rules of package management security argue that the design of existing package managers is insufficient, they do not prescribe how to provide security. This led to the development of three de- sign principles for building a secure package manager: selective trust delegation, customized repository views, and explicitly treating the repository as untrusted. These principles were used to construct a pack- age manager Stork which is not vulnerable to the attacks identified for YUM and APT. Stork has been in use for four years and has managed over half a million clients. 1 Introduction Package managers are a popular way to distribute software (bundled into archives called packages) for modern operating systems [4, 11, 37].
    [Show full text]