Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.BUILDINFO rebuilds #1351

Open
68 of 71 tasks
yan12125 opened this issue Oct 28, 2019 · 14 comments
Open
68 of 71 tasks

.BUILDINFO rebuilds #1351

yan12125 opened this issue Oct 28, 2019 · 14 comments
Assignees
Labels

Comments

@yan12125
Copy link
Member

yan12125 commented Oct 28, 2019

问题类型 / Type of issues

  • 其它 / other

受影响的软件包 / Affected packages

@Sasasu:

  • kjieba

@SilverRainZ:

@VOID001:

@colinkeenan:

  • angrysearch
  • brother-hl2140
  • cla
  • clup
  • drive
  • glib
  • gnome-search-tool-no-nautilus
  • hal-flash-git
  • monogame-git
  • nant
  • pacnew-auto-git
  • plasma5-applets-active-window-control-git (dafb8a1)
  • shine
  • silentcast
  • simple-mtpfs
  • tchrome
  • wallch
  • xavs
  • xfce4-mpc-plugin-update (somehow removed from [archlinuxcn])
  • xinput_calibrator

All remaining packages removed in ff9033c

@felixonmars:

Many packages removed in 331b9d3

@frealgagu:

@heavysink:

@petronny:

@phoenixlzx:

  • codecs64
  • hydroxygen-iconset
  • sublime-text-imfix

All remaining packages removed in e31d837

@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 archlinuxcn/misc_scripts#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
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 archlinuxcn/misc_scripts#15 (comment).

@yan12125
Copy link
Member Author

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
Copy link
Member

Require matching version number?

@yan12125
Copy link
Member Author

Good idea!

@lilydjwg
Copy link
Member

Require matching version number?

This has been implemented in archlinuxcn/misc_scripts@1819558.

@yan12125
Copy link
Member Author

yan12125 commented Nov 9, 2019

This has been implemented in archlinuxcn/misc_scripts@1819558.

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

@lilydjwg
Copy link
Member

lilydjwg commented Nov 9, 2019

Oops, fixed: archlinuxcn/misc_scripts@f69bb2f

@yan12125
Copy link
Member Author

yan12125 commented Nov 9, 2019

Aha, thanks :D

@yan12125
Copy link
Member Author

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

Sasasu pushed a commit that referenced this issue Nov 24, 2019
@Sasasu Sasasu removed their assignment Nov 24, 2019
@SilverRainZ
Copy link
Member

SilverRainZ commented Nov 24, 2019

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

@yan12125
Copy link
Member Author

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

That's configured here:

pre_build: aur_pre_build
post_build: aur_post_build

@yan12125
Copy link
Member Author

@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.

VOID001 added a commit that referenced this issue Dec 1, 2019
Signed-off-by: Jianqiu Zhang <[email protected]>
@yan12125
Copy link
Member Author

yan12125 commented Dec 2, 2019

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

repo_depends = ["orbit2", ("libgnome", "libgnome-data"), "gnome-vfs-nosmb", "libbonobo", "libgnome", "libbonoboui"]

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

@yan12125 yan12125 mentioned this issue Dec 2, 2019
12 tasks
@lilydjwg
Copy link
Member

lilydjwg commented Dec 2, 2019

lilac has been fixed in archlinuxcn/lilac@aca041c.

@ykelvis
Copy link
Member

ykelvis commented Dec 3, 2019

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests