I mean, unlike a deb or rpm, the arch "package" really isn't very sophisticated:
```console
$ tar tf googler-3.8-1-x86_64.pkg.tar.xz
.PKGINFO
.MTREE
.BUILDINFO
usr/
usr/bin/
usr/bin/googler
usr/share/
usr/share/doc/
usr/share/doc/googler/
usr/share/doc/googler/README.md
usr/share/man/
usr/share/man/man1/
usr/share/man/man1/googler.1.gz
```
> many users love to download the packages directly and install them to test.
Yeah, I kind of doubt it about Arch users.
Also, by the time the next googler release comes out, packagecore on Arch may well be broken again.
Anyway, master, with `archlinux` as the only target, here's the full log (system and docker info included in the log):
```
Using default tag: latest
latest: Pulling from archlinux/base
Digest: sha256:f9496957524a239cf60cd0adb0a84ae633c0b712364988cd113e4fc66cdb8b7e
Status: Image is up to date for archlinux/base:latest
03a0958edf2f archlinux/base "tail -f /dev/null" 1 second ago Up Less than a second packagecore-a683f2c9da82979
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
resolving dependencies...
looking for conflicting packages...
Packages (3) binutils-2.31.1-4 fakeroot-1.23-1 sudo-1.8.27-1
Total Download Size: 5.62 MiB
Total Installed Size: 34.57 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downloading sudo-1.8.27-1-x86_64.pkg.tar.xz...
downloading binutils-2.31.1-4-x86_64.pkg.tar.xz...
downloading fakeroot-1.23-1-x86_64.pkg.tar.xz...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing sudo...
installing binutils...
installing fakeroot...
:: Running post-transaction hooks...
(1/3) Cleaning up package cache...
(2/3) Creating temporary files...
[/usr/lib/tmpfiles.d/journal-nocow.conf:26] Failed to resolve specifier: uninitialized /etc detected, skipping
All rules containing unresolvable specifiers will be skipped.
(3/3) Arming ConditionNeedsUpdate...
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
warning: archlinux-keyring-20190123-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) archlinux-keyring-20190123-2
Total Download Size: 0.67 MiB
Total Installed Size: 0.94 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] warning: no /var/cache/pacman/pkg/ cache exists, creating...
:: Retrieving packages...
downloading archlinux-keyring-20190123-2-any.pkg.tar.xz...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
reinstalling archlinux-keyring...
==> Appending keys from archlinux.gpg...
==> Locally signing trusted keys in keyring...
-> Locally signing key D8AFDDA07A5B6EDFA7D8CCDAD6D055F927843F1C...
==> ERROR: D8AFDDA07A5B6EDFA7D8CCDAD6D055F927843F1C could not be locally signed.
-> Locally signing key DDB867B92AA789C165EEFA799B729B06A680C281...
==> ERROR: DDB867B92AA789C165EEFA799B729B06A680C281 could not be locally signed.
-> Locally signing key 684148BB25B49E986A4944C55184252D824B18E8...
==> ERROR: 684148BB25B49E986A4944C55184252D824B18E8 could not be locally signed.
-> Locally signing key 91FFE0700E80619CEB73235CA88E23E377514E00...
==> ERROR: 91FFE0700E80619CEB73235CA88E23E377514E00 could not be locally signed.
-> Locally signing key 0E8B644079F599DFC1DDC3973348882F6AC6A4C2...
==> ERROR: 0E8B644079F599DFC1DDC3973348882F6AC6A4C2 could not be locally signed.
-> Locally signing key AB19265E5D7D20687D303246BA1DFB64FFF979E7...
==> ERROR: AB19265E5D7D20687D303246BA1DFB64FFF979E7 could not be locally signed.
:: Running post-transaction hooks...
(1/2) Cleaning up package cache...
(2/2) Arming ConditionNeedsUpdate...
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
:: Starting full system upgrade...
there is nothing to do
/tmp/packagecore-a683f2c9da82979/arch-pkg /
==> ERROR: /tmp/packagecore-a683f2c9da82979/makepkg.conf not found.
Aborting...
/usr/sbin/makepkg: line 321: grep: command not found
/usr/sbin/makepkg: line 328: grep: command not found
packagecore-a683f2c9da82979
packagecore-a683f2c9da82979
/tmp/venv/lib/python3.6/site-packages/packagecore/configfile.py:16: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
self._data = yaml.load(yamlfile.read())
args: {Namespace(configfile=None, distributions=None, outputdir='dist', release=1, showdistributions=False, showversion=False, sourceDir='./', version='3.8')}
Building with packagecore 0.11.0.
Building version '3.8' release '1'.
DOCKER_INFO
b'Containers: 5\n Running: 3\n Paused: 0\n Stopped: 2\nImages: 68\nServer Version: 18.09.4\nStorage Driver: overlay2\n Backing Filesystem: extfs\n Supports d_type: true\n Native Overlay Diff: true\nLogging Driver: json-file\nCgroup Driver: cgroupfs\nPlugins:\n Volume: local\n Network: bridge host macvlan null overlay\n Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog\nSwarm: inactive\nRuntimes: runc\nDefault Runtime: runc\nInit Binary: docker-init\ncontainerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84\nrunc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30\ninit version: fec3683\nSecurity Options:\n apparmor\n seccomp\n Profile: default\nKernel Version: 4.15.0-46-generic\nOperating System: Ubuntu 18.04.2 LTS\nOSType: linux\nArchitecture: x86_64\nCPUs: 1\nTotal Memory: 1.947GiB\nName: mail.zmwang.pw\nID: IRST:FNOT:KK5F:V2IZ:J7RF:5PR4:VJ23:5FPT:ABO6:EHFX:BMZX:NODZ\nDocker Root Dir: /var/lib/docker\nDebug Mode (client): false\nDebug Mode (server): false\nUsername: zmwangx\nRegistry: https://index.docker.io/v1/\nLabels:\nExperimental: false\nInsecure Registries:\n 127.0.0.0/8\nLive Restore Enabled: false\nProduct License: Community Engine\n\n'
Using 'exec'
This program is licensed under the GPLv2, a copy of which is
included with this software package.
Building package for archlinux:
name: googler
version: 3.8
releaseNum: 1
maintainer: Arun Prakash Jana <[email protected]>
license: GPLv3
homepage: https://github.com/jarun/googler
summary: Google from the command-line.
os: archlinux
buildDeps: ['make']
runDeps: ['python']
preCompileCommands:
compileCommands:
installCommands: make PREFIX="/usr" install DESTDIR="${BP_DESTDIR}"
postInstallCommands:
testInstallCommands:
container: archlinux/base
Starting docker container 'packagecore-a683f2c9da82979'.
Using shared directory '/tmp/packagecore-a683f2c9da82979' and source directory '/tmp/packagecore-a683f2c9da82979/src'.
Cleaning up self packagecore-a683f2c9da82979.
###########################################################
# Failed to build package for 'archlinux'.
###########################################################
Traceback (most recent call last):
File "/tmp/venv/lib/python3.6/site-packages/packagecore/packager.py", line 181, in run
imageName=build["dockerImage"])
File "/tmp/venv/lib/python3.6/site-packages/packagecore/packager.py", line 98, in _build
recipe.build(container)
File "/tmp/venv/lib/python3.6/site-packages/packagecore/pkgbuild.py", line 237, in build
(self._pkgBuildDir, makePkgConf, self._data.maintainer)])
File "/tmp/venv/lib/python3.6/site-packages/packagecore/docker.py", line 149, in execute
_checkedDockerCommand(["exec", self._name] + cmd)
File "/tmp/venv/lib/python3.6/site-packages/packagecore/docker.py", line 54, in _checkedDockerCommand
raise DockerError("Command '%s' returned %d." % (cmd, status))
packagecore.docker.DockerError: Command '['exec', 'packagecore-a683f2c9da82979', '/bin/bash', '-c', "pushd '/tmp/packagecore-a683f2c9da82979/arch-pkg' && sudo -u packagecore makepkg --skipinteg --noconfirm --noprogressbar -sr --config='/tmp/packagecore-a683f2c9da82979/makepkg.conf' PACKAGER='Arun Prakash Jana <[email protected]>' && popd"]' returned 2.
###########################################################
```
> arch linux
It's broken again, so you need to contact packagecore again if you want to keep it. I say it's not worth it.
> opensuse
opensuse isn't dropped; just dropping the EOL minor releases 42.1 and 42.2 (docker images are gone, too).
> `SLEEP_DURATION=8` (inherited from Travis);
By the way, maybe we can lower this a bit now that we have some sort of anti-blocking param and aren't rapidly pushing. Say `SLEEP_DURATION=3`.
CircleCI integration
====================
Sample workflows on zmwangx/googler:
- `test`: https://circleci.com/workflow-run/1f4a8526-400f-445e-b422-e597b9ff7b6d
- `publish-github-release`: https://circleci.com/workflow-run/797459e2-7acb-453b-8970-bb3f412c74b1 (published artifacts can be seen here: https://github.com/zmwangx/googler/releases/tag/v3.8-cicleci)
- I also configured a `nightly` workflow that's run every day at 00:00 UTC. No run just yet, but by now I've configured nightly workflows on several of my projects so it definitely should be working.
I dropped the following targets from `packagecore.yml`: `archlinux`, `opensuse42.1`, `opensuse42.2`. Rationale is documented in the relevant commit messages.
To test jarun/googler you need to set it up at https://circleci.com/add-projects/gh/jarun first (collaborators don't have permissions). **The following env vars should be configured at https://circleci.com/gh/jarun/googler/edit#env-vars before any job is run:**
- `NUM_TEST_ITERATIONS=10` (inherited from Travis);
- `SLEEP_DURATION=8` (inherited from Travis);
- `GITHUB_API_TOKEN=...` a personal access token with `public_repo` scope to upload release artifacts.
Once this is happily running for a while, we can disable Travis (otherwise we get duplicate artifact uploads that overwrite each other).
Closes #273.