.github: Port update packages action from old portage-stable

This commit is contained in:
Krzesimir Nowak 2023-04-05 10:48:24 +02:00 committed by Thilo Fromm
parent 4922b986ab
commit 066bc2e7b1
2 changed files with 475 additions and 0 deletions

View File

@ -0,0 +1,383 @@
# Please keep the list sorted!
acct-group/adm
acct-group/audio
acct-group/cdrom
acct-group/dialout
acct-group/disk
acct-group/dnsmasq
acct-group/input
acct-group/kmem
acct-group/kvm
acct-group/lp
acct-group/man
acct-group/messagebus
acct-group/netperf
acct-group/nobody
acct-group/ntp
acct-group/pcap
acct-group/polkitd
acct-group/portage
acct-group/render
acct-group/root
acct-group/sgx
acct-group/sshd
acct-group/systemd-coredump
acct-group/systemd-journal
acct-group/systemd-journal-remote
acct-group/systemd-network
acct-group/systemd-oom
acct-group/systemd-resolve
acct-group/systemd-timesync
acct-group/tape
acct-group/tss
acct-group/tty
acct-group/users
acct-group/utmp
acct-group/video
acct-group/wheel
acct-user/dnsmasq
acct-user/man
acct-user/messagebus
acct-user/netperf
acct-user/nobody
acct-user/ntp
acct-user/pcap
acct-user/polkitd
acct-user/portage
acct-user/root
acct-user/sshd
acct-user/systemd-coredump
acct-user/systemd-journal-remote
acct-user/systemd-network
acct-user/systemd-oom
acct-user/systemd-resolve
acct-user/systemd-timesync
acct-user/tss
app-alternatives/awk
app-alternatives/bc
app-alternatives/bzip2
app-alternatives/cpio
app-alternatives/gzip
app-alternatives/lex
app-alternatives/sh
app-alternatives/tar
app-alternatives/yacc
app-arch/bzip2
app-arch/cpio
app-arch/gzip
app-arch/lbzip2
app-arch/libarchive
app-arch/ncompress
app-arch/pbzip2
app-arch/pigz
app-arch/rpm2targz
app-arch/sharutils
app-arch/tar
app-arch/unzip
app-arch/xz-utils
app-arch/zip
app-arch/zstd
app-cdr/cdrtools
app-crypt/adcli
app-crypt/mit-krb5
app-editors/vim
app-editors/vim-core
app-emulation/qemu
app-emulation/qemu-guest-agent
app-eselect/eselect-iptables
app-portage/portage-utils
app-shells/bash-completion
app-text/asciidoc
app-text/build-docbook-catalog
app-text/docbook-xml-dtd
app-text/docbook-xsl-ns-stylesheets
app-text/docbook-xsl-stylesheets
app-text/sgml-common
dev-db/sqlite
dev-lang/duktape
dev-lang/perl
dev-lang/python
dev-lang/python-exec
dev-lang/python-exec-conf
dev-libs/boost
dev-libs/cJSON
dev-libs/cyrus-sasl
dev-libs/elfutils
dev-libs/expat
dev-libs/glib
dev-libs/gmp
dev-libs/gobject-introspection
dev-libs/gobject-introspection-common
dev-libs/jsoncpp
dev-libs/libaio
dev-libs/libksba
dev-libs/libltdl
dev-libs/libnl
dev-libs/libpcre2
dev-libs/libtasn1
dev-libs/libuv
dev-libs/libxml2
dev-libs/libxslt
dev-libs/nettle
dev-libs/oniguruma
dev-perl/File-Slurp
dev-perl/Locale-gettext
dev-perl/Parse-Yapp
dev-perl/Text-Unidecode
dev-perl/Unicode-EastAsianWidth
dev-python/autocommand
dev-python/boto
dev-python/certifi
dev-python/crcmod
dev-python/cython
dev-python/distro
dev-python/docutils
dev-python/fasteners
dev-python/flit_core
dev-python/gentoo-common
dev-python/gpep517
dev-python/inflect
dev-python/installer
dev-python/jaraco-context
dev-python/jaraco-functools
dev-python/jaraco-text
dev-python/jinja
dev-python/lazy-object-proxy
dev-python/lxml
dev-python/markupsafe
dev-python/more-itertools
dev-python/nspektr
dev-python/ordered-set
dev-python/packaging
dev-python/platformdirs
dev-python/pydantic
dev-python/pydecomp
dev-python/pygments
dev-python/pyparsing
dev-python/setuptools
dev-python/setuptools-scm
dev-python/six
dev-python/snakeoil
dev-python/tomli
dev-python/typing-extensions
dev-python/wheel
dev-util/b2
dev-util/bpftool
dev-util/catalyst
dev-util/checkbashisms
dev-util/cmake
dev-util/cmocka
dev-util/desktop-file-utils
dev-util/gdbus-codegen
dev-util/glib-utils
dev-util/gperf
dev-util/gtk-doc-am
dev-util/meson
dev-util/meson-format-array
dev-util/ninja
dev-util/pahole
dev-util/patchelf
dev-util/patchutils
dev-util/perf
dev-util/pkgconf
dev-util/re2c
dev-util/strace
dev-vcs/git
dev-vcs/repo
eclass/acct-group.eclass
eclass/acct-user.eclass
eclass/alternatives.eclass
eclass/app-alternatives.eclass
eclass/autotools.eclass
# Still has some Flatcar modifications, will need to upstream it first.
#
# eclass/bash-completion-r1.eclass
eclass/cmake-multilib.eclass
eclass/cmake.eclass
eclass/desktop.eclass
eclass/distutils-r1.eclass
eclass/eapi7-ver.eclass
eclass/eapi8-dosym.eclass
eclass/edo.eclass
eclass/edos2unix.eclass
eclass/elisp-common.eclass
eclass/epatch.eclass
eclass/eqawarn.eclass
eclass/estack.eclass
eclass/eutils.eclass
eclass/fcaps.eclass
eclass/flag-o-matic.eclass
eclass/git-r3.eclass
eclass/gnome.org.eclass
eclass/gnuconfig.eclass
eclass/java-pkg-opt-2.eclass
eclass/java-utils-2.eclass
eclass/kernel-2.eclass
eclass/libtool.eclass
eclass/linux-info.eclass
eclass/linux-mod.eclass
eclass/llvm.eclass
eclass/ltprune.eclass
eclass/meson-multilib.eclass
eclass/meson.eclass
eclass/multibuild.eclass
eclass/multilib-build.eclass
eclass/multilib-minimal.eclass
eclass/multilib.eclass
eclass/multiprocessing.eclass
eclass/ninja-utils.eclass
eclass/optfeature.eclass
eclass/out-of-source-utils.eclass
eclass/pam.eclass
eclass/pax-utils.eclass
eclass/perl-functions.eclass
eclass/portability.eclass
eclass/plocale.eclass
eclass/prefix.eclass
eclass/preserve-libs.eclass
eclass/pypi.eclass
eclass/python-any-r1.eclass
eclass/python-r1.eclass
eclass/python-single-r1.eclass
eclass/python-utils-r1.eclass
eclass/readme.gentoo-r1.eclass
eclass/savedconfig.eclass
eclass/strip-linguas.eclass
eclass/systemd.eclass
eclass/tmpfiles.eclass
eclass/toolchain-funcs.eclass
eclass/toolchain.eclass
eclass/udev.eclass
eclass/user-info.eclass
# This file is modified by us to be an empty file, so can't be synced for now.
#
# eclass/usr-ldscript.eclass
eclass/vcs-clean.eclass
eclass/verify-sig.eclass
eclass/vim-doc.eclass
eclass/vim-plugin.eclass
eclass/virtualx.eclass
eclass/waf-utils.eclass
eclass/wrapper.eclass
eclass/xdg-utils.eclass
licenses
media-libs/libpng
net-analyzer/nmap
net-analyzer/traceroute
net-dns/bind-tools
net-dns/dnsmasq
net-fs/cifs-utils
net-libs/gnutls
net-libs/libpcap
net-libs/libslirp
net-libs/nghttp2
net-misc/bridge-utils
net-misc/curl
net-misc/ethertypes
net-misc/iperf
net-misc/iputils
net-misc/rsync
net-misc/socat
net-misc/wget
net-misc/whois
net-vpn/wireguard-tools
perl-core/File-Temp
profiles
# The bootstrap script has some modifications, so we can't sync scripts directory yet.
#
# scripts
sys-apps/attr
sys-apps/diffutils
sys-apps/dtc
sys-apps/file
sys-apps/findutils
sys-apps/gawk
sys-apps/gentoo-functions
sys-apps/help2man
sys-apps/i2c-tools
sys-apps/iucode_tool
sys-apps/less
sys-apps/portage
sys-apps/texinfo
sys-devel/autoconf
sys-devel/autoconf-archive
sys-devel/autoconf-wrapper
sys-devel/automake
sys-devel/automake-wrapper
sys-devel/bc
sys-devel/binutils
sys-devel/binutils-config
sys-devel/bison
sys-devel/crossdev
sys-devel/flex
sys-devel/gcc
sys-devel/gcc-config
sys-devel/gettext
sys-devel/gnuconfig
sys-devel/libtool
sys-devel/m4
sys-devel/patch
sys-firmware/edk2-ovmf-bin
sys-firmware/intel-microcode
sys-firmware/ipxe
sys-firmware/seabios-bin
sys-firmware/sgabios
sys-kernel/linux-headers
sys-fs/e2fsprogs
sys-fs/multipath-tools
sys-libs/binutils-libs
sys-libs/libcap
sys-libs/libcap-ng
sys-libs/libseccomp
sys-libs/zlib
virtual/libcrypt
virtual/libelf
virtual/perl-Carp
virtual/perl-Exporter
virtual/perl-ExtUtils-MakeMaker
virtual/perl-File-Spec
virtual/perl-File-Temp
virtual/perl-Getopt-Long
virtual/perl-IO
virtual/perl-version
virtual/pkgconfig
x11-libs/pixman

