Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Osvaldo Barrera committed Sep 14, 2017
0 parents commit 0c7e01f
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM base/archlinux

COPY . /pkg
WORKDIR /pkg

# makepkg cannot (and should not) be run as root:
RUN useradd -m notroot

# Allow notroot to run stuff as root (to install dependencies):
RUN mkdir /etc/sudoers.d
RUN echo "notroot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/notroot
RUN chmod 400 /etc/sudoers.d/notroot

# Also, make sure we can do the actual building
RUN chown -R notroot /pkg

# Generally, refreshing without sync'ing is discouraged, but we've a clean
# environment here.
RUN pacman -Sy --noconfirm base-devel

# Auto-fetch GPG keys (for checking signatures)
RUN sudo -u notroot mkdir /home/notroot/.gnupg
RUN sudo -u notroot touch /home/notroot/.gnupg/gpg.conf
RUN sudo -u notroot echo "keyserver-options auto-key-retrieve" > /home/notroot/.gnupg/gpg.conf

# Build the package
CMD sudo -u notroot makepkg -fs --noconfirm
13 changes: 13 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (c) 2017, Hugo Osvaldo Barrera <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
docker-makepkg
==============

This docker image is intended to tests `PKGBUILDs`, by running `makepkg -sf` in
a clean Arch installation.
It is intended to be used by packagers, both via CI, and on non-ArchLinux
environments.

Retrieval of GPG keys is also handled transparently.

Usage with travis
-----------------

Generally, this should be enough:

```
sudo: required
services:
- docker
script:
- docker run hobarrera/makepkg
```

Usage with GitLab CI
--------------------

Since GitLab CI uses Docker, it should be trivial to use these images there
too.

Licence
-------

This repository is licensed under the ISC licence. See LICENCE for details.


0 comments on commit 0c7e01f

Please sign in to comment.