{"id":13582505,"url":"https://github.com/Debian/ratt","last_synced_at":"2025-04-06T14:30:58.686Z","repository":{"id":36503073,"uuid":"40808748","full_name":"Debian/ratt","owner":"Debian","description":"Rebuild All The Things!","archived":false,"fork":false,"pushed_at":"2022-08-05T09:02:56.000Z","size":56,"stargazers_count":33,"open_issues_count":5,"forks_count":15,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-03-20T14:10:56.090Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Debian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-16T09:52:38.000Z","updated_at":"2024-09-20T02:03:49.000Z","dependencies_parsed_at":"2022-09-06T16:40:16.037Z","dependency_job_id":null,"html_url":"https://github.com/Debian/ratt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debian%2Fratt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debian%2Fratt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debian%2Fratt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debian%2Fratt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Debian","download_url":"https://codeload.github.com/Debian/ratt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441706,"owners_count":20939348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:46.801Z","updated_at":"2025-04-06T14:30:58.438Z","avatar_url":"https://github.com/Debian.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Description\n\nratt (“Rebuild All The Things!”) operates on a Debian .changes file of a just-built package, identifies all reverse-build-dependencies and rebuilds them with the .debs from the .changes file.\n\nThe intended use-case is, for example, to package a new snapshot of a Go library and verify that the new version does not break any other Go libraries/binaries.\n\n# Installation (from git, for hacking on ratt)\n\nPlease install ratt from Debian. In case you want to hack on ratt, you can use the following commands to install Go, download ratt from git and compile/install it:\n\n```bash\nsudo apt-get install golang-go\ngit clone https://github.com/Debian/ratt\ncd ratt\ngo install\n```\n\nStart the resulting binary in `~/go/bin/ratt`:\n\n```bash\n~/go/bin/ratt -help\n```\n\nAfter making changes to the code, to recompile and install it again, use:\n\n```bash\ngo install\n```\n\n# Usage\n\nLet’s assume you build a new version of a Go library, like so:\n\n```bash\ndebcheckout golang-github-jacobsa-gcloud-dev\ncd golang-github-jacobsa-gcloud-dev\ndch -i -m 'dummy new version'\ngit commit -a -m 'dummy new version'\ngbp buildpackage --git-pbuilder  \n```\n\nNow you can use ratt to identify and rebuild all reverse-build-dependencies:\n```\n$ ratt golang-github-jacobsa-gcloud_0.0\\~git20150709-2_amd64.changes         \n2015/08/16 11:48:41 Loading changes file \"golang-github-jacobsa-gcloud_0.0~git20150709-2_amd64.changes\"\n2015/08/16 11:48:41  - 1 binary packages: golang-github-jacobsa-gcloud-dev\n2015/08/16 11:48:41  - corresponding .debs (will be injected when building):\n2015/08/16 11:48:41     golang-github-jacobsa-gcloud-dev_0.0~git20150709-2_all.deb\n2015/08/16 11:48:41 Loading sources index \"/var/lib/apt/lists/ftp.ch.debian.org_debian_dists_sid_contrib_source_Sources\"\n2015/08/16 11:48:41 Loading sources index \"/var/lib/apt/lists/ftp.ch.debian.org_debian_dists_sid_main_source_Sources\"\n2015/08/16 11:48:43 Loading sources index \"/var/lib/apt/lists/ftp.ch.debian.org_debian_dists_sid_non-free_source_Sources\"\n2015/08/16 11:48:43 Building golang-github-jacobsa-ratelimit_0.0~git20150723.0.2ca5e0c-1 (commandline: [sbuild --arch-all --dist=sid --nolog golang-github-jacobsa-ratelimit_0.0~git20150723.0.2ca5e0c-1 --extra-package=golang-github-jacobsa-gcloud-dev_0.0~git20150709-2_all.deb])\n2015/08/16 11:49:19 Build results:\n2015/08/16 11:49:19 PASSED: golang-github-jacobsa-ratelimit_0.0~git20150723.0.2ca5e0c-1\n```\n\nratt uses `sbuild(1)` to build packages, see https://wiki.debian.org/sbuild for instructions on how to set up sbuild. Be sure to add `--components=main,contrib,non-free` to the sbuild-createchroot line in case you want to deal with packages outside of main as well.\n\n# Targeting a different suite\n\nImagine you’re running Debian stable on your machine, but you’re working on a package for Debian unstable (“sid”). Unless you already have configured a corresponding `sources.list` entry for sid, you will encounter an error message like this:\n\n```\n$ ratt golang-google-grpc_1.11.0-1_amd64.changes\n2019/01/19 10:44:34 Loading changes file \"golang-google-grpc_1.11.0-1_amd64.changes\"\n2019/01/19 10:44:34  - 1 binary packages: golang-google-grpc-dev\n2019/01/19 10:44:34 Corresponding .debs (will be injected when building):\n2019/01/19 10:44:34     golang-google-grpc-dev_1.11.0-1_all.deb\n2019/01/19 10:44:34 Setting -dist=sid (from .changes file)\n2019/01/19 10:44:34 Could not find InRelease file for sid . Are you missing sid in your /etc/apt/sources.list?\n```\n\nThe most direct solution is to add sid to your `/etc/apt/sources.list` file, then set `Default-Release` to stable, so that apt prefers the same packages as before your addition:\n\n```\n# echo 'deb http://deb.debian.org/debian sid main' \u003e\u003e /etc/apt/sources.list\n# echo 'deb-src http://deb.debian.org/debian sid main' \u003e\u003e /etc/apt/sources.list\n# echo 'APT::Default-Release \"stable\";' \u003e\u003e /etc/apt/apt.conf\n# apt update\n$ ratt ...\n```\n\nAn alternative solution is to use `chdist(1)`, a tool that allows to create and maintain different apt trees for different suites. Assuming that you have a sid distribution ready in your `~/.chdist`, you can then use it by setting the environment variable `APT_CONFIG`:\n\n```\nAPT_CONFIG=~/.chdist/sid/etc/apt/apt.conf ratt ...\n```\n\n# Restricting the set of packages that will be built\n\nIn some cases there are many build dependencies; to focus on a smaller set of packages, invoke ratt with the `-include` / `-exclude` options.\n\nTo only build selected packages, use:\n\n```\nratt -recheck -include '^(hwloc|fltk1.3|wcslib|ccfits|qevercloud|libstxxl|caffe|frobby|starpu)$' ../doxygen_1.8.17-1_amd64.changes\n```\n\nTo exclude certain packages (for example those with longer build times):\n\n```\nratt -recheck -exclude '^(gcc-9|gcc-8|llvm-toolchain-10|libreoffice|trilinos|llvm-toolchain-9|llvm-toolchain-8|llvm-toolchain-7|gcc-snapshot|gcc-10|deal.ii|kodi|vg|qgis|openms|siconos|ball|gtg-trace|libsbml|dcmtk|gromacs|gudhi|kicad|libpwiz)$' ../doxygen_1.8.17-1_amd64.changes\n```\n\n**Note**: you need to escape the `+` sign in package names as in `dbus-c\\+\\+` to avoid messing up the regexp expression.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDebian%2Fratt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDebian%2Fratt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDebian%2Fratt/lists"}