View File

@ -0,0 +1,92 @@
name: Keep portage-stable packages updated
on:
schedule:
- cron: '0 7 * * 1'
workflow_dispatch:
jobs:
keep-packages-updated:
runs-on: ubuntu-latest
steps:
- name: Check out scripts
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: ./scripts
- name: Check out Gentoo
uses: actions/checkout@v3
with:
repository: gentoo/gentoo
path: gentoo
# Gentoo is quite a large repo, so limit ourselves to last
# quarter milion of commits. It is about two years worth of changes.
# Is is needed by the sync script to find out the hash of the last commit
# that made the changes to the package.
fetch-depth: 250000
ref: master
- name: Check out build scripts
uses: actions/checkout@v3
with:
repository: flatcar/flatcar-build-scripts
path: flatcar-build-scripts
- name: Update listed packages
id: update-listed-packages
run: |
git config --global user.name "Flatcar Buildbot"
git config --global user.email "buildbot@flatcar-linux.org"
old_head=$(git -C scripts rev-parse HEAD)
packages_list=$(realpath scripts/.github/workflows/portage-stable-packages-list)
gentoo_repo=$(realpath gentoo)
build_scripts=$(realpath flatcar-build-scripts)
pushd scripts/sdk_container/src/third_party/portage-stable
while read -r package; do
if [[ ! -e "${package}" ]]; then
# If this happens, it means that the package was moved to overlay
# or dropped, the list ought to be updated.
echo "::warning title=${package}::Nonexistent package"
continue
fi
if [[ ! -e "${gentoo_repo}/${package}" ]]; then
# If this happens, it means that the package was obsoleted or moved
# in Gentoo. The obsoletion needs to be handled in the case-by-case
# manner, while move should be handled by doing the same move
# in portage-stable. The build should not break because of the move,
# because most likely it's already reflected in the profiles/updates
# directory.
echo "::warning title=${package}::Obsolete or moved package"
continue
fi
GENTOO_REPO="${gentoo_repo}" "${build_scripts}/sync-with-gentoo" "${package}"
done < <(grep '^[^#]' "${packages_list}")
popd
new_head=$(git -C scripts rev-parse HEAD)
updated=0
if [[ "${new_head}" != "${old_head}" ]]; then
updated=1
fi
todaydate=$(date +%Y-%m-%d)
echo "UPDATED=${updated}" >>"${GITHUB_OUTPUT}"
echo "TODAYDATE=${todaydate}" >>"${GITHUB_OUTPUT}"
- name: Create pull request for main branch
uses: peter-evans/create-pull-request@v5
if: steps.update-listed-packages.outputs.UPDATED == 1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: scripts
branch: buildbot/weekly-portage-stable-package-updates-${{steps.update-listed-packages.outputs.TODAYDATE }}
delete-branch: true
base: main
title: Weekly portage-stable package updates ${{steps.update-listed-packages.outputs.TODAYDATE }}
body: |
CI: TODO
--
TODO: Changes.
--
- [ ] changelog
- [ ] image diff
labels: main
draft: true