LICENSE | Loading last commit info... | |
README.md | ||
abchr | ||
abchr-buildall | ||
abchr-newchroot | ||
apkgvers |
APK Build Chroot tool
There are various build chains surrounding Alpine. Most solutions use
containerization, QEMU, and other technologies; meanwhile I just wanted a
simple way to build packages and install development utilities without shitting
up my production system. abchr
is an attempt to create a simple solution to
my simple problem. It isn't very flexible, requires root access for chroot, and
won't allow you to (easily) build for multiarch, but it works.
Installation
- Create a directory and three subdirectories named
bin
,alpine
, andaports
. Your tree should look like this:+ abchr + bin + alpine + aports
- Clone the repo to the
bin
directory. - Run
abchr-newchroot $(id -u)
to populate thealpine
directory with a new installation of Alpine Linux. This processes downloads the latestapk-tools-static
into the chroot and installs the basic packages necessary for a build environment. It also creates a user in the chroot with its UID set to the first argument of the script. Having this be your own UID is optimal as it lets you manupulate the chroot files easily. - To ensure everything worked, run
abchr abuild -h
. You should see the help text forabuild
, which should be installed in the chroot.
Usage
The abchr
command simply sets up the chroot and starts whatever program is
specified in the arguments as-is. There are some exceptions, meant for
ease-of-use; run abchr -h
to see what the script is capable of.
License
This project is licensed under the Apache License, Version 2.0 (the "License"); you may not use it except in compliance with the License. A copy of the License is made available in the LICENSE file. You may also obtain a copy of the license at the Apache website.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.