This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hugo Osvaldo Barrera
committed
Sep 14, 2017
0 parents
commit 0c7e01f
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
|