Skip to content

scripts/bump-pciutils: add beehive mechanics #2601

Merged
merged 1 commit into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cron-checkpciids.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
http_proxy=beehive:3128
wget --quiet http://pci-ids.ucw.cz/v2.2/pci.ids -O pci.ids
( cd /usr/share/hwdata && md5sum pci.ids ) > pci.ids.md5
PCIVER=$(grep -Pom1 '\bVersion:\s*\K\S+' pci.ids)
md5sum --status -c pci.ids.md5
if [ $? == 1 ]; then
(
echo
md5sum=($(/src/mariux/md5repo.sh pci.ids))
echo "cd ~/git/bee-files;scripts/bump-pciutils.sh ${PCIVER} ${md5sum[2]}"
echo
diff {/usr/share/hwdata/,}pci.ids
) | mailx -s "[cron] please update pci-utils.be0" wwwutz@molgen.mpg.de
fi
5 changes: 2 additions & 3 deletions pciutils.be0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env beesh

# BEE_VERSION pciutils-3.7.0.2022.03.14-0
# BEE_VERSION pciutils-3.7.0.2022.03.22-0

# PCIURL="http://pci-ids.ucw.cz/v2.2/pci.ids"
PCIURL="https://beehive.molgen.mpg.de/8e18d260f95f342dc135567357d4c5ac/pci.ids" # 2022.03.14
PCIURL="https://beehive.molgen.mpg.de/b6ca17b99d510801ca3b39a27e112ddc/pci.ids"

SRCURL[0]="https://beehive.molgen.mpg.de/e6e20482b4f25c5186e6a753c5edc361/pciutils-3.7.0.tar.xz"
#SRCURL[0]="https://www.kernel.org/pub/software/utils/pciutils/pciutils-${PKGVERSION[3]}.tar.xz"
Expand Down Expand Up @@ -48,5 +48,4 @@ mee_install() {

IDS=${D}${DATAROOTDIR}/hwdata/pci.ids
cp -v ${F}/pci.ids ${IDS}
grep Version: ${IDS}
}
8 changes: 7 additions & 1 deletion scripts/bump-pciutils.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

RELDATE=$1
MD5SUM=$2
R=0
[[ $RELDATE =~ 2[0-9]{3}.[01][0-9].[0-3][0-9]$ ]] || R=1

Expand All @@ -13,7 +14,12 @@ set -x
git checkout master
git pull
git checkout -B update-pciutils-${RELDATE}
sed -ri "/^# BEE_VERSION pciutils-3.7.0./ s/2[0-9]{3}.[01][0-9].[0-3][0-9]/${RELDATE}/" pciutils.be0
PCIURL="http://pci-ids.ucw.cz/v2.2/pci.ids"

sed -ri "\
/^# BEE_VERSION pciutils-3.7.0./ s/2[0-9]{3}.[01][0-9].[0-3][0-9]/${RELDATE}/;\
/^PCIURL=/ s/[0-9a-f]{32}/${MD5SUM}/
" pciutils.be0

eval $(beeversion pciutils.be0)
set +x
Expand Down