{"id":15148640,"url":"https://github.com/anoduck/biber-openbsd","last_synced_at":"2025-04-07T04:28:56.062Z","repository":{"id":226512730,"uuid":"768380616","full_name":"anoduck/Biber-OpenBSD","owner":"anoduck","description":"A repository for needed files to build Biber on OpenBSD; Discovered out of desparation in the middle of the night.","archived":false,"fork":false,"pushed_at":"2025-03-24T00:48:12.000Z","size":153,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T01:32:51.085Z","etag":null,"topics":["biber","biblatex","openbsd"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anoduck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-03-07T01:13:49.000Z","updated_at":"2025-03-24T00:48:16.000Z","dependencies_parsed_at":"2024-10-10T02:40:29.659Z","dependency_job_id":null,"html_url":"https://github.com/anoduck/Biber-OpenBSD","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"3f2df9fe7d2cb4cd0d3f1aba8b337a4930738674"},"previous_names":["anoduck/biber-openbsd"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoduck%2FBiber-OpenBSD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoduck%2FBiber-OpenBSD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoduck%2FBiber-OpenBSD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoduck%2FBiber-OpenBSD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anoduck","download_url":"https://codeload.github.com/anoduck/Biber-OpenBSD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247592631,"owners_count":20963555,"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":["biber","biblatex","openbsd"],"created_at":"2024-09-26T13:21:22.291Z","updated_at":"2025-04-07T04:28:56.056Z","avatar_url":"https://github.com/anoduck.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to Biber-OpenBSD 👋\u003c/h1\u003e\n\u003cp\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-0.0.6-blue.svg?cacheSeconds=2592000\" /\u003e\n  \u003ca href=\"https://anoduck.mit-license.org\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Needed files for building Biber on OpenBSD\n\n## Biber OpenBSD\n\n### Notations on working directory\n\n*Some people* do not like to clutter up their home directory (I am poking fun @madaalch), where some people\nare of the exact opposite affinity. This is more or less simply differences in philosophical perspectives of\nUnix. This being said, the work directory for this installation can be where ever and whatever you want it to\nbe, `~/Sandbox` is used to conserve the effort of the Author, as at the time of writing `~/Sandbox/`\nwas already referenced by the build files. In retrospect, a more traditional working directory would have been\n`/opt` or `/usr/src`.\n\nIf you decide to use another working directory other than `~/Sandbox/` then you will need to edit the build\nfiles to reflect this change. To make things painfully obvious, the \"build files\" are the files located in\n`dist/OpenBSD` of this repository.\n\n#### BibLaTeX by @madaalch\n\nIn order for biber to work, it needs a compatible version of BibLaTeX.\nOnce you have verified that biber is functioning and have copied it to the bin directory of your choice run `biber --version` and make note.\n\nTo find the compatible version, visit the [biber documentation page](https://sourceforge.net/projects/biblatex-biber/files/biblatex-biber/development/documentation) and in biber.pdf look at compatibility matrix.\nDownload the corresponding version of BibLaTeX from [sourceforge](https://sourceforge.net/projects/biblatex)\n\nRun `kpsewhich -var-value=TEXHOME` and make note of directory;\n(it should be `~/texmf`; if this doesn't exist then create it).\n`cd` to directory which contains the downloaded `biblatex-*.tgz`.\n`tar -zxvf biblatex-*.tgz -C ~/texmf` where * is the version you have just downloaded.\n`texhash ~/texmf`\n\n*NOTE* after running the above command, `kpsewhich -var-value=TEXHOME` will no longer print anything.\n\nNow go back to the `~/Sandbox/biber/testfiles` directory and `pdflatex test ; biber test ; pdflatex test`.\nOpen the test.pdf; if you have no errors then your test.pdf will list a single successful reference.\n\nBack up the document that you wish to run biber with.\nRun `pdflatex yourdocumentname ; biber yourdocumentname` and check for errors.\nNote that if your .bib file's name contains 12 or more characters you will get an error,\n(example bibliography.bib will be truncated to bibliograph.bib, which biber will not be able to find.)\nif needs be rename it to biblio.bib or something similarly short.\nNow recompile your document and you should have all your beautiful references sorted.\n\n## Preliminary Decisions\n\nYou can spend time trying to get the perlbrew installation script working in an alternate shell \n(e.g., ksh, zsh), but it's easier to just install bash. Most of us already have bash installed on our\nsystem, but if you haven't done so yet, it's a good time to consider it and join the cool kid club.\n\n```bash\ndoas pkg_add -U bash\n```\nNow your ready for the installation.\n\n## Installing Biber on OpenBSD\n\nIt's time to play everyone's favorite game, \"Do as I say, not as I do.\"\n\nAs you perform this install, keep in mind, you do not want to use `sudo` or `doas` for any of the\nfollowing commands, nor do you want to perform these steps as root. Doing so **will result in the\ncorruption of your system's perl distribution**.\n\n### Install Perlbrew\n\nTo install Biber on OpenBSD, Perlbrew is required. The installation script for perlbrew is below.\n\n```bash\ncurl -L https://install.perlbrew.pl | bash\n```\n\nOnce complete, open your shell's rc file and ensure the following lines are in it.\n\n```bash\nsource ~/perl5/perlbrew/etc/bashrc\n```\n\nThis can be done with a quick grep, `cat ~/.bashrc | grep perlbrew`, and if you do not see it you can use\necho to add it, `echo \"source ~/perl5/perlbrew/etc/bashrc\" \u003e\u003e ~/.bashrc`.\n\n#### Setup Perlbrew\n\nYou will need to use perlbrew to build and install the latest stable perl release. This will take\nseveral minutes to compile.\n\n```bash\nperlbrew install perl-stable \u003e /dev/null 2\u003e\u00261 | tail -f ~/perl5/perlbrew/build.perl-*.log\n```\n\nNext install cpm, the perl package manager. If your not familiar with cpm, it is a little different from cpan,\nbut it is much faster. Cpm by defaults install packages by creating a local folder for perl\nlibraries, and places the installed packages there, this is not what we want. What we want is for\ncpm to install packages in perlbew’s path where perlbrew can find it. This is done with use of the\n`-g` flag. Everytime you run cpm, you will need to use the `-g` flag, which tells cpm the packages\nare to be installed for global use, just like you would with npm. \n\n```bash\nperlbrew install-cpm\n```\n\nNow that perlbrew and cpm are setup, it is best to open up a new shell to prevent any of the\nenvironment variables we are about to setup from bleading over into other actions you might do later\non.\n\nOnce a new shell is open, inform perlbrew you want to use the perl release you just installed.\n\n```bash\nperlbrew use $(perlbrew list)\n```\n\nThis will setup all of those environmental variables we talked about, and should complete the setup\nof perlbrew for the install.\n\n### Create a work directory\n\nFor this build to work and have all the preconfigured paths worked properly, a work directory named\n\"Sandbox\" will need to be used to contain all the folders and files. If you do not already have a\nsandbox, go ahead and create that directory.\n\n``` sh\nmkdir -p $HOME/Sandbox \u0026\u0026 cd $_\n```\n\n### Acquire dependencies and source\n\nGo ahead and clone the repository with the source code for biber inside your sandbox.\n\n```bash\ngit clone https://github.com/plk/biber\n```\n\nIt is time to install the required perl dependencies for the build, which will be done with\ncpm. This will be done in two steps as to avoid cpm from returning an error message stating you are\nmissing a required perl library.\n\n```bash\n# First install the build module to avoid the error.\ncpm install -g Module::Build\n# Then install the remainder of the dependencies needed for the build.\ncpm install -g Readonly::XS Pod::Simple Pod::Simple::TranscodeSmart \\\nPod::Simple::TranscodeDumb Pod::Perldoc Text::BibTeX Text::CSV IO::Socket::SSL DateTime DateTime::Format::Builder DateTime::Calendar::Julian XML::LibXML::Simple XML::LibXSLT\n```\n\n### Install Perl Packer\n\n*OK, I admit it. I screwed up and forgot to mention this the first time I wrote this file.*\n\nBefore going any further, take the time to install `pp` the perl packer. Later on, the distribution build\nscript will use `pp` to package the biber binary you are diligently working to build.\n\n``` sh\ncpm install -g pp\n```\n\n### Setting up the repository for a successful build \n\nThis is where the other files in this repository play an important role. Take a moment to examine\nthis repository’s tree structure. You will want to follow the same structure when you copy the files\nfrom this repository into the root folder of the biber repository you just cloned.\n\n``` sh\n.\n|-- README.md\n|-- dist\n|   `-- openbsd_amd64\n|       |-- biber.files\n|       `-- build.sh\n`-- local\n    `-- libcrypt.so.2\n```\n\n#### Clone this repository and copy it’s files into the Biber Repository\n\nYou should still be in the root of your sandbox; if not, `cd ~/Sandbox`. Clone this repository. In other words,\n`cd..`.\n\n``` sh\ngit clone https://github.com/anoduck/Biber-OpenBSD \u0026\u0026 cd Biber-OpenBSD\n```\n\nNow copy the contents of this repository into your biber repository, ensuring to maintain the same folder\nstructure.\n\n``` sh\ncp -r dist/openbsd_amd64 ../biber/dist/\n# AND\ncp -r local ../biber/\n```\n\nThis should setup the biber repository for a successful build.\n\n### Build biber\n\nHaving to rarely compile perl binaries from source, the next few steps threw me for a loop the first\ntime. This is because developers often provide, and sometimes are required to provide, users with\ndifferent means to install their software. With biber, this is not the case, and perl provides all\nthe flexibility for different platforms one might need. \n\nChange Directory into the biber repository.\n\n``` sh\ncd ../biber\n```\n\n#### Execute the perl build script\n\nRunning `perl Build.PL`, will generate a script file confusingly labeled \"Build\". This script will\nbe used to ensure we have satisfied all the required dependencies, build all of biber’s libraries,\nand prepare the \"dist\" file for compilation. \n\n\n``` sh\n# Generate the \"Build\" script\nperl Build.PL\n# Use \"Build\" to confirm the dependencies\n./Build installdeps\n# Then use \"Build\" to build biber's libraries\n./Build\n# Finally install those libraries locally\n./Build install\n```\n\n### Install btparse\n\nBtparse is \"the C component of btOOL, a pair of libraries for parsing and \n processing BibTeX files.\"\n\nIn order to install the bparse package for perl, you will need to manually install it\nyourself. This involves downloading the library, compiling it, and installing it in your perlbrew\nlibrary path. Perlbrew makes doing all of this fairly straight forward.\n\nAt the time of writing, the current stable perl release is `5.38.2`. This is important, because you\nneed to make sure the downloaded library is compatible with the version of perl you installed. The\nsource code for this package can be found on\n[launchpad](https://launchpad.net/ubuntu/+source/libtext-bibtex-perl). The url for the\nsource archive used to successfully build biber is included in the command below. So, let’s download\nit (using `ftp` as it is native to OpenBSD).\n\n``` sh\nftp https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/libtext-bibtex-perl/0.88-3build3/libtext-bibtex-perl_0.88.orig.tar.gz\n```\n\nExtract it, cd into it, and run the build script.\n\n``` sh\ntar -zxvf libtext-bibtex-perl_0.88.orig.tar.gz \u0026\u0026 cd Text-BibTeX-0.88 \u0026\u0026 perl Build.PL \u0026\u0026 ./Build\n```\n\nOnce successfully built, you will need to move/merge parts of this directory into the biber repo. Specifically, you\nwill need to merge the `blib` folder from this directory with the `blib` folder in the biber\nrepository.\n\n``` sh\n# If you use the standard cp\ncp -R blib/* ../../blib/\n# If you use gnu cp\ncp -r blib/* ../../blib/\n```\n\n#### Finally, build and package biber\n\nNow biber is ready to be built, and it’s about damn time. You will need to change directory into\nOpenBSD’s distribution specific folder and run the build from there.\n\n``` sh\ncd dist/openbsd_amd64\n./build.sh\n```\n\nYou might need to update the version number of libraries in `build.sh`. You may also need to install some (e.g., `doas pkg_add gdbm openssl-3.3.2p0v0`).\n\n### Run the test to ensure it works\n\nBeing brutally honest, it took four tries before a functioning biber executable was built. Every one\nof those four builds completed, but failed to run during testing. So testing your build is\nimportant.\n\nTo test your newly created binary, you will want to change directories to the \"testfiles\" directory\nlocated in the root of the biber repository. From there, test with the following command.\n\n``` sh\n# Change Dir\ncd ../../testfiles\n# Now run the test\n../dist/openbsd_amd64/biber-2.8.amd64-openbsd7 --validate-control --convert-control test\n```\n\nIf the test checks out, you now have a working biber binary.\n\n### Wrapping it up\n\nSince the binary we just built is a self extracting archive, containing within itself all the needed\nlibraries to function, it can safely be placed in your path at `/usr/local/bin/biber`. Which is where Emacs\nwill look for it, in case you are wondering. \n\nAs for Perlbrew, you can purge it from your system if desired, but it is recommended to keep Perlbrew\ninstalled for future builds of biber. Instead just remove the currently installed perl build and disable perlbrew.\nThis will reduce the overall consumption of disk space greatly.\n\n```bash\n# See what version of perl you installed\nperlbrew list\n# And then remove that version. Ex. 5.38.2\nperlbrew uninstall perl-5.38.2\n# Then disable perlbrew for this shell\nperlbrew off\n```\n\nAnd, with that your done!\n\n### Caveats\n\n- Just be aware the executable is built from perl libraries that may not be native to your system. More\n  than likely, this never should be the cause of any issues, but is healthy to keep a mental note of it.\n\n## Author\n\n👤 **Anoduck**\n\n* Website: http://anoduck.github.io\n* Github: [@anoduck](https://github.com/anoduck)\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n## 📝 License\n\nCopyright © 2024 [Anoduck](https://github.com/anoduck).\u003cbr /\u003e\nThis project is [MIT](https://anoduck.mit-license.org) licensed. Why this link does not include my username is\nunknown.\n\n***\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoduck%2Fbiber-openbsd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanoduck%2Fbiber-openbsd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoduck%2Fbiber-openbsd/lists"}