mikkeloscar / arch-travis Goto Github PK
View Code? Open in Web Editor NEWArch Linux build environment for Travis-CI.
License: GNU General Public License v3.0
Arch Linux build environment for Travis-CI.
License: GNU General Public License v3.0
Hi,
I tried to use arch-travis. But everytime it errors with following error:
==> Validating source files with sha256sums...
dee-1.2.7.tar.gz ... Passed
:: Checking libunity integrity...
==> Making package: libunity 7.1.4-2 (Mon Feb 22 13:51:27 UTC 2016)
==> Retrieving sources...
-> Branching lp:libunity...
/usr/share/makepkg/source/bzr.sh: line 48: bzr: command not found
==> ERROR: Failure while branching lp:libunity
Aborting...
:: failed to verify libunity integrity
Why dropping values
when exporting environment variable.
You cant use vars like TRAVIS_EVENT_TYPE
inside arch:script
as they lack value...
2e845bb ๐
Yay has a problem with resolving overlapping dependencies in arch:packages
Example (from gimp-develop-git):
arch:
packages:
- babl-git
- gegl-git
gegl-git
requires babl>=0.1.72
which is provided by babl-git
, but yay
could not resolve the dependencies without having babl-git
already installed, those making yay -S babl-git gegl-git
results in no package being installed.
We could fix it by invoking yay -S
with single package form arch:packages
at a time. Or drop yay
and use aurutils
as more robust and pristine AUR helper ๐ค
i am trying to use for archiso script to test build
but getting keyring errors
Hello,
I am running a build that takes a while and for more than 10min it doesn't get any console output and therefore travis terminates that build and assumes an error. I have searched on how to fix this and I found the travis_wait
command, however when I try to use it with arch-travis I get an error (code 6 error).
Any ideas?
Herewith the build log when I use travis_wait
, and this is my .travis.yml
file.
Thank you very much.
env:
global:
- ARCH_TRAVIS_CLEAN_CHROOT=1
matrix:
# Upgrade
- TAGS="-t upgrade"
# Packages
- TAGS="-t packages_cui_minimal"
- TAGS="-t packages_cui_workstation"
- TAGS="-t packages_gui_xorg"
- TAGS="-t packages_gui_awesome_wm"
- TAGS="-t packages_gui_fonts"
- TAGS="-t packages_gui_apps"
# Writing suite
- TAGS="-t packages_suite_latex"
- TAGS="-t packages_suite_libreoffice"
# AUR
- TAGS="-t yaourt"
- TAGS="-t packages_cui_aur" ENVARS='-e user=travis'
- TAGS="-t packages_gui_aur" ENVARS='-e user=travis'
# Devel
- TAGS="-t devel_env_python" ENVARS='-e user=travis'
# All
- TAGS="-t all" ENVARS='-e user=travis'
language: python
sudo: required
arch:
packages:
- yaourt
script:
- ./bootstrap/archlinux/guest-archlinux-setup-dependencies.sh
- sudo ./setup-root.sh
- sudo ./setup-user.sh $TAGS $ENVARS -vvvv
script:
- travis_wait 60 "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash"
The setup of chroot and installation of packages work fine.
But in Travis log there are several warnings about a locale setting problem:
/usr/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Do you think, these could be fixed? Perhaps generating and setting en_US.UTF-8
locale before first pacman
command?
Double quotes
in encode_config()
prevent array expansion, rendering whole encode scheme superfluous.
Line 27 in 30a0807
bashdb
logs for arch-travis.sh
arr
has single element containing whole arch:build
script with \n
characters.bash debugger, bashdb, release 4.4-1.0.1
Copyright 2002-2004, 2006-2012, 2014, 2016-2018 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
(/home/bartus/AUR/arch-travis/arch-travis.sh:35):
35: CONFIG_BUILD_SCRIPTS=$(encode_config arch script)
bashdb<0> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:35):
35: CONFIG_BUILD_SCRIPTS=$(encode_config arch script)
encode_config arch script
bashdb<(1)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:23):
23: encode_config() {
bashdb<(2)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:24):
24: local old_ifs=$IFS
bashdb<(3)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:25):
25: IFS=$'
'
bashdb<(4)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:26):
26: local sep="::::"
bashdb<(5)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:27):
27: arr=("$(travis_yml "$@")")
bashdb<(6)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:27):
27: arr=("$(travis_yml "$@")")
travis_yml "$@"
bashdb<((7))> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:18):
18: travis_yml() {
bashdb<((8))> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:19):
19: ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' .travis.yml "$@"
bashdb<((9))> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:28):
28: enc="$(printf "${sep}%s" "${arr[@]}")"
bashdb<(10)> print ${arr[@]}
sudo screenfetch reflector --verbose -l 20 --sort rate -p https echo $CC touch test_file
bashdb<(11)> print "${arr[@]}"
sudo screenfetch
reflector --verbose -l 20 --sort rate -p https
echo $CC
touch test_file
bashdb<(12)> print "${#arr[@]}"
1
bashdb<(13)> print "${arr[0]}"
sudo screenfetch
reflector --verbose -l 20 --sort rate -p https
echo $CC
touch test_file
bashdb<(14)> print "${arr[1]}"
bashdb<(15)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:28):
28: enc="$(printf "${sep}%s" "${arr[@]}")"
printf "${sep}%s" "${arr[@]}"
bashdb<((16))> l
23: encode_config() {
24: local old_ifs=$IFS
25: IFS=$'\n'
26: local sep="::::"
27: arr=("$(travis_yml "$@")")
28: => enc="$(printf "${sep}%s" "${arr[@]}")"
29: enc="${enc:${#sep}}"
30: IFS=$old_ifs
31: echo "$enc"
32: }
bashdb<((17))> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:29):
29: enc="${enc:${#sep}}"
bashdb<(18)> print "$enc"
::::sudo screenfetch
reflector --verbose -l 20 --sort rate -p https
echo $CC
touch test_file
bashdb<(19)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:30):
30: IFS=$old_ifs
bashdb<(20)> print "$enc"
sudo screenfetch
reflector --verbose -l 20 --sort rate -p https
echo $CC
touch test_file
bashdb<(21)> step
(/home/bartus/AUR/arch-travis/arch-travis.sh:31):
31: echo "$enc"
bashdb<(22)>
(/home/bartus/AUR/arch-travis/arch-travis.sh:36):
36: CONFIG_PACKAGES=$(encode_config arch packages)
bashdb<23> l
31: echo "$enc"
32: }
33:
34: # read travis config
35: CONFIG_BUILD_SCRIPTS=$(encode_config arch script)
36: => CONFIG_PACKAGES=$(encode_config arch packages)
37: CONFIG_REPOS=$(encode_config arch repos)
38:
39: mapfile -t envs < <(ruby -e 'ENV.each {|key,_| if not ["PATH","USER","HOME","GOROOT"].include?(key) then puts "-e #{key}" end}')
40:
bashdb<24> print "$CONFIG_BUILD_SCRIPTS"
sudo screenfetch
reflector --verbose -l 20 --sort rate -p https
echo $CC
touch test_file
bashdb<25> n
(/home/bartus/AUR/arch-travis/arch-travis.sh:37):
37: CONFIG_REPOS=$(encode_config arch repos)
bashdb<26> n
(/home/bartus/AUR/arch-travis/arch-travis.sh:39):
39: mapfile -t envs < <(ruby -e 'ENV.each {|key,_| if not ["PATH","USER","HOME","GOROOT"].include?(key) then puts "-e #{key}" end}')
bashdb<27> n
(/home/bartus/AUR/arch-travis/arch-travis.sh:41):
41: echo docker run --rm -v "$(pwd):/build" \
bashdb<28> n
docker run --rm -v /home/bartus/AUR/arch-travis:/build -e CC= -e CXX= -e CONFIG_BUILD_SCRIPTS=sudo screenfetch
reflector --verbose -l 20 --sort rate -p https
echo $CC
touch test_file -e CONFIG_PACKAGES=procps-ng
reflector
screenfetch-git -e CONFIG_REPOS=archlinuxfr=http://repo.archlinux.fr/$arch -e SHELL -e SESSION_MANAGER -e WINDOWID -e COLORTERM -e __GL_SYNC_DISPLAY_DEVICE -e CSF_MDTVTexturesDirectory -e XDG_MENU_PREFIX -e CSF_DrawPluginDefaults -e LANGUAGE -e CCACHE_PATH -e LESS_TERMCAP_se -e LESS_TERMCAP_so -e CSF_LANGUAGE -e SSH_AUTH_SOCK -e CSF_MIGRATION_TYPES -e SHELL_SESSION_ID -e __GL_SYNC_TO_VBLANK -e __GL_YIELD -e XMODIFIERS -e LC_MONETARY -e _Dbg_tty -e _Dbg_set_listsize -e CSF_OCCTResourcePath -e CSF_STEPDefaults -e EDITOR -e GTK_MODULES -e XDG_SEAT -e PWD -e CLUTTER_VBLANK -e LOGNAME -e XDG_SESSION_TYPE -e DRAWHOME -e XAUTHORITY -e CSF_StandardLiteDefaults -e WINDOWPATH -e LANG -e LC_PAPER -e _Dbg_space_IFS -e LS_COLORS -e XDG_CURRENT_DESKTOP -e KONSOLE_DBUS_SERVICE -e KONSOLE_DBUS_SESSION -e PROFILEHOME -e _Dbg_pygments_styles -e FBFONT -e INVOCATION_ID -e KONSOLE_VERSION -e XZ_OPT -e CSF_ShadersDirectory -e CSF_EXCEPTION_PROMPT -e SYSTEMD_EDITOR -e CSF_XmlOcafResource -e CSF_SHMessage -e XDG_SESSION_CLASS -e TERM -e LESS_TERMCAP_mb -e LESS_TERMCAP_me -e LESS_TERMCAP_md -e LESSOPEN -e COLORFGBG -e CSF_StandardDefaults -e CSF_IGESDefaults -e DISPLAY -e CSF_XCAFDefaults -e LESS_TERMCAP_ue -e SHLVL -e __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE -e LESS_TERMCAP_us -e PROMPT_DIRTRIM -e QT_IM_MODULE -e LC_MEASUREMENT -e XDG_VTNR -e _Dbg_set_style -e DESKTOP_AUTOSTART_ID -e CSF_PluginDefaults -e CSF_TObjMessage -e XDG_SESSION_ID -e CASROOT -e LD_LIBRARY_PATH -e MOZ_PLUGIN_PATH -e XDG_RUNTIME_DIR -e _Dbg_working_term_highlight -e LC_TIME -e JOURNAL_STREAM -e CSF_XSMessage -e MMGT_CLEAR -e XDG_DATA_DIRS -e CSF_TObjDefaults -e KONSOLE_PROFILE_NAME -e DBUS_SESSION_BUS_ADDRESS -e _Dbg_DEBUGGER_LEVEL -e HG -e MAIL -e CHROOT -e _Dbg_init_cwd -e DRAWDEFAULT -e GIO_LAUNCHED_DESKTOP_FILE_PID -e GIO_LAUNCHED_DESKTOP_FILE -e LC_NUMERIC -e OLDPWD -e _ mikkeloscar/arch-travis:latest
docker ivocation hexdump
contains non encoded '0a'
00000000: 646f 636b 6572 2072 756e 202d 2d72 6d20 docker run --rm
00000010: 2d76 202f 686f 6d65 2f62 6172 7475 732f -v /home/bartus/
00000020: 4155 522f 6172 6368 2d74 7261 7669 733a AUR/arch-travis:
00000030: 2f62 7569 6c64 202d 6520 4343 3d20 2d65 /build -e CC= -e
00000040: 2043 5858 3d20 2d65 2043 4f4e 4649 475f CXX= -e CONFIG_
00000050: 4255 494c 445f 5343 5249 5054 533d 7375 BUILD_SCRIPTS=su
00000060: 646f 2073 6372 6565 6e66 6574 6368 0a72 do screenfetch.r
00000070: 6566 6c65 6374 6f72 202d 2d76 6572 626f eflector --verbo
00000080: 7365 202d 6c20 3230 202d 2d73 6f72 7420 se -l 20 --sort
00000090: 7261 7465 202d 7020 6874 7470 730a 6563 rate -p https.ec
000000a0: 686f 2024 4343 0a74 6f75 6368 2074 6573 ho $CC.touch tes
000000b0: 745f 6669 6c65 202d 6520 434f 4e46 4947 t_file -e CONFIG
000000c0: 5f50 4143 4b41 4745 533d 7072 6f63 7073 _PACKAGES=procps
000000d0: 2d6e 670a 7265 666c 6563 746f 720a 7363 -ng.reflector.sc
000000e0: 7265 656e 6665 7463 682d 6769 7420 2d65 reenfetch-git -e
encoding
part, as there is a slim chance for the user to explicitly include \n
character in yaml filed https://yaml-multiline.info/base64
encoding scheme bartoszek@27e7950 works fine for me ๐Wouldn't it be possible for arch-travis to run on the container based infrastructure by replacing chroot
with fakechroot
? This shouldn't be the default, because a fakechroot might break some stuff compared to a real chroot, but it could be added as a configuration option in the travis.yml
.
One thing I forgot: You would probably also have to use fakeroot
to be root inside the chroot. Not sure about that though.
Please include this in arch-travis.sh
:
https://www.archlinux.org/news/ca-certificates-utils-20170307-1-upgrade-requires-manual-intervention/
I think when 2017.04.01 will be released, this workaround could be safely removed.
I want to use the builded(modified) stuff in Travis, to do some git commit
, and deploy.
Is there a way to copy builded working directory back to original working directory ?
Hi. First of all, thanks for this tool, it is awesome.
I need to run a couple of unit tests (in a Qt codebase) that require a GUI, in other words a running Xorg server.
The tests currently fail with a QXcbConnection: Could not connect to display
error. This is my travis config file: https://github.com/aelog/ark/blob/master/.travis.yml
I think using xvfb should do the trick. Travis does provide a guide to run GUI tests. however we are inside a chroot, so I guess I need to setup xfvb within the archlinux chroot, right? Any idea how to do so?
Since this is already a chroot environment, it might be relatively easier to support 32bit.
It seems the image (or at least yay
) needs to be updated, because I get the following error messages lately:
yay: error while loading shared libraries: libalpm.so.10: cannot open shared object file: No such file or directory
yay: error while loading shared libraries: libalpm.so.10: cannot open shared object file: No such file or directory
yay: error while loading shared libraries: libalpm.so.10: cannot open shared object file: No such file or directory
My CI jobs just started failing with this error, see here
Hi,
in my cmake project I can only do in-source builds, i.e. running the cmake command from the root folder of the project. This is also what sway does: https://github.com/SirCmpwn/sway/blob/master/.travis.yml#L22
Is there a reason why out-of-source builds don't work? I tried with the following arch.script
:
arch:
script:
- "mkdir build"
- "cd build"
- "cmake <OPTIONS> .."
- "make"
but the build failed with the following error:
$ cmake -DCMAKE_BUILD_TYPE=Debug -DKDE_INSTALL_LIBDIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr ..
CMake Error: The source directory "/home/travis/build/aelog" does not appear to contain CMakeLists.txt.
which seems to imply that the script could not change to working dir to build
...
Lately all my travis jobs for packages that uses ninja
build system. Travis logs complains a lot about /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
log. Masking LC_ALL
in envs
fixes the issue. bartoszek@8054989
I use your chroot-environment to build my favourite AUR packages.
After the custom buildscript finishes, arch-travis.sh
is trying to take down the chroot and unmounting the devices.
This fails for me:
umount: /home/travis/root.x86_64/dev: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount: /home/travis/root.x86_64: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
rm: cannot remove `/home/travis/root.x86_64/dev/pts': Device or resource busy
Maybe we have to add a sleep or a lsof-waiting loop.
Hello,
I am having a bunch of umount errors when trying to build an aur package via yaourt using ansible.
I have no clue whatsoever what might be wrong. I indeed can install regular pacman packages fine on travis, the problem is only with the aur packages. Locally everything works fine.
Any idea? Thank you very much.
Here is a build sample on Travis, and these are the type of errors:
umount: /home/travis/root.x86_64/dev: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount: /home/travis/root.x86_64: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
rm: cannot remove `/home/travis/root.x86_64/dev/pts': Device or resource busy
umount: /home/travis/root.x86_64/run: not found
umount: /home/travis/root.x86_64/dev/shm: not found
umount: /home/travis/root.x86_64/dev/pts: not mounted
umount: /home/travis/root.x86_64/dev: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount: /home/travis/root.x86_64/sys: not found
umount: /home/travis/root.x86_64/proc: not found
umount: /home/travis/root.x86_64/home/travis/build: not found
umount: /home/travis/root.x86_64/home/travis/builds: not found
umount: /home/travis/root.x86_64/home/travis/virtualenv: not found
umount: /home/travis/root.x86_64: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
rm: cannot remove `/home/travis/root.x86_64/dev/pts': Device or resource busy
umount: /home/travis/root.x86_64/run: not found
umount: /home/travis/root.x86_64/dev/shm: not found
umount: /home/travis/root.x86_64/dev/pts: not mounted
umount: /home/travis/root.x86_64/dev: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount: /home/travis/root.x86_64/sys: not found
umount: /home/travis/root.x86_64/proc: not found
umount: /home/travis/root.x86_64/home/travis/build: not found
umount: /home/travis/root.x86_64/home/travis/builds: not found
umount: /home/travis/root.x86_64/home/travis/virtualenv: not found
umount: /home/travis/root.x86_64: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
... rest of the output omitted ...
I used to use the following pattern in .travis.yml
of our projects:
arch:
script: bash ./.ci/build.sh
Although undocumented, this worked fine until recently. Now arch-travis raises the following error:
-e:1:in `<main>': undefined method `join' for "bash ./.ci/build.sh":String (NoMethodError)`
Could you consider to re-allow such an usage? It is supported by the original runner of Travis CI [1]. It is also more natural when there is only one command.
Sometime In the last week, arch-travis was broken by an update to pacaur, it will fail when executing pacaur with:
:: editor variable unset
You can work around it by setting EDITOR=false
before calling arch-travis.sh.
Hi,
Thanks for making this. Your sample in README does not seem to work. papyros.io
does not exist.
Could not resolve host: dash.papyros.io
This is the Travis build:
https://travis-ci.org/github/fsquillace/junest/builds/750802344
> host dash.papyros.io
Host dash.papyros.io not found: 3(NXDOMAIN)
I want to use pacman-git to test pyalpm-git in a travisci job, but of course paman-git conflicts with pacman, is there any way to say yes in this situations to resolve the conflict.
:: pacman-git and pacman are in conflict. Remove pacman? [y/N]
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: pacman-git and pacman are in conflict
Right now the arch-iso date is hardcoded to be the first of the current month. Make this more dynamic.
Could we have $TRAVIS_HOME/.ccache
and '/var/cache/pacman/pkg' mounted in the same maner as build_dir
#7 ?
This will expose .ccache
and pacman cache
to travis caching infrastructure, those reducing build time ๐ก
I would like to abuse Travis-CI a bit, and bodge a build-bot for my AUR packages ๐ e.g.
Hello,
Congratulations on arch-travis, it looks very promising and I have a lot of enthusiasm to work with it even when I'm new to arch-travis. I'm trying to test my ansible playbook based on an arch host however when ansible tries to install something with pacman it doesn't work.
Herewith the Travis log. Note that when I do a which bash
I get a 0 (success), however when I try which pacman
I get a 1 (error).
Do you have any idea?
Just notice theres is an issue with current arch-travis
yaml script scheme. There's undocumented arch
keyword in Travis build config.
We should change arch
to something like archlinux
or arch-travis
. Otherwise we've got conflict with job spawning logic resulting in redundant jobs lanuched for any Travis build.
https://mirrors.ocf.berkeley.edu/archlinux/iso/2017.12.01/archlinux-bootstrap-2017.12.01-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Looks like neither https://lug.mtu.edu/archlinux nor it's http counterpart work.
The former when opened with Chrome returns ERR_SSL_OBSOLETE_CIPHER the latter returns 404. If this is a permanent problem you might want to change default mirror.
It seems that the build dir name in the chroot env is /build
and IIUC the travis default is the the repo name. The julia package manager use the directory name to automatically infer the package name if not specified so I need to manually supply the package name in this case. It'll be nice to follow the travis default convention here if possible.
I got the following error message for all recent builds:
Inconsistency detected by ld.so: dl-open.c: 689: _dl_open: Assertion `_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT' failed!
Is arch-travis or Arch Linux itself broken?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.