{"id":20435878,"url":"https://github.com/andyneff/dockmock","last_synced_at":"2026-06-01T08:32:33.616Z","repository":{"id":90969448,"uuid":"47768884","full_name":"andyneff/dockmock","owner":"andyneff","description":"Creating rpms in repeatable docker environments, automatically, and with dependency support","archived":false,"fork":false,"pushed_at":"2016-01-08T04:20:23.000Z","size":136,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T06:43:42.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/andyneff.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-12-10T15:02:08.000Z","updated_at":"2016-01-12T20:27:26.000Z","dependencies_parsed_at":"2023-06-19T14:38:04.659Z","dependency_job_id":null,"html_url":"https://github.com/andyneff/dockmock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andyneff/dockmock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockmock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockmock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockmock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockmock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyneff","download_url":"https://codeload.github.com/andyneff/dockmock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyneff%2Fdockmock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33767435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-15T08:38:15.917Z","updated_at":"2026-06-01T08:32:33.597Z","avatar_url":"https://github.com/andyneff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RPM Building in Dockers #\n\nThis package accomplishes three tasks\n\n1. Builds an rpm in a pristine docker, similar to https://github.com/alanfranz/docker-rpm-builder\n2. Allows one of your rpms to depend on another\n3. K.I.S.S.\n\nRight now only Centos 7 is considered\n\nOther OSes will not be an immediate focus, CUDA support will be\n\n## Install ##\n\nRequires Docker 1.9 or newer when running windows because I mount individual \nfiles in boot2docker, and at least from windows, this doesn't work until 1.9.\nIn linux, it works back as far as at least 1.7.\n\n```\ngit clone ? .\nsudo make install\n```\n\nNow the rpmdocker repo has been installed, but disabled by default to prevent \nthe OS from trying to use this repository to satisfy dependencies. There is \nstill a risk, but this helps.\n\n```\nsudo make check_dep\n```\n\nLook for any packages NOT from the rpmdocker repo.\n\nIf you find any, and want to know why, look for lines in the `Resolving Dependencies`\nsection that start with `--\u003e Processing Dependency`, for example:\n\n```\nResolving Dependencies\n--\u003e Running transaction check\n---\u003e Package boost_local.x86_64 0:1.58.0-8.el7 will be erased\n---\u003e Package boost_local-atomic.x86_64 0:1.58.0-8.el7 will be erased\n--\u003e Processing Dependency: boost-atomic = 1.53.0-23.el7 for package: boost-1.53.0-23.el7.x86_64\n---\u003e Package boost_local-chrono.x86_64 0:1.58.0-8.el7 will be erased\n---\u003e Package boost_local-context.x86_64 0:1.58.0-8.el7 will be erased\n...\n```\n\n**Note**: Only the first reason for the dependency is listed. In this case, \n`boost-chrono-1.53.0-23.el7.x86_64` is also needed, etc... So instead of fixing each\ndependency of `boost-1.53.0-23.el7.x86_64` one at a time, next \n\n```\nyum install $(rpm -qR  boost | \\grep -v ^rpmlib\\( | sed 's/\\([^ ]*\\).*/\\1/')\n\n```\n\nAn automatic check can be previewed with `sudo make fix_dep` and automatically \nrun with `sudo make fix_dep FIX_DEP_ARG=-y`\n\n\n## Arguments ##\n\n1 - Spec filename (or basename without extension)\n2 - (Optional) 1 for interactive bash instead of build\n\n## Environment Variable ## \n\nNVCC - \nDOCKRPM_FAKE  -\nDOCKRPM_FAKE_ARCH - \nDOCKRPM_FAKE_VERSION -\nDOCKRPM_MOUNT_REPO -\nDOCKRPM_MOUNT_GPG -\nRUN_DEP_CHECK -\nRUN_DEP_CHECK_DOCKER - Run Dependency check in Docker or Locally on host\n## Special dirs ##\n\n/repos\n/gpg\n\n## Writing RPMs ##\n\nTo alleviate OS conflicts, always\n\n```spec\n%include %{_sourcedir}/common.inc\nSource999:        common.inc\n%define real_name softwarename\nName:             %{real_name}_local\nProvides:         %{real_name}\n```\n\nMost likely `%prep` will look like \n\n```spec\n%prep\n%setup -q -n %{real_name}-%{version}\n```\n\nMake sure you always add _local for two reasons. \n\n1. It needs to be different so that yum doesn't do stupid things. While rpm is\nsmart enough to do the right thing, yum is NOT. The suffix is needed for yum\n2. _local is added to packages names when dockrpm.py is searching for which\nspec needs to be build. This is part of the automated dependency checking and\nbuilding. Unfortunately the `rpm -q --specfile` command does not list `--provides`\nwith the `--qf` flag ;(\n\nThis also means when \n\nYou can `Obsoletes: %{name}-blah`\nYou should `Provides: %{real_name}-blah`\n\nThat way, all you need is\n\n`Requires: RealName-blah`, no _local. This works because of the `Provides:` line\n\n## Troubleshooting ##\n\nIt IS possible that installing these rpms could satisfy a dependency for an OS\npackage dependency. To check this, run \n\n## Issues ##\n\n- there is one call to `rpm` and one to `spectool` run in the host. While these\nare not a problem, it ties the host to centos/having those installed on other oses\nIt would be nice to have a fail over to docker in case those done exist on the\nhost\n\n- yum-builddep is used to auto install dependencies (And to determine the \ndependencies in two different setup steps). yum-builddep does NOT LIKE nosrc.rpm\nfiles, so use of the `NoSource:` directive were causing it to fail. The file is\nrenames to make yum-builddep happy","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyneff%2Fdockmock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyneff%2Fdockmock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyneff%2Fdockmock/lists"}