From 04f26af8c423649aa4085f8caa44f91aff7e9816 Mon Sep 17 00:00:00 2001 From: Toor Date: Tue, 25 Jun 2019 16:55:30 -0400 Subject: [PATCH] Added source prep section --- rpm_packaging_guide_tut/README.md | 8 +++++++ rpm_packaging_guide_tut/source_prep/LICENSE | 7 ++++++ rpm_packaging_guide_tut/source_prep/README.md | 23 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 rpm_packaging_guide_tut/source_prep/LICENSE create mode 100644 rpm_packaging_guide_tut/source_prep/README.md diff --git a/rpm_packaging_guide_tut/README.md b/rpm_packaging_guide_tut/README.md index 0d9fbe2..5959b6a 100644 --- a/rpm_packaging_guide_tut/README.md +++ b/rpm_packaging_guide_tut/README.md @@ -24,3 +24,11 @@ sudo install -m 0755 bello /usr/bin/bello We can add an install directive to our make files so that we can run `make install`. _note make files are usually written by the developer and not the packager_ + +# Tips and Tricks + +An RPM is a CPIO archive. You can view it's contents without installing it by: + +```bash +rpm2cpio .rpm | cpio -ivmd +``` \ No newline at end of file diff --git a/rpm_packaging_guide_tut/source_prep/LICENSE b/rpm_packaging_guide_tut/source_prep/LICENSE new file mode 100644 index 0000000..1c1edcd --- /dev/null +++ b/rpm_packaging_guide_tut/source_prep/LICENSE @@ -0,0 +1,7 @@ +Copyright 2019 Andrew Bednar + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR \ No newline at end of file diff --git a/rpm_packaging_guide_tut/source_prep/README.md b/rpm_packaging_guide_tut/source_prep/README.md new file mode 100644 index 0000000..9a6d515 --- /dev/null +++ b/rpm_packaging_guide_tut/source_prep/README.md @@ -0,0 +1,23 @@ +# Prepping source code + +_Note: The creation of a tarball for your source code is generally done by the developer not the packager_ + +In this exercise we are going to take the each of our hello world programs (cello, bello, and pello) and create a source archive. + + +## Commands + +Create a temporary directory and copy your source code and license into it. + +```bash +mkdir -p /tmp/bello-0.1 +cp -v ../bello /tmp/bell-0.1 +cp -v ./LICENSE tmp/bell-0.1 +``` + +Then create your archive +```bash +tar -cvzf bello-0.1.tar.gz bello-0.1 +``` + +Rinse and repeat for all the other archives. \ No newline at end of file