{"id":27867599,"url":"https://github.com/icculus/static-bugzilla","last_synced_at":"2026-02-15T18:31:15.811Z","repository":{"id":274670528,"uuid":"923671347","full_name":"icculus/static-bugzilla","owner":"icculus","description":"Scripts to turn a Bugzilla instance into a static, read-only archive.","archived":false,"fork":false,"pushed_at":"2025-01-28T20:53:23.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T21:01:05.928Z","etag":null,"topics":["archive","bugzilla"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icculus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["icculus"],"patreon":"icculus"}},"created_at":"2025-01-28T16:59:59.000Z","updated_at":"2025-06-10T08:32:55.000Z","dependencies_parsed_at":"2025-01-28T18:23:05.859Z","dependency_job_id":"f8b45683-2ca9-404a-8d25-c6c4c1406893","html_url":"https://github.com/icculus/static-bugzilla","commit_stats":null,"previous_names":["icculus/static-bugzilla"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/icculus/static-bugzilla","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icculus%2Fstatic-bugzilla","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icculus%2Fstatic-bugzilla/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icculus%2Fstatic-bugzilla/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icculus%2Fstatic-bugzilla/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icculus","download_url":"https://codeload.github.com/icculus/static-bugzilla/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icculus%2Fstatic-bugzilla/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29486507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T15:33:17.885Z","status":"ssl_error","status_checked_at":"2026-02-15T15:32:53.698Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["archive","bugzilla"],"created_at":"2025-05-04T22:50:24.530Z","updated_at":"2026-02-15T18:31:15.783Z","avatar_url":"https://github.com/icculus.png","language":"HTML","readme":"# static-bugzilla\n\n## What is this?\n\nThis is a hacky little piece of code I wrote to convert my ancient and\nabandoned Bugzilla installation into a static, read-only archive.\n\nThis let me decommission the Bugzilla instance but leave the data publically\navailable, keeping the most important URLs continuing to function. As an added\nbenefit, the data serves faster and the server no longer needs to keep\nBugzilla, MySQL, jobqueue.pl, etc, running.\n\nIt might work for you.\n\nIt pulls all the data it needs from the public website, so you can do it\nwithout direct access to the database. This means you could probably use it\nto archive someone else's Bugzilla install that you don't control, given time\nand bandwidth to pull everything.\n\nIt is intended to make the individual bug pages and attachments available on\ntheir original URLs; everything else goes to a 404 page.\n\n## How to use this.\n\n- Clone this repository somewhere. Make sure perl and the curl command line\n  tool are installed. I ran this on Linux, it probably works on macOS, Windows\n  will probably need some small effort to set up.\n- If you intend to replace Bugzilla instead of just keep a static archive for\n  yourself, then on the Bugzilla webserver, you will need a way to run PHP\n  scripts. You will no longer need Perl, MySQL, or cgi-bin support.\n- Edit the top of `make_bugzilla_static_readonly.pl`. Look for the block\n  that says `# EDIT THESE LINES TO FIT YOUR BUGZILLA INSTALL!` ... read each\n  line and change it to match your target installation.\n- Run `make_bugzilla_static_readonly.pl` from the directory it is installed in.\n  It will create directories in the same place as it works. Make sure you can\n  access the Bugzilla installation over the network from this computer.\n- The script will begin pulling in data it needs from Bugzilla. If the script\n  is interrupted, it will pick up where it left off next time. It doesn't\n  move files into place until they are ready, so a power outage shouldn't\n  leave data half-prepared.\n- Downloading may take significant time. Running this script _directly on the\n  webserver itself_ (so no bandwidth delays) still took about four hours to\n  download 6678 bugs and 3639 attachments, as each HTTP request to Bugzilla\n  can take a few seconds. I shudder at running this against mozilla.org's\n  bugtracker which is dangerously close to 2 million bugs at the time of this\n  writing.\n- After download, the script will start generating static HTML pages for each\n  bug. This is pretty fast; my laptop chewed through 6678 bugs in 38 seconds,\n  but like the downloads, it is able to pick up where it left off if\n  interrupted.\n\nIf you're replacing Bugzilla:\n\n- Edit index.html and replace `noreply@example.com` with your email address (or\n  change the text in some other way).\n- After the script runs successfully, shut down Bugzilla on your server and\n  move the install out of the way. Copy this directory in its place, so that\n  show_bug.php will serve from the Bugzilla instance's root URL. The attachments\n  and bugs-html directories that the script generated should be here, too.\n- Change your webserver install so that show_bug.cgi requests go to\n  show_bug.php and attachment.cgi requests go to attachment.php...and that\n  all of these requests run as PHP pages. Note that many Bugzilla installations\n  have a second domain for attachments (for some security reason I never\n  understood), so attachment.cgi might run from, say, bugzilla.example.com and\n  also bugzilla-attachments.example.com, depending on your site's config.)\n- Make sure the webserver serves index.html for all 404 responses, which\n  explains that Bugzilla is gone and most of its URLs are no longer available.\n  Feel free to edit this index.html as appropriate.\n- Make sure the webserver serves images/favicon.ico and has the correct mimetype.\n- There is an Apache2 .htaccess file to block off files that shouldn't be\n  accessed directly on the web; you might have to deal with yourself this if\n  not using Apache.\n\nMy Apache virtual host config looks something like this:\n\n```\nServerAdmin bugmaster@example.com\nDocumentRoot \"/webspace/bugzilla.example.com\"\nServerName bugzilla.example.com\nServerAlias bugs.example.com\nServerAlias bugzilla-attachments.example.com\n\nErrorDocument 404 /index.html\nAlias /show_bug.cgi /webspace/bugzilla.example.com/show_bug.php\nAlias /attachment.cgi /webspace/bugzilla.example.com/attachment.php\n\n\u003cDirectory \"/webspace/bugzilla.example.com\"\u003e\n    \u003cIfModule mod_php5.c\u003e\n        php_flag engine on\n    \u003c/IfModule\u003e\n\n    DirectoryIndex index.html\n\n    \u003cRequireAll\u003e\n        Require all granted\n    \u003c/RequireAll\u003e\n\u003c/Directory\u003e\n```\n\n\nOnce you're happy with everything:\n\n- You can delete `original-bugs-html`...but it is safe to leave it. Please\n  note that you won't be able to generate this data again unless you put the\n  original Bugzilla install back in place, so it might be better to leave it\n  here, in case you want to tweak the template or fix a script bug and rebuild\n  the static pages, etc.\n\n\n## I have bugs that are just spam that bots posted.\n\nDelete the static HTML files for them and the PHP code will report it as an\ninvalid bug. Since re-running the script will regenerate the static HTML, you\ncan also put a zero-byte file named BUGNUMBER-SPAM in the directory next to the\nstatic HTML (so bug number 6312 would have a file located at\n`bugs-html/6/3/6312-SPAM`). If this file exists, the PHP code will treat the\nbug report number as if it's invalid.\n\n\n## My bugzilla looked different.\n\nYou probably have to hand-edit template.html to match your site. This might\ntake some effort. Pay attention for `@symbol@` things in that file; those are\nreplaced with bug-specific data when the static pages are generated.\n\n\n## What if this doesn't work?\n\nThis worked for my Bugzilla install, but the code is fragile in many ways, so\na different version of Bugzilla, or some theme, or even just a quirk of a bug\nreport that I didn't run into, etc, might break it.\n\nIf you have problems, [file a bug](https://github.com/icculus/static-bugzilla/issues),\nor better yet, [send a patch](https://github.com/icculus/static-bugzilla/pulls), and\nwe can talk it through.\n\n## Thanks!\n\n--ryan.\n\n","funding_links":["https://github.com/sponsors/icculus","https://patreon.com/icculus"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficculus%2Fstatic-bugzilla","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficculus%2Fstatic-bugzilla","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficculus%2Fstatic-bugzilla/lists"}