archlinuxcn / repo

Arch Linux CN Repository
1.48k stars 282 forks source link

.BUILDINFO rebuilds #1351

Open yan12125 opened 4 years ago

yan12125 commented 4 years ago

问题类型 / Type of issues

受影响的软件包 / Affected packages

@Sasasu:

@SilverRainZ:

@VOID001:

@colinkeenan:

All remaining packages removed in ff9033c9b04d7a345f15daaa49989da1b3dccfb1

@felixonmars:

Many packages removed in 331b9d35f8809f1918a692d47f1c6f14a8d909c2

@frealgagu:

@heavysink:

@petronny:

@phoenixlzx:

All remaining packages removed in e31d837f66e4e5679e1177535edae559c5906d04

@ykelvis:

@yuyichao:


TODO

Please rebuild affected packages. In general simply bumping pkgrel and rebuilding it (via lilac or manually) is enough.

Motivation

Pacman >= 5.1 records installed packages during the build in a file .BUILDINFO of *.pkg.tar.xz. This file is useful for dependency analysis (e.g., my ongoing PR https://github.com/archlinuxcn/misc_scripts/pull/15). Some packages do not have a .BUILDINFO at all. Other packages have old-formatted .BUILDINFO created by pacman < 5.1 or broken .BUILDINFO. For example,

$ tar -xOf /data/repo/x86_64/abootimg-git-0.6.r6.g1ebeb39-1-x86_64.pkg.tar.xz .BUILDINFO | grep installed | head -n 1
installed = acl-2.2.52-2
$ tar -xOf /data/repo/x86_64/android-sdk-26.1.1-1-x86_64.pkg.tar.xz .BUILDINFO | grep installed
installed =

Packages built with pacman >= 5.1 should have

$ tar -xOf /data/repo/x86_64/alacritty-git-1:0.3.3.1338.g9ff28388-1-x86_64.pkg.tar.xz .BUILDINFO | grep installed | head -n 1
installed = acl-2.2.53-1-x86_64

As a reference, here is the TODO for official packages: https://www.archlinux.org/todo/buildinfo-rebuild/

Supplementary details

The package list is generated with the following steps:

  1. Clone https://github.com/archlinuxcn/misc_scripts and https://github.com/lilydjwg/winterpy on build.archlinuxcn.org (e.g., into $HOME/tmp)
  2. Run PYTHONPATH=$PWD/../winterpy/pylib python ./who_depends_this_lib /data/repo/x86_64/archlinuxcn.files libproto protobuf >&| ../output
  3. Filter warnings with .BUILDINFO and use an editor to extract the package list
  4. Use the following script to generate the package list categorized by maintainers:
maintainers.py ```Python from pathlib import Path from collections import defaultdict import yaml def main(): with open('pkgs.txt') as f: all_pkgs = set(f.read().strip().split('\n')) repodir = Path('./archlinuxcn').resolve() r = defaultdict(list) checked_pkgs = set() for d in repodir.iterdir(): if d.name not in all_pkgs: continue try: with open(d / 'lilac.yaml') as f: mod = yaml.safe_load(f) except FileNotFoundError: continue for x in mod['maintainers']: r[x['github']].append(d.name) checked_pkgs.add(d.name) for who, pkgs in sorted(r.items()): print(f'@{who}:') for pkg in sorted(pkgs): print('* [ ]', pkg) print() print('Packages without maintainers:') for p in sorted(all_pkgs - checked_pkgs): print(f'* [ ] {p}') if __name__ == '__main__': main() ```

This script is based the one at https://github.com/archlinuxcn/misc_scripts/pull/15#issuecomment-546690059.

yan12125 commented 4 years ago

openlibm-git-debug From openlibm-git, not being generated anymore.

Hmm I wonder if there is a way to remove such vestigial packages. repocleaner seems to just allow *-debug packages [1].

[1] https://github.com/archlinuxcn/misc_scripts/blob/77e72be919dba27261bf5d58c7fc0168eadce618/repocleaner#L70

yuyichao commented 4 years ago

Require matching version number?

yan12125 commented 4 years ago

Good idea!

lilydjwg commented 4 years ago

Require matching version number?

This has been implemented in https://github.com/archlinuxcn/misc_scripts/commit/1819558e1d2f5cff65eb9c98bb233233874ee16e.

yan12125 commented 4 years ago

This has been implemented in archlinuxcn/misc_scripts@1819558.

@lilydjwg openlibm-git-debug is still in [archlinuxcn]. Mind to have a look?

lilydjwg commented 4 years ago

Oops, fixed: https://github.com/archlinuxcn/misc_scripts/commit/f69bb2fd171e339af7c9358b62f31b4f28749ab1

yan12125 commented 4 years ago

Aha, thanks :D

yan12125 commented 4 years ago

Cleanup the list and leave unfinished packages only.

The fontweak build failure

==> 错误: install 不应该是个数组

appears to be incorrect PKGBUILD from AUR https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=fontweak#n19

SilverRainZ commented 4 years ago

@yan12125 之前尝试在 arch repo 这边改 PKGBUILD,但不止为何 lilac 似乎依然从 AUR 拉取,总之 AUR 已改,看起来编译过了:https://build.archlinuxcn.org/packages/#/fontweak

yan12125 commented 4 years ago

不止为何 lilac 似乎依然从 AUR 拉取

That's configured here: https://github.com/archlinuxcn/repo/blob/7b8e8c29f07cbdfa2c82c1bc982f1ac0e5a33499/archlinuxcn/fontweak/lilac.yaml#L9-L11

yan12125 commented 4 years ago

@ykelvis I guess you attemped to trigger the rebuild for all three packages in 13071dd24b08513deac4549efee988d61c542809? xfce4-soundmenu-plugin is actually not triggered as in #1163, xfce4-soundmenu-plugin is marked as unmanaged due to lack of lilac.py. You may want to add pre_build and/or post_build functions and remove managed: false so that lilac will build it.

yan12125 commented 4 years ago

@VOID001 The package libgnomeui specifies a non-existent dependency gnome-vfs-nosmb

https://github.com/archlinuxcn/repo/blob/f5356772200afc44c9d82fc2bcfdaa71ddb0de1f/archlinuxcn/libgnomeui/lilac.py#L14

And thus lilac is broken

[E 12-02 09:03:16.554 lilac:408] unexpected error
    Traceback (most recent call last):
      File "/home/lilydjwg/soft/lilac/lilac", line 405, in main
        main_may_raise(D, pkgs_to_build)
      File "/home/lilydjwg/soft/lilac/lilac", line 374, in main_may_raise
        start_build(REPO, failed, update_succeeded)
      File "/home/lilydjwg/soft/lilac/lilac", line 212, in start_build
        if not d.resolve():
      File "/home/lilydjwg/soft/lilac/lilac2/packages.py", line 55, in resolve
        files = [x for x in self.pkgdir.iterdir()
      File "/home/lilydjwg/soft/lilac/lilac2/packages.py", line 55, in <listcomp>
        files = [x for x in self.pkgdir.iterdir()
      File "/usr/lib/python3.8/pathlib.py", line 1098, in iterdir
        for name in self._accessor.listdir(self):
    FileNotFoundError: [Errno 2] No such file or directory: '/home/lilydjwg/archgitrepo/archlinuxcn/gnome-vfs-nosmb'

/cc @lilydjwg

lilydjwg commented 4 years ago

lilac has been fixed in https://github.com/archlinuxcn/lilac/commit/aca041cc8fb34d8c6a45785572fb9d373f134ff3.

ykelvis commented 4 years ago

@ykelvis I guess you attemped to trigger the rebuild for all three packages in 13071dd? xfce4-soundmenu-plugin is actually not triggered as in #1163, xfce4-soundmenu-plugin is marked as unmanaged due to lack of lilac.py. You may want to add pre_build and/or post_build functions and remove managed: false so that lilac will build it.

I'll drop xfce4-soundmenu-plugin as it has been removed from aur, 1) no update in a long time; 2) official package xfce4-pulseaudio-plugin has the same function. https://lists.archlinux.org/pipermail/aur-requests/2019-August/033022.html