Skip to content

Enhancing debian packaging project docs updates #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 66 additions & 1 deletion docs/2025/debian-packaging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,69 @@
sidebar_position: 3
title: Introduction
slug: /2025/debian-packaging/
---
---

## Author:

[Ahmed Gamal](https://github.com/Ahmed-Gamal24)

## Contact Info:

- [Email](mailto:ahmed.gamal9541@gmail.com)
- [GitHub](https://github.com/Ahmed-Gamal24)
- [LinkedIn](https://www.linkedin.com/in/ahmed-gamal4/)

## Project Title:

Enhancing Debian Packaging for FOSSology

## What's the project about?

The goal of this project is to improve and modernize the **Debian packaging** of [FOSSology](https://www.fossology.org/), an open-source license compliance software system. The project ensures that FOSSology can be built, installed, and distributed efficiently using native Debian tools and standards.

The final result will be a set of `.deb` packages that can be uploaded to Debian or used internally, making FOSSology easier to install and maintain in Debian-based systems. This includes handling dependencies, restructuring packaging files, adopting CMake build system integration, and ensuring compatibility with tools like `gbp`, `pbuilder`, and `lintian`.

---

## Key Deliverables

### 🛠 Modernize Debian Packaging Structure

- Integrate the latest **CMake-based build system** with Debian's `dh_auto_*` tools.
- Remove reliance on custom `Makefile` or manual install scripts where possible.
- Replace outdated packaging patterns with streamlined `debhelper` configurations.

### Produce Multiple Binary Packages

- Split FOSSology into modular `.deb` packages (e.g., `fossology-common`, `fossology-web`, `fossology-db`, etc.) for better package management.
- Ensure inter-package dependencies are declared properly via `control` file.

### Clean and Validate Packaging Files

- Audit and update `debian/control`, `rules`, `changelog`, `.install`, and `.patches`.
- Remove unused files and redundant overrides.
- Follow Debian Policy standards and fix all `lintian` warnings.

### Automate and Test the Build Process

- Use tools like `pbuilder` and `gbp buildpackage` to build in a clean chroot environment.
- Ensure reproducible builds.
- Simulate real-world installation and test core functionalities.

### Documentation and Community Updates

- Maintain progress documentation weekly in the [FOSSology GSoC GitHub repo](https://github.com/fossology/gsoc).
- Share insights, blockers, and achievements.
- Contribute helpful guides and notes for future Debian maintainers of FOSSology.

---

## Stretch Goals

- Package PHP and JS dependencies using native Debian packaging techniques (e.g., using `composer` and `npm2deb`).
- Explore integration into Debian's official archive (mentorship permitting).
- Create a user-friendly script or guide to build and install all packages with a single command.

---

> This project bridges FOSSology with the Debian ecosystem, making license compliance tooling more accessible and easier to deploy across free software distributions.
81 changes: 81 additions & 0 deletions docs/2025/debian-packaging/updates/2025-07-03.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
title: Community Bonding
author: Ahmed Gamal
author_url: https://github.com/Ahmed-Gamal24
tags: [gsoc25, debian-packaging, fossology]
---
<!--
SPDX-License-Identifier: CC-BY-SA-4.0

SPDX-FileCopyrightText: 2025 Ahmed Gamal <ahmed.gamal9541@gmail.com>
-->

# Community Bonding Meetings and Activities

## Introduction Meeting

**Date:** Jul 3, 2025

This was the first meeting for me in GSoC 2025, where I met with my mentors and other contributors in the Fossology community. The mentors outlined communication expectations and helped me understand the importance of engaging with the broader Debian and Fossology ecosystems.

---

## Meeting 1

**Date:** Jul 3, 2025

### Attendees

Complete FOSSology Community including
- Org admins
- Mentors of all the projects
- Contributors for GSoC 2025

---


### ✅ Project Goal

The project goal is to **create Debian packages for Fossology** so that it can be easily installed with all of its dependencies using standard Debian tools (e.g., `apt install fossology`). The goal is not a single `.deb` file, but rather **multiple packages**, each handling a module of Fossology in a clean and maintainable way.

---

### 🔍 Project Exploration

I began by exploring the Fossology project structure, especially the `debian/` directory, which is central to any Debian packaging effort. Here's what I found and learned:

- **`debian/changelog`** — Keeps a history of changes and versions.
- **`debian/control`** — Defines each binary package with its description and dependencies.
- **`debian/rules`** — The build script, usually based on `dh` and compatible with `CMake`.
- **Branches:** I cloned the Salsa repo using `gbp` and ensured I had `master`, `upstream`, and `pristine-tar` branches, as recommended.

---

### 🧪 Practice with Debian Packaging

To become comfortable with packaging:

- I **read Debian packaging documentation and articles** to understand the tools, workflows, and best practices.
- I **created my own dummy Debian package** as a practice project using `dh_make`, `debuild`, and manual editing of control files.
- I **used `pbuilder`**, a tool that creates an isolated chroot environment for building packages, ensuring my package doesn't rely on my system setup.

---

### 🚀 Technical Setup

- Set up local development environment.
- Cloned the upstream Fossology code and imported it properly with `gbp import-orig`.
- Linked changes to the upstream tarball and started iterating on package builds.

---

### 📁 Contributions to the Packaging Repo

- Began cleaning up and completing the `debian/` directory.
- Verified that each binary package matched the source structure.
- Adjusted CMake configurations to unify the build process (e.g., `install/db` was integrated into CMake using a patch).
- Identified and removed unneeded `.install` files when `debian/rules` was sufficient.
- Started reviewing and fixing `lintian` warnings for compliance.

---

57 changes: 57 additions & 0 deletions docs/2025/debian-packaging/updates/2025-07-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Week 1
author: Ahmed Gamal
author_url: https://github.com/Ahmed-Gamal24
tags: [gsoc25, debian-packaging, fossology]
---
<!--
SPDX-License-Identifier: CC-BY-SA-4.0

SPDX-FileCopyrightText: 2025 Ahmed Gamal <ahmed.gamal9541@gmail.com>
-->

# Week 1


## Debian Packaging Progress

This week focused on setting up a clean Debian packaging workflow for Fossology and beginning the actual packaging work using `git-buildpackage (gbp)`.

- Cloned the [Fossology Salsa repository](https://salsa.debian.org/fossology-team/fossology) using `gbp`, including the `upstream`, `pristine-tar`, and `master` branches.
- Imported the upstream tarball (`fossology_4.5.1.orig.tar.gz`) via `gbp import-orig`.
- Cleaned and updated the `debian/control` file to list all binary packages properly with accurate descriptions and dependencies.
- Verified and integrated CMake-based build support through `dh_auto_configure` and `dh_auto_build`.
- Fixed a build failure related to `make clean` by removing the generated `obj-*` build directories manually.
- Manually handled PHP vendor libraries by copying the `src/vendor/` directory into `debian/fossology-common/` since composer is not invoked during build.
- Removed the unnecessary `.install` file for `fossology-common` after migrating installation steps directly into the `debian/rules` file.
- Handled the `install/db` directory manually via a custom `make` command in `debian/rules`, since it lacks a standard `make install` target.
- Successfully generated all `.deb` packages using `gbp buildpackage` without fatal errors.

---

## Meeting 1

**Date:** Jul 10, 2025

This was a community-wide meeting with contributors and organization admins. Each GSoC contributor gave a short summary of their progress so far. I shared an overview of my packaging work, including the repo setup, how I’m using `gbp`, and how I’m building multiple `.deb` packages for Fossology.
---

## Meeting 2

**Date:** Jul 10, 2025

This was a focused technical meeting with mentors. I walked them through my progress in detail, including how I handled the upstream tarball, debian/control cleanup, PHP dependency setup, and manual handling of install/db. They confirmed I was on the right path and gave the following key suggestions for the next steps:

- Convert `install/db` to use CMake instead of a raw `make` call in `debian/rules`.
- Handle PHP Composer dependencies more properly — ideally by integrating `composer` or isolating the vendor files in a better way.
- Ignoring lintian warnnings for now
---

## Planning Next Week

For Week 2, I plan to:

- Create a `CMakeLists.txt` file under `install/db` and include it in the build system.
- Update the packaging process to stop using manual `make` commands.
- Explore better ways to handle `vendor/` dependencies, possibly via patches or pre-installed during build.
- Start fixing `lintian` warnings and bring the package closer to Debian standards.
5 changes: 5 additions & 0 deletions docs/2025/debian-packaging/updates/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Weekly Updates",
"position": 2
}