Skip to content

Latest commit

 

History

History
119 lines (82 loc) · 3.96 KB

lab4.md

File metadata and controls

119 lines (82 loc) · 3.96 KB

Software Distribution

In this lab, you will explore software distribution strategies and best practices. You will gain insights into the different approaches used to distribute software and understand the importance of effective software distribution in the development lifecycle. Follow the tasks below to complete the lab assignment.

Task 1: Configure and Use a Local Package Repository

Objective: Set up a local package repository and use it to install packages.

  1. Create a Local Repository:

    • Create a directory to hold your repository and place some .deb files in it.

      mkdir -p ~/local-apt-repo
      cp /path/to/package.deb ~/local-apt-repo/
  2. Generate the Package Index:

    • Use dpkg-scanpackages to create a Packages file. Compress this file into a Packages.gz archive.

      dpkg-scanpackages ~/local-apt-repo /dev/null | gzip -9c > ~/local-apt-repo/Packages.gz
  3. Add the Local Repository to Your Sources List:

    • Add the repository to your sources.list.

      echo "deb [trusted=yes] file:/home/yourusername/local-apt-repo ./" | sudo tee /etc/apt/sources.list.d/local-apt-repo.list
      sudo apt update
  4. Verify the Contents of the Packages.gz File::

    • Check that the Packages.gz file contains the correct paths and metadata for your .deb files, it must be relative path like ./your_package.deb. Also you can see the package name there. Then check the repository of your package, make sure it's local one.

      zcat Packages.gz
      apt policy your-package-name
  5. Install a Package from the Local Repository:

    • Install a package using apt from your local repository.

      sudo apt install your-package-name
  6. Document the Process:

    • Create a submission4.md file.
    • Provide step-by-step documentation of your setup and installation process in the submission4.md file.

Task 2: Simulate Package Installation and Identify Dependencies

Objective: Use apt to simulate package installation and identify dependencies without actually installing the packages.

  1. Choose a Package to Simulate:

    • Select a package to simulate its installation.

      apt-cache showpkg your-package-name
  2. Simulate the Installation:

    • Use the -s flag to simulate the installation.

      sudo apt-get install -s your-package-name
  3. Analyze the Output:

    • Identify the dependencies and the packages that would be installed.
    • Document the findings in the submission4.md file, including which dependencies are required and their versions.

Task 3: Hold and Unhold Package Versions

Objective: Prevent a package from being upgraded and then allow it to be upgraded again.

  1. Install a Package:

    • Install a package that is commonly updated.

      sudo apt install your-package-name
  2. Hold the Package:

    • Use apt-mark to hold the package.

      sudo apt-mark hold your-package-name
  3. Verify the Hold Status:

    • Check the status of held packages.

      apt-mark showhold
  4. Unhold the Package:

    • Use apt-mark to unhold the package.

      sudo apt-mark unhold your-package-name
  5. Documentation:

    • Document the steps taken to hold and unhold the package, including any verification commands in the submission4.md file.

Additional Resources

Guidelines

  • Use proper Markdown formatting for documentation files.
  • Organize files with appropriate naming conventions.
  • Create a Pull Request to the main branch of the repository with your completed lab assignment.

Note: Actively explore and document your findings to gain hands-on experience with apt and software distribution strategies.