Giter VIP home page Giter VIP logo

notes's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

xiota

notes's Issues

[HowTo] Verify signatures

Import good keys:

locate chaotic-trusted

for i in $(locate chaotic-trusted) ; do
  sha256sum "$i"
done

for i in $(cut -d: -f1 $(locate chaotic-trusted | head -1)) ; do
  gpg  --keyserver keyserver.ubuntu.com --recv-key "$i"
done

Remove bad keys:

locate chaotic-revoked

for i in $(locate chaotic-revoked) ; do
  sha256sum "$i"
done

for i in $(cut -d: -f1 $(locate chaotic-revoked | head -1)) ; do
  gpg --delete-keys --fingerprint "$i"
done

Find packages with missing signatures:

cd /srv/http/repos/chaotic-aur/x86_64

for i in *.pkg.tar.{zst,gz,xz} ; do
  [ -e "$i" ] && if [ -e "$i.sig" ] ; then
    :
  else
    
    echo "Missing: $i" | sed -E 's&-([^-]+-[0-9\.]+)-(x86_64|any)\.pkg\.tar\..*$& \1&'
  fi
done

Verify signed packages:

cd /srv/http/repos/chaotic-aur/x86_64

for i in *.sig ; do
  if gpg --verify "$i" 2> /dev/null ; then
    :
  else
    echo "Failed: $i" | sed -E 's&-([^-]+-[0-9\.]+)-(x86_64|any)\.pkg\.tar\..*$& \1&'
  fi
done

[HowTo] Search PKGBUILD of all packages

Clone AUR mirror:

git clone --depth=1 https://github.com/archlinux/aur.git

Download and unpack AUR package list:

wget "https://aur.archlinux.org/packages.gz"
gzip -dk packages.gz

Get list of git branches:

_branches=$(
  git -C aur ls-remote --heads origin \
    | sed -E 's@^.*/(\S+)$@\1@'
)

Exclude likely deleted packages. Split packages have to be treated differently. (TBD)

_branches_good=$(
  comm -12 <(sort -u packages) <(sort -u <<< "$_branches")
)

_branches_bad=$(
  comm -13 <(sort -u packages) <(sort -u <<< "$_branches")
)

Or work only with chaotic-aur packages.

_packages_chaotic=$(
  repoctl list -v | sed -E 's& .*$&&'
)
_branches_good=$(
  comm -12 <(sort -u <<< "$_packages_chaotic") <(sort -u <<< "$_branches")
)
_branches_bad=$(
  comm -13 <(sort -u <<< "$_packages_chaotic") <(sort -u <<< "$_branches")
)

Fix fetch paths (make sure they end with *), and fetch. This takes a while. Repo directory will expand to 2.4GiB.

nano aur/.git/config
git -C aur fetch --all

Search branches. In this example, searching for exit.

_regex='^.*\bexit\b.*$'
sed 's&^&origin/&' <<< "$_branches_good" | xargs -P $(nproc) -I {} git -C aur grep -m1 "$_regex" {} -- PKGBUILD

[Idea] Wiki?

GitHub has wiki integration. Since notes are mostly text, maybe it would work well in a wiki format?

I enabled the wiki so we can gaze at the "Create the first page" button.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.