Skip to content
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

Create DEB package repository #1148

Closed
3 tasks
ad-m opened this issue Apr 4, 2020 · 3 comments
Closed
3 tasks

Create DEB package repository #1148

ad-m opened this issue Apr 4, 2020 · 3 comments
Labels

Comments

@ad-m
Copy link

ad-m commented Apr 4, 2020

Uses GAM sporadically. I have to manually update it each time. As I know, there is no Deb repository for software that speeds up this process.

In order to analyze the complexity of the problem, I used the following guide:
http://www.hackgnar.com/2016/01/simple-deb-package-creation.html
Thanks to it I was able to close the released binary file to the Deb package in less than 5 minuts.

When packages is generated there is need to make Deb repository.

I have in management Deb repository. To generate packages index you can use following command:

# Generate Packages
docker run -v $(pwd):/repo/ --workdir "/repo/linux/${distro}" apt-scanpackages apt-ftparchive packages \
"dists/${codename}/pool/stable/amd64/" \
> "./linux/dists/${codename}/stable/binary-amd64/Packages";
# Generate Packages.gz
cat "./linux/dists/${codename}/stable/binary-amd64/Packages" | gzip -9 \
> "./linux/dists/${codename}/stable/binary-amd64/Packages.gz";
# Generate Contents
docker run -v $(pwd):/repo/ --workdir "/repo/linux/${distro}" apt-scanpackages apt-ftparchive contents \
"dists/${codename}/pool/stable/amd64/" -a amd64 \
> "./linux/dists/${codename}/stable/Contents-amd64";
# Generate Contents.gz
cat "./linux/dists/${codename}/stable/Contents-amd64" | gzip -9 \
> "./linux/dists/${codename}/stable/Contents-amd64.gz"
# Generate Release global
docker run -v $(pwd):/repo/ --workdir "/repo/linux/${distro}" apt-scanpackages apt-ftparchive \
-o APT::FTPArchive::Release::Origin="GAM" \
-o APT::FTPArchive::Release::Label="GAM" \
-o APT::FTPArchive::Release::Suite="${codename}" \
-o APT::FTPArchive::Release::Codename="${codename}" \
-o APT::FTPArchive::Release::Architectures="amd64" \
-o APT::FTPArchive::Release::Components="stable" \
release "dists/${codename}/" \
> "./linux/dists/${codename}/Release"

To sign repository index:

find repo -name '*.gpg' -delete ;
find repo -name 'InRelease' -delete;
find repo -name '*.gpg' ;
find repo -name 'InRelease' ;

find repo -name 'Release' -type f | while read FILE; do
	gpg --default-key "$GPG_KEYID" -abs -o "${FILE}.gpg" "$FILE";
done;
find repo -name 'Release' -type f | while read FILE; do
	out_dir=$(dirname "${FILE}");
	gpg --default-key "$GPG_KEYID" --clearsign -o "${out_dir}/InRelease" "$FILE";
done;

To host GAM repository you can use any HTTP server (Nginx, Apache2) without any modules (pure HTTP server static files). You can use even object storage (S3 etc.) for that.

As an open-source project, we can ask e.g. packagecloud.io for a package for open-source projects. Then all the management complexity will be handled by them, and we just need to generate a deb file (prepared guide) and send it to them (CLI is available for automation).

Following steps is recurred:

  • deb package – guide provided
  • repository generate - commands provided
  • repository hosting
@ghost
Copy link

ghost commented May 6, 2020

gam is very much not suited for packaging/distribution as it currently stands. See #791, #1140/#720. And that check-for-updates-like-its-1995-windows-noupdatecheck.txt nonsense would have to be removed.

@ad-m
Copy link
Author

ad-m commented May 6, 2020

I dare not agree that GAM cannot be packed. It fit to deb archive.

I notice that GAM is software that in many areas deviates from the standards of distribution repositories, e.g. in terms of configuration file locations, forcing updates and use of setup.py. Technically, however, it can now be distributed as a single binary file (so it is available as the "Releases" tab of the project) wrapped as a Deb repository, which will streamline the upgrade process. In subsequent versions, the package format can be developed to, for example, bring it closer to distribution standards (using setup.py, etc.)

@stale
Copy link

stale bot commented Aug 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Aug 4, 2020
@stale stale bot closed this as completed Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